279 lines
4.3 MiB
279 lines
4.3 MiB
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=428)}([function(e,t,n){"use strict";e.exports=n(202)},function(e,t,n){"use strict";n.r(t),n.d(t,"ACESFilmicToneMapping",(function(){return ne})),n.d(t,"AddEquation",(function(){return O})),n.d(t,"AddOperation",(function(){return Z})),n.d(t,"AdditiveAnimationBlendMode",(function(){return Tt})),n.d(t,"AdditiveBlending",(function(){return _})),n.d(t,"AlphaFormat",(function(){return je})),n.d(t,"AlwaysDepth",(function(){return U})),n.d(t,"AlwaysStencilFunc",(function(){return nn})),n.d(t,"AmbientLight",(function(){return Bd})),n.d(t,"AmbientLightProbe",(function(){return nh})),n.d(t,"AnimationClip",(function(){return ud})),n.d(t,"AnimationLoader",(function(){return vd})),n.d(t,"AnimationMixer",(function(){return Rh})),n.d(t,"AnimationObjectGroup",(function(){return $h})),n.d(t,"AnimationUtils",(function(){return Zu})),n.d(t,"ArcCurve",(function(){return yc})),n.d(t,"ArrayCamera",(function(){return Ja})),n.d(t,"ArrowHelper",(function(){return _p})),n.d(t,"Audio",(function(){return fh})),n.d(t,"AudioAnalyser",(function(){return Sh})),n.d(t,"AudioContext",(function(){return Kd})),n.d(t,"AudioListener",(function(){return ph})),n.d(t,"AudioLoader",(function(){return eh})),n.d(t,"AxesHelper",(function(){return xp})),n.d(t,"AxisHelper",(function(){return rf})),n.d(t,"BackSide",(function(){return m})),n.d(t,"BasicDepthPacking",(function(){return jt})),n.d(t,"BasicShadowMap",(function(){return u})),n.d(t,"BinaryTextureLoader",(function(){return cf})),n.d(t,"Bone",(function(){return Ll})),n.d(t,"BooleanKeyframeTrack",(function(){return rd})),n.d(t,"BoundingBoxHelper",(function(){return of})),n.d(t,"Box2",(function(){return Qh})),n.d(t,"Box3",(function(){return cr})),n.d(t,"Box3Helper",(function(){return gp})),n.d(t,"BoxBufferGeometry",(function(){return co})),n.d(t,"BoxGeometry",(function(){return co})),n.d(t,"BoxHelper",(function(){return mp})),n.d(t,"BufferAttribute",(function(){return Oi})),n.d(t,"BufferGeometry",(function(){return Qi})),n.d(t,"BufferGeometryLoader",(function(){return Hd})),n.d(t,"ByteType",(function(){return ke})),n.d(t,"Cache",(function(){return hd})),n.d(t,"Camera",(function(){return mo})),n.d(t,"CameraHelper",(function(){return hp})),n.d(t,"CanvasRenderer",(function(){return df})),n.d(t,"CanvasTexture",(function(){return gc})),n.d(t,"CapsuleBufferGeometry",(function(){return zc})),n.d(t,"CapsuleGeometry",(function(){return zc})),n.d(t,"CatmullRomCurve3",(function(){return Oc})),n.d(t,"CineonToneMapping",(function(){return te})),n.d(t,"CircleBufferGeometry",(function(){return Fc})),n.d(t,"CircleGeometry",(function(){return Fc})),n.d(t,"ClampToEdgeWrapping",(function(){return de})),n.d(t,"Clock",(function(){return ah})),n.d(t,"Color",(function(){return Gn})),n.d(t,"ColorKeyframeTrack",(function(){return id})),n.d(t,"ColorManagement",(function(){return Ln})),n.d(t,"CompressedTexture",(function(){return mc})),n.d(t,"CompressedTextureLoader",(function(){return yd})),n.d(t,"ConeBufferGeometry",(function(){return Qc})),n.d(t,"ConeGeometry",(function(){return Qc})),n.d(t,"CubeCamera",(function(){return bo})),n.d(t,"CubeReflectionMapping",(function(){return oe})),n.d(t,"CubeRefractionMapping",(function(){return se})),n.d(t,"CubeTexture",(function(){return vo})),n.d(t,"CubeTextureLoader",(function(){return _d})),n.d(t,"CubeUVReflectionMapping",(function(){return ce})),n.d(t,"CubicBezierCurve",(function(){return Cc})),n.d(t,"CubicBezierCurve3",(function(){return Mc})),n.d(t,"CubicInterpolant",(function(){return Ku})),n.d(t,"CullFaceBack",(function(){return a})),n.d(t,"CullFaceFront",(function(){return l})),n.d(t,"CullFaceFrontBack",(function(){return c})),n.d(t,"CullFaceNone",(function(){return s})),n.d(t,"Curve",(function(){return bc})),n.d(t,"CurvePath",(function(){return Ic})),n.d(t,"CustomBlending",(function(){return k})),n.d(t,"CustomToneMapping",(function(){return re})),n.d(t,"CylinderBufferGeometry",(function(){return Uc})),n.d(t,"CylinderGeometry",(function(){return Uc})),n.d(t,"Cylindrical",(function(){return Fh})),n.d(t,"Data3DTexture",(function(){return nr})),n.d(t,"DataArrayTexture",(function(){return er})),n.d(t,"DataTexture",(function(){return Bl})),n.d(t,"DataTexture2DArray",(function(){return _f})),n.d(t,"DataTexture3D",(function(){return xf})),n.d(t,"DataTextureLoader",(function(){return xd})),n.d(t,"DataUtils",(function(){return kp})),n.d(t,"DecrementStencilOp",(function(){return Gt})),n.d(t,"DecrementWrapStencilOp",(function(){return Vt})),n.d(t,"DefaultLoadingManager",(function(){return fd})),n.d(t,"DepthFormat",(function(){return Be})),n.d(t,"DepthStencilFormat",(function(){return ze})),n.d(t,"DepthTexture",(function(){return nl})),n.d(t,"DirectionalLight",(function(){return Ld})),n.d(t,"DirectionalLightHelper",(function(){return cp})),n.d(t,"DiscreteInterpolant",(function(){return td})),n.d(t,"DodecahedronBufferGeometry",(function(){return Gc})),n.d(t,"DodecahedronGeometry",(function(){return Gc})),n.d(t,"DoubleSide",(function(){return g})),n.d(t,"DstAlphaFactor",(function(){return D})),n.d(t,"DstColorFactor",(function(){return L})),n.d(t,"DynamicBufferAttribute",(function(){return Vp})),n.d(t,"DynamicCopyUsage",(function(){return dn})),n.d(t,"DynamicDrawUsage",(function(){return on})),n.d(t,"DynamicReadUsage",(function(){return ln})),n.d(t,"EdgesGeometry",(function(){return Yc})),n.d(t,"EdgesHelper",(function(){return sf})),n.d(t,"EllipseCurve",(function(){return vc})),n.d(t,"EqualDepth",(function(){return G})),n.d(t,"EqualStencilFunc",(function(){return Zt})),n.d(t,"EquirectangularReflectionMapping",(function(){return ae})),n.d(t,"EquirectangularRefractionMapping",(function(){return le})),n.d(t,"Euler",(function(){return Vr})),n.d(t,"EventDispatcher",(function(){return gn})),n.d(t,"ExtrudeBufferGeometry",(function(){return Eu})),n.d(t,"ExtrudeGeometry",(function(){return Eu})),n.d(t,"FaceColors",(function(){return Dp})),n.d(t,"FileLoader",(function(){return bd})),n.d(t,"FlatShading",(function(){return b})),n.d(t,"Float16BufferAttribute",(function(){return Ri})),n.d(t,"Float32Attribute",(function(){return tf})),n.d(t,"Float32BufferAttribute",(function(){return ji})),n.d(t,"Float64Attribute",(function(){return nf})),n.d(t,"Float64BufferAttribute",(function(){return Ni})),n.d(t,"FloatType",(function(){return Ce})),n.d(t,"Fog",(function(){return ll})),n.d(t,"FogExp2",(function(){return al})),n.d(t,"Font",(function(){return vf})),n.d(t,"FontLoader",(function(){return bf})),n.d(t,"FramebufferTexture",(function(){return fc})),n.d(t,"FrontSide",(function(){return f})),n.d(t,"Frustum",(function(){return Eo})),n.d(t,"GLBufferAttribute",(function(){return Dh})),n.d(t,"GLSL1",(function(){return pn})),n.d(t,"GLSL3",(function(){return fn})),n.d(t,"GreaterDepth",(function(){return V})),n.d(t,"GreaterEqualDepth",(function(){return H})),n.d(t,"GreaterEqualStencilFunc",(function(){return tn})),n.d(t,"GreaterStencilFunc",(function(){return Kt})),n.d(t,"GridHelper",(function(){return ip})),n.d(t,"Group",(function(){return Ka})),n.d(t,"HalfFloatType",(function(){return Me})),n.d(t,"HemisphereLight",(function(){return Od})),n.d(t,"HemisphereLightHelper",(function(){return rp})),n.d(t,"HemisphereLightProbe",(function(){return th})),n.d(t,"IcosahedronBufferGeometry",(function(){return Tu})),n.d(t,"IcosahedronGeometry",(function(){return Tu})),n.d(t,"ImageBitmapLoader",(function(){return Zd})),n.d(t,"ImageLoader",(function(){return Sd})),n.d(t,"ImageUtils",(function(){return Vn})),n.d(t,"ImmediateRenderObject",(function(){return yf})),n.d(t,"IncrementStencilOp",(function(){return qt})),n.d(t,"IncrementWrapStencilOp",(function(){return Ht})),n.d(t,"InstancedBufferAttribute",(function(){return Ql})),n.d(t,"InstancedBufferGeometry",(function(){return Gd})),n.d(t,"InstancedInterleavedBuffer",(function(){return Nh})),n.d(t,"InstancedMesh",(function(){return Wl})),n.d(t,"Int16Attribute",(function(){return Zp})),n.d(t,"Int16BufferAttribute",(function(){return Ci})),n.d(t,"Int32Attribute",(function(){return Kp})),n.d(t,"Int32BufferAttribute",(function(){return $i})),n.d(t,"Int8Attribute",(function(){return Wp})),n.d(t,"Int8BufferAttribute",(function(){return Ei})),n.d(t,"IntType",(function(){return Ae})),n.d(t,"InterleavedBuffer",(function(){return ul})),n.d(t,"InterleavedBufferAttribute",(function(){return hl})),n.d(t,"Interpolant",(function(){return Ju})),n.d(t,"InterpolateDiscrete",(function(){return _t})),n.d(t,"InterpolateLinear",(function(){return xt})),n.d(t,"InterpolateSmooth",(function(){return wt})),n.d(t,"InvertStencilOp",(function(){return Wt})),n.d(t,"JSONLoader",(function(){return hf})),n.d(t,"KeepStencilOp",(function(){return Ut})),n.d(t,"KeyframeTrack",(function(){return nd})),n.d(t,"LOD",(function(){return $l})),n.d(t,"LatheBufferGeometry",(function(){return Bc})),n.d(t,"LatheGeometry",(function(){return Bc})),n.d(t,"Layers",(function(){return Wr})),n.d(t,"LensFlare",(function(){return ff})),n.d(t,"LessDepth",(function(){return Q})),n.d(t,"LessEqualDepth",(function(){return q})),n.d(t,"LessEqualStencilFunc",(function(){return Jt})),n.d(t,"LessStencilFunc",(function(){return Yt})),n.d(t,"Light",(function(){return kd})),n.d(t,"LightProbe",(function(){return Ud})),n.d(t,"Line",(function(){return tc})),n.d(t,"Line3",(function(){return Hh})),n.d(t,"LineBasicMaterial",(function(){return Xl})),n.d(t,"LineCurve",(function(){return $c})),n.d(t,"LineCurve3",(function(){return Pc})),n.d(t,"LineDashedMaterial",(function(){return Xu})),n.d(t,"LineLoop",(function(){return oc})),n.d(t,"LinePieces",(function(){return jp})),n.d(t,"LineSegments",(function(){return ic})),n.d(t,"LineStrip",(function(){return Rp})),n.d(t,"LinearEncoding",(function(){return Pt})),n.d(t,"LinearFilter",(function(){return ve})),n.d(t,"LinearInterpolant",(function(){return ed})),n.d(t,"LinearMipMapLinearFilter",(function(){return xe})),n.d(t,"LinearMipMapNearestFilter",(function(){return Se})),n.d(t,"LinearMipmapLinearFilter",(function(){return _e})),n.d(t,"LinearMipmapNearestFilter",(function(){return ye})),n.d(t,"LinearSRGBColorSpace",(function(){return zt})),n.d(t,"LinearToneMapping",(function(){return K})),n.d(t,"Loader",(function(){return md})),n.d(t,"LoaderUtils",(function(){return qd})),n.d(t,"LoadingManager",(function(){return pd})),n.d(t,"LoopOnce",(function(){return vt})),n.d(t,"LoopPingPong",(function(){return St})),n.d(t,"LoopRepeat",(function(){return yt})),n.d(t,"LuminanceAlphaFormat",(function(){return Le})),n.d(t,"LuminanceFormat",(function(){return Ie})),n.d(t,"MOUSE",(function(){return i})),n.d(t,"Material",(function(){return _i})),n.d(t,"MaterialLoader",(function(){return Qd})),n.d(t,"Math",(function(){return Tn})),n.d(t,"MathUtils",(function(){return Tn})),n.d(t,"Matrix3",(function(){return Mn})),n.d(t,"Matrix4",(function(){return Ir})),n.d(t,"MaxEquation",(function(){return C})),n.d(t,"Mesh",(function(){return ao})),n.d(t,"MeshBasicMaterial",(function(){return xi})),n.d(t,"MeshDepthMaterial",(function(){return Ha})),n.d(t,"MeshDistanceMaterial",(function(){return Va})),n.d(t,"MeshFaceMaterial",(function(){return Lp})),n.d(t,"MeshLambertMaterial",(function(){return Vu})),n.d(t,"MeshMatcapMaterial",(function(){return Wu})),n.d(t,"MeshNormalMaterial",(function(){return Hu})),n.d(t,"MeshPhongMaterial",(function(){return qu})),n.d(t,"MeshPhysicalMaterial",(function(){return Qu})),n.d(t,"MeshStandardMaterial",(function(){return Uu})),n.d(t,"MeshToonMaterial",(function(){return Gu})),n.d(t,"MinEquation",(function(){return T})),n.d(t,"MirroredRepeatWrapping",(function(){return he})),n.d(t,"MixOperation",(function(){return Y})),n.d(t,"MultiMaterial",(function(){return Bp})),n.d(t,"MultiplyBlending",(function(){return w})),n.d(t,"MultiplyOperation",(function(){return X})),n.d(t,"NearestFilter",(function(){return pe})),n.d(t,"NearestMipMapLinearFilter",(function(){return be})),n.d(t,"NearestMipMapNearestFilter",(function(){return me})),n.d(t,"NearestMipmapLinearFilter",(function(){return ge})),n.d(t,"NearestMipmapNearestFilter",(function(){return fe})),n.d(t,"NeverDepth",(function(){return F})),n.d(t,"NeverStencilFunc",(function(){return Xt})),n.d(t,"NoBlending",(function(){return y})),n.d(t,"NoColorSpace",(function(){return Lt})),n.d(t,"NoColors",(function(){return Np})),n.d(t,"NoToneMapping",(function(){return J})),n.d(t,"NormalAnimationBlendMode",(function(){return At})),n.d(t,"NormalBlending",(function(){return S})),n.d(t,"NotEqualDepth",(function(){return W})),n.d(t,"NotEqualStencilFunc",(function(){return en})),n.d(t,"NumberKeyframeTrack",(function(){return od})),n.d(t,"Object3D",(function(){return li})),n.d(t,"ObjectLoader",(function(){return Vd})),n.d(t,"ObjectSpaceNormalMap",(function(){return It})),n.d(t,"OctahedronBufferGeometry",(function(){return Cu})),n.d(t,"OctahedronGeometry",(function(){return Cu})),n.d(t,"OneFactor",(function(){return $})),n.d(t,"OneMinusDstAlphaFactor",(function(){return I})),n.d(t,"OneMinusDstColorFactor",(function(){return B})),n.d(t,"OneMinusSrcAlphaFactor",(function(){return N})),n.d(t,"OneMinusSrcColorFactor",(function(){return R})),n.d(t,"OrthographicCamera",(function(){return Bo})),n.d(t,"PCFShadowMap",(function(){return d})),n.d(t,"PCFSoftShadowMap",(function(){return h})),n.d(t,"PMREMGenerator",(function(){return Vo})),n.d(t,"ParametricGeometry",(function(){return mf})),n.d(t,"Particle",(function(){return Fp})),n.d(t,"ParticleBasicMaterial",(function(){return qp})),n.d(t,"ParticleSystem",(function(){return Up})),n.d(t,"ParticleSystemMaterial",(function(){return Gp})),n.d(t,"Path",(function(){return Lc})),n.d(t,"PerspectiveCamera",(function(){return go})),n.d(t,"Plane",(function(){return wo})),n.d(t,"PlaneBufferGeometry",(function(){return Co})),n.d(t,"PlaneGeometry",(function(){return Co})),n.d(t,"PlaneHelper",(function(){return bp})),n.d(t,"PointCloud",(function(){return zp})),n.d(t,"PointCloudMaterial",(function(){return Qp})),n.d(t,"PointLight",(function(){return Dd})),n.d(t,"PointLightHelper",(function(){return Kh})),n.d(t,"Points",(function(){return dc})),n.d(t,"PointsMaterial",(function(){return sc})),n.d(t,"PolarGridHelper",(function(){return op})),n.d(t,"PolyhedronBufferGeometry",(function(){return qc})),n.d(t,"PolyhedronGeometry",(function(){return qc})),n.d(t,"PositionalAudio",(function(){return yh})),n.d(t,"PropertyBinding",(function(){return Mh})),n.d(t,"PropertyMixer",(function(){return _h})),n.d(t,"QuadraticBezierCurve",(function(){return Rc})),n.d(t,"QuadraticBezierCurve3",(function(){return jc})),n.d(t,"Quaternion",(function(){return or})),n.d(t,"QuaternionKeyframeTrack",(function(){return ad})),n.d(t,"QuaternionLinearInterpolant",(function(){return sd})),n.d(t,"REVISION",(function(){return r})),n.d(t,"RGBADepthPacking",(function(){return Nt})),n.d(t,"RGBAFormat",(function(){return De})),n.d(t,"RGBAIntegerFormat",(function(){return Ge})),n.d(t,"RGBA_ASTC_10x10_Format",(function(){return ft})),n.d(t,"RGBA_ASTC_10x5_Format",(function(){return dt})),n.d(t,"RGBA_ASTC_10x6_Format",(function(){return ht})),n.d(t,"RGBA_ASTC_10x8_Format",(function(){return pt})),n.d(t,"RGBA_ASTC_12x10_Format",(function(){return mt})),n.d(t,"RGBA_ASTC_12x12_Format",(function(){return gt})),n.d(t,"RGBA_ASTC_4x4_Format",(function(){return rt})),n.d(t,"RGBA_ASTC_5x4_Format",(function(){return it})),n.d(t,"RGBA_ASTC_5x5_Format",(function(){return ot})),n.d(t,"RGBA_ASTC_6x5_Format",(function(){return st})),n.d(t,"RGBA_ASTC_6x6_Format",(function(){return at})),n.d(t,"RGBA_ASTC_8x5_Format",(function(){return lt})),n.d(t,"RGBA_ASTC_8x6_Format",(function(){return ct})),n.d(t,"RGBA_ASTC_8x8_Format",(function(){return ut})),n.d(t,"RGBA_BPTC_Format",(function(){return bt})),n.d(t,"RGBA_ETC2_EAC_Format",(function(){return nt})),n.d(t,"RGBA_PVRTC_2BPPV1_Format",(function(){return Ke})),n.d(t,"RGBA_PVRTC_4BPPV1_Format",(function(){return Je})),n.d(t,"RGBA_S3TC_DXT1_Format",(function(){return Ve})),n.d(t,"RGBA_S3TC_DXT3_Format",(function(){return We})),n.d(t,"RGBA_S3TC_DXT5_Format",(function(){return Xe})),n.d(t,"RGBFormat",(function(){return Ne})),n.d(t,"RGB_ETC1_Format",(function(){return et})),n.d(t,"RGB_ETC2_Format",(function(){return tt})),n.d(t,"RGB_PVRTC_2BPPV1_Format",(function(){return Ze})),n.d(t,"RGB_PVRTC_4BPPV1_Format",(function(){return Ye})),n.d(t,"RGB_S3TC_DXT1_Format",(function(){return He})),n.d(t,"RGFormat",(function(){return Qe})),n.d(t,"RGIntegerFormat",(function(){return qe})),n.d(t,"RawShaderMaterial",(function(){return Fu})),n.d(t,"Ray",(function(){return Dr})),n.d(t,"Raycaster",(function(){return Ih})),n.d(t,"RectAreaLight",(function(){return zd})),n.d(t,"RedFormat",(function(){return Fe})),n.d(t,"RedIntegerFormat",(function(){return Ue})),n.d(t,"ReinhardToneMapping",(function(){return ee})),n.d(t,"RepeatWrapping",(function(){return ue})),n.d(t,"ReplaceStencilOp",(function(){return Qt})),n.d(t,"ReverseSubtractEquation",(function(){return A})),n.d(t,"RingBufferGeometry",(function(){return Mu})),n.d(t,"RingGeometry",(function(){return Mu})),n.d(t,"SRGBColorSpace",(function(){return Bt})),n.d(t,"Scene",(function(){return cl})),n.d(t,"SceneUtils",(function(){return pf})),n.d(t,"ShaderChunk",(function(){return Mo})),n.d(t,"ShaderLib",(function(){return Po})),n.d(t,"ShaderMaterial",(function(){return fo})),n.d(t,"ShadowMaterial",(function(){return zu})),n.d(t,"Shape",(function(){return Zc})),n.d(t,"ShapeBufferGeometry",(function(){return $u})),n.d(t,"ShapeGeometry",(function(){return $u})),n.d(t,"ShapePath",(function(){return wp})),n.d(t,"ShapeUtils",(function(){return wu})),n.d(t,"ShortType",(function(){return Oe})),n.d(t,"Skeleton",(function(){return Ul})),n.d(t,"SkeletonHelper",(function(){return Jh})),n.d(t,"SkinnedMesh",(function(){return Il})),n.d(t,"SmoothShading",(function(){return v})),n.d(t,"Source",(function(){return Wn})),n.d(t,"Sphere",(function(){return Tr})),n.d(t,"SphereBufferGeometry",(function(){return Pu})),n.d(t,"SphereGeometry",(function(){return Pu})),n.d(t,"Spherical",(function(){return zh})),n.d(t,"SphericalHarmonics3",(function(){return Fd})),n.d(t,"SplineCurve",(function(){return Nc})),n.d(t,"SpotLight",(function(){return $d})),n.d(t,"SpotLightHelper",(function(){return Wh})),n.d(t,"Sprite",(function(){return Al})),n.d(t,"SpriteMaterial",(function(){return pl})),n.d(t,"SrcAlphaFactor",(function(){return j})),n.d(t,"SrcAlphaSaturateFactor",(function(){return z})),n.d(t,"SrcColorFactor",(function(){return P})),n.d(t,"StaticCopyUsage",(function(){return un})),n.d(t,"StaticDrawUsage",(function(){return rn})),n.d(t,"StaticReadUsage",(function(){return an})),n.d(t,"StereoCamera",(function(){return sh})),n.d(t,"StreamCopyUsage",(function(){return hn})),n.d(t,"StreamDrawUsage",(function(){return sn})),n.d(t,"StreamReadUsage",(function(){return cn})),n.d(t,"StringKeyframeTrack",(function(){return ld})),n.d(t,"SubtractEquation",(function(){return E})),n.d(t,"SubtractiveBlending",(function(){return x})),n.d(t,"TOUCH",(function(){return o})),n.d(t,"TangentSpaceNormalMap",(function(){return Dt})),n.d(t,"TetrahedronBufferGeometry",(function(){return Ru})),n.d(t,"TetrahedronGeometry",(function(){return Ru})),n.d(t,"TextGeometry",(function(){return gf})),n.d(t,"Texture",(function(){return Zn})),n.d(t,"TextureLoader",(function(){return wd})),n.d(t,"TorusBufferGeometry",(function(){return ju})),n.d(t,"TorusGeometry",(function(){return ju})),n.d(t,"TorusKnotBufferGeometry",(function(){return Nu})),n.d(t,"TorusKnotGeometry",(function(){return Nu})),n.d(t,"Triangle",(function(){return yi})),n.d(t,"TriangleFanDrawMode",(function(){return $t})),n.d(t,"TriangleStripDrawMode",(function(){return Mt})),n.d(t,"TrianglesDrawMode",(function(){return Ct})),n.d(t,"TubeBufferGeometry",(function(){return Du})),n.d(t,"TubeGeometry",(function(){return Du})),n.d(t,"UVMapping",(function(){return ie})),n.d(t,"Uint16Attribute",(function(){return Jp})),n.d(t,"Uint16BufferAttribute",(function(){return Mi})),n.d(t,"Uint32Attribute",(function(){return ef})),n.d(t,"Uint32BufferAttribute",(function(){return Pi})),n.d(t,"Uint8Attribute",(function(){return Xp})),n.d(t,"Uint8BufferAttribute",(function(){return Ai})),n.d(t,"Uint8ClampedAttribute",(function(){return Yp})),n.d(t,"Uint8ClampedBufferAttribute",(function(){return Ti})),n.d(t,"Uniform",(function(){return jh})),n.d(t,"UniformsLib",(function(){return $o})),n.d(t,"UniformsUtils",(function(){return po})),n.d(t,"UnsignedByteType",(function(){return we})),n.d(t,"UnsignedInt248Type",(function(){return Re})),n.d(t,"UnsignedIntType",(function(){return Te})),n.d(t,"UnsignedShort4444Type",(function(){return $e})),n.d(t,"UnsignedShort5551Type",(function(){return Pe})),n.d(t,"UnsignedShortType",(function(){return Ee})),n.d(t,"VSMShadowMap",(function(){return p})),n.d(t,"Vector2",(function(){return Cn})),n.d(t,"Vector3",(function(){return sr})),n.d(t,"Vector4",(function(){return Jn})),n.d(t,"VectorKeyframeTrack",(function(){return cd})),n.d(t,"Vertex",(function(){return Hp})),n.d(t,"VertexColors",(function(){return Ip})),n.d(t,"VideoTexture",(function(){return pc})),n.d(t,"WebGL1Renderer",(function(){return sl})),n.d(t,"WebGL3DRenderTarget",(function(){return rr})),n.d(t,"WebGLArrayRenderTarget",(function(){return tr})),n.d(t,"WebGLCubeRenderTarget",(function(){return yo})),n.d(t,"WebGLMultipleRenderTargets",(function(){return ir})),n.d(t,"WebGLMultisampleRenderTarget",(function(){return Sf})),n.d(t,"WebGLRenderTarget",(function(){return Kn})),n.d(t,"WebGLRenderTargetCube",(function(){return uf})),n.d(t,"WebGLRenderer",(function(){return ol})),n.d(t,"WebGLUtils",(function(){return Za})),n.d(t,"WireframeGeometry",(function(){return Iu})),n.d(t,"WireframeHelper",(function(){return af})),n.d(t,"WrapAroundEnding",(function(){return Et})),n.d(t,"XHRLoader",(function(){return lf})),n.d(t,"ZeroCurvatureEnding",(function(){return kt})),n.d(t,"ZeroFactor",(function(){return M})),n.d(t,"ZeroSlopeEnding",(function(){return Ot})),n.d(t,"ZeroStencilOp",(function(){return Ft})),n.d(t,"_SRGBAFormat",(function(){return mn})),n.d(t,"sRGBEncoding",(function(){return Rt}));
|
||
/**
|
||
* @license
|
||
* Copyright 2010-2022 Three.js Authors
|
||
* SPDX-License-Identifier: MIT
|
||
*/
|
||
const r="140",i={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},o={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},s=0,a=1,l=2,c=3,u=0,d=1,h=2,p=3,f=0,m=1,g=2,b=1,v=2,y=0,S=1,_=2,x=3,w=4,k=5,O=100,E=101,A=102,T=103,C=104,M=200,$=201,P=202,R=203,j=204,N=205,D=206,I=207,L=208,B=209,z=210,F=0,U=1,Q=2,q=3,G=4,H=5,V=6,W=7,X=0,Y=1,Z=2,J=0,K=1,ee=2,te=3,ne=4,re=5,ie=300,oe=301,se=302,ae=303,le=304,ce=306,ue=1e3,de=1001,he=1002,pe=1003,fe=1004,me=1004,ge=1005,be=1005,ve=1006,ye=1007,Se=1007,_e=1008,xe=1008,we=1009,ke=1010,Oe=1011,Ee=1012,Ae=1013,Te=1014,Ce=1015,Me=1016,$e=1017,Pe=1018,Re=1020,je=1021,Ne=1022,De=1023,Ie=1024,Le=1025,Be=1026,ze=1027,Fe=1028,Ue=1029,Qe=1030,qe=1031,Ge=1033,He=33776,Ve=33777,We=33778,Xe=33779,Ye=35840,Ze=35841,Je=35842,Ke=35843,et=36196,tt=37492,nt=37496,rt=37808,it=37809,ot=37810,st=37811,at=37812,lt=37813,ct=37814,ut=37815,dt=37816,ht=37817,pt=37818,ft=37819,mt=37820,gt=37821,bt=36492,vt=2200,yt=2201,St=2202,_t=2300,xt=2301,wt=2302,kt=2400,Ot=2401,Et=2402,At=2500,Tt=2501,Ct=0,Mt=1,$t=2,Pt=3e3,Rt=3001,jt=3200,Nt=3201,Dt=0,It=1,Lt="",Bt="srgb",zt="srgb-linear",Ft=0,Ut=7680,Qt=7681,qt=7682,Gt=7683,Ht=34055,Vt=34056,Wt=5386,Xt=512,Yt=513,Zt=514,Jt=515,Kt=516,en=517,tn=518,nn=519,rn=35044,on=35048,sn=35040,an=35045,ln=35049,cn=35041,un=35046,dn=35050,hn=35042,pn="100",fn="300 es",mn=1035;class gn{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;const n=this._listeners[e];if(void 0!==n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;const t=this._listeners[e.type];if(void 0!==t){e.target=this;const n=t.slice(0);for(let t=0,r=n.length;t<r;t++)n[t].call(this,e);e.target=null}}}const bn=[];for(let e=0;e<256;e++)bn[e]=(e<16?"0":"")+e.toString(16);let vn=1234567;const yn=Math.PI/180,Sn=180/Math.PI;function _n(){const e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(bn[255&e]+bn[e>>8&255]+bn[e>>16&255]+bn[e>>24&255]+"-"+bn[255&t]+bn[t>>8&255]+"-"+bn[t>>16&15|64]+bn[t>>24&255]+"-"+bn[63&n|128]+bn[n>>8&255]+"-"+bn[n>>16&255]+bn[n>>24&255]+bn[255&r]+bn[r>>8&255]+bn[r>>16&255]+bn[r>>24&255]).toLowerCase()}function xn(e,t,n){return Math.max(t,Math.min(n,e))}function wn(e,t){return(e%t+t)%t}function kn(e,t,n){return(1-n)*e+n*t}function On(e){return 0==(e&e-1)&&0!==e}function En(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))}function An(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}var Tn=Object.freeze({__proto__:null,DEG2RAD:yn,RAD2DEG:Sn,generateUUID:_n,clamp:xn,euclideanModulo:wn,mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},inverseLerp:function(e,t,n){return e!==t?(n-e)/(t-e):0},lerp:kn,damp:function(e,t,n,r){return kn(e,t,1-Math.exp(-n*r))},pingpong:function(e,t=1){return t-Math.abs(wn(e,2*t)-t)},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},seededRandom:function(e){void 0!==e&&(vn=e);let t=vn+=1831565813;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296},degToRad:function(e){return e*yn},radToDeg:function(e){return e*Sn},isPowerOfTwo:On,ceilPowerOfTwo:En,floorPowerOfTwo:An,setQuaternionFromProperEuler:function(e,t,n,r,i){const o=Math.cos,s=Math.sin,a=o(n/2),l=s(n/2),c=o((t+r)/2),u=s((t+r)/2),d=o((t-r)/2),h=s((t-r)/2),p=o((r-t)/2),f=s((r-t)/2);switch(i){case"XYX":e.set(a*u,l*d,l*h,a*c);break;case"YZY":e.set(l*h,a*u,l*d,a*c);break;case"ZXZ":e.set(l*d,l*h,a*u,a*c);break;case"XZX":e.set(a*u,l*f,l*p,a*c);break;case"YXY":e.set(l*p,a*u,l*f,a*c);break;case"ZYZ":e.set(l*f,l*p,a*u,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}},normalize:function(e,t){switch(t.constructor){case Float32Array:return e;case Uint16Array:return Math.round(65535*e);case Uint8Array:return Math.round(255*e);case Int16Array:return Math.round(32767*e);case Int8Array:return Math.round(127*e);default:throw new Error("Invalid component type.")}},denormalize:function(e,t){switch(t.constructor){case Float32Array:return e;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw new Error("Invalid component type.")}}});class Cn{constructor(e=0,t=0){this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e,t){return void 0!==t?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e,t){return void 0!==t?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this)}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,o=this.y-e.y;return this.x=i*n-o*r+e.x,this.y=i*r+o*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}Cn.prototype.isVector2=!0;class Mn{constructor(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}set(e,t,n,r,i,o,s,a,l){const c=this.elements;return c[0]=e,c[1]=r,c[2]=s,c[3]=t,c[4]=i,c[5]=a,c[6]=n,c[7]=o,c[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,o=n[0],s=n[3],a=n[6],l=n[1],c=n[4],u=n[7],d=n[2],h=n[5],p=n[8],f=r[0],m=r[3],g=r[6],b=r[1],v=r[4],y=r[7],S=r[2],_=r[5],x=r[8];return i[0]=o*f+s*b+a*S,i[3]=o*m+s*v+a*_,i[6]=o*g+s*y+a*x,i[1]=l*f+c*b+u*S,i[4]=l*m+c*v+u*_,i[7]=l*g+c*y+u*x,i[2]=d*f+h*b+p*S,i[5]=d*m+h*v+p*_,i[8]=d*g+h*y+p*x,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],s=e[5],a=e[6],l=e[7],c=e[8];return t*o*c-t*s*l-n*i*c+n*s*a+r*i*l-r*o*a}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],s=e[5],a=e[6],l=e[7],c=e[8],u=c*o-s*l,d=s*a-c*i,h=l*i-o*a,p=t*u+n*d+r*h;if(0===p)return this.set(0,0,0,0,0,0,0,0,0);const f=1/p;return e[0]=u*f,e[1]=(r*l-c*n)*f,e[2]=(s*n-r*o)*f,e[3]=d*f,e[4]=(c*t-r*a)*f,e[5]=(r*i-s*t)*f,e[6]=h*f,e[7]=(n*a-l*t)*f,e[8]=(o*t-n*i)*f,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,i,o,s){const a=Math.cos(i),l=Math.sin(i);return this.set(n*a,n*l,-n*(a*o+l*s)+o+e,-r*l,r*a,-r*(-l*o+a*s)+s+t,0,0,1),this}scale(e,t){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=t,n[4]*=t,n[7]*=t,this}rotate(e){const t=Math.cos(e),n=Math.sin(e),r=this.elements,i=r[0],o=r[3],s=r[6],a=r[1],l=r[4],c=r[7];return r[0]=t*i+n*a,r[3]=t*o+n*l,r[6]=t*s+n*c,r[1]=-n*i+t*a,r[4]=-n*o+t*l,r[7]=-n*s+t*c,this}translate(e,t){const n=this.elements;return n[0]+=e*n[2],n[3]+=e*n[5],n[6]+=e*n[8],n[1]+=t*n[2],n[4]+=t*n[5],n[7]+=t*n[8],this}equals(e){const t=this.elements,n=e.elements;for(let e=0;e<9;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return(new this.constructor).fromArray(this.elements)}}function $n(e){for(let t=e.length-1;t>=0;--t)if(e[t]>65535)return!0;return!1}Mn.prototype.isMatrix3=!0;const Pn={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function Rn(e,t){return new Pn[e](t)}function jn(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}function Nn(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function Dn(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}const In={[Bt]:{[zt]:Nn},[zt]:{[Bt]:Dn}},Ln={legacyMode:!0,get workingColorSpace(){return zt},set workingColorSpace(e){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(e,t,n){if(this.legacyMode||t===n||!t||!n)return e;if(In[t]&&void 0!==In[t][n]){const r=In[t][n];return e.r=r(e.r),e.g=r(e.g),e.b=r(e.b),e}throw new Error("Unsupported color space conversion.")},fromWorkingColorSpace:function(e,t){return this.convert(e,this.workingColorSpace,t)},toWorkingColorSpace:function(e,t){return this.convert(e,t,this.workingColorSpace)}},Bn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},zn={r:0,g:0,b:0},Fn={h:0,s:0,l:0},Un={h:0,s:0,l:0};function Qn(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}function qn(e,t){return t.r=e.r,t.g=e.g,t.b=e.b,t}class Gn{constructor(e,t,n){return void 0===t&&void 0===n?this.set(e):this.setRGB(e,t,n)}set(e){return e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Bt){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,Ln.toWorkingColorSpace(this,t),this}setRGB(e,t,n,r=zt){return this.r=e,this.g=t,this.b=n,Ln.toWorkingColorSpace(this,r),this}setHSL(e,t,n,r=zt){if(e=wn(e,1),t=xn(t,0,1),n=xn(n,0,1),0===t)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=Qn(i,r,e+1/3),this.g=Qn(i,r,e),this.b=Qn(i,r,e-1/3)}return Ln.toWorkingColorSpace(this,r),this}setStyle(e,t=Bt){function n(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){let e;const i=r[1],o=r[2];switch(i){case"rgb":case"rgba":if(e=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(e[1],10))/255,this.g=Math.min(255,parseInt(e[2],10))/255,this.b=Math.min(255,parseInt(e[3],10))/255,Ln.toWorkingColorSpace(this,t),n(e[4]),this;if(e=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(e[1],10))/100,this.g=Math.min(100,parseInt(e[2],10))/100,this.b=Math.min(100,parseInt(e[3],10))/100,Ln.toWorkingColorSpace(this,t),n(e[4]),this;break;case"hsl":case"hsla":if(e=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o)){const r=parseFloat(e[1])/360,i=parseInt(e[2],10)/100,o=parseInt(e[3],10)/100;return n(e[4]),this.setHSL(r,i,o,t)}}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const e=r[1],n=e.length;if(3===n)return this.r=parseInt(e.charAt(0)+e.charAt(0),16)/255,this.g=parseInt(e.charAt(1)+e.charAt(1),16)/255,this.b=parseInt(e.charAt(2)+e.charAt(2),16)/255,Ln.toWorkingColorSpace(this,t),this;if(6===n)return this.r=parseInt(e.charAt(0)+e.charAt(1),16)/255,this.g=parseInt(e.charAt(2)+e.charAt(3),16)/255,this.b=parseInt(e.charAt(4)+e.charAt(5),16)/255,Ln.toWorkingColorSpace(this,t),this}return e&&e.length>0?this.setColorName(e,t):this}setColorName(e,t=Bt){const n=Bn[e.toLowerCase()];return void 0!==n?this.setHex(n,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Nn(e.r),this.g=Nn(e.g),this.b=Nn(e.b),this}copyLinearToSRGB(e){return this.r=Dn(e.r),this.g=Dn(e.g),this.b=Dn(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Bt){return Ln.fromWorkingColorSpace(qn(this,zn),e),xn(255*zn.r,0,255)<<16^xn(255*zn.g,0,255)<<8^xn(255*zn.b,0,255)<<0}getHexString(e=Bt){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=zt){Ln.fromWorkingColorSpace(qn(this,zn),t);const n=zn.r,r=zn.g,i=zn.b,o=Math.max(n,r,i),s=Math.min(n,r,i);let a,l;const c=(s+o)/2;if(s===o)a=0,l=0;else{const e=o-s;switch(l=c<=.5?e/(o+s):e/(2-o-s),o){case n:a=(r-i)/e+(r<i?6:0);break;case r:a=(i-n)/e+2;break;case i:a=(n-r)/e+4}a/=6}return e.h=a,e.s=l,e.l=c,e}getRGB(e,t=zt){return Ln.fromWorkingColorSpace(qn(this,zn),t),e.r=zn.r,e.g=zn.g,e.b=zn.b,e}getStyle(e=Bt){return Ln.fromWorkingColorSpace(qn(this,zn),e),e!==Bt?`color(${e} ${zn.r} ${zn.g} ${zn.b})`:`rgb(${255*zn.r|0},${255*zn.g|0},${255*zn.b|0})`}offsetHSL(e,t,n){return this.getHSL(Fn),Fn.h+=e,Fn.s+=t,Fn.l+=n,this.setHSL(Fn.h,Fn.s,Fn.l),this}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(Fn),e.getHSL(Un);const n=kn(Fn.h,Un.h,t),r=kn(Fn.s,Un.s,t),i=kn(Fn.l,Un.l,t);return this.setHSL(n,r,i),this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),!0===e.normalized&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}let Hn;Gn.NAMES=Bn,Gn.prototype.isColor=!0,Gn.prototype.r=1,Gn.prototype.g=1,Gn.prototype.b=1;class Vn{static getDataURL(e){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===Hn&&(Hn=jn("canvas")),Hn.width=e.width,Hn.height=e.height;const n=Hn.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=Hn}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const t=jn("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const r=n.getImageData(0,0,e.width,e.height),i=r.data;for(let e=0;e<i.length;e++)i[e]=255*Nn(i[e]/255);return n.putImageData(r,0,0),t}if(e.data){const t=e.data.slice(0);for(let e=0;e<t.length;e++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[e]=Math.floor(255*Nn(t[e]/255)):t[e]=Nn(t[e]);return{data:t,width:e.width,height:e.height}}return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}class Wn{constructor(e=null){this.uuid=_n(),this.data=e,this.version=0}set needsUpdate(e){!0===e&&this.version++}toJSON(e){const t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.images[this.uuid])return e.images[this.uuid];const n={uuid:this.uuid,url:""},r=this.data;if(null!==r){let e;if(Array.isArray(r)){e=[];for(let t=0,n=r.length;t<n;t++)r[t].isDataTexture?e.push(Xn(r[t].image)):e.push(Xn(r[t]))}else e=Xn(r);n.url=e}return t||(e.images[this.uuid]=n),n}}function Xn(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap?Vn.getDataURL(e):e.data?{data:Array.prototype.slice.call(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}Wn.prototype.isSource=!0;let Yn=0;class Zn extends gn{constructor(e=Zn.DEFAULT_IMAGE,t=Zn.DEFAULT_MAPPING,n=de,r=de,i=ve,o=_e,s=De,a=we,l=1,c=Pt){super(),Object.defineProperty(this,"id",{value:Yn++}),this.uuid=_n(),this.name="",this.source=new Wn(e),this.mipmaps=[],this.mapping=t,this.wrapS=n,this.wrapT=r,this.magFilter=i,this.minFilter=o,this.anisotropy=l,this.format=s,this.internalFormat=null,this.type=a,this.offset=new Cn(0,0),this.repeat=new Cn(1,1),this.center=new Cn(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Mn,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=c,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}get image(){return this.source.data}set image(e){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return(new this.constructor).copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}toJSON(e){const t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];const n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==ie)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case ue:e.x=e.x-Math.floor(e.x);break;case de:e.x=e.x<0?0:1;break;case he:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case ue:e.y=e.y-Math.floor(e.y);break;case de:e.y=e.y<0?0:1;break;case he:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&(this.version++,this.source.needsUpdate=!0)}}Zn.DEFAULT_IMAGE=null,Zn.DEFAULT_MAPPING=ie,Zn.prototype.isTexture=!0;class Jn{constructor(e=0,t=0,n=0,r=1){this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}add(e,t){return void 0!==t?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e,t){return void 0!==t?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=this.w,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*t+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*t+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*t+o[7]*n+o[11]*r+o[15]*i,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,i;const o=e.elements,s=o[0],a=o[4],l=o[8],c=o[1],u=o[5],d=o[9],h=o[2],p=o[6],f=o[10];if(Math.abs(a-c)<.01&&Math.abs(l-h)<.01&&Math.abs(d-p)<.01){if(Math.abs(a+c)<.1&&Math.abs(l+h)<.1&&Math.abs(d+p)<.1&&Math.abs(s+u+f-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const e=(s+1)/2,o=(u+1)/2,m=(f+1)/2,g=(a+c)/4,b=(l+h)/4,v=(d+p)/4;return e>o&&e>m?e<.01?(n=0,r=.707106781,i=.707106781):(n=Math.sqrt(e),r=g/n,i=b/n):o>m?o<.01?(n=.707106781,r=0,i=.707106781):(r=Math.sqrt(o),n=g/r,i=v/r):m<.01?(n=.707106781,r=.707106781,i=0):(i=Math.sqrt(m),n=b/i,r=v/i),this.set(n,r,i,t),this}let m=Math.sqrt((p-d)*(p-d)+(l-h)*(l-h)+(c-a)*(c-a));return Math.abs(m)<.001&&(m=1),this.x=(p-d)/m,this.y=(l-h)/m,this.z=(c-a)/m,this.w=Math.acos((s+u+f-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}Jn.prototype.isVector4=!0;class Kn extends gn{constructor(e,t,n={}){super(),this.width=e,this.height=t,this.depth=1,this.scissor=new Jn(0,0,e,t),this.scissorTest=!1,this.viewport=new Jn(0,0,e,t);const r={width:e,height:t,depth:1};this.texture=new Zn(r,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=void 0!==n.generateMipmaps&&n.generateMipmaps,this.texture.internalFormat=void 0!==n.internalFormat?n.internalFormat:null,this.texture.minFilter=void 0!==n.minFilter?n.minFilter:ve,this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0!==n.stencilBuffer&&n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null,this.samples=void 0!==n.samples?n.samples:0}setSize(e,t,n=1){this.width===e&&this.height===t&&this.depth===n||(this.width=e,this.height=t,this.depth=n,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return(new this.constructor).copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new Wn(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}Kn.prototype.isWebGLRenderTarget=!0;class er extends Zn{constructor(e=null,t=1,n=1,r=1){super(null),this.image={data:e,width:t,height:n,depth:r},this.magFilter=pe,this.minFilter=pe,this.wrapR=de,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}er.prototype.isDataArrayTexture=!0;class tr extends Kn{constructor(e,t,n){super(e,t),this.depth=n,this.texture=new er(null,e,t,n),this.texture.isRenderTargetTexture=!0}}tr.prototype.isWebGLArrayRenderTarget=!0;class nr extends Zn{constructor(e=null,t=1,n=1,r=1){super(null),this.image={data:e,width:t,height:n,depth:r},this.magFilter=pe,this.minFilter=pe,this.wrapR=de,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}nr.prototype.isData3DTexture=!0;class rr extends Kn{constructor(e,t,n){super(e,t),this.depth=n,this.texture=new nr(null,e,t,n),this.texture.isRenderTargetTexture=!0}}rr.prototype.isWebGL3DRenderTarget=!0;class ir extends Kn{constructor(e,t,n,r={}){super(e,t,r);const i=this.texture;this.texture=[];for(let e=0;e<n;e++)this.texture[e]=i.clone(),this.texture[e].isRenderTargetTexture=!0}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let r=0,i=this.texture.length;r<i;r++)this.texture[r].image.width=e,this.texture[r].image.height=t,this.texture[r].image.depth=n;this.dispose()}return this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t),this}copy(e){this.dispose(),this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.set(0,0,this.width,this.height),this.scissor.set(0,0,this.width,this.height),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone()),this.texture.length=0;for(let t=0,n=e.texture.length;t<n;t++)this.texture[t]=e.texture[t].clone(),this.texture[t].isRenderTargetTexture=!0;return this}}ir.prototype.isWebGLMultipleRenderTargets=!0;class or{constructor(e=0,t=0,n=0,r=1){this._x=e,this._y=t,this._z=n,this._w=r}static slerp(e,t,n,r){return console.warn("THREE.Quaternion: Static .slerp() has been deprecated. Use qm.slerpQuaternions( qa, qb, t ) instead."),n.slerpQuaternions(e,t,r)}static slerpFlat(e,t,n,r,i,o,s){let a=n[r+0],l=n[r+1],c=n[r+2],u=n[r+3];const d=i[o+0],h=i[o+1],p=i[o+2],f=i[o+3];if(0===s)return e[t+0]=a,e[t+1]=l,e[t+2]=c,void(e[t+3]=u);if(1===s)return e[t+0]=d,e[t+1]=h,e[t+2]=p,void(e[t+3]=f);if(u!==f||a!==d||l!==h||c!==p){let e=1-s;const t=a*d+l*h+c*p+u*f,n=t>=0?1:-1,r=1-t*t;if(r>Number.EPSILON){const i=Math.sqrt(r),o=Math.atan2(i,t*n);e=Math.sin(e*o)/i,s=Math.sin(s*o)/i}const i=s*n;if(a=a*e+d*i,l=l*e+h*i,c=c*e+p*i,u=u*e+f*i,e===1-s){const e=1/Math.sqrt(a*a+l*l+c*c+u*u);a*=e,l*=e,c*=e,u*=e}}e[t]=a,e[t+1]=l,e[t+2]=c,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,i,o){const s=n[r],a=n[r+1],l=n[r+2],c=n[r+3],u=i[o],d=i[o+1],h=i[o+2],p=i[o+3];return e[t]=s*p+c*u+a*h-l*d,e[t+1]=a*p+c*d+l*u-s*h,e[t+2]=l*p+c*h+s*d-a*u,e[t+3]=c*p-s*u-a*d-l*h,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){if(!e||!e.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");const n=e._x,r=e._y,i=e._z,o=e._order,s=Math.cos,a=Math.sin,l=s(n/2),c=s(r/2),u=s(i/2),d=a(n/2),h=a(r/2),p=a(i/2);switch(o){case"XYZ":this._x=d*c*u+l*h*p,this._y=l*h*u-d*c*p,this._z=l*c*p+d*h*u,this._w=l*c*u-d*h*p;break;case"YXZ":this._x=d*c*u+l*h*p,this._y=l*h*u-d*c*p,this._z=l*c*p-d*h*u,this._w=l*c*u+d*h*p;break;case"ZXY":this._x=d*c*u-l*h*p,this._y=l*h*u+d*c*p,this._z=l*c*p+d*h*u,this._w=l*c*u-d*h*p;break;case"ZYX":this._x=d*c*u-l*h*p,this._y=l*h*u+d*c*p,this._z=l*c*p-d*h*u,this._w=l*c*u+d*h*p;break;case"YZX":this._x=d*c*u+l*h*p,this._y=l*h*u+d*c*p,this._z=l*c*p-d*h*u,this._w=l*c*u-d*h*p;break;case"XZY":this._x=d*c*u-l*h*p,this._y=l*h*u-d*c*p,this._z=l*c*p+d*h*u,this._w=l*c*u+d*h*p;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return!1!==t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],r=t[4],i=t[8],o=t[1],s=t[5],a=t[9],l=t[2],c=t[6],u=t[10],d=n+s+u;if(d>0){const e=.5/Math.sqrt(d+1);this._w=.25/e,this._x=(c-a)*e,this._y=(i-l)*e,this._z=(o-r)*e}else if(n>s&&n>u){const e=2*Math.sqrt(1+n-s-u);this._w=(c-a)/e,this._x=.25*e,this._y=(r+o)/e,this._z=(i+l)/e}else if(s>u){const e=2*Math.sqrt(1+s-n-u);this._w=(i-l)/e,this._x=(r+o)/e,this._y=.25*e,this._z=(a+c)/e}else{const e=2*Math.sqrt(1+u-n-s);this._w=(o-r)/e,this._x=(i+l)/e,this._y=(a+c)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<Number.EPSILON?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(xn(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(0===n)return this;const r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e,t){return void 0!==t?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,r=e._y,i=e._z,o=e._w,s=t._x,a=t._y,l=t._z,c=t._w;return this._x=n*c+o*s+r*l-i*a,this._y=r*c+o*a+i*s-n*l,this._z=i*c+o*l+n*a-r*s,this._w=o*c-n*s-r*a-i*l,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);const n=this._x,r=this._y,i=this._z,o=this._w;let s=o*e._w+n*e._x+r*e._y+i*e._z;if(s<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,s=-s):this.copy(e),s>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;const a=1-s*s;if(a<=Number.EPSILON){const e=1-t;return this._w=e*o+t*this._w,this._x=e*n+t*this._x,this._y=e*r+t*this._y,this._z=e*i+t*this._z,this.normalize(),this._onChangeCallback(),this}const l=Math.sqrt(a),c=Math.atan2(l,s),u=Math.sin((1-t)*c)/l,d=Math.sin(t*c)/l;return this._w=o*u+this._w*d,this._x=n*u+this._x*d,this._y=r*u+this._y*d,this._z=i*u+this._z*d,this._onChangeCallback(),this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=Math.random(),t=Math.sqrt(1-e),n=Math.sqrt(e),r=2*Math.PI*Math.random(),i=2*Math.PI*Math.random();return this.set(t*Math.cos(r),n*Math.sin(i),n*Math.cos(i),t*Math.sin(r))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}or.prototype.isQuaternion=!0;class sr{constructor(e=0,t=0,n=0){this.x=e,this.y=t,this.z=n}set(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e,t){return void 0!==t?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e,t){return void 0!==t?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e,t){return void 0!==t?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(lr.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(lr.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=e.elements,o=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*o,this}applyQuaternion(e){const t=this.x,n=this.y,r=this.z,i=e.x,o=e.y,s=e.z,a=e.w,l=a*t+o*r-s*n,c=a*n+s*t-i*r,u=a*r+i*n-o*t,d=-i*t-o*n-s*r;return this.x=l*a+d*-i+c*-s-u*-o,this.y=c*a+d*-o+u*-i-l*-s,this.z=u*a+d*-s+l*-o-c*-i,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e,t){return void 0!==t?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,r=e.y,i=e.z,o=t.x,s=t.y,a=t.z;return this.x=r*a-i*s,this.y=i*o-n*a,this.z=n*s-r*o,this}projectOnVector(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return ar.copy(this).projectOnVector(e),this.sub(ar)}reflect(e){return this.sub(ar.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(xn(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=2*(Math.random()-.5),t=Math.random()*Math.PI*2,n=Math.sqrt(1-e**2);return this.x=n*Math.cos(t),this.y=n*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}sr.prototype.isVector3=!0;const ar=new sr,lr=new or;class cr{constructor(e=new sr(1/0,1/0,1/0),t=new sr(-1/0,-1/0,-1/0)){this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){let t=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,s=-1/0;for(let a=0,l=e.length;a<l;a+=3){const l=e[a],c=e[a+1],u=e[a+2];l<t&&(t=l),c<n&&(n=c),u<r&&(r=u),l>i&&(i=l),c>o&&(o=c),u>s&&(s=u)}return this.min.set(t,n,r),this.max.set(i,o,s),this}setFromBufferAttribute(e){let t=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,s=-1/0;for(let a=0,l=e.count;a<l;a++){const l=e.getX(a),c=e.getY(a),u=e.getZ(a);l<t&&(t=l),c<n&&(n=c),u<r&&(r=u),l>i&&(i=l),c>o&&(o=c),u>s&&(s=u)}return this.min.set(t,n,r),this.max.set(i,o,s),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=dr.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);const n=e.geometry;if(void 0!==n)if(t&&null!=n.attributes&&void 0!==n.attributes.position){const t=n.attributes.position;for(let n=0,r=t.count;n<r;n++)dr.fromBufferAttribute(t,n).applyMatrix4(e.matrixWorld),this.expandByPoint(dr)}else null===n.boundingBox&&n.computeBoundingBox(),hr.copy(n.boundingBox),hr.applyMatrix4(e.matrixWorld),this.union(hr);const r=e.children;for(let e=0,n=r.length;e<n;e++)this.expandByObject(r[e],t);return this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)}intersectsSphere(e){return this.clampPoint(e.center,dr),dr.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(yr),Sr.subVectors(this.max,yr),pr.subVectors(e.a,yr),fr.subVectors(e.b,yr),mr.subVectors(e.c,yr),gr.subVectors(fr,pr),br.subVectors(mr,fr),vr.subVectors(pr,mr);let t=[0,-gr.z,gr.y,0,-br.z,br.y,0,-vr.z,vr.y,gr.z,0,-gr.x,br.z,0,-br.x,vr.z,0,-vr.x,-gr.y,gr.x,0,-br.y,br.x,0,-vr.y,vr.x,0];return!!wr(t,pr,fr,mr,Sr)&&(t=[1,0,0,0,1,0,0,0,1],!!wr(t,pr,fr,mr,Sr)&&(_r.crossVectors(gr,br),t=[_r.x,_r.y,_r.z],wr(t,pr,fr,mr,Sr)))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return dr.copy(e).clamp(this.min,this.max).sub(e).length()}getBoundingSphere(e){return this.getCenter(e.center),e.radius=.5*this.getSize(dr).length(),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||(ur[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),ur[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),ur[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),ur[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),ur[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),ur[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),ur[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),ur[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(ur)),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}cr.prototype.isBox3=!0;const ur=[new sr,new sr,new sr,new sr,new sr,new sr,new sr,new sr],dr=new sr,hr=new cr,pr=new sr,fr=new sr,mr=new sr,gr=new sr,br=new sr,vr=new sr,yr=new sr,Sr=new sr,_r=new sr,xr=new sr;function wr(e,t,n,r,i){for(let o=0,s=e.length-3;o<=s;o+=3){xr.fromArray(e,o);const s=i.x*Math.abs(xr.x)+i.y*Math.abs(xr.y)+i.z*Math.abs(xr.z),a=t.dot(xr),l=n.dot(xr),c=r.dot(xr);if(Math.max(-Math.max(a,l,c),Math.min(a,l,c))>s)return!1}return!0}const kr=new cr,Or=new sr,Er=new sr,Ar=new sr;class Tr{constructor(e=new sr,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;void 0!==t?n.copy(t):kr.setFromPoints(e).getCenter(n);let r=0;for(let t=0,i=e.length;t<i;t++)r=Math.max(r,n.distanceToSquared(e[t]));return this.radius=Math.sqrt(r),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){Ar.subVectors(e,this.center);const t=Ar.lengthSq();if(t>this.radius*this.radius){const e=Math.sqrt(t),n=.5*(e-this.radius);this.center.add(Ar.multiplyScalar(n/e)),this.radius+=n}return this}union(e){return!0===this.center.equals(e.center)?Er.set(0,0,1).multiplyScalar(e.radius):Er.subVectors(e.center,this.center).normalize().multiplyScalar(e.radius),this.expandByPoint(Or.copy(e.center).add(Er)),this.expandByPoint(Or.copy(e.center).sub(Er)),this}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const Cr=new sr,Mr=new sr,$r=new sr,Pr=new sr,Rr=new sr,jr=new sr,Nr=new sr;class Dr{constructor(e=new sr,t=new sr(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.direction).multiplyScalar(e).add(this.origin)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Cr)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Cr.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Cr.copy(this.direction).multiplyScalar(t).add(this.origin),Cr.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){Mr.copy(e).add(t).multiplyScalar(.5),$r.copy(t).sub(e).normalize(),Pr.copy(this.origin).sub(Mr);const i=.5*e.distanceTo(t),o=-this.direction.dot($r),s=Pr.dot(this.direction),a=-Pr.dot($r),l=Pr.lengthSq(),c=Math.abs(1-o*o);let u,d,h,p;if(c>0)if(u=o*a-s,d=o*s-a,p=i*c,u>=0)if(d>=-p)if(d<=p){const e=1/c;u*=e,d*=e,h=u*(u+o*d+2*s)+d*(o*u+d+2*a)+l}else d=i,u=Math.max(0,-(o*d+s)),h=-u*u+d*(d+2*a)+l;else d=-i,u=Math.max(0,-(o*d+s)),h=-u*u+d*(d+2*a)+l;else d<=-p?(u=Math.max(0,-(-o*i+s)),d=u>0?-i:Math.min(Math.max(-i,-a),i),h=-u*u+d*(d+2*a)+l):d<=p?(u=0,d=Math.min(Math.max(-i,-a),i),h=d*(d+2*a)+l):(u=Math.max(0,-(o*i+s)),d=u>0?i:Math.min(Math.max(-i,-a),i),h=-u*u+d*(d+2*a)+l);else d=o>0?-i:i,u=Math.max(0,-(o*d+s)),h=-u*u+d*(d+2*a)+l;return n&&n.copy(this.direction).multiplyScalar(u).add(this.origin),r&&r.copy($r).multiplyScalar(d).add(Mr),h}intersectSphere(e,t){Cr.subVectors(e.center,this.origin);const n=Cr.dot(this.direction),r=Cr.dot(Cr)-n*n,i=e.radius*e.radius;if(r>i)return null;const o=Math.sqrt(i-r),s=n-o,a=n+o;return s<0&&a<0?null:s<0?this.at(a,t):this.at(s,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return null===n?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);if(0===t)return!0;return e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,i,o,s,a;const l=1/this.direction.x,c=1/this.direction.y,u=1/this.direction.z,d=this.origin;return l>=0?(n=(e.min.x-d.x)*l,r=(e.max.x-d.x)*l):(n=(e.max.x-d.x)*l,r=(e.min.x-d.x)*l),c>=0?(i=(e.min.y-d.y)*c,o=(e.max.y-d.y)*c):(i=(e.max.y-d.y)*c,o=(e.min.y-d.y)*c),n>o||i>r?null:((i>n||n!=n)&&(n=i),(o<r||r!=r)&&(r=o),u>=0?(s=(e.min.z-d.z)*u,a=(e.max.z-d.z)*u):(s=(e.max.z-d.z)*u,a=(e.min.z-d.z)*u),n>a||s>r?null:((s>n||n!=n)&&(n=s),(a<r||r!=r)&&(r=a),r<0?null:this.at(n>=0?n:r,t)))}intersectsBox(e){return null!==this.intersectBox(e,Cr)}intersectTriangle(e,t,n,r,i){Rr.subVectors(t,e),jr.subVectors(n,e),Nr.crossVectors(Rr,jr);let o,s=this.direction.dot(Nr);if(s>0){if(r)return null;o=1}else{if(!(s<0))return null;o=-1,s=-s}Pr.subVectors(this.origin,e);const a=o*this.direction.dot(jr.crossVectors(Pr,jr));if(a<0)return null;const l=o*this.direction.dot(Rr.cross(Pr));if(l<0)return null;if(a+l>s)return null;const c=-o*Pr.dot(Nr);return c<0?null:this.at(c/s,i)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class Ir{constructor(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}set(e,t,n,r,i,o,s,a,l,c,u,d,h,p,f,m){const g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=i,g[5]=o,g[9]=s,g[13]=a,g[2]=l,g[6]=c,g[10]=u,g[14]=d,g[3]=h,g[7]=p,g[11]=f,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new Ir).fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,r=1/Lr.setFromMatrixColumn(e,0).length(),i=1/Lr.setFromMatrixColumn(e,1).length(),o=1/Lr.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*o,t[9]=n[9]*o,t[10]=n[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");const t=this.elements,n=e.x,r=e.y,i=e.z,o=Math.cos(n),s=Math.sin(n),a=Math.cos(r),l=Math.sin(r),c=Math.cos(i),u=Math.sin(i);if("XYZ"===e.order){const e=o*c,n=o*u,r=s*c,i=s*u;t[0]=a*c,t[4]=-a*u,t[8]=l,t[1]=n+r*l,t[5]=e-i*l,t[9]=-s*a,t[2]=i-e*l,t[6]=r+n*l,t[10]=o*a}else if("YXZ"===e.order){const e=a*c,n=a*u,r=l*c,i=l*u;t[0]=e+i*s,t[4]=r*s-n,t[8]=o*l,t[1]=o*u,t[5]=o*c,t[9]=-s,t[2]=n*s-r,t[6]=i+e*s,t[10]=o*a}else if("ZXY"===e.order){const e=a*c,n=a*u,r=l*c,i=l*u;t[0]=e-i*s,t[4]=-o*u,t[8]=r+n*s,t[1]=n+r*s,t[5]=o*c,t[9]=i-e*s,t[2]=-o*l,t[6]=s,t[10]=o*a}else if("ZYX"===e.order){const e=o*c,n=o*u,r=s*c,i=s*u;t[0]=a*c,t[4]=r*l-n,t[8]=e*l+i,t[1]=a*u,t[5]=i*l+e,t[9]=n*l-r,t[2]=-l,t[6]=s*a,t[10]=o*a}else if("YZX"===e.order){const e=o*a,n=o*l,r=s*a,i=s*l;t[0]=a*c,t[4]=i-e*u,t[8]=r*u+n,t[1]=u,t[5]=o*c,t[9]=-s*c,t[2]=-l*c,t[6]=n*u+r,t[10]=e-i*u}else if("XZY"===e.order){const e=o*a,n=o*l,r=s*a,i=s*l;t[0]=a*c,t[4]=-u,t[8]=l*c,t[1]=e*u+i,t[5]=o*c,t[9]=n*u-r,t[2]=r*u-n,t[6]=s*c,t[10]=i*u+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(zr,e,Fr)}lookAt(e,t,n){const r=this.elements;return qr.subVectors(e,t),0===qr.lengthSq()&&(qr.z=1),qr.normalize(),Ur.crossVectors(n,qr),0===Ur.lengthSq()&&(1===Math.abs(n.z)?qr.x+=1e-4:qr.z+=1e-4,qr.normalize(),Ur.crossVectors(n,qr)),Ur.normalize(),Qr.crossVectors(qr,Ur),r[0]=Ur.x,r[4]=Qr.x,r[8]=qr.x,r[1]=Ur.y,r[5]=Qr.y,r[9]=qr.y,r[2]=Ur.z,r[6]=Qr.z,r[10]=qr.z,this}multiply(e,t){return void 0!==t?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,o=n[0],s=n[4],a=n[8],l=n[12],c=n[1],u=n[5],d=n[9],h=n[13],p=n[2],f=n[6],m=n[10],g=n[14],b=n[3],v=n[7],y=n[11],S=n[15],_=r[0],x=r[4],w=r[8],k=r[12],O=r[1],E=r[5],A=r[9],T=r[13],C=r[2],M=r[6],$=r[10],P=r[14],R=r[3],j=r[7],N=r[11],D=r[15];return i[0]=o*_+s*O+a*C+l*R,i[4]=o*x+s*E+a*M+l*j,i[8]=o*w+s*A+a*$+l*N,i[12]=o*k+s*T+a*P+l*D,i[1]=c*_+u*O+d*C+h*R,i[5]=c*x+u*E+d*M+h*j,i[9]=c*w+u*A+d*$+h*N,i[13]=c*k+u*T+d*P+h*D,i[2]=p*_+f*O+m*C+g*R,i[6]=p*x+f*E+m*M+g*j,i[10]=p*w+f*A+m*$+g*N,i[14]=p*k+f*T+m*P+g*D,i[3]=b*_+v*O+y*C+S*R,i[7]=b*x+v*E+y*M+S*j,i[11]=b*w+v*A+y*$+S*N,i[15]=b*k+v*T+y*P+S*D,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],o=e[1],s=e[5],a=e[9],l=e[13],c=e[2],u=e[6],d=e[10],h=e[14];return e[3]*(+i*a*u-r*l*u-i*s*d+n*l*d+r*s*h-n*a*h)+e[7]*(+t*a*h-t*l*d+i*o*d-r*o*h+r*l*c-i*a*c)+e[11]*(+t*l*u-t*s*h-i*o*u+n*o*h+i*s*c-n*l*c)+e[15]*(-r*s*c-t*a*u+t*s*d+r*o*u-n*o*d+n*a*c)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],s=e[5],a=e[6],l=e[7],c=e[8],u=e[9],d=e[10],h=e[11],p=e[12],f=e[13],m=e[14],g=e[15],b=u*m*l-f*d*l+f*a*h-s*m*h-u*a*g+s*d*g,v=p*d*l-c*m*l-p*a*h+o*m*h+c*a*g-o*d*g,y=c*f*l-p*u*l+p*s*h-o*f*h-c*s*g+o*u*g,S=p*u*a-c*f*a-p*s*d+o*f*d+c*s*m-o*u*m,_=t*b+n*v+r*y+i*S;if(0===_)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const x=1/_;return e[0]=b*x,e[1]=(f*d*i-u*m*i-f*r*h+n*m*h+u*r*g-n*d*g)*x,e[2]=(s*m*i-f*a*i+f*r*l-n*m*l-s*r*g+n*a*g)*x,e[3]=(u*a*i-s*d*i-u*r*l+n*d*l+s*r*h-n*a*h)*x,e[4]=v*x,e[5]=(c*m*i-p*d*i+p*r*h-t*m*h-c*r*g+t*d*g)*x,e[6]=(p*a*i-o*m*i-p*r*l+t*m*l+o*r*g-t*a*g)*x,e[7]=(o*d*i-c*a*i+c*r*l-t*d*l-o*r*h+t*a*h)*x,e[8]=y*x,e[9]=(p*u*i-c*f*i-p*n*h+t*f*h+c*n*g-t*u*g)*x,e[10]=(o*f*i-p*s*i+p*n*l-t*f*l-o*n*g+t*s*g)*x,e[11]=(c*s*i-o*u*i-c*n*l+t*u*l+o*n*h-t*s*h)*x,e[12]=S*x,e[13]=(c*f*r-p*u*r+p*n*d-t*f*d-c*n*m+t*u*m)*x,e[14]=(p*s*r-o*f*r-p*n*a+t*f*a+o*n*m-t*s*m)*x,e[15]=(o*u*r-c*s*r+c*n*a-t*u*a-o*n*d+t*s*d)*x,this}scale(e){const t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),r=Math.sin(t),i=1-n,o=e.x,s=e.y,a=e.z,l=i*o,c=i*s;return this.set(l*o+n,l*s-r*a,l*a+r*s,0,l*s+r*a,c*s+n,c*a-r*o,0,l*a-r*s,c*a+r*o,i*a*a+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,i,o){return this.set(1,n,i,0,e,1,o,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){const r=this.elements,i=t._x,o=t._y,s=t._z,a=t._w,l=i+i,c=o+o,u=s+s,d=i*l,h=i*c,p=i*u,f=o*c,m=o*u,g=s*u,b=a*l,v=a*c,y=a*u,S=n.x,_=n.y,x=n.z;return r[0]=(1-(f+g))*S,r[1]=(h+y)*S,r[2]=(p-v)*S,r[3]=0,r[4]=(h-y)*_,r[5]=(1-(d+g))*_,r[6]=(m+b)*_,r[7]=0,r[8]=(p+v)*x,r[9]=(m-b)*x,r[10]=(1-(d+f))*x,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){const r=this.elements;let i=Lr.set(r[0],r[1],r[2]).length();const o=Lr.set(r[4],r[5],r[6]).length(),s=Lr.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),e.x=r[12],e.y=r[13],e.z=r[14],Br.copy(this);const a=1/i,l=1/o,c=1/s;return Br.elements[0]*=a,Br.elements[1]*=a,Br.elements[2]*=a,Br.elements[4]*=l,Br.elements[5]*=l,Br.elements[6]*=l,Br.elements[8]*=c,Br.elements[9]*=c,Br.elements[10]*=c,t.setFromRotationMatrix(Br),n.x=i,n.y=o,n.z=s,this}makePerspective(e,t,n,r,i,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");const s=this.elements,a=2*i/(t-e),l=2*i/(n-r),c=(t+e)/(t-e),u=(n+r)/(n-r),d=-(o+i)/(o-i),h=-2*o*i/(o-i);return s[0]=a,s[4]=0,s[8]=c,s[12]=0,s[1]=0,s[5]=l,s[9]=u,s[13]=0,s[2]=0,s[6]=0,s[10]=d,s[14]=h,s[3]=0,s[7]=0,s[11]=-1,s[15]=0,this}makeOrthographic(e,t,n,r,i,o){const s=this.elements,a=1/(t-e),l=1/(n-r),c=1/(o-i),u=(t+e)*a,d=(n+r)*l,h=(o+i)*c;return s[0]=2*a,s[4]=0,s[8]=0,s[12]=-u,s[1]=0,s[5]=2*l,s[9]=0,s[13]=-d,s[2]=0,s[6]=0,s[10]=-2*c,s[14]=-h,s[3]=0,s[7]=0,s[11]=0,s[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let e=0;e<16;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}Ir.prototype.isMatrix4=!0;const Lr=new sr,Br=new Ir,zr=new sr(0,0,0),Fr=new sr(1,1,1),Ur=new sr,Qr=new sr,qr=new sr,Gr=new Ir,Hr=new or;class Vr{constructor(e=0,t=0,n=0,r=Vr.DefaultOrder){this._x=e,this._y=t,this._z=n,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,r=this._order){return this._x=e,this._y=t,this._z=n,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const r=e.elements,i=r[0],o=r[4],s=r[8],a=r[1],l=r[5],c=r[9],u=r[2],d=r[6],h=r[10];switch(t){case"XYZ":this._y=Math.asin(xn(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-c,h),this._z=Math.atan2(-o,i)):(this._x=Math.atan2(d,l),this._z=0);break;case"YXZ":this._x=Math.asin(-xn(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(s,h),this._z=Math.atan2(a,l)):(this._y=Math.atan2(-u,i),this._z=0);break;case"ZXY":this._x=Math.asin(xn(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-u,h),this._z=Math.atan2(-o,l)):(this._y=0,this._z=Math.atan2(a,i));break;case"ZYX":this._y=Math.asin(-xn(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(d,h),this._z=Math.atan2(a,i)):(this._x=0,this._z=Math.atan2(-o,l));break;case"YZX":this._z=Math.asin(xn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-c,l),this._y=Math.atan2(-u,i)):(this._x=0,this._y=Math.atan2(s,h));break;case"XZY":this._z=Math.asin(-xn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(d,l),this._y=Math.atan2(s,i)):(this._x=Math.atan2(-c,h),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===n&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return Gr.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Gr,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return Hr.setFromEuler(this),this.setFromQuaternion(Hr,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Vr.prototype.isEuler=!0,Vr.DefaultOrder="XYZ",Vr.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];class Wr{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return 0!=(this.mask&e.mask)}isEnabled(e){return 0!=(this.mask&(1<<e|0))}}let Xr=0;const Yr=new sr,Zr=new or,Jr=new Ir,Kr=new sr,ei=new sr,ti=new sr,ni=new or,ri=new sr(1,0,0),ii=new sr(0,1,0),oi=new sr(0,0,1),si={type:"added"},ai={type:"removed"};class li extends gn{constructor(){super(),Object.defineProperty(this,"id",{value:Xr++}),this.uuid=_n(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=li.DefaultUp.clone();const e=new sr,t=new Vr,n=new or,r=new sr(1,1,1);t._onChange((function(){n.setFromEuler(t,!1)})),n._onChange((function(){t.setFromQuaternion(n,void 0,!1)})),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new Ir},normalMatrix:{value:new Mn}}),this.matrix=new Ir,this.matrixWorld=new Ir,this.matrixAutoUpdate=li.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new Wr,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return Zr.setFromAxisAngle(e,t),this.quaternion.multiply(Zr),this}rotateOnWorldAxis(e,t){return Zr.setFromAxisAngle(e,t),this.quaternion.premultiply(Zr),this}rotateX(e){return this.rotateOnAxis(ri,e)}rotateY(e){return this.rotateOnAxis(ii,e)}rotateZ(e){return this.rotateOnAxis(oi,e)}translateOnAxis(e,t){return Yr.copy(e).applyQuaternion(this.quaternion),this.position.add(Yr.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(ri,e)}translateY(e){return this.translateOnAxis(ii,e)}translateZ(e){return this.translateOnAxis(oi,e)}localToWorld(e){return e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return e.applyMatrix4(Jr.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?Kr.copy(e):Kr.set(e,t,n);const r=this.parent;this.updateWorldMatrix(!0,!1),ei.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Jr.lookAt(ei,Kr,this.up):Jr.lookAt(Kr,ei,this.up),this.quaternion.setFromRotationMatrix(Jr),r&&(Jr.extractRotation(r.matrixWorld),Zr.setFromRotationMatrix(Jr),this.quaternion.premultiply(Zr.invert()))}add(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(null!==e.parent&&e.parent.remove(e),e.parent=this,this.children.push(e),e.dispatchEvent(si)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}const t=this.children.indexOf(e);return-1!==t&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(ai)),this}removeFromParent(){const e=this.parent;return null!==e&&e.remove(this),this}clear(){for(let e=0;e<this.children.length;e++){const t=this.children[e];t.parent=null,t.dispatchEvent(ai)}return this.children.length=0,this}attach(e){return this.updateWorldMatrix(!0,!1),Jr.copy(this.matrixWorld).invert(),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),Jr.multiply(e.parent.matrixWorld)),e.applyMatrix4(Jr),this.add(e),e.updateWorldMatrix(!1,!0),this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,r=this.children.length;n<r;n++){const r=this.children[n].getObjectByProperty(e,t);if(void 0!==r)return r}}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ei,e,ti),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ei,ni,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverse(e)}traverseVisible(e){if(!1===this.visible)return;e(this);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].updateMatrixWorld(e)}updateWorldMatrix(e,t){const n=this.parent;if(!0===e&&null!==n&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===t){const e=this.children;for(let t=0,n=e.length;t<n;t++)e[t].updateWorldMatrix(!1,!0)}}toJSON(e){const t=void 0===e||"string"==typeof e,n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});const r={};function i(t,n){return void 0===t[n.uuid]&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(r.instanceColor=this.instanceColor.toJSON())),this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);const t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){const n=t.shapes;if(Array.isArray(n))for(let t=0,r=n.length;t<r;t++){const r=n[t];i(e.shapes,r)}else i(e.shapes,n)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(i(e.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){const t=[];for(let n=0,r=this.material.length;n<r;n++)t.push(i(e.materials,this.material[n]));r.material=t}else r.material=i(e.materials,this.material);if(this.children.length>0){r.children=[];for(let t=0;t<this.children.length;t++)r.children.push(this.children[t].toJSON(e).object)}if(this.animations.length>0){r.animations=[];for(let t=0;t<this.animations.length;t++){const n=this.animations[t];r.animations.push(i(e.animations,n))}}if(t){const t=o(e.geometries),r=o(e.materials),i=o(e.textures),s=o(e.images),a=o(e.shapes),l=o(e.skeletons),c=o(e.animations),u=o(e.nodes);t.length>0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),s.length>0&&(n.images=s),a.length>0&&(n.shapes=a),l.length>0&&(n.skeletons=l),c.length>0&&(n.animations=c),u.length>0&&(n.nodes=u)}return n.object=r,n;function o(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}}clone(e){return(new this.constructor).copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(let t=0;t<e.children.length;t++){const n=e.children[t];this.add(n.clone())}return this}}li.DefaultUp=new sr(0,1,0),li.DefaultMatrixAutoUpdate=!0,li.prototype.isObject3D=!0;const ci=new sr,ui=new sr,di=new sr,hi=new sr,pi=new sr,fi=new sr,mi=new sr,gi=new sr,bi=new sr,vi=new sr;class yi{constructor(e=new sr,t=new sr,n=new sr){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),ci.subVectors(e,t),r.cross(ci);const i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(e,t,n,r,i){ci.subVectors(r,t),ui.subVectors(n,t),di.subVectors(e,t);const o=ci.dot(ci),s=ci.dot(ui),a=ci.dot(di),l=ui.dot(ui),c=ui.dot(di),u=o*l-s*s;if(0===u)return i.set(-2,-1,-1);const d=1/u,h=(l*a-s*c)*d,p=(o*c-s*a)*d;return i.set(1-h-p,p,h)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,hi),hi.x>=0&&hi.y>=0&&hi.x+hi.y<=1}static getUV(e,t,n,r,i,o,s,a){return this.getBarycoord(e,t,n,r,hi),a.set(0,0),a.addScaledVector(i,hi.x),a.addScaledVector(o,hi.y),a.addScaledVector(s,hi.z),a}static isFrontFacing(e,t,n,r){return ci.subVectors(n,t),ui.subVectors(e,t),ci.cross(ui).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return ci.subVectors(this.c,this.b),ui.subVectors(this.a,this.b),.5*ci.cross(ui).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return yi.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return yi.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,n,r,i){return yi.getUV(e,this.a,this.b,this.c,t,n,r,i)}containsPoint(e){return yi.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return yi.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,r=this.b,i=this.c;let o,s;pi.subVectors(r,n),fi.subVectors(i,n),gi.subVectors(e,n);const a=pi.dot(gi),l=fi.dot(gi);if(a<=0&&l<=0)return t.copy(n);bi.subVectors(e,r);const c=pi.dot(bi),u=fi.dot(bi);if(c>=0&&u<=c)return t.copy(r);const d=a*u-c*l;if(d<=0&&a>=0&&c<=0)return o=a/(a-c),t.copy(n).addScaledVector(pi,o);vi.subVectors(e,i);const h=pi.dot(vi),p=fi.dot(vi);if(p>=0&&h<=p)return t.copy(i);const f=h*l-a*p;if(f<=0&&l>=0&&p<=0)return s=l/(l-p),t.copy(n).addScaledVector(fi,s);const m=c*p-h*u;if(m<=0&&u-c>=0&&h-p>=0)return mi.subVectors(i,r),s=(u-c)/(u-c+(h-p)),t.copy(r).addScaledVector(mi,s);const g=1/(m+f+d);return o=f*g,s=d*g,t.copy(n).addScaledVector(pi,o).addScaledVector(fi,s)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let Si=0;class _i extends gn{constructor(){super(),Object.defineProperty(this,"id",{value:Si++}),this.uuid=_n(),this.name="",this.type="Material",this.blending=S,this.side=f,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=j,this.blendDst=N,this.blendEquation=O,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=q,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=nn,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Ut,this.stencilZFail=Ut,this.stencilZPass=Ut,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(const t in e){const n=e[t];if(void 0===n){console.warn("THREE.Material: '"+t+"' parameter is undefined.");continue}if("shading"===t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===b;continue}const r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")}}toJSON(e){const t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});const n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==S&&(n.blending=this.blending),this.side!==f&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,void 0!==this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaToCoverage&&(n.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=this.flatShading),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),!1===this.fog&&(n.fog=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),t){const t=r(e.textures),i=r(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}return n}clone(){return(new this.constructor).copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(null!==t){const e=t.length;n=new Array(e);for(let r=0;r!==e;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){!0===e&&this.version++}}_i.prototype.isMaterial=!0,_i.fromType=function(){return null};class xi extends _i{constructor(e){super(),this.type="MeshBasicMaterial",this.color=new Gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=X,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}xi.prototype.isMeshBasicMaterial=!0;const wi=new sr,ki=new Cn;class Oi{constructor(e,t,n){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=!0===n,this.usage=rn,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,i=this.itemSize;r<i;r++)this.array[e+r]=t.array[n+r];return this}copyArray(e){return this.array.set(e),this}copyColorsArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),i=new Gn),t[n++]=i.r,t[n++]=i.g,t[n++]=i.b}return this}copyVector2sArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),i=new Cn),t[n++]=i.x,t[n++]=i.y}return this}copyVector3sArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),i=new sr),t[n++]=i.x,t[n++]=i.y,t[n++]=i.z}return this}copyVector4sArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),i=new Jn),t[n++]=i.x,t[n++]=i.y,t[n++]=i.z,t[n++]=i.w}return this}applyMatrix3(e){if(2===this.itemSize)for(let t=0,n=this.count;t<n;t++)ki.fromBufferAttribute(this,t),ki.applyMatrix3(e),this.setXY(t,ki.x,ki.y);else if(3===this.itemSize)for(let t=0,n=this.count;t<n;t++)wi.fromBufferAttribute(this,t),wi.applyMatrix3(e),this.setXYZ(t,wi.x,wi.y,wi.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)wi.fromBufferAttribute(this,t),wi.applyMatrix4(e),this.setXYZ(t,wi.x,wi.y,wi.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)wi.fromBufferAttribute(this,t),wi.applyNormalMatrix(e),this.setXYZ(t,wi.x,wi.y,wi.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)wi.fromBufferAttribute(this,t),wi.transformDirection(e),this.setXYZ(t,wi.x,wi.y,wi.z);return this}set(e,t=0){return this.array.set(e,t),this}getX(e){return this.array[e*this.itemSize]}setX(e,t){return this.array[e*this.itemSize]=t,this}getY(e){return this.array[e*this.itemSize+1]}setY(e,t){return this.array[e*this.itemSize+1]=t,this}getZ(e){return this.array[e*this.itemSize+2]}setZ(e,t){return this.array[e*this.itemSize+2]=t,this}getW(e){return this.array[e*this.itemSize+3]}setW(e,t){return this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,r){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=i,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized};return""!==this.name&&(e.name=this.name),this.usage!==rn&&(e.usage=this.usage),0===this.updateRange.offset&&-1===this.updateRange.count||(e.updateRange=this.updateRange),e}}Oi.prototype.isBufferAttribute=!0;class Ei extends Oi{constructor(e,t,n){super(new Int8Array(e),t,n)}}class Ai extends Oi{constructor(e,t,n){super(new Uint8Array(e),t,n)}}class Ti extends Oi{constructor(e,t,n){super(new Uint8ClampedArray(e),t,n)}}class Ci extends Oi{constructor(e,t,n){super(new Int16Array(e),t,n)}}class Mi extends Oi{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class $i extends Oi{constructor(e,t,n){super(new Int32Array(e),t,n)}}class Pi extends Oi{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class Ri extends Oi{constructor(e,t,n){super(new Uint16Array(e),t,n)}}Ri.prototype.isFloat16BufferAttribute=!0;class ji extends Oi{constructor(e,t,n){super(new Float32Array(e),t,n)}}class Ni extends Oi{constructor(e,t,n){super(new Float64Array(e),t,n)}}let Di=0;const Ii=new Ir,Li=new li,Bi=new sr,zi=new cr,Fi=new cr,Ui=new sr;class Qi extends gn{constructor(){super(),Object.defineProperty(this,"id",{value:Di++}),this.uuid=_n(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new($n(e)?Pi:Mi)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return void 0!==this.attributes[e]}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(void 0!==n){const t=(new Mn).getNormalMatrix(e);n.applyNormalMatrix(t),n.needsUpdate=!0}const r=this.attributes.tangent;return void 0!==r&&(r.transformDirection(e),r.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(e){return Ii.makeRotationFromQuaternion(e),this.applyMatrix4(Ii),this}rotateX(e){return Ii.makeRotationX(e),this.applyMatrix4(Ii),this}rotateY(e){return Ii.makeRotationY(e),this.applyMatrix4(Ii),this}rotateZ(e){return Ii.makeRotationZ(e),this.applyMatrix4(Ii),this}translate(e,t,n){return Ii.makeTranslation(e,t,n),this.applyMatrix4(Ii),this}scale(e,t,n){return Ii.makeScale(e,t,n),this.applyMatrix4(Ii),this}lookAt(e){return Li.lookAt(e),Li.updateMatrix(),this.applyMatrix4(Li.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Bi).negate(),this.translate(Bi.x,Bi.y,Bi.z),this}setFromPoints(e){const t=[];for(let n=0,r=e.length;n<r;n++){const r=e[n];t.push(r.x,r.y,r.z||0)}return this.setAttribute("position",new ji(t,3)),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new cr);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingBox.set(new sr(-1/0,-1/0,-1/0),new sr(1/0,1/0,1/0));if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e<n;e++){const n=t[e];zi.setFromBufferAttribute(n),this.morphTargetsRelative?(Ui.addVectors(this.boundingBox.min,zi.min),this.boundingBox.expandByPoint(Ui),Ui.addVectors(this.boundingBox.max,zi.max),this.boundingBox.expandByPoint(Ui)):(this.boundingBox.expandByPoint(zi.min),this.boundingBox.expandByPoint(zi.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new Tr);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingSphere.set(new sr,1/0);if(e){const n=this.boundingSphere.center;if(zi.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e<n;e++){const n=t[e];Fi.setFromBufferAttribute(n),this.morphTargetsRelative?(Ui.addVectors(zi.min,Fi.min),zi.expandByPoint(Ui),Ui.addVectors(zi.max,Fi.max),zi.expandByPoint(Ui)):(zi.expandByPoint(Fi.min),zi.expandByPoint(Fi.max))}zi.getCenter(n);let r=0;for(let t=0,i=e.count;t<i;t++)Ui.fromBufferAttribute(e,t),r=Math.max(r,n.distanceToSquared(Ui));if(t)for(let i=0,o=t.length;i<o;i++){const o=t[i],s=this.morphTargetsRelative;for(let t=0,i=o.count;t<i;t++)Ui.fromBufferAttribute(o,t),s&&(Bi.fromBufferAttribute(e,t),Ui.add(Bi)),r=Math.max(r,n.distanceToSquared(Ui))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,t=this.attributes;if(null===e||void 0===t.position||void 0===t.normal||void 0===t.uv)return void console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");const n=e.array,r=t.position.array,i=t.normal.array,o=t.uv.array,s=r.length/3;!1===this.hasAttribute("tangent")&&this.setAttribute("tangent",new Oi(new Float32Array(4*s),4));const a=this.getAttribute("tangent").array,l=[],c=[];for(let e=0;e<s;e++)l[e]=new sr,c[e]=new sr;const u=new sr,d=new sr,h=new sr,p=new Cn,f=new Cn,m=new Cn,g=new sr,b=new sr;function v(e,t,n){u.fromArray(r,3*e),d.fromArray(r,3*t),h.fromArray(r,3*n),p.fromArray(o,2*e),f.fromArray(o,2*t),m.fromArray(o,2*n),d.sub(u),h.sub(u),f.sub(p),m.sub(p);const i=1/(f.x*m.y-m.x*f.y);isFinite(i)&&(g.copy(d).multiplyScalar(m.y).addScaledVector(h,-f.y).multiplyScalar(i),b.copy(h).multiplyScalar(f.x).addScaledVector(d,-m.x).multiplyScalar(i),l[e].add(g),l[t].add(g),l[n].add(g),c[e].add(b),c[t].add(b),c[n].add(b))}let y=this.groups;0===y.length&&(y=[{start:0,count:n.length}]);for(let e=0,t=y.length;e<t;++e){const t=y[e],r=t.start;for(let e=r,i=r+t.count;e<i;e+=3)v(n[e+0],n[e+1],n[e+2])}const S=new sr,_=new sr,x=new sr,w=new sr;function k(e){x.fromArray(i,3*e),w.copy(x);const t=l[e];S.copy(t),S.sub(x.multiplyScalar(x.dot(t))).normalize(),_.crossVectors(w,t);const n=_.dot(c[e])<0?-1:1;a[4*e]=S.x,a[4*e+1]=S.y,a[4*e+2]=S.z,a[4*e+3]=n}for(let e=0,t=y.length;e<t;++e){const t=y[e],r=t.start;for(let e=r,i=r+t.count;e<i;e+=3)k(n[e+0]),k(n[e+1]),k(n[e+2])}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(void 0!==t){let n=this.getAttribute("normal");if(void 0===n)n=new Oi(new Float32Array(3*t.count),3),this.setAttribute("normal",n);else for(let e=0,t=n.count;e<t;e++)n.setXYZ(e,0,0,0);const r=new sr,i=new sr,o=new sr,s=new sr,a=new sr,l=new sr,c=new sr,u=new sr;if(e)for(let d=0,h=e.count;d<h;d+=3){const h=e.getX(d+0),p=e.getX(d+1),f=e.getX(d+2);r.fromBufferAttribute(t,h),i.fromBufferAttribute(t,p),o.fromBufferAttribute(t,f),c.subVectors(o,i),u.subVectors(r,i),c.cross(u),s.fromBufferAttribute(n,h),a.fromBufferAttribute(n,p),l.fromBufferAttribute(n,f),s.add(c),a.add(c),l.add(c),n.setXYZ(h,s.x,s.y,s.z),n.setXYZ(p,a.x,a.y,a.z),n.setXYZ(f,l.x,l.y,l.z)}else for(let e=0,s=t.count;e<s;e+=3)r.fromBufferAttribute(t,e+0),i.fromBufferAttribute(t,e+1),o.fromBufferAttribute(t,e+2),c.subVectors(o,i),u.subVectors(r,i),c.cross(u),n.setXYZ(e+0,c.x,c.y,c.z),n.setXYZ(e+1,c.x,c.y,c.z),n.setXYZ(e+2,c.x,c.y,c.z);this.normalizeNormals(),n.needsUpdate=!0}}merge(e,t){if(!e||!e.isBufferGeometry)return void console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",e);void 0===t&&(t=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));const n=this.attributes;for(const r in n){if(void 0===e.attributes[r])continue;const i=n[r].array,o=e.attributes[r],s=o.array,a=o.itemSize*t,l=Math.min(s.length,i.length-a);for(let e=0,t=a;e<l;e++,t++)i[t]=s[e]}return this}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)Ui.fromBufferAttribute(e,t),Ui.normalize(),e.setXYZ(t,Ui.x,Ui.y,Ui.z)}toNonIndexed(){function e(e,t){const n=e.array,r=e.itemSize,i=e.normalized,o=new n.constructor(t.length*r);let s=0,a=0;for(let i=0,l=t.length;i<l;i++){s=e.isInterleavedBufferAttribute?t[i]*e.data.stride+e.offset:t[i]*r;for(let e=0;e<r;e++)o[a++]=n[s++]}return new Oi(o,r,i)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new Qi,n=this.index.array,r=this.attributes;for(const i in r){const o=e(r[i],n);t.setAttribute(i,o)}const i=this.morphAttributes;for(const r in i){const o=[],s=i[r];for(let t=0,r=s.length;t<r;t++){const r=e(s[t],n);o.push(r)}t.morphAttributes[r]=o}t.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let e=0,n=o.length;e<n;e++){const n=o[e];t.addGroup(n.start,n.count,n.materialIndex)}return t}toJSON(){const e={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),void 0!==this.parameters){const t=this.parameters;for(const n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const t in n){const r=n[t];e.data.attributes[t]=r.toJSON(e.data)}const r={};let i=!1;for(const t in this.morphAttributes){const n=this.morphAttributes[t],o=[];for(let t=0,r=n.length;t<r;t++){const r=n[t];o.push(r.toJSON(e.data))}o.length>0&&(r[t]=o,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const s=this.boundingSphere;return null!==s&&(e.data.boundingSphere={center:s.center.toArray(),radius:s.radius}),e}clone(){return(new this.constructor).copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;null!==n&&this.setIndex(n.clone(t));const r=e.attributes;for(const e in r){const n=r[e];this.setAttribute(e,n.clone(t))}const i=e.morphAttributes;for(const e in i){const n=[],r=i[e];for(let e=0,i=r.length;e<i;e++)n.push(r[e].clone(t));this.morphAttributes[e]=n}this.morphTargetsRelative=e.morphTargetsRelative;const o=e.groups;for(let e=0,t=o.length;e<t;e++){const t=o[e];this.addGroup(t.start,t.count,t.materialIndex)}const s=e.boundingBox;null!==s&&(this.boundingBox=s.clone());const a=e.boundingSphere;return null!==a&&(this.boundingSphere=a.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,void 0!==e.parameters&&(this.parameters=Object.assign({},e.parameters)),this}dispose(){this.dispatchEvent({type:"dispose"})}}Qi.prototype.isBufferGeometry=!0;const qi=new Ir,Gi=new Dr,Hi=new Tr,Vi=new sr,Wi=new sr,Xi=new sr,Yi=new sr,Zi=new sr,Ji=new sr,Ki=new sr,eo=new sr,to=new sr,no=new Cn,ro=new Cn,io=new Cn,oo=new sr,so=new sr;class ao extends li{constructor(e=new Qi,t=new xi){super(),this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=e.material,this.geometry=e.geometry,this}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const e=t[n[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t<n;t++){const n=e[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}}else{const t=e.morphTargets;void 0!==t&&t.length>0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}raycast(e,t){const n=this.geometry,r=this.material,i=this.matrixWorld;if(void 0===r)return;if(null===n.boundingSphere&&n.computeBoundingSphere(),Hi.copy(n.boundingSphere),Hi.applyMatrix4(i),!1===e.ray.intersectsSphere(Hi))return;if(qi.copy(i).invert(),Gi.copy(e.ray).applyMatrix4(qi),null!==n.boundingBox&&!1===Gi.intersectsBox(n.boundingBox))return;let o;if(n.isBufferGeometry){const i=n.index,s=n.attributes.position,a=n.morphAttributes.position,l=n.morphTargetsRelative,c=n.attributes.uv,u=n.attributes.uv2,d=n.groups,h=n.drawRange;if(null!==i)if(Array.isArray(r))for(let n=0,p=d.length;n<p;n++){const p=d[n],f=r[p.materialIndex];for(let n=Math.max(p.start,h.start),r=Math.min(i.count,Math.min(p.start+p.count,h.start+h.count));n<r;n+=3){const r=i.getX(n),d=i.getX(n+1),h=i.getX(n+2);o=lo(this,f,e,Gi,s,a,l,c,u,r,d,h),o&&(o.faceIndex=Math.floor(n/3),o.face.materialIndex=p.materialIndex,t.push(o))}}else{for(let n=Math.max(0,h.start),d=Math.min(i.count,h.start+h.count);n<d;n+=3){const d=i.getX(n),h=i.getX(n+1),p=i.getX(n+2);o=lo(this,r,e,Gi,s,a,l,c,u,d,h,p),o&&(o.faceIndex=Math.floor(n/3),t.push(o))}}else if(void 0!==s)if(Array.isArray(r))for(let n=0,i=d.length;n<i;n++){const i=d[n],p=r[i.materialIndex];for(let n=Math.max(i.start,h.start),r=Math.min(s.count,Math.min(i.start+i.count,h.start+h.count));n<r;n+=3){o=lo(this,p,e,Gi,s,a,l,c,u,n,n+1,n+2),o&&(o.faceIndex=Math.floor(n/3),o.face.materialIndex=i.materialIndex,t.push(o))}}else{for(let n=Math.max(0,h.start),i=Math.min(s.count,h.start+h.count);n<i;n+=3){o=lo(this,r,e,Gi,s,a,l,c,u,n,n+1,n+2),o&&(o.faceIndex=Math.floor(n/3),t.push(o))}}}else n.isGeometry&&console.error("THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}function lo(e,t,n,r,i,o,s,a,l,c,u,d){Vi.fromBufferAttribute(i,c),Wi.fromBufferAttribute(i,u),Xi.fromBufferAttribute(i,d);const h=e.morphTargetInfluences;if(o&&h){Ki.set(0,0,0),eo.set(0,0,0),to.set(0,0,0);for(let e=0,t=o.length;e<t;e++){const t=h[e],n=o[e];0!==t&&(Yi.fromBufferAttribute(n,c),Zi.fromBufferAttribute(n,u),Ji.fromBufferAttribute(n,d),s?(Ki.addScaledVector(Yi,t),eo.addScaledVector(Zi,t),to.addScaledVector(Ji,t)):(Ki.addScaledVector(Yi.sub(Vi),t),eo.addScaledVector(Zi.sub(Wi),t),to.addScaledVector(Ji.sub(Xi),t)))}Vi.add(Ki),Wi.add(eo),Xi.add(to)}e.isSkinnedMesh&&(e.boneTransform(c,Vi),e.boneTransform(u,Wi),e.boneTransform(d,Xi));const p=function(e,t,n,r,i,o,s,a){let l;if(l=t.side===m?r.intersectTriangle(s,o,i,!0,a):r.intersectTriangle(i,o,s,t.side!==g,a),null===l)return null;so.copy(a),so.applyMatrix4(e.matrixWorld);const c=n.ray.origin.distanceTo(so);return c<n.near||c>n.far?null:{distance:c,point:so.clone(),object:e}}(e,t,n,r,Vi,Wi,Xi,oo);if(p){a&&(no.fromBufferAttribute(a,c),ro.fromBufferAttribute(a,u),io.fromBufferAttribute(a,d),p.uv=yi.getUV(oo,Vi,Wi,Xi,no,ro,io,new Cn)),l&&(no.fromBufferAttribute(l,c),ro.fromBufferAttribute(l,u),io.fromBufferAttribute(l,d),p.uv2=yi.getUV(oo,Vi,Wi,Xi,no,ro,io,new Cn));const e={a:c,b:u,c:d,normal:new sr,materialIndex:0};yi.getNormal(Vi,Wi,Xi,e.normal),p.face=e}return p}ao.prototype.isMesh=!0;class co extends Qi{constructor(e=1,t=1,n=1,r=1,i=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};const s=this;r=Math.floor(r),i=Math.floor(i),o=Math.floor(o);const a=[],l=[],c=[],u=[];let d=0,h=0;function p(e,t,n,r,i,o,p,f,m,g,b){const v=o/m,y=p/g,S=o/2,_=p/2,x=f/2,w=m+1,k=g+1;let O=0,E=0;const A=new sr;for(let o=0;o<k;o++){const s=o*y-_;for(let a=0;a<w;a++){const d=a*v-S;A[e]=d*r,A[t]=s*i,A[n]=x,l.push(A.x,A.y,A.z),A[e]=0,A[t]=0,A[n]=f>0?1:-1,c.push(A.x,A.y,A.z),u.push(a/m),u.push(1-o/g),O+=1}}for(let e=0;e<g;e++)for(let t=0;t<m;t++){const n=d+t+w*e,r=d+t+w*(e+1),i=d+(t+1)+w*(e+1),o=d+(t+1)+w*e;a.push(n,r,o),a.push(r,i,o),E+=6}s.addGroup(h,E,b),h+=E,d+=O}p("z","y","x",-1,-1,n,t,e,o,i,0),p("z","y","x",1,-1,n,t,-e,o,i,1),p("x","z","y",1,1,e,n,t,r,o,2),p("x","z","y",1,-1,e,n,-t,r,o,3),p("x","y","z",1,-1,e,t,n,r,i,4),p("x","y","z",-1,-1,e,t,-n,r,i,5),this.setIndex(a),this.setAttribute("position",new ji(l,3)),this.setAttribute("normal",new ji(c,3)),this.setAttribute("uv",new ji(u,2))}static fromJSON(e){return new co(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function uo(e){const t={};for(const n in e){t[n]={};for(const r in e[n]){const i=e[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?t[n][r]=i.clone():Array.isArray(i)?t[n][r]=i.slice():t[n][r]=i}}return t}function ho(e){const t={};for(let n=0;n<e.length;n++){const r=uo(e[n]);for(const e in r)t[e]=r[e]}return t}const po={clone:uo,merge:ho};class fo extends _i{constructor(e){super(),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==e&&(void 0!==e.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(e))}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=uo(e.uniforms),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const n in this.uniforms){const r=this.uniforms[n].value;r&&r.isTexture?t.uniforms[n]={type:"t",value:r.toJSON(e).uuid}:r&&r.isColor?t.uniforms[n]={type:"c",value:r.getHex()}:r&&r.isVector2?t.uniforms[n]={type:"v2",value:r.toArray()}:r&&r.isVector3?t.uniforms[n]={type:"v3",value:r.toArray()}:r&&r.isVector4?t.uniforms[n]={type:"v4",value:r.toArray()}:r&&r.isMatrix3?t.uniforms[n]={type:"m3",value:r.toArray()}:r&&r.isMatrix4?t.uniforms[n]={type:"m4",value:r.toArray()}:t.uniforms[n]={value:r}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;const n={};for(const e in this.extensions)!0===this.extensions[e]&&(n[e]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}fo.prototype.isShaderMaterial=!0;class mo extends li{constructor(){super(),this.type="Camera",this.matrixWorldInverse=new Ir,this.projectionMatrix=new Ir,this.projectionMatrixInverse=new Ir}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}mo.prototype.isCamera=!0;class go extends mo{constructor(e=50,t=1,n=.1,r=2e3){super(),this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=2*Sn*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*yn*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*Sn*Math.atan(Math.tan(.5*yn*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,n,r,i,o){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*yn*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r;const o=this.view;if(null!==this.view&&this.view.enabled){const e=o.fullWidth,s=o.fullHeight;i+=o.offsetX*r/e,t-=o.offsetY*n/s,r*=o.width/e,n*=o.height/s}const s=this.filmOffset;0!==s&&(i+=e*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}go.prototype.isPerspectiveCamera=!0;class bo extends li{constructor(e,t,n){if(super(),this.type="CubeCamera",!0!==n.isWebGLCubeRenderTarget)return void console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");this.renderTarget=n;const r=new go(90,1,e,t);r.layers=this.layers,r.up.set(0,-1,0),r.lookAt(new sr(1,0,0)),this.add(r);const i=new go(90,1,e,t);i.layers=this.layers,i.up.set(0,-1,0),i.lookAt(new sr(-1,0,0)),this.add(i);const o=new go(90,1,e,t);o.layers=this.layers,o.up.set(0,0,1),o.lookAt(new sr(0,1,0)),this.add(o);const s=new go(90,1,e,t);s.layers=this.layers,s.up.set(0,0,-1),s.lookAt(new sr(0,-1,0)),this.add(s);const a=new go(90,1,e,t);a.layers=this.layers,a.up.set(0,-1,0),a.lookAt(new sr(0,0,1)),this.add(a);const l=new go(90,1,e,t);l.layers=this.layers,l.up.set(0,-1,0),l.lookAt(new sr(0,0,-1)),this.add(l)}update(e,t){null===this.parent&&this.updateMatrixWorld();const n=this.renderTarget,[r,i,o,s,a,l]=this.children,c=e.getRenderTarget(),u=e.toneMapping,d=e.xr.enabled;e.toneMapping=J,e.xr.enabled=!1;const h=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0),e.render(t,r),e.setRenderTarget(n,1),e.render(t,i),e.setRenderTarget(n,2),e.render(t,o),e.setRenderTarget(n,3),e.render(t,s),e.setRenderTarget(n,4),e.render(t,a),n.texture.generateMipmaps=h,e.setRenderTarget(n,5),e.render(t,l),e.setRenderTarget(c),e.toneMapping=u,e.xr.enabled=d,n.texture.needsPMREMUpdate=!0}}class vo extends Zn{constructor(e,t,n,r,i,o,s,a,l,c){super(e=void 0!==e?e:[],t=void 0!==t?t:oe,n,r,i,o,s,a,l,c),this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}vo.prototype.isCubeTexture=!0;class yo extends Kn{constructor(e,t={}){super(e,e,t);const n={width:e,height:e,depth:1},r=[n,n,n,n,n,n];this.texture=new vo(r,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:ve}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.encoding=t.encoding,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:"\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t",fragmentShader:"\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t"},r=new co(5,5,5),i=new fo({name:"CubemapFromEquirect",uniforms:uo(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:m,blending:y});i.uniforms.tEquirect.value=t;const o=new ao(r,i),s=t.minFilter;t.minFilter===_e&&(t.minFilter=ve);return new bo(1,10,this).update(e,o),t.minFilter=s,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,n,r){const i=e.getRenderTarget();for(let i=0;i<6;i++)e.setRenderTarget(this,i),e.clear(t,n,r);e.setRenderTarget(i)}}yo.prototype.isWebGLCubeRenderTarget=!0;const So=new sr,_o=new sr,xo=new Mn;class wo{constructor(e=new sr(1,0,0),t=0){this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const r=So.subVectors(n,t).cross(_o.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)}intersectLine(e,t){const n=e.delta(So),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const i=-(e.start.dot(this.normal)+this.constant)/r;return i<0||i>1?null:t.copy(n).multiplyScalar(i).add(e.start)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||xo.getNormalMatrix(e),r=this.coplanarPoint(So).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return(new this.constructor).copy(this)}}wo.prototype.isPlane=!0;const ko=new Tr,Oo=new sr;class Eo{constructor(e=new wo,t=new wo,n=new wo,r=new wo,i=new wo,o=new wo){this.planes=[e,t,n,r,i,o]}set(e,t,n,r,i,o){const s=this.planes;return s[0].copy(e),s[1].copy(t),s[2].copy(n),s[3].copy(r),s[4].copy(i),s[5].copy(o),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e){const t=this.planes,n=e.elements,r=n[0],i=n[1],o=n[2],s=n[3],a=n[4],l=n[5],c=n[6],u=n[7],d=n[8],h=n[9],p=n[10],f=n[11],m=n[12],g=n[13],b=n[14],v=n[15];return t[0].setComponents(s-r,u-a,f-d,v-m).normalize(),t[1].setComponents(s+r,u+a,f+d,v+m).normalize(),t[2].setComponents(s+i,u+l,f+h,v+g).normalize(),t[3].setComponents(s-i,u-l,f-h,v-g).normalize(),t[4].setComponents(s-o,u-c,f-p,v-b).normalize(),t[5].setComponents(s+o,u+c,f+p,v+b).normalize(),this}intersectsObject(e){const t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),ko.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(ko)}intersectsSprite(e){return ko.center.set(0,0,0),ko.radius=.7071067811865476,ko.applyMatrix4(e.matrixWorld),this.intersectsSphere(ko)}intersectsSphere(e){const t=this.planes,n=e.center,r=-e.radius;for(let e=0;e<6;e++){if(t[e].distanceToPoint(n)<r)return!1}return!0}intersectsBox(e){const t=this.planes;for(let n=0;n<6;n++){const r=t[n];if(Oo.x=r.normal.x>0?e.max.x:e.min.x,Oo.y=r.normal.y>0?e.max.y:e.min.y,Oo.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Oo)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function Ao(){let e=null,t=!1,n=null,r=null;function i(t,o){n(t,o),r=e.requestAnimationFrame(i)}return{start:function(){!0!==t&&null!==n&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function To(e,t){const n=t.isWebGL2,r=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),r.get(e)},remove:function(t){t.isInterleavedBufferAttribute&&(t=t.data);const n=r.get(t);n&&(e.deleteBuffer(n.buffer),r.delete(t))},update:function(t,i){if(t.isGLBufferAttribute){const e=r.get(t);return void((!e||e.version<t.version)&&r.set(t,{buffer:t.buffer,type:t.type,bytesPerElement:t.elementSize,version:t.version}))}t.isInterleavedBufferAttribute&&(t=t.data);const o=r.get(t);void 0===o?r.set(t,function(t,r){const i=t.array,o=t.usage,s=e.createBuffer();let a;if(e.bindBuffer(r,s),e.bufferData(r,i,o),t.onUploadCallback(),i instanceof Float32Array)a=5126;else if(i instanceof Uint16Array)if(t.isFloat16BufferAttribute){if(!n)throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");a=5131}else a=5123;else if(i instanceof Int16Array)a=5122;else if(i instanceof Uint32Array)a=5125;else if(i instanceof Int32Array)a=5124;else if(i instanceof Int8Array)a=5120;else if(i instanceof Uint8Array)a=5121;else{if(!(i instanceof Uint8ClampedArray))throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+i);a=5121}return{buffer:s,type:a,bytesPerElement:i.BYTES_PER_ELEMENT,version:t.version}}(t,i)):o.version<t.version&&(!function(t,r,i){const o=r.array,s=r.updateRange;e.bindBuffer(i,t),-1===s.count?e.bufferSubData(i,0,o):(n?e.bufferSubData(i,s.offset*o.BYTES_PER_ELEMENT,o,s.offset,s.count):e.bufferSubData(i,s.offset*o.BYTES_PER_ELEMENT,o.subarray(s.offset,s.offset+s.count)),s.count=-1)}(o.buffer,t,i),o.version=t.version)}}}class Co extends Qi{constructor(e=1,t=1,n=1,r=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:r};const i=e/2,o=t/2,s=Math.floor(n),a=Math.floor(r),l=s+1,c=a+1,u=e/s,d=t/a,h=[],p=[],f=[],m=[];for(let e=0;e<c;e++){const t=e*d-o;for(let n=0;n<l;n++){const r=n*u-i;p.push(r,-t,0),f.push(0,0,1),m.push(n/s),m.push(1-e/a)}}for(let e=0;e<a;e++)for(let t=0;t<s;t++){const n=t+l*e,r=t+l*(e+1),i=t+1+l*(e+1),o=t+1+l*e;h.push(n,r,o),h.push(r,i,o)}this.setIndex(h),this.setAttribute("position",new ji(p,3)),this.setAttribute("normal",new ji(f,3)),this.setAttribute("uv",new ji(m,2))}static fromJSON(e){return new Co(e.width,e.height,e.widthSegments,e.heightSegments)}}const Mo={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef USE_ALPHATEST\n\tif ( diffuseColor.a < alphaTest ) discard;\n#endif",alphatest_pars_fragment:"#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"vec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 f0, const in float f90, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define r0 1.0\n\t#define v0 0.339\n\t#define m0 - 2.0\n\t#define r1 0.8\n\t#define v1 0.276\n\t#define m1 - 1.0\n\t#define r4 0.4\n\t#define v4 0.046\n\t#define m4 2.0\n\t#define r5 0.305\n\t#define v5 0.016\n\t#define m5 3.0\n\t#define r6 0.21\n\t#define v6 0.0038\n\t#define m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= r1 ) {\n\t\t\tmip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\n\t\t} else if ( roughness >= r4 ) {\n\t\t\tmip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\n\t\t} else if ( roughness >= r5 ) {\n\t\t\tmip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\n\t\t} else if ( roughness >= r6 ) {\n\t\t\tmip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"vec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry.normal );\n#ifdef DOUBLE_SIDED\n\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\n\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry.normal );\n#endif\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointLightInfo( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( - dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotLightInfo( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( - dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalLightInfo( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( - dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry.normal );\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#else\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material )\t(0)",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\t#ifdef SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULARINTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vUv ).a;\n\t\t#endif\n\t\t#ifdef USE_SPECULARCOLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vUv ).rgb;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( ior - 1.0 ) / ( ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vUv ).a;\n\t#endif\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n};\nvec3 clearcoatSpecular = vec3( 0.0 );\nvec3 sheenSpecular = vec3( 0.0 );\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\tvec3 FssEss = specularColor * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecular += ccIrradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tcomputeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef USE_CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry.normal );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometry.normal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * faceDirection;\n\t\t\tbitangent = bitangent * faceDirection;\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( - vViewPosition, normal, mapN, faceDirection );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\n\t\treturn normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\n\t#endif\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",output_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= transmissionAlpha + 0.1;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n\t\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\tvec4 shadowWorldPosition;\n\t#endif\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tuniform int boneTextureSize;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tfloat j = i * 4.0;\n\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\ty = dy * ( y + 0.5 );\n\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\treturn bone;\n\t}\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tfloat transmissionAlpha = 1.0;\n\tfloat transmissionFactor = transmission;\n\tfloat thicknessFactor = thickness;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\ttransmissionFactor *= texture2D( transmissionMap, vUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tthicknessFactor *= texture2D( thicknessMap, vUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmission = getIBLVolumeRefraction(\n\t\tn, v, roughnessFactor, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor,\n\t\tattenuationColor, attenuationDistance );\n\ttotalDiffuse = mix( totalDiffuse, transmission.rgb, transmissionFactor );\n\ttransmissionAlpha = mix( transmissionAlpha, transmission.a, transmissionFactor );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat framebufferLod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\t#ifdef texture2DLodEXT\n\t\t\treturn texture2DLodEXT( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#else\n\t\t\treturn texture2D( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#endif\n\t}\n\tvec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( attenuationDistance == 0.0 ) {\n\t\t\treturn radiance;\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance * radiance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a );\n\t}\n#endif",uv_pars_fragment:"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif",uv_vertex:"#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION )\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tgl_FragColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tgl_FragColor = vec4( mix( pow( gl_FragColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), gl_FragColor.rgb * 0.0773993808, vec3( lessThanEqual( gl_FragColor.rgb, vec3( 0.04045 ) ) ) ), gl_FragColor.w );\n\t#endif\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"#include <envmap_common_pars_fragment>\nuniform float opacity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\tvec3 vReflect = vWorldDirection;\n\t#include <envmap_fragment>\n\tgl_FragColor = envColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",depth_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",meshbasic_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinbase_vertex>\n\t\t#include <skinnormal_vertex>\n\t\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULARINTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n\t#ifdef USE_SPECULARCOLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat;\n\t#endif\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",shadow_vert:"#include <common>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}"},$o={common:{diffuse:{value:new Gn(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new Mn},uv2Transform:{value:new Mn},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new Cn(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Gn(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Gn(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Mn}},sprite:{diffuse:{value:new Gn(16777215)},opacity:{value:1},center:{value:new Cn(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Mn}}},Po={basic:{uniforms:ho([$o.common,$o.specularmap,$o.envmap,$o.aomap,$o.lightmap,$o.fog]),vertexShader:Mo.meshbasic_vert,fragmentShader:Mo.meshbasic_frag},lambert:{uniforms:ho([$o.common,$o.specularmap,$o.envmap,$o.aomap,$o.lightmap,$o.emissivemap,$o.fog,$o.lights,{emissive:{value:new Gn(0)}}]),vertexShader:Mo.meshlambert_vert,fragmentShader:Mo.meshlambert_frag},phong:{uniforms:ho([$o.common,$o.specularmap,$o.envmap,$o.aomap,$o.lightmap,$o.emissivemap,$o.bumpmap,$o.normalmap,$o.displacementmap,$o.fog,$o.lights,{emissive:{value:new Gn(0)},specular:{value:new Gn(1118481)},shininess:{value:30}}]),vertexShader:Mo.meshphong_vert,fragmentShader:Mo.meshphong_frag},standard:{uniforms:ho([$o.common,$o.envmap,$o.aomap,$o.lightmap,$o.emissivemap,$o.bumpmap,$o.normalmap,$o.displacementmap,$o.roughnessmap,$o.metalnessmap,$o.fog,$o.lights,{emissive:{value:new Gn(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Mo.meshphysical_vert,fragmentShader:Mo.meshphysical_frag},toon:{uniforms:ho([$o.common,$o.aomap,$o.lightmap,$o.emissivemap,$o.bumpmap,$o.normalmap,$o.displacementmap,$o.gradientmap,$o.fog,$o.lights,{emissive:{value:new Gn(0)}}]),vertexShader:Mo.meshtoon_vert,fragmentShader:Mo.meshtoon_frag},matcap:{uniforms:ho([$o.common,$o.bumpmap,$o.normalmap,$o.displacementmap,$o.fog,{matcap:{value:null}}]),vertexShader:Mo.meshmatcap_vert,fragmentShader:Mo.meshmatcap_frag},points:{uniforms:ho([$o.points,$o.fog]),vertexShader:Mo.points_vert,fragmentShader:Mo.points_frag},dashed:{uniforms:ho([$o.common,$o.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Mo.linedashed_vert,fragmentShader:Mo.linedashed_frag},depth:{uniforms:ho([$o.common,$o.displacementmap]),vertexShader:Mo.depth_vert,fragmentShader:Mo.depth_frag},normal:{uniforms:ho([$o.common,$o.bumpmap,$o.normalmap,$o.displacementmap,{opacity:{value:1}}]),vertexShader:Mo.meshnormal_vert,fragmentShader:Mo.meshnormal_frag},sprite:{uniforms:ho([$o.sprite,$o.fog]),vertexShader:Mo.sprite_vert,fragmentShader:Mo.sprite_frag},background:{uniforms:{uvTransform:{value:new Mn},t2D:{value:null}},vertexShader:Mo.background_vert,fragmentShader:Mo.background_frag},cube:{uniforms:ho([$o.envmap,{opacity:{value:1}}]),vertexShader:Mo.cube_vert,fragmentShader:Mo.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Mo.equirect_vert,fragmentShader:Mo.equirect_frag},distanceRGBA:{uniforms:ho([$o.common,$o.displacementmap,{referencePosition:{value:new sr},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Mo.distanceRGBA_vert,fragmentShader:Mo.distanceRGBA_frag},shadow:{uniforms:ho([$o.lights,$o.fog,{color:{value:new Gn(0)},opacity:{value:1}}]),vertexShader:Mo.shadow_vert,fragmentShader:Mo.shadow_frag}};function Ro(e,t,n,r,i,o){const s=new Gn(0);let a,l,c=!0===i?0:1,u=null,d=0,h=null;function p(e,t){n.buffers.color.setClear(e.r,e.g,e.b,t,o)}return{getClearColor:function(){return s},setClearColor:function(e,t=1){s.set(e),c=t,p(s,c)},getClearAlpha:function(){return c},setClearAlpha:function(e){c=e,p(s,c)},render:function(n,i){let o=!1,g=!0===i.isScene?i.background:null;g&&g.isTexture&&(g=t.get(g));const b=e.xr,v=b.getSession&&b.getSession();v&&"additive"===v.environmentBlendMode&&(g=null),null===g?p(s,c):g&&g.isColor&&(p(g,1),o=!0),(e.autoClear||o)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),g&&(g.isCubeTexture||g.mapping===ce)?(void 0===l&&(l=new ao(new co(1,1,1),new fo({name:"BackgroundCubeMaterial",uniforms:uo(Po.cube.uniforms),vertexShader:Po.cube.vertexShader,fragmentShader:Po.cube.fragmentShader,side:m,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(l)),l.material.uniforms.envMap.value=g,l.material.uniforms.flipEnvMap.value=g.isCubeTexture&&!1===g.isRenderTargetTexture?-1:1,u===g&&d===g.version&&h===e.toneMapping||(l.material.needsUpdate=!0,u=g,d=g.version,h=e.toneMapping),l.layers.enableAll(),n.unshift(l,l.geometry,l.material,0,0,null)):g&&g.isTexture&&(void 0===a&&(a=new ao(new Co(2,2),new fo({name:"BackgroundMaterial",uniforms:uo(Po.background.uniforms),vertexShader:Po.background.vertexShader,fragmentShader:Po.background.fragmentShader,side:f,depthTest:!1,depthWrite:!1,fog:!1})),a.geometry.deleteAttribute("normal"),Object.defineProperty(a.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(a)),a.material.uniforms.t2D.value=g,!0===g.matrixAutoUpdate&&g.updateMatrix(),a.material.uniforms.uvTransform.value.copy(g.matrix),u===g&&d===g.version&&h===e.toneMapping||(a.material.needsUpdate=!0,u=g,d=g.version,h=e.toneMapping),a.layers.enableAll(),n.unshift(a,a.geometry,a.material,0,0,null))}}}function jo(e,t,n,r){const i=e.getParameter(34921),o=r.isWebGL2?null:t.get("OES_vertex_array_object"),s=r.isWebGL2||null!==o,a={},l=p(null);let c=l,u=!1;function d(t){return r.isWebGL2?e.bindVertexArray(t):o.bindVertexArrayOES(t)}function h(t){return r.isWebGL2?e.deleteVertexArray(t):o.deleteVertexArrayOES(t)}function p(e){const t=[],n=[],r=[];for(let e=0;e<i;e++)t[e]=0,n[e]=0,r[e]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:t,enabledAttributes:n,attributeDivisors:r,object:e,attributes:{},index:null}}function f(){const e=c.newAttributes;for(let t=0,n=e.length;t<n;t++)e[t]=0}function m(e){g(e,0)}function g(n,i){const o=c.newAttributes,s=c.enabledAttributes,a=c.attributeDivisors;if(o[n]=1,0===s[n]&&(e.enableVertexAttribArray(n),s[n]=1),a[n]!==i){(r.isWebGL2?e:t.get("ANGLE_instanced_arrays"))[r.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](n,i),a[n]=i}}function b(){const t=c.newAttributes,n=c.enabledAttributes;for(let r=0,i=n.length;r<i;r++)n[r]!==t[r]&&(e.disableVertexAttribArray(r),n[r]=0)}function v(t,n,i,o,s,a){!0!==r.isWebGL2||5124!==i&&5125!==i?e.vertexAttribPointer(t,n,i,o,s,a):e.vertexAttribIPointer(t,n,i,s,a)}function y(){S(),u=!0,c!==l&&(c=l,d(c.object))}function S(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:function(i,l,h,y,S){let _=!1;if(s){const t=function(t,n,i){const s=!0===i.wireframe;let l=a[t.id];void 0===l&&(l={},a[t.id]=l);let c=l[n.id];void 0===c&&(c={},l[n.id]=c);let u=c[s];void 0===u&&(u=p(r.isWebGL2?e.createVertexArray():o.createVertexArrayOES()),c[s]=u);return u}(y,h,l);c!==t&&(c=t,d(c.object)),_=function(e,t,n,r){const i=c.attributes,o=t.attributes;let s=0;const a=n.getAttributes();for(const t in a){if(a[t].location>=0){const n=i[t];let r=o[t];if(void 0===r&&("instanceMatrix"===t&&e.instanceMatrix&&(r=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(r=e.instanceColor)),void 0===n)return!0;if(n.attribute!==r)return!0;if(r&&n.data!==r.data)return!0;s++}}return c.attributesNum!==s||c.index!==r}(i,y,h,S),_&&function(e,t,n,r){const i={},o=t.attributes;let s=0;const a=n.getAttributes();for(const t in a){if(a[t].location>=0){let n=o[t];void 0===n&&("instanceMatrix"===t&&e.instanceMatrix&&(n=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(n=e.instanceColor));const r={};r.attribute=n,n&&n.data&&(r.data=n.data),i[t]=r,s++}}c.attributes=i,c.attributesNum=s,c.index=r}(i,y,h,S)}else{const e=!0===l.wireframe;c.geometry===y.id&&c.program===h.id&&c.wireframe===e||(c.geometry=y.id,c.program=h.id,c.wireframe=e,_=!0)}null!==S&&n.update(S,34963),(_||u)&&(u=!1,function(i,o,s,a){if(!1===r.isWebGL2&&(i.isInstancedMesh||a.isInstancedBufferGeometry)&&null===t.get("ANGLE_instanced_arrays"))return;f();const l=a.attributes,c=s.getAttributes(),u=o.defaultAttributeValues;for(const t in c){const r=c[t];if(r.location>=0){let o=l[t];if(void 0===o&&("instanceMatrix"===t&&i.instanceMatrix&&(o=i.instanceMatrix),"instanceColor"===t&&i.instanceColor&&(o=i.instanceColor)),void 0!==o){const t=o.normalized,s=o.itemSize,l=n.get(o);if(void 0===l)continue;const c=l.buffer,u=l.type,d=l.bytesPerElement;if(o.isInterleavedBufferAttribute){const n=o.data,l=n.stride,h=o.offset;if(n.isInstancedInterleavedBuffer){for(let e=0;e<r.locationSize;e++)g(r.location+e,n.meshPerAttribute);!0!==i.isInstancedMesh&&void 0===a._maxInstanceCount&&(a._maxInstanceCount=n.meshPerAttribute*n.count)}else for(let e=0;e<r.locationSize;e++)m(r.location+e);e.bindBuffer(34962,c);for(let e=0;e<r.locationSize;e++)v(r.location+e,s/r.locationSize,u,t,l*d,(h+s/r.locationSize*e)*d)}else{if(o.isInstancedBufferAttribute){for(let e=0;e<r.locationSize;e++)g(r.location+e,o.meshPerAttribute);!0!==i.isInstancedMesh&&void 0===a._maxInstanceCount&&(a._maxInstanceCount=o.meshPerAttribute*o.count)}else for(let e=0;e<r.locationSize;e++)m(r.location+e);e.bindBuffer(34962,c);for(let e=0;e<r.locationSize;e++)v(r.location+e,s/r.locationSize,u,t,s*d,s/r.locationSize*e*d)}}else if(void 0!==u){const n=u[t];if(void 0!==n)switch(n.length){case 2:e.vertexAttrib2fv(r.location,n);break;case 3:e.vertexAttrib3fv(r.location,n);break;case 4:e.vertexAttrib4fv(r.location,n);break;default:e.vertexAttrib1fv(r.location,n)}}}}b()}(i,l,h,y),null!==S&&e.bindBuffer(34963,n.get(S).buffer))},reset:y,resetDefaultState:S,dispose:function(){y();for(const e in a){const t=a[e];for(const e in t){const n=t[e];for(const e in n)h(n[e].object),delete n[e];delete t[e]}delete a[e]}},releaseStatesOfGeometry:function(e){if(void 0===a[e.id])return;const t=a[e.id];for(const e in t){const n=t[e];for(const e in n)h(n[e].object),delete n[e];delete t[e]}delete a[e.id]},releaseStatesOfProgram:function(e){for(const t in a){const n=a[t];if(void 0===n[e.id])continue;const r=n[e.id];for(const e in r)h(r[e].object),delete r[e];delete n[e.id]}},initAttributes:f,enableAttribute:m,disableUnusedAttributes:b}}function No(e,t,n,r){const i=r.isWebGL2;let o;this.setMode=function(e){o=e},this.render=function(t,r){e.drawArrays(o,t,r),n.update(r,o,1)},this.renderInstances=function(r,s,a){if(0===a)return;let l,c;if(i)l=e,c="drawArraysInstanced";else if(l=t.get("ANGLE_instanced_arrays"),c="drawArraysInstancedANGLE",null===l)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");l[c](o,r,s,a),n.update(s,o,a)}}function Do(e,t,n){let r;function i(t){if("highp"===t){if(e.getShaderPrecisionFormat(35633,36338).precision>0&&e.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(35633,36337).precision>0&&e.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}const o="undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||"undefined"!=typeof WebGL2ComputeRenderingContext&&e instanceof WebGL2ComputeRenderingContext;let s=void 0!==n.precision?n.precision:"highp";const a=i(s);a!==s&&(console.warn("THREE.WebGLRenderer:",s,"not supported, using",a,"instead."),s=a);const l=o||t.has("WEBGL_draw_buffers"),c=!0===n.logarithmicDepthBuffer,u=e.getParameter(34930),d=e.getParameter(35660),h=e.getParameter(3379),p=e.getParameter(34076),f=e.getParameter(34921),m=e.getParameter(36347),g=e.getParameter(36348),b=e.getParameter(36349),v=d>0,y=o||t.has("OES_texture_float");return{isWebGL2:o,drawBuffers:l,getMaxAnisotropy:function(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const n=t.get("EXT_texture_filter_anisotropic");r=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:i,precision:s,logarithmicDepthBuffer:c,maxTextures:u,maxVertexTextures:d,maxTextureSize:h,maxCubemapSize:p,maxAttributes:f,maxVertexUniforms:m,maxVaryings:g,maxFragmentUniforms:b,vertexTextures:v,floatFragmentTextures:y,floatVertexTextures:v&&y,maxSamples:o?e.getParameter(36183):0}}function Io(e){const t=this;let n=null,r=0,i=!1,o=!1;const s=new wo,a=new Mn,l={value:null,needsUpdate:!1};function c(){l.value!==n&&(l.value=n,l.needsUpdate=r>0),t.numPlanes=r,t.numIntersection=0}function u(e,n,r,i){const o=null!==e?e.length:0;let c=null;if(0!==o){if(c=l.value,!0!==i||null===c){const t=r+4*o,i=n.matrixWorldInverse;a.getNormalMatrix(i),(null===c||c.length<t)&&(c=new Float32Array(t));for(let t=0,n=r;t!==o;++t,n+=4)s.copy(e[t]).applyMatrix4(i,a),s.normal.toArray(c,n),c[n+3]=s.constant}l.value=c,l.needsUpdate=!0}return t.numPlanes=o,t.numIntersection=0,c}this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t,o){const s=0!==e.length||t||0!==r||i;return i=t,n=u(e,o,0),r=e.length,s},this.beginShadows=function(){o=!0,u(null)},this.endShadows=function(){o=!1,c()},this.setState=function(t,s,a){const d=t.clippingPlanes,h=t.clipIntersection,p=t.clipShadows,f=e.get(t);if(!i||null===d||0===d.length||o&&!p)o?u(null):c();else{const e=o?0:r,t=4*e;let i=f.clippingState||null;l.value=i,i=u(d,s,t,a);for(let e=0;e!==t;++e)i[e]=n[e];f.clippingState=i,this.numIntersection=h?this.numPlanes:0,this.numPlanes+=e}}}function Lo(e){let t=new WeakMap;function n(e,t){return t===ae?e.mapping=oe:t===le&&(e.mapping=se),e}function r(e){const n=e.target;n.removeEventListener("dispose",r);const i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture&&!1===i.isRenderTargetTexture){const o=i.mapping;if(o===ae||o===le){if(t.has(i)){return n(t.get(i).texture,i.mapping)}{const o=i.image;if(o&&o.height>0){const s=new yo(o.height/2);return s.fromEquirectangularTexture(e,i),t.set(i,s),i.addEventListener("dispose",r),n(s.texture,i.mapping)}return null}}}return i},dispose:function(){t=new WeakMap}}}Po.physical={uniforms:ho([Po.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new Cn(1,1)},clearcoatNormalMap:{value:null},sheen:{value:0},sheenColor:{value:new Gn(0)},sheenColorMap:{value:null},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new Cn},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new Gn(0)},specularIntensity:{value:1},specularIntensityMap:{value:null},specularColor:{value:new Gn(1,1,1)},specularColorMap:{value:null}}]),vertexShader:Mo.meshphysical_vert,fragmentShader:Mo.meshphysical_frag};class Bo extends mo{constructor(e=-1,t=1,n=1,r=-1,i=.1,o=2e3){super(),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=i,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,i,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let i=n-e,o=n+e,s=r+t,a=r-t;if(null!==this.view&&this.view.enabled){const e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;i+=e*this.view.offsetX,o=i+e*this.view.width,s-=t*this.view.offsetY,a=s-t*this.view.height}this.projectionMatrix.makeOrthographic(i,o,s,a,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}Bo.prototype.isOrthographicCamera=!0;const zo=[.125,.215,.35,.446,.526,.582],Fo=new Bo,Uo=new Gn;let Qo=null;const qo=(1+Math.sqrt(5))/2,Go=1/qo,Ho=[new sr(1,1,1),new sr(-1,1,1),new sr(1,1,-1),new sr(-1,1,-1),new sr(0,qo,Go),new sr(0,qo,-Go),new sr(Go,0,qo),new sr(-Go,0,qo),new sr(qo,Go,0),new sr(-qo,Go,0)];class Vo{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,r=100){Qo=this._renderer.getRenderTarget(),this._setSize(256);const i=this._allocateTargets();return i.depthBuffer=!0,this._sceneToCubeUV(e,n,r,i),t>0&&this._blur(i,0,0,t),this._applyPMREM(i),this._cleanup(i),i}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=Zo(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=Yo(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(Qo),e.scissorTest=!1,Xo(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===oe||e.mapping===se?this._setSize(0===e.image.length?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),Qo=this._renderer.getRenderTarget();const n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,n={magFilter:ve,minFilter:ve,generateMipmaps:!1,type:Me,format:De,encoding:Pt,depthBuffer:!1},r=Wo(e,t,n);if(null===this._pingPongRenderTarget||this._pingPongRenderTarget.width!==e){null!==this._pingPongRenderTarget&&this._dispose(),this._pingPongRenderTarget=Wo(e,t,n);const{_lodMax:r}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=function(e){const t=[],n=[],r=[];let i=e;const o=e-4+1+zo.length;for(let s=0;s<o;s++){const o=Math.pow(2,i);n.push(o);let a=1/o;s>e-4?a=zo[s-e+4-1]:0===s&&(a=0),r.push(a);const l=1/(o-2),c=-l,u=1+l,d=[c,c,u,c,u,u,c,c,u,u,c,u],h=6,p=6,f=3,m=2,g=1,b=new Float32Array(f*p*h),v=new Float32Array(m*p*h),y=new Float32Array(g*p*h);for(let e=0;e<h;e++){const t=e%3*2/3-1,n=e>2?0:-1,r=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];b.set(r,f*p*e),v.set(d,m*p*e);const i=[e,e,e,e,e,e];y.set(i,g*p*e)}const S=new Qi;S.setAttribute("position",new Oi(b,f)),S.setAttribute("uv",new Oi(v,m)),S.setAttribute("faceIndex",new Oi(y,g)),t.push(S),i>4&&i--}return{lodPlanes:t,sizeLods:n,sigmas:r}}(r)),this._blurMaterial=function(e,t,n){const r=new Float32Array(20),i=new sr(0,1,0);return new fo({name:"SphericalGaussianBlur",defines:{n:20,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:e+".0"},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:Jo(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:y,depthTest:!1,depthWrite:!1})}(r,e,t)}return r}_compileMaterial(e){const t=new ao(this._lodPlanes[0],e);this._renderer.compile(t,Fo)}_sceneToCubeUV(e,t,n,r){const i=new go(90,1,t,n),o=[1,-1,1,1,1,1],s=[1,1,1,-1,-1,-1],a=this._renderer,l=a.autoClear,c=a.toneMapping;a.getClearColor(Uo),a.toneMapping=J,a.autoClear=!1;const u=new xi({name:"PMREM.Background",side:m,depthWrite:!1,depthTest:!1}),d=new ao(new co,u);let h=!1;const p=e.background;p?p.isColor&&(u.color.copy(p),e.background=null,h=!0):(u.color.copy(Uo),h=!0);for(let t=0;t<6;t++){const n=t%3;0===n?(i.up.set(0,o[t],0),i.lookAt(s[t],0,0)):1===n?(i.up.set(0,0,o[t]),i.lookAt(0,s[t],0)):(i.up.set(0,o[t],0),i.lookAt(0,0,s[t]));const l=this._cubeSize;Xo(r,n*l,t>2?l:0,l,l),a.setRenderTarget(r),h&&a.render(d,i),a.render(e,i)}d.geometry.dispose(),d.material.dispose(),a.toneMapping=c,a.autoClear=l,e.background=p}_textureToCubeUV(e,t){const n=this._renderer,r=e.mapping===oe||e.mapping===se;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=Zo()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=Yo());const i=r?this._cubemapMaterial:this._equirectMaterial,o=new ao(this._lodPlanes[0],i);i.uniforms.envMap.value=e;const s=this._cubeSize;Xo(t,0,0,3*s,2*s),n.setRenderTarget(t),n.render(o,Fo)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;for(let t=1;t<this._lodPlanes.length;t++){const n=Math.sqrt(this._sigmas[t]*this._sigmas[t]-this._sigmas[t-1]*this._sigmas[t-1]),r=Ho[(t-1)%Ho.length];this._blur(e,t-1,t,n,r)}t.autoClear=n}_blur(e,t,n,r,i){const o=this._pingPongRenderTarget;this._halfBlur(e,o,t,n,r,"latitudinal",i),this._halfBlur(o,e,n,n,r,"longitudinal",i)}_halfBlur(e,t,n,r,i,o,s){const a=this._renderer,l=this._blurMaterial;"latitudinal"!==o&&"longitudinal"!==o&&console.error("blur direction must be either latitudinal or longitudinal!");const c=new ao(this._lodPlanes[r],l),u=l.uniforms,d=this._sizeLods[n]-1,h=isFinite(i)?Math.PI/(2*d):2*Math.PI/39,p=i/h,f=isFinite(i)?1+Math.floor(3*p):20;f>20&&console.warn(`sigmaRadians, ${i}, is too large and will clip, as it requested ${f} samples when the maximum is set to 20`);const m=[];let g=0;for(let e=0;e<20;++e){const t=e/p,n=Math.exp(-t*t/2);m.push(n),0===e?g+=n:e<f&&(g+=2*n)}for(let e=0;e<m.length;e++)m[e]=m[e]/g;u.envMap.value=e.texture,u.samples.value=f,u.weights.value=m,u.latitudinal.value="latitudinal"===o,s&&(u.poleAxis.value=s);const{_lodMax:b}=this;u.dTheta.value=h,u.mipInt.value=b-n;const v=this._sizeLods[r];Xo(t,3*v*(r>b-4?r-b+4:0),4*(this._cubeSize-v),3*v,2*v),a.setRenderTarget(t),a.render(c,Fo)}}function Wo(e,t,n){const r=new Kn(e,t,n);return r.texture.mapping=ce,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function Xo(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function Yo(){return new fo({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:Jo(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:y,depthTest:!1,depthWrite:!1})}function Zo(){return new fo({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:Jo(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:y,depthTest:!1,depthWrite:!1})}function Jo(){return"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t"}function Ko(e){let t=new WeakMap,n=null;function r(e){const n=e.target;n.removeEventListener("dispose",r);const i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){const o=i.mapping,s=o===ae||o===le,a=o===oe||o===se;if(s||a){if(i.isRenderTargetTexture&&!0===i.needsPMREMUpdate){i.needsPMREMUpdate=!1;let r=t.get(i);return null===n&&(n=new Vo(e)),r=s?n.fromEquirectangular(i,r):n.fromCubemap(i,r),t.set(i,r),r.texture}if(t.has(i))return t.get(i).texture;{const o=i.image;if(s&&o&&o.height>0||a&&o&&function(e){let t=0;for(let n=0;n<6;n++)void 0!==e[n]&&t++;return 6===t}(o)){null===n&&(n=new Vo(e));const o=s?n.fromEquirectangular(i):n.fromCubemap(i);return t.set(i,o),i.addEventListener("dispose",r),o.texture}return null}}}return i},dispose:function(){t=new WeakMap,null!==n&&(n.dispose(),n=null)}}}function es(e){const t={};function n(n){if(void 0!==t[n])return t[n];let r;switch(n){case"WEBGL_depth_texture":r=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=e.getExtension(n)}return t[n]=r,r}return{has:function(e){return null!==n(e)},init:function(e){e.isWebGL2?n("EXT_color_buffer_float"):(n("WEBGL_depth_texture"),n("OES_texture_float"),n("OES_texture_half_float"),n("OES_texture_half_float_linear"),n("OES_standard_derivatives"),n("OES_element_index_uint"),n("OES_vertex_array_object"),n("ANGLE_instanced_arrays")),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float"),n("WEBGL_multisampled_render_to_texture")},get:function(e){const t=n(e);return null===t&&console.warn("THREE.WebGLRenderer: "+e+" extension not supported."),t}}}function ts(e,t,n,r){const i={},o=new WeakMap;function s(e){const a=e.target;null!==a.index&&t.remove(a.index);for(const e in a.attributes)t.remove(a.attributes[e]);a.removeEventListener("dispose",s),delete i[a.id];const l=o.get(a);l&&(t.remove(l),o.delete(a)),r.releaseStatesOfGeometry(a),!0===a.isInstancedBufferGeometry&&delete a._maxInstanceCount,n.memory.geometries--}function a(e){const n=[],r=e.index,i=e.attributes.position;let s=0;if(null!==r){const e=r.array;s=r.version;for(let t=0,r=e.length;t<r;t+=3){const r=e[t+0],i=e[t+1],o=e[t+2];n.push(r,i,i,o,o,r)}}else{const e=i.array;s=i.version;for(let t=0,r=e.length/3-1;t<r;t+=3){const e=t+0,r=t+1,i=t+2;n.push(e,r,r,i,i,e)}}const a=new($n(n)?Pi:Mi)(n,1);a.version=s;const l=o.get(e);l&&t.remove(l),o.set(e,a)}return{get:function(e,t){return!0===i[t.id]||(t.addEventListener("dispose",s),i[t.id]=!0,n.memory.geometries++),t},update:function(e){const n=e.attributes;for(const e in n)t.update(n[e],34962);const r=e.morphAttributes;for(const e in r){const n=r[e];for(let e=0,r=n.length;e<r;e++)t.update(n[e],34962)}},getWireframeAttribute:function(e){const t=o.get(e);if(t){const n=e.index;null!==n&&t.version<n.version&&a(e)}else a(e);return o.get(e)}}}function ns(e,t,n,r){const i=r.isWebGL2;let o,s,a;this.setMode=function(e){o=e},this.setIndex=function(e){s=e.type,a=e.bytesPerElement},this.render=function(t,r){e.drawElements(o,r,s,t*a),n.update(r,o,1)},this.renderInstances=function(r,l,c){if(0===c)return;let u,d;if(i)u=e,d="drawElementsInstanced";else if(u=t.get("ANGLE_instanced_arrays"),d="drawElementsInstancedANGLE",null===u)return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");u[d](o,l,s,r*a,c),n.update(l,o,c)}}function rs(e){const t={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:t,programs:null,autoReset:!0,reset:function(){t.frame++,t.calls=0,t.triangles=0,t.points=0,t.lines=0},update:function(e,n,r){switch(t.calls++,n){case 4:t.triangles+=r*(e/3);break;case 1:t.lines+=r*(e/2);break;case 3:t.lines+=r*(e-1);break;case 2:t.lines+=r*e;break;case 0:t.points+=r*e;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}}}function is(e,t){return e[0]-t[0]}function os(e,t){return Math.abs(t[1])-Math.abs(e[1])}function ss(e,t){let n=1;const r=t.isInterleavedBufferAttribute?t.data.array:t.array;r instanceof Int8Array?n=127:r instanceof Int16Array?n=32767:r instanceof Int32Array?n=2147483647:console.error("THREE.WebGLMorphtargets: Unsupported morph attribute data type: ",r),e.divideScalar(n)}function as(e,t,n){const r={},i=new Float32Array(8),o=new WeakMap,s=new Jn,a=[];for(let e=0;e<8;e++)a[e]=[e,0];return{update:function(l,c,u,d){const h=l.morphTargetInfluences;if(!0===t.isWebGL2){const r=c.morphAttributes.position||c.morphAttributes.normal||c.morphAttributes.color,i=void 0!==r?r.length:0;let a=o.get(c);if(void 0===a||a.count!==i){void 0!==a&&a.texture.dispose();const e=void 0!==c.morphAttributes.position,n=void 0!==c.morphAttributes.normal,r=void 0!==c.morphAttributes.color,l=c.morphAttributes.position||[],u=c.morphAttributes.normal||[],d=c.morphAttributes.color||[];let h=0;!0===e&&(h=1),!0===n&&(h=2),!0===r&&(h=3);let p=c.attributes.position.count*h,f=1;p>t.maxTextureSize&&(f=Math.ceil(p/t.maxTextureSize),p=t.maxTextureSize);const m=new Float32Array(p*f*4*i),g=new er(m,p,f,i);g.type=Ce,g.needsUpdate=!0;const b=4*h;for(let t=0;t<i;t++){const i=l[t],o=u[t],a=d[t],c=p*f*4*t;for(let t=0;t<i.count;t++){const l=t*b;!0===e&&(s.fromBufferAttribute(i,t),!0===i.normalized&&ss(s,i),m[c+l+0]=s.x,m[c+l+1]=s.y,m[c+l+2]=s.z,m[c+l+3]=0),!0===n&&(s.fromBufferAttribute(o,t),!0===o.normalized&&ss(s,o),m[c+l+4]=s.x,m[c+l+5]=s.y,m[c+l+6]=s.z,m[c+l+7]=0),!0===r&&(s.fromBufferAttribute(a,t),!0===a.normalized&&ss(s,a),m[c+l+8]=s.x,m[c+l+9]=s.y,m[c+l+10]=s.z,m[c+l+11]=4===a.itemSize?s.w:1)}}a={count:i,texture:g,size:new Cn(p,f)},o.set(c,a),c.addEventListener("dispose",(function e(){g.dispose(),o.delete(c),c.removeEventListener("dispose",e)}))}let l=0;for(let e=0;e<h.length;e++)l+=h[e];const u=c.morphTargetsRelative?1:1-l;d.getUniforms().setValue(e,"morphTargetBaseInfluence",u),d.getUniforms().setValue(e,"morphTargetInfluences",h),d.getUniforms().setValue(e,"morphTargetsTexture",a.texture,n),d.getUniforms().setValue(e,"morphTargetsTextureSize",a.size)}else{const t=void 0===h?0:h.length;let n=r[c.id];if(void 0===n||n.length!==t){n=[];for(let e=0;e<t;e++)n[e]=[e,0];r[c.id]=n}for(let e=0;e<t;e++){const t=n[e];t[0]=e,t[1]=h[e]}n.sort(os);for(let e=0;e<8;e++)e<t&&n[e][1]?(a[e][0]=n[e][0],a[e][1]=n[e][1]):(a[e][0]=Number.MAX_SAFE_INTEGER,a[e][1]=0);a.sort(is);const o=c.morphAttributes.position,s=c.morphAttributes.normal;let l=0;for(let e=0;e<8;e++){const t=a[e],n=t[0],r=t[1];n!==Number.MAX_SAFE_INTEGER&&r?(o&&c.getAttribute("morphTarget"+e)!==o[n]&&c.setAttribute("morphTarget"+e,o[n]),s&&c.getAttribute("morphNormal"+e)!==s[n]&&c.setAttribute("morphNormal"+e,s[n]),i[e]=r,l+=r):(o&&!0===c.hasAttribute("morphTarget"+e)&&c.deleteAttribute("morphTarget"+e),s&&!0===c.hasAttribute("morphNormal"+e)&&c.deleteAttribute("morphNormal"+e),i[e]=0)}const u=c.morphTargetsRelative?1:1-l;d.getUniforms().setValue(e,"morphTargetBaseInfluence",u),d.getUniforms().setValue(e,"morphTargetInfluences",i)}}}}function ls(e,t,n,r){let i=new WeakMap;function o(e){const t=e.target;t.removeEventListener("dispose",o),n.remove(t.instanceMatrix),null!==t.instanceColor&&n.remove(t.instanceColor)}return{update:function(e){const s=r.render.frame,a=e.geometry,l=t.get(e,a);return i.get(l)!==s&&(t.update(l),i.set(l,s)),e.isInstancedMesh&&(!1===e.hasEventListener("dispose",o)&&e.addEventListener("dispose",o),n.update(e.instanceMatrix,34962),null!==e.instanceColor&&n.update(e.instanceColor,34962)),l},dispose:function(){i=new WeakMap}}}const cs=new Zn,us=new er,ds=new nr,hs=new vo,ps=[],fs=[],ms=new Float32Array(16),gs=new Float32Array(9),bs=new Float32Array(4);function vs(e,t,n){const r=e[0];if(r<=0||r>0)return e;const i=t*n;let o=ps[i];if(void 0===o&&(o=new Float32Array(i),ps[i]=o),0!==t){r.toArray(o,0);for(let r=1,i=0;r!==t;++r)i+=n,e[r].toArray(o,i)}return o}function ys(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}function Ss(e,t){for(let n=0,r=t.length;n<r;n++)e[n]=t[n]}function _s(e,t){let n=fs[t];void 0===n&&(n=new Int32Array(t),fs[t]=n);for(let r=0;r!==t;++r)n[r]=e.allocateTextureUnit();return n}function xs(e,t){const n=this.cache;n[0]!==t&&(e.uniform1f(this.addr,t),n[0]=t)}function ws(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2f(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(ys(n,t))return;e.uniform2fv(this.addr,t),Ss(n,t)}}function ks(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3f(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else if(void 0!==t.r)n[0]===t.r&&n[1]===t.g&&n[2]===t.b||(e.uniform3f(this.addr,t.r,t.g,t.b),n[0]=t.r,n[1]=t.g,n[2]=t.b);else{if(ys(n,t))return;e.uniform3fv(this.addr,t),Ss(n,t)}}function Os(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(ys(n,t))return;e.uniform4fv(this.addr,t),Ss(n,t)}}function Es(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(ys(n,t))return;e.uniformMatrix2fv(this.addr,!1,t),Ss(n,t)}else{if(ys(n,r))return;bs.set(r),e.uniformMatrix2fv(this.addr,!1,bs),Ss(n,r)}}function As(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(ys(n,t))return;e.uniformMatrix3fv(this.addr,!1,t),Ss(n,t)}else{if(ys(n,r))return;gs.set(r),e.uniformMatrix3fv(this.addr,!1,gs),Ss(n,r)}}function Ts(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(ys(n,t))return;e.uniformMatrix4fv(this.addr,!1,t),Ss(n,t)}else{if(ys(n,r))return;ms.set(r),e.uniformMatrix4fv(this.addr,!1,ms),Ss(n,r)}}function Cs(e,t){const n=this.cache;n[0]!==t&&(e.uniform1i(this.addr,t),n[0]=t)}function Ms(e,t){const n=this.cache;ys(n,t)||(e.uniform2iv(this.addr,t),Ss(n,t))}function $s(e,t){const n=this.cache;ys(n,t)||(e.uniform3iv(this.addr,t),Ss(n,t))}function Ps(e,t){const n=this.cache;ys(n,t)||(e.uniform4iv(this.addr,t),Ss(n,t))}function Rs(e,t){const n=this.cache;n[0]!==t&&(e.uniform1ui(this.addr,t),n[0]=t)}function js(e,t){const n=this.cache;ys(n,t)||(e.uniform2uiv(this.addr,t),Ss(n,t))}function Ns(e,t){const n=this.cache;ys(n,t)||(e.uniform3uiv(this.addr,t),Ss(n,t))}function Ds(e,t){const n=this.cache;ys(n,t)||(e.uniform4uiv(this.addr,t),Ss(n,t))}function Is(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture2D(t||cs,i)}function Ls(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture3D(t||ds,i)}function Bs(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTextureCube(t||hs,i)}function zs(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture2DArray(t||us,i)}function Fs(e,t){e.uniform1fv(this.addr,t)}function Us(e,t){const n=vs(t,this.size,2);e.uniform2fv(this.addr,n)}function Qs(e,t){const n=vs(t,this.size,3);e.uniform3fv(this.addr,n)}function qs(e,t){const n=vs(t,this.size,4);e.uniform4fv(this.addr,n)}function Gs(e,t){const n=vs(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,n)}function Hs(e,t){const n=vs(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,n)}function Vs(e,t){const n=vs(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,n)}function Ws(e,t){e.uniform1iv(this.addr,t)}function Xs(e,t){e.uniform2iv(this.addr,t)}function Ys(e,t){e.uniform3iv(this.addr,t)}function Zs(e,t){e.uniform4iv(this.addr,t)}function Js(e,t){e.uniform1uiv(this.addr,t)}function Ks(e,t){e.uniform2uiv(this.addr,t)}function ea(e,t){e.uniform3uiv(this.addr,t)}function ta(e,t){e.uniform4uiv(this.addr,t)}function na(e,t,n){const r=t.length,i=_s(n,r);e.uniform1iv(this.addr,i);for(let e=0;e!==r;++e)n.setTexture2D(t[e]||cs,i[e])}function ra(e,t,n){const r=t.length,i=_s(n,r);e.uniform1iv(this.addr,i);for(let e=0;e!==r;++e)n.setTexture3D(t[e]||ds,i[e])}function ia(e,t,n){const r=t.length,i=_s(n,r);e.uniform1iv(this.addr,i);for(let e=0;e!==r;++e)n.setTextureCube(t[e]||hs,i[e])}function oa(e,t,n){const r=t.length,i=_s(n,r);e.uniform1iv(this.addr,i);for(let e=0;e!==r;++e)n.setTexture2DArray(t[e]||us,i[e])}function sa(e,t,n){this.id=e,this.addr=n,this.cache=[],this.setValue=function(e){switch(e){case 5126:return xs;case 35664:return ws;case 35665:return ks;case 35666:return Os;case 35674:return Es;case 35675:return As;case 35676:return Ts;case 5124:case 35670:return Cs;case 35667:case 35671:return Ms;case 35668:case 35672:return $s;case 35669:case 35673:return Ps;case 5125:return Rs;case 36294:return js;case 36295:return Ns;case 36296:return Ds;case 35678:case 36198:case 36298:case 36306:case 35682:return Is;case 35679:case 36299:case 36307:return Ls;case 35680:case 36300:case 36308:case 36293:return Bs;case 36289:case 36303:case 36311:case 36292:return zs}}(t.type)}function aa(e,t,n){this.id=e,this.addr=n,this.cache=[],this.size=t.size,this.setValue=function(e){switch(e){case 5126:return Fs;case 35664:return Us;case 35665:return Qs;case 35666:return qs;case 35674:return Gs;case 35675:return Hs;case 35676:return Vs;case 5124:case 35670:return Ws;case 35667:case 35671:return Xs;case 35668:case 35672:return Ys;case 35669:case 35673:return Zs;case 5125:return Js;case 36294:return Ks;case 36295:return ea;case 36296:return ta;case 35678:case 36198:case 36298:case 36306:case 35682:return na;case 35679:case 36299:case 36307:return ra;case 35680:case 36300:case 36308:case 36293:return ia;case 36289:case 36303:case 36311:case 36292:return oa}}(t.type)}function la(e){this.id=e,this.seq=[],this.map={}}la.prototype.setValue=function(e,t,n){const r=this.seq;for(let i=0,o=r.length;i!==o;++i){const o=r[i];o.setValue(e,t[o.id],n)}};const ca=/(\w+)(\])?(\[|\.)?/g;function ua(e,t){e.seq.push(t),e.map[t.id]=t}function da(e,t,n){const r=e.name,i=r.length;for(ca.lastIndex=0;;){const o=ca.exec(r),s=ca.lastIndex;let a=o[1];const l="]"===o[2],c=o[3];if(l&&(a|=0),void 0===c||"["===c&&s+2===i){ua(n,void 0===c?new sa(a,e,t):new aa(a,e,t));break}{let e=n.map[a];void 0===e&&(e=new la(a),ua(n,e)),n=e}}}function ha(e,t){this.seq=[],this.map={};const n=e.getProgramParameter(t,35718);for(let r=0;r<n;++r){const n=e.getActiveUniform(t,r);da(n,e.getUniformLocation(t,n.name),this)}}function pa(e,t,n){const r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),r}ha.prototype.setValue=function(e,t,n,r){const i=this.map[t];void 0!==i&&i.setValue(e,n,r)},ha.prototype.setOptional=function(e,t,n){const r=t[n];void 0!==r&&this.setValue(e,n,r)},ha.upload=function(e,t,n,r){for(let i=0,o=t.length;i!==o;++i){const o=t[i],s=n[o.id];!1!==s.needsUpdate&&o.setValue(e,s.value,r)}},ha.seqWithValue=function(e,t){const n=[];for(let r=0,i=e.length;r!==i;++r){const i=e[r];i.id in t&&n.push(i)}return n};let fa=0;function ma(e,t,n){const r=e.getShaderParameter(t,35713),i=e.getShaderInfoLog(t).trim();if(r&&""===i)return"";const o=/ERROR: 0:(\d+)/.exec(i);if(o){const r=parseInt(o[0]);return n.toUpperCase()+"\n\n"+i+"\n\n"+function(e,t){const n=e.split("\n"),r=[],i=Math.max(t-6,0),o=Math.min(t+6,n.length);for(let e=i;e<o;e++)r.push(e+1+": "+n[e]);return r.join("\n")}(e.getShaderSource(t),r)}return i}function ga(e,t){const n=function(e){switch(e){case Pt:return["Linear","( value )"];case Rt:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",e),["Linear","( value )"]}}(t);return"vec4 "+e+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}function ba(e,t){let n;switch(t){case K:n="Linear";break;case ee:n="Reinhard";break;case te:n="OptimizedCineon";break;case ne:n="ACESFilmic";break;case re:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),n="Linear"}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function va(e){return""!==e}function ya(e,t){return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function Sa(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const _a=/^[ \t]*#include +<([\w\d./]+)>/gm;function xa(e){return e.replace(_a,wa)}function wa(e,t){const n=Mo[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return xa(n)}const ka=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,Oa=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Ea(e){return e.replace(Oa,Ta).replace(ka,Aa)}function Aa(e,t,n,r){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),Ta(e,t,n,r)}function Ta(e,t,n,r){let i="";for(let e=parseInt(t);e<parseInt(n);e++)i+=r.replace(/\[\s*i\s*\]/g,"[ "+e+" ]").replace(/UNROLLED_LOOP_INDEX/g,e);return i}function Ca(e){let t="precision "+e.precision+" float;\nprecision "+e.precision+" int;";return"highp"===e.precision?t+="\n#define HIGH_PRECISION":"mediump"===e.precision?t+="\n#define MEDIUM_PRECISION":"lowp"===e.precision&&(t+="\n#define LOW_PRECISION"),t}function Ma(e,t,n,r){const i=e.getContext(),o=n.defines;let s=n.vertexShader,a=n.fragmentShader;const l=function(e){let t="SHADOWMAP_TYPE_BASIC";return e.shadowMapType===d?t="SHADOWMAP_TYPE_PCF":e.shadowMapType===h?t="SHADOWMAP_TYPE_PCF_SOFT":e.shadowMapType===p&&(t="SHADOWMAP_TYPE_VSM"),t}(n),c=function(e){let t="ENVMAP_TYPE_CUBE";if(e.envMap)switch(e.envMapMode){case oe:case se:t="ENVMAP_TYPE_CUBE";break;case ce:t="ENVMAP_TYPE_CUBE_UV"}return t}(n),u=function(e){let t="ENVMAP_MODE_REFLECTION";if(e.envMap)switch(e.envMapMode){case se:t="ENVMAP_MODE_REFRACTION"}return t}(n),f=function(e){let t="ENVMAP_BLENDING_NONE";if(e.envMap)switch(e.combine){case X:t="ENVMAP_BLENDING_MULTIPLY";break;case Y:t="ENVMAP_BLENDING_MIX";break;case Z:t="ENVMAP_BLENDING_ADD"}return t}(n),m=function(e){const t=e.envMapCubeUVHeight;if(null===t)return null;const n=Math.log2(t)-2,r=1/t;return{texelWidth:1/(3*Math.max(Math.pow(2,n),112)),texelHeight:r,maxMip:n}}(n),g=n.isWebGL2?"":function(e){return[e.extensionDerivatives||e.envMapCubeUVHeight||e.bumpMap||e.tangentSpaceNormalMap||e.clearcoatNormalMap||e.flatShading||"physical"===e.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(e.extensionFragDepth||e.logarithmicDepthBuffer)&&e.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",e.extensionDrawBuffers&&e.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(e.extensionShaderTextureLOD||e.envMap||e.transmission)&&e.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(va).join("\n")}(n),b=function(e){const t=[];for(const n in e){const r=e[n];!1!==r&&t.push("#define "+n+" "+r)}return t.join("\n")}(o),v=i.createProgram();let y,S,_=n.glslVersion?"#version "+n.glslVersion+"\n":"";n.isRawShaderMaterial?(y=[b].filter(va).join("\n"),y.length>0&&(y+="\n"),S=[g,b].filter(va).join("\n"),S.length>0&&(S+="\n")):(y=[Ca(n),"#define SHADER_NAME "+n.shaderName,b,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.supportsVertexTextures?"#define VERTEX_TEXTURES":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.displacementMap&&n.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",n.specularColorMap?"#define USE_SPECULARCOLORMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEENCOLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.morphColors&&n.isWebGL2?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(va).join("\n"),S=[g,Ca(n),"#define SHADER_NAME "+n.shaderName,b,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+u:"",n.envMap?"#define "+f:"",m?"#define CUBEUV_TEXEL_WIDTH "+m.texelWidth:"",m?"#define CUBEUV_TEXEL_HEIGHT "+m.texelHeight:"",m?"#define CUBEUV_MAX_MIP "+m.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",n.specularColorMap?"#define USE_SPECULARCOLORMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEENCOLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==J?"#define TONE_MAPPING":"",n.toneMapping!==J?Mo.tonemapping_pars_fragment:"",n.toneMapping!==J?ba("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",Mo.encodings_pars_fragment,ga("linearToOutputTexel",n.outputEncoding),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(va).join("\n")),s=xa(s),s=ya(s,n),s=Sa(s,n),a=xa(a),a=ya(a,n),a=Sa(a,n),s=Ea(s),a=Ea(a),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(_="#version 300 es\n",y=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+y,S=["#define varying in",n.glslVersion===fn?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===fn?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+S);const x=_+S+a,w=pa(i,35633,_+y+s),k=pa(i,35632,x);if(i.attachShader(v,w),i.attachShader(v,k),void 0!==n.index0AttributeName?i.bindAttribLocation(v,0,n.index0AttributeName):!0===n.morphTargets&&i.bindAttribLocation(v,0,"position"),i.linkProgram(v),e.debug.checkShaderErrors){const e=i.getProgramInfoLog(v).trim(),t=i.getShaderInfoLog(w).trim(),n=i.getShaderInfoLog(k).trim();let r=!0,o=!0;if(!1===i.getProgramParameter(v,35714)){r=!1;const t=ma(i,w,"vertex"),n=ma(i,k,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(v,35715)+"\n\nProgram Info Log: "+e+"\n"+t+"\n"+n)}else""!==e?console.warn("THREE.WebGLProgram: Program Info Log:",e):""!==t&&""!==n||(o=!1);o&&(this.diagnostics={runnable:r,programLog:e,vertexShader:{log:t,prefix:y},fragmentShader:{log:n,prefix:S}})}let O,E;return i.deleteShader(w),i.deleteShader(k),this.getUniforms=function(){return void 0===O&&(O=new ha(i,v)),O},this.getAttributes=function(){return void 0===E&&(E=function(e,t){const n={},r=e.getProgramParameter(t,35721);for(let i=0;i<r;i++){const r=e.getActiveAttrib(t,i),o=r.name;let s=1;35674===r.type&&(s=2),35675===r.type&&(s=3),35676===r.type&&(s=4),n[o]={type:r.type,location:e.getAttribLocation(t,o),locationSize:s}}return n}(i,v)),E},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(v),this.program=void 0},this.name=n.shaderName,this.id=fa++,this.cacheKey=t,this.usedTimes=1,this.program=v,this.vertexShader=w,this.fragmentShader=k,this}let $a=0;class Pa{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,n=e.fragmentShader,r=this._getShaderStage(t),i=this._getShaderStage(n),o=this._getShaderCacheForMaterial(e);return!1===o.has(r)&&(o.add(r),r.usedTimes++),!1===o.has(i)&&(o.add(i),i.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const e of t)e.usedTimes--,0===e.usedTimes&&this.shaderCache.delete(e.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;return!1===t.has(e)&&t.set(e,new Set),t.get(e)}_getShaderStage(e){const t=this.shaderCache;if(!1===t.has(e)){const n=new Ra(e);t.set(e,n)}return t.get(e)}}class Ra{constructor(e){this.id=$a++,this.code=e,this.usedTimes=0}}function ja(e,t,n,r,i,o,s){const a=new Wr,l=new Pa,c=[],u=i.isWebGL2,d=i.logarithmicDepthBuffer,h=i.vertexTextures;let p=i.precision;const f={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};return{getParameters:function(o,a,c,b,v){const y=b.fog,_=v.geometry,x=o.isMeshStandardMaterial?b.environment:null,w=(o.isMeshStandardMaterial?n:t).get(o.envMap||x),k=w&&w.mapping===ce?w.image.height:null,O=f[o.type];null!==o.precision&&(p=i.getMaxPrecision(o.precision),p!==o.precision&&console.warn("THREE.WebGLProgram.getParameters:",o.precision,"not supported, using",p,"instead."));const E=_.morphAttributes.position||_.morphAttributes.normal||_.morphAttributes.color,A=void 0!==E?E.length:0;let T,C,M,$,P=0;if(void 0!==_.morphAttributes.position&&(P=1),void 0!==_.morphAttributes.normal&&(P=2),void 0!==_.morphAttributes.color&&(P=3),O){const e=Po[O];T=e.vertexShader,C=e.fragmentShader}else T=o.vertexShader,C=o.fragmentShader,l.update(o),M=l.getVertexShaderID(o),$=l.getFragmentShaderID(o);const R=e.getRenderTarget(),j=o.alphaTest>0,N=o.clearcoat>0;return{isWebGL2:u,shaderID:O,shaderName:o.type,vertexShader:T,fragmentShader:C,defines:o.defines,customVertexShaderID:M,customFragmentShaderID:$,isRawShaderMaterial:!0===o.isRawShaderMaterial,glslVersion:o.glslVersion,precision:p,instancing:!0===v.isInstancedMesh,instancingColor:!0===v.isInstancedMesh&&null!==v.instanceColor,supportsVertexTextures:h,outputEncoding:null===R?e.outputEncoding:!0===R.isXRRenderTarget?R.texture.encoding:Pt,map:!!o.map,matcap:!!o.matcap,envMap:!!w,envMapMode:w&&w.mapping,envMapCubeUVHeight:k,lightMap:!!o.lightMap,aoMap:!!o.aoMap,emissiveMap:!!o.emissiveMap,bumpMap:!!o.bumpMap,normalMap:!!o.normalMap,objectSpaceNormalMap:o.normalMapType===It,tangentSpaceNormalMap:o.normalMapType===Dt,decodeVideoTexture:!!o.map&&!0===o.map.isVideoTexture&&o.map.encoding===Rt,clearcoat:N,clearcoatMap:N&&!!o.clearcoatMap,clearcoatRoughnessMap:N&&!!o.clearcoatRoughnessMap,clearcoatNormalMap:N&&!!o.clearcoatNormalMap,displacementMap:!!o.displacementMap,roughnessMap:!!o.roughnessMap,metalnessMap:!!o.metalnessMap,specularMap:!!o.specularMap,specularIntensityMap:!!o.specularIntensityMap,specularColorMap:!!o.specularColorMap,opaque:!1===o.transparent&&o.blending===S,alphaMap:!!o.alphaMap,alphaTest:j,gradientMap:!!o.gradientMap,sheen:o.sheen>0,sheenColorMap:!!o.sheenColorMap,sheenRoughnessMap:!!o.sheenRoughnessMap,transmission:o.transmission>0,transmissionMap:!!o.transmissionMap,thicknessMap:!!o.thicknessMap,combine:o.combine,vertexTangents:!!o.normalMap&&!!_.attributes.tangent,vertexColors:o.vertexColors,vertexAlphas:!0===o.vertexColors&&!!_.attributes.color&&4===_.attributes.color.itemSize,vertexUvs:!!(o.map||o.bumpMap||o.normalMap||o.specularMap||o.alphaMap||o.emissiveMap||o.roughnessMap||o.metalnessMap||o.clearcoatMap||o.clearcoatRoughnessMap||o.clearcoatNormalMap||o.displacementMap||o.transmissionMap||o.thicknessMap||o.specularIntensityMap||o.specularColorMap||o.sheenColorMap||o.sheenRoughnessMap),uvsVertexOnly:!(o.map||o.bumpMap||o.normalMap||o.specularMap||o.alphaMap||o.emissiveMap||o.roughnessMap||o.metalnessMap||o.clearcoatNormalMap||o.transmission>0||o.transmissionMap||o.thicknessMap||o.specularIntensityMap||o.specularColorMap||o.sheen>0||o.sheenColorMap||o.sheenRoughnessMap||!o.displacementMap),fog:!!y,useFog:!0===o.fog,fogExp2:y&&y.isFogExp2,flatShading:!!o.flatShading,sizeAttenuation:o.sizeAttenuation,logarithmicDepthBuffer:d,skinning:!0===v.isSkinnedMesh,morphTargets:void 0!==_.morphAttributes.position,morphNormals:void 0!==_.morphAttributes.normal,morphColors:void 0!==_.morphAttributes.color,morphTargetsCount:A,morphTextureStride:P,numDirLights:a.directional.length,numPointLights:a.point.length,numSpotLights:a.spot.length,numRectAreaLights:a.rectArea.length,numHemiLights:a.hemi.length,numDirLightShadows:a.directionalShadowMap.length,numPointLightShadows:a.pointShadowMap.length,numSpotLightShadows:a.spotShadowMap.length,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:o.dithering,shadowMapEnabled:e.shadowMap.enabled&&c.length>0,shadowMapType:e.shadowMap.type,toneMapping:o.toneMapped?e.toneMapping:J,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:o.premultipliedAlpha,doubleSided:o.side===g,flipSided:o.side===m,useDepthPacking:!!o.depthPacking,depthPacking:o.depthPacking||0,index0AttributeName:o.index0AttributeName,extensionDerivatives:o.extensions&&o.extensions.derivatives,extensionFragDepth:o.extensions&&o.extensions.fragDepth,extensionDrawBuffers:o.extensions&&o.extensions.drawBuffers,extensionShaderTextureLOD:o.extensions&&o.extensions.shaderTextureLOD,rendererExtensionFragDepth:u||r.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||r.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||r.has("EXT_shader_texture_lod"),customProgramCacheKey:o.customProgramCacheKey()}},getProgramCacheKey:function(t){const n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.customVertexShaderID),n.push(t.customFragmentShaderID)),void 0!==t.defines)for(const e in t.defines)n.push(e),n.push(t.defines[e]);return!1===t.isRawShaderMaterial&&(!function(e,t){e.push(t.precision),e.push(t.outputEncoding),e.push(t.envMapMode),e.push(t.envMapCubeUVHeight),e.push(t.combine),e.push(t.vertexUvs),e.push(t.fogExp2),e.push(t.sizeAttenuation),e.push(t.morphTargetsCount),e.push(t.morphAttributeCount),e.push(t.numDirLights),e.push(t.numPointLights),e.push(t.numSpotLights),e.push(t.numHemiLights),e.push(t.numRectAreaLights),e.push(t.numDirLightShadows),e.push(t.numPointLightShadows),e.push(t.numSpotLightShadows),e.push(t.shadowMapType),e.push(t.toneMapping),e.push(t.numClippingPlanes),e.push(t.numClipIntersection),e.push(t.depthPacking)}(n,t),function(e,t){a.disableAll(),t.isWebGL2&&a.enable(0);t.supportsVertexTextures&&a.enable(1);t.instancing&&a.enable(2);t.instancingColor&&a.enable(3);t.map&&a.enable(4);t.matcap&&a.enable(5);t.envMap&&a.enable(6);t.lightMap&&a.enable(7);t.aoMap&&a.enable(8);t.emissiveMap&&a.enable(9);t.bumpMap&&a.enable(10);t.normalMap&&a.enable(11);t.objectSpaceNormalMap&&a.enable(12);t.tangentSpaceNormalMap&&a.enable(13);t.clearcoat&&a.enable(14);t.clearcoatMap&&a.enable(15);t.clearcoatRoughnessMap&&a.enable(16);t.clearcoatNormalMap&&a.enable(17);t.displacementMap&&a.enable(18);t.specularMap&&a.enable(19);t.roughnessMap&&a.enable(20);t.metalnessMap&&a.enable(21);t.gradientMap&&a.enable(22);t.alphaMap&&a.enable(23);t.alphaTest&&a.enable(24);t.vertexColors&&a.enable(25);t.vertexAlphas&&a.enable(26);t.vertexUvs&&a.enable(27);t.vertexTangents&&a.enable(28);t.uvsVertexOnly&&a.enable(29);t.fog&&a.enable(30);e.push(a.mask),a.disableAll(),t.useFog&&a.enable(0);t.flatShading&&a.enable(1);t.logarithmicDepthBuffer&&a.enable(2);t.skinning&&a.enable(3);t.morphTargets&&a.enable(4);t.morphNormals&&a.enable(5);t.morphColors&&a.enable(6);t.premultipliedAlpha&&a.enable(7);t.shadowMapEnabled&&a.enable(8);t.physicallyCorrectLights&&a.enable(9);t.doubleSided&&a.enable(10);t.flipSided&&a.enable(11);t.useDepthPacking&&a.enable(12);t.dithering&&a.enable(13);t.specularIntensityMap&&a.enable(14);t.specularColorMap&&a.enable(15);t.transmission&&a.enable(16);t.transmissionMap&&a.enable(17);t.thicknessMap&&a.enable(18);t.sheen&&a.enable(19);t.sheenColorMap&&a.enable(20);t.sheenRoughnessMap&&a.enable(21);t.decodeVideoTexture&&a.enable(22);t.opaque&&a.enable(23);e.push(a.mask)}(n,t),n.push(e.outputEncoding)),n.push(t.customProgramCacheKey),n.join()},getUniforms:function(e){const t=f[e.type];let n;if(t){const e=Po[t];n=po.clone(e.uniforms)}else n=e.uniforms;return n},acquireProgram:function(t,n){let r;for(let e=0,t=c.length;e<t;e++){const t=c[e];if(t.cacheKey===n){r=t,++r.usedTimes;break}}return void 0===r&&(r=new Ma(e,n,t,o),c.push(r)),r},releaseProgram:function(e){if(0==--e.usedTimes){const t=c.indexOf(e);c[t]=c[c.length-1],c.pop(),e.destroy()}},releaseShaderCache:function(e){l.remove(e)},programs:c,dispose:function(){l.dispose()}}}function Na(){let e=new WeakMap;return{get:function(t){let n=e.get(t);return void 0===n&&(n={},e.set(t,n)),n},remove:function(t){e.delete(t)},update:function(t,n,r){e.get(t)[n]=r},dispose:function(){e=new WeakMap}}}function Da(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.material.id!==t.material.id?e.material.id-t.material.id:e.z!==t.z?e.z-t.z:e.id-t.id}function Ia(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function La(){const e=[];let t=0;const n=[],r=[],i=[];function o(n,r,i,o,s,a){let l=e[t];return void 0===l?(l={id:n.id,object:n,geometry:r,material:i,groupOrder:o,renderOrder:n.renderOrder,z:s,group:a},e[t]=l):(l.id=n.id,l.object=n,l.geometry=r,l.material=i,l.groupOrder=o,l.renderOrder=n.renderOrder,l.z=s,l.group=a),t++,l}return{opaque:n,transmissive:r,transparent:i,init:function(){t=0,n.length=0,r.length=0,i.length=0},push:function(e,t,s,a,l,c){const u=o(e,t,s,a,l,c);s.transmission>0?r.push(u):!0===s.transparent?i.push(u):n.push(u)},unshift:function(e,t,s,a,l,c){const u=o(e,t,s,a,l,c);s.transmission>0?r.unshift(u):!0===s.transparent?i.unshift(u):n.unshift(u)},finish:function(){for(let n=t,r=e.length;n<r;n++){const t=e[n];if(null===t.id)break;t.id=null,t.object=null,t.geometry=null,t.material=null,t.group=null}},sort:function(e,t){n.length>1&&n.sort(e||Da),r.length>1&&r.sort(t||Ia),i.length>1&&i.sort(t||Ia)}}}function Ba(){let e=new WeakMap;return{get:function(t,n){let r;return!1===e.has(t)?(r=new La,e.set(t,[r])):n>=e.get(t).length?(r=new La,e.get(t).push(r)):r=e.get(t)[n],r},dispose:function(){e=new WeakMap}}}function za(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":n={direction:new sr,color:new Gn};break;case"SpotLight":n={position:new sr,direction:new sr,color:new Gn,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new sr,color:new Gn,distance:0,decay:0};break;case"HemisphereLight":n={direction:new sr,skyColor:new Gn,groundColor:new Gn};break;case"RectAreaLight":n={color:new Gn,position:new sr,halfWidth:new sr,halfHeight:new sr}}return e[t.id]=n,n}}}let Fa=0;function Ua(e,t){return(t.castShadow?1:0)-(e.castShadow?1:0)}function Qa(e,t){const n=new za,r=function(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Cn};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Cn,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=n,n}}}(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let e=0;e<9;e++)i.probe.push(new sr);const o=new sr,s=new Ir,a=new Ir;return{setup:function(o,s){let a=0,l=0,c=0;for(let e=0;e<9;e++)i.probe[e].set(0,0,0);let u=0,d=0,h=0,p=0,f=0,m=0,g=0,b=0;o.sort(Ua);const v=!0!==s?Math.PI:1;for(let e=0,t=o.length;e<t;e++){const t=o[e],s=t.color,y=t.intensity,S=t.distance,_=t.shadow&&t.shadow.map?t.shadow.map.texture:null;if(t.isAmbientLight)a+=s.r*y*v,l+=s.g*y*v,c+=s.b*y*v;else if(t.isLightProbe)for(let e=0;e<9;e++)i.probe[e].addScaledVector(t.sh.coefficients[e],y);else if(t.isDirectionalLight){const e=n.get(t);if(e.color.copy(t.color).multiplyScalar(t.intensity*v),t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,i.directionalShadow[u]=n,i.directionalShadowMap[u]=_,i.directionalShadowMatrix[u]=t.shadow.matrix,m++}i.directional[u]=e,u++}else if(t.isSpotLight){const e=n.get(t);if(e.position.setFromMatrixPosition(t.matrixWorld),e.color.copy(s).multiplyScalar(y*v),e.distance=S,e.coneCos=Math.cos(t.angle),e.penumbraCos=Math.cos(t.angle*(1-t.penumbra)),e.decay=t.decay,t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,i.spotShadow[h]=n,i.spotShadowMap[h]=_,i.spotShadowMatrix[h]=t.shadow.matrix,b++}i.spot[h]=e,h++}else if(t.isRectAreaLight){const e=n.get(t);e.color.copy(s).multiplyScalar(y),e.halfWidth.set(.5*t.width,0,0),e.halfHeight.set(0,.5*t.height,0),i.rectArea[p]=e,p++}else if(t.isPointLight){const e=n.get(t);if(e.color.copy(t.color).multiplyScalar(t.intensity*v),e.distance=t.distance,e.decay=t.decay,t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,n.shadowCameraNear=e.camera.near,n.shadowCameraFar=e.camera.far,i.pointShadow[d]=n,i.pointShadowMap[d]=_,i.pointShadowMatrix[d]=t.shadow.matrix,g++}i.point[d]=e,d++}else if(t.isHemisphereLight){const e=n.get(t);e.skyColor.copy(t.color).multiplyScalar(y*v),e.groundColor.copy(t.groundColor).multiplyScalar(y*v),i.hemi[f]=e,f++}}p>0&&(t.isWebGL2||!0===e.has("OES_texture_float_linear")?(i.rectAreaLTC1=$o.LTC_FLOAT_1,i.rectAreaLTC2=$o.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")?(i.rectAreaLTC1=$o.LTC_HALF_1,i.rectAreaLTC2=$o.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=a,i.ambient[1]=l,i.ambient[2]=c;const y=i.hash;y.directionalLength===u&&y.pointLength===d&&y.spotLength===h&&y.rectAreaLength===p&&y.hemiLength===f&&y.numDirectionalShadows===m&&y.numPointShadows===g&&y.numSpotShadows===b||(i.directional.length=u,i.spot.length=h,i.rectArea.length=p,i.point.length=d,i.hemi.length=f,i.directionalShadow.length=m,i.directionalShadowMap.length=m,i.pointShadow.length=g,i.pointShadowMap.length=g,i.spotShadow.length=b,i.spotShadowMap.length=b,i.directionalShadowMatrix.length=m,i.pointShadowMatrix.length=g,i.spotShadowMatrix.length=b,y.directionalLength=u,y.pointLength=d,y.spotLength=h,y.rectAreaLength=p,y.hemiLength=f,y.numDirectionalShadows=m,y.numPointShadows=g,y.numSpotShadows=b,i.version=Fa++)},setupView:function(e,t){let n=0,r=0,l=0,c=0,u=0;const d=t.matrixWorldInverse;for(let t=0,h=e.length;t<h;t++){const h=e[t];if(h.isDirectionalLight){const e=i.directional[n];e.direction.setFromMatrixPosition(h.matrixWorld),o.setFromMatrixPosition(h.target.matrixWorld),e.direction.sub(o),e.direction.transformDirection(d),n++}else if(h.isSpotLight){const e=i.spot[l];e.position.setFromMatrixPosition(h.matrixWorld),e.position.applyMatrix4(d),e.direction.setFromMatrixPosition(h.matrixWorld),o.setFromMatrixPosition(h.target.matrixWorld),e.direction.sub(o),e.direction.transformDirection(d),l++}else if(h.isRectAreaLight){const e=i.rectArea[c];e.position.setFromMatrixPosition(h.matrixWorld),e.position.applyMatrix4(d),a.identity(),s.copy(h.matrixWorld),s.premultiply(d),a.extractRotation(s),e.halfWidth.set(.5*h.width,0,0),e.halfHeight.set(0,.5*h.height,0),e.halfWidth.applyMatrix4(a),e.halfHeight.applyMatrix4(a),c++}else if(h.isPointLight){const e=i.point[r];e.position.setFromMatrixPosition(h.matrixWorld),e.position.applyMatrix4(d),r++}else if(h.isHemisphereLight){const e=i.hemi[u];e.direction.setFromMatrixPosition(h.matrixWorld),e.direction.transformDirection(d),u++}}},state:i}}function qa(e,t){const n=new Qa(e,t),r=[],i=[];return{init:function(){r.length=0,i.length=0},state:{lightsArray:r,shadowsArray:i,lights:n},setupLights:function(e){n.setup(r,e)},setupLightsView:function(e){n.setupView(r,e)},pushLight:function(e){r.push(e)},pushShadow:function(e){i.push(e)}}}function Ga(e,t){let n=new WeakMap;return{get:function(r,i=0){let o;return!1===n.has(r)?(o=new qa(e,t),n.set(r,[o])):i>=n.get(r).length?(o=new qa(e,t),n.get(r).push(o)):o=n.get(r)[i],o},dispose:function(){n=new WeakMap}}}class Ha extends _i{constructor(e){super(),this.type="MeshDepthMaterial",this.depthPacking=jt,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}Ha.prototype.isMeshDepthMaterial=!0;class Va extends _i{constructor(e){super(),this.type="MeshDistanceMaterial",this.referencePosition=new sr,this.nearDistance=1,this.farDistance=1e3,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}Va.prototype.isMeshDistanceMaterial=!0;function Wa(e,t,n){let r=new Eo;const i=new Cn,o=new Cn,s=new Jn,a=new Ha({depthPacking:Nt}),l=new Va,c={},u=n.maxTextureSize,h={0:m,1:f,2:g},b=new fo({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Cn},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),v=b.clone();v.defines.HORIZONTAL_PASS=1;const S=new Qi;S.setAttribute("position",new Oi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const _=new ao(S,b),x=this;function w(n,r){const i=t.update(_);b.defines.VSM_SAMPLES!==n.blurSamples&&(b.defines.VSM_SAMPLES=n.blurSamples,v.defines.VSM_SAMPLES=n.blurSamples,b.needsUpdate=!0,v.needsUpdate=!0),b.uniforms.shadow_pass.value=n.map.texture,b.uniforms.resolution.value=n.mapSize,b.uniforms.radius.value=n.radius,e.setRenderTarget(n.mapPass),e.clear(),e.renderBufferDirect(r,null,i,b,_,null),v.uniforms.shadow_pass.value=n.mapPass.texture,v.uniforms.resolution.value=n.mapSize,v.uniforms.radius.value=n.radius,e.setRenderTarget(n.map),e.clear(),e.renderBufferDirect(r,null,i,v,_,null)}function k(t,n,r,i,o,s){let u=null;const d=!0===r.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(u=void 0!==d?d:!0===r.isPointLight?l:a,e.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length||n.displacementMap&&0!==n.displacementScale||n.alphaMap&&n.alphaTest>0){const e=u.uuid,t=n.uuid;let r=c[e];void 0===r&&(r={},c[e]=r);let i=r[t];void 0===i&&(i=u.clone(),r[t]=i),u=i}return u.visible=n.visible,u.wireframe=n.wireframe,u.side=s===p?null!==n.shadowSide?n.shadowSide:n.side:null!==n.shadowSide?n.shadowSide:h[n.side],u.alphaMap=n.alphaMap,u.alphaTest=n.alphaTest,u.clipShadows=n.clipShadows,u.clippingPlanes=n.clippingPlanes,u.clipIntersection=n.clipIntersection,u.displacementMap=n.displacementMap,u.displacementScale=n.displacementScale,u.displacementBias=n.displacementBias,u.wireframeLinewidth=n.wireframeLinewidth,u.linewidth=n.linewidth,!0===r.isPointLight&&!0===u.isMeshDistanceMaterial&&(u.referencePosition.setFromMatrixPosition(r.matrixWorld),u.nearDistance=i,u.farDistance=o),u}function O(n,i,o,s,a){if(!1===n.visible)return;if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&a===p)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);const r=t.update(n),i=n.material;if(Array.isArray(i)){const t=r.groups;for(let l=0,c=t.length;l<c;l++){const c=t[l],u=i[c.materialIndex];if(u&&u.visible){const t=k(n,u,s,o.near,o.far,a);e.renderBufferDirect(o,null,r,t,n,c)}}}else if(i.visible){const t=k(n,i,s,o.near,o.far,a);e.renderBufferDirect(o,null,r,t,n,null)}}const l=n.children;for(let e=0,t=l.length;e<t;e++)O(l[e],i,o,s,a)}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=d,this.render=function(t,n,a){if(!1===x.enabled)return;if(!1===x.autoUpdate&&!1===x.needsUpdate)return;if(0===t.length)return;const l=e.getRenderTarget(),c=e.getActiveCubeFace(),d=e.getActiveMipmapLevel(),h=e.state;h.setBlending(y),h.buffers.color.setClear(1,1,1,1),h.buffers.depth.setTest(!0),h.setScissorTest(!1);for(let l=0,c=t.length;l<c;l++){const c=t[l],d=c.shadow;if(void 0===d){console.warn("THREE.WebGLShadowMap:",c,"has no shadow.");continue}if(!1===d.autoUpdate&&!1===d.needsUpdate)continue;i.copy(d.mapSize);const f=d.getFrameExtents();if(i.multiply(f),o.copy(d.mapSize),(i.x>u||i.y>u)&&(i.x>u&&(o.x=Math.floor(u/f.x),i.x=o.x*f.x,d.mapSize.x=o.x),i.y>u&&(o.y=Math.floor(u/f.y),i.y=o.y*f.y,d.mapSize.y=o.y)),null!==d.map||d.isPointLightShadow||this.type!==p||(d.map=new Kn(i.x,i.y),d.map.texture.name=c.name+".shadowMap",d.mapPass=new Kn(i.x,i.y),d.camera.updateProjectionMatrix()),null===d.map){const e={minFilter:pe,magFilter:pe,format:De};d.map=new Kn(i.x,i.y,e),d.map.texture.name=c.name+".shadowMap",d.camera.updateProjectionMatrix()}e.setRenderTarget(d.map),e.clear();const m=d.getViewportCount();for(let e=0;e<m;e++){const t=d.getViewport(e);s.set(o.x*t.x,o.y*t.y,o.x*t.z,o.y*t.w),h.viewport(s),d.updateMatrices(c,e),r=d.getFrustum(),O(n,a,d.camera,c,this.type)}d.isPointLightShadow||this.type!==p||w(d,a),d.needsUpdate=!1}x.needsUpdate=!1,e.setRenderTarget(l,c,d)}}function Xa(e,t,n){const r=n.isWebGL2;const i=new function(){let t=!1;const n=new Jn;let r=null;const i=new Jn(0,0,0,0);return{setMask:function(n){r===n||t||(e.colorMask(n,n,n,n),r=n)},setLocked:function(e){t=e},setClear:function(t,r,o,s,a){!0===a&&(t*=s,r*=s,o*=s),n.set(t,r,o,s),!1===i.equals(n)&&(e.clearColor(t,r,o,s),i.copy(n))},reset:function(){t=!1,r=null,i.set(-1,0,0,0)}}},o=new function(){let t=!1,n=null,r=null,i=null;return{setTest:function(e){e?ye(2929):Se(2929)},setMask:function(r){n===r||t||(e.depthMask(r),n=r)},setFunc:function(t){if(r!==t){if(t)switch(t){case F:e.depthFunc(512);break;case U:e.depthFunc(519);break;case Q:e.depthFunc(513);break;case q:e.depthFunc(515);break;case G:e.depthFunc(514);break;case H:e.depthFunc(518);break;case V:e.depthFunc(516);break;case W:e.depthFunc(517);break;default:e.depthFunc(515)}else e.depthFunc(515);r=t}},setLocked:function(e){t=e},setClear:function(t){i!==t&&(e.clearDepth(t),i=t)},reset:function(){t=!1,n=null,r=null,i=null}}},c=new function(){let t=!1,n=null,r=null,i=null,o=null,s=null,a=null,l=null,c=null;return{setTest:function(e){t||(e?ye(2960):Se(2960))},setMask:function(r){n===r||t||(e.stencilMask(r),n=r)},setFunc:function(t,n,s){r===t&&i===n&&o===s||(e.stencilFunc(t,n,s),r=t,i=n,o=s)},setOp:function(t,n,r){s===t&&a===n&&l===r||(e.stencilOp(t,n,r),s=t,a=n,l=r)},setLocked:function(e){t=e},setClear:function(t){c!==t&&(e.clearStencil(t),c=t)},reset:function(){t=!1,n=null,r=null,i=null,o=null,s=null,a=null,l=null,c=null}}};let u={},d={},h=new WeakMap,p=[],f=null,b=!1,v=null,X=null,Y=null,Z=null,J=null,K=null,ee=null,te=!1,ne=null,re=null,ie=null,oe=null,se=null;const ae=e.getParameter(35661);let le=!1,ce=0;const ue=e.getParameter(7938);-1!==ue.indexOf("WebGL")?(ce=parseFloat(/^WebGL (\d)/.exec(ue)[1]),le=ce>=1):-1!==ue.indexOf("OpenGL ES")&&(ce=parseFloat(/^OpenGL ES (\d)/.exec(ue)[1]),le=ce>=2);let de=null,he={};const pe=e.getParameter(3088),fe=e.getParameter(2978),me=(new Jn).fromArray(pe),ge=(new Jn).fromArray(fe);function be(t,n,r){const i=new Uint8Array(4),o=e.createTexture();e.bindTexture(t,o),e.texParameteri(t,10241,9728),e.texParameteri(t,10240,9728);for(let t=0;t<r;t++)e.texImage2D(n+t,0,6408,1,1,0,6408,5121,i);return o}const ve={};function ye(t){!0!==u[t]&&(e.enable(t),u[t]=!0)}function Se(t){!1!==u[t]&&(e.disable(t),u[t]=!1)}ve[3553]=be(3553,3553,1),ve[34067]=be(34067,34069,6),i.setClear(0,0,0,1),o.setClear(1),c.setClear(0),ye(2929),o.setFunc(q),ke(!1),Oe(a),ye(2884),we(y);const _e={[O]:32774,[E]:32778,[A]:32779};if(r)_e[T]=32775,_e[C]=32776;else{const e=t.get("EXT_blend_minmax");null!==e&&(_e[T]=e.MIN_EXT,_e[C]=e.MAX_EXT)}const xe={[M]:0,[$]:1,[P]:768,[j]:770,[z]:776,[L]:774,[D]:772,[R]:769,[N]:771,[B]:775,[I]:773};function we(t,n,r,i,o,s,a,l){if(t!==y){if(!1===b&&(ye(3042),b=!0),t===k)o=o||n,s=s||r,a=a||i,n===X&&o===J||(e.blendEquationSeparate(_e[n],_e[o]),X=n,J=o),r===Y&&i===Z&&s===K&&a===ee||(e.blendFuncSeparate(xe[r],xe[i],xe[s],xe[a]),Y=r,Z=i,K=s,ee=a),v=t,te=null;else if(t!==v||l!==te){if(X===O&&J===O||(e.blendEquation(32774),X=O,J=O),l)switch(t){case S:e.blendFuncSeparate(1,771,1,771);break;case _:e.blendFunc(1,1);break;case x:e.blendFuncSeparate(0,769,0,1);break;case w:e.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}else switch(t){case S:e.blendFuncSeparate(770,771,1,771);break;case _:e.blendFunc(770,1);break;case x:e.blendFuncSeparate(0,769,0,1);break;case w:e.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}Y=null,Z=null,K=null,ee=null,v=t,te=l}}else!0===b&&(Se(3042),b=!1)}function ke(t){ne!==t&&(t?e.frontFace(2304):e.frontFace(2305),ne=t)}function Oe(t){t!==s?(ye(2884),t!==re&&(t===a?e.cullFace(1029):t===l?e.cullFace(1028):e.cullFace(1032))):Se(2884),re=t}function Ee(t,n,r){t?(ye(32823),oe===n&&se===r||(e.polygonOffset(n,r),oe=n,se=r)):Se(32823)}function Ae(t){void 0===t&&(t=33984+ae-1),de!==t&&(e.activeTexture(t),de=t)}return{buffers:{color:i,depth:o,stencil:c},enable:ye,disable:Se,bindFramebuffer:function(t,n){return d[t]!==n&&(e.bindFramebuffer(t,n),d[t]=n,r&&(36009===t&&(d[36160]=n),36160===t&&(d[36009]=n)),!0)},drawBuffers:function(r,i){let o=p,s=!1;if(r)if(o=h.get(i),void 0===o&&(o=[],h.set(i,o)),r.isWebGLMultipleRenderTargets){const e=r.texture;if(o.length!==e.length||36064!==o[0]){for(let t=0,n=e.length;t<n;t++)o[t]=36064+t;o.length=e.length,s=!0}}else 36064!==o[0]&&(o[0]=36064,s=!0);else 1029!==o[0]&&(o[0]=1029,s=!0);s&&(n.isWebGL2?e.drawBuffers(o):t.get("WEBGL_draw_buffers").drawBuffersWEBGL(o))},useProgram:function(t){return f!==t&&(e.useProgram(t),f=t,!0)},setBlending:we,setMaterial:function(e,t){e.side===g?Se(2884):ye(2884);let n=e.side===m;t&&(n=!n),ke(n),e.blending===S&&!1===e.transparent?we(y):we(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha),o.setFunc(e.depthFunc),o.setTest(e.depthTest),o.setMask(e.depthWrite),i.setMask(e.colorWrite);const r=e.stencilWrite;c.setTest(r),r&&(c.setMask(e.stencilWriteMask),c.setFunc(e.stencilFunc,e.stencilRef,e.stencilFuncMask),c.setOp(e.stencilFail,e.stencilZFail,e.stencilZPass)),Ee(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits),!0===e.alphaToCoverage?ye(32926):Se(32926)},setFlipSided:ke,setCullFace:Oe,setLineWidth:function(t){t!==ie&&(le&&e.lineWidth(t),ie=t)},setPolygonOffset:Ee,setScissorTest:function(e){e?ye(3089):Se(3089)},activeTexture:Ae,bindTexture:function(t,n){null===de&&Ae();let r=he[de];void 0===r&&(r={type:void 0,texture:void 0},he[de]=r),r.type===t&&r.texture===n||(e.bindTexture(t,n||ve[t]),r.type=t,r.texture=n)},unbindTexture:function(){const t=he[de];void 0!==t&&void 0!==t.type&&(e.bindTexture(t.type,null),t.type=void 0,t.texture=void 0)},compressedTexImage2D:function(){try{e.compressedTexImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texImage2D:function(){try{e.texImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texImage3D:function(){try{e.texImage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texStorage2D:function(){try{e.texStorage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texStorage3D:function(){try{e.texStorage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texSubImage2D:function(){try{e.texSubImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texSubImage3D:function(){try{e.texSubImage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},compressedTexSubImage2D:function(){try{e.compressedTexSubImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},scissor:function(t){!1===me.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),me.copy(t))},viewport:function(t){!1===ge.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),ge.copy(t))},reset:function(){e.disable(3042),e.disable(2884),e.disable(2929),e.disable(32823),e.disable(3089),e.disable(2960),e.disable(32926),e.blendEquation(32774),e.blendFunc(1,0),e.blendFuncSeparate(1,0,1,0),e.colorMask(!0,!0,!0,!0),e.clearColor(0,0,0,0),e.depthMask(!0),e.depthFunc(513),e.clearDepth(1),e.stencilMask(4294967295),e.stencilFunc(519,0,4294967295),e.stencilOp(7680,7680,7680),e.clearStencil(0),e.cullFace(1029),e.frontFace(2305),e.polygonOffset(0,0),e.activeTexture(33984),e.bindFramebuffer(36160,null),!0===r&&(e.bindFramebuffer(36009,null),e.bindFramebuffer(36008,null)),e.useProgram(null),e.lineWidth(1),e.scissor(0,0,e.canvas.width,e.canvas.height),e.viewport(0,0,e.canvas.width,e.canvas.height),u={},de=null,he={},d={},h=new WeakMap,p=[],f=null,b=!1,v=null,X=null,Y=null,Z=null,J=null,K=null,ee=null,te=!1,ne=null,re=null,ie=null,oe=null,se=null,me.set(0,0,e.canvas.width,e.canvas.height),ge.set(0,0,e.canvas.width,e.canvas.height),i.reset(),o.reset(),c.reset()}}}function Ya(e,t,n,r,i,o,s){const a=i.isWebGL2,l=i.maxTextures,c=i.maxCubemapSize,u=i.maxTextureSize,d=i.maxSamples,h=t.has("WEBGL_multisampled_render_to_texture")?t.get("WEBGL_multisampled_render_to_texture"):null,p=/OculusBrowser/g.test(navigator.userAgent),f=new WeakMap;let m;const g=new WeakMap;let b=!1;try{b="undefined"!=typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(e){}function v(e,t){return b?new OffscreenCanvas(e,t):jn("canvas")}function y(e,t,n,r){let i=1;if((e.width>r||e.height>r)&&(i=r/Math.max(e.width,e.height)),i<1||!0===t){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const r=t?An:Math.floor,o=r(i*e.width),s=r(i*e.height);void 0===m&&(m=v(o,s));const a=n?v(o,s):m;a.width=o,a.height=s;return a.getContext("2d").drawImage(e,0,0,o,s),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+o+"x"+s+")."),a}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function S(e){return On(e.width)&&On(e.height)}function _(e,t){return e.generateMipmaps&&t&&e.minFilter!==pe&&e.minFilter!==ve}function x(t){e.generateMipmap(t)}function w(n,r,i,o,s=!1){if(!1===a)return r;if(null!==n){if(void 0!==e[n])return e[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let l=r;return 6403===r&&(5126===i&&(l=33326),5131===i&&(l=33325),5121===i&&(l=33321)),33319===r&&(5126===i&&(l=33328),5131===i&&(l=33327),5121===i&&(l=33323)),6408===r&&(5126===i&&(l=34836),5131===i&&(l=34842),5121===i&&(l=o===Rt&&!1===s?35907:32856),32819===i&&(l=32854),32820===i&&(l=32855)),33325!==l&&33326!==l&&33327!==l&&33328!==l&&34842!==l&&34836!==l||t.get("EXT_color_buffer_float"),l}function k(e,t,n){return!0===_(e,n)||e.isFramebufferTexture&&e.minFilter!==pe&&e.minFilter!==ve?Math.log2(Math.max(t.width,t.height))+1:void 0!==e.mipmaps&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function O(e){return e===pe||e===fe||e===ge?9728:9729}function E(e){const t=e.target;t.removeEventListener("dispose",E),function(e){const t=r.get(e);if(void 0===t.__webglInit)return;const n=e.source,i=g.get(n);if(i){const r=i[t.__cacheKey];r.usedTimes--,0===r.usedTimes&&T(e),0===Object.keys(i).length&&g.delete(n)}r.remove(e)}(t),t.isVideoTexture&&f.delete(t)}function A(t){const n=t.target;n.removeEventListener("dispose",A),function(t){const n=t.texture,i=r.get(t),o=r.get(n);void 0!==o.__webglTexture&&(e.deleteTexture(o.__webglTexture),s.memory.textures--);t.depthTexture&&t.depthTexture.dispose();if(t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++)e.deleteFramebuffer(i.__webglFramebuffer[t]),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer[t]);else e.deleteFramebuffer(i.__webglFramebuffer),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer),i.__webglMultisampledFramebuffer&&e.deleteFramebuffer(i.__webglMultisampledFramebuffer),i.__webglColorRenderbuffer&&e.deleteRenderbuffer(i.__webglColorRenderbuffer),i.__webglDepthRenderbuffer&&e.deleteRenderbuffer(i.__webglDepthRenderbuffer);if(t.isWebGLMultipleRenderTargets)for(let t=0,i=n.length;t<i;t++){const i=r.get(n[t]);i.__webglTexture&&(e.deleteTexture(i.__webglTexture),s.memory.textures--),r.remove(n[t])}r.remove(n),r.remove(t)}(n)}function T(t){const n=r.get(t);e.deleteTexture(n.__webglTexture);const i=t.source;delete g.get(i)[n.__cacheKey],s.memory.textures--}let C=0;function M(e,t){const i=r.get(e);if(e.isVideoTexture&&function(e){const t=s.render.frame;f.get(e)!==t&&(f.set(e,t),e.update())}(e),!1===e.isRenderTargetTexture&&e.version>0&&i.__version!==e.version){const n=e.image;if(null===n)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==n.complete)return void N(i,e,t);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.activeTexture(33984+t),n.bindTexture(3553,i.__webglTexture)}const $={[ue]:10497,[de]:33071,[he]:33648},P={[pe]:9728,[fe]:9984,[ge]:9986,[ve]:9729,[ye]:9985,[_e]:9987};function R(n,o,s){if(s?(e.texParameteri(n,10242,$[o.wrapS]),e.texParameteri(n,10243,$[o.wrapT]),32879!==n&&35866!==n||e.texParameteri(n,32882,$[o.wrapR]),e.texParameteri(n,10240,P[o.magFilter]),e.texParameteri(n,10241,P[o.minFilter])):(e.texParameteri(n,10242,33071),e.texParameteri(n,10243,33071),32879!==n&&35866!==n||e.texParameteri(n,32882,33071),o.wrapS===de&&o.wrapT===de||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(n,10240,O(o.magFilter)),e.texParameteri(n,10241,O(o.minFilter)),o.minFilter!==pe&&o.minFilter!==ve&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!0===t.has("EXT_texture_filter_anisotropic")){const s=t.get("EXT_texture_filter_anisotropic");if(o.type===Ce&&!1===t.has("OES_texture_float_linear"))return;if(!1===a&&o.type===Me&&!1===t.has("OES_texture_half_float_linear"))return;(o.anisotropy>1||r.get(o).__currentAnisotropy)&&(e.texParameterf(n,s.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(o.anisotropy,i.getMaxAnisotropy())),r.get(o).__currentAnisotropy=o.anisotropy)}}function j(t,n){let r=!1;void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",E));const i=n.source;let o=g.get(i);void 0===o&&(o={},g.set(i,o));const a=function(e){const t=[];return t.push(e.wrapS),t.push(e.wrapT),t.push(e.magFilter),t.push(e.minFilter),t.push(e.anisotropy),t.push(e.internalFormat),t.push(e.format),t.push(e.type),t.push(e.generateMipmaps),t.push(e.premultiplyAlpha),t.push(e.flipY),t.push(e.unpackAlignment),t.push(e.encoding),t.join()}(n);if(a!==t.__cacheKey){void 0===o[a]&&(o[a]={texture:e.createTexture(),usedTimes:0},s.memory.textures++,r=!0),o[a].usedTimes++;const i=o[t.__cacheKey];void 0!==i&&(o[t.__cacheKey].usedTimes--,0===i.usedTimes&&T(n)),t.__cacheKey=a,t.__webglTexture=o[a].texture}return r}function N(t,r,i){let s=3553;r.isDataArrayTexture&&(s=35866),r.isData3DTexture&&(s=32879);const l=j(t,r),c=r.source;if(n.activeTexture(33984+i),n.bindTexture(s,t.__webglTexture),c.version!==c.__currentVersion||!0===l){e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment),e.pixelStorei(37443,0);const i=function(e){return!a&&(e.wrapS!==de||e.wrapT!==de||e.minFilter!==pe&&e.minFilter!==ve)}(r)&&!1===S(r.image);let d=y(r.image,i,!1,u);d=F(r,d);const h=S(d)||a,p=o.convert(r.format,r.encoding);let f,m=o.convert(r.type),g=w(r.internalFormat,p,m,r.encoding,r.isVideoTexture);R(s,r,h);const b=r.mipmaps,v=a&&!0!==r.isVideoTexture,O=void 0===t.__version||!0===l,E=k(r,d,h);if(r.isDepthTexture)g=6402,a?g=r.type===Ce?36012:r.type===Te?33190:r.type===Re?35056:33189:r.type===Ce&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),r.format===Be&&6402===g&&r.type!==Ee&&r.type!==Te&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=Ee,m=o.convert(r.type)),r.format===ze&&6402===g&&(g=34041,r.type!==Re&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=Re,m=o.convert(r.type))),O&&(v?n.texStorage2D(3553,1,g,d.width,d.height):n.texImage2D(3553,0,g,d.width,d.height,0,p,m,null));else if(r.isDataTexture)if(b.length>0&&h){v&&O&&n.texStorage2D(3553,E,g,b[0].width,b[0].height);for(let e=0,t=b.length;e<t;e++)f=b[e],v?n.texSubImage2D(3553,e,0,0,f.width,f.height,p,m,f.data):n.texImage2D(3553,e,g,f.width,f.height,0,p,m,f.data);r.generateMipmaps=!1}else v?(O&&n.texStorage2D(3553,E,g,d.width,d.height),n.texSubImage2D(3553,0,0,0,d.width,d.height,p,m,d.data)):n.texImage2D(3553,0,g,d.width,d.height,0,p,m,d.data);else if(r.isCompressedTexture){v&&O&&n.texStorage2D(3553,E,g,b[0].width,b[0].height);for(let e=0,t=b.length;e<t;e++)f=b[e],r.format!==De?null!==p?v?n.compressedTexSubImage2D(3553,e,0,0,f.width,f.height,p,f.data):n.compressedTexImage2D(3553,e,g,f.width,f.height,0,f.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):v?n.texSubImage2D(3553,e,0,0,f.width,f.height,p,m,f.data):n.texImage2D(3553,e,g,f.width,f.height,0,p,m,f.data)}else if(r.isDataArrayTexture)v?(O&&n.texStorage3D(35866,E,g,d.width,d.height,d.depth),n.texSubImage3D(35866,0,0,0,0,d.width,d.height,d.depth,p,m,d.data)):n.texImage3D(35866,0,g,d.width,d.height,d.depth,0,p,m,d.data);else if(r.isData3DTexture)v?(O&&n.texStorage3D(32879,E,g,d.width,d.height,d.depth),n.texSubImage3D(32879,0,0,0,0,d.width,d.height,d.depth,p,m,d.data)):n.texImage3D(32879,0,g,d.width,d.height,d.depth,0,p,m,d.data);else if(r.isFramebufferTexture){if(O)if(v)n.texStorage2D(3553,E,g,d.width,d.height);else{let e=d.width,t=d.height;for(let r=0;r<E;r++)n.texImage2D(3553,r,g,e,t,0,p,m,null),e>>=1,t>>=1}}else if(b.length>0&&h){v&&O&&n.texStorage2D(3553,E,g,b[0].width,b[0].height);for(let e=0,t=b.length;e<t;e++)f=b[e],v?n.texSubImage2D(3553,e,0,0,p,m,f):n.texImage2D(3553,e,g,p,m,f);r.generateMipmaps=!1}else v?(O&&n.texStorage2D(3553,E,g,d.width,d.height),n.texSubImage2D(3553,0,0,0,p,m,d)):n.texImage2D(3553,0,g,p,m,d);_(r,h)&&x(s),c.__currentVersion=c.version,r.onUpdate&&r.onUpdate(r)}t.__version=r.version}function D(t,i,s,a,l){const c=o.convert(s.format,s.encoding),u=o.convert(s.type),d=w(s.internalFormat,c,u,s.encoding);r.get(i).__hasExternalTextures||(32879===l||35866===l?n.texImage3D(l,0,d,i.width,i.height,i.depth,0,c,u,null):n.texImage2D(l,0,d,i.width,i.height,0,c,u,null)),n.bindFramebuffer(36160,t),z(i)?h.framebufferTexture2DMultisampleEXT(36160,a,l,r.get(s).__webglTexture,0,B(i)):e.framebufferTexture2D(36160,a,l,r.get(s).__webglTexture,0),n.bindFramebuffer(36160,null)}function I(t,n,r){if(e.bindRenderbuffer(36161,t),n.depthBuffer&&!n.stencilBuffer){let i=33189;if(r||z(n)){const t=n.depthTexture;t&&t.isDepthTexture&&(t.type===Ce?i=36012:t.type===Te&&(i=33190));const r=B(n);z(n)?h.renderbufferStorageMultisampleEXT(36161,r,i,n.width,n.height):e.renderbufferStorageMultisample(36161,r,i,n.width,n.height)}else e.renderbufferStorage(36161,i,n.width,n.height);e.framebufferRenderbuffer(36160,36096,36161,t)}else if(n.depthBuffer&&n.stencilBuffer){const i=B(n);r&&!1===z(n)?e.renderbufferStorageMultisample(36161,i,35056,n.width,n.height):z(n)?h.renderbufferStorageMultisampleEXT(36161,i,35056,n.width,n.height):e.renderbufferStorage(36161,34041,n.width,n.height),e.framebufferRenderbuffer(36160,33306,36161,t)}else{const t=!0===n.isWebGLMultipleRenderTargets?n.texture[0]:n.texture,i=o.convert(t.format,t.encoding),s=o.convert(t.type),a=w(t.internalFormat,i,s,t.encoding),l=B(n);r&&!1===z(n)?e.renderbufferStorageMultisample(36161,l,a,n.width,n.height):z(n)?h.renderbufferStorageMultisampleEXT(36161,l,a,n.width,n.height):e.renderbufferStorage(36161,a,n.width,n.height)}e.bindRenderbuffer(36161,null)}function L(t){const i=r.get(t),o=!0===t.isWebGLCubeRenderTarget;if(t.depthTexture&&!i.__autoAllocateDepthBuffer){if(o)throw new Error("target.depthTexture not supported in Cube render targets");!function(t,i){if(i&&i.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(36160,t),!i.depthTexture||!i.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(i.depthTexture).__webglTexture&&i.depthTexture.image.width===i.width&&i.depthTexture.image.height===i.height||(i.depthTexture.image.width=i.width,i.depthTexture.image.height=i.height,i.depthTexture.needsUpdate=!0),M(i.depthTexture,0);const o=r.get(i.depthTexture).__webglTexture,s=B(i);if(i.depthTexture.format===Be)z(i)?h.framebufferTexture2DMultisampleEXT(36160,36096,3553,o,0,s):e.framebufferTexture2D(36160,36096,3553,o,0);else{if(i.depthTexture.format!==ze)throw new Error("Unknown depthTexture format");z(i)?h.framebufferTexture2DMultisampleEXT(36160,33306,3553,o,0,s):e.framebufferTexture2D(36160,33306,3553,o,0)}}(i.__webglFramebuffer,t)}else if(o){i.__webglDepthbuffer=[];for(let r=0;r<6;r++)n.bindFramebuffer(36160,i.__webglFramebuffer[r]),i.__webglDepthbuffer[r]=e.createRenderbuffer(),I(i.__webglDepthbuffer[r],t,!1)}else n.bindFramebuffer(36160,i.__webglFramebuffer),i.__webglDepthbuffer=e.createRenderbuffer(),I(i.__webglDepthbuffer,t,!1);n.bindFramebuffer(36160,null)}function B(e){return Math.min(d,e.samples)}function z(e){const n=r.get(e);return a&&e.samples>0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==n.__useRenderToTexture}function F(e,n){const r=e.encoding,i=e.format,o=e.type;return!0===e.isCompressedTexture||!0===e.isVideoTexture||e.format===mn||r!==Pt&&(r===Rt?!1===a?!0===t.has("EXT_sRGB")&&i===De?(e.format=mn,e.minFilter=ve,e.generateMipmaps=!1):n=Vn.sRGBToLinear(n):i===De&&o===we||console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",r)),n}this.allocateTextureUnit=function(){const e=C;return e>=l&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+l),C+=1,e},this.resetTextureUnits=function(){C=0},this.setTexture2D=M,this.setTexture2DArray=function(e,t){const i=r.get(e);e.version>0&&i.__version!==e.version?N(i,e,t):(n.activeTexture(33984+t),n.bindTexture(35866,i.__webglTexture))},this.setTexture3D=function(e,t){const i=r.get(e);e.version>0&&i.__version!==e.version?N(i,e,t):(n.activeTexture(33984+t),n.bindTexture(32879,i.__webglTexture))},this.setTextureCube=function(t,i){const s=r.get(t);t.version>0&&s.__version!==t.version?function(t,r,i){if(6!==r.image.length)return;const s=j(t,r),l=r.source;if(n.activeTexture(33984+i),n.bindTexture(34067,t.__webglTexture),l.version!==l.__currentVersion||!0===s){e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment),e.pixelStorei(37443,0);const i=r.isCompressedTexture||r.image[0].isCompressedTexture,s=r.image[0]&&r.image[0].isDataTexture,u=[];for(let e=0;e<6;e++)u[e]=i||s?s?r.image[e].image:r.image[e]:y(r.image[e],!1,!0,c),u[e]=F(r,u[e]);const d=u[0],h=S(d)||a,p=o.convert(r.format,r.encoding),f=o.convert(r.type),m=w(r.internalFormat,p,f,r.encoding),g=a&&!0!==r.isVideoTexture,b=void 0===t.__version;let v,O=k(r,d,h);if(R(34067,r,h),i){g&&b&&n.texStorage2D(34067,O,m,d.width,d.height);for(let e=0;e<6;e++){v=u[e].mipmaps;for(let t=0;t<v.length;t++){const i=v[t];r.format!==De?null!==p?g?n.compressedTexSubImage2D(34069+e,t,0,0,i.width,i.height,p,i.data):n.compressedTexImage2D(34069+e,t,m,i.width,i.height,0,i.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):g?n.texSubImage2D(34069+e,t,0,0,i.width,i.height,p,f,i.data):n.texImage2D(34069+e,t,m,i.width,i.height,0,p,f,i.data)}}}else{v=r.mipmaps,g&&b&&(v.length>0&&O++,n.texStorage2D(34067,O,m,u[0].width,u[0].height));for(let e=0;e<6;e++)if(s){g?n.texSubImage2D(34069+e,0,0,0,u[e].width,u[e].height,p,f,u[e].data):n.texImage2D(34069+e,0,m,u[e].width,u[e].height,0,p,f,u[e].data);for(let t=0;t<v.length;t++){const r=v[t].image[e].image;g?n.texSubImage2D(34069+e,t+1,0,0,r.width,r.height,p,f,r.data):n.texImage2D(34069+e,t+1,m,r.width,r.height,0,p,f,r.data)}}else{g?n.texSubImage2D(34069+e,0,0,0,p,f,u[e]):n.texImage2D(34069+e,0,m,p,f,u[e]);for(let t=0;t<v.length;t++){const r=v[t];g?n.texSubImage2D(34069+e,t+1,0,0,p,f,r.image[e]):n.texImage2D(34069+e,t+1,m,p,f,r.image[e])}}}_(r,h)&&x(34067),l.__currentVersion=l.version,r.onUpdate&&r.onUpdate(r)}t.__version=r.version}(s,t,i):(n.activeTexture(33984+i),n.bindTexture(34067,s.__webglTexture))},this.rebindTextures=function(e,t,n){const i=r.get(e);void 0!==t&&D(i.__webglFramebuffer,e,e.texture,36064,3553),void 0!==n&&L(e)},this.setupRenderTarget=function(t){const l=t.texture,c=r.get(t),u=r.get(l);t.addEventListener("dispose",A),!0!==t.isWebGLMultipleRenderTargets&&(void 0===u.__webglTexture&&(u.__webglTexture=e.createTexture()),u.__version=l.version,s.memory.textures++);const d=!0===t.isWebGLCubeRenderTarget,h=!0===t.isWebGLMultipleRenderTargets,p=S(t)||a;if(d){c.__webglFramebuffer=[];for(let t=0;t<6;t++)c.__webglFramebuffer[t]=e.createFramebuffer()}else if(c.__webglFramebuffer=e.createFramebuffer(),h)if(i.drawBuffers){const n=t.texture;for(let t=0,i=n.length;t<i;t++){const i=r.get(n[t]);void 0===i.__webglTexture&&(i.__webglTexture=e.createTexture(),s.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");else if(a&&t.samples>0&&!1===z(t)){c.__webglMultisampledFramebuffer=e.createFramebuffer(),c.__webglColorRenderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,c.__webglColorRenderbuffer);const r=o.convert(l.format,l.encoding),i=o.convert(l.type),s=w(l.internalFormat,r,i,l.encoding),a=B(t);e.renderbufferStorageMultisample(36161,a,s,t.width,t.height),n.bindFramebuffer(36160,c.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(36160,36064,36161,c.__webglColorRenderbuffer),e.bindRenderbuffer(36161,null),t.depthBuffer&&(c.__webglDepthRenderbuffer=e.createRenderbuffer(),I(c.__webglDepthRenderbuffer,t,!0)),n.bindFramebuffer(36160,null)}if(d){n.bindTexture(34067,u.__webglTexture),R(34067,l,p);for(let e=0;e<6;e++)D(c.__webglFramebuffer[e],t,l,36064,34069+e);_(l,p)&&x(34067),n.unbindTexture()}else if(h){const e=t.texture;for(let i=0,o=e.length;i<o;i++){const o=e[i],s=r.get(o);n.bindTexture(3553,s.__webglTexture),R(3553,o,p),D(c.__webglFramebuffer,t,o,36064+i,3553),_(o,p)&&x(3553)}n.unbindTexture()}else{let e=3553;(t.isWebGL3DRenderTarget||t.isWebGLArrayRenderTarget)&&(a?e=t.isWebGL3DRenderTarget?32879:35866:console.error("THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.")),n.bindTexture(e,u.__webglTexture),R(e,l,p),D(c.__webglFramebuffer,t,l,36064,e),_(l,p)&&x(e),n.unbindTexture()}t.depthBuffer&&L(t)},this.updateRenderTargetMipmap=function(e){const t=S(e)||a,i=!0===e.isWebGLMultipleRenderTargets?e.texture:[e.texture];for(let o=0,s=i.length;o<s;o++){const s=i[o];if(_(s,t)){const t=e.isWebGLCubeRenderTarget?34067:3553,i=r.get(s).__webglTexture;n.bindTexture(t,i),x(t),n.unbindTexture()}}},this.updateMultisampleRenderTarget=function(t){if(a&&t.samples>0&&!1===z(t)){const i=t.width,o=t.height;let s=16384;const a=[36064],l=t.stencilBuffer?33306:36096;t.depthBuffer&&a.push(l);const c=r.get(t),u=void 0!==c.__ignoreDepthValues&&c.__ignoreDepthValues;!1===u&&(t.depthBuffer&&(s|=256),t.stencilBuffer&&(s|=1024)),n.bindFramebuffer(36008,c.__webglMultisampledFramebuffer),n.bindFramebuffer(36009,c.__webglFramebuffer),!0===u&&(e.invalidateFramebuffer(36008,[l]),e.invalidateFramebuffer(36009,[l])),e.blitFramebuffer(0,0,i,o,0,0,i,o,s,9728),p&&e.invalidateFramebuffer(36008,a),n.bindFramebuffer(36008,null),n.bindFramebuffer(36009,c.__webglMultisampledFramebuffer)}},this.setupDepthRenderbuffer=L,this.setupFrameBufferTexture=D,this.useMultisampledRTT=z}function Za(e,t,n){const r=n.isWebGL2;return{convert:function(n,i=null){let o;if(n===we)return 5121;if(n===$e)return 32819;if(n===Pe)return 32820;if(n===ke)return 5120;if(n===Oe)return 5122;if(n===Ee)return 5123;if(n===Ae)return 5124;if(n===Te)return 5125;if(n===Ce)return 5126;if(n===Me)return r?5131:(o=t.get("OES_texture_half_float"),null!==o?o.HALF_FLOAT_OES:null);if(n===je)return 6406;if(n===De)return 6408;if(n===Ie)return 6409;if(n===Le)return 6410;if(n===Be)return 6402;if(n===ze)return 34041;if(n===Fe)return 6403;if(n===Ne)return console.warn("THREE.WebGLRenderer: THREE.RGBFormat has been removed. Use THREE.RGBAFormat instead. https://github.com/mrdoob/three.js/pull/23228"),6408;if(n===mn)return o=t.get("EXT_sRGB"),null!==o?o.SRGB_ALPHA_EXT:null;if(n===Ue)return 36244;if(n===Qe)return 33319;if(n===qe)return 33320;if(n===Ge)return 36249;if(n===He||n===Ve||n===We||n===Xe)if(i===Rt){if(o=t.get("WEBGL_compressed_texture_s3tc_srgb"),null===o)return null;if(n===He)return o.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===Ve)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===We)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===Xe)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{if(o=t.get("WEBGL_compressed_texture_s3tc"),null===o)return null;if(n===He)return o.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===Ve)return o.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===We)return o.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===Xe)return o.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(n===Ye||n===Ze||n===Je||n===Ke){if(o=t.get("WEBGL_compressed_texture_pvrtc"),null===o)return null;if(n===Ye)return o.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===Ze)return o.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===Je)return o.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===Ke)return o.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===et)return o=t.get("WEBGL_compressed_texture_etc1"),null!==o?o.COMPRESSED_RGB_ETC1_WEBGL:null;if(n===tt||n===nt){if(o=t.get("WEBGL_compressed_texture_etc"),null===o)return null;if(n===tt)return i===Rt?o.COMPRESSED_SRGB8_ETC2:o.COMPRESSED_RGB8_ETC2;if(n===nt)return i===Rt?o.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:o.COMPRESSED_RGBA8_ETC2_EAC}if(n===rt||n===it||n===ot||n===st||n===at||n===lt||n===ct||n===ut||n===dt||n===ht||n===pt||n===ft||n===mt||n===gt){if(o=t.get("WEBGL_compressed_texture_astc"),null===o)return null;if(n===rt)return i===Rt?o.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:o.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===it)return i===Rt?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:o.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===ot)return i===Rt?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:o.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===st)return i===Rt?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:o.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===at)return i===Rt?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:o.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===lt)return i===Rt?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:o.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===ct)return i===Rt?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:o.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===ut)return i===Rt?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:o.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===dt)return i===Rt?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:o.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===ht)return i===Rt?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:o.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===pt)return i===Rt?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:o.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===ft)return i===Rt?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:o.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===mt)return i===Rt?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:o.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===gt)return i===Rt?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:o.COMPRESSED_RGBA_ASTC_12x12_KHR}if(n===bt){if(o=t.get("EXT_texture_compression_bptc"),null===o)return null;if(n===bt)return i===Rt?o.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:o.COMPRESSED_RGBA_BPTC_UNORM_EXT}return n===Re?r?34042:(o=t.get("WEBGL_depth_texture"),null!==o?o.UNSIGNED_INT_24_8_WEBGL:null):void 0!==e[n]?e[n]:null}}}class Ja extends go{constructor(e=[]){super(),this.cameras=e}}Ja.prototype.isArrayCamera=!0;class Ka extends li{constructor(){super(),this.type="Group"}}Ka.prototype.isGroup=!0;const el={type:"move"};class tl{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new Ka,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new Ka,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new sr,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new sr),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new Ka,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new sr,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new sr),this._grip}dispatchEvent(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),null!==this._hand&&this._hand.dispatchEvent(e),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(e,t,n){let r=null,i=null,o=null;const s=this._targetRay,a=this._grip,l=this._hand;if(e&&"visible-blurred"!==t.session.visibilityState)if(null!==s&&(r=t.getPose(e.targetRaySpace,n),null!==r&&(s.matrix.fromArray(r.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),r.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(r.linearVelocity)):s.hasLinearVelocity=!1,r.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(r.angularVelocity)):s.hasAngularVelocity=!1,this.dispatchEvent(el))),l&&e.hand){o=!0;for(const r of e.hand.values()){const e=t.getJointPose(r,n);if(void 0===l.joints[r.jointName]){const e=new Ka;e.matrixAutoUpdate=!1,e.visible=!1,l.joints[r.jointName]=e,l.add(e)}const i=l.joints[r.jointName];null!==e&&(i.matrix.fromArray(e.transform.matrix),i.matrix.decompose(i.position,i.rotation,i.scale),i.jointRadius=e.radius),i.visible=null!==e}const r=l.joints["index-finger-tip"],i=l.joints["thumb-tip"],s=r.position.distanceTo(i.position),a=.02,c=.005;l.inputState.pinching&&s>a+c?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&s<=a-c&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==a&&e.gripSpace&&(i=t.getPose(e.gripSpace,n),null!==i&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1));return null!==s&&(s.visible=null!==r),null!==a&&(a.visible=null!==i),null!==l&&(l.visible=null!==o),this}}class nl extends Zn{constructor(e,t,n,r,i,o,s,a,l,c){if((c=void 0!==c?c:Be)!==Be&&c!==ze)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&c===Be&&(n=Ee),void 0===n&&c===ze&&(n=Re),super(null,r,i,o,s,a,c,n,l),this.image={width:e,height:t},this.magFilter=void 0!==s?s:pe,this.minFilter=void 0!==a?a:pe,this.flipY=!1,this.generateMipmaps=!1}}nl.prototype.isDepthTexture=!0;class rl extends gn{constructor(e,t){super();const n=this;let r=null,i=1,o=null,s="local-floor",a=null,l=null,c=null,u=null,d=null,h=null;const p=t.getContextAttributes();let f=null,m=null;const g=[],b=new Map,v=new go;v.layers.enable(1),v.viewport=new Jn;const y=new go;y.layers.enable(2),y.viewport=new Jn;const S=[v,y],_=new Ja;_.layers.enable(1),_.layers.enable(2);let x=null,w=null;function k(e){const t=b.get(e.inputSource);t&&t.dispatchEvent({type:e.type,data:e.inputSource})}function O(){b.forEach((function(e,t){e.disconnect(t)})),b.clear(),x=null,w=null,e.setRenderTarget(f),d=null,u=null,c=null,r=null,m=null,$.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}function E(e){const t=r.inputSources;for(let e=0;e<t.length;e++){const n="right"===t[e].handedness?1:0;b.set(t[e],g[n])}for(let t=0;t<e.removed.length;t++){const n=e.removed[t],r=b.get(n);r&&(r.dispatchEvent({type:"disconnected",data:n}),b.delete(n))}for(let t=0;t<e.added.length;t++){const n=e.added[t],r=b.get(n);r&&r.dispatchEvent({type:"connected",data:n})}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=g[e];return void 0===t&&(t=new tl,g[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=g[e];return void 0===t&&(t=new tl,g[e]=t),t.getGripSpace()},this.getHand=function(e){let t=g[e];return void 0===t&&(t=new tl,g[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){i=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){s=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return a||o},this.setReferenceSpace=function(e){a=e},this.getBaseLayer=function(){return null!==u?u:d},this.getBinding=function(){return c},this.getFrame=function(){return h},this.getSession=function(){return r},this.setSession=async function(a){if(r=a,null!==r){if(f=e.getRenderTarget(),r.addEventListener("select",k),r.addEventListener("selectstart",k),r.addEventListener("selectend",k),r.addEventListener("squeeze",k),r.addEventListener("squeezestart",k),r.addEventListener("squeezeend",k),r.addEventListener("end",O),r.addEventListener("inputsourceschange",E),!0!==p.xrCompatible&&await t.makeXRCompatible(),void 0===r.renderState.layers||!1===e.capabilities.isWebGL2){const n={antialias:void 0!==r.renderState.layers||p.antialias,alpha:p.alpha,depth:p.depth,stencil:p.stencil,framebufferScaleFactor:i};d=new XRWebGLLayer(r,t,n),r.updateRenderState({baseLayer:d}),m=new Kn(d.framebufferWidth,d.framebufferHeight,{format:De,type:we,encoding:e.outputEncoding})}else{let n=null,o=null,s=null;p.depth&&(s=p.stencil?35056:33190,n=p.stencil?ze:Be,o=p.stencil?Re:Ee);const a={colorFormat:e.outputEncoding===Rt?35907:32856,depthFormat:s,scaleFactor:i};c=new XRWebGLBinding(r,t),u=c.createProjectionLayer(a),r.updateRenderState({layers:[u]}),m=new Kn(u.textureWidth,u.textureHeight,{format:De,type:we,depthTexture:new nl(u.textureWidth,u.textureHeight,o,void 0,void 0,void 0,void 0,void 0,void 0,n),stencilBuffer:p.stencil,encoding:e.outputEncoding,samples:p.antialias?4:0});e.properties.get(m).__ignoreDepthValues=u.ignoreDepthValues}m.isXRRenderTarget=!0,this.setFoveation(1),o=await r.requestReferenceSpace(s),$.setContext(r),$.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}};const A=new sr,T=new sr;function C(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){if(null===r)return;_.near=y.near=v.near=e.near,_.far=y.far=v.far=e.far,x===_.near&&w===_.far||(r.updateRenderState({depthNear:_.near,depthFar:_.far}),x=_.near,w=_.far);const t=e.parent,n=_.cameras;C(_,t);for(let e=0;e<n.length;e++)C(n[e],t);_.matrixWorld.decompose(_.position,_.quaternion,_.scale),e.position.copy(_.position),e.quaternion.copy(_.quaternion),e.scale.copy(_.scale),e.matrix.copy(_.matrix),e.matrixWorld.copy(_.matrixWorld);const i=e.children;for(let e=0,t=i.length;e<t;e++)i[e].updateMatrixWorld(!0);2===n.length?function(e,t,n){A.setFromMatrixPosition(t.matrixWorld),T.setFromMatrixPosition(n.matrixWorld);const r=A.distanceTo(T),i=t.projectionMatrix.elements,o=n.projectionMatrix.elements,s=i[14]/(i[10]-1),a=i[14]/(i[10]+1),l=(i[9]+1)/i[5],c=(i[9]-1)/i[5],u=(i[8]-1)/i[0],d=(o[8]+1)/o[0],h=s*u,p=s*d,f=r/(-u+d),m=f*-u;t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(m),e.translateZ(f),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert();const g=s+f,b=a+f,v=h-m,y=p+(r-m),S=l*a/b*g,_=c*a/b*g;e.projectionMatrix.makePerspective(v,y,S,_,g,b)}(_,v,y):_.projectionMatrix.copy(v.projectionMatrix)},this.getCamera=function(){return _},this.getFoveation=function(){return null!==u?u.fixedFoveation:null!==d?d.fixedFoveation:void 0},this.setFoveation=function(e){null!==u&&(u.fixedFoveation=e),null!==d&&void 0!==d.fixedFoveation&&(d.fixedFoveation=e)};let M=null;const $=new Ao;$.setAnimationLoop((function(t,n){if(l=n.getViewerPose(a||o),h=n,null!==l){const t=l.views;null!==d&&(e.setRenderTargetFramebuffer(m,d.framebuffer),e.setRenderTarget(m));let n=!1;t.length!==_.cameras.length&&(_.cameras.length=0,n=!0);for(let r=0;r<t.length;r++){const i=t[r];let o=null;if(null!==d)o=d.getViewport(i);else{const t=c.getViewSubImage(u,i);o=t.viewport,0===r&&(e.setRenderTargetTextures(m,t.colorTexture,u.ignoreDepthValues?void 0:t.depthStencilTexture),e.setRenderTarget(m))}const s=S[r];s.matrix.fromArray(i.transform.matrix),s.projectionMatrix.fromArray(i.projectionMatrix),s.viewport.set(o.x,o.y,o.width,o.height),0===r&&_.matrix.copy(s.matrix),!0===n&&_.cameras.push(s)}}const i=r.inputSources;for(let e=0;e<g.length;e++){const t=i[e],r=b.get(t);void 0!==r&&r.update(t,n,a||o)}M&&M(t,n),h=null})),this.setAnimationLoop=function(e){M=e},this.dispose=function(){}}}function il(e,t){function n(n,r){n.opacity.value=r.opacity,r.color&&n.diffuse.value.copy(r.color),r.emissive&&n.emissive.value.copy(r.emissive).multiplyScalar(r.emissiveIntensity),r.map&&(n.map.value=r.map),r.alphaMap&&(n.alphaMap.value=r.alphaMap),r.bumpMap&&(n.bumpMap.value=r.bumpMap,n.bumpScale.value=r.bumpScale,r.side===m&&(n.bumpScale.value*=-1)),r.displacementMap&&(n.displacementMap.value=r.displacementMap,n.displacementScale.value=r.displacementScale,n.displacementBias.value=r.displacementBias),r.emissiveMap&&(n.emissiveMap.value=r.emissiveMap),r.normalMap&&(n.normalMap.value=r.normalMap,n.normalScale.value.copy(r.normalScale),r.side===m&&n.normalScale.value.negate()),r.specularMap&&(n.specularMap.value=r.specularMap),r.alphaTest>0&&(n.alphaTest.value=r.alphaTest);const i=t.get(r).envMap;if(i&&(n.envMap.value=i,n.flipEnvMap.value=i.isCubeTexture&&!1===i.isRenderTargetTexture?-1:1,n.reflectivity.value=r.reflectivity,n.ior.value=r.ior,n.refractionRatio.value=r.refractionRatio),r.lightMap){n.lightMap.value=r.lightMap;const t=!0!==e.physicallyCorrectLights?Math.PI:1;n.lightMapIntensity.value=r.lightMapIntensity*t}let o,s;r.aoMap&&(n.aoMap.value=r.aoMap,n.aoMapIntensity.value=r.aoMapIntensity),r.map?o=r.map:r.specularMap?o=r.specularMap:r.displacementMap?o=r.displacementMap:r.normalMap?o=r.normalMap:r.bumpMap?o=r.bumpMap:r.roughnessMap?o=r.roughnessMap:r.metalnessMap?o=r.metalnessMap:r.alphaMap?o=r.alphaMap:r.emissiveMap?o=r.emissiveMap:r.clearcoatMap?o=r.clearcoatMap:r.clearcoatNormalMap?o=r.clearcoatNormalMap:r.clearcoatRoughnessMap?o=r.clearcoatRoughnessMap:r.specularIntensityMap?o=r.specularIntensityMap:r.specularColorMap?o=r.specularColorMap:r.transmissionMap?o=r.transmissionMap:r.thicknessMap?o=r.thicknessMap:r.sheenColorMap?o=r.sheenColorMap:r.sheenRoughnessMap&&(o=r.sheenRoughnessMap),void 0!==o&&(o.isWebGLRenderTarget&&(o=o.texture),!0===o.matrixAutoUpdate&&o.updateMatrix(),n.uvTransform.value.copy(o.matrix)),r.aoMap?s=r.aoMap:r.lightMap&&(s=r.lightMap),void 0!==s&&(s.isWebGLRenderTarget&&(s=s.texture),!0===s.matrixAutoUpdate&&s.updateMatrix(),n.uv2Transform.value.copy(s.matrix))}return{refreshFogUniforms:function(e,t){e.fogColor.value.copy(t.color),t.isFog?(e.fogNear.value=t.near,e.fogFar.value=t.far):t.isFogExp2&&(e.fogDensity.value=t.density)},refreshMaterialUniforms:function(e,r,i,o,s){r.isMeshBasicMaterial||r.isMeshLambertMaterial?n(e,r):r.isMeshToonMaterial?(n(e,r),function(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap)}(e,r)):r.isMeshPhongMaterial?(n(e,r),function(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4)}(e,r)):r.isMeshStandardMaterial?(n(e,r),function(e,n){e.roughness.value=n.roughness,e.metalness.value=n.metalness,n.roughnessMap&&(e.roughnessMap.value=n.roughnessMap);n.metalnessMap&&(e.metalnessMap.value=n.metalnessMap);t.get(n).envMap&&(e.envMapIntensity.value=n.envMapIntensity)}(e,r),r.isMeshPhysicalMaterial&&function(e,t,n){e.ior.value=t.ior,t.sheen>0&&(e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),e.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(e.sheenColorMap.value=t.sheenColorMap),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap));t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap),t.clearcoatNormalMap&&(e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),e.clearcoatNormalMap.value=t.clearcoatNormalMap,t.side===m&&e.clearcoatNormalScale.value.negate()));t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=n.texture,e.transmissionSamplerSize.value.set(n.width,n.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor));e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap);t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap)}(e,r,s)):r.isMeshMatcapMaterial?(n(e,r),function(e,t){t.matcap&&(e.matcap.value=t.matcap)}(e,r)):r.isMeshDepthMaterial?n(e,r):r.isMeshDistanceMaterial?(n(e,r),function(e,t){e.referencePosition.value.copy(t.referencePosition),e.nearDistance.value=t.nearDistance,e.farDistance.value=t.farDistance}(e,r)):r.isMeshNormalMaterial?n(e,r):r.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity}(e,r),r.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,r)):r.isPointsMaterial?function(e,t,n,r){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*n,e.scale.value=.5*r,t.map&&(e.map.value=t.map);t.alphaMap&&(e.alphaMap.value=t.alphaMap);t.alphaTest>0&&(e.alphaTest.value=t.alphaTest);let i;t.map?i=t.map:t.alphaMap&&(i=t.alphaMap);void 0!==i&&(!0===i.matrixAutoUpdate&&i.updateMatrix(),e.uvTransform.value.copy(i.matrix))}(e,r,i,o):r.isSpriteMaterial?function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map);t.alphaMap&&(e.alphaMap.value=t.alphaMap);t.alphaTest>0&&(e.alphaTest.value=t.alphaTest);let n;t.map?n=t.map:t.alphaMap&&(n=t.alphaMap);void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix))}(e,r):r.isShadowMaterial?(e.color.value.copy(r.color),e.opacity.value=r.opacity):r.isShaderMaterial&&(r.uniformsNeedUpdate=!1)}}}function ol(e={}){const t=void 0!==e.canvas?e.canvas:function(){const e=jn("canvas");return e.style.display="block",e}(),n=void 0!==e.context?e.context:null,i=void 0===e.depth||e.depth,o=void 0===e.stencil||e.stencil,s=void 0!==e.antialias&&e.antialias,a=void 0===e.premultipliedAlpha||e.premultipliedAlpha,l=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,c=void 0!==e.powerPreference?e.powerPreference:"default",u=void 0!==e.failIfMajorPerformanceCaveat&&e.failIfMajorPerformanceCaveat;let d;d=null!==n?n.getContextAttributes().alpha:void 0!==e.alpha&&e.alpha;let h=null,p=null;const b=[],v=[];this.domElement=t,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=Pt,this.physicallyCorrectLights=!1,this.toneMapping=J,this.toneMappingExposure=1;const y=this;let S=!1,_=0,x=0,w=null,k=-1,O=null;const E=new Jn,A=new Jn;let T=null,C=t.width,M=t.height,$=1,P=null,R=null;const j=new Jn(0,0,C,M),N=new Jn(0,0,C,M);let D=!1;const I=new Eo;let L=!1,B=!1,z=null;const F=new Ir,U=new Cn,Q=new sr,q={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function G(){return null===w?$:1}let H,V,W,X,Y,Z,K,ee,te,ne,re,ie,oe,se,ae,le,ce,ue,de,he,pe,fe,me,ge=n;function be(e,n){for(let r=0;r<e.length;r++){const i=e[r],o=t.getContext(i,n);if(null!==o)return o}return null}try{const e={alpha:!0,depth:i,stencil:o,antialias:s,premultipliedAlpha:a,preserveDrawingBuffer:l,powerPreference:c,failIfMajorPerformanceCaveat:u};if("setAttribute"in t&&t.setAttribute("data-engine","three.js r"+r),t.addEventListener("webglcontextlost",Se,!1),t.addEventListener("webglcontextrestored",xe,!1),null===ge){const t=["webgl2","webgl","experimental-webgl"];if(!0===y.isWebGL1Renderer&&t.shift(),ge=be(t,e),null===ge)throw be(t)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}void 0===ge.getShaderPrecisionFormat&&(ge.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(e){throw console.error("THREE.WebGLRenderer: "+e.message),e}function ve(){H=new es(ge),V=new Do(ge,H,e),H.init(V),fe=new Za(ge,H,V),W=new Xa(ge,H,V),X=new rs(ge),Y=new Na,Z=new Ya(ge,H,W,Y,V,fe,X),K=new Lo(y),ee=new Ko(y),te=new To(ge,V),me=new jo(ge,H,te,V),ne=new ts(ge,te,X,me),re=new ls(ge,ne,te,X),de=new as(ge,V,Z),le=new Io(Y),ie=new ja(y,K,ee,H,V,me,le),oe=new il(y,Y),se=new Ba,ae=new Ga(H,V),ue=new Ro(y,K,W,re,d,a),ce=new Wa(y,re,V),he=new No(ge,H,X,V),pe=new ns(ge,H,X,V),X.programs=ie.programs,y.capabilities=V,y.extensions=H,y.properties=Y,y.renderLists=se,y.shadowMap=ce,y.state=W,y.info=X}ve();const ye=new rl(y,ge);function Se(e){e.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),S=!0}function xe(){console.log("THREE.WebGLRenderer: Context Restored."),S=!1;const e=X.autoReset,t=ce.enabled,n=ce.autoUpdate,r=ce.needsUpdate,i=ce.type;ve(),X.autoReset=e,ce.enabled=t,ce.autoUpdate=n,ce.needsUpdate=r,ce.type=i}function ke(e){const t=e.target;t.removeEventListener("dispose",ke),function(e){(function(e){const t=Y.get(e).programs;void 0!==t&&(t.forEach((function(e){ie.releaseProgram(e)})),e.isShaderMaterial&&ie.releaseShaderCache(e))})(e),Y.remove(e)}(t)}this.xr=ye,this.getContext=function(){return ge},this.getContextAttributes=function(){return ge.getContextAttributes()},this.forceContextLoss=function(){const e=H.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){const e=H.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return $},this.setPixelRatio=function(e){void 0!==e&&($=e,this.setSize(C,M,!1))},this.getSize=function(e){return e.set(C,M)},this.setSize=function(e,n,r){ye.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(C=e,M=n,t.width=Math.floor(e*$),t.height=Math.floor(n*$),!1!==r&&(t.style.width=e+"px",t.style.height=n+"px"),this.setViewport(0,0,e,n))},this.getDrawingBufferSize=function(e){return e.set(C*$,M*$).floor()},this.setDrawingBufferSize=function(e,n,r){C=e,M=n,$=r,t.width=Math.floor(e*r),t.height=Math.floor(n*r),this.setViewport(0,0,e,n)},this.getCurrentViewport=function(e){return e.copy(E)},this.getViewport=function(e){return e.copy(j)},this.setViewport=function(e,t,n,r){e.isVector4?j.set(e.x,e.y,e.z,e.w):j.set(e,t,n,r),W.viewport(E.copy(j).multiplyScalar($).floor())},this.getScissor=function(e){return e.copy(N)},this.setScissor=function(e,t,n,r){e.isVector4?N.set(e.x,e.y,e.z,e.w):N.set(e,t,n,r),W.scissor(A.copy(N).multiplyScalar($).floor())},this.getScissorTest=function(){return D},this.setScissorTest=function(e){W.setScissorTest(D=e)},this.setOpaqueSort=function(e){P=e},this.setTransparentSort=function(e){R=e},this.getClearColor=function(e){return e.copy(ue.getClearColor())},this.setClearColor=function(){ue.setClearColor.apply(ue,arguments)},this.getClearAlpha=function(){return ue.getClearAlpha()},this.setClearAlpha=function(){ue.setClearAlpha.apply(ue,arguments)},this.clear=function(e=!0,t=!0,n=!0){let r=0;e&&(r|=16384),t&&(r|=256),n&&(r|=1024),ge.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",Se,!1),t.removeEventListener("webglcontextrestored",xe,!1),se.dispose(),ae.dispose(),Y.dispose(),K.dispose(),ee.dispose(),re.dispose(),me.dispose(),ie.dispose(),ye.dispose(),ye.removeEventListener("sessionstart",Ee),ye.removeEventListener("sessionend",Ae),z&&(z.dispose(),z=null),Te.stop()},this.renderBufferDirect=function(e,t,n,r,i,o){null===t&&(t=q);const s=i.isMesh&&i.matrixWorld.determinant()<0,a=function(e,t,n,r,i){!0!==t.isScene&&(t=q);Z.resetTextureUnits();const o=t.fog,s=r.isMeshStandardMaterial?t.environment:null,a=null===w?y.outputEncoding:!0===w.isXRRenderTarget?w.texture.encoding:Pt,l=(r.isMeshStandardMaterial?ee:K).get(r.envMap||s),c=!0===r.vertexColors&&!!n.attributes.color&&4===n.attributes.color.itemSize,u=!!r.normalMap&&!!n.attributes.tangent,d=!!n.morphAttributes.position,h=!!n.morphAttributes.normal,f=!!n.morphAttributes.color,m=r.toneMapped?y.toneMapping:J,g=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,b=void 0!==g?g.length:0,v=Y.get(r),S=p.state.lights;if(!0===L&&(!0===B||e!==O)){const t=e===O&&r.id===k;le.setState(r,e,t)}let _=!1;r.version===v.__version?v.needsLights&&v.lightsStateVersion!==S.state.version||v.outputEncoding!==a||i.isInstancedMesh&&!1===v.instancing?_=!0:i.isInstancedMesh||!0!==v.instancing?i.isSkinnedMesh&&!1===v.skinning?_=!0:i.isSkinnedMesh||!0!==v.skinning?v.envMap!==l||!0===r.fog&&v.fog!==o?_=!0:void 0===v.numClippingPlanes||v.numClippingPlanes===le.numPlanes&&v.numIntersection===le.numIntersection?(v.vertexAlphas!==c||v.vertexTangents!==u||v.morphTargets!==d||v.morphNormals!==h||v.morphColors!==f||v.toneMapping!==m||!0===V.isWebGL2&&v.morphTargetsCount!==b)&&(_=!0):_=!0:_=!0:_=!0:(_=!0,v.__version=r.version);let x=v.currentProgram;!0===_&&(x=je(r,t,i));let E=!1,A=!1,T=!1;const C=x.getUniforms(),P=v.uniforms;W.useProgram(x.program)&&(E=!0,A=!0,T=!0);r.id!==k&&(k=r.id,A=!0);if(E||O!==e){if(C.setValue(ge,"projectionMatrix",e.projectionMatrix),V.logarithmicDepthBuffer&&C.setValue(ge,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),O!==e&&(O=e,A=!0,T=!0),r.isShaderMaterial||r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshStandardMaterial||r.envMap){const t=C.map.cameraPosition;void 0!==t&&t.setValue(ge,Q.setFromMatrixPosition(e.matrixWorld))}(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial)&&C.setValue(ge,"isOrthographic",!0===e.isOrthographicCamera),(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial||r.isShadowMaterial||i.isSkinnedMesh)&&C.setValue(ge,"viewMatrix",e.matrixWorldInverse)}if(i.isSkinnedMesh){C.setOptional(ge,i,"bindMatrix"),C.setOptional(ge,i,"bindMatrixInverse");const e=i.skeleton;e&&(V.floatVertexTextures?(null===e.boneTexture&&e.computeBoneTexture(),C.setValue(ge,"boneTexture",e.boneTexture,Z),C.setValue(ge,"boneTextureSize",e.boneTextureSize)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}const R=n.morphAttributes;(void 0!==R.position||void 0!==R.normal||void 0!==R.color&&!0===V.isWebGL2)&&de.update(i,n,r,x);(A||v.receiveShadow!==i.receiveShadow)&&(v.receiveShadow=i.receiveShadow,C.setValue(ge,"receiveShadow",i.receiveShadow));A&&(C.setValue(ge,"toneMappingExposure",y.toneMappingExposure),v.needsLights&&(N=T,(j=P).ambientLightColor.needsUpdate=N,j.lightProbe.needsUpdate=N,j.directionalLights.needsUpdate=N,j.directionalLightShadows.needsUpdate=N,j.pointLights.needsUpdate=N,j.pointLightShadows.needsUpdate=N,j.spotLights.needsUpdate=N,j.spotLightShadows.needsUpdate=N,j.rectAreaLights.needsUpdate=N,j.hemisphereLights.needsUpdate=N),o&&!0===r.fog&&oe.refreshFogUniforms(P,o),oe.refreshMaterialUniforms(P,r,$,M,z),ha.upload(ge,v.uniformsList,P,Z));var j,N;r.isShaderMaterial&&!0===r.uniformsNeedUpdate&&(ha.upload(ge,v.uniformsList,P,Z),r.uniformsNeedUpdate=!1);r.isSpriteMaterial&&C.setValue(ge,"center",i.center);return C.setValue(ge,"modelViewMatrix",i.modelViewMatrix),C.setValue(ge,"normalMatrix",i.normalMatrix),C.setValue(ge,"modelMatrix",i.matrixWorld),x}(e,t,n,r,i);W.setMaterial(r,s);let l=n.index;const c=n.attributes.position;if(null===l){if(void 0===c||0===c.count)return}else if(0===l.count)return;let u,d=1;!0===r.wireframe&&(l=ne.getWireframeAttribute(n),d=2),me.setup(i,r,a,n,l);let h=he;null!==l&&(u=te.get(l),h=pe,h.setIndex(u));const f=null!==l?l.count:c.count,m=n.drawRange.start*d,g=n.drawRange.count*d,b=null!==o?o.start*d:0,v=null!==o?o.count*d:1/0,S=Math.max(m,b),_=Math.min(f,m+g,b+v)-1,x=Math.max(0,_-S+1);if(0!==x){if(i.isMesh)!0===r.wireframe?(W.setLineWidth(r.wireframeLinewidth*G()),h.setMode(1)):h.setMode(4);else if(i.isLine){let e=r.linewidth;void 0===e&&(e=1),W.setLineWidth(e*G()),i.isLineSegments?h.setMode(1):i.isLineLoop?h.setMode(2):h.setMode(3)}else i.isPoints?h.setMode(0):i.isSprite&&h.setMode(4);if(i.isInstancedMesh)h.renderInstances(S,x,i.count);else if(n.isInstancedBufferGeometry){const e=Math.min(n.instanceCount,n._maxInstanceCount);h.renderInstances(S,x,e)}else h.render(S,x)}},this.compile=function(e,t){p=ae.get(e),p.init(),v.push(p),e.traverseVisible((function(e){e.isLight&&e.layers.test(t.layers)&&(p.pushLight(e),e.castShadow&&p.pushShadow(e))})),p.setupLights(y.physicallyCorrectLights),e.traverse((function(t){const n=t.material;if(n)if(Array.isArray(n))for(let r=0;r<n.length;r++){je(n[r],e,t)}else je(n,e,t)})),v.pop(),p=null};let Oe=null;function Ee(){Te.stop()}function Ae(){Te.start()}const Te=new Ao;function $e(e,t,n,r){const i=e.opaque,o=e.transmissive,a=e.transparent;p.setupLightsView(n),o.length>0&&function(e,t,n){const r=V.isWebGL2;null===z&&(z=new Kn(1,1,{generateMipmaps:!0,type:H.has("EXT_color_buffer_half_float")?Me:we,minFilter:_e,samples:r&&!0===s?4:0}));y.getDrawingBufferSize(U),r?z.setSize(U.x,U.y):z.setSize(An(U.x),An(U.y));const i=y.getRenderTarget();y.setRenderTarget(z),y.clear();const o=y.toneMapping;y.toneMapping=J,Pe(e,t,n),y.toneMapping=o,Z.updateMultisampleRenderTarget(z),Z.updateRenderTargetMipmap(z),y.setRenderTarget(i)}(i,t,n),r&&W.viewport(E.copy(r)),i.length>0&&Pe(i,t,n),o.length>0&&Pe(o,t,n),a.length>0&&Pe(a,t,n),W.buffers.depth.setTest(!0),W.buffers.depth.setMask(!0),W.buffers.color.setMask(!0),W.setPolygonOffset(!1)}function Pe(e,t,n){const r=!0===t.isScene?t.overrideMaterial:null;for(let i=0,o=e.length;i<o;i++){const o=e[i],s=o.object,a=o.geometry,l=null===r?o.material:r,c=o.group;s.layers.test(n.layers)&&Re(s,t,n,a,l,c)}}function Re(e,t,n,r,i,o){e.onBeforeRender(y,t,n,r,i,o),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),i.onBeforeRender(y,t,n,r,e,o),!0===i.transparent&&i.side===g?(i.side=m,i.needsUpdate=!0,y.renderBufferDirect(n,t,r,i,e,o),i.side=f,i.needsUpdate=!0,y.renderBufferDirect(n,t,r,i,e,o),i.side=g):y.renderBufferDirect(n,t,r,i,e,o),e.onAfterRender(y,t,n,r,i,o)}function je(e,t,n){!0!==t.isScene&&(t=q);const r=Y.get(e),i=p.state.lights,o=p.state.shadowsArray,s=i.state.version,a=ie.getParameters(e,i.state,o,t,n),l=ie.getProgramCacheKey(a);let c=r.programs;r.environment=e.isMeshStandardMaterial?t.environment:null,r.fog=t.fog,r.envMap=(e.isMeshStandardMaterial?ee:K).get(e.envMap||r.environment),void 0===c&&(e.addEventListener("dispose",ke),c=new Map,r.programs=c);let u=c.get(l);if(void 0!==u){if(r.currentProgram===u&&r.lightsStateVersion===s)return Ne(e,a),u}else a.uniforms=ie.getUniforms(e),e.onBuild(n,a,y),e.onBeforeCompile(a,y),u=ie.acquireProgram(a,l),c.set(l,u),r.uniforms=a.uniforms;const d=r.uniforms;(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(d.clippingPlanes=le.uniform),Ne(e,a),r.needsLights=function(e){return e.isMeshLambertMaterial||e.isMeshToonMaterial||e.isMeshPhongMaterial||e.isMeshStandardMaterial||e.isShadowMaterial||e.isShaderMaterial&&!0===e.lights}(e),r.lightsStateVersion=s,r.needsLights&&(d.ambientLightColor.value=i.state.ambient,d.lightProbe.value=i.state.probe,d.directionalLights.value=i.state.directional,d.directionalLightShadows.value=i.state.directionalShadow,d.spotLights.value=i.state.spot,d.spotLightShadows.value=i.state.spotShadow,d.rectAreaLights.value=i.state.rectArea,d.ltc_1.value=i.state.rectAreaLTC1,d.ltc_2.value=i.state.rectAreaLTC2,d.pointLights.value=i.state.point,d.pointLightShadows.value=i.state.pointShadow,d.hemisphereLights.value=i.state.hemi,d.directionalShadowMap.value=i.state.directionalShadowMap,d.directionalShadowMatrix.value=i.state.directionalShadowMatrix,d.spotShadowMap.value=i.state.spotShadowMap,d.spotShadowMatrix.value=i.state.spotShadowMatrix,d.pointShadowMap.value=i.state.pointShadowMap,d.pointShadowMatrix.value=i.state.pointShadowMatrix);const h=u.getUniforms(),f=ha.seqWithValue(h.seq,d);return r.currentProgram=u,r.uniformsList=f,u}function Ne(e,t){const n=Y.get(e);n.outputEncoding=t.outputEncoding,n.instancing=t.instancing,n.skinning=t.skinning,n.morphTargets=t.morphTargets,n.morphNormals=t.morphNormals,n.morphColors=t.morphColors,n.morphTargetsCount=t.morphTargetsCount,n.numClippingPlanes=t.numClippingPlanes,n.numIntersection=t.numClipIntersection,n.vertexAlphas=t.vertexAlphas,n.vertexTangents=t.vertexTangents,n.toneMapping=t.toneMapping}Te.setAnimationLoop((function(e){Oe&&Oe(e)})),"undefined"!=typeof self&&Te.setContext(self),this.setAnimationLoop=function(e){Oe=e,ye.setAnimationLoop(e),null===e?Te.stop():Te.start()},ye.addEventListener("sessionstart",Ee),ye.addEventListener("sessionend",Ae),this.render=function(e,t){if(void 0!==t&&!0!==t.isCamera)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");if(!0===S)return;!0===e.autoUpdate&&e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld(),!0===ye.enabled&&!0===ye.isPresenting&&(!0===ye.cameraAutoUpdate&&ye.updateCamera(t),t=ye.getCamera()),!0===e.isScene&&e.onBeforeRender(y,e,t,w),p=ae.get(e,v.length),p.init(),v.push(p),F.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),I.setFromProjectionMatrix(F),B=this.localClippingEnabled,L=le.init(this.clippingPlanes,B,t),h=se.get(e,b.length),h.init(),b.push(h),function e(t,n,r,i){if(!1===t.visible)return;if(t.layers.test(n.layers))if(t.isGroup)r=t.renderOrder;else if(t.isLOD)!0===t.autoUpdate&&t.update(n);else if(t.isLight)p.pushLight(t),t.castShadow&&p.pushShadow(t);else if(t.isSprite){if(!t.frustumCulled||I.intersectsSprite(t)){i&&Q.setFromMatrixPosition(t.matrixWorld).applyMatrix4(F);const e=re.update(t),n=t.material;n.visible&&h.push(t,e,n,r,Q.z,null)}}else if((t.isMesh||t.isLine||t.isPoints)&&(t.isSkinnedMesh&&t.skeleton.frame!==X.render.frame&&(t.skeleton.update(),t.skeleton.frame=X.render.frame),!t.frustumCulled||I.intersectsObject(t))){i&&Q.setFromMatrixPosition(t.matrixWorld).applyMatrix4(F);const e=re.update(t),n=t.material;if(Array.isArray(n)){const i=e.groups;for(let o=0,s=i.length;o<s;o++){const s=i[o],a=n[s.materialIndex];a&&a.visible&&h.push(t,e,a,r,Q.z,s)}}else n.visible&&h.push(t,e,n,r,Q.z,null)}const o=t.children;for(let t=0,s=o.length;t<s;t++)e(o[t],n,r,i)}(e,t,0,y.sortObjects),h.finish(),!0===y.sortObjects&&h.sort(P,R),!0===L&&le.beginShadows();const n=p.state.shadowsArray;if(ce.render(n,e,t),!0===L&&le.endShadows(),!0===this.info.autoReset&&this.info.reset(),ue.render(h,e),p.setupLights(y.physicallyCorrectLights),t.isArrayCamera){const n=t.cameras;for(let t=0,r=n.length;t<r;t++){const r=n[t];$e(h,e,r,r.viewport)}}else $e(h,e,t);null!==w&&(Z.updateMultisampleRenderTarget(w),Z.updateRenderTargetMipmap(w)),!0===e.isScene&&e.onAfterRender(y,e,t),me.resetDefaultState(),k=-1,O=null,v.pop(),p=v.length>0?v[v.length-1]:null,b.pop(),h=b.length>0?b[b.length-1]:null},this.getActiveCubeFace=function(){return _},this.getActiveMipmapLevel=function(){return x},this.getRenderTarget=function(){return w},this.setRenderTargetTextures=function(e,t,n){Y.get(e.texture).__webglTexture=t,Y.get(e.depthTexture).__webglTexture=n;const r=Y.get(e);r.__hasExternalTextures=!0,r.__hasExternalTextures&&(r.__autoAllocateDepthBuffer=void 0===n,r.__autoAllocateDepthBuffer||!0===H.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),r.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(e,t){const n=Y.get(e);n.__webglFramebuffer=t,n.__useDefaultFramebuffer=void 0===t},this.setRenderTarget=function(e,t=0,n=0){w=e,_=t,x=n;let r=!0;if(e){const t=Y.get(e);void 0!==t.__useDefaultFramebuffer?(W.bindFramebuffer(36160,null),r=!1):void 0===t.__webglFramebuffer?Z.setupRenderTarget(e):t.__hasExternalTextures&&Z.rebindTextures(e,Y.get(e.texture).__webglTexture,Y.get(e.depthTexture).__webglTexture)}let i=null,o=!1,s=!1;if(e){const n=e.texture;(n.isData3DTexture||n.isDataArrayTexture)&&(s=!0);const r=Y.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(i=r[t],o=!0):i=V.isWebGL2&&e.samples>0&&!1===Z.useMultisampledRTT(e)?Y.get(e).__webglMultisampledFramebuffer:r,E.copy(e.viewport),A.copy(e.scissor),T=e.scissorTest}else E.copy(j).multiplyScalar($).floor(),A.copy(N).multiplyScalar($).floor(),T=D;if(W.bindFramebuffer(36160,i)&&V.drawBuffers&&r&&W.drawBuffers(e,i),W.viewport(E),W.scissor(A),W.setScissorTest(T),o){const r=Y.get(e.texture);ge.framebufferTexture2D(36160,36064,34069+t,r.__webglTexture,n)}else if(s){const r=Y.get(e.texture),i=t||0;ge.framebufferTextureLayer(36160,36064,r.__webglTexture,n||0,i)}k=-1},this.readRenderTargetPixels=function(e,t,n,r,i,o,s){if(!e||!e.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let a=Y.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==s&&(a=a[s]),a){W.bindFramebuffer(36160,a);try{const s=e.texture,a=s.format,l=s.type;if(a!==De&&fe.convert(a)!==ge.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const c=l===Me&&(H.has("EXT_color_buffer_half_float")||V.isWebGL2&&H.has("EXT_color_buffer_float"));if(!(l===we||fe.convert(l)===ge.getParameter(35738)||l===Ce&&(V.isWebGL2||H.has("OES_texture_float")||H.has("WEBGL_color_buffer_float"))||c))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&ge.readPixels(t,n,r,i,fe.convert(a),fe.convert(l),o)}finally{const e=null!==w?Y.get(w).__webglFramebuffer:null;W.bindFramebuffer(36160,e)}}},this.copyFramebufferToTexture=function(e,t,n=0){if(!0!==t.isFramebufferTexture)return void console.error("THREE.WebGLRenderer: copyFramebufferToTexture() can only be used with FramebufferTexture.");const r=Math.pow(2,-n),i=Math.floor(t.image.width*r),o=Math.floor(t.image.height*r);Z.setTexture2D(t,0),ge.copyTexSubImage2D(3553,n,0,0,e.x,e.y,i,o),W.unbindTexture()},this.copyTextureToTexture=function(e,t,n,r=0){const i=t.image.width,o=t.image.height,s=fe.convert(n.format),a=fe.convert(n.type);Z.setTexture2D(n,0),ge.pixelStorei(37440,n.flipY),ge.pixelStorei(37441,n.premultiplyAlpha),ge.pixelStorei(3317,n.unpackAlignment),t.isDataTexture?ge.texSubImage2D(3553,r,e.x,e.y,i,o,s,a,t.image.data):t.isCompressedTexture?ge.compressedTexSubImage2D(3553,r,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,s,t.mipmaps[0].data):ge.texSubImage2D(3553,r,e.x,e.y,s,a,t.image),0===r&&n.generateMipmaps&&ge.generateMipmap(3553),W.unbindTexture()},this.copyTextureToTexture3D=function(e,t,n,r,i=0){if(y.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const o=e.max.x-e.min.x+1,s=e.max.y-e.min.y+1,a=e.max.z-e.min.z+1,l=fe.convert(r.format),c=fe.convert(r.type);let u;if(r.isData3DTexture)Z.setTexture3D(r,0),u=32879;else{if(!r.isDataArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");Z.setTexture2DArray(r,0),u=35866}ge.pixelStorei(37440,r.flipY),ge.pixelStorei(37441,r.premultiplyAlpha),ge.pixelStorei(3317,r.unpackAlignment);const d=ge.getParameter(3314),h=ge.getParameter(32878),p=ge.getParameter(3316),f=ge.getParameter(3315),m=ge.getParameter(32877),g=n.isCompressedTexture?n.mipmaps[0]:n.image;ge.pixelStorei(3314,g.width),ge.pixelStorei(32878,g.height),ge.pixelStorei(3316,e.min.x),ge.pixelStorei(3315,e.min.y),ge.pixelStorei(32877,e.min.z),n.isDataTexture||n.isData3DTexture?ge.texSubImage3D(u,i,t.x,t.y,t.z,o,s,a,l,c,g.data):n.isCompressedTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),ge.compressedTexSubImage3D(u,i,t.x,t.y,t.z,o,s,a,l,g.data)):ge.texSubImage3D(u,i,t.x,t.y,t.z,o,s,a,l,c,g),ge.pixelStorei(3314,d),ge.pixelStorei(32878,h),ge.pixelStorei(3316,p),ge.pixelStorei(3315,f),ge.pixelStorei(32877,m),0===i&&r.generateMipmaps&&ge.generateMipmap(u),W.unbindTexture()},this.initTexture=function(e){Z.setTexture2D(e,0),W.unbindTexture()},this.resetState=function(){_=0,x=0,w=null,W.reset(),me.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}ol.prototype.isWebGLRenderer=!0;class sl extends ol{}sl.prototype.isWebGL1Renderer=!0;class al{constructor(e,t=25e-5){this.name="",this.color=new Gn(e),this.density=t}clone(){return new al(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}al.prototype.isFogExp2=!0;class ll{constructor(e,t=1,n=1e3){this.name="",this.color=new Gn(e),this.near=t,this.far=n}clone(){return new ll(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}ll.prototype.isFog=!0;class cl extends li{constructor(){super(),this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.autoUpdate=e.autoUpdate,this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),t}}cl.prototype.isScene=!0;class ul{constructor(e,t){this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=rn,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=_n()}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let r=0,i=this.stride;r<i;r++)this.array[e+r]=t.array[n+r];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=_n()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=_n()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=Array.prototype.slice.call(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}ul.prototype.isInterleavedBuffer=!0;const dl=new sr;class hl{constructor(e,t,n,r=!1){this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=!0===r}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;t<n;t++)dl.fromBufferAttribute(this,t),dl.applyMatrix4(e),this.setXYZ(t,dl.x,dl.y,dl.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)dl.fromBufferAttribute(this,t),dl.applyNormalMatrix(e),this.setXYZ(t,dl.x,dl.y,dl.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)dl.fromBufferAttribute(this,t),dl.transformDirection(e),this.setXYZ(t,dl.x,dl.y,dl.z);return this}setX(e,t){return this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){return this.data.array[e*this.data.stride+this.offset]}getY(e){return this.data.array[e*this.data.stride+this.offset+1]}getZ(e){return this.data.array[e*this.data.stride+this.offset+2]}getW(e){return this.data.array[e*this.data.stride+this.offset+3]}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,r){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this.data.array[e+3]=i,this}clone(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interlaved buffer attribute will deinterleave buffer data.");const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return new Oi(new this.array.constructor(e),this.itemSize,this.normalized)}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new hl(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interlaved buffer attribute will deinterleave buffer data.");const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:e,normalized:this.normalized}}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}hl.prototype.isInterleavedBufferAttribute=!0;class pl extends _i{constructor(e){super(),this.type="SpriteMaterial",this.color=new Gn(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}let fl;pl.prototype.isSpriteMaterial=!0;const ml=new sr,gl=new sr,bl=new sr,vl=new Cn,yl=new Cn,Sl=new Ir,_l=new sr,xl=new sr,wl=new sr,kl=new Cn,Ol=new Cn,El=new Cn;class Al extends li{constructor(e){if(super(),this.type="Sprite",void 0===fl){fl=new Qi;const e=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),t=new ul(e,5);fl.setIndex([0,1,2,0,2,3]),fl.setAttribute("position",new hl(t,3,0,!1)),fl.setAttribute("uv",new hl(t,2,3,!1))}this.geometry=fl,this.material=void 0!==e?e:new pl,this.center=new Cn(.5,.5)}raycast(e,t){null===e.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),gl.setFromMatrixScale(this.matrixWorld),Sl.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),bl.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&gl.multiplyScalar(-bl.z);const n=this.material.rotation;let r,i;0!==n&&(i=Math.cos(n),r=Math.sin(n));const o=this.center;Tl(_l.set(-.5,-.5,0),bl,o,gl,r,i),Tl(xl.set(.5,-.5,0),bl,o,gl,r,i),Tl(wl.set(.5,.5,0),bl,o,gl,r,i),kl.set(0,0),Ol.set(1,0),El.set(1,1);let s=e.ray.intersectTriangle(_l,xl,wl,!1,ml);if(null===s&&(Tl(xl.set(-.5,.5,0),bl,o,gl,r,i),Ol.set(0,1),s=e.ray.intersectTriangle(_l,wl,xl,!1,ml),null===s))return;const a=e.ray.origin.distanceTo(ml);a<e.near||a>e.far||t.push({distance:a,point:ml.clone(),uv:yi.getUV(ml,_l,xl,wl,kl,Ol,El,new Cn),face:null,object:this})}copy(e){return super.copy(e),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}}function Tl(e,t,n,r,i,o){vl.subVectors(e,n).addScalar(.5).multiply(r),void 0!==i?(yl.x=o*vl.x-i*vl.y,yl.y=i*vl.x+o*vl.y):yl.copy(vl),e.copy(t),e.x+=yl.x,e.y+=yl.y,e.applyMatrix4(Sl)}Al.prototype.isSprite=!0;const Cl=new sr,Ml=new sr;class $l extends li{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let e=0,n=t.length;e<n;e++){const n=t[e];this.addLevel(n.object.clone(),n.distance)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,t=0){t=Math.abs(t);const n=this.levels;let r;for(r=0;r<n.length&&!(t<n[r].distance);r++);return n.splice(r,0,{distance:t,object:e}),this.add(e),this}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const t=this.levels;if(t.length>0){let n,r;for(n=1,r=t.length;n<r&&!(e<t[n].distance);n++);return t[n-1].object}return null}raycast(e,t){if(this.levels.length>0){Cl.setFromMatrixPosition(this.matrixWorld);const n=e.ray.origin.distanceTo(Cl);this.getObjectForDistance(n).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){Cl.setFromMatrixPosition(e.matrixWorld),Ml.setFromMatrixPosition(this.matrixWorld);const n=Cl.distanceTo(Ml)/e.zoom;let r,i;for(t[0].object.visible=!0,r=1,i=t.length;r<i&&n>=t[r].distance;r++)t[r-1].object.visible=!1,t[r].object.visible=!0;for(this._currentLevel=r-1;r<i;r++)t[r].object.visible=!1}}toJSON(e){const t=super.toJSON(e);!1===this.autoUpdate&&(t.object.autoUpdate=!1),t.object.levels=[];const n=this.levels;for(let e=0,r=n.length;e<r;e++){const r=n[e];t.object.levels.push({object:r.object.uuid,distance:r.distance})}return t}}const Pl=new sr,Rl=new Jn,jl=new Jn,Nl=new sr,Dl=new Ir;class Il extends ao{constructor(e,t){super(e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Ir,this.bindMatrixInverse=new Ir}copy(e){return super.copy(e),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,this}bind(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new Jn,t=this.geometry.attributes.skinWeight;for(let n=0,r=t.count;n<r;n++){e.fromBufferAttribute(t,n);const r=1/e.manhattanLength();r!==1/0?e.multiplyScalar(r):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),"attached"===this.bindMode?this.bindMatrixInverse.copy(this.matrixWorld).invert():"detached"===this.bindMode?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}boneTransform(e,t){const n=this.skeleton,r=this.geometry;Rl.fromBufferAttribute(r.attributes.skinIndex,e),jl.fromBufferAttribute(r.attributes.skinWeight,e),Pl.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let e=0;e<4;e++){const r=jl.getComponent(e);if(0!==r){const i=Rl.getComponent(e);Dl.multiplyMatrices(n.bones[i].matrixWorld,n.boneInverses[i]),t.addScaledVector(Nl.copy(Pl).applyMatrix4(Dl),r)}}return t.applyMatrix4(this.bindMatrixInverse)}}Il.prototype.isSkinnedMesh=!0;class Ll extends li{constructor(){super(),this.type="Bone"}}Ll.prototype.isBone=!0;class Bl extends Zn{constructor(e=null,t=1,n=1,r,i,o,s,a,l=pe,c=pe,u,d){super(null,o,s,a,l,c,r,i,u,d),this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}Bl.prototype.isDataTexture=!0;const zl=new Ir,Fl=new Ir;class Ul{constructor(e=[],t=[]){this.uuid=_n(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.boneTextureSize=0,this.frame=-1,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(16*e.length),0===t.length)this.calculateInverses();else if(e.length!==t.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let e=0,t=this.bones.length;e<t;e++)this.boneInverses.push(new Ir)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const t=new Ir;this.bones[e]&&t.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(t)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const t=this.bones[e];t&&t.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const t=this.bones[e];t&&(t.parent&&t.parent.isBone?(t.matrix.copy(t.parent.matrixWorld).invert(),t.matrix.multiply(t.matrixWorld)):t.matrix.copy(t.matrixWorld),t.matrix.decompose(t.position,t.quaternion,t.scale))}}update(){const e=this.bones,t=this.boneInverses,n=this.boneMatrices,r=this.boneTexture;for(let r=0,i=e.length;r<i;r++){const i=e[r]?e[r].matrixWorld:Fl;zl.multiplyMatrices(i,t[r]),zl.toArray(n,16*r)}null!==r&&(r.needsUpdate=!0)}clone(){return new Ul(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(4*this.bones.length);e=En(e),e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const n=new Bl(t,e,e,De,Ce);return n.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=n,this.boneTextureSize=e,this}getBoneByName(e){for(let t=0,n=this.bones.length;t<n;t++){const n=this.bones[t];if(n.name===e)return n}}dispose(){null!==this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let n=0,r=e.bones.length;n<r;n++){const r=e.bones[n];let i=t[r];void 0===i&&(console.warn("THREE.Skeleton: No bone found with UUID:",r),i=new Ll),this.bones.push(i),this.boneInverses.push((new Ir).fromArray(e.boneInverses[n]))}return this.init(),this}toJSON(){const e={metadata:{version:4.5,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,n=this.boneInverses;for(let r=0,i=t.length;r<i;r++){const i=t[r];e.bones.push(i.uuid);const o=n[r];e.boneInverses.push(o.toArray())}return e}}class Ql extends Oi{constructor(e,t,n,r=1){"number"==typeof n&&(r=n,n=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),super(e,t,n),this.meshPerAttribute=r}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}Ql.prototype.isInstancedBufferAttribute=!0;const ql=new Ir,Gl=new Ir,Hl=[],Vl=new ao;class Wl extends ao{constructor(e,t,n){super(e,t),this.instanceMatrix=new Ql(new Float32Array(16*n),16),this.instanceColor=null,this.count=n,this.frustumCulled=!1}copy(e){return super.copy(e),this.instanceMatrix.copy(e.instanceMatrix),null!==e.instanceColor&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,this}getColorAt(e,t){t.fromArray(this.instanceColor.array,3*e)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,16*e)}raycast(e,t){const n=this.matrixWorld,r=this.count;if(Vl.geometry=this.geometry,Vl.material=this.material,void 0!==Vl.material)for(let i=0;i<r;i++){this.getMatrixAt(i,ql),Gl.multiplyMatrices(n,ql),Vl.matrixWorld=Gl,Vl.raycast(e,Hl);for(let e=0,n=Hl.length;e<n;e++){const n=Hl[e];n.instanceId=i,n.object=this,t.push(n)}Hl.length=0}}setColorAt(e,t){null===this.instanceColor&&(this.instanceColor=new Ql(new Float32Array(3*this.instanceMatrix.count),3)),t.toArray(this.instanceColor.array,3*e)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,16*e)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}}Wl.prototype.isInstancedMesh=!0;class Xl extends _i{constructor(e){super(),this.type="LineBasicMaterial",this.color=new Gn(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}Xl.prototype.isLineBasicMaterial=!0;const Yl=new sr,Zl=new sr,Jl=new Ir,Kl=new Dr,ec=new Tr;class tc extends li{constructor(e=new Qi,t=new Xl){super(),this.type="Line",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),this.material=e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.isBufferGeometry)if(null===e.index){const t=e.attributes.position,n=[0];for(let e=1,r=t.count;e<r;e++)Yl.fromBufferAttribute(t,e-1),Zl.fromBufferAttribute(t,e),n[e]=n[e-1],n[e]+=Yl.distanceTo(Zl);e.setAttribute("lineDistance",new ji(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else e.isGeometry&&console.error("THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,i=e.params.Line.threshold,o=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),ec.copy(n.boundingSphere),ec.applyMatrix4(r),ec.radius+=i,!1===e.ray.intersectsSphere(ec))return;Jl.copy(r).invert(),Kl.copy(e.ray).applyMatrix4(Jl);const s=i/((this.scale.x+this.scale.y+this.scale.z)/3),a=s*s,l=new sr,c=new sr,u=new sr,d=new sr,h=this.isLineSegments?2:1;if(n.isBufferGeometry){const r=n.index,i=n.attributes.position;if(null!==r){for(let n=Math.max(0,o.start),s=Math.min(r.count,o.start+o.count)-1;n<s;n+=h){const o=r.getX(n),s=r.getX(n+1);l.fromBufferAttribute(i,o),c.fromBufferAttribute(i,s);if(Kl.distanceSqToSegment(l,c,d,u)>a)continue;d.applyMatrix4(this.matrixWorld);const h=e.ray.origin.distanceTo(d);h<e.near||h>e.far||t.push({distance:h,point:u.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}else{for(let n=Math.max(0,o.start),r=Math.min(i.count,o.start+o.count)-1;n<r;n+=h){l.fromBufferAttribute(i,n),c.fromBufferAttribute(i,n+1);if(Kl.distanceSqToSegment(l,c,d,u)>a)continue;d.applyMatrix4(this.matrixWorld);const r=e.ray.origin.distanceTo(d);r<e.near||r>e.far||t.push({distance:r,point:u.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}}else n.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const e=t[n[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t<n;t++){const n=e[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}}else{const t=e.morphTargets;void 0!==t&&t.length>0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}tc.prototype.isLine=!0;const nc=new sr,rc=new sr;class ic extends tc{constructor(e,t){super(e,t),this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.isBufferGeometry)if(null===e.index){const t=e.attributes.position,n=[];for(let e=0,r=t.count;e<r;e+=2)nc.fromBufferAttribute(t,e),rc.fromBufferAttribute(t,e+1),n[e]=0===e?0:n[e-1],n[e+1]=n[e]+nc.distanceTo(rc);e.setAttribute("lineDistance",new ji(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else e.isGeometry&&console.error("THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}}ic.prototype.isLineSegments=!0;class oc extends tc{constructor(e,t){super(e,t),this.type="LineLoop"}}oc.prototype.isLineLoop=!0;class sc extends _i{constructor(e){super(),this.type="PointsMaterial",this.color=new Gn(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}sc.prototype.isPointsMaterial=!0;const ac=new Ir,lc=new Dr,cc=new Tr,uc=new sr;class dc extends li{constructor(e=new Qi,t=new sc){super(),this.type="Points",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),this.material=e.material,this.geometry=e.geometry,this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,i=e.params.Points.threshold,o=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),cc.copy(n.boundingSphere),cc.applyMatrix4(r),cc.radius+=i,!1===e.ray.intersectsSphere(cc))return;ac.copy(r).invert(),lc.copy(e.ray).applyMatrix4(ac);const s=i/((this.scale.x+this.scale.y+this.scale.z)/3),a=s*s;if(n.isBufferGeometry){const i=n.index,s=n.attributes.position;if(null!==i){for(let n=Math.max(0,o.start),l=Math.min(i.count,o.start+o.count);n<l;n++){const o=i.getX(n);uc.fromBufferAttribute(s,o),hc(uc,o,a,r,e,t,this)}}else{for(let n=Math.max(0,o.start),i=Math.min(s.count,o.start+o.count);n<i;n++)uc.fromBufferAttribute(s,n),hc(uc,n,a,r,e,t,this)}}else console.error("THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const e=t[n[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t<n;t++){const n=e[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}}else{const t=e.morphTargets;void 0!==t&&t.length>0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}function hc(e,t,n,r,i,o,s){const a=lc.distanceSqToPoint(e);if(a<n){const n=new sr;lc.closestPointToPoint(e,n),n.applyMatrix4(r);const l=i.ray.origin.distanceTo(n);if(l<i.near||l>i.far)return;o.push({distance:l,distanceToRay:Math.sqrt(a),point:n,index:t,face:null,object:s})}}dc.prototype.isPoints=!0;class pc extends Zn{constructor(e,t,n,r,i,o,s,a,l){super(e,t,n,r,i,o,s,a,l),this.minFilter=void 0!==o?o:ve,this.magFilter=void 0!==i?i:ve,this.generateMipmaps=!1;const c=this;"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback((function t(){c.needsUpdate=!0,e.requestVideoFrameCallback(t)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;!1==="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}pc.prototype.isVideoTexture=!0;class fc extends Zn{constructor(e,t,n){super({width:e,height:t}),this.format=n,this.magFilter=pe,this.minFilter=pe,this.generateMipmaps=!1,this.needsUpdate=!0}}fc.prototype.isFramebufferTexture=!0;class mc extends Zn{constructor(e,t,n,r,i,o,s,a,l,c,u,d){super(null,o,s,a,l,c,r,i,u,d),this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}mc.prototype.isCompressedTexture=!0;class gc extends Zn{constructor(e,t,n,r,i,o,s,a,l){super(e,t,n,r,i,o,s,a,l),this.needsUpdate=!0}}gc.prototype.isCanvasTexture=!0;class bc{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let n,r=this.getPoint(0),i=0;t.push(0);for(let o=1;o<=e;o++)n=this.getPoint(o/e),i+=n.distanceTo(r),t.push(i),r=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const n=this.getLengths();let r=0;const i=n.length;let o;o=t||e*n[i-1];let s,a=0,l=i-1;for(;a<=l;)if(r=Math.floor(a+(l-a)/2),s=n[r]-o,s<0)a=r+1;else{if(!(s>0)){l=r;break}l=r-1}if(r=l,n[r]===o)return r/(i-1);const c=n[r];return(r+(o-c)/(n[r+1]-c))/(i-1)}getTangent(e,t){let n=e-1e-4,r=e+1e-4;n<0&&(n=0),r>1&&(r=1);const i=this.getPoint(n),o=this.getPoint(r),s=t||(i.isVector2?new Cn:new sr);return s.copy(o).sub(i).normalize(),s}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t){const n=new sr,r=[],i=[],o=[],s=new sr,a=new Ir;for(let t=0;t<=e;t++){const n=t/e;r[t]=this.getTangentAt(n,new sr)}i[0]=new sr,o[0]=new sr;let l=Number.MAX_VALUE;const c=Math.abs(r[0].x),u=Math.abs(r[0].y),d=Math.abs(r[0].z);c<=l&&(l=c,n.set(1,0,0)),u<=l&&(l=u,n.set(0,1,0)),d<=l&&n.set(0,0,1),s.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],s),o[0].crossVectors(r[0],i[0]);for(let t=1;t<=e;t++){if(i[t]=i[t-1].clone(),o[t]=o[t-1].clone(),s.crossVectors(r[t-1],r[t]),s.length()>Number.EPSILON){s.normalize();const e=Math.acos(xn(r[t-1].dot(r[t]),-1,1));i[t].applyMatrix4(a.makeRotationAxis(s,e))}o[t].crossVectors(r[t],i[t])}if(!0===t){let t=Math.acos(xn(i[0].dot(i[e]),-1,1));t/=e,r[0].dot(s.crossVectors(i[0],i[e]))>0&&(t=-t);for(let n=1;n<=e;n++)i[n].applyMatrix4(a.makeRotationAxis(r[n],t*n)),o[n].crossVectors(r[n],i[n])}return{tangents:r,normals:i,binormals:o}}clone(){return(new this.constructor).copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class vc extends bc{constructor(e=0,t=0,n=1,r=1,i=0,o=2*Math.PI,s=!1,a=0){super(),this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=r,this.aStartAngle=i,this.aEndAngle=o,this.aClockwise=s,this.aRotation=a}getPoint(e,t){const n=t||new Cn,r=2*Math.PI;let i=this.aEndAngle-this.aStartAngle;const o=Math.abs(i)<Number.EPSILON;for(;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=o?0:r),!0!==this.aClockwise||o||(i===r?i=-r:i-=r);const s=this.aStartAngle+e*i;let a=this.aX+this.xRadius*Math.cos(s),l=this.aY+this.yRadius*Math.sin(s);if(0!==this.aRotation){const e=Math.cos(this.aRotation),t=Math.sin(this.aRotation),n=a-this.aX,r=l-this.aY;a=n*e-r*t+this.aX,l=n*t+r*e+this.aY}return n.set(a,l)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}vc.prototype.isEllipseCurve=!0;class yc extends vc{constructor(e,t,n,r,i,o){super(e,t,n,n,r,i,o),this.type="ArcCurve"}}function Sc(){let e=0,t=0,n=0,r=0;function i(i,o,s,a){e=i,t=s,n=-3*i+3*o-2*s-a,r=2*i-2*o+s+a}return{initCatmullRom:function(e,t,n,r,o){i(t,n,o*(n-e),o*(r-t))},initNonuniformCatmullRom:function(e,t,n,r,o,s,a){let l=(t-e)/o-(n-e)/(o+s)+(n-t)/s,c=(n-t)/s-(r-t)/(s+a)+(r-n)/a;l*=s,c*=s,i(t,n,l,c)},calc:function(i){const o=i*i;return e+t*i+n*o+r*(o*i)}}}yc.prototype.isArcCurve=!0;const _c=new sr,xc=new Sc,wc=new Sc,kc=new Sc;class Oc extends bc{constructor(e=[],t=!1,n="centripetal",r=.5){super(),this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=r}getPoint(e,t=new sr){const n=t,r=this.points,i=r.length,o=(i-(this.closed?0:1))*e;let s,a,l=Math.floor(o),c=o-l;this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/i)+1)*i:0===c&&l===i-1&&(l=i-2,c=1),this.closed||l>0?s=r[(l-1)%i]:(_c.subVectors(r[0],r[1]).add(r[0]),s=_c);const u=r[l%i],d=r[(l+1)%i];if(this.closed||l+2<i?a=r[(l+2)%i]:(_c.subVectors(r[i-1],r[i-2]).add(r[i-1]),a=_c),"centripetal"===this.curveType||"chordal"===this.curveType){const e="chordal"===this.curveType?.5:.25;let t=Math.pow(s.distanceToSquared(u),e),n=Math.pow(u.distanceToSquared(d),e),r=Math.pow(d.distanceToSquared(a),e);n<1e-4&&(n=1),t<1e-4&&(t=n),r<1e-4&&(r=n),xc.initNonuniformCatmullRom(s.x,u.x,d.x,a.x,t,n,r),wc.initNonuniformCatmullRom(s.y,u.y,d.y,a.y,t,n,r),kc.initNonuniformCatmullRom(s.z,u.z,d.z,a.z,t,n,r)}else"catmullrom"===this.curveType&&(xc.initCatmullRom(s.x,u.x,d.x,a.x,this.tension),wc.initCatmullRom(s.y,u.y,d.y,a.y,this.tension),kc.initCatmullRom(s.z,u.z,d.z,a.z,this.tension));return n.set(xc.calc(c),wc.calc(c),kc.calc(c)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const n=this.points[t];e.points.push(n.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push((new sr).fromArray(n))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function Ec(e,t,n,r,i){const o=.5*(r-t),s=.5*(i-n),a=e*e;return(2*n-2*r+o+s)*(e*a)+(-3*n+3*r-2*o-s)*a+o*e+n}function Ac(e,t,n,r){return function(e,t){const n=1-e;return n*n*t}(e,t)+function(e,t){return 2*(1-e)*e*t}(e,n)+function(e,t){return e*e*t}(e,r)}function Tc(e,t,n,r,i){return function(e,t){const n=1-e;return n*n*n*t}(e,t)+function(e,t){const n=1-e;return 3*n*n*e*t}(e,n)+function(e,t){return 3*(1-e)*e*e*t}(e,r)+function(e,t){return e*e*e*t}(e,i)}Oc.prototype.isCatmullRomCurve3=!0;class Cc extends bc{constructor(e=new Cn,t=new Cn,n=new Cn,r=new Cn){super(),this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new Cn){const n=t,r=this.v0,i=this.v1,o=this.v2,s=this.v3;return n.set(Tc(e,r.x,i.x,o.x,s.x),Tc(e,r.y,i.y,o.y,s.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}Cc.prototype.isCubicBezierCurve=!0;class Mc extends bc{constructor(e=new sr,t=new sr,n=new sr,r=new sr){super(),this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new sr){const n=t,r=this.v0,i=this.v1,o=this.v2,s=this.v3;return n.set(Tc(e,r.x,i.x,o.x,s.x),Tc(e,r.y,i.y,o.y,s.y),Tc(e,r.z,i.z,o.z,s.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}Mc.prototype.isCubicBezierCurve3=!0;class $c extends bc{constructor(e=new Cn,t=new Cn){super(),this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new Cn){const n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t){const n=t||new Cn;return n.copy(this.v2).sub(this.v1).normalize(),n}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}$c.prototype.isLineCurve=!0;class Pc extends bc{constructor(e=new sr,t=new sr){super(),this.type="LineCurve3",this.isLineCurve3=!0,this.v1=e,this.v2=t}getPoint(e,t=new sr){const n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Rc extends bc{constructor(e=new Cn,t=new Cn,n=new Cn){super(),this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new Cn){const n=t,r=this.v0,i=this.v1,o=this.v2;return n.set(Ac(e,r.x,i.x,o.x),Ac(e,r.y,i.y,o.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}Rc.prototype.isQuadraticBezierCurve=!0;class jc extends bc{constructor(e=new sr,t=new sr,n=new sr){super(),this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new sr){const n=t,r=this.v0,i=this.v1,o=this.v2;return n.set(Ac(e,r.x,i.x,o.x),Ac(e,r.y,i.y,o.y),Ac(e,r.z,i.z,o.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}jc.prototype.isQuadraticBezierCurve3=!0;class Nc extends bc{constructor(e=[]){super(),this.type="SplineCurve",this.points=e}getPoint(e,t=new Cn){const n=t,r=this.points,i=(r.length-1)*e,o=Math.floor(i),s=i-o,a=r[0===o?o:o-1],l=r[o],c=r[o>r.length-2?r.length-1:o+1],u=r[o>r.length-3?r.length-1:o+2];return n.set(Ec(s,a.x,l.x,c.x,u.x),Ec(s,a.y,l.y,c.y,u.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const n=this.points[t];e.points.push(n.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push((new Cn).fromArray(n))}return this}}Nc.prototype.isSplineCurve=!0;var Dc=Object.freeze({__proto__:null,ArcCurve:yc,CatmullRomCurve3:Oc,CubicBezierCurve:Cc,CubicBezierCurve3:Mc,EllipseCurve:vc,LineCurve:$c,LineCurve3:Pc,QuadraticBezierCurve:Rc,QuadraticBezierCurve3:jc,SplineCurve:Nc});class Ic extends bc{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);e.equals(t)||this.curves.push(new $c(t,e))}getPoint(e,t){const n=e*this.getLength(),r=this.getCurveLengths();let i=0;for(;i<r.length;){if(r[i]>=n){const e=r[i]-n,o=this.curves[i],s=o.getLength(),a=0===s?0:1-e/s;return o.getPointAt(a,t)}i++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let n=0,r=this.curves.length;n<r;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e}getSpacedPoints(e=40){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){const t=[];let n;for(let r=0,i=this.curves;r<i.length;r++){const o=i[r],s=o.isEllipseCurve?2*e:o.isLineCurve||o.isLineCurve3?1:o.isSplineCurve?e*o.points.length:e,a=o.getPoints(s);for(let e=0;e<a.length;e++){const r=a[e];n&&n.equals(r)||(t.push(r),n=r)}}return this.autoClose&&t.length>1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const n=e.curves[t];this.curves.push(n.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,n=this.curves.length;t<n;t++){const n=this.curves[t];e.curves.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const n=e.curves[t];this.curves.push((new Dc[n.type]).fromJSON(n))}return this}}class Lc extends Ic{constructor(e){super(),this.type="Path",this.currentPoint=new Cn,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y);return this}moveTo(e,t){return this.currentPoint.set(e,t),this}lineTo(e,t){const n=new $c(this.currentPoint.clone(),new Cn(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,n,r){const i=new Rc(this.currentPoint.clone(),new Cn(e,t),new Cn(n,r));return this.curves.push(i),this.currentPoint.set(n,r),this}bezierCurveTo(e,t,n,r,i,o){const s=new Cc(this.currentPoint.clone(),new Cn(e,t),new Cn(n,r),new Cn(i,o));return this.curves.push(s),this.currentPoint.set(i,o),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),n=new Nc(t);return this.curves.push(n),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,n,r,i,o){const s=this.currentPoint.x,a=this.currentPoint.y;return this.absarc(e+s,t+a,n,r,i,o),this}absarc(e,t,n,r,i,o){return this.absellipse(e,t,n,n,r,i,o),this}ellipse(e,t,n,r,i,o,s,a){const l=this.currentPoint.x,c=this.currentPoint.y;return this.absellipse(e+l,t+c,n,r,i,o,s,a),this}absellipse(e,t,n,r,i,o,s,a){const l=new vc(e,t,n,r,i,o,s,a);if(this.curves.length>0){const e=l.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(l);const c=l.getPoint(1);return this.currentPoint.copy(c),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class Bc extends Qi{constructor(e=[new Cn(0,.5),new Cn(.5,0),new Cn(0,-.5)],t=12,n=0,r=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:r},t=Math.floor(t),r=xn(r,0,2*Math.PI);const i=[],o=[],s=[],a=[],l=[],c=1/t,u=new sr,d=new Cn,h=new sr,p=new sr,f=new sr;let m=0,g=0;for(let t=0;t<=e.length-1;t++)switch(t){case 0:m=e[t+1].x-e[t].x,g=e[t+1].y-e[t].y,h.x=1*g,h.y=-m,h.z=0*g,f.copy(h),h.normalize(),a.push(h.x,h.y,h.z);break;case e.length-1:a.push(f.x,f.y,f.z);break;default:m=e[t+1].x-e[t].x,g=e[t+1].y-e[t].y,h.x=1*g,h.y=-m,h.z=0*g,p.copy(h),h.x+=f.x,h.y+=f.y,h.z+=f.z,h.normalize(),a.push(h.x,h.y,h.z),f.copy(p)}for(let i=0;i<=t;i++){const h=n+i*c*r,p=Math.sin(h),f=Math.cos(h);for(let n=0;n<=e.length-1;n++){u.x=e[n].x*p,u.y=e[n].y,u.z=e[n].x*f,o.push(u.x,u.y,u.z),d.x=i/t,d.y=n/(e.length-1),s.push(d.x,d.y);const r=a[3*n+0]*p,c=a[3*n+1],h=a[3*n+0]*f;l.push(r,c,h)}}for(let n=0;n<t;n++)for(let t=0;t<e.length-1;t++){const r=t+n*e.length,o=r,s=r+e.length,a=r+e.length+1,l=r+1;i.push(o,s,l),i.push(a,l,s)}this.setIndex(i),this.setAttribute("position",new ji(o,3)),this.setAttribute("uv",new ji(s,2)),this.setAttribute("normal",new ji(l,3))}static fromJSON(e){return new Bc(e.points,e.segments,e.phiStart,e.phiLength)}}class zc extends Bc{constructor(e=1,t=1,n=4,r=8){const i=new Lc;i.absarc(0,-t/2,e,1.5*Math.PI,0),i.absarc(0,t/2,e,0,.5*Math.PI),super(i.getPoints(n),r),this.type="CapsuleGeometry",this.parameters={radius:e,height:t,capSegments:n,radialSegments:r}}static fromJSON(e){return new zc(e.radius,e.length,e.capSegments,e.radialSegments)}}class Fc extends Qi{constructor(e=1,t=8,n=0,r=2*Math.PI){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},t=Math.max(3,t);const i=[],o=[],s=[],a=[],l=new sr,c=new Cn;o.push(0,0,0),s.push(0,0,1),a.push(.5,.5);for(let i=0,u=3;i<=t;i++,u+=3){const d=n+i/t*r;l.x=e*Math.cos(d),l.y=e*Math.sin(d),o.push(l.x,l.y,l.z),s.push(0,0,1),c.x=(o[u]/e+1)/2,c.y=(o[u+1]/e+1)/2,a.push(c.x,c.y)}for(let e=1;e<=t;e++)i.push(e,e+1,0);this.setIndex(i),this.setAttribute("position",new ji(o,3)),this.setAttribute("normal",new ji(s,3)),this.setAttribute("uv",new ji(a,2))}static fromJSON(e){return new Fc(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class Uc extends Qi{constructor(e=1,t=1,n=1,r=8,i=1,o=!1,s=0,a=2*Math.PI){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:s,thetaLength:a};const l=this;r=Math.floor(r),i=Math.floor(i);const c=[],u=[],d=[],h=[];let p=0;const f=[],m=n/2;let g=0;function b(n){const i=p,o=new Cn,f=new sr;let b=0;const v=!0===n?e:t,y=!0===n?1:-1;for(let e=1;e<=r;e++)u.push(0,m*y,0),d.push(0,y,0),h.push(.5,.5),p++;const S=p;for(let e=0;e<=r;e++){const t=e/r*a+s,n=Math.cos(t),i=Math.sin(t);f.x=v*i,f.y=m*y,f.z=v*n,u.push(f.x,f.y,f.z),d.push(0,y,0),o.x=.5*n+.5,o.y=.5*i*y+.5,h.push(o.x,o.y),p++}for(let e=0;e<r;e++){const t=i+e,r=S+e;!0===n?c.push(r,r+1,t):c.push(r+1,r,t),b+=3}l.addGroup(g,b,!0===n?1:2),g+=b}!function(){const o=new sr,b=new sr;let v=0;const y=(t-e)/n;for(let l=0;l<=i;l++){const c=[],g=l/i,v=g*(t-e)+e;for(let e=0;e<=r;e++){const t=e/r,i=t*a+s,l=Math.sin(i),f=Math.cos(i);b.x=v*l,b.y=-g*n+m,b.z=v*f,u.push(b.x,b.y,b.z),o.set(l,y,f).normalize(),d.push(o.x,o.y,o.z),h.push(t,1-g),c.push(p++)}f.push(c)}for(let e=0;e<r;e++)for(let t=0;t<i;t++){const n=f[t][e],r=f[t+1][e],i=f[t+1][e+1],o=f[t][e+1];c.push(n,r,o),c.push(r,i,o),v+=6}l.addGroup(g,v,0),g+=v}(),!1===o&&(e>0&&b(!0),t>0&&b(!1)),this.setIndex(c),this.setAttribute("position",new ji(u,3)),this.setAttribute("normal",new ji(d,3)),this.setAttribute("uv",new ji(h,2))}static fromJSON(e){return new Uc(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Qc extends Uc{constructor(e=1,t=1,n=8,r=1,i=!1,o=0,s=2*Math.PI){super(0,e,t,n,r,i,o,s),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:s}}static fromJSON(e){return new Qc(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class qc extends Qi{constructor(e=[],t=[],n=1,r=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:r};const i=[],o=[];function s(e,t,n,r){const i=r+1,o=[];for(let r=0;r<=i;r++){o[r]=[];const s=e.clone().lerp(n,r/i),a=t.clone().lerp(n,r/i),l=i-r;for(let e=0;e<=l;e++)o[r][e]=0===e&&r===i?s:s.clone().lerp(a,e/l)}for(let e=0;e<i;e++)for(let t=0;t<2*(i-e)-1;t++){const n=Math.floor(t/2);t%2==0?(a(o[e][n+1]),a(o[e+1][n]),a(o[e][n])):(a(o[e][n+1]),a(o[e+1][n+1]),a(o[e+1][n]))}}function a(e){i.push(e.x,e.y,e.z)}function l(t,n){const r=3*t;n.x=e[r+0],n.y=e[r+1],n.z=e[r+2]}function c(e,t,n,r){r<0&&1===e.x&&(o[t]=e.x-1),0===n.x&&0===n.z&&(o[t]=r/2/Math.PI+.5)}function u(e){return Math.atan2(e.z,-e.x)}!function(e){const n=new sr,r=new sr,i=new sr;for(let o=0;o<t.length;o+=3)l(t[o+0],n),l(t[o+1],r),l(t[o+2],i),s(n,r,i,e)}(r),function(e){const t=new sr;for(let n=0;n<i.length;n+=3)t.x=i[n+0],t.y=i[n+1],t.z=i[n+2],t.normalize().multiplyScalar(e),i[n+0]=t.x,i[n+1]=t.y,i[n+2]=t.z}(n),function(){const e=new sr;for(let n=0;n<i.length;n+=3){e.x=i[n+0],e.y=i[n+1],e.z=i[n+2];const r=u(e)/2/Math.PI+.5,s=(t=e,Math.atan2(-t.y,Math.sqrt(t.x*t.x+t.z*t.z))/Math.PI+.5);o.push(r,1-s)}var t;(function(){const e=new sr,t=new sr,n=new sr,r=new sr,s=new Cn,a=new Cn,l=new Cn;for(let d=0,h=0;d<i.length;d+=9,h+=6){e.set(i[d+0],i[d+1],i[d+2]),t.set(i[d+3],i[d+4],i[d+5]),n.set(i[d+6],i[d+7],i[d+8]),s.set(o[h+0],o[h+1]),a.set(o[h+2],o[h+3]),l.set(o[h+4],o[h+5]),r.copy(e).add(t).add(n).divideScalar(3);const p=u(r);c(s,h+0,e,p),c(a,h+2,t,p),c(l,h+4,n,p)}})(),function(){for(let e=0;e<o.length;e+=6){const t=o[e+0],n=o[e+2],r=o[e+4],i=Math.max(t,n,r),s=Math.min(t,n,r);i>.9&&s<.1&&(t<.2&&(o[e+0]+=1),n<.2&&(o[e+2]+=1),r<.2&&(o[e+4]+=1))}}()}(),this.setAttribute("position",new ji(i,3)),this.setAttribute("normal",new ji(i.slice(),3)),this.setAttribute("uv",new ji(o,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}static fromJSON(e){return new qc(e.vertices,e.indices,e.radius,e.details)}}class Gc extends qc{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2,r=1/n;super([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Gc(e.radius,e.detail)}}const Hc=new sr,Vc=new sr,Wc=new sr,Xc=new yi;class Yc extends Qi{constructor(e=null,t=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:t},null!==e){const n=4,r=Math.pow(10,n),i=Math.cos(yn*t),o=e.getIndex(),s=e.getAttribute("position"),a=o?o.count:s.count,l=[0,0,0],c=["a","b","c"],u=new Array(3),d={},h=[];for(let e=0;e<a;e+=3){o?(l[0]=o.getX(e),l[1]=o.getX(e+1),l[2]=o.getX(e+2)):(l[0]=e,l[1]=e+1,l[2]=e+2);const{a:t,b:n,c:a}=Xc;if(t.fromBufferAttribute(s,l[0]),n.fromBufferAttribute(s,l[1]),a.fromBufferAttribute(s,l[2]),Xc.getNormal(Wc),u[0]=`${Math.round(t.x*r)},${Math.round(t.y*r)},${Math.round(t.z*r)}`,u[1]=`${Math.round(n.x*r)},${Math.round(n.y*r)},${Math.round(n.z*r)}`,u[2]=`${Math.round(a.x*r)},${Math.round(a.y*r)},${Math.round(a.z*r)}`,u[0]!==u[1]&&u[1]!==u[2]&&u[2]!==u[0])for(let e=0;e<3;e++){const t=(e+1)%3,n=u[e],r=u[t],o=Xc[c[e]],s=Xc[c[t]],a=`${n}_${r}`,p=`${r}_${n}`;p in d&&d[p]?(Wc.dot(d[p].normal)<=i&&(h.push(o.x,o.y,o.z),h.push(s.x,s.y,s.z)),d[p]=null):a in d||(d[a]={index0:l[e],index1:l[t],normal:Wc.clone()})}}for(const e in d)if(d[e]){const{index0:t,index1:n}=d[e];Hc.fromBufferAttribute(s,t),Vc.fromBufferAttribute(s,n),h.push(Hc.x,Hc.y,Hc.z),h.push(Vc.x,Vc.y,Vc.z)}this.setAttribute("position",new ji(h,3))}}}class Zc extends Lc{constructor(e){super(e),this.uuid=_n(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let n=0,r=this.holes.length;n<r;n++)t[n]=this.holes[n].getPoints(e);return t}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const n=e.holes[t];this.holes.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,n=this.holes.length;t<n;t++){const n=this.holes[t];e.holes.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const n=e.holes[t];this.holes.push((new Lc).fromJSON(n))}return this}}const Jc=function(e,t,n=2){const r=t&&t.length,i=r?t[0]*n:e.length;let o=Kc(e,0,i,n,!0);const s=[];if(!o||o.next===o.prev)return s;let a,l,c,u,d,h,p;if(r&&(o=function(e,t,n,r){const i=[];let o,s,a,l,c;for(o=0,s=t.length;o<s;o++)a=t[o]*r,l=o<s-1?t[o+1]*r:e.length,c=Kc(e,a,l,r,!1),c===c.next&&(c.steiner=!0),i.push(uu(c));for(i.sort(su),o=0;o<i.length;o++)au(i[o],n),n=eu(n,n.next);return n}(e,t,o,n)),e.length>80*n){a=c=e[0],l=u=e[1];for(let t=n;t<i;t+=n)d=e[t],h=e[t+1],d<a&&(a=d),h<l&&(l=h),d>c&&(c=d),h>u&&(u=h);p=Math.max(c-a,u-l),p=0!==p?1/p:0}return tu(o,s,n,a,l,p),s};function Kc(e,t,n,r,i){let o,s;if(i===function(e,t,n,r){let i=0;for(let o=t,s=n-r;o<n;o+=r)i+=(e[s]-e[o])*(e[o+1]+e[s+1]),s=o;return i}(e,t,n,r)>0)for(o=t;o<n;o+=r)s=Su(o,e[o],e[o+1],s);else for(o=n-r;o>=t;o-=r)s=Su(o,e[o],e[o+1],s);return s&&fu(s,s.next)&&(_u(s),s=s.next),s}function eu(e,t){if(!e)return e;t||(t=e);let n,r=e;do{if(n=!1,r.steiner||!fu(r,r.next)&&0!==pu(r.prev,r,r.next))r=r.next;else{if(_u(r),r=t=r.prev,r===r.next)break;n=!0}}while(n||r!==t);return t}function tu(e,t,n,r,i,o,s){if(!e)return;!s&&o&&function(e,t,n,r){let i=e;do{null===i.z&&(i.z=cu(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){let t,n,r,i,o,s,a,l,c=1;do{for(n=e,e=null,o=null,s=0;n;){for(s++,r=n,a=0,t=0;t<c&&(a++,r=r.nextZ,r);t++);for(l=c;a>0||l>0&&r;)0!==a&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,a--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(s>1)}(i)}(e,r,i,o);let a,l,c=e;for(;e.prev!==e.next;)if(a=e.prev,l=e.next,o?ru(e,r,i,o):nu(e))t.push(a.i/n),t.push(e.i/n),t.push(l.i/n),_u(e),e=l.next,c=l.next;else if((e=l)===c){s?1===s?tu(e=iu(eu(e),t,n),t,n,r,i,o,2):2===s&&ou(e,t,n,r,i,o):tu(eu(e),t,n,r,i,o,1);break}}function nu(e){const t=e.prev,n=e,r=e.next;if(pu(t,n,r)>=0)return!1;let i=e.next.next;for(;i!==e.prev;){if(du(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&pu(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function ru(e,t,n,r){const i=e.prev,o=e,s=e.next;if(pu(i,o,s)>=0)return!1;const a=i.x<o.x?i.x<s.x?i.x:s.x:o.x<s.x?o.x:s.x,l=i.y<o.y?i.y<s.y?i.y:s.y:o.y<s.y?o.y:s.y,c=i.x>o.x?i.x>s.x?i.x:s.x:o.x>s.x?o.x:s.x,u=i.y>o.y?i.y>s.y?i.y:s.y:o.y>s.y?o.y:s.y,d=cu(a,l,t,n,r),h=cu(c,u,t,n,r);let p=e.prevZ,f=e.nextZ;for(;p&&p.z>=d&&f&&f.z<=h;){if(p!==e.prev&&p!==e.next&&du(i.x,i.y,o.x,o.y,s.x,s.y,p.x,p.y)&&pu(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,f!==e.prev&&f!==e.next&&du(i.x,i.y,o.x,o.y,s.x,s.y,f.x,f.y)&&pu(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(;p&&p.z>=d;){if(p!==e.prev&&p!==e.next&&du(i.x,i.y,o.x,o.y,s.x,s.y,p.x,p.y)&&pu(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;f&&f.z<=h;){if(f!==e.prev&&f!==e.next&&du(i.x,i.y,o.x,o.y,s.x,s.y,f.x,f.y)&&pu(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function iu(e,t,n){let r=e;do{const i=r.prev,o=r.next.next;!fu(i,o)&&mu(i,r,r.next,o)&&vu(i,o)&&vu(o,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(o.i/n),_u(r),_u(r.next),r=e=o),r=r.next}while(r!==e);return eu(r)}function ou(e,t,n,r,i,o){let s=e;do{let e=s.next.next;for(;e!==s.prev;){if(s.i!==e.i&&hu(s,e)){let a=yu(s,e);return s=eu(s,s.next),a=eu(a,a.next),tu(s,t,n,r,i,o),void tu(a,t,n,r,i,o)}e=e.next}s=s.next}while(s!==e)}function su(e,t){return e.x-t.x}function au(e,t){if(t=function(e,t){let n=t;const r=e.x,i=e.y;let o,s=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){const e=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(e<=r&&e>s){if(s=e,e===r){if(i===n.y)return n;if(i===n.next.y)return n.next}o=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!o)return null;if(r===s)return o;const a=o,l=o.x,c=o.y;let u,d=1/0;n=o;do{r>=n.x&&n.x>=l&&r!==n.x&&du(i<c?r:s,i,l,c,i<c?s:r,i,n.x,n.y)&&(u=Math.abs(i-n.y)/(r-n.x),vu(n,e)&&(u<d||u===d&&(n.x>o.x||n.x===o.x&&lu(o,n)))&&(o=n,d=u)),n=n.next}while(n!==a);return o}(e,t)){const n=yu(t,e);eu(t,t.next),eu(n,n.next)}}function lu(e,t){return pu(e.prev,e,t.prev)<0&&pu(t.next,e,e.next)<0}function cu(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function uu(e){let t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function du(e,t,n,r,i,o,s,a){return(i-s)*(t-a)-(e-s)*(o-a)>=0&&(e-s)*(r-a)-(n-s)*(t-a)>=0&&(n-s)*(o-a)-(i-s)*(r-a)>=0}function hu(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&mu(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(vu(e,t)&&vu(t,e)&&function(e,t){let n=e,r=!1;const i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(pu(e.prev,e,t.prev)||pu(e,t.prev,t))||fu(e,t)&&pu(e.prev,e,e.next)>0&&pu(t.prev,t,t.next)>0)}function pu(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function fu(e,t){return e.x===t.x&&e.y===t.y}function mu(e,t,n,r){const i=bu(pu(e,t,n)),o=bu(pu(e,t,r)),s=bu(pu(n,r,e)),a=bu(pu(n,r,t));return i!==o&&s!==a||(!(0!==i||!gu(e,n,t))||(!(0!==o||!gu(e,r,t))||(!(0!==s||!gu(n,e,r))||!(0!==a||!gu(n,t,r)))))}function gu(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function bu(e){return e>0?1:e<0?-1:0}function vu(e,t){return pu(e.prev,e,e.next)<0?pu(e,t,e.next)>=0&&pu(e,e.prev,t)>=0:pu(e,t,e.prev)<0||pu(e,e.next,t)<0}function yu(e,t){const n=new xu(e.i,e.x,e.y),r=new xu(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function Su(e,t,n,r){const i=new xu(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function _u(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function xu(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}class wu{static area(e){const t=e.length;let n=0;for(let r=t-1,i=0;i<t;r=i++)n+=e[r].x*e[i].y-e[i].x*e[r].y;return.5*n}static isClockWise(e){return wu.area(e)<0}static triangulateShape(e,t){const n=[],r=[],i=[];ku(e),Ou(n,e);let o=e.length;t.forEach(ku);for(let e=0;e<t.length;e++)r.push(o),o+=t[e].length,Ou(n,t[e]);const s=Jc(n,r);for(let e=0;e<s.length;e+=3)i.push(s.slice(e,e+3));return i}}function ku(e){const t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function Ou(e,t){for(let n=0;n<t.length;n++)e.push(t[n].x),e.push(t[n].y)}class Eu extends Qi{constructor(e=new Zc([new Cn(.5,.5),new Cn(-.5,.5),new Cn(-.5,-.5),new Cn(.5,-.5)]),t={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const n=this,r=[],i=[];for(let t=0,n=e.length;t<n;t++){o(e[t])}function o(e){const o=[],s=void 0!==t.curveSegments?t.curveSegments:12,a=void 0!==t.steps?t.steps:1;let l=void 0!==t.depth?t.depth:1,c=void 0===t.bevelEnabled||t.bevelEnabled,u=void 0!==t.bevelThickness?t.bevelThickness:.2,d=void 0!==t.bevelSize?t.bevelSize:u-.1,h=void 0!==t.bevelOffset?t.bevelOffset:0,p=void 0!==t.bevelSegments?t.bevelSegments:3;const f=t.extrudePath,m=void 0!==t.UVGenerator?t.UVGenerator:Au;void 0!==t.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),l=t.amount);let g,b,v,y,S,_=!1;f&&(g=f.getSpacedPoints(a),_=!0,c=!1,b=f.computeFrenetFrames(a,!1),v=new sr,y=new sr,S=new sr),c||(p=0,u=0,d=0,h=0);const x=e.extractPoints(s);let w=x.shape;const k=x.holes;if(!wu.isClockWise(w)){w=w.reverse();for(let e=0,t=k.length;e<t;e++){const t=k[e];wu.isClockWise(t)&&(k[e]=t.reverse())}}const O=wu.triangulateShape(w,k),E=w;for(let e=0,t=k.length;e<t;e++){const t=k[e];w=w.concat(t)}function A(e,t,n){return t||console.error("THREE.ExtrudeGeometry: vec does not exist"),t.clone().multiplyScalar(n).add(e)}const T=w.length,C=O.length;function M(e,t,n){let r,i,o;const s=e.x-t.x,a=e.y-t.y,l=n.x-e.x,c=n.y-e.y,u=s*s+a*a,d=s*c-a*l;if(Math.abs(d)>Number.EPSILON){const d=Math.sqrt(u),h=Math.sqrt(l*l+c*c),p=t.x-a/d,f=t.y+s/d,m=((n.x-c/h-p)*c-(n.y+l/h-f)*l)/(s*c-a*l);r=p+s*m-e.x,i=f+a*m-e.y;const g=r*r+i*i;if(g<=2)return new Cn(r,i);o=Math.sqrt(g/2)}else{let e=!1;s>Number.EPSILON?l>Number.EPSILON&&(e=!0):s<-Number.EPSILON?l<-Number.EPSILON&&(e=!0):Math.sign(a)===Math.sign(c)&&(e=!0),e?(r=-a,i=s,o=Math.sqrt(u)):(r=s,i=a,o=Math.sqrt(u/2))}return new Cn(r/o,i/o)}const $=[];for(let e=0,t=E.length,n=t-1,r=e+1;e<t;e++,n++,r++)n===t&&(n=0),r===t&&(r=0),$[e]=M(E[e],E[n],E[r]);const P=[];let R,j=$.concat();for(let e=0,t=k.length;e<t;e++){const t=k[e];R=[];for(let e=0,n=t.length,r=n-1,i=e+1;e<n;e++,r++,i++)r===n&&(r=0),i===n&&(i=0),R[e]=M(t[e],t[r],t[i]);P.push(R),j=j.concat(R)}for(let e=0;e<p;e++){const t=e/p,n=u*Math.cos(t*Math.PI/2),r=d*Math.sin(t*Math.PI/2)+h;for(let e=0,t=E.length;e<t;e++){const t=A(E[e],$[e],r);I(t.x,t.y,-n)}for(let e=0,t=k.length;e<t;e++){const t=k[e];R=P[e];for(let e=0,i=t.length;e<i;e++){const i=A(t[e],R[e],r);I(i.x,i.y,-n)}}}const N=d+h;for(let e=0;e<T;e++){const t=c?A(w[e],j[e],N):w[e];_?(y.copy(b.normals[0]).multiplyScalar(t.x),v.copy(b.binormals[0]).multiplyScalar(t.y),S.copy(g[0]).add(y).add(v),I(S.x,S.y,S.z)):I(t.x,t.y,0)}for(let e=1;e<=a;e++)for(let t=0;t<T;t++){const n=c?A(w[t],j[t],N):w[t];_?(y.copy(b.normals[e]).multiplyScalar(n.x),v.copy(b.binormals[e]).multiplyScalar(n.y),S.copy(g[e]).add(y).add(v),I(S.x,S.y,S.z)):I(n.x,n.y,l/a*e)}for(let e=p-1;e>=0;e--){const t=e/p,n=u*Math.cos(t*Math.PI/2),r=d*Math.sin(t*Math.PI/2)+h;for(let e=0,t=E.length;e<t;e++){const t=A(E[e],$[e],r);I(t.x,t.y,l+n)}for(let e=0,t=k.length;e<t;e++){const t=k[e];R=P[e];for(let e=0,i=t.length;e<i;e++){const i=A(t[e],R[e],r);_?I(i.x,i.y+g[a-1].y,g[a-1].x+n):I(i.x,i.y,l+n)}}}function D(e,t){let n=e.length;for(;--n>=0;){const r=n;let i=n-1;i<0&&(i=e.length-1);for(let e=0,n=a+2*p;e<n;e++){const n=T*e,o=T*(e+1);B(t+r+n,t+i+n,t+i+o,t+r+o)}}}function I(e,t,n){o.push(e),o.push(t),o.push(n)}function L(e,t,i){z(e),z(t),z(i);const o=r.length/3,s=m.generateTopUV(n,r,o-3,o-2,o-1);F(s[0]),F(s[1]),F(s[2])}function B(e,t,i,o){z(e),z(t),z(o),z(t),z(i),z(o);const s=r.length/3,a=m.generateSideWallUV(n,r,s-6,s-3,s-2,s-1);F(a[0]),F(a[1]),F(a[3]),F(a[1]),F(a[2]),F(a[3])}function z(e){r.push(o[3*e+0]),r.push(o[3*e+1]),r.push(o[3*e+2])}function F(e){i.push(e.x),i.push(e.y)}!function(){const e=r.length/3;if(c){let e=0,t=T*e;for(let e=0;e<C;e++){const n=O[e];L(n[2]+t,n[1]+t,n[0]+t)}e=a+2*p,t=T*e;for(let e=0;e<C;e++){const n=O[e];L(n[0]+t,n[1]+t,n[2]+t)}}else{for(let e=0;e<C;e++){const t=O[e];L(t[2],t[1],t[0])}for(let e=0;e<C;e++){const t=O[e];L(t[0]+T*a,t[1]+T*a,t[2]+T*a)}}n.addGroup(e,r.length/3-e,0)}(),function(){const e=r.length/3;let t=0;D(E,t),t+=E.length;for(let e=0,n=k.length;e<n;e++){const n=k[e];D(n,t),t+=n.length}n.addGroup(e,r.length/3-e,1)}()}this.setAttribute("position",new ji(r,3)),this.setAttribute("uv",new ji(i,2)),this.computeVertexNormals()}toJSON(){const e=super.toJSON();return function(e,t,n){if(n.shapes=[],Array.isArray(e))for(let t=0,r=e.length;t<r;t++){const r=e[t];n.shapes.push(r.uuid)}else n.shapes.push(e.uuid);void 0!==t.extrudePath&&(n.options.extrudePath=t.extrudePath.toJSON());return n}(this.parameters.shapes,this.parameters.options,e)}static fromJSON(e,t){const n=[];for(let r=0,i=e.shapes.length;r<i;r++){const i=t[e.shapes[r]];n.push(i)}const r=e.options.extrudePath;return void 0!==r&&(e.options.extrudePath=(new Dc[r.type]).fromJSON(r)),new Eu(n,e.options)}}const Au={generateTopUV:function(e,t,n,r,i){const o=t[3*n],s=t[3*n+1],a=t[3*r],l=t[3*r+1],c=t[3*i],u=t[3*i+1];return[new Cn(o,s),new Cn(a,l),new Cn(c,u)]},generateSideWallUV:function(e,t,n,r,i,o){const s=t[3*n],a=t[3*n+1],l=t[3*n+2],c=t[3*r],u=t[3*r+1],d=t[3*r+2],h=t[3*i],p=t[3*i+1],f=t[3*i+2],m=t[3*o],g=t[3*o+1],b=t[3*o+2];return Math.abs(a-u)<Math.abs(s-c)?[new Cn(s,1-l),new Cn(c,1-d),new Cn(h,1-f),new Cn(m,1-b)]:[new Cn(a,1-l),new Cn(u,1-d),new Cn(p,1-f),new Cn(g,1-b)]}};class Tu extends qc{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2;super([-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],e,t),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Tu(e.radius,e.detail)}}class Cu extends qc{constructor(e=1,t=0){super([1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],e,t),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Cu(e.radius,e.detail)}}class Mu extends Qi{constructor(e=.5,t=1,n=8,r=1,i=0,o=2*Math.PI){super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},n=Math.max(3,n);const s=[],a=[],l=[],c=[];let u=e;const d=(t-e)/(r=Math.max(1,r)),h=new sr,p=new Cn;for(let e=0;e<=r;e++){for(let e=0;e<=n;e++){const r=i+e/n*o;h.x=u*Math.cos(r),h.y=u*Math.sin(r),a.push(h.x,h.y,h.z),l.push(0,0,1),p.x=(h.x/t+1)/2,p.y=(h.y/t+1)/2,c.push(p.x,p.y)}u+=d}for(let e=0;e<r;e++){const t=e*(n+1);for(let e=0;e<n;e++){const r=e+t,i=r,o=r+n+1,a=r+n+2,l=r+1;s.push(i,o,l),s.push(o,a,l)}}this.setIndex(s),this.setAttribute("position",new ji(a,3)),this.setAttribute("normal",new ji(l,3)),this.setAttribute("uv",new ji(c,2))}static fromJSON(e){return new Mu(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class $u extends Qi{constructor(e=new Zc([new Cn(0,.5),new Cn(-.5,-.5),new Cn(.5,-.5)]),t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const n=[],r=[],i=[],o=[];let s=0,a=0;if(!1===Array.isArray(e))l(e);else for(let t=0;t<e.length;t++)l(e[t]),this.addGroup(s,a,t),s+=a,a=0;function l(e){const s=r.length/3,l=e.extractPoints(t);let c=l.shape;const u=l.holes;!1===wu.isClockWise(c)&&(c=c.reverse());for(let e=0,t=u.length;e<t;e++){const t=u[e];!0===wu.isClockWise(t)&&(u[e]=t.reverse())}const d=wu.triangulateShape(c,u);for(let e=0,t=u.length;e<t;e++){const t=u[e];c=c.concat(t)}for(let e=0,t=c.length;e<t;e++){const t=c[e];r.push(t.x,t.y,0),i.push(0,0,1),o.push(t.x,t.y)}for(let e=0,t=d.length;e<t;e++){const t=d[e],r=t[0]+s,i=t[1]+s,o=t[2]+s;n.push(r,i,o),a+=3}}this.setIndex(n),this.setAttribute("position",new ji(r,3)),this.setAttribute("normal",new ji(i,3)),this.setAttribute("uv",new ji(o,2))}toJSON(){const e=super.toJSON();return function(e,t){if(t.shapes=[],Array.isArray(e))for(let n=0,r=e.length;n<r;n++){const r=e[n];t.shapes.push(r.uuid)}else t.shapes.push(e.uuid);return t}(this.parameters.shapes,e)}static fromJSON(e,t){const n=[];for(let r=0,i=e.shapes.length;r<i;r++){const i=t[e.shapes[r]];n.push(i)}return new $u(n,e.curveSegments)}}class Pu extends Qi{constructor(e=1,t=32,n=16,r=0,i=2*Math.PI,o=0,s=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:s},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const a=Math.min(o+s,Math.PI);let l=0;const c=[],u=new sr,d=new sr,h=[],p=[],f=[],m=[];for(let h=0;h<=n;h++){const g=[],b=h/n;let v=0;0==h&&0==o?v=.5/t:h==n&&a==Math.PI&&(v=-.5/t);for(let n=0;n<=t;n++){const a=n/t;u.x=-e*Math.cos(r+a*i)*Math.sin(o+b*s),u.y=e*Math.cos(o+b*s),u.z=e*Math.sin(r+a*i)*Math.sin(o+b*s),p.push(u.x,u.y,u.z),d.copy(u).normalize(),f.push(d.x,d.y,d.z),m.push(a+v,1-b),g.push(l++)}c.push(g)}for(let e=0;e<n;e++)for(let r=0;r<t;r++){const t=c[e][r+1],i=c[e][r],s=c[e+1][r],l=c[e+1][r+1];(0!==e||o>0)&&h.push(t,i,l),(e!==n-1||a<Math.PI)&&h.push(i,s,l)}this.setIndex(h),this.setAttribute("position",new ji(p,3)),this.setAttribute("normal",new ji(f,3)),this.setAttribute("uv",new ji(m,2))}static fromJSON(e){return new Pu(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class Ru extends qc{constructor(e=1,t=0){super([1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],e,t),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Ru(e.radius,e.detail)}}class ju extends Qi{constructor(e=1,t=.4,n=8,r=6,i=2*Math.PI){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:n,tubularSegments:r,arc:i},n=Math.floor(n),r=Math.floor(r);const o=[],s=[],a=[],l=[],c=new sr,u=new sr,d=new sr;for(let o=0;o<=n;o++)for(let h=0;h<=r;h++){const p=h/r*i,f=o/n*Math.PI*2;u.x=(e+t*Math.cos(f))*Math.cos(p),u.y=(e+t*Math.cos(f))*Math.sin(p),u.z=t*Math.sin(f),s.push(u.x,u.y,u.z),c.x=e*Math.cos(p),c.y=e*Math.sin(p),d.subVectors(u,c).normalize(),a.push(d.x,d.y,d.z),l.push(h/r),l.push(o/n)}for(let e=1;e<=n;e++)for(let t=1;t<=r;t++){const n=(r+1)*e+t-1,i=(r+1)*(e-1)+t-1,s=(r+1)*(e-1)+t,a=(r+1)*e+t;o.push(n,i,a),o.push(i,s,a)}this.setIndex(o),this.setAttribute("position",new ji(s,3)),this.setAttribute("normal",new ji(a,3)),this.setAttribute("uv",new ji(l,2))}static fromJSON(e){return new ju(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class Nu extends Qi{constructor(e=1,t=.4,n=64,r=8,i=2,o=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:n,radialSegments:r,p:i,q:o},n=Math.floor(n),r=Math.floor(r);const s=[],a=[],l=[],c=[],u=new sr,d=new sr,h=new sr,p=new sr,f=new sr,m=new sr,g=new sr;for(let s=0;s<=n;++s){const v=s/n*i*Math.PI*2;b(v,i,o,e,h),b(v+.01,i,o,e,p),m.subVectors(p,h),g.addVectors(p,h),f.crossVectors(m,g),g.crossVectors(f,m),f.normalize(),g.normalize();for(let e=0;e<=r;++e){const i=e/r*Math.PI*2,o=-t*Math.cos(i),p=t*Math.sin(i);u.x=h.x+(o*g.x+p*f.x),u.y=h.y+(o*g.y+p*f.y),u.z=h.z+(o*g.z+p*f.z),a.push(u.x,u.y,u.z),d.subVectors(u,h).normalize(),l.push(d.x,d.y,d.z),c.push(s/n),c.push(e/r)}}for(let e=1;e<=n;e++)for(let t=1;t<=r;t++){const n=(r+1)*(e-1)+(t-1),i=(r+1)*e+(t-1),o=(r+1)*e+t,a=(r+1)*(e-1)+t;s.push(n,i,a),s.push(i,o,a)}function b(e,t,n,r,i){const o=Math.cos(e),s=Math.sin(e),a=n/t*e,l=Math.cos(a);i.x=r*(2+l)*.5*o,i.y=r*(2+l)*s*.5,i.z=r*Math.sin(a)*.5}this.setIndex(s),this.setAttribute("position",new ji(a,3)),this.setAttribute("normal",new ji(l,3)),this.setAttribute("uv",new ji(c,2))}static fromJSON(e){return new Nu(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}class Du extends Qi{constructor(e=new jc(new sr(-1,-1,0),new sr(-1,1,0),new sr(1,1,0)),t=64,n=1,r=8,i=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:r,closed:i};const o=e.computeFrenetFrames(t,i);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;const s=new sr,a=new sr,l=new Cn;let c=new sr;const u=[],d=[],h=[],p=[];function f(i){c=e.getPointAt(i/t,c);const l=o.normals[i],h=o.binormals[i];for(let e=0;e<=r;e++){const t=e/r*Math.PI*2,i=Math.sin(t),o=-Math.cos(t);a.x=o*l.x+i*h.x,a.y=o*l.y+i*h.y,a.z=o*l.z+i*h.z,a.normalize(),d.push(a.x,a.y,a.z),s.x=c.x+n*a.x,s.y=c.y+n*a.y,s.z=c.z+n*a.z,u.push(s.x,s.y,s.z)}}!function(){for(let e=0;e<t;e++)f(e);f(!1===i?t:0),function(){for(let e=0;e<=t;e++)for(let n=0;n<=r;n++)l.x=e/t,l.y=n/r,h.push(l.x,l.y)}(),function(){for(let e=1;e<=t;e++)for(let t=1;t<=r;t++){const n=(r+1)*(e-1)+(t-1),i=(r+1)*e+(t-1),o=(r+1)*e+t,s=(r+1)*(e-1)+t;p.push(n,i,s),p.push(i,o,s)}}()}(),this.setIndex(p),this.setAttribute("position",new ji(u,3)),this.setAttribute("normal",new ji(d,3)),this.setAttribute("uv",new ji(h,2))}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new Du((new Dc[e.path.type]).fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class Iu extends Qi{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},null!==e){const t=[],n=new Set,r=new sr,i=new sr;if(null!==e.index){const o=e.attributes.position,s=e.index;let a=e.groups;0===a.length&&(a=[{start:0,count:s.count,materialIndex:0}]);for(let e=0,l=a.length;e<l;++e){const l=a[e],c=l.start;for(let e=c,a=c+l.count;e<a;e+=3)for(let a=0;a<3;a++){const l=s.getX(e+a),c=s.getX(e+(a+1)%3);r.fromBufferAttribute(o,l),i.fromBufferAttribute(o,c),!0===Lu(r,i,n)&&(t.push(r.x,r.y,r.z),t.push(i.x,i.y,i.z))}}}else{const o=e.attributes.position;for(let e=0,s=o.count/3;e<s;e++)for(let s=0;s<3;s++){const a=3*e+s,l=3*e+(s+1)%3;r.fromBufferAttribute(o,a),i.fromBufferAttribute(o,l),!0===Lu(r,i,n)&&(t.push(r.x,r.y,r.z),t.push(i.x,i.y,i.z))}}this.setAttribute("position",new ji(t,3))}}}function Lu(e,t,n){const r=`${e.x},${e.y},${e.z}-${t.x},${t.y},${t.z}`,i=`${t.x},${t.y},${t.z}-${e.x},${e.y},${e.z}`;return!0!==n.has(r)&&!0!==n.has(i)&&(n.add(r),n.add(i),!0)}var Bu=Object.freeze({__proto__:null,BoxGeometry:co,BoxBufferGeometry:co,CapsuleGeometry:zc,CapsuleBufferGeometry:zc,CircleGeometry:Fc,CircleBufferGeometry:Fc,ConeGeometry:Qc,ConeBufferGeometry:Qc,CylinderGeometry:Uc,CylinderBufferGeometry:Uc,DodecahedronGeometry:Gc,DodecahedronBufferGeometry:Gc,EdgesGeometry:Yc,ExtrudeGeometry:Eu,ExtrudeBufferGeometry:Eu,IcosahedronGeometry:Tu,IcosahedronBufferGeometry:Tu,LatheGeometry:Bc,LatheBufferGeometry:Bc,OctahedronGeometry:Cu,OctahedronBufferGeometry:Cu,PlaneGeometry:Co,PlaneBufferGeometry:Co,PolyhedronGeometry:qc,PolyhedronBufferGeometry:qc,RingGeometry:Mu,RingBufferGeometry:Mu,ShapeGeometry:$u,ShapeBufferGeometry:$u,SphereGeometry:Pu,SphereBufferGeometry:Pu,TetrahedronGeometry:Ru,TetrahedronBufferGeometry:Ru,TorusGeometry:ju,TorusBufferGeometry:ju,TorusKnotGeometry:Nu,TorusKnotBufferGeometry:Nu,TubeGeometry:Du,TubeBufferGeometry:Du,WireframeGeometry:Iu});class zu extends _i{constructor(e){super(),this.type="ShadowMaterial",this.color=new Gn(0),this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.fog=e.fog,this}}zu.prototype.isShadowMaterial=!0;class Fu extends fo{constructor(e){super(e),this.type="RawShaderMaterial"}}Fu.prototype.isRawShaderMaterial=!0;class Uu extends _i{constructor(e){super(),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Gn(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Dt,this.normalScale=new Cn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}Uu.prototype.isMeshStandardMaterial=!0;class Qu extends Uu{constructor(e){super(),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Cn(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return xn(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(e){this.ior=(1+.4*e)/(1-.4*e)}}),this.sheenColor=new Gn(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=0,this.attenuationColor=new Gn(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new Gn(1,1,1),this.specularColorMap=null,this._sheen=0,this._clearcoat=0,this._transmission=0,this.setValues(e)}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}Qu.prototype.isMeshPhysicalMaterial=!0;class qu extends _i{constructor(e){super(),this.type="MeshPhongMaterial",this.color=new Gn(16777215),this.specular=new Gn(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Dt,this.normalScale=new Cn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=X,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}qu.prototype.isMeshPhongMaterial=!0;class Gu extends _i{constructor(e){super(),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Gn(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Dt,this.normalScale=new Cn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}Gu.prototype.isMeshToonMaterial=!0;class Hu extends _i{constructor(e){super(),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Dt,this.normalScale=new Cn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}Hu.prototype.isMeshNormalMaterial=!0;class Vu extends _i{constructor(e){super(),this.type="MeshLambertMaterial",this.color=new Gn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Gn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=X,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}Vu.prototype.isMeshLambertMaterial=!0;class Wu extends _i{constructor(e){super(),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Gn(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Dt,this.normalScale=new Cn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}Wu.prototype.isMeshMatcapMaterial=!0;class Xu extends Xl{constructor(e){super(),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}Xu.prototype.isLineDashedMaterial=!0;const Yu={ShadowMaterial:zu,SpriteMaterial:pl,RawShaderMaterial:Fu,ShaderMaterial:fo,PointsMaterial:sc,MeshPhysicalMaterial:Qu,MeshStandardMaterial:Uu,MeshPhongMaterial:qu,MeshToonMaterial:Gu,MeshNormalMaterial:Hu,MeshLambertMaterial:Vu,MeshDepthMaterial:Ha,MeshDistanceMaterial:Va,MeshBasicMaterial:xi,MeshMatcapMaterial:Wu,LineDashedMaterial:Xu,LineBasicMaterial:Xl,Material:_i};_i.fromType=function(e){return new Yu[e]};const Zu={arraySlice:function(e,t,n){return Zu.isTypedArray(e)?new e.constructor(e.subarray(t,void 0!==n?n:e.length)):e.slice(t,n)},convertArray:function(e,t,n){return!e||!n&&e.constructor===t?e:"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)},isTypedArray:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},getKeyframeOrder:function(e){const t=e.length,n=new Array(t);for(let e=0;e!==t;++e)n[e]=e;return n.sort((function(t,n){return e[t]-e[n]})),n},sortedArray:function(e,t,n){const r=e.length,i=new e.constructor(r);for(let o=0,s=0;s!==r;++o){const r=n[o]*t;for(let n=0;n!==t;++n)i[s++]=e[r+n]}return i},flattenJSON:function(e,t,n,r){let i=1,o=e[0];for(;void 0!==o&&void 0===o[r];)o=e[i++];if(void 0===o)return;let s=o[r];if(void 0!==s)if(Array.isArray(s))do{s=o[r],void 0!==s&&(t.push(o.time),n.push.apply(n,s)),o=e[i++]}while(void 0!==o);else if(void 0!==s.toArray)do{s=o[r],void 0!==s&&(t.push(o.time),s.toArray(n,n.length)),o=e[i++]}while(void 0!==o);else do{s=o[r],void 0!==s&&(t.push(o.time),n.push(s)),o=e[i++]}while(void 0!==o)},subclip:function(e,t,n,r,i=30){const o=e.clone();o.name=t;const s=[];for(let e=0;e<o.tracks.length;++e){const t=o.tracks[e],a=t.getValueSize(),l=[],c=[];for(let e=0;e<t.times.length;++e){const o=t.times[e]*i;if(!(o<n||o>=r)){l.push(t.times[e]);for(let n=0;n<a;++n)c.push(t.values[e*a+n])}}0!==l.length&&(t.times=Zu.convertArray(l,t.times.constructor),t.values=Zu.convertArray(c,t.values.constructor),s.push(t))}o.tracks=s;let a=1/0;for(let e=0;e<o.tracks.length;++e)a>o.tracks[e].times[0]&&(a=o.tracks[e].times[0]);for(let e=0;e<o.tracks.length;++e)o.tracks[e].shift(-1*a);return o.resetDuration(),o},makeClipAdditive:function(e,t=0,n=e,r=30){r<=0&&(r=30);const i=n.tracks.length,o=t/r;for(let t=0;t<i;++t){const r=n.tracks[t],i=r.ValueTypeName;if("bool"===i||"string"===i)continue;const s=e.tracks.find((function(e){return e.name===r.name&&e.ValueTypeName===i}));if(void 0===s)continue;let a=0;const l=r.getValueSize();r.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(a=l/3);let c=0;const u=s.getValueSize();s.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(c=u/3);const d=r.times.length-1;let h;if(o<=r.times[0]){const e=a,t=l-a;h=Zu.arraySlice(r.values,e,t)}else if(o>=r.times[d]){const e=d*l+a,t=e+l-a;h=Zu.arraySlice(r.values,e,t)}else{const e=r.createInterpolant(),t=a,n=l-a;e.evaluate(o),h=Zu.arraySlice(e.resultBuffer,t,n)}if("quaternion"===i){(new or).fromArray(h).normalize().conjugate().toArray(h)}const p=s.times.length;for(let e=0;e<p;++e){const t=e*u+c;if("quaternion"===i)or.multiplyQuaternionsFlat(s.values,t,h,0,s.values,t);else{const e=u-2*c;for(let n=0;n<e;++n)s.values[t+n]-=h[n]}}}return e.blendMode=Tt,e}};class Ju{constructor(e,t,n,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,r=t[n],i=t[n-1];e:{t:{let o;n:{r:if(!(e<r)){for(let o=n+2;;){if(void 0===r){if(e<i)break r;return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,e,i)}if(n===o)break;if(i=r,r=t[++n],e<r)break t}o=t.length;break n}if(e>=i)break e;{const s=t[1];e<s&&(n=2,i=s);for(let o=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,e,r);if(n===o)break;if(r=i,i=t[--n-1],e>=i)break t}o=n,n=0}}for(;n<o;){const r=n+o>>>1;e<t[r]?o=r:n=r+1}if(r=t[n],i=t[n-1],void 0===i)return this._cachedIndex=0,this.beforeStart_(0,e,r);if(void 0===r)return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,i,e)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,e,r)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r;for(let e=0;e!==r;++e)t[e]=n[i+e];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}Ju.prototype.beforeStart_=Ju.prototype.copySampleValue_,Ju.prototype.afterEnd_=Ju.prototype.copySampleValue_;class Ku extends Ju{constructor(e,t,n,r){super(e,t,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:kt,endingEnd:kt}}intervalChanged_(e,t,n){const r=this.parameterPositions;let i=e-2,o=e+1,s=r[i],a=r[o];if(void 0===s)switch(this.getSettings_().endingStart){case Ot:i=e,s=2*t-n;break;case Et:i=r.length-2,s=t+r[i]-r[i+1];break;default:i=e,s=n}if(void 0===a)switch(this.getSettings_().endingEnd){case Ot:o=e,a=2*n-t;break;case Et:o=1,a=n+r[1]-r[0];break;default:o=e-1,a=t}const l=.5*(n-t),c=this.valueSize;this._weightPrev=l/(t-s),this._weightNext=l/(a-n),this._offsetPrev=i*c,this._offsetNext=o*c}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,s=this.valueSize,a=e*s,l=a-s,c=this._offsetPrev,u=this._offsetNext,d=this._weightPrev,h=this._weightNext,p=(n-t)/(r-t),f=p*p,m=f*p,g=-d*m+2*d*f-d*p,b=(1+d)*m+(-1.5-2*d)*f+(-.5+d)*p+1,v=(-1-h)*m+(1.5+h)*f+.5*p,y=h*m-h*f;for(let e=0;e!==s;++e)i[e]=g*o[c+e]+b*o[l+e]+v*o[a+e]+y*o[u+e];return i}}class ed extends Ju{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,s=this.valueSize,a=e*s,l=a-s,c=(n-t)/(r-t),u=1-c;for(let e=0;e!==s;++e)i[e]=o[l+e]*u+o[a+e]*c;return i}}class td extends Ju{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e){return this.copySampleValue_(e-1)}}class nd{constructor(e,t,n,r){if(void 0===e)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=Zu.convertArray(t,this.TimeBufferType),this.values=Zu.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:Zu.convertArray(e.times,Array),values:Zu.convertArray(e.values,Array)};const t=e.getInterpolation();t!==e.DefaultInterpolation&&(n.interpolation=t)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new td(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new ed(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new Ku(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case _t:t=this.InterpolantFactoryMethodDiscrete;break;case xt:t=this.InterpolantFactoryMethodLinear;break;case wt:t=this.InterpolantFactoryMethodSmooth}if(void 0===t){const t="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(t);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",t),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return _t;case this.InterpolantFactoryMethodLinear:return xt;case this.InterpolantFactoryMethodSmooth:return wt}}getValueSize(){return this.values.length/this.times.length}shift(e){if(0!==e){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]+=e}return this}scale(e){if(1!==e){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]*=e}return this}trim(e,t){const n=this.times,r=n.length;let i=0,o=r-1;for(;i!==r&&n[i]<e;)++i;for(;-1!==o&&n[o]>t;)--o;if(++o,0!==i||o!==r){i>=o&&(o=Math.max(o,1),i=o-1);const e=this.getValueSize();this.times=Zu.arraySlice(n,i,o),this.values=Zu.arraySlice(this.values,i*e,o*e)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let t=0;t!==i;t++){const r=n[t];if("number"==typeof r&&isNaN(r)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,t,r),e=!1;break}if(null!==o&&o>r){console.error("THREE.KeyframeTrack: Out of order keys.",this,t,r,o),e=!1;break}o=r}if(void 0!==r&&Zu.isTypedArray(r))for(let t=0,n=r.length;t!==n;++t){const n=r[t];if(isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,t,n),e=!1;break}}return e}optimize(){const e=Zu.arraySlice(this.times),t=Zu.arraySlice(this.values),n=this.getValueSize(),r=this.getInterpolation()===wt,i=e.length-1;let o=1;for(let s=1;s<i;++s){let i=!1;const a=e[s];if(a!==e[s+1]&&(1!==s||a!==e[0]))if(r)i=!0;else{const e=s*n,r=e-n,o=e+n;for(let s=0;s!==n;++s){const n=t[e+s];if(n!==t[r+s]||n!==t[o+s]){i=!0;break}}}if(i){if(s!==o){e[o]=e[s];const r=s*n,i=o*n;for(let e=0;e!==n;++e)t[i+e]=t[r+e]}++o}}if(i>0){e[o]=e[i];for(let e=i*n,r=o*n,s=0;s!==n;++s)t[r+s]=t[e+s];++o}return o!==e.length?(this.times=Zu.arraySlice(e,0,o),this.values=Zu.arraySlice(t,0,o*n)):(this.times=e,this.values=t),this}clone(){const e=Zu.arraySlice(this.times,0),t=Zu.arraySlice(this.values,0),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}nd.prototype.TimeBufferType=Float32Array,nd.prototype.ValueBufferType=Float32Array,nd.prototype.DefaultInterpolation=xt;class rd extends nd{}rd.prototype.ValueTypeName="bool",rd.prototype.ValueBufferType=Array,rd.prototype.DefaultInterpolation=_t,rd.prototype.InterpolantFactoryMethodLinear=void 0,rd.prototype.InterpolantFactoryMethodSmooth=void 0;class id extends nd{}id.prototype.ValueTypeName="color";class od extends nd{}od.prototype.ValueTypeName="number";class sd extends Ju{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,s=this.valueSize,a=(n-t)/(r-t);let l=e*s;for(let e=l+s;l!==e;l+=4)or.slerpFlat(i,0,o,l-s,o,l,a);return i}}class ad extends nd{InterpolantFactoryMethodLinear(e){return new sd(this.times,this.values,this.getValueSize(),e)}}ad.prototype.ValueTypeName="quaternion",ad.prototype.DefaultInterpolation=xt,ad.prototype.InterpolantFactoryMethodSmooth=void 0;class ld extends nd{}ld.prototype.ValueTypeName="string",ld.prototype.ValueBufferType=Array,ld.prototype.DefaultInterpolation=_t,ld.prototype.InterpolantFactoryMethodLinear=void 0,ld.prototype.InterpolantFactoryMethodSmooth=void 0;class cd extends nd{}cd.prototype.ValueTypeName="vector";class ud{constructor(e,t=-1,n,r=At){this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=_n(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,r=1/(e.fps||1);for(let e=0,i=n.length;e!==i;++e)t.push(dd(n[e]).scale(r));const i=new this(e.name,e.duration,t,e.blendMode);return i.uuid=e.uuid,i}static toJSON(e){const t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let e=0,r=n.length;e!==r;++e)t.push(nd.toJSON(n[e]));return r}static CreateFromMorphTargetSequence(e,t,n,r){const i=t.length,o=[];for(let e=0;e<i;e++){let s=[],a=[];s.push((e+i-1)%i,e,(e+1)%i),a.push(0,1,0);const l=Zu.getKeyframeOrder(s);s=Zu.sortedArray(s,1,l),a=Zu.sortedArray(a,1,l),r||0!==s[0]||(s.push(i),a.push(a[0])),o.push(new od(".morphTargetInfluences["+t[e].name+"]",s,a).scale(1/n))}return new this(e,-1,o)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const t=e;n=t.geometry&&t.geometry.animations||t.animations}for(let e=0;e<n.length;e++)if(n[e].name===t)return n[e];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const r={},i=/^([\w-]*?)([\d]+)$/;for(let t=0,n=e.length;t<n;t++){const n=e[t],o=n.name.match(i);if(o&&o.length>1){const e=o[1];let t=r[e];t||(r[e]=t=[]),t.push(n)}}const o=[];for(const e in r)o.push(this.CreateFromMorphTargetSequence(e,r[e],t,n));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(e,t,n,r,i){if(0!==n.length){const o=[],s=[];Zu.flattenJSON(n,o,s,r),0!==o.length&&i.push(new e(t,o,s))}},r=[],i=e.name||"default",o=e.fps||30,s=e.blendMode;let a=e.length||-1;const l=e.hierarchy||[];for(let e=0;e<l.length;e++){const i=l[e].keys;if(i&&0!==i.length)if(i[0].morphTargets){const e={};let t;for(t=0;t<i.length;t++)if(i[t].morphTargets)for(let n=0;n<i[t].morphTargets.length;n++)e[i[t].morphTargets[n]]=-1;for(const n in e){const e=[],o=[];for(let r=0;r!==i[t].morphTargets.length;++r){const r=i[t];e.push(r.time),o.push(r.morphTarget===n?1:0)}r.push(new od(".morphTargetInfluence["+n+"]",e,o))}a=e.length*o}else{const o=".bones["+t[e].name+"]";n(cd,o+".position",i,"pos",r),n(ad,o+".quaternion",i,"rot",r),n(cd,o+".scale",i,"scl",r)}}if(0===r.length)return null;return new this(i,a,r,s)}resetDuration(){let e=0;for(let t=0,n=this.tracks.length;t!==n;++t){const n=this.tracks[t];e=Math.max(e,n.times[n.times.length-1])}return this.duration=e,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function dd(e){if(void 0===e.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const t=function(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return od;case"vector":case"vector2":case"vector3":case"vector4":return cd;case"color":return id;case"quaternion":return ad;case"bool":case"boolean":return rd;case"string":return ld}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}(e.type);if(void 0===e.times){const t=[],n=[];Zu.flattenJSON(e.keys,t,n,"value"),e.times=t,e.values=n}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)}const hd={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};class pd{constructor(e,t,n){const r=this;let i=!1,o=0,s=0,a=void 0;const l=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(e){s++,!1===i&&void 0!==r.onStart&&r.onStart(e,o,s),i=!0},this.itemEnd=function(e){o++,void 0!==r.onProgress&&r.onProgress(e,o,s),o===s&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(e){void 0!==r.onError&&r.onError(e)},this.resolveURL=function(e){return a?a(e):e},this.setURLModifier=function(e){return a=e,this},this.addHandler=function(e,t){return l.push(e,t),this},this.removeHandler=function(e){const t=l.indexOf(e);return-1!==t&&l.splice(t,2),this},this.getHandler=function(e){for(let t=0,n=l.length;t<n;t+=2){const n=l[t],r=l[t+1];if(n.global&&(n.lastIndex=0),n.test(e))return r}return null}}}const fd=new pd;class md{constructor(e){this.manager=void 0!==e?e:fd,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise((function(r,i){n.load(e,r,t,i)}))}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}const gd={};class bd extends md{constructor(e){super(e)}load(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=hd.get(e);if(void 0!==i)return this.manager.itemStart(e),setTimeout(()=>{t&&t(i),this.manager.itemEnd(e)},0),i;if(void 0!==gd[e])return void gd[e].push({onLoad:t,onProgress:n,onError:r});gd[e]=[],gd[e].push({onLoad:t,onProgress:n,onError:r});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),s=this.mimeType,a=this.responseType;fetch(o).then(t=>{if(200===t.status||0===t.status){if(0===t.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===t.body||void 0===t.body.getReader)return t;const n=gd[e],r=t.body.getReader(),i=t.headers.get("Content-Length"),o=i?parseInt(i):0,s=0!==o;let a=0;const l=new ReadableStream({start(e){!function t(){r.read().then(({done:r,value:i})=>{if(r)e.close();else{a+=i.byteLength;const r=new ProgressEvent("progress",{lengthComputable:s,loaded:a,total:o});for(let e=0,t=n.length;e<t;e++){const t=n[e];t.onProgress&&t.onProgress(r)}e.enqueue(i),t()}})}()}});return new Response(l)}throw Error(`fetch for "${t.url}" responded with ${t.status}: ${t.statusText}`)}).then(e=>{switch(a){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then(e=>(new DOMParser).parseFromString(e,s));case"json":return e.json();default:if(void 0===s)return e.text();{const t=/charset="?([^;"\s]*)"?/i.exec(s),n=t&&t[1]?t[1].toLowerCase():void 0,r=new TextDecoder(n);return e.arrayBuffer().then(e=>r.decode(e))}}}).then(t=>{hd.add(e,t);const n=gd[e];delete gd[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onLoad&&r.onLoad(t)}}).catch(t=>{const n=gd[e];if(void 0===n)throw this.manager.itemError(e),t;delete gd[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onError&&r.onError(t)}this.manager.itemError(e)}).finally(()=>{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class vd extends md{constructor(e){super(e)}load(e,t,n,r){const i=this,o=new bd(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,(function(n){try{t(i.parse(JSON.parse(n)))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}}),n,r)}parse(e){const t=[];for(let n=0;n<e.length;n++){const r=ud.parse(e[n]);t.push(r)}return t}}class yd extends md{constructor(e){super(e)}load(e,t,n,r){const i=this,o=[],s=new mc,a=new bd(this.manager);a.setPath(this.path),a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setWithCredentials(i.withCredentials);let l=0;function c(c){a.load(e[c],(function(e){const n=i.parse(e,!0);o[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},l+=1,6===l&&(1===n.mipmapCount&&(s.minFilter=ve),s.image=o,s.format=n.format,s.needsUpdate=!0,t&&t(s))}),n,r)}if(Array.isArray(e))for(let t=0,n=e.length;t<n;++t)c(t);else a.load(e,(function(e){const n=i.parse(e,!0);if(n.isCubemap){const e=n.mipmaps.length/n.mipmapCount;for(let t=0;t<e;t++){o[t]={mipmaps:[]};for(let e=0;e<n.mipmapCount;e++)o[t].mipmaps.push(n.mipmaps[t*n.mipmapCount+e]),o[t].format=n.format,o[t].width=n.width,o[t].height=n.height}s.image=o}else s.image.width=n.width,s.image.height=n.height,s.mipmaps=n.mipmaps;1===n.mipmapCount&&(s.minFilter=ve),s.format=n.format,s.needsUpdate=!0,t&&t(s)}),n,r);return s}}class Sd extends md{constructor(e){super(e)}load(e,t,n,r){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,o=hd.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;const s=jn("img");function a(){c(),hd.add(e,this),t&&t(this),i.manager.itemEnd(e)}function l(t){c(),r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)}function c(){s.removeEventListener("load",a,!1),s.removeEventListener("error",l,!1)}return s.addEventListener("load",a,!1),s.addEventListener("error",l,!1),"data:"!==e.slice(0,5)&&void 0!==this.crossOrigin&&(s.crossOrigin=this.crossOrigin),i.manager.itemStart(e),s.src=e,s}}class _d extends md{constructor(e){super(e)}load(e,t,n,r){const i=new vo,o=new Sd(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);let s=0;function a(n){o.load(e[n],(function(e){i.images[n]=e,s++,6===s&&(i.needsUpdate=!0,t&&t(i))}),void 0,r)}for(let t=0;t<e.length;++t)a(t);return i}}class xd extends md{constructor(e){super(e)}load(e,t,n,r){const i=this,o=new Bl,s=new bd(this.manager);return s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setPath(this.path),s.setWithCredentials(i.withCredentials),s.load(e,(function(e){const n=i.parse(e);n&&(void 0!==n.image?o.image=n.image:void 0!==n.data&&(o.image.width=n.width,o.image.height=n.height,o.image.data=n.data),o.wrapS=void 0!==n.wrapS?n.wrapS:de,o.wrapT=void 0!==n.wrapT?n.wrapT:de,o.magFilter=void 0!==n.magFilter?n.magFilter:ve,o.minFilter=void 0!==n.minFilter?n.minFilter:ve,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.encoding&&(o.encoding=n.encoding),void 0!==n.flipY&&(o.flipY=n.flipY),void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps,o.minFilter=_e),1===n.mipmapCount&&(o.minFilter=ve),void 0!==n.generateMipmaps&&(o.generateMipmaps=n.generateMipmaps),o.needsUpdate=!0,t&&t(o,n))}),n,r),o}}class wd extends md{constructor(e){super(e)}load(e,t,n,r){const i=new Zn,o=new Sd(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,(function(e){i.image=e,i.needsUpdate=!0,void 0!==t&&t(i)}),n,r),i}}class kd extends li{constructor(e,t=1){super(),this.type="Light",this.color=new Gn(e),this.intensity=t}dispose(){}copy(e){return super.copy(e),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),t}}kd.prototype.isLight=!0;class Od extends kd{constructor(e,t,n){super(e,n),this.type="HemisphereLight",this.position.copy(li.DefaultUp),this.updateMatrix(),this.groundColor=new Gn(t)}copy(e){return kd.prototype.copy.call(this,e),this.groundColor.copy(e.groundColor),this}}Od.prototype.isHemisphereLight=!0;const Ed=new Ir,Ad=new sr,Td=new sr;class Cd{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Cn(512,512),this.map=null,this.mapPass=null,this.matrix=new Ir,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Eo,this._frameExtents=new Cn(1,1),this._viewportCount=1,this._viewports=[new Jn(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;Ad.setFromMatrixPosition(e.matrixWorld),t.position.copy(Ad),Td.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(Td),t.updateMatrixWorld(),Ed.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Ed),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(t.projectionMatrix),n.multiply(t.matrixWorldInverse)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){const e={};return 0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class Md extends Cd{constructor(){super(new go(50,1,.5,500)),this.focus=1}updateMatrices(e){const t=this.camera,n=2*Sn*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height,i=e.distance||t.far;n===t.fov&&r===t.aspect&&i===t.far||(t.fov=n,t.aspect=r,t.far=i,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}Md.prototype.isSpotLightShadow=!0;class $d extends kd{constructor(e,t,n=0,r=Math.PI/3,i=0,o=1){super(e,t),this.type="SpotLight",this.position.copy(li.DefaultUp),this.updateMatrix(),this.target=new li,this.distance=n,this.angle=r,this.penumbra=i,this.decay=o,this.shadow=new Md}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}$d.prototype.isSpotLight=!0;const Pd=new Ir,Rd=new sr,jd=new sr;class Nd extends Cd{constructor(){super(new go(90,1,.5,500)),this._frameExtents=new Cn(4,2),this._viewportCount=6,this._viewports=[new Jn(2,1,1,1),new Jn(0,1,1,1),new Jn(3,1,1,1),new Jn(1,1,1,1),new Jn(3,0,1,1),new Jn(1,0,1,1)],this._cubeDirections=[new sr(1,0,0),new sr(-1,0,0),new sr(0,0,1),new sr(0,0,-1),new sr(0,1,0),new sr(0,-1,0)],this._cubeUps=[new sr(0,1,0),new sr(0,1,0),new sr(0,1,0),new sr(0,1,0),new sr(0,0,1),new sr(0,0,-1)]}updateMatrices(e,t=0){const n=this.camera,r=this.matrix,i=e.distance||n.far;i!==n.far&&(n.far=i,n.updateProjectionMatrix()),Rd.setFromMatrixPosition(e.matrixWorld),n.position.copy(Rd),jd.copy(n.position),jd.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(jd),n.updateMatrixWorld(),r.makeTranslation(-Rd.x,-Rd.y,-Rd.z),Pd.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Pd)}}Nd.prototype.isPointLightShadow=!0;class Dd extends kd{constructor(e,t,n=0,r=1){super(e,t),this.type="PointLight",this.distance=n,this.decay=r,this.shadow=new Nd}get power(){return 4*this.intensity*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}Dd.prototype.isPointLight=!0;class Id extends Cd{constructor(){super(new Bo(-5,5,5,-5,.5,500))}}Id.prototype.isDirectionalLightShadow=!0;class Ld extends kd{constructor(e,t){super(e,t),this.type="DirectionalLight",this.position.copy(li.DefaultUp),this.updateMatrix(),this.target=new li,this.shadow=new Id}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}Ld.prototype.isDirectionalLight=!0;class Bd extends kd{constructor(e,t){super(e,t),this.type="AmbientLight"}}Bd.prototype.isAmbientLight=!0;class zd extends kd{constructor(e,t,n=10,r=10){super(e,t),this.type="RectAreaLight",this.width=n,this.height=r}get power(){return this.intensity*this.width*this.height*Math.PI}set power(e){this.intensity=e/(this.width*this.height*Math.PI)}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){const t=super.toJSON(e);return t.object.width=this.width,t.object.height=this.height,t}}zd.prototype.isRectAreaLight=!0;class Fd{constructor(){this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new sr)}set(e){for(let t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){const n=e.x,r=e.y,i=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.282095),t.addScaledVector(o[1],.488603*r),t.addScaledVector(o[2],.488603*i),t.addScaledVector(o[3],.488603*n),t.addScaledVector(o[4],n*r*1.092548),t.addScaledVector(o[5],r*i*1.092548),t.addScaledVector(o[6],.315392*(3*i*i-1)),t.addScaledVector(o[7],n*i*1.092548),t.addScaledVector(o[8],.546274*(n*n-r*r)),t}getIrradianceAt(e,t){const n=e.x,r=e.y,i=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.886227),t.addScaledVector(o[1],1.023328*r),t.addScaledVector(o[2],1.023328*i),t.addScaledVector(o[3],1.023328*n),t.addScaledVector(o[4],.858086*n*r),t.addScaledVector(o[5],.858086*r*i),t.addScaledVector(o[6],.743125*i*i-.247708),t.addScaledVector(o[7],.858086*n*i),t.addScaledVector(o[8],.429043*(n*n-r*r)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return(new this.constructor).copy(this)}fromArray(e,t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].fromArray(e,t+3*r);return this}toArray(e=[],t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].toArray(e,t+3*r);return e}static getBasisAt(e,t){const n=e.x,r=e.y,i=e.z;t[0]=.282095,t[1]=.488603*r,t[2]=.488603*i,t[3]=.488603*n,t[4]=1.092548*n*r,t[5]=1.092548*r*i,t[6]=.315392*(3*i*i-1),t[7]=1.092548*n*i,t[8]=.546274*(n*n-r*r)}}Fd.prototype.isSphericalHarmonics3=!0;class Ud extends kd{constructor(e=new Fd,t=1){super(void 0,t),this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}fromJSON(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this}toJSON(e){const t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}}Ud.prototype.isLightProbe=!0;class Qd extends md{constructor(e){super(e),this.textures={}}load(e,t,n,r){const i=this,o=new bd(i.manager);o.setPath(i.path),o.setRequestHeader(i.requestHeader),o.setWithCredentials(i.withCredentials),o.load(e,(function(n){try{t(i.parse(JSON.parse(n)))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}}),n,r)}parse(e){const t=this.textures;function n(e){return void 0===t[e]&&console.warn("THREE.MaterialLoader: Undefined texture",e),t[e]}const r=_i.fromType(e.type);if(void 0!==e.uuid&&(r.uuid=e.uuid),void 0!==e.name&&(r.name=e.name),void 0!==e.color&&void 0!==r.color&&r.color.setHex(e.color),void 0!==e.roughness&&(r.roughness=e.roughness),void 0!==e.metalness&&(r.metalness=e.metalness),void 0!==e.sheen&&(r.sheen=e.sheen),void 0!==e.sheenColor&&(r.sheenColor=(new Gn).setHex(e.sheenColor)),void 0!==e.sheenRoughness&&(r.sheenRoughness=e.sheenRoughness),void 0!==e.emissive&&void 0!==r.emissive&&r.emissive.setHex(e.emissive),void 0!==e.specular&&void 0!==r.specular&&r.specular.setHex(e.specular),void 0!==e.specularIntensity&&(r.specularIntensity=e.specularIntensity),void 0!==e.specularColor&&void 0!==r.specularColor&&r.specularColor.setHex(e.specularColor),void 0!==e.shininess&&(r.shininess=e.shininess),void 0!==e.clearcoat&&(r.clearcoat=e.clearcoat),void 0!==e.clearcoatRoughness&&(r.clearcoatRoughness=e.clearcoatRoughness),void 0!==e.transmission&&(r.transmission=e.transmission),void 0!==e.thickness&&(r.thickness=e.thickness),void 0!==e.attenuationDistance&&(r.attenuationDistance=e.attenuationDistance),void 0!==e.attenuationColor&&void 0!==r.attenuationColor&&r.attenuationColor.setHex(e.attenuationColor),void 0!==e.fog&&(r.fog=e.fog),void 0!==e.flatShading&&(r.flatShading=e.flatShading),void 0!==e.blending&&(r.blending=e.blending),void 0!==e.combine&&(r.combine=e.combine),void 0!==e.side&&(r.side=e.side),void 0!==e.shadowSide&&(r.shadowSide=e.shadowSide),void 0!==e.opacity&&(r.opacity=e.opacity),void 0!==e.transparent&&(r.transparent=e.transparent),void 0!==e.alphaTest&&(r.alphaTest=e.alphaTest),void 0!==e.depthTest&&(r.depthTest=e.depthTest),void 0!==e.depthWrite&&(r.depthWrite=e.depthWrite),void 0!==e.colorWrite&&(r.colorWrite=e.colorWrite),void 0!==e.stencilWrite&&(r.stencilWrite=e.stencilWrite),void 0!==e.stencilWriteMask&&(r.stencilWriteMask=e.stencilWriteMask),void 0!==e.stencilFunc&&(r.stencilFunc=e.stencilFunc),void 0!==e.stencilRef&&(r.stencilRef=e.stencilRef),void 0!==e.stencilFuncMask&&(r.stencilFuncMask=e.stencilFuncMask),void 0!==e.stencilFail&&(r.stencilFail=e.stencilFail),void 0!==e.stencilZFail&&(r.stencilZFail=e.stencilZFail),void 0!==e.stencilZPass&&(r.stencilZPass=e.stencilZPass),void 0!==e.wireframe&&(r.wireframe=e.wireframe),void 0!==e.wireframeLinewidth&&(r.wireframeLinewidth=e.wireframeLinewidth),void 0!==e.wireframeLinecap&&(r.wireframeLinecap=e.wireframeLinecap),void 0!==e.wireframeLinejoin&&(r.wireframeLinejoin=e.wireframeLinejoin),void 0!==e.rotation&&(r.rotation=e.rotation),1!==e.linewidth&&(r.linewidth=e.linewidth),void 0!==e.dashSize&&(r.dashSize=e.dashSize),void 0!==e.gapSize&&(r.gapSize=e.gapSize),void 0!==e.scale&&(r.scale=e.scale),void 0!==e.polygonOffset&&(r.polygonOffset=e.polygonOffset),void 0!==e.polygonOffsetFactor&&(r.polygonOffsetFactor=e.polygonOffsetFactor),void 0!==e.polygonOffsetUnits&&(r.polygonOffsetUnits=e.polygonOffsetUnits),void 0!==e.dithering&&(r.dithering=e.dithering),void 0!==e.alphaToCoverage&&(r.alphaToCoverage=e.alphaToCoverage),void 0!==e.premultipliedAlpha&&(r.premultipliedAlpha=e.premultipliedAlpha),void 0!==e.visible&&(r.visible=e.visible),void 0!==e.toneMapped&&(r.toneMapped=e.toneMapped),void 0!==e.userData&&(r.userData=e.userData),void 0!==e.vertexColors&&("number"==typeof e.vertexColors?r.vertexColors=e.vertexColors>0:r.vertexColors=e.vertexColors),void 0!==e.uniforms)for(const t in e.uniforms){const i=e.uniforms[t];switch(r.uniforms[t]={},i.type){case"t":r.uniforms[t].value=n(i.value);break;case"c":r.uniforms[t].value=(new Gn).setHex(i.value);break;case"v2":r.uniforms[t].value=(new Cn).fromArray(i.value);break;case"v3":r.uniforms[t].value=(new sr).fromArray(i.value);break;case"v4":r.uniforms[t].value=(new Jn).fromArray(i.value);break;case"m3":r.uniforms[t].value=(new Mn).fromArray(i.value);break;case"m4":r.uniforms[t].value=(new Ir).fromArray(i.value);break;default:r.uniforms[t].value=i.value}}if(void 0!==e.defines&&(r.defines=e.defines),void 0!==e.vertexShader&&(r.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(r.fragmentShader=e.fragmentShader),void 0!==e.extensions)for(const t in e.extensions)r.extensions[t]=e.extensions[t];if(void 0!==e.shading&&(r.flatShading=1===e.shading),void 0!==e.size&&(r.size=e.size),void 0!==e.sizeAttenuation&&(r.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(r.map=n(e.map)),void 0!==e.matcap&&(r.matcap=n(e.matcap)),void 0!==e.alphaMap&&(r.alphaMap=n(e.alphaMap)),void 0!==e.bumpMap&&(r.bumpMap=n(e.bumpMap)),void 0!==e.bumpScale&&(r.bumpScale=e.bumpScale),void 0!==e.normalMap&&(r.normalMap=n(e.normalMap)),void 0!==e.normalMapType&&(r.normalMapType=e.normalMapType),void 0!==e.normalScale){let t=e.normalScale;!1===Array.isArray(t)&&(t=[t,t]),r.normalScale=(new Cn).fromArray(t)}return void 0!==e.displacementMap&&(r.displacementMap=n(e.displacementMap)),void 0!==e.displacementScale&&(r.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(r.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(r.roughnessMap=n(e.roughnessMap)),void 0!==e.metalnessMap&&(r.metalnessMap=n(e.metalnessMap)),void 0!==e.emissiveMap&&(r.emissiveMap=n(e.emissiveMap)),void 0!==e.emissiveIntensity&&(r.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(r.specularMap=n(e.specularMap)),void 0!==e.specularIntensityMap&&(r.specularIntensityMap=n(e.specularIntensityMap)),void 0!==e.specularColorMap&&(r.specularColorMap=n(e.specularColorMap)),void 0!==e.envMap&&(r.envMap=n(e.envMap)),void 0!==e.envMapIntensity&&(r.envMapIntensity=e.envMapIntensity),void 0!==e.reflectivity&&(r.reflectivity=e.reflectivity),void 0!==e.refractionRatio&&(r.refractionRatio=e.refractionRatio),void 0!==e.lightMap&&(r.lightMap=n(e.lightMap)),void 0!==e.lightMapIntensity&&(r.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(r.aoMap=n(e.aoMap)),void 0!==e.aoMapIntensity&&(r.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(r.gradientMap=n(e.gradientMap)),void 0!==e.clearcoatMap&&(r.clearcoatMap=n(e.clearcoatMap)),void 0!==e.clearcoatRoughnessMap&&(r.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),void 0!==e.clearcoatNormalMap&&(r.clearcoatNormalMap=n(e.clearcoatNormalMap)),void 0!==e.clearcoatNormalScale&&(r.clearcoatNormalScale=(new Cn).fromArray(e.clearcoatNormalScale)),void 0!==e.transmissionMap&&(r.transmissionMap=n(e.transmissionMap)),void 0!==e.thicknessMap&&(r.thicknessMap=n(e.thicknessMap)),void 0!==e.sheenColorMap&&(r.sheenColorMap=n(e.sheenColorMap)),void 0!==e.sheenRoughnessMap&&(r.sheenRoughnessMap=n(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}}class qd{static decodeText(e){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);let t="";for(let n=0,r=e.length;n<r;n++)t+=String.fromCharCode(e[n]);try{return decodeURIComponent(escape(t))}catch(e){return t}}static extractUrlBase(e){const t=e.lastIndexOf("/");return-1===t?"./":e.slice(0,t+1)}static resolveURL(e,t){return"string"!=typeof e||""===e?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}class Gd extends Qi{constructor(){super(),this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}clone(){return(new this.constructor).copy(this)}toJSON(){const e=super.toJSON(this);return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}Gd.prototype.isInstancedBufferGeometry=!0;class Hd extends md{constructor(e){super(e)}load(e,t,n,r){const i=this,o=new bd(i.manager);o.setPath(i.path),o.setRequestHeader(i.requestHeader),o.setWithCredentials(i.withCredentials),o.load(e,(function(n){try{t(i.parse(JSON.parse(n)))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}}),n,r)}parse(e){const t={},n={};function r(e,r){if(void 0!==t[r])return t[r];const i=e.interleavedBuffers[r],o=function(e,t){if(void 0!==n[t])return n[t];const r=e.arrayBuffers[t],i=new Uint32Array(r).buffer;return n[t]=i,i}(e,i.buffer),s=Rn(i.type,o),a=new ul(s,i.stride);return a.uuid=i.uuid,t[r]=a,a}const i=e.isInstancedBufferGeometry?new Gd:new Qi,o=e.data.index;if(void 0!==o){const e=Rn(o.type,o.array);i.setIndex(new Oi(e,1))}const s=e.data.attributes;for(const t in s){const n=s[t];let o;if(n.isInterleavedBufferAttribute){const t=r(e.data,n.data);o=new hl(t,n.itemSize,n.offset,n.normalized)}else{const e=Rn(n.type,n.array);o=new(n.isInstancedBufferAttribute?Ql:Oi)(e,n.itemSize,n.normalized)}void 0!==n.name&&(o.name=n.name),void 0!==n.usage&&o.setUsage(n.usage),void 0!==n.updateRange&&(o.updateRange.offset=n.updateRange.offset,o.updateRange.count=n.updateRange.count),i.setAttribute(t,o)}const a=e.data.morphAttributes;if(a)for(const t in a){const n=a[t],o=[];for(let t=0,i=n.length;t<i;t++){const i=n[t];let s;if(i.isInterleavedBufferAttribute){const t=r(e.data,i.data);s=new hl(t,i.itemSize,i.offset,i.normalized)}else{const e=Rn(i.type,i.array);s=new Oi(e,i.itemSize,i.normalized)}void 0!==i.name&&(s.name=i.name),o.push(s)}i.morphAttributes[t]=o}e.data.morphTargetsRelative&&(i.morphTargetsRelative=!0);const l=e.data.groups||e.data.drawcalls||e.data.offsets;if(void 0!==l)for(let e=0,t=l.length;e!==t;++e){const t=l[e];i.addGroup(t.start,t.count,t.materialIndex)}const c=e.data.boundingSphere;if(void 0!==c){const e=new sr;void 0!==c.center&&e.fromArray(c.center),i.boundingSphere=new Tr(e,c.radius)}return e.name&&(i.name=e.name),e.userData&&(i.userData=e.userData),i}}class Vd extends md{constructor(e){super(e)}load(e,t,n,r){const i=this,o=""===this.path?qd.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||o;const s=new bd(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,(function(n){let o=null;try{o=JSON.parse(n)}catch(t){return void 0!==r&&r(t),void console.error("THREE:ObjectLoader: Can't parse "+e+".",t.message)}const s=o.metadata;void 0!==s&&void 0!==s.type&&"geometry"!==s.type.toLowerCase()?i.parse(o,t):console.error("THREE.ObjectLoader: Can't load "+e)}),n,r)}async loadAsync(e,t){const n=""===this.path?qd.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||n;const r=new bd(this.manager);r.setPath(this.path),r.setRequestHeader(this.requestHeader),r.setWithCredentials(this.withCredentials);const i=await r.loadAsync(e,t),o=JSON.parse(i),s=o.metadata;if(void 0===s||void 0===s.type||"geometry"===s.type.toLowerCase())throw new Error("THREE.ObjectLoader: Can't load "+e);return await this.parseAsync(o)}parse(e,t){const n=this.parseAnimations(e.animations),r=this.parseShapes(e.shapes),i=this.parseGeometries(e.geometries,r),o=this.parseImages(e.images,(function(){void 0!==t&&t(l)})),s=this.parseTextures(e.textures,o),a=this.parseMaterials(e.materials,s),l=this.parseObject(e.object,i,a,s,n),c=this.parseSkeletons(e.skeletons,l);if(this.bindSkeletons(l,c),void 0!==t){let e=!1;for(const t in o)if(o[t]instanceof HTMLImageElement){e=!0;break}!1===e&&t(l)}return l}async parseAsync(e){const t=this.parseAnimations(e.animations),n=this.parseShapes(e.shapes),r=this.parseGeometries(e.geometries,n),i=await this.parseImagesAsync(e.images),o=this.parseTextures(e.textures,i),s=this.parseMaterials(e.materials,o),a=this.parseObject(e.object,r,s,o,t),l=this.parseSkeletons(e.skeletons,a);return this.bindSkeletons(a,l),a}parseShapes(e){const t={};if(void 0!==e)for(let n=0,r=e.length;n<r;n++){const r=(new Zc).fromJSON(e[n]);t[r.uuid]=r}return t}parseSkeletons(e,t){const n={},r={};if(t.traverse((function(e){e.isBone&&(r[e.uuid]=e)})),void 0!==e)for(let t=0,i=e.length;t<i;t++){const i=(new Ul).fromJSON(e[t],r);n[i.uuid]=i}return n}parseGeometries(e,t){const n={};if(void 0!==e){const r=new Hd;for(let i=0,o=e.length;i<o;i++){let o;const s=e[i];switch(s.type){case"BufferGeometry":case"InstancedBufferGeometry":o=r.parse(s);break;case"Geometry":console.error("THREE.ObjectLoader: The legacy Geometry type is no longer supported.");break;default:s.type in Bu?o=Bu[s.type].fromJSON(s,t):console.warn(`THREE.ObjectLoader: Unsupported geometry type "${s.type}"`)}o.uuid=s.uuid,void 0!==s.name&&(o.name=s.name),!0===o.isBufferGeometry&&void 0!==s.userData&&(o.userData=s.userData),n[s.uuid]=o}}return n}parseMaterials(e,t){const n={},r={};if(void 0!==e){const i=new Qd;i.setTextures(t);for(let t=0,o=e.length;t<o;t++){const o=e[t];if("MultiMaterial"===o.type){const e=[];for(let t=0;t<o.materials.length;t++){const r=o.materials[t];void 0===n[r.uuid]&&(n[r.uuid]=i.parse(r)),e.push(n[r.uuid])}r[o.uuid]=e}else void 0===n[o.uuid]&&(n[o.uuid]=i.parse(o)),r[o.uuid]=n[o.uuid]}}return r}parseAnimations(e){const t={};if(void 0!==e)for(let n=0;n<e.length;n++){const r=e[n],i=ud.parse(r);t[i.uuid]=i}return t}parseImages(e,t){const n=this,r={};let i;function o(e){if("string"==typeof e){const t=e;return function(e){return n.manager.itemStart(e),i.load(e,(function(){n.manager.itemEnd(e)}),void 0,(function(){n.manager.itemError(e),n.manager.itemEnd(e)}))}(/^(\/\/)|([a-z]+:(\/\/)?)/i.test(t)?t:n.resourcePath+t)}return e.data?{data:Rn(e.type,e.data),width:e.width,height:e.height}:null}if(void 0!==e&&e.length>0){const n=new pd(t);i=new Sd(n),i.setCrossOrigin(this.crossOrigin);for(let t=0,n=e.length;t<n;t++){const n=e[t],i=n.url;if(Array.isArray(i)){const e=[];for(let t=0,n=i.length;t<n;t++){const n=o(i[t]);null!==n&&(n instanceof HTMLImageElement?e.push(n):e.push(new Bl(n.data,n.width,n.height)))}r[n.uuid]=new Wn(e)}else{const e=o(n.url);r[n.uuid]=new Wn(e)}}}return r}async parseImagesAsync(e){const t=this,n={};let r;async function i(e){if("string"==typeof e){const n=e,i=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(n)?n:t.resourcePath+n;return await r.loadAsync(i)}return e.data?{data:Rn(e.type,e.data),width:e.width,height:e.height}:null}if(void 0!==e&&e.length>0){r=new Sd(this.manager),r.setCrossOrigin(this.crossOrigin);for(let t=0,r=e.length;t<r;t++){const r=e[t],o=r.url;if(Array.isArray(o)){const e=[];for(let t=0,n=o.length;t<n;t++){const n=o[t],r=await i(n);null!==r&&(r instanceof HTMLImageElement?e.push(r):e.push(new Bl(r.data,r.width,r.height)))}n[r.uuid]=new Wn(e)}else{const e=await i(r.url);n[r.uuid]=new Wn(e)}}}return n}parseTextures(e,t){function n(e,t){return"number"==typeof e?e:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",e),t[e])}const r={};if(void 0!==e)for(let i=0,o=e.length;i<o;i++){const o=e[i];void 0===o.image&&console.warn('THREE.ObjectLoader: No "image" specified for',o.uuid),void 0===t[o.image]&&console.warn("THREE.ObjectLoader: Undefined image",o.image);const s=t[o.image],a=s.data;let l;Array.isArray(a)?(l=new vo,6===a.length&&(l.needsUpdate=!0)):(l=a&&a.data?new Bl:new Zn,a&&(l.needsUpdate=!0)),l.source=s,l.uuid=o.uuid,void 0!==o.name&&(l.name=o.name),void 0!==o.mapping&&(l.mapping=n(o.mapping,Wd)),void 0!==o.offset&&l.offset.fromArray(o.offset),void 0!==o.repeat&&l.repeat.fromArray(o.repeat),void 0!==o.center&&l.center.fromArray(o.center),void 0!==o.rotation&&(l.rotation=o.rotation),void 0!==o.wrap&&(l.wrapS=n(o.wrap[0],Xd),l.wrapT=n(o.wrap[1],Xd)),void 0!==o.format&&(l.format=o.format),void 0!==o.type&&(l.type=o.type),void 0!==o.encoding&&(l.encoding=o.encoding),void 0!==o.minFilter&&(l.minFilter=n(o.minFilter,Yd)),void 0!==o.magFilter&&(l.magFilter=n(o.magFilter,Yd)),void 0!==o.anisotropy&&(l.anisotropy=o.anisotropy),void 0!==o.flipY&&(l.flipY=o.flipY),void 0!==o.premultiplyAlpha&&(l.premultiplyAlpha=o.premultiplyAlpha),void 0!==o.unpackAlignment&&(l.unpackAlignment=o.unpackAlignment),void 0!==o.userData&&(l.userData=o.userData),r[o.uuid]=l}return r}parseObject(e,t,n,r,i){let o,s,a;function l(e){return void 0===t[e]&&console.warn("THREE.ObjectLoader: Undefined geometry",e),t[e]}function c(e){if(void 0!==e){if(Array.isArray(e)){const t=[];for(let r=0,i=e.length;r<i;r++){const i=e[r];void 0===n[i]&&console.warn("THREE.ObjectLoader: Undefined material",i),t.push(n[i])}return t}return void 0===n[e]&&console.warn("THREE.ObjectLoader: Undefined material",e),n[e]}}function u(e){return void 0===r[e]&&console.warn("THREE.ObjectLoader: Undefined texture",e),r[e]}switch(e.type){case"Scene":o=new cl,void 0!==e.background&&(Number.isInteger(e.background)?o.background=new Gn(e.background):o.background=u(e.background)),void 0!==e.environment&&(o.environment=u(e.environment)),void 0!==e.fog&&("Fog"===e.fog.type?o.fog=new ll(e.fog.color,e.fog.near,e.fog.far):"FogExp2"===e.fog.type&&(o.fog=new al(e.fog.color,e.fog.density)));break;case"PerspectiveCamera":o=new go(e.fov,e.aspect,e.near,e.far),void 0!==e.focus&&(o.focus=e.focus),void 0!==e.zoom&&(o.zoom=e.zoom),void 0!==e.filmGauge&&(o.filmGauge=e.filmGauge),void 0!==e.filmOffset&&(o.filmOffset=e.filmOffset),void 0!==e.view&&(o.view=Object.assign({},e.view));break;case"OrthographicCamera":o=new Bo(e.left,e.right,e.top,e.bottom,e.near,e.far),void 0!==e.zoom&&(o.zoom=e.zoom),void 0!==e.view&&(o.view=Object.assign({},e.view));break;case"AmbientLight":o=new Bd(e.color,e.intensity);break;case"DirectionalLight":o=new Ld(e.color,e.intensity);break;case"PointLight":o=new Dd(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":o=new zd(e.color,e.intensity,e.width,e.height);break;case"SpotLight":o=new $d(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);break;case"HemisphereLight":o=new Od(e.color,e.groundColor,e.intensity);break;case"LightProbe":o=(new Ud).fromJSON(e);break;case"SkinnedMesh":s=l(e.geometry),a=c(e.material),o=new Il(s,a),void 0!==e.bindMode&&(o.bindMode=e.bindMode),void 0!==e.bindMatrix&&o.bindMatrix.fromArray(e.bindMatrix),void 0!==e.skeleton&&(o.skeleton=e.skeleton);break;case"Mesh":s=l(e.geometry),a=c(e.material),o=new ao(s,a);break;case"InstancedMesh":s=l(e.geometry),a=c(e.material);const t=e.count,n=e.instanceMatrix,r=e.instanceColor;o=new Wl(s,a,t),o.instanceMatrix=new Ql(new Float32Array(n.array),16),void 0!==r&&(o.instanceColor=new Ql(new Float32Array(r.array),r.itemSize));break;case"LOD":o=new $l;break;case"Line":o=new tc(l(e.geometry),c(e.material));break;case"LineLoop":o=new oc(l(e.geometry),c(e.material));break;case"LineSegments":o=new ic(l(e.geometry),c(e.material));break;case"PointCloud":case"Points":o=new dc(l(e.geometry),c(e.material));break;case"Sprite":o=new Al(c(e.material));break;case"Group":o=new Ka;break;case"Bone":o=new Ll;break;default:o=new li}if(o.uuid=e.uuid,void 0!==e.name&&(o.name=e.name),void 0!==e.matrix?(o.matrix.fromArray(e.matrix),void 0!==e.matrixAutoUpdate&&(o.matrixAutoUpdate=e.matrixAutoUpdate),o.matrixAutoUpdate&&o.matrix.decompose(o.position,o.quaternion,o.scale)):(void 0!==e.position&&o.position.fromArray(e.position),void 0!==e.rotation&&o.rotation.fromArray(e.rotation),void 0!==e.quaternion&&o.quaternion.fromArray(e.quaternion),void 0!==e.scale&&o.scale.fromArray(e.scale)),void 0!==e.castShadow&&(o.castShadow=e.castShadow),void 0!==e.receiveShadow&&(o.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(o.shadow.bias=e.shadow.bias),void 0!==e.shadow.normalBias&&(o.shadow.normalBias=e.shadow.normalBias),void 0!==e.shadow.radius&&(o.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&o.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(o.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(o.visible=e.visible),void 0!==e.frustumCulled&&(o.frustumCulled=e.frustumCulled),void 0!==e.renderOrder&&(o.renderOrder=e.renderOrder),void 0!==e.userData&&(o.userData=e.userData),void 0!==e.layers&&(o.layers.mask=e.layers),void 0!==e.children){const s=e.children;for(let e=0;e<s.length;e++)o.add(this.parseObject(s[e],t,n,r,i))}if(void 0!==e.animations){const t=e.animations;for(let e=0;e<t.length;e++){const n=t[e];o.animations.push(i[n])}}if("LOD"===e.type){void 0!==e.autoUpdate&&(o.autoUpdate=e.autoUpdate);const t=e.levels;for(let e=0;e<t.length;e++){const n=t[e],r=o.getObjectByProperty("uuid",n.object);void 0!==r&&o.addLevel(r,n.distance)}}return o}bindSkeletons(e,t){0!==Object.keys(t).length&&e.traverse((function(e){if(!0===e.isSkinnedMesh&&void 0!==e.skeleton){const n=t[e.skeleton];void 0===n?console.warn("THREE.ObjectLoader: No skeleton found with UUID:",e.skeleton):e.bind(n,e.bindMatrix)}}))}setTexturePath(e){return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(e)}}const Wd={UVMapping:ie,CubeReflectionMapping:oe,CubeRefractionMapping:se,EquirectangularReflectionMapping:ae,EquirectangularRefractionMapping:le,CubeUVReflectionMapping:ce},Xd={RepeatWrapping:ue,ClampToEdgeWrapping:de,MirroredRepeatWrapping:he},Yd={NearestFilter:pe,NearestMipmapNearestFilter:fe,NearestMipmapLinearFilter:ge,LinearFilter:ve,LinearMipmapNearestFilter:ye,LinearMipmapLinearFilter:_e};class Zd extends md{constructor(e){super(e),"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,o=hd.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;const s={};s.credentials="anonymous"===this.crossOrigin?"same-origin":"include",s.headers=this.requestHeader,fetch(e,s).then((function(e){return e.blob()})).then((function(e){return createImageBitmap(e,Object.assign(i.options,{colorSpaceConversion:"none"}))})).then((function(n){hd.add(e,n),t&&t(n),i.manager.itemEnd(e)})).catch((function(t){r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)})),i.manager.itemStart(e)}}let Jd;Zd.prototype.isImageBitmapLoader=!0;const Kd={getContext:function(){return void 0===Jd&&(Jd=new(window.AudioContext||window.webkitAudioContext)),Jd},setContext:function(e){Jd=e}};class eh extends md{constructor(e){super(e)}load(e,t,n,r){const i=this,o=new bd(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,(function(n){try{const e=n.slice(0);Kd.getContext().decodeAudioData(e,(function(e){t(e)}))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}}),n,r)}}class th extends Ud{constructor(e,t,n=1){super(void 0,n);const r=(new Gn).set(e),i=(new Gn).set(t),o=new sr(r.r,r.g,r.b),s=new sr(i.r,i.g,i.b),a=Math.sqrt(Math.PI),l=a*Math.sqrt(.75);this.sh.coefficients[0].copy(o).add(s).multiplyScalar(a),this.sh.coefficients[1].copy(o).sub(s).multiplyScalar(l)}}th.prototype.isHemisphereLightProbe=!0;class nh extends Ud{constructor(e,t=1){super(void 0,t);const n=(new Gn).set(e);this.sh.coefficients[0].set(n.r,n.g,n.b).multiplyScalar(2*Math.sqrt(Math.PI))}}nh.prototype.isAmbientLightProbe=!0;const rh=new Ir,ih=new Ir,oh=new Ir;class sh{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new go,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new go,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep,oh.copy(e.projectionMatrix);const n=t.eyeSep/2,r=n*t.near/t.focus,i=t.near*Math.tan(yn*t.fov*.5)/t.zoom;let o,s;ih.elements[12]=-n,rh.elements[12]=n,o=-i*t.aspect+r,s=i*t.aspect+r,oh.elements[0]=2*t.near/(s-o),oh.elements[8]=(s+o)/(s-o),this.cameraL.projectionMatrix.copy(oh),o=-i*t.aspect-r,s=i*t.aspect-r,oh.elements[0]=2*t.near/(s-o),oh.elements[8]=(s+o)/(s-o),this.cameraR.projectionMatrix.copy(oh)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(ih),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(rh)}}class ah{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=lh(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=lh();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function lh(){return("undefined"==typeof performance?Date:performance).now()}const ch=new sr,uh=new or,dh=new sr,hh=new sr;class ph extends li{constructor(){super(),this.type="AudioListener",this.context=Kd.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new ah}getInput(){return this.gain}removeFilter(){return null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const t=this.context.listener,n=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(ch,uh,dh),hh.set(0,0,-1).applyQuaternion(uh),t.positionX){const e=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(ch.x,e),t.positionY.linearRampToValueAtTime(ch.y,e),t.positionZ.linearRampToValueAtTime(ch.z,e),t.forwardX.linearRampToValueAtTime(hh.x,e),t.forwardY.linearRampToValueAtTime(hh.y,e),t.forwardZ.linearRampToValueAtTime(hh.z,e),t.upX.linearRampToValueAtTime(n.x,e),t.upY.linearRampToValueAtTime(n.y,e),t.upZ.linearRampToValueAtTime(n.z,e)}else t.setPosition(ch.x,ch.y,ch.z),t.setOrientation(hh.x,hh.y,hh.z,n.x,n.y,n.z)}}class fh extends li{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(!0===this.isPlaying)return void console.warn("THREE.Audio: Audio is already playing.");if(!1===this.hasPlaybackControl)return void console.warn("THREE.Audio: this Audio has no playback control.");this._startedAt=this.context.currentTime+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")}stop(){if(!1!==this.hasPlaybackControl)return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}getFilters(){return this.filters}setFilters(e){return e||(e=[]),!0===this._connected?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this}setDetune(e){if(this.detune=e,void 0!==this.source.detune)return!0===this.isPlaying&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(e){return this.setFilters(e?[e]:[])}setPlaybackRate(e){if(!1!==this.hasPlaybackControl)return this.playbackRate=e,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;console.warn("THREE.Audio: this Audio has no playback control.")}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1}getLoop(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop}setLoop(e){if(!1!==this.hasPlaybackControl)return this.loop=e,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")}setLoopStart(e){return this.loopStart=e,this}setLoopEnd(e){return this.loopEnd=e,this}getVolume(){return this.gain.gain.value}setVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}}const mh=new sr,gh=new or,bh=new sr,vh=new sr;class yh extends fh{constructor(e){super(e),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}disconnect(){super.disconnect(),this.panner.disconnect(this.gain)}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(e){return this.panner.refDistance=e,this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(e){return this.panner.rolloffFactor=e,this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(e){return this.panner.distanceModel=e,this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(e){return this.panner.maxDistance=e,this}setDirectionalCone(e,t,n){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=t,this.panner.coneOuterGain=n,this}updateMatrixWorld(e){if(super.updateMatrixWorld(e),!0===this.hasPlaybackControl&&!1===this.isPlaying)return;this.matrixWorld.decompose(mh,gh,bh),vh.set(0,0,1).applyQuaternion(gh);const t=this.panner;if(t.positionX){const e=this.context.currentTime+this.listener.timeDelta;t.positionX.linearRampToValueAtTime(mh.x,e),t.positionY.linearRampToValueAtTime(mh.y,e),t.positionZ.linearRampToValueAtTime(mh.z,e),t.orientationX.linearRampToValueAtTime(vh.x,e),t.orientationY.linearRampToValueAtTime(vh.y,e),t.orientationZ.linearRampToValueAtTime(vh.z,e)}else t.setPosition(mh.x,mh.y,mh.z),t.setOrientation(vh.x,vh.y,vh.z)}}class Sh{constructor(e,t=2048){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=t,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let e=0;const t=this.getFrequencyData();for(let n=0;n<t.length;n++)e+=t[n];return e/t.length}}class _h{constructor(e,t,n){let r,i,o;switch(this.binding=e,this.valueSize=n,t){case"quaternion":r=this._slerp,i=this._slerpAdditive,o=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*n),this._workIndex=5;break;case"string":case"bool":r=this._select,i=this._select,o=this._setAdditiveIdentityOther,this.buffer=new Array(5*n);break;default:r=this._lerp,i=this._lerpAdditive,o=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*n)}this._mixBufferRegion=r,this._mixBufferRegionAdditive=i,this._setIdentity=o,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,t){const n=this.buffer,r=this.valueSize,i=e*r+r;let o=this.cumulativeWeight;if(0===o){for(let e=0;e!==r;++e)n[i+e]=n[e];o=t}else{o+=t;const e=t/o;this._mixBufferRegion(n,i,0,e,r)}this.cumulativeWeight=o}accumulateAdditive(e){const t=this.buffer,n=this.valueSize,r=n*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(t,r,0,e,n),this.cumulativeWeightAdditive+=e}apply(e){const t=this.valueSize,n=this.buffer,r=e*t+t,i=this.cumulativeWeight,o=this.cumulativeWeightAdditive,s=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,i<1){const e=t*this._origIndex;this._mixBufferRegion(n,r,e,1-i,t)}o>0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(let e=t,i=t+t;e!==i;++e)if(n[e]!==n[e+t]){s.setValue(n,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(let e=n,i=r;e!==i;++e)t[e]=t[r+e%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=3*this.valueSize;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n<t;n++)this.buffer[n]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize;for(let n=0;n<this.valueSize;n++)this.buffer[t+n]=this.buffer[e+n]}_select(e,t,n,r,i){if(r>=.5)for(let r=0;r!==i;++r)e[t+r]=e[n+r]}_slerp(e,t,n,r){or.slerpFlat(e,t,e,t,e,n,r)}_slerpAdditive(e,t,n,r,i){const o=this._workIndex*i;or.multiplyQuaternionsFlat(e,o,e,t,e,n),or.slerpFlat(e,t,e,t,e,o,r)}_lerp(e,t,n,r,i){const o=1-r;for(let s=0;s!==i;++s){const i=t+s;e[i]=e[i]*o+e[n+s]*r}}_lerpAdditive(e,t,n,r,i){for(let o=0;o!==i;++o){const i=t+o;e[i]=e[i]+e[n+o]*r}}}const xh=new RegExp("[\\[\\]\\.:\\/]","g"),wh="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",kh=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]"),Oh=/(WCOD+)?/.source.replace("WCOD",wh),Eh=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),Ah=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),Th=new RegExp("^"+kh+Oh+Eh+Ah+"$"),Ch=["material","materials","bones"];class Mh{constructor(e,t,n){this.path=t,this.parsedPath=n||Mh.parseTrackName(t),this.node=Mh.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new Mh.Composite(e,t,n):new Mh(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(xh,"")}static parseTrackName(e){const t=Th.exec(e);if(null===t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){const e=n.nodeName.substring(r+1);-1!==Ch.indexOf(e)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=e)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(void 0===t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){const n=function(e){for(let r=0;r<e.length;r++){const i=e[r];if(i.name===t||i.uuid===t)return i;const o=n(i.children);if(o)return o}return null},r=n(e.children);if(r)return r}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)e[t++]=n[r]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node;const t=this.parsedPath,n=t.objectName,r=t.propertyName;let i=t.propertyIndex;if(e||(e=Mh.findNode(this.rootNode,t.nodeName)||this.rootNode,this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e)return void console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.");if(n){let r=t.objectIndex;switch(n){case"materials":if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);e=e.skeleton.bones;for(let t=0;t<e.length;t++)if(e[t].name===r){r=t;break}break;default:if(void 0===e[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[n]}if(void 0!==r){if(void 0===e[r])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[r]}}const o=e[r];if(void 0===o){const n=t.nodeName;return void console.error("THREE.PropertyBinding: Trying to update property for track: "+n+"."+r+" but it wasn't found.",e)}let s=this.Versioning.None;this.targetObject=e,void 0!==e.needsUpdate?s=this.Versioning.NeedsUpdate:void 0!==e.matrixWorldNeedsUpdate&&(s=this.Versioning.MatrixWorldNeedsUpdate);let a=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!e.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!e.geometry.isBufferGeometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences on THREE.Geometry. Use THREE.BufferGeometry instead.",this);if(!e.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==e.morphTargetDictionary[i]&&(i=e.morphTargetDictionary[i])}a=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=i}else void 0!==o.fromArray&&void 0!==o.toArray?(a=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(a=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=r;this.getValue=this.GetterByBindingType[a],this.setValue=this.SetterByBindingTypeAndVersioning[a][s]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Mh.Composite=class{constructor(e,t,n){const r=n||Mh.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},Mh.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Mh.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},Mh.prototype.GetterByBindingType=[Mh.prototype._getValue_direct,Mh.prototype._getValue_array,Mh.prototype._getValue_arrayElement,Mh.prototype._getValue_toArray],Mh.prototype.SetterByBindingTypeAndVersioning=[[Mh.prototype._setValue_direct,Mh.prototype._setValue_direct_setNeedsUpdate,Mh.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Mh.prototype._setValue_array,Mh.prototype._setValue_array_setNeedsUpdate,Mh.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Mh.prototype._setValue_arrayElement,Mh.prototype._setValue_arrayElement_setNeedsUpdate,Mh.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Mh.prototype._setValue_fromArray,Mh.prototype._setValue_fromArray_setNeedsUpdate,Mh.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class $h{constructor(){this.uuid=_n(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const e={};this._indicesByUUID=e;for(let t=0,n=arguments.length;t!==n;++t)e[arguments[t].uuid]=t;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const t=this;this.stats={objects:{get total(){return t._objects.length},get inUse(){return this.total-t.nCachedObjects_}},get bindingsPerObject(){return t._bindings.length}}}add(){const e=this._objects,t=this._indicesByUUID,n=this._paths,r=this._parsedPaths,i=this._bindings,o=i.length;let s=void 0,a=e.length,l=this.nCachedObjects_;for(let c=0,u=arguments.length;c!==u;++c){const u=arguments[c],d=u.uuid;let h=t[d];if(void 0===h){h=a++,t[d]=h,e.push(u);for(let e=0,t=o;e!==t;++e)i[e].push(new Mh(u,n[e],r[e]))}else if(h<l){s=e[h];const a=--l,c=e[a];t[c.uuid]=h,e[h]=c,t[d]=a,e[a]=u;for(let e=0,t=o;e!==t;++e){const t=i[e],o=t[a];let s=t[h];t[h]=o,void 0===s&&(s=new Mh(u,n[e],r[e])),t[a]=s}}else e[h]!==s&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=l}remove(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length;let i=this.nCachedObjects_;for(let o=0,s=arguments.length;o!==s;++o){const s=arguments[o],a=s.uuid,l=t[a];if(void 0!==l&&l>=i){const o=i++,c=e[o];t[c.uuid]=l,e[l]=c,t[a]=o,e[o]=s;for(let e=0,t=r;e!==t;++e){const t=n[e],r=t[o],i=t[l];t[l]=r,t[o]=i}}}this.nCachedObjects_=i}uncache(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length;let i=this.nCachedObjects_,o=e.length;for(let s=0,a=arguments.length;s!==a;++s){const a=arguments[s].uuid,l=t[a];if(void 0!==l)if(delete t[a],l<i){const s=--i,a=e[s],c=--o,u=e[c];t[a.uuid]=l,e[l]=a,t[u.uuid]=s,e[s]=u,e.pop();for(let e=0,t=r;e!==t;++e){const t=n[e],r=t[s],i=t[c];t[l]=r,t[s]=i,t.pop()}}else{const i=--o,s=e[i];i>0&&(t[s.uuid]=l),e[l]=s,e.pop();for(let e=0,t=r;e!==t;++e){const t=n[e];t[l]=t[i],t.pop()}}}this.nCachedObjects_=i}subscribe_(e,t){const n=this._bindingsIndicesByPath;let r=n[e];const i=this._bindings;if(void 0!==r)return i[r];const o=this._paths,s=this._parsedPaths,a=this._objects,l=a.length,c=this.nCachedObjects_,u=new Array(l);r=i.length,n[e]=r,o.push(e),s.push(t),i.push(u);for(let n=c,r=a.length;n!==r;++n){const r=a[n];u[n]=new Mh(r,e,t)}return u}unsubscribe_(e){const t=this._bindingsIndicesByPath,n=t[e];if(void 0!==n){const r=this._paths,i=this._parsedPaths,o=this._bindings,s=o.length-1,a=o[s];t[e[s]]=n,o[n]=a,o.pop(),i[n]=i[s],i.pop(),r[n]=r[s],r.pop()}}}$h.prototype.isAnimationObjectGroup=!0;class Ph{constructor(e,t,n=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=r;const i=t.tracks,o=i.length,s=new Array(o),a={endingStart:kt,endingEnd:kt};for(let e=0;e!==o;++e){const t=i[e].createInterpolant(null);s[e]=t,t.settings=a}this._interpolantSettings=a,this._interpolants=s,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=yt,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n){if(e.fadeOut(t),this.fadeIn(t),n){const n=this._clip.duration,r=e._clip.duration,i=r/n,o=n/r;e.warp(1,i,t),this.warp(o,1,t)}return this}crossFadeTo(e,t,n){return e.crossFadeFrom(this,t,n)}stopFading(){const e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){const r=this._mixer,i=r.time,o=this.timeScale;let s=this._timeScaleInterpolant;null===s&&(s=r._lendControlInterpolant(),this._timeScaleInterpolant=s);const a=s.parameterPositions,l=s.sampleValues;return a[0]=i,a[1]=i+n,l[0]=e/o,l[1]=t/o,this}stopWarping(){const e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,r){if(!this.enabled)return void this._updateWeight(e);const i=this._startTime;if(null!==i){const r=(e-i)*n;if(r<0||0===n)return;this._startTime=null,t=n*r}t*=this._updateTimeScale(e);const o=this._updateTime(t),s=this._updateWeight(e);if(s>0){const e=this._interpolants,t=this._propertyBindings;switch(this.blendMode){case Tt:for(let n=0,r=e.length;n!==r;++n)e[n].evaluate(o),t[n].accumulateAdditive(s);break;case At:default:for(let n=0,i=e.length;n!==i;++n)e[n].evaluate(o),t[n].accumulate(r,s)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const n=this._weightInterpolant;if(null!==n){const r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const n=this._timeScaleInterpolant;if(null!==n){t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,n=this.loop;let r=this.time+e,i=this._loopCount;const o=n===St;if(0===e)return-1===i?r:o&&1==(1&i)?t-r:r;if(n===vt){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else{if(!(r<0)){this.time=r;break e}r=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===i&&(e>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),r>=t||r<0){const n=Math.floor(r/t);r-=t*n,i+=Math.abs(n);const s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===s){const t=e<0;this._setEndings(t,!t,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n})}}else this.time=r;if(o&&1==(1&i))return t-r}return r}_setEndings(e,t,n){const r=this._interpolantSettings;n?(r.endingStart=Ot,r.endingEnd=Ot):(r.endingStart=e?this.zeroSlopeAtStart?Ot:kt:Et,r.endingEnd=t?this.zeroSlopeAtEnd?Ot:kt:Et)}_scheduleFading(e,t,n){const r=this._mixer,i=r.time;let o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);const s=o.parameterPositions,a=o.sampleValues;return s[0]=i,a[0]=t,s[1]=i+e,a[1]=n,this}}class Rh extends gn{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const n=e._localRoot||this._root,r=e._clip.tracks,i=r.length,o=e._propertyBindings,s=e._interpolants,a=n.uuid,l=this._bindingsByRootAndName;let c=l[a];void 0===c&&(c={},l[a]=c);for(let e=0;e!==i;++e){const i=r[e],l=i.name;let u=c[l];if(void 0!==u)++u.referenceCount,o[e]=u;else{if(u=o[e],void 0!==u){null===u._cacheIndex&&(++u.referenceCount,this._addInactiveBinding(u,a,l));continue}const r=t&&t._propertyBindings[e].binding.parsedPath;u=new _h(Mh.create(n,l,r),i.ValueTypeName,i.getValueSize()),++u.referenceCount,this._addInactiveBinding(u,a,l),o[e]=u}s[e].resultBuffer=u.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){const t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t)}const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==n.useCount++&&(this._lendBinding(n),n.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==--n.useCount&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return null!==t&&t<this._nActiveActions}_addInactiveAction(e,t,n){const r=this._actions,i=this._actionsByClip;let o=i[t];if(void 0===o)o={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,i[t]=o;else{const t=o.knownActions;e._byClipCacheIndex=t.length,t.push(e)}e._cacheIndex=r.length,r.push(e),o.actionByRoot[n]=e}_removeInactiveAction(e){const t=this._actions,n=t[t.length-1],r=e._cacheIndex;n._cacheIndex=r,t[r]=n,t.pop(),e._cacheIndex=null;const i=e._clip.uuid,o=this._actionsByClip,s=o[i],a=s.knownActions,l=a[a.length-1],c=e._byClipCacheIndex;l._byClipCacheIndex=c,a[c]=l,a.pop(),e._byClipCacheIndex=null;delete s.actionByRoot[(e._localRoot||this._root).uuid],0===a.length&&delete o[i],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==--n.referenceCount&&this._removeInactiveBinding(n)}}_lendAction(e){const t=this._actions,n=e._cacheIndex,r=this._nActiveActions++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_takeBackAction(e){const t=this._actions,n=e._cacheIndex,r=--this._nActiveActions,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_addInactiveBinding(e,t,n){const r=this._bindingsByRootAndName,i=this._bindings;let o=r[t];void 0===o&&(o={},r[t]=o),o[n]=e,e._cacheIndex=i.length,i.push(e)}_removeInactiveBinding(e){const t=this._bindings,n=e.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,s=o[r],a=t[t.length-1],l=e._cacheIndex;a._cacheIndex=l,t[l]=a,t.pop(),delete s[i],0===Object.keys(s).length&&delete o[r]}_lendBinding(e){const t=this._bindings,n=e._cacheIndex,r=this._nActiveBindings++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_takeBackBinding(e){const t=this._bindings,n=e._cacheIndex,r=--this._nActiveBindings,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_lendControlInterpolant(){const e=this._controlInterpolants,t=this._nActiveControlInterpolants++;let n=e[t];return void 0===n&&(n=new ed(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),n.__cacheIndex=t,e[t]=n),n}_takeBackControlInterpolant(e){const t=this._controlInterpolants,n=e.__cacheIndex,r=--this._nActiveControlInterpolants,i=t[r];e.__cacheIndex=r,t[r]=e,i.__cacheIndex=n,t[n]=i}clipAction(e,t,n){const r=t||this._root,i=r.uuid;let o="string"==typeof e?ud.findByName(r,e):e;const s=null!==o?o.uuid:e,a=this._actionsByClip[s];let l=null;if(void 0===n&&(n=null!==o?o.blendMode:At),void 0!==a){const e=a.actionByRoot[i];if(void 0!==e&&e.blendMode===n)return e;l=a.knownActions[0],null===o&&(o=l._clip)}if(null===o)return null;const c=new Ph(this,o,t,n);return this._bindAction(c,l),this._addInactiveAction(c,s,i),c}existingAction(e,t){const n=t||this._root,r=n.uuid,i="string"==typeof e?ud.findByName(n,e):e,o=i?i.uuid:e,s=this._actionsByClip[o];return void 0!==s&&s.actionByRoot[r]||null}stopAllAction(){const e=this._actions;for(let t=this._nActiveActions-1;t>=0;--t)e[t].stop();return this}update(e){e*=this.timeScale;const t=this._actions,n=this._nActiveActions,r=this.time+=e,i=Math.sign(e),o=this._accuIndex^=1;for(let s=0;s!==n;++s){t[s]._update(r,e,i,o)}const s=this._bindings,a=this._nActiveBindings;for(let e=0;e!==a;++e)s[e].apply(o);return this}setTime(e){this.time=0;for(let e=0;e<this._actions.length;e++)this._actions[e].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){const t=this._actions,n=e.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){const e=i.knownActions;for(let n=0,r=e.length;n!==r;++n){const r=e[n];this._deactivateAction(r);const i=r._cacheIndex,o=t[t.length-1];r._cacheIndex=null,r._byClipCacheIndex=null,o._cacheIndex=i,t[i]=o,t.pop(),this._removeInactiveBindingsForAction(r)}delete r[n]}}uncacheRoot(e){const t=e.uuid,n=this._actionsByClip;for(const e in n){const r=n[e].actionByRoot[t];void 0!==r&&(this._deactivateAction(r),this._removeInactiveAction(r))}const r=this._bindingsByRootAndName[t];if(void 0!==r)for(const e in r){const t=r[e];t.restoreOriginalState(),this._removeInactiveBinding(t)}}uncacheAction(e,t){const n=this.existingAction(e,t);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}Rh.prototype._controlInterpolantsResultBuffer=new Float32Array(1);class jh{constructor(e){"string"==typeof e&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),e=arguments[1]),this.value=e}clone(){return new jh(void 0===this.value.clone?this.value:this.value.clone())}}class Nh extends ul{constructor(e,t,n=1){super(e,t),this.meshPerAttribute=n}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const t=super.clone(e);return t.meshPerAttribute=this.meshPerAttribute,t}toJSON(e){const t=super.toJSON(e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}}Nh.prototype.isInstancedInterleavedBuffer=!0;class Dh{constructor(e,t,n,r,i){this.buffer=e,this.type=t,this.itemSize=n,this.elementSize=r,this.count=i,this.version=0}set needsUpdate(e){!0===e&&this.version++}setBuffer(e){return this.buffer=e,this}setType(e,t){return this.type=e,this.elementSize=t,this}setItemSize(e){return this.itemSize=e,this}setCount(e){return this.count=e,this}}Dh.prototype.isGLBufferAttribute=!0;class Ih{constructor(e,t,n=0,r=1/0){this.ray=new Dr(e,t),this.near=n,this.far=r,this.camera=null,this.layers=new Wr,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):console.error("THREE.Raycaster: Unsupported camera type: "+t.type)}intersectObject(e,t=!0,n=[]){return Bh(e,this,n,t),n.sort(Lh),n}intersectObjects(e,t=!0,n=[]){for(let r=0,i=e.length;r<i;r++)Bh(e[r],this,n,t);return n.sort(Lh),n}}function Lh(e,t){return e.distance-t.distance}function Bh(e,t,n,r){if(e.layers.test(t.layers)&&e.raycast(t,n),!0===r){const r=e.children;for(let e=0,i=r.length;e<i;e++)Bh(r[e],t,n,!0)}}class zh{constructor(e=1,t=0,n=0){return this.radius=e,this.phi=t,this.theta=n,this}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(xn(t/this.radius,-1,1))),this}clone(){return(new this.constructor).copy(this)}}class Fh{constructor(e=1,t=0,n=0){return this.radius=e,this.theta=t,this.y=n,this}set(e,t,n){return this.radius=e,this.theta=t,this.y=n,this}copy(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+n*n),this.theta=Math.atan2(e,n),this.y=t,this}clone(){return(new this.constructor).copy(this)}}const Uh=new Cn;class Qh{constructor(e=new Cn(1/0,1/0),t=new Cn(-1/0,-1/0)){this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=Uh.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(e){return this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return Uh.copy(e).clamp(this.min,this.max).sub(e).length()}intersect(e){return this.min.max(e.min),this.max.min(e.max),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}Qh.prototype.isBox2=!0;const qh=new sr,Gh=new sr;class Hh{constructor(e=new sr,t=new sr){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){qh.subVectors(e,this.start),Gh.subVectors(this.end,this.start);const n=Gh.dot(Gh);let r=Gh.dot(qh)/n;return t&&(r=xn(r,0,1)),r}closestPointToPoint(e,t,n){const r=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return(new this.constructor).copy(this)}}const Vh=new sr;class Wh extends li{constructor(e,t){super(),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t;const n=new Qi,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let e=0,t=1,n=32;e<n;e++,t++){const i=e/n*Math.PI*2,o=t/n*Math.PI*2;r.push(Math.cos(i),Math.sin(i),1,Math.cos(o),Math.sin(o),1)}n.setAttribute("position",new ji(r,3));const i=new Xl({fog:!1,toneMapped:!1});this.cone=new ic(n,i),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateMatrixWorld();const e=this.light.distance?this.light.distance:1e3,t=e*Math.tan(this.light.angle);this.cone.scale.set(t,t,e),Vh.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(Vh),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}const Xh=new sr,Yh=new Ir,Zh=new Ir;class Jh extends ic{constructor(e){const t=function e(t){const n=[];!0===t.isBone&&n.push(t);for(let r=0;r<t.children.length;r++)n.push.apply(n,e(t.children[r]));return n}(e),n=new Qi,r=[],i=[],o=new Gn(0,0,1),s=new Gn(0,1,0);for(let e=0;e<t.length;e++){const n=t[e];n.parent&&n.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(o.r,o.g,o.b),i.push(s.r,s.g,s.b))}n.setAttribute("position",new ji(r,3)),n.setAttribute("color",new ji(i,3));super(n,new Xl({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0})),this.type="SkeletonHelper",this.isSkeletonHelper=!0,this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(e){const t=this.bones,n=this.geometry,r=n.getAttribute("position");Zh.copy(this.root.matrixWorld).invert();for(let e=0,n=0;e<t.length;e++){const i=t[e];i.parent&&i.parent.isBone&&(Yh.multiplyMatrices(Zh,i.matrixWorld),Xh.setFromMatrixPosition(Yh),r.setXYZ(n,Xh.x,Xh.y,Xh.z),Yh.multiplyMatrices(Zh,i.parent.matrixWorld),Xh.setFromMatrixPosition(Yh),r.setXYZ(n+1,Xh.x,Xh.y,Xh.z),n+=2)}n.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}}class Kh extends ao{constructor(e,t,n){super(new Pu(t,4,2),new xi({wireframe:!0,fog:!1,toneMapped:!1})),this.light=e,this.light.updateMatrixWorld(),this.color=n,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)}}const ep=new sr,tp=new Gn,np=new Gn;class rp extends li{constructor(e,t,n){super(),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;const r=new Cu(t);r.rotateY(.5*Math.PI),this.material=new xi({wireframe:!0,fog:!1,toneMapped:!1}),void 0===this.color&&(this.material.vertexColors=!0);const i=r.getAttribute("position"),o=new Float32Array(3*i.count);r.setAttribute("color",new Oi(o,3)),this.add(new ao(r,this.material)),this.update()}dispose(){this.children[0].geometry.dispose(),this.children[0].material.dispose()}update(){const e=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{const t=e.geometry.getAttribute("color");tp.copy(this.light.color),np.copy(this.light.groundColor);for(let e=0,n=t.count;e<n;e++){const r=e<n/2?tp:np;t.setXYZ(e,r.r,r.g,r.b)}t.needsUpdate=!0}e.lookAt(ep.setFromMatrixPosition(this.light.matrixWorld).negate())}}class ip extends ic{constructor(e=10,t=10,n=4473924,r=8947848){n=new Gn(n),r=new Gn(r);const i=t/2,o=e/t,s=e/2,a=[],l=[];for(let e=0,c=0,u=-s;e<=t;e++,u+=o){a.push(-s,0,u,s,0,u),a.push(u,0,-s,u,0,s);const t=e===i?n:r;t.toArray(l,c),c+=3,t.toArray(l,c),c+=3,t.toArray(l,c),c+=3,t.toArray(l,c),c+=3}const c=new Qi;c.setAttribute("position",new ji(a,3)),c.setAttribute("color",new ji(l,3));super(c,new Xl({vertexColors:!0,toneMapped:!1})),this.type="GridHelper"}}class op extends ic{constructor(e=10,t=16,n=8,r=64,i=4473924,o=8947848){i=new Gn(i),o=new Gn(o);const s=[],a=[];for(let n=0;n<=t;n++){const r=n/t*(2*Math.PI),l=Math.sin(r)*e,c=Math.cos(r)*e;s.push(0,0,0),s.push(l,0,c);const u=1&n?i:o;a.push(u.r,u.g,u.b),a.push(u.r,u.g,u.b)}for(let t=0;t<=n;t++){const l=1&t?i:o,c=e-e/n*t;for(let e=0;e<r;e++){let t=e/r*(2*Math.PI),n=Math.sin(t)*c,i=Math.cos(t)*c;s.push(n,0,i),a.push(l.r,l.g,l.b),t=(e+1)/r*(2*Math.PI),n=Math.sin(t)*c,i=Math.cos(t)*c,s.push(n,0,i),a.push(l.r,l.g,l.b)}}const l=new Qi;l.setAttribute("position",new ji(s,3)),l.setAttribute("color",new ji(a,3));super(l,new Xl({vertexColors:!0,toneMapped:!1})),this.type="PolarGridHelper"}}const sp=new sr,ap=new sr,lp=new sr;class cp extends li{constructor(e,t,n){super(),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,void 0===t&&(t=1);let r=new Qi;r.setAttribute("position",new ji([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3));const i=new Xl({fog:!1,toneMapped:!1});this.lightPlane=new tc(r,i),this.add(this.lightPlane),r=new Qi,r.setAttribute("position",new ji([0,0,0,0,0,1],3)),this.targetLine=new tc(r,i),this.add(this.targetLine),this.update()}dispose(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()}update(){sp.setFromMatrixPosition(this.light.matrixWorld),ap.setFromMatrixPosition(this.light.target.matrixWorld),lp.subVectors(ap,sp),this.lightPlane.lookAt(ap),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(ap),this.targetLine.scale.z=lp.length()}}const up=new sr,dp=new mo;class hp extends ic{constructor(e){const t=new Qi,n=new Xl({color:16777215,vertexColors:!0,toneMapped:!1}),r=[],i=[],o={},s=new Gn(16755200),a=new Gn(16711680),l=new Gn(43775),c=new Gn(16777215),u=new Gn(3355443);function d(e,t,n){h(e,n),h(t,n)}function h(e,t){r.push(0,0,0),i.push(t.r,t.g,t.b),void 0===o[e]&&(o[e]=[]),o[e].push(r.length/3-1)}d("n1","n2",s),d("n2","n4",s),d("n4","n3",s),d("n3","n1",s),d("f1","f2",s),d("f2","f4",s),d("f4","f3",s),d("f3","f1",s),d("n1","f1",s),d("n2","f2",s),d("n3","f3",s),d("n4","f4",s),d("p","n1",a),d("p","n2",a),d("p","n3",a),d("p","n4",a),d("u1","u2",l),d("u2","u3",l),d("u3","u1",l),d("c","t",c),d("p","c",u),d("cn1","cn2",u),d("cn3","cn4",u),d("cf1","cf2",u),d("cf3","cf4",u),t.setAttribute("position",new ji(r,3)),t.setAttribute("color",new ji(i,3)),super(t,n),this.type="CameraHelper",this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}update(){const e=this.geometry,t=this.pointMap;dp.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),pp("c",t,e,dp,0,0,-1),pp("t",t,e,dp,0,0,1),pp("n1",t,e,dp,-1,-1,-1),pp("n2",t,e,dp,1,-1,-1),pp("n3",t,e,dp,-1,1,-1),pp("n4",t,e,dp,1,1,-1),pp("f1",t,e,dp,-1,-1,1),pp("f2",t,e,dp,1,-1,1),pp("f3",t,e,dp,-1,1,1),pp("f4",t,e,dp,1,1,1),pp("u1",t,e,dp,.7,1.1,-1),pp("u2",t,e,dp,-.7,1.1,-1),pp("u3",t,e,dp,0,2,-1),pp("cf1",t,e,dp,-1,0,1),pp("cf2",t,e,dp,1,0,1),pp("cf3",t,e,dp,0,-1,1),pp("cf4",t,e,dp,0,1,1),pp("cn1",t,e,dp,-1,0,-1),pp("cn2",t,e,dp,1,0,-1),pp("cn3",t,e,dp,0,-1,-1),pp("cn4",t,e,dp,0,1,-1),e.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}}function pp(e,t,n,r,i,o,s){up.set(i,o,s).unproject(r);const a=t[e];if(void 0!==a){const e=n.getAttribute("position");for(let t=0,n=a.length;t<n;t++)e.setXYZ(a[t],up.x,up.y,up.z)}}const fp=new cr;class mp extends ic{constructor(e,t=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(24),i=new Qi;i.setIndex(new Oi(n,1)),i.setAttribute("position",new Oi(r,3)),super(i,new Xl({color:t,toneMapped:!1})),this.object=e,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&fp.setFromObject(this.object),fp.isEmpty())return;const t=fp.min,n=fp.max,r=this.geometry.attributes.position,i=r.array;i[0]=n.x,i[1]=n.y,i[2]=n.z,i[3]=t.x,i[4]=n.y,i[5]=n.z,i[6]=t.x,i[7]=t.y,i[8]=n.z,i[9]=n.x,i[10]=t.y,i[11]=n.z,i[12]=n.x,i[13]=n.y,i[14]=t.z,i[15]=t.x,i[16]=n.y,i[17]=t.z,i[18]=t.x,i[19]=t.y,i[20]=t.z,i[21]=n.x,i[22]=t.y,i[23]=t.z,r.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(e){return this.object=e,this.update(),this}copy(e){return ic.prototype.copy.call(this,e),this.object=e.object,this}}class gp extends ic{constructor(e,t=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Qi;r.setIndex(new Oi(n,1)),r.setAttribute("position",new ji([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),super(r,new Xl({color:t,toneMapped:!1})),this.box=e,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(e){const t=this.box;t.isEmpty()||(t.getCenter(this.position),t.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(e))}}class bp extends tc{constructor(e,t=1,n=16776960){const r=n,i=new Qi;i.setAttribute("position",new ji([1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,0,0,1,0,0,0],3)),i.computeBoundingSphere(),super(i,new Xl({color:r,toneMapped:!1})),this.type="PlaneHelper",this.plane=e,this.size=t;const o=new Qi;o.setAttribute("position",new ji([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),o.computeBoundingSphere(),this.add(new ao(o,new xi({color:r,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}updateMatrixWorld(e){let t=-this.plane.constant;Math.abs(t)<1e-8&&(t=1e-8),this.scale.set(.5*this.size,.5*this.size,t),this.children[0].material.side=t<0?m:f,this.lookAt(this.plane.normal),super.updateMatrixWorld(e)}}const vp=new sr;let yp,Sp;class _p extends li{constructor(e=new sr(0,0,1),t=new sr(0,0,0),n=1,r=16776960,i=.2*n,o=.2*i){super(),this.type="ArrowHelper",void 0===yp&&(yp=new Qi,yp.setAttribute("position",new ji([0,0,0,0,1,0],3)),Sp=new Uc(0,.5,1,5,1),Sp.translate(0,-.5,0)),this.position.copy(t),this.line=new tc(yp,new Xl({color:r,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new ao(Sp,new xi({color:r,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(n,i,o)}setDirection(e){if(e.y>.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{vp.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(vp,t)}}setLength(e,t=.2*e,n=.2*t){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}}class xp extends ic{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=new Qi;n.setAttribute("position",new ji(t,3)),n.setAttribute("color",new ji([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));super(n,new Xl({vertexColors:!0,toneMapped:!1})),this.type="AxesHelper"}setColors(e,t,n){const r=new Gn,i=this.geometry.attributes.color.array;return r.set(e),r.toArray(i,0),r.toArray(i,3),r.set(t),r.toArray(i,6),r.toArray(i,9),r.set(n),r.toArray(i,12),r.toArray(i,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class wp{constructor(){this.type="ShapePath",this.color=new Gn,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new Lc,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,r){return this.currentPath.quadraticCurveTo(e,t,n,r),this}bezierCurveTo(e,t,n,r,i,o){return this.currentPath.bezierCurveTo(e,t,n,r,i,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e,t){function n(e){const t=[];for(let n=0,r=e.length;n<r;n++){const r=e[n],i=new Zc;i.curves=r.curves,t.push(i)}return t}function r(e,t){const n=t.length;let r=!1;for(let i=n-1,o=0;o<n;i=o++){let n=t[i],s=t[o],a=s.x-n.x,l=s.y-n.y;if(Math.abs(l)>Number.EPSILON){if(l<0&&(n=t[o],a=-a,s=t[i],l=-l),e.y<n.y||e.y>s.y)continue;if(e.y===n.y){if(e.x===n.x)return!0}else{const t=l*(e.x-n.x)-a*(e.y-n.y);if(0===t)return!0;if(t<0)continue;r=!r}}else{if(e.y!==n.y)continue;if(s.x<=e.x&&e.x<=n.x||n.x<=e.x&&e.x<=s.x)return!0}}return r}const i=wu.isClockWise,o=this.subPaths;if(0===o.length)return[];if(!0===t)return n(o);let s,a,l;const c=[];if(1===o.length)return a=o[0],l=new Zc,l.curves=a.curves,c.push(l),c;let u=!i(o[0].getPoints());u=e?!u:u;const d=[],h=[];let p,f,m=[],g=0;h[g]=void 0,m[g]=[];for(let t=0,n=o.length;t<n;t++)a=o[t],p=a.getPoints(),s=i(p),s=e?!s:s,s?(!u&&h[g]&&g++,h[g]={s:new Zc,p:p},h[g].s.curves=a.curves,u&&g++,m[g]=[]):m[g].push({h:a,p:p[0]});if(!h[0])return n(o);if(h.length>1){let e=!1,t=0;for(let e=0,t=h.length;e<t;e++)d[e]=[];for(let n=0,i=h.length;n<i;n++){const i=m[n];for(let o=0;o<i.length;o++){const s=i[o];let a=!0;for(let i=0;i<h.length;i++)r(s.p,h[i].p)&&(n!==i&&t++,a?(a=!1,d[i].push(s)):e=!0);a&&d[n].push(s)}}t>0&&!1===e&&(m=d)}for(let e=0,t=h.length;e<t;e++){l=h[e].s,c.push(l),f=m[e];for(let e=0,t=f.length;e<t;e++)l.holes.push(f[e].h)}return c}}class kp{static toHalfFloat(e){Math.abs(e)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),e=xn(e,-65504,65504),Ep[0]=e;const t=Ap[0],n=t>>23&511;return Tp[n]+((8388607&t)>>Cp[n])}static fromHalfFloat(e){const t=e>>10;return Ap[0]=Mp[Pp[t]+(1023&e)]+$p[t],Ep[0]}}const Op=new ArrayBuffer(4),Ep=new Float32Array(Op),Ap=new Uint32Array(Op),Tp=new Uint32Array(512),Cp=new Uint32Array(512);for(let e=0;e<256;++e){const t=e-127;t<-27?(Tp[e]=0,Tp[256|e]=32768,Cp[e]=24,Cp[256|e]=24):t<-14?(Tp[e]=1024>>-t-14,Tp[256|e]=1024>>-t-14|32768,Cp[e]=-t-1,Cp[256|e]=-t-1):t<=15?(Tp[e]=t+15<<10,Tp[256|e]=t+15<<10|32768,Cp[e]=13,Cp[256|e]=13):t<128?(Tp[e]=31744,Tp[256|e]=64512,Cp[e]=24,Cp[256|e]=24):(Tp[e]=31744,Tp[256|e]=64512,Cp[e]=13,Cp[256|e]=13)}const Mp=new Uint32Array(2048),$p=new Uint32Array(64),Pp=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,n=0;for(;0==(8388608&t);)t<<=1,n-=8388608;t&=-8388609,n+=947912704,Mp[e]=t|n}for(let e=1024;e<2048;++e)Mp[e]=939524096+(e-1024<<13);for(let e=1;e<31;++e)$p[e]=e<<23;$p[31]=1199570944,$p[32]=2147483648;for(let e=33;e<63;++e)$p[e]=2147483648+(e-32<<23);$p[63]=3347054592;for(let e=1;e<64;++e)32!==e&&(Pp[e]=1024);const Rp=0,jp=1,Np=0,Dp=1,Ip=2;function Lp(e){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),e}function Bp(e=[]){return console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),e.isMultiMaterial=!0,e.materials=e,e.clone=function(){return e.slice()},e}class zp extends dc{constructor(e,t){console.warn("THREE.PointCloud has been renamed to THREE.Points."),super(e,t)}}class Fp extends Al{constructor(e){console.warn("THREE.Particle has been renamed to THREE.Sprite."),super(e)}}class Up extends dc{constructor(e,t){console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),super(e,t)}}class Qp extends sc{constructor(e){console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),super(e)}}class qp extends sc{constructor(e){console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),super(e)}}class Gp extends sc{constructor(e){console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),super(e)}}class Hp extends sr{constructor(e,t,n){console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),super(e,t,n)}}class Vp extends Oi{constructor(e,t){console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead."),super(e,t),this.setUsage(on)}}class Wp extends Ei{constructor(e,t){console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),super(e,t)}}class Xp extends Ai{constructor(e,t){console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),super(e,t)}}class Yp extends Ti{constructor(e,t){console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),super(e,t)}}class Zp extends Ci{constructor(e,t){console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),super(e,t)}}class Jp extends Mi{constructor(e,t){console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),super(e,t)}}class Kp extends $i{constructor(e,t){console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),super(e,t)}}class ef extends Pi{constructor(e,t){console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),super(e,t)}}class tf extends ji{constructor(e,t){console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),super(e,t)}}class nf extends Ni{constructor(e,t){console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),super(e,t)}}bc.create=function(e,t){return console.log("THREE.Curve.create() has been deprecated"),e.prototype=Object.create(bc.prototype),e.prototype.constructor=e,e.prototype.getPoint=t,e},Lc.prototype.fromPoints=function(e){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(e)};class rf extends xp{constructor(e){console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),super(e)}}class of extends mp{constructor(e,t){console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),super(e,t)}}class sf extends ic{constructor(e,t){console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),super(new Yc(e.geometry),new Xl({color:void 0!==t?t:16777215}))}}ip.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Jh.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")};class af extends ic{constructor(e,t){console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),super(new Iu(e.geometry),new Xl({color:void 0!==t?t:16777215}))}}md.prototype.extractUrlBase=function(e){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),qd.extractUrlBase(e)},md.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}};class lf extends bd{constructor(e){console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),super(e)}}class cf extends xd{constructor(e){console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),super(e)}}Qh.prototype.center=function(e){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(e)},Qh.prototype.empty=function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},Qh.prototype.isIntersectionBox=function(e){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},Qh.prototype.size=function(e){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(e)},cr.prototype.center=function(e){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(e)},cr.prototype.empty=function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},cr.prototype.isIntersectionBox=function(e){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},cr.prototype.isIntersectionSphere=function(e){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},cr.prototype.size=function(e){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(e)},Vr.prototype.toVector3=function(){console.error("THREE.Euler: .toVector3() has been removed. Use Vector3.setFromEuler() instead")},Tr.prototype.empty=function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()},Eo.prototype.setFromMatrix=function(e){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(e)},Hh.prototype.center=function(e){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(e)},Mn.prototype.flattenToArrayOffset=function(e,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},Mn.prototype.multiplyVector3=function(e){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},Mn.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},Mn.prototype.applyToBufferAttribute=function(e){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},Mn.prototype.applyToVector3Array=function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")},Mn.prototype.getInverse=function(e){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()},Ir.prototype.extractPosition=function(e){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(e)},Ir.prototype.flattenToArrayOffset=function(e,t){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},Ir.prototype.getPosition=function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),(new sr).setFromMatrixColumn(this,3)},Ir.prototype.setRotationFromQuaternion=function(e){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(e)},Ir.prototype.multiplyToArray=function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},Ir.prototype.multiplyVector3=function(e){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},Ir.prototype.multiplyVector4=function(e){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},Ir.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},Ir.prototype.rotateAxis=function(e){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),e.transformDirection(this)},Ir.prototype.crossVector=function(e){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},Ir.prototype.translate=function(){console.error("THREE.Matrix4: .translate() has been removed.")},Ir.prototype.rotateX=function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},Ir.prototype.rotateY=function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},Ir.prototype.rotateZ=function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},Ir.prototype.rotateByAxis=function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},Ir.prototype.applyToBufferAttribute=function(e){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},Ir.prototype.applyToVector3Array=function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},Ir.prototype.makeFrustum=function(e,t,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(e,t,r,n,i,o)},Ir.prototype.getInverse=function(e){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()},wo.prototype.isIntersectionLine=function(e){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(e)},or.prototype.multiplyVector3=function(e){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),e.applyQuaternion(this)},or.prototype.inverse=function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()},Dr.prototype.isIntersectionBox=function(e){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},Dr.prototype.isIntersectionPlane=function(e){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(e)},Dr.prototype.isIntersectionSphere=function(e){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},yi.prototype.area=function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},yi.prototype.barycoordFromPoint=function(e,t){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(e,t)},yi.prototype.midpoint=function(e){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(e)},yi.prototypenormal=function(e){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(e)},yi.prototype.plane=function(e){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(e)},yi.barycoordFromPoint=function(e,t,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),yi.getBarycoord(e,t,n,r,i)},yi.normal=function(e,t,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),yi.getNormal(e,t,n,r)},Zc.prototype.extractAllPoints=function(e){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(e)},Zc.prototype.extrude=function(e){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Eu(this,e)},Zc.prototype.makeGeometry=function(e){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new $u(this,e)},Cn.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},Cn.prototype.distanceToManhattan=function(e){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},Cn.prototype.lengthManhattan=function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},sr.prototype.setEulerFromRotationMatrix=function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},sr.prototype.setEulerFromQuaternion=function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},sr.prototype.getPositionFromMatrix=function(e){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(e)},sr.prototype.getScaleFromMatrix=function(e){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(e)},sr.prototype.getColumnFromMatrix=function(e,t){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,e)},sr.prototype.applyProjection=function(e){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(e)},sr.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},sr.prototype.distanceToManhattan=function(e){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},sr.prototype.lengthManhattan=function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},Jn.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},Jn.prototype.lengthManhattan=function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},li.prototype.getChildByName=function(e){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(e)},li.prototype.renderDepth=function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},li.prototype.translate=function(e,t){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(t,e)},li.prototype.getWorldRotation=function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")},li.prototype.applyMatrix=function(e){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)},Object.defineProperties(li.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(e){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=e}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),ao.prototype.setDrawMode=function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")},Object.defineProperties(ao.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),Ct},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}}),Il.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")},go.prototype.setLens=function(e,t){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==t&&(this.filmGauge=t),this.setFocalLength(e)},Object.defineProperties(kd.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(e){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=e}},shadowCameraLeft:{set:function(e){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=e}},shadowCameraRight:{set:function(e){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=e}},shadowCameraTop:{set:function(e){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=e}},shadowCameraBottom:{set:function(e){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=e}},shadowCameraNear:{set:function(e){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=e}},shadowCameraFar:{set:function(e){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=e}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(e){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=e}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(e){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=e}},shadowMapHeight:{set:function(e){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=e}}}),Object.defineProperties(Oi.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.usage===on},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(on)}}}),Oi.prototype.setDynamic=function(e){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?on:rn),this},Oi.prototype.copyIndicesArray=function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},Oi.prototype.setArray=function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},Qi.prototype.addIndex=function(e){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(e)},Qi.prototype.addAttribute=function(e,t){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),t&&t.isBufferAttribute||t&&t.isInterleavedBufferAttribute?"index"===e?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(t),this):this.setAttribute(e,t):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(e,new Oi(arguments[1],arguments[2])))},Qi.prototype.addDrawCall=function(e,t,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(e,t)},Qi.prototype.clearDrawCalls=function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},Qi.prototype.computeOffsets=function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},Qi.prototype.removeAttribute=function(e){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(e)},Qi.prototype.applyMatrix=function(e){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)},Object.defineProperties(Qi.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),ul.prototype.setDynamic=function(e){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?on:rn),this},ul.prototype.setArray=function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},Eu.prototype.getArrays=function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")},Eu.prototype.addShapeList=function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")},Eu.prototype.addShape=function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")},cl.prototype.dispose=function(){console.error("THREE.Scene: .dispose() has been removed.")},jh.prototype.onUpdate=function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this},Object.defineProperties(_i.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new Gn}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(e){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=e===b}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(e){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=e}},vertexTangents:{get:function(){console.warn("THREE."+this.type+": .vertexTangents has been removed.")},set:function(){console.warn("THREE."+this.type+": .vertexTangents has been removed.")}}}),Object.defineProperties(fo.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(e){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=e}}}),ol.prototype.clearTarget=function(e,t,n,r){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(e),this.clear(t,n,r)},ol.prototype.animate=function(e){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(e)},ol.prototype.getCurrentRenderTarget=function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},ol.prototype.getMaxAnisotropy=function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},ol.prototype.getPrecision=function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},ol.prototype.resetGLState=function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},ol.prototype.supportsFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},ol.prototype.supportsHalfFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},ol.prototype.supportsStandardDerivatives=function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},ol.prototype.supportsCompressedTextureS3TC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},ol.prototype.supportsCompressedTexturePVRTC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},ol.prototype.supportsBlendMinMax=function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},ol.prototype.supportsVertexTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},ol.prototype.supportsInstancedArrays=function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},ol.prototype.enableScissorTest=function(e){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(e)},ol.prototype.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},ol.prototype.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},ol.prototype.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},ol.prototype.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},ol.prototype.setFaceCulling=function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")},ol.prototype.allocTextureUnit=function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")},ol.prototype.setTexture=function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")},ol.prototype.setTexture2D=function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")},ol.prototype.setTextureCube=function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")},ol.prototype.getActiveMipMapLevel=function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()},Object.defineProperties(ol.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=e}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=e}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(e){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=!0===e?Rt:Pt}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}},gammaFactor:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaFactor has been removed."),2},set:function(){console.warn("THREE.WebGLRenderer: .gammaFactor has been removed.")}}}),Object.defineProperties(Wa.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}});class uf extends yo{constructor(e,t,n){console.warn("THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options )."),super(e,n)}}function df(){console.error("THREE.CanvasRenderer has been removed")}function hf(){console.error("THREE.JSONLoader has been removed.")}Object.defineProperties(Kn.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=e}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=e}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=e}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=e}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(e){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=e}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(e){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=e}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(e){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=e}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(e){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=e}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(e){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=e}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(e){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=e}}}),fh.prototype.load=function(e){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");const t=this;return(new eh).load(e,(function(e){t.setBuffer(e)})),this},Sh.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},bo.prototype.updateCubeMap=function(e,t){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(e,t)},bo.prototype.clear=function(e,t,n,r){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(e,t,n,r)},Vn.crossOrigin=void 0,Vn.loadTexture=function(e,t,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");const i=new wd;i.setCrossOrigin(this.crossOrigin);const o=i.load(e,n,void 0,r);return t&&(o.mapping=t),o},Vn.loadTextureCube=function(e,t,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");const i=new _d;i.setCrossOrigin(this.crossOrigin);const o=i.load(e,n,void 0,r);return t&&(o.mapping=t),o},Vn.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},Vn.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};const pf={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")}};function ff(){console.error("THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js")}class mf extends Qi{constructor(){console.error("THREE.ParametricGeometry has been moved to /examples/jsm/geometries/ParametricGeometry.js"),super()}}class gf extends Qi{constructor(){console.error("THREE.TextGeometry has been moved to /examples/jsm/geometries/TextGeometry.js"),super()}}function bf(){console.error("THREE.FontLoader has been moved to /examples/jsm/loaders/FontLoader.js")}function vf(){console.error("THREE.Font has been moved to /examples/jsm/loaders/FontLoader.js")}function yf(){console.error("THREE.ImmediateRenderObject has been removed.")}class Sf extends Kn{constructor(e,t,n){console.error('THREE.WebGLMultisampleRenderTarget has been removed. Use a normal render target and set the "samples" property to greater 0 to enable multisampling.'),super(e,t,n),this.samples=4}}class _f extends er{constructor(e,t,n,r){console.warn("THREE.DataTexture2DArray has been renamed to DataArrayTexture."),super(e,t,n,r)}}class xf extends nr{constructor(e,t,n,r){console.warn("THREE.DataTexture3D has been renamed to Data3DTexture."),super(e,t,n,r)}}"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:r}})),"undefined"!=typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=r)},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var i=(s=r,a=btoa(unescape(encodeURIComponent(JSON.stringify(s)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),"/*# ".concat(l," */")),o=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[n].concat(o).concat([i]).join("\n")}var s,a,l;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var o=0;o<this.length;o++){var s=this[o][0];null!=s&&(i[s]=!0)}for(var a=0;a<e.length;a++){var l=[].concat(e[a]);r&&i[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return u})),n.d(t,"e",(function(){return c})),n.d(t,"f",(function(){return M})),n.d(t,"g",(function(){return P})),n.d(t,"h",(function(){return f})),n.d(t,"i",(function(){return $})),n.d(t,"j",(function(){return j}));const r=1024;let i=0;class o{constructor(e,t){this.from=e,this.to=t}}class s{constructor(e={}){this.id=i++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=c.match(e)),t=>{let n=e(t);return void 0===n?null:[this,n]}}}s.closedBy=new s({deserialize:e=>e.split(" ")}),s.openedBy=new s({deserialize:e=>e.split(" ")}),s.group=new s({deserialize:e=>e.split(" ")}),s.contextHash=new s({perNode:!0}),s.lookAhead=new s({perNode:!0}),s.mounted=new s({perNode:!0});class a{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}}const l=Object.create(null);class c{constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}static define(e){let t=e.props&&e.props.length?Object.create(null):l,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(null==e.name?8:0),r=new c(e.name||"",t,e.id,n);if(e.props)for(let n of e.props)if(Array.isArray(n)||(n=n(r)),n){if(n[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[n[0].id]=n[1]}return r}prop(e){return this.props[e.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(e){if("string"==typeof e){if(this.name==e)return!0;let t=this.prop(s.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let r of n.split(" "))t[r]=e[n];return e=>{for(let n=e.prop(s.group),r=-1;r<(n?n.length:0);r++){let i=t[r<0?e.name:n[r]];if(i)return i}}}}c.none=new c("",Object.create(null),0,8);class u{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let n of this.types){let r=null;for(let t of e){let e=t(n);e&&(r||(r=Object.assign({},n.props)),r[e[0].id]=e[1])}t.push(r?new c(n.name,r,n.id,n.flags):n)}return new u(t)}}const d=new WeakMap,h=new WeakMap;var p;!function(e){e[e.ExcludeBuffers=1]="ExcludeBuffers",e[e.IncludeAnonymous=2]="IncludeAnonymous",e[e.IgnoreMounts=4]="IgnoreMounts",e[e.IgnoreOverlays=8]="IgnoreOverlays"}(p||(p={}));class f{constructor(e,t,n,r,i){if(this.type=e,this.children=t,this.positions=n,this.length=r,this.props=null,i&&i.length){this.props=Object.create(null);for(let[e,t]of i)this.props["number"==typeof e?e:e.id]=t}}toString(){let e=this.prop(s.mounted);if(e&&!e.overlay)return e.tree.toString();let t="";for(let e of this.children){let n=e.toString();n&&(t&&(t+=","),t+=n)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new O(this.topNode,e)}cursorAt(e,t=0,n=0){let r=d.get(this)||this.topNode,i=new O(r);return i.moveTo(e,t),d.set(this,i._tree),i}get topNode(){return new S(this,0,0,null)}resolve(e,t=0){let n=y(d.get(this)||this.topNode,e,t,!1);return d.set(this,n),n}resolveInner(e,t=0){let n=y(h.get(this)||this.topNode,e,t,!0);return h.set(this,n),n}iterate(e){let{enter:t,leave:n,from:r=0,to:i=this.length}=e;for(let o=this.cursor((e.mode||0)|p.IncludeAnonymous);;){let e=!1;if(o.from<=i&&o.to>=r&&(o.type.isAnonymous||!1!==t(o))){if(o.firstChild())continue;e=!0}for(;e&&n&&!o.type.isAnonymous&&n(o),!o.nextSibling();){if(!o.parent())return;e=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:C(c.none,this.children,this.positions,0,this.children.length,0,this.length,(e,t,n)=>new f(this.type,e,t,n,this.propValues),e.makeTree||((e,t,n)=>new f(c.none,e,t,n)))}static build(e){return function(e){var t;let{buffer:n,nodeSet:i,maxBufferLength:o=r,reused:a=[],minRepeatType:l=i.types.length}=e,c=Array.isArray(n)?new m(n,n.length):n,u=i.types,d=0,h=0;function p(e,t,n,r,m){let{id:S,start:_,end:x,size:w}=c,k=h;for(;w<0;){if(c.next(),-1==w){let t=a[S];return n.push(t),void r.push(_-e)}if(-3==w)return void(d=S);if(-4==w)return void(h=S);throw new RangeError("Unrecognized record size: "+w)}let O,E,A=u[S],T=_-e;if(x-_<=o&&(E=function(e,t){let n=c.fork(),r=0,i=0,s=0,a=n.end-o,u={size:0,start:0,skip:0};e:for(let o=n.pos-e;n.pos>o;){let e=n.size;if(n.id==t&&e>=0){u.size=r,u.start=i,u.skip=s,s+=4,r+=4,n.next();continue}let c=n.pos-e;if(e<0||c<o||n.start<a)break;let d=n.id>=l?4:0,h=n.start;for(n.next();n.pos>c;){if(n.size<0){if(-3!=n.size)break e;d+=4}else n.id>=l&&(d+=4);n.next()}i=h,r+=e,s+=d}(t<0||r==e)&&(u.size=r,u.start=i,u.skip=s);return u.size>4?u:void 0}(c.pos-t,m))){let t=new Uint16Array(E.size-E.skip),n=c.pos-E.size,r=t.length;for(;c.pos>n;)r=y(E.start,t,r);O=new g(t,x-E.start,i),T=E.start-e}else{let e=c.pos-w;c.next();let t=[],n=[],r=S>=l?S:-1,i=0,a=x;for(;c.pos>e;)r>=0&&c.id==r&&c.size>=0?(c.end<=a-o&&(b(t,n,_,i,c.end,a,r,k),i=t.length,a=c.end),c.next()):p(_,e,t,n,r);if(r>=0&&i>0&&i<t.length&&b(t,n,_,i,_,a,r,k),t.reverse(),n.reverse(),r>-1&&i>0){let e=function(e){return(t,n,r)=>{let i,o,a=0,l=t.length-1;if(l>=0&&(i=t[l])instanceof f){if(!l&&i.type==e&&i.length==r)return i;(o=i.prop(s.lookAhead))&&(a=n[l]+i.length+o)}return v(e,t,n,r,a)}}(A);O=C(A,t,n,0,t.length,0,x-_,e,e)}else O=v(A,t,n,x-_,k-x)}n.push(O),r.push(T)}function b(e,t,n,r,o,s,a,l){let c=[],u=[];for(;e.length>r;)c.push(e.pop()),u.push(t.pop()+n-o);e.push(v(i.types[a],c,u,s-o,l-s)),t.push(o-n)}function v(e,t,n,r,i=0,o){if(d){let e=[s.contextHash,d];o=o?[e].concat(o):[e]}if(i>25){let e=[s.lookAhead,i];o=o?[e].concat(o):[e]}return new f(e,t,n,r,o)}function y(e,t,n){let{id:r,start:i,end:o,size:s}=c;if(c.next(),s>=0&&r<l){let a=n;if(s>4){let r=c.pos-(s-4);for(;c.pos>r;)n=y(e,t,n)}t[--n]=a,t[--n]=o-e,t[--n]=i-e,t[--n]=r}else-3==s?d=r:-4==s&&(h=r);return n}let S=[],_=[];for(;c.pos>0;)p(e.start||0,e.bufferStart||0,S,_,-1);let x=null!==(t=e.length)&&void 0!==t?t:S.length?_[0]+S[0].length:0;return new f(u[e.topID],S.reverse(),_.reverse(),x)}(e)}}f.empty=new f(c.none,[],[],0);class m{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new m(this.buffer,this.index)}}class g{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return c.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],n=this.buffer[e+3],r=this.set.types[t],i=r.name;if(/\W/.test(i)&&!r.isError&&(i=JSON.stringify(i)),n==(e+=4))return i;let o=[];for(;e<n;)o.push(this.childString(e)),e=this.buffer[e+3];return i+"("+o.join(",")+")"}findChild(e,t,n,r,i){let{buffer:o}=this,s=-1;for(let a=e;a!=t&&!(b(i,r,o[a+1],o[a+2])&&(s=a,n>0));a=o[a+3]);return s}slice(e,t,n){let r=this.buffer,i=new Uint16Array(t-e),o=0;for(let s=e,a=0;s<t;){i[a++]=r[s++],i[a++]=r[s++]-n;let t=i[a++]=r[s++]-n;i[a++]=r[s++]-e,o=Math.max(o,t)}return new g(i,o,this.set)}}function b(e,t,n,r){switch(e){case-2:return n<t;case-1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function v(e,t){let n=e.childBefore(t);for(;n;){let t=n.lastChild;if(!t||t.to!=n.to)break;t.type.isError&&t.from==t.to?(e=n,n=t.prevSibling):n=t}return e}function y(e,t,n,r){for(var i;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let t=!r&&e instanceof S&&e.index<0?null:e.parent;if(!t)return e;e=t}let o=r?0:p.IgnoreOverlays;if(r)for(let r=e,s=r.parent;s;r=s,s=r.parent)r instanceof S&&r.index<0&&(null===(i=s.enter(t,n,o))||void 0===i?void 0:i.from)!=r.from&&(e=s);for(;;){let r=e.enter(t,n,o);if(!r)return e;e=r}}class S{constructor(e,t,n,r){this._tree=e,this.from=t,this.index=n,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,n,r,i=0){for(let o=this;;){for(let{children:a,positions:l}=o._tree,c=t>0?a.length:-1;e!=c;e+=t){let c=a[e],u=l[e]+o.from;if(b(r,n,u,u+c.length))if(c instanceof g){if(i&p.ExcludeBuffers)continue;let s=c.findChild(0,c.buffer.length,t,n-u,r);if(s>-1)return new k(new w(o,c,e,u),null,s)}else if(i&p.IncludeAnonymous||!c.type.isAnonymous||E(c)){let a;if(!(i&p.IgnoreMounts)&&c.props&&(a=c.prop(s.mounted))&&!a.overlay)return new S(a.tree,u,e,o);let l=new S(c,u,e,o);return i&p.IncludeAnonymous||!l.type.isAnonymous?l:l.nextChild(t<0?c.children.length-1:0,t,n,r)}}if(i&p.IncludeAnonymous||!o.type.isAnonymous)return null;if(e=o.index>=0?o.index+t:t<0?-1:o._parent._tree.children.length,o=o._parent,!o)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,n=0){let r;if(!(n&p.IgnoreOverlays)&&(r=this._tree.prop(s.mounted))&&r.overlay){let n=e-this.from;for(let{from:e,to:i}of r.overlay)if((t>0?e<=n:e<n)&&(t<0?i>=n:i>n))return new S(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}cursor(e=0){return new O(this,e)}get tree(){return this._tree}toTree(){return this._tree}resolve(e,t=0){return y(this,e,t,!1)}resolveInner(e,t=0){return y(this,e,t,!0)}enterUnfinishedNodesBefore(e){return v(this,e)}getChild(e,t=null,n=null){let r=_(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return _(this,e,t,n)}toString(){return this._tree.toString()}get node(){return this}matchContext(e){return x(this,e)}}function _(e,t,n,r){let i=e.cursor(),o=[];if(!i.firstChild())return o;if(null!=n)for(;!i.type.is(n);)if(!i.nextSibling())return o;for(;;){if(null!=r&&i.type.is(r))return o;if(i.type.is(t)&&o.push(i.node),!i.nextSibling())return null==r?o:[]}}function x(e,t,n=t.length-1){for(let r=e.parent;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}class w{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}}class k{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,n);return i<0?null:new k(this.context,this,i)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,n=0){if(n&p.ExcludeBuffers)return null;let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return i<0?null:new k(this.context,this,i)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new k(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new k(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}cursor(e=0){return new O(this,e)}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,i=n.buffer[this.index+3];if(i>r){let o=n.buffer[this.index+1];e.push(n.slice(r,i,o)),t.push(0)}return new f(this.type,e,t,this.to-this.from)}resolve(e,t=0){return y(this,e,t,!1)}resolveInner(e,t=0){return y(this,e,t,!0)}enterUnfinishedNodesBefore(e){return v(this,e)}toString(){return this.context.buffer.childString(this.index)}getChild(e,t=null,n=null){let r=_(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return _(this,e,t,n)}get node(){return this}matchContext(e){return x(this,e)}}class O{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof S)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return!!e&&(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0)}yieldBuf(e,t){this.index=e;let{start:n,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=n+r.buffer[e+1],this.to=n+r.buffer[e+2],!0}yield(e){return!!e&&(e instanceof S?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return!(i<0)&&(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?!(n&p.ExcludeBuffers)&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&p.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&p.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode));let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let e=n<0?0:this.stack[n]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(e)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(r.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:n}=r)}else({index:t,_parent:n}=this._tree);for(;n;({index:t,_parent:n}=n))if(t>-1)for(let r=t+e,i=e<0?-1:n._tree.children.length;r!=i;r+=e){let e=n._tree.children[r];if(this.mode&p.IncludeAnonymous||e instanceof g||!e.type.isAnonymous||E(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)e:for(let r=this.index,i=this.stack.length;i>=0;){for(let o=e;o;o=o._parent)if(o.index==r){if(r==this.index)return o;t=o,n=i+1;break e}r=this.stack[--i]}for(let e=n;e<this.stack.length;e++)t=new k(this.buffer,t,this.stack[e]);return this.bufferNode=new k(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let r=!1;if(this.type.isAnonymous||!1!==e(this)){if(this.firstChild()){n++;continue}this.type.isAnonymous||(r=!0)}for(;r&&t&&t(this),r=this.type.isAnonymous,!this.nextSibling();){if(!n)return;this.parent(),n--,r=!0}}}matchContext(e){if(!this.buffer)return x(this.node,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let r=e.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return x(this.node,e,r);let o=n[t.buffer[this.stack[i]]];if(!o.isAnonymous){if(e[r]&&e[r]!=o.name)return!1;r--}}return!0}}function E(e){return e.children.some(e=>e instanceof g||!e.type.isAnonymous||E(e))}const A=new WeakMap;function T(e,t){if(!e.isAnonymous||t instanceof g||t.type!=e)return 1;let n=A.get(t);if(null==n){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof f)){n=1;break}n+=T(e,r)}A.set(t,n)}return n}function C(e,t,n,r,i,o,s,a,l){let c=0;for(let n=r;n<i;n++)c+=T(e,t[n]);let u=Math.ceil(1.5*c/8),d=[],h=[];return function t(n,r,i,s,a){for(let c=i;c<s;){let i=c,p=r[c],f=T(e,n[c]);for(c++;c<s;c++){let t=T(e,n[c]);if(f+t>=u)break;f+=t}if(c==i+1){if(f>u){let e=n[i];t(e.children,e.positions,0,e.children.length,r[i]+a);continue}d.push(n[i])}else{let t=r[c-1]+n[c-1].length-p;d.push(C(e,n,r,i,c,p,t,null,l))}h.push(p+a-o)}}(t,n,r,i,0),(a||l)(d,h,s)}class M{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof k?this.setBuffer(e.context.buffer,e.index,t):e instanceof S&&this.map.set(e.tree,t)}get(e){return e instanceof k?this.getBuffer(e.context.buffer,e.index):e instanceof S?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class ${constructor(e,t,n,r,i=!1,o=!1){this.from=e,this.to=t,this.tree=n,this.offset=r,this.open=(i?1:0)|(o?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(e,t=[],n=!1){let r=[new $(0,e.length,e,0,!1,n)];for(let n of t)n.to>e.length&&r.push(n);return r}static applyChanges(e,t,n=128){if(!t.length)return e;let r=[],i=1,o=e.length?e[0]:null;for(let s=0,a=0,l=0;;s++){let c=s<t.length?t[s]:null,u=c?c.fromA:1e9;if(u-a>=n)for(;o&&o.from<u;){let t=o;if(a>=t.from||u<=t.to||l){let e=Math.max(t.from,a)-l,n=Math.min(t.to,u)-l;t=e>=n?null:new $(e,n,t.tree,t.offset+l,s>0,!!c)}if(t&&r.push(t),o.to>u)break;o=i<e.length?e[i++]:null}if(!c)break;a=c.toA,l=c.toA-c.toB}return r}}class P{startParse(e,t,n){return"string"==typeof e&&(e=new R(e)),n=n?n.length?n.map(e=>new o(e.from,e.to)):[new o(0,0)]:[new o(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let e=r.advance();if(e)return e}}}class R{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function j(e){return(t,n,r,i)=>new L(t,e,n,r,i)}class N{constructor(e,t,n,r,i){this.parser=e,this.parse=t,this.overlay=n,this.target=r,this.ranges=i}}class D{constructor(e,t,n,r,i,o,s){this.parser=e,this.predicate=t,this.mounts=n,this.index=r,this.start=i,this.target=o,this.prev=s,this.depth=0,this.ranges=[]}}const I=new s({perNode:!0});class L{constructor(e,t,n,r,i){this.nest=t,this.input=n,this.fragments=r,this.ranges=i,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let e=this.baseParse.advance();if(!e)return null;if(this.baseParse=null,this.baseTree=e,this.startInner(),null!=this.stoppedAt)for(let e of this.inner)e.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let e=this.baseTree;return null!=this.stoppedAt&&(e=new f(e.type,e.children,e.positions,e.length,e.propValues.concat([[I,this.stoppedAt]]))),e}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let n=Object.assign(Object.create(null),e.target.props);n[s.mounted.id]=new a(t,e.overlay,e.parser),e.target.props=n}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].ranges[0].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new Q(this.fragments),t=null,n=null,r=new O(new S(this.baseTree,this.ranges[0].from,0,null),p.IncludeAnonymous|p.IgnoreMounts);e:for(let i,s;null==this.stoppedAt||r.from<this.stoppedAt;){let a,l=!0;if(e.hasNode(r)){if(t){let e=t.mounts.find(e=>e.frag.from<=r.from&&e.frag.to>=r.to&&e.mount.overlay);if(e)for(let n of e.mount.overlay){let i=n.from+e.pos,o=n.to+e.pos;i>=r.from&&o<=r.to&&!t.ranges.some(e=>e.from<o&&e.to>i)&&t.ranges.push({from:i,to:o})}}l=!1}else if(n&&(s=B(n.ranges,r.from,r.to)))l=2!=s;else if(!r.type.isAnonymous&&r.from<r.to&&(i=this.nest(r,this.input))){r.tree||F(r);let s=e.findMounts(r.from,i.parser);if("function"==typeof i.overlay)t=new D(i.parser,i.overlay,s,this.inner.length,r.from,r.tree,t);else{let e=q(this.ranges,i.overlay||[new o(r.from,r.to)]);e.length&&this.inner.push(new N(i.parser,i.parser.startParse(this.input,H(s,e),e),i.overlay?i.overlay.map(e=>new o(e.from-r.from,e.to-r.from)):null,r.tree,e)),i.overlay?e.length&&(n={ranges:e,depth:0,prev:n}):l=!1}}else t&&(a=t.predicate(r))&&(!0===a&&(a=new o(r.from,r.to)),a.from<a.to&&t.ranges.push(a));if(l&&r.firstChild())t&&t.depth++,n&&n.depth++;else for(;!r.nextSibling();){if(!r.parent())break e;if(t&&!--t.depth){let e=q(this.ranges,t.ranges);e.length&&this.inner.splice(t.index,0,new N(t.parser,t.parser.startParse(this.input,H(t.mounts,e),e),t.ranges.map(e=>new o(e.from-t.start,e.to-t.start)),t.target,e)),t=t.prev}n&&!--n.depth&&(n=n.prev)}}}}function B(e,t,n){for(let r of e){if(r.from>=n)break;if(r.to>t)return r.from<=t&&r.to>=n?2:1}return 0}function z(e,t,n,r,i,o){if(t<n){let s=e.buffer[t+1];r.push(e.slice(t,n,s)),i.push(s-o)}}function F(e){let{node:t}=e,n=0;do{e.parent(),n++}while(!e.tree);let r=0,i=e.tree,o=0;for(;o=i.positions[r]+e.from,!(o<=t.from&&o+i.children[r].length>=t.to);r++);let s=i.children[r],a=s.buffer;i.children[r]=function e(n,r,i,l,c){let u=n;for(;a[u+2]+o<=t.from;)u=a[u+3];let d=[],h=[];z(s,n,u,d,h,l);let p=a[u+1],m=a[u+2],g=p+o==t.from&&m+o==t.to&&a[u]==t.type.id;return d.push(g?t.toTree():e(u+4,a[u+3],s.set.types[a[u]],p,m-p)),h.push(p-l),z(s,a[u+3],r,d,h,l),new f(i,d,h,c)}(0,a.length,c.none,0,s.length);for(let r=0;r<=n;r++)e.childAfter(t.from)}class U{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(p.IncludeAnonymous|p.IgnoreMounts)}moveTo(e){let{cursor:t}=this,n=e-this.offset;for(;!this.done&&t.from<n;)t.to>=e&&t.enter(n,1,p.IgnoreOverlays|p.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(!(t.children.length&&0==t.positions[0]&&t.children[0]instanceof f))break;t=t.children[0]}return!1}}class Q{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let n=this.curFrag=e[0];this.curTo=null!==(t=n.tree.prop(I))&&void 0!==t?t:n.to,this.inner=new U(n.tree,-n.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=null!==(e=t.tree.prop(I))&&void 0!==e?e:t.to,this.inner=new U(t.tree,-t.offset)}}findMounts(e,t){var n;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let e=this.inner.cursor.node;e;e=e.parent){let i=null===(n=e.tree)||void 0===n?void 0:n.prop(s.mounted);if(i&&i.parser==t)for(let t=this.fragI;t<this.fragments.length;t++){let n=this.fragments[t];if(n.from>=e.to)break;n.tree==this.curFrag.tree&&r.push({frag:n,pos:e.from-n.offset,mount:i})}}}return r}}function q(e,t){let n=null,r=t;for(let i=1,s=0;i<e.length;i++){let a=e[i-1].to,l=e[i].from;for(;s<r.length;s++){let e=r[s];if(e.from>=l)break;e.to<=a||(n||(r=n=t.slice()),e.from<a?(n[s]=new o(e.from,a),e.to>l&&n.splice(s+1,0,new o(l,e.to))):e.to>l?n[s--]=new o(l,e.to):n.splice(s--,1))}}return r}function G(e,t,n,r){let i=0,s=0,a=!1,l=!1,c=-1e9,u=[];for(;;){let d=i==e.length?1e9:a?e[i].to:e[i].from,h=s==t.length?1e9:l?t[s].to:t[s].from;if(a!=l){let e=Math.max(c,n),t=Math.min(d,h,r);e<t&&u.push(new o(e,t))}if(c=Math.min(d,h),1e9==c)break;d==c&&(a?(a=!1,i++):a=!0),h==c&&(l?(l=!1,s++):l=!0)}return u}function H(e,t){let n=[];for(let{pos:r,mount:i,frag:s}of e){let e=r+(i.overlay?i.overlay[0].from:0),a=e+i.tree.length,l=Math.max(s.from,e),c=Math.min(s.to,a);if(i.overlay){let a=G(t,i.overlay.map(e=>new o(e.from+r,e.to+r)),l,c);for(let t=0,r=l;;t++){let o=t==a.length,l=o?c:a[t].from;if(l>r&&n.push(new $(r,l,i.tree,-e,s.from>=r||s.openStart,s.to<=l||s.openEnd)),o)break;r=a[t].to}}else n.push(new $(l,c,i.tree,-e,s.from>=e||s.openStart,s.to<=a||s.openEnd))}return n}},function(e,t,n){n(346),n(347),e.exports=Sk},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(85);function i(e,t,n){return(t=Object(r.a)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports={trueFunc:function(){return!0},falseFunc:function(){return!1}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return o}));var r=n(17);const i=n(38).a;function o(e,t){try{let n=e;const r=5,i=80,o=[];let a=0,l=0;const c=" > ",u=c.length;let d;for(;n&&a++<r&&(d=s(n,t),!("html"===d||a>1&&l+o.length*u+d.length>=i));)o.push(d),l+=d.length,n=n.parentNode;return o.reverse().join(c)}catch(e){return"<unknown>"}}function s(e,t){const n=e,i=[];let o,s,a,l,c;if(!n||!n.tagName)return"";i.push(n.tagName.toLowerCase());const u=t&&t.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(u&&u.length)u.forEach(e=>{i.push(`[${e[0]}="${e[1]}"]`)});else if(n.id&&i.push("#"+n.id),o=n.className,o&&Object(r.i)(o))for(s=o.split(/\s+/),c=0;c<s.length;c++)i.push("."+s[c]);const d=["type","name","title","alt"];for(c=0;c<d.length;c++)a=d[c],l=n.getAttribute(a),l&&i.push(`[${a}="${l}"]`);return i.join("")}function a(e){return i.document&&i.document.querySelector?i.document.querySelector(e):null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return o}));var r=n(18);const i=n(39).a;function o(e,t){try{let n=e;const r=5,i=80,o=[];let a=0,l=0;const c=" > ",u=c.length;let d;for(;n&&a++<r&&(d=s(n,t),!("html"===d||a>1&&l+o.length*u+d.length>=i));)o.push(d),l+=d.length,n=n.parentNode;return o.reverse().join(c)}catch(e){return"<unknown>"}}function s(e,t){const n=e,i=[];let o,s,a,l,c;if(!n||!n.tagName)return"";i.push(n.tagName.toLowerCase());const u=t&&t.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(u&&u.length)u.forEach(e=>{i.push(`[${e[0]}="${e[1]}"]`)});else if(n.id&&i.push("#"+n.id),o=n.className,o&&Object(r.l)(o))for(s=o.split(/\s+/),c=0;c<s.length;c++)i.push("."+s[c]);const d=["type","name","title","alt"];for(c=0;c<d.length;c++)a=d[c],l=n.getAttribute(a),l&&i.push(`[${a}="${l}"]`);return i.join("")}function a(){try{return i.document.location.href}catch(e){return""}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return te})),n.d(t,"b",(function(){return x})),n.d(t,"c",(function(){return re})),n.d(t,"d",(function(){return w})),n.d(t,"e",(function(){return S})),n.d(t,"f",(function(){return de})),n.d(t,"g",(function(){return F})),n.d(t,"h",(function(){return pe})),n.d(t,"i",(function(){return p})),n.d(t,"j",(function(){return y})),n.d(t,"k",(function(){return oe})),n.d(t,"l",(function(){return _})),n.d(t,"m",(function(){return ee}));var r=n(1),i=n(0),o=n(44),s=n(81),a=n.n(s),l=n(107),c=n.n(l),u=n(70),d=n(71);const h={},p=e=>{Object.assign(h,e)};var f,m;const g=e=>"colorSpace"in e||"outputColorSpace"in e,b=()=>{var e;return null!=(e=h.ColorManagement)?e:null},v=e=>e&&e.isOrthographicCamera,y=e=>e&&e.hasOwnProperty("current"),S="undefined"!=typeof window&&(null!=(f=window.document)&&f.createElement||"ReactNative"===(null==(m=window.navigator)?void 0:m.product))?i.useLayoutEffect:i.useEffect;function _(e){const t=i.useRef(e);return S(()=>{t.current=e},[e]),t}function x({set:e}){return S(()=>(e(new Promise(()=>null)),()=>e(!1)),[e]),null}class w extends i.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}w.getDerivedStateFromError=()=>({error:!0});const k=new Map;function O(e){var t;const n="undefined"!=typeof window?null!=(t=window.devicePixelRatio)?t:2:1;return Array.isArray(e)?Math.min(Math.max(e[0],n),e[1]):e}const E=e=>{var t;return null==(t=e.__r3f)?void 0:t.root.getState()},A={obj:e=>e===Object(e)&&!A.arr(e)&&"function"!=typeof e,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,boo:e=>"boolean"==typeof e,und:e=>void 0===e,arr:e=>Array.isArray(e),equ(e,t,{arrays:n="shallow",objects:r="reference",strict:i=!0}={}){if(typeof e!=typeof t||!!e!=!!t)return!1;if(A.str(e)||A.num(e))return e===t;const o=A.obj(e);if(o&&"reference"===r)return e===t;const s=A.arr(e);if(s&&"reference"===n)return e===t;if((s||o)&&e===t)return!0;let a;for(a in e)if(!(a in t))return!1;if(o&&"shallow"===n&&"shallow"===r){for(a in i?t:e)if(!A.equ(e[a],t[a],{strict:i,objects:"reference"}))return!1}else for(a in i?t:e)if(e[a]!==t[a])return!1;if(A.und(a)){if(s&&0===e.length&&0===t.length)return!0;if(o&&0===Object.keys(e).length&&0===Object.keys(t).length)return!0;if(e!==t)return!1}return!0}};function T(e){const t={nodes:{},materials:{}};return e&&e.traverse(e=>{e.name&&(t.nodes[e.name]=e),e.material&&!t.materials[e.material.name]&&(t.materials[e.material.name]=e.material)}),t}function C(e,t){const n=e;return(null!=t&&t.primitive||!n.__r3f)&&(n.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...t}),e}function M(e,t){let n=e;if(t.includes("-")){const r=t.split("-"),i=r.pop();return n=r.reduce((e,t)=>e[t],e),{target:n,key:i}}return{target:n,key:t}}const $=/-\d+$/;function P(e,t,n){if(A.str(n)){if($.test(n)){const t=n.replace($,""),{target:r,key:i}=M(e,t);Array.isArray(r[i])||(r[i]=[])}const{target:r,key:i}=M(e,n);t.__r3f.previousAttach=r[i],r[i]=t}else t.__r3f.previousAttach=n(e,t)}function R(e,t,n){var r,i;if(A.str(n)){const{target:r,key:i}=M(e,n),o=t.__r3f.previousAttach;void 0===o?delete r[i]:r[i]=o}else null==(r=t.__r3f)||null==r.previousAttach||r.previousAttach(e,t);null==(i=t.__r3f)||delete i.previousAttach}function j(e,{children:t,key:n,ref:r,...i},{children:o,key:s,ref:a,...l}={},c=!1){var u;const d=null!=(u=null==e?void 0:e.__r3f)?u:{},h=Object.entries(i),p=[];if(c){const e=Object.keys(l);for(let t=0;t<e.length;t++)i.hasOwnProperty(e[t])||h.unshift([e[t],"__defaultremove"])}h.forEach(([t,n])=>{var r;if(null!=(r=e.__r3f)&&r.primitive&&"object"===t)return;if(A.equ(n,l[t]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(t))return p.push([t,n,!0,[]]);let o=[];t.includes("-")&&(o=t.split("-")),p.push([t,n,!1,o]);for(const e in i){const n=i[e];e.startsWith(t+"-")&&p.push([e,n,!1,e.split("-")])}});const f={...i};return d.memoizedProps&&d.memoizedProps.args&&(f.args=d.memoizedProps.args),d.memoizedProps&&d.memoizedProps.attach&&(f.attach=d.memoizedProps.attach),{memoized:f,changes:p}}function N(e,t){var n,i,o;const s=null!=(n=e.__r3f)?n:{},a=s.root,l=null!=(i=null==a||null==a.getState?void 0:a.getState())?i:{},{memoized:c,changes:u}=(d=t)&&d.memoized&&d.changes?t:j(e,t);var d;const h=s.eventCount;e.__r3f&&(e.__r3f.memoizedProps=c);for(let t=0;t<u.length;t++){let[n,i,o,a]=u[t];if(g(e)){const e=3001,t="srgb",r="srgb-linear";"encoding"===n?(n="colorSpace",i=i===e?t:r):"outputEncoding"===n&&(n="outputColorSpace",i=i===e?t:r)}let c=e,d=c[n];if(a.length&&(d=a.reduce((e,t)=>e[t],e),!d||!d.set)){const[t,...r]=a.reverse();c=r.reverse().reduce((e,t)=>e[t],e),n=t}if("__defaultremove"===i)if(c.constructor){let e=k.get(c.constructor);e||(e=new c.constructor,k.set(c.constructor,e)),i=e[n]}else i=0;if(o)i?s.handlers[n]=i:delete s.handlers[n],s.eventCount=Object.keys(s.handlers).length;else if(d&&d.set&&(d.copy||d instanceof r.Layers)){if(Array.isArray(i))d.fromArray?d.fromArray(i):d.set(...i);else if(d.copy&&i&&i.constructor&&d.constructor===i.constructor)d.copy(i);else if(void 0!==i){const e=d instanceof r.Color;!e&&d.setScalar?d.setScalar(i):d instanceof r.Layers&&i instanceof r.Layers?d.mask=i.mask:d.set(i),b()||l.linear||!e||d.convertSRGBToLinear()}}else if(c[n]=i,c[n]instanceof r.Texture&&c[n].format===r.RGBAFormat&&c[n].type===r.UnsignedByteType){const e=c[n];g(e)&&g(l.gl)?e.colorSpace=l.gl.outputColorSpace:e.encoding=l.gl.outputEncoding}D(e)}if(s.parent&&l.internal&&e.raycast&&h!==s.eventCount){const t=l.internal.interaction.indexOf(e);t>-1&&l.internal.interaction.splice(t,1),s.eventCount&&l.internal.interaction.push(e)}return!(1===u.length&&"onUpdate"===u[0][0])&&u.length&&null!=(o=e.__r3f)&&o.parent&&I(e),e}function D(e){var t,n;const r=null==(t=e.__r3f)||null==(n=t.root)||null==n.getState?void 0:n.getState();r&&0===r.internal.frames&&r.invalidate()}function I(e){null==e.onUpdate||e.onUpdate(e)}function L(e,t){e.manual||(v(e)?(e.left=t.width/-2,e.right=t.width/2,e.top=t.height/2,e.bottom=t.height/-2):e.aspect=t.width/t.height,e.updateProjectionMatrix(),e.updateMatrixWorld())}function B(e){return(e.eventObject||e.object).uuid+"/"+e.index+e.instanceId}function z(e,t,n,r){const i=n.get(t);i&&(n.delete(t),0===n.size&&(e.delete(r),i.target.releasePointerCapture(r)))}function F(e){function t(e){return e.filter(e=>["Move","Over","Enter","Out","Leave"].some(t=>{var n;return null==(n=e.__r3f)?void 0:n.handlers["onPointer"+t]}))}function n(t){const{internal:n}=e.getState();for(const e of n.hovered.values())if(!t.length||!t.find(t=>t.object===e.object&&t.index===e.index&&t.instanceId===e.instanceId)){const r=e.eventObject.__r3f,i=null==r?void 0:r.handlers;if(n.hovered.delete(B(e)),null!=r&&r.eventCount){const n={...e,intersections:t};null==i.onPointerOut||i.onPointerOut(n),null==i.onPointerLeave||i.onPointerLeave(n)}}}function i(e,t){for(let n=0;n<t.length;n++){const r=t[n].__r3f;null==r||null==r.handlers.onPointerMissed||r.handlers.onPointerMissed(e)}}return{handlePointer:function(o){switch(o){case"onPointerLeave":case"onPointerCancel":return()=>n([]);case"onLostPointerCapture":return t=>{const{internal:r}=e.getState();"pointerId"in t&&r.capturedMap.has(t.pointerId)&&requestAnimationFrame(()=>{r.capturedMap.has(t.pointerId)&&(r.capturedMap.delete(t.pointerId),n([]))})}}return function(s){const{onPointerMissed:a,internal:l}=e.getState();l.lastEvent.current=s;const c="onPointerMove"===o,u="onClick"===o||"onContextMenu"===o||"onDoubleClick"===o,d=function(t,n){const r=e.getState(),i=new Set,o=[],s=n?n(r.internal.interaction):r.internal.interaction;for(let e=0;e<s.length;e++){const t=E(s[e]);t&&(t.raycaster.camera=void 0)}r.previousRoot||null==r.events.compute||r.events.compute(t,r);let a=s.flatMap((function(e){const n=E(e);return n&&n.events.enabled&&null!==n.raycaster.camera?(void 0===n.raycaster.camera&&(null==n.events.compute||n.events.compute(t,n,null==(r=n.previousRoot)?void 0:r.getState()),void 0===n.raycaster.camera&&(n.raycaster.camera=null)),n.raycaster.camera?n.raycaster.intersectObject(e,!0):[]):[];var r})).sort((e,t)=>{const n=E(e.object),r=E(t.object);return n&&r&&r.events.priority-n.events.priority||e.distance-t.distance}).filter(e=>{const t=B(e);return!i.has(t)&&(i.add(t),!0)});r.events.filter&&(a=r.events.filter(a,r));for(const e of a){let t=e.object;for(;t;){var l;null!=(l=t.__r3f)&&l.eventCount&&o.push({...e,eventObject:t}),t=t.parent}}if("pointerId"in t&&r.internal.capturedMap.has(t.pointerId))for(let e of r.internal.capturedMap.get(t.pointerId).values())i.has(B(e.intersection))||o.push(e.intersection);return o}(s,c?t:void 0),h=u?function(t){const{internal:n}=e.getState(),r=t.offsetX-n.initialClick[0],i=t.offsetY-n.initialClick[1];return Math.round(Math.sqrt(r*r+i*i))}(s):0;"onPointerDown"===o&&(l.initialClick=[s.offsetX,s.offsetY],l.initialHits=d.map(e=>e.eventObject)),u&&!d.length&&h<=2&&(i(s,l.interaction),a&&a(s)),c&&n(d),function(t,i,o,s){const a=e.getState();if(t.length){const e={stopped:!1};for(const l of t){const c=E(l.object)||a,{raycaster:u,pointer:d,camera:h,internal:p}=c,f=new r.Vector3(d.x,d.y,0).unproject(h),m=e=>{var t,n;return null!=(t=null==(n=p.capturedMap.get(e))?void 0:n.has(l.eventObject))&&t},g=e=>{const t={intersection:l,target:i.target};p.capturedMap.has(e)?p.capturedMap.get(e).set(l.eventObject,t):p.capturedMap.set(e,new Map([[l.eventObject,t]])),i.target.setPointerCapture(e)},b=e=>{const t=p.capturedMap.get(e);t&&z(p.capturedMap,l.eventObject,t,e)};let v={};for(let e in i){let t=i[e];"function"!=typeof t&&(v[e]=t)}let y={...l,...v,pointer:d,intersections:t,stopped:e.stopped,delta:o,unprojectedPoint:f,ray:u.ray,camera:h,stopPropagation(){const r="pointerId"in i&&p.capturedMap.get(i.pointerId);if((!r||r.has(l.eventObject))&&(y.stopped=e.stopped=!0,p.hovered.size&&Array.from(p.hovered.values()).find(e=>e.eventObject===l.eventObject))){n([...t.slice(0,t.indexOf(l)),l])}},target:{hasPointerCapture:m,setPointerCapture:g,releasePointerCapture:b},currentTarget:{hasPointerCapture:m,setPointerCapture:g,releasePointerCapture:b},nativeEvent:i};if(s(y),!0===e.stopped)break}}}(d,s,h,(function(e){const t=e.eventObject,n=t.__r3f,r=null==n?void 0:n.handlers;if(null!=n&&n.eventCount)if(c){if(r.onPointerOver||r.onPointerEnter||r.onPointerOut||r.onPointerLeave){const t=B(e),n=l.hovered.get(t);n?n.stopped&&e.stopPropagation():(l.hovered.set(t,e),null==r.onPointerOver||r.onPointerOver(e),null==r.onPointerEnter||r.onPointerEnter(e))}null==r.onPointerMove||r.onPointerMove(e)}else{const n=r[o];n?u&&!l.initialHits.includes(t)||(i(s,l.interaction.filter(e=>!l.initialHits.includes(e))),n(e)):u&&l.initialHits.includes(t)&&i(s,l.interaction.filter(e=>!l.initialHits.includes(e)))}}))}}}}const U=e=>!(null==e||!e.render),Q=i.createContext(null);let q,G=new Set,H=new Set,V=new Set;function W(e,t){if(e.size)for(const{callback:n}of e.values())n(t)}function X(e,t){switch(e){case"before":return W(G,t);case"after":return W(H,t);case"tail":return W(V,t)}}let Y,Z;function J(e,t,n){let r=t.clock.getDelta();for("never"===t.frameloop&&"number"==typeof e&&(r=e-t.clock.elapsedTime,t.clock.oldTime=t.clock.elapsedTime,t.clock.elapsedTime=e),Y=t.internal.subscribers,q=0;q<Y.length;q++)Z=Y[q],Z.ref.current(Z.store.getState(),r,n);return!t.internal.priority&&t.gl.render&&t.gl.render(t.scene,t.camera),t.internal.frames=Math.max(0,t.internal.frames-1),"always"===t.frameloop?1:t.internal.frames}function K(){const e=i.useContext(Q);if(!e)throw new Error("R3F: Hooks can only be used within the Canvas component!");return e}function ee(e=(e=>e),t){return K()(e,t)}function te(e,t=0){const n=K(),r=n.getState().internal.subscribe,i=_(e);return S(()=>r(i,t,n),[t,r,n]),null}function ne(e,t){return function(n,...r){const i=new n;return e&&e(i),Promise.all(r.map(e=>new Promise((n,r)=>i.load(e,e=>{e.scene&&Object.assign(e,T(e.scene)),n(e)},t,t=>r(new Error(`Could not load ${e}: ${t.message})`))))))}}function re(e,t,n,r){const i=Array.isArray(t)?t:[t],o=Object(d.c)(ne(n,r),[e,...i],{equal:A.equ});return Array.isArray(t)?o:o[0]}re.preload=function(e,t,n){const r=Array.isArray(t)?t:[t];return Object(d.b)(ne(n),[e,...r])},re.clear=function(e,t){const n=Array.isArray(t)?t:[t];return Object(d.a)([e,...n])};const ie=new Map,{invalidate:oe,advance:se}=function(e){let t,n,r,i=!1;function o(s){n=requestAnimationFrame(o),i=!0,t=0,X("before",s);for(const n of e.values()){var a;r=n.store.getState(),!r.internal.active||!("always"===r.frameloop||r.internal.frames>0)||null!=(a=r.gl.xr)&&a.isPresenting||(t+=J(s,r))}if(X("after",s),0===t)return X("tail",s),i=!1,cancelAnimationFrame(n)}return{loop:o,invalidate:function t(n,r=1){var s;if(!n)return e.forEach(e=>t(e.store.getState()),r);null!=(s=n.gl.xr)&&s.isPresenting||!n.internal.active||"never"===n.frameloop||(n.internal.frames=Math.min(60,n.internal.frames+r),i||(i=!0,requestAnimationFrame(o)))},advance:function(t,n=!0,r,i){if(n&&X("before",t),r)J(t,r,i);else for(const n of e.values())J(t,n.store.getState());n&&X("after",t)}}}(ie),{reconciler:ae,applyProps:le}=function(e,t){function n(e,{args:t=[],attach:n,...i},o){let s,a=`${e[0].toUpperCase()}${e.slice(1)}`;if("primitive"===e){if(void 0===i.object)throw new Error("R3F: Primitives without 'object' are invalid!");s=C(i.object,{type:e,root:o,attach:n,primitive:!0})}else{const r=h[a];if(!r)throw new Error(`R3F: ${a} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(!Array.isArray(t))throw new Error("R3F: The args prop must be an array!");s=C(new r(...t),{type:e,root:o,attach:n,memoizedProps:{args:t}})}return void 0===s.__r3f.attach&&(s instanceof r.BufferGeometry?s.__r3f.attach="geometry":s instanceof r.Material&&(s.__r3f.attach="material")),"inject"!==a&&N(s,i),s}function i(e,t){let n=!1;var r,i;t&&(null!=(r=t.__r3f)&&r.attach?P(e,t,t.__r3f.attach):t.isObject3D&&e.isObject3D&&(e.add(t),n=!0),n||null==(i=e.__r3f)||i.objects.push(t),t.__r3f||C(t,{}),t.__r3f.parent=e,I(t),D(t))}function s(e,t,n){let r=!1;if(t){var i,o;if(null!=(i=t.__r3f)&&i.attach)P(e,t,t.__r3f.attach);else if(t.isObject3D&&e.isObject3D){t.parent=e,t.dispatchEvent({type:"added"});const i=e.children.filter(e=>e!==t),o=i.indexOf(n);e.children=[...i.slice(0,o),t,...i.slice(o)],r=!0}r||null==(o=e.__r3f)||o.objects.push(t),t.__r3f||C(t,{}),t.__r3f.parent=e,I(t),D(t)}}function a(e,t,n=!1){e&&[...e].forEach(e=>l(t,e,n))}function l(e,t,n){if(t){var r,i,o;if(t.__r3f&&(t.__r3f.parent=null),null!=(r=e.__r3f)&&r.objects&&(e.__r3f.objects=e.__r3f.objects.filter(e=>e!==t)),null!=(i=t.__r3f)&&i.attach)R(e,t,t.__r3f.attach);else if(t.isObject3D&&e.isObject3D){var s;e.remove(t),null!=(s=t.__r3f)&&s.root&&function(e,t){const{internal:n}=e.getState();n.interaction=n.interaction.filter(e=>e!==t),n.initialHits=n.initialHits.filter(e=>e!==t),n.hovered.forEach((e,r)=>{e.eventObject!==t&&e.object!==t||n.hovered.delete(r)}),n.capturedMap.forEach((e,r)=>{z(n.capturedMap,t,e,r)})}(t.__r3f.root,t)}const c=null==(o=t.__r3f)?void 0:o.primitive,d=void 0===n?null!==t.dispose&&!c:n;var l;if(!c)a(null==(l=t.__r3f)?void 0:l.objects,t,d),a(t.children,t,d);t.__r3f&&(delete t.__r3f.root,delete t.__r3f.objects,delete t.__r3f.handlers,delete t.__r3f.memoizedProps,c||delete t.__r3f),d&&t.dispose&&"Scene"!==t.type&&Object(u.unstable_scheduleCallback)(u.unstable_IdlePriority,()=>{try{t.dispose()}catch(e){}}),D(e)}}const d=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:c()({createInstance:n,removeChild:l,appendChild:i,appendInitialChild:i,insertBefore:s,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(e,t)=>{if(!t)return;const n=e.getState().scene;n.__r3f&&(n.__r3f.root=e,i(n,t))},removeChildFromContainer:(e,t)=>{t&&l(e.getState().scene,t)},insertInContainerBefore:(e,t,n)=>{if(!t||!n)return;const r=e.getState().scene;r.__r3f&&s(r,t,n)},getRootHostContext:()=>null,getChildHostContext:e=>e,finalizeInitialChildren(e){var t;const n=null!=(t=null==e?void 0:e.__r3f)?t:{};return Boolean(n.handlers)},prepareUpdate(e,t,n,r){if(e.__r3f.primitive&&r.object&&r.object!==e)return[!0];{const{args:t=[],children:i,...o}=r,{args:s=[],children:a,...l}=n;if(!Array.isArray(t))throw new Error("R3F: the args prop must be an array!");if(t.some((e,t)=>e!==s[t]))return[!0];const c=j(e,o,l,!0);return c.changes.length?[!1,c]:null}},commitUpdate(e,[t,r],o,s,a,c){t?function(e,t,r,o){var s;const a=null==(s=e.__r3f)?void 0:s.parent;if(!a)return;const c=n(t,r,e.__r3f.root);if(e.children){for(const t of e.children)t.__r3f&&i(c,t);e.children=e.children.filter(e=>!e.__r3f)}if(e.__r3f.objects.forEach(e=>i(c,e)),e.__r3f.objects=[],e.__r3f.autoRemovedBeforeAppend||l(a,e),c.parent&&(c.__r3f.autoRemovedBeforeAppend=!0),i(a,c),c.raycast&&c.__r3f.eventCount){c.__r3f.root.getState().internal.interaction.push(c)}[o,o.alternate].forEach(e=>{null!==e&&(e.stateNode=c,e.ref&&("function"==typeof e.ref?e.ref(c):e.ref.current=c))})}(e,o,a,c):N(e,r)},commitMount(e,t,n,r){var i;const o=null!=(i=e.__r3f)?i:{};e.raycast&&o.handlers&&o.eventCount&&e.__r3f.root.getState().internal.interaction.push(e)},getPublicInstance:e=>e,prepareForCommit:()=>null,preparePortalMount:e=>C(e.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(e){var t;const{attach:n,parent:r}=null!=(t=e.__r3f)?t:{};n&&r&&R(r,e,n),e.isObject3D&&(e.visible=!1),D(e)},unhideInstance(e,t){var n;const{attach:r,parent:i}=null!=(n=e.__r3f)?n:{};r&&i&&P(i,e,r),(e.isObject3D&&null==t.visible||t.visible)&&(e.visible=!0),D(e)},createTextInstance:d,hideTextInstance:d,unhideTextInstance:d,getCurrentEventPriority:()=>t?t():o.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:"undefined"!=typeof performance&&A.fun(performance.now)?performance.now:A.fun(Date.now)?Date.now:()=>0,scheduleTimeout:A.fun(setTimeout)?setTimeout:void 0,cancelTimeout:A.fun(clearTimeout)?clearTimeout:void 0}),applyProps:N}}(0,(function(){var e;const t="undefined"!=typeof self&&self||"undefined"!=typeof window&&window;if(!t)return o.DefaultEventPriority;switch(null==(e=t.event)?void 0:e.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return o.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return o.ContinuousEventPriority;default:return o.DefaultEventPriority}})),ce={objects:"shallow",strict:!1},ue=(e,t)=>{const n="function"==typeof e?e(t):e;return U(n)?n:new r.WebGLRenderer({powerPreference:"high-performance",canvas:t,antialias:!0,alpha:!0,...e})};function de(e){const t=ie.get(e),n=null==t?void 0:t.fiber,s=null==t?void 0:t.store;t&&console.warn("R3F.createRoot should only be called once!");const l="function"==typeof reportError?reportError:console.error,c=s||((e,t)=>{const n=a()((n,o)=>{const s=new r.Vector3,a=new r.Vector3,l=new r.Vector3;function c(e=o().camera,t=a,n=o().size){const{width:i,height:c,top:u,left:d}=n,h=i/c;t instanceof r.Vector3?l.copy(t):l.set(...t);const p=e.getWorldPosition(s).distanceTo(l);if(v(e))return{width:i/e.zoom,height:c/e.zoom,top:u,left:d,factor:1,distance:p,aspect:h};{const t=e.fov*Math.PI/180,n=2*Math.tan(t/2)*p,r=n*(i/c);return{width:r,height:n,top:u,left:d,factor:i/r,distance:p,aspect:h}}}let u=void 0;const d=e=>n(t=>({performance:{...t.performance,current:e}})),h=new r.Vector2;return{set:n,get:o,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(t=1)=>e(o(),t),advance:(e,n)=>t(e,n,o()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new r.Clock,pointer:h,mouse:h,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const e=o();u&&clearTimeout(u),e.performance.current!==e.performance.min&&d(e.performance.min),u=setTimeout(()=>d(o().performance.max),e.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:c},setEvents:e=>n(t=>({...t,events:{...t.events,...e}})),setSize:(e,t,r,i,s)=>{const l=o().camera,u={width:e,height:t,top:i||0,left:s||0,updateStyle:r};n(e=>({size:u,viewport:{...e.viewport,...c(l,a,u)}}))},setDpr:e=>n(t=>{const n=O(e);return{viewport:{...t.viewport,dpr:n,initialDpr:t.viewport.initialDpr||n}}}),setFrameloop:(e="always")=>{const t=o().clock;t.stop(),t.elapsedTime=0,"never"!==e&&(t.start(),t.elapsedTime=0),n(()=>({frameloop:e}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:i.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(e,t,n)=>{const r=o().internal;return r.priority=r.priority+(t>0?1:0),r.subscribers.push({ref:e,priority:t,store:n}),r.subscribers=r.subscribers.sort((e,t)=>e.priority-t.priority),()=>{const n=o().internal;null!=n&&n.subscribers&&(n.priority=n.priority-(t>0?1:0),n.subscribers=n.subscribers.filter(t=>t.ref!==e))}}}}}),o=n.getState();let s=o.size,l=o.viewport.dpr,c=o.camera;return n.subscribe(()=>{const{camera:e,size:t,viewport:r,gl:i,set:o}=n.getState();if(t!==s||r.dpr!==l){var a;s=t,l=r.dpr,L(e,t),i.setPixelRatio(r.dpr);const n=null!=(a=t.updateStyle)?a:"undefined"!=typeof HTMLCanvasElement&&i.domElement instanceof HTMLCanvasElement;i.setSize(t.width,t.height,n)}e!==c&&(c=e,o(t=>({viewport:{...t.viewport,...t.viewport.getCurrentViewport(e)}})))}),n.subscribe(t=>e(t)),n})(oe,se),u=n||ae.createContainer(c,o.ConcurrentRoot,null,!1,null,"",l,null);let d;t||ie.set(e,{fiber:u,store:c});let h,p=!1;return{configure(t={}){let{gl:n,size:i,scene:o,events:s,onCreated:a,shadows:l=!1,linear:u=!1,flat:f=!1,legacy:m=!1,orthographic:g=!1,frameloop:v="always",dpr:y=[1,2],performance:S,raycaster:_,camera:x,onPointerMissed:w}=t,k=c.getState(),E=k.gl;k.gl||k.set({gl:E=ue(n,e)});let T=k.raycaster;T||k.set({raycaster:T=new r.Raycaster});const{params:M,...$}=_||{};if(A.equ($,T,ce)||le(T,{...$}),A.equ(M,T.params,ce)||le(T,{params:{...T.params,...M}}),!k.camera||k.camera===h&&!A.equ(h,x,ce)){h=x;const e=x instanceof r.Camera,t=e?x:g?new r.OrthographicCamera(0,0,0,0,.1,1e3):new r.PerspectiveCamera(75,0,.1,1e3);e||(t.position.z=5,x&&le(t,x),k.camera||null!=x&&x.rotation||t.lookAt(0,0,0)),k.set({camera:t})}if(!k.scene){let e;o instanceof r.Scene?e=o:(e=new r.Scene,o&&le(e,o)),k.set({scene:C(e)})}if(!k.xr){const e=(e,t)=>{const n=c.getState();"never"!==n.frameloop&&se(e,!0,n,t)},t=()=>{const t=c.getState();t.gl.xr.enabled=t.gl.xr.isPresenting,t.gl.xr.setAnimationLoop(t.gl.xr.isPresenting?e:null),t.gl.xr.isPresenting||oe(t)},n={connect(){const e=c.getState().gl;e.xr.addEventListener("sessionstart",t),e.xr.addEventListener("sessionend",t)},disconnect(){const e=c.getState().gl;e.xr.removeEventListener("sessionstart",t),e.xr.removeEventListener("sessionend",t)}};E.xr&&n.connect(),k.set({xr:n})}if(E.shadowMap){const e=E.shadowMap.enabled,t=E.shadowMap.type;if(E.shadowMap.enabled=!!l,A.boo(l))E.shadowMap.type=r.PCFSoftShadowMap;else if(A.str(l)){var P;const e={basic:r.BasicShadowMap,percentage:r.PCFShadowMap,soft:r.PCFSoftShadowMap,variance:r.VSMShadowMap};E.shadowMap.type=null!=(P=e[l])?P:r.PCFSoftShadowMap}else A.obj(l)&&Object.assign(E.shadowMap,l);e===E.shadowMap.enabled&&t===E.shadowMap.type||(E.shadowMap.needsUpdate=!0)}const R=b();R&&("enabled"in R?R.enabled=!m:"legacyMode"in R&&(R.legacyMode=m));le(E,{outputEncoding:u?3e3:3001,toneMapping:f?r.NoToneMapping:r.ACESFilmicToneMapping}),k.legacy!==m&&k.set(()=>({legacy:m})),k.linear!==u&&k.set(()=>({linear:u})),k.flat!==f&&k.set(()=>({flat:f})),!n||A.fun(n)||U(n)||A.equ(n,E,ce)||le(E,n),s&&!k.events.handlers&&k.set({events:s(c)});const j=function(e,t){if(t)return t;if("undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement&&e.parentElement){const{width:t,height:n,top:r,left:i}=e.parentElement.getBoundingClientRect();return{width:t,height:n,top:r,left:i}}return"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas?{width:e.width,height:e.height,top:0,left:0}:{width:0,height:0,top:0,left:0}}(e,i);return A.equ(j,k.size,ce)||k.setSize(j.width,j.height,j.updateStyle,j.top,j.left),y&&k.viewport.dpr!==O(y)&&k.setDpr(y),k.frameloop!==v&&k.setFrameloop(v),k.onPointerMissed||k.set({onPointerMissed:w}),S&&!A.equ(S,k.performance,ce)&&k.set(e=>({performance:{...e.performance,...S}})),d=a,p=!0,this},render(t){return p||this.configure(),ae.updateContainer(i.createElement(he,{store:c,children:t,onCreated:d,rootElement:e}),u,null,()=>{}),c},unmount(){pe(e)}}}function he({store:e,children:t,onCreated:n,rootElement:r}){return S(()=>{const t=e.getState();t.set(e=>({internal:{...e.internal,active:!0}})),n&&n(t),e.getState().events.connected||null==t.events.connect||t.events.connect(r)},[]),i.createElement(Q.Provider,{value:e},t)}function pe(e,t){const n=ie.get(e),r=null==n?void 0:n.fiber;if(r){const i=null==n?void 0:n.store.getState();i&&(i.internal.active=!1),ae.updateContainer(null,r,null,()=>{i&&setTimeout(()=>{try{var n,r,o,s;null==i.events.disconnect||i.events.disconnect(),null==(n=i.gl)||null==(r=n.renderLists)||null==r.dispose||r.dispose(),null==(o=i.gl)||null==o.forceContextLoss||o.forceContextLoss(),null!=(s=i.gl)&&s.xr&&i.xr.disconnect(),function(e){e.dispose&&"Scene"!==e.type&&e.dispose();for(const t in e)null==t.dispose||t.dispose(),delete e[t]}(i),ie.delete(e),t&&t(e)}catch(e){}},500)})}}ae.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:i.version});i.unstable_act},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return s}));var r=n(62);function i(e){const t=Object(r.a)().getClient(),n=e||t&&t.getOptions();return!!n&&("tracesSampleRate"in n||"tracesSampler"in n)}function o(e){const t=(e||Object(r.a)()).getScope();return t&&t.getTransaction()}function s(e){return e/1e3}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a}));var r=n(38);const i=["debug","info","warn","error","log","assert","trace"];function o(e){if(!("console"in r.a))return e();const t=r.a.console,n={};i.forEach(e=>{const r=t[e]&&t[e].__sentry_original__;e in t&&r&&(n[e]=t[e],t[e]=r)});try{return e()}finally{Object.keys(n).forEach(e=>{t[e]=n[e]})}}function s(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1}};return"undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?i.forEach(n=>{t[n]=(...t)=>{e&&o(()=>{r.a.console[n](`Sentry Logger [${n}]:`,...t)})}}):i.forEach(e=>{t[e]=()=>{}}),t}let a;a="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?Object(r.b)("logger",s):s()},function(e,t,n){var r;
|
||
/*!
|
||
Copyright (c) 2018 Jed Watson.
|
||
Licensed under the MIT License (MIT), see
|
||
http://jedwatson.github.io/classnames
|
||
*/!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)){if(r.length){var s=i.apply(null,r);s&&e.push(s)}}else if("object"===o){if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]")){e.push(r.toString());continue}for(var a in r)n.call(r,a)&&r[a]&&e.push(a)}}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return M})),n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return $})),n.d(t,"d",(function(){return f}));var r,i=n(3);class o{constructor(e,t,n,r,i,o,s,a,l,c=0,u){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=i,this.score=o,this.buffer=s,this.bufferBase=a,this.curContext=l,this.lookAhead=c,this.parent=u}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,n=0){let r=e.parser.context;return new o(e,[],t,n,n,0,[],0,r?new s(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let n=e>>19,r=65535&e,{parser:i}=this.p,o=i.dynamicPrecedence(r);if(o&&(this.score+=o),0==n)return this.pushState(i.getGoto(this.state,r,!0),this.reducePos),r<i.minRepeatTerm&&this.storeNode(r,this.reducePos,this.reducePos,4,!0),void this.reduceContext(r,this.reducePos);let s=this.stack.length-3*(n-1)-(262144&e?6:0),a=s?this.stack[s-2]:this.p.ranges[0].from,l=this.reducePos-a;l>=2e3&&!(null===(t=this.p.parser.nodeSet.types[r])||void 0===t?void 0:t.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=l):this.p.lastBigReductionSize<l&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=a,this.p.lastBigReductionSize=l));let c=s?this.stack[s-1]:0,u=this.bufferBase+this.buffer.length-c;if(r<i.minRepeatTerm||131072&e){let e=i.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(r,a,e,u+4,!0)}if(262144&e)this.state=this.stack[s];else{let e=this.stack[s-3];this.state=i.getGoto(e,r,!0)}for(;this.stack.length>s;)this.stack.pop();this.reduceContext(r,a)}storeNode(e,t,n,r=4,i=!1){if(0==e&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let e=this,r=this.buffer.length;if(0==r&&e.parent&&(r=e.bufferBase-e.parent.bufferBase,e=e.parent),r>0&&0==e.buffer[r-4]&&e.buffer[r-1]>-1){if(t==n)return;if(e.buffer[r-2]>=t)return void(e.buffer[r-2]=n)}}if(i&&this.pos!=n){let i=this.buffer.length;if(i>0&&0!=this.buffer[i-4])for(;i>0&&this.buffer[i-2]>n;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4);this.buffer[i]=e,this.buffer[i+1]=t,this.buffer[i+2]=n,this.buffer[i+3]=r}else this.buffer.push(e,t,n,r)}shift(e,t,n){let r=this.pos;if(131072&e)this.pushState(65535&e,this.pos);else if(0==(262144&e)){let i=e,{parser:o}=this.p;(n>this.pos||t<=o.maxNode)&&(this.pos=n,o.stateFlag(i,1)||(this.reducePos=n)),this.pushState(i,r),this.shiftContext(t,r),t<=o.maxNode&&this.buffer.push(t,r,n,4)}else this.pos=n,this.shiftContext(t,r),t<=this.p.parser.maxNode&&this.buffer.push(t,r,n,4)}apply(e,t,n){65536&e?this.reduce(e):this.shift(e,t,n)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(n,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let n=e.buffer.slice(t),r=e.bufferBase+t;for(;e&&r==e.bufferBase;)e=e.parent;return new o(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new a(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(0==n)return!1;if(0==(65536&n))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let r,i=0;i<t.length;i+=2)(r=t[i+1])!=this.state&&this.p.parser.hasAction(r,e)&&n.push(t[i],r);if(this.stack.length<120)for(let e=0;n.length<8&&e<t.length;e+=2){let r=t[e+1];n.some((e,t)=>1&t&&e==r)||n.push(t[e],r)}t=n}let n=[];for(let e=0;e<t.length&&n.length<4;e+=2){let r=t[e+1];if(r==this.state)continue;let i=this.split();i.pushState(r,this.pos),i.storeNode(0,i.pos,i.pos,4,!0),i.shiftContext(t[e],this.pos),i.score-=200,n.push(i)}return n}forceReduce(){let e=this.p.parser.stateSlot(this.state,5);if(0==(65536&e))return!1;let{parser:t}=this.p;if(!t.validAction(this.state,e)){let n=e>>19,r=65535&e,i=this.stack.length-3*n;if(i<0||t.getGoto(this.stack[i],r,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:e}=this.p;return 65535==e.data[e.stateSlot(this.state,1)]&&!e.stateSlot(this.state,4)}restart(){this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||-3!=this.buffer[e])&&this.buffer.push(this.curContext.hash,this.reducePos,this.reducePos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||-4!=this.buffer[e])&&this.buffer.push(this.lookAhead,this.reducePos,this.reducePos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new s(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class s{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}!function(e){e[e.Insert=200]="Insert",e[e.Delete=190]="Delete",e[e.Reduce=100]="Reduce",e[e.MaxNext=4]="MaxNext",e[e.MaxInsertStackDepth=300]="MaxInsertStackDepth",e[e.DampenInsertStackDepth=120]="DampenInsertStackDepth",e[e.MinBigReduction=2e3]="MinBigReduction"}(r||(r={}));class a{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=65535&e,n=e>>19;0==n?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(n-1);let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}}class l{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,0==this.index&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new l(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;null!=e&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new l(this.stack,this.pos,this.index)}}function c(e,t=Uint16Array){if("string"!=typeof e)return e;let n=null;for(let r=0,i=0;r<e.length;){let o=0;for(;;){let t=e.charCodeAt(r++),n=!1;if(126==t){o=65535;break}t>=92&&t--,t>=34&&t--;let i=t-32;if(i>=46&&(i-=46,n=!0),o+=i,n)break;o*=46}n?n[i++]=o:n=new t(o)}return n}class u{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const d=new u;class h{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=d,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,i=this.pos+e;for(;i<n.from;){if(!r)return null;let e=this.ranges[--r];i-=n.from-e.to,n=e}for(;t<0?i>n.to:i>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];i+=e.from-n.to,n=e}return i}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t,n,r=this.chunkOff+e;if(r>=0&&r<this.chunk.length)t=this.pos+e,n=this.chunk.charCodeAt(r);else{let r=this.resolveOffset(e,1);if(null==r)return-1;if(t=r,t>=this.chunk2Pos&&t<this.chunk2Pos+this.chunk2.length)n=this.chunk2.charCodeAt(t-this.chunk2Pos);else{let e=this.rangeIndex,r=this.range;for(;r.to<=t;)r=this.ranges[++e];this.chunk2=this.input.chunk(this.chunk2Pos=t),t+this.chunk2.length>r.to&&(this.chunk2=this.chunk2.slice(0,r.to-t)),n=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),n}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(null==n||n<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=d,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}}class p{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;g(this.data,e,t,this.id,n.data,n.tokenPrecTable)}}p.prototype.contextual=p.prototype.fallback=p.prototype.extend=!1;class f{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data="string"==typeof e?c(e):e}token(e,t){let n=e.pos,r=0;for(;g(this.data,e,t,0,this.data,this.precTable),!(e.token.value>-1);){if(null==this.elseToken)return;if(e.next<0)break;e.advance(),e.reset(e.pos,e.token),r++}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}}f.prototype.contextual=p.prototype.fallback=p.prototype.extend=!1;class m{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function g(e,t,n,r,i,o){let s=0,a=1<<r,{dialect:l}=n.p.parser;e:for(;0!=(a&e[s]);){let n=e[s+1];for(let r=s+3;r<n;r+=2)if((e[r+1]&a)>0){let n=e[r];if(l.allows(n)&&(-1==t.token.value||t.token.value==n||v(n,t.token.value,i,o))){t.acceptToken(n);break}}let r=t.next,c=0,u=e[s+2];if(!(t.next<0&&u>c&&65535==e[n+3*u-3]&&65535==e[n+3*u-3])){for(;c<u;){let i=c+u>>1,o=n+i+(i<<1),a=e[o],l=e[o+1]||65536;if(r<a)u=i;else{if(!(r>=l)){s=e[o+2],t.advance();continue e}c=i+1}}break}s=e[n+3*u-1]}}function b(e,t,n){for(let r,i=t;65535!=(r=e[i]);i++)if(r==n)return i-t;return-1}function v(e,t,n,r){let i=b(n,r,t);return i<0||b(n,r,e)<i}const y=void 0!==e&&e.env&&/\bparse\b/.test(e.env.LOG);let S=null;var _,x;function w(e,t,n){let r=e.cursor(i.b.IncludeAnonymous);for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}!function(e){e[e.Margin=25]="Margin"}(_||(_={}));class k{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?w(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?w(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let n=this.trees[t],r=this.index[t];if(r==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let o=n.children[r],s=this.start[t]+n.positions[r];if(s>e)return this.nextStart=s,null;if(o instanceof i.h){if(s==e){if(s<this.safeFrom)return null;let e=s+o.length;if(e<=this.safeTo){let t=o.prop(i.c.lookAhead);if(!t||e+t<this.fragment.to)return o}}this.index[t]++,s+o.length>=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(s),this.index.push(0))}else this.index[t]++,this.nextStart=s+o.length}}}class O{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new u)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,o=r.stateSlot(e.state,3),s=e.curContext?e.curContext.hash:0,a=0;for(let r=0;r<i.length;r++){if(0==(1<<r&o))continue;let l=i[r],c=this.tokens[r];if((!n||l.fallback)&&((l.contextual||c.start!=e.pos||c.mask!=o||c.context!=s)&&(this.updateCachedToken(c,l,e),c.mask=o,c.context=s),c.lookAhead>c.end+25&&(a=Math.max(c.lookAhead,a)),0!=c.value)){let r=t;if(c.extended>-1&&(t=this.addActions(e,c.extended,c.end,t)),t=this.addActions(e,c.value,c.end,t),!l.extend&&(n=c,t>r))break}}for(;this.actions.length>t;)this.actions.pop();return a&&e.setLookAhead(a),n||e.pos!=this.stream.end||(n=new u,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new u,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:t}=n.p;for(let r=0;r<t.specialized.length;r++)if(t.specialized[r]==e.value){let i=t.specializers[r](this.stream.read(e.start,e.end),n);if(i>=0&&n.p.parser.dialect.allows(i>>1)){0==(1&i)?e.value=i>>1:e.extended=i>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;t<r;t+=3)if(this.actions[t]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=n,r}addActions(e,t,n,r){let{state:i}=e,{parser:o}=e.p,{data:s}=o;for(let e=0;e<2;e++)for(let a=o.stateSlot(i,e?2:1);;a+=3){if(65535==s[a]){if(1!=s[a+1]){0==r&&2==s[a+1]&&(r=this.putAction(P(s,a+2),t,n,r));break}a=P(s,a+2)}s[a]==t&&(r=this.putAction(P(s,a+1),t,n,r))}return r}}!function(e){e[e.Distance=5]="Distance",e[e.MaxRemainingPerStep=3]="MaxRemainingPerStep",e[e.MinBufferLengthPrune=500]="MinBufferLengthPrune",e[e.ForceReduceLimit=10]="ForceReduceLimit",e[e.CutDepth=15e3]="CutDepth",e[e.CutTo=9e3]="CutTo",e[e.MaxLeftAssociativeReductionCount=300]="MaxLeftAssociativeReductionCount",e[e.MaxStackCount=12]="MaxStackCount"}(x||(x={}));class E{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new h(t,r),this.tokens=new O(e,this.stream),this.topTerm=e.top[1];let{from:i}=r[0];this.stacks=[o.start(this,e.top[0],i)],this.fragments=n.length&&this.stream.end-i>4*e.bufferLength?new k(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e,t,n=this.stacks,r=this.minStackPos,i=this.stacks=[];if(this.bigReductionCount>300&&1==n.length){let[e]=n;for(;e.forceReduce()&&e.stack.length&&e.stack[e.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<n.length;o++){let s=n[o];for(;;){if(this.tokens.mainToken=null,s.pos>r)i.push(s);else{if(this.advanceStack(s,i,n))continue;{e||(e=[],t=[]),e.push(s);let n=this.tokens.getMainToken(s);t.push(n.value,n.end)}}break}}if(!i.length){let t=e&&function(e){let t=null;for(let n of e){let e=n.p.stoppedAt;(n.pos==n.p.stream.end||null!=e&&n.pos>e)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score)&&(t=n)}return t}(e);if(t)return this.stackToTree(t);if(this.parser.strict)throw y&&e&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+r);this.recovering||(this.recovering=5)}if(this.recovering&&e){let n=null!=this.stoppedAt&&e[0].pos>this.stoppedAt?e[0]:this.runRecovery(e,t,i);if(n)return this.stackToTree(n.forceAll())}if(this.recovering){let e=1==this.recovering?1:3*this.recovering;if(i.length>e)for(i.sort((e,t)=>t.score-e.score);i.length>e;)i.pop();i.some(e=>e.reducePos>r)&&this.recovering--}else if(i.length>1){e:for(let e=0;e<i.length-1;e++){let t=i[e];for(let n=e+1;n<i.length;n++){let r=i[n];if(t.sameState(r)||t.buffer.length>500&&r.buffer.length>500){if(!((t.score-r.score||t.buffer.length-r.buffer.length)>0)){i.splice(e--,1);continue e}i.splice(n--,1)}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let e=1;e<i.length;e++)i[e].pos<this.minStackPos&&(this.minStackPos=i[e].pos);return null}stopAt(e){if(null!=this.stoppedAt&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,n){let r=e.pos,{parser:o}=this,s=y?this.stackID(e)+" -> ":"";if(null!=this.stoppedAt&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,n=t?e.curContext.hash:0;for(let a=this.fragments.nodeAt(r);a;){let r=this.parser.nodeSet.types[a.type.id]==a.type?o.getGoto(e.state,a.type.id):-1;if(r>-1&&a.length&&(!t||(a.prop(i.c.contextHash)||0)==n))return e.useNode(a,r),y&&console.log(s+this.stackID(e)+` (via reuse of ${o.getName(a.type.id)})`),!0;if(!(a instanceof i.h)||0==a.children.length||a.positions[0]>0)break;let l=a.children[0];if(!(l instanceof i.h&&0==a.positions[0]))break;a=l}}let a=o.stateSlot(e.state,4);if(a>0)return e.reduce(a),y&&console.log(s+this.stackID(e)+` (via always-reduce ${o.getName(65535&a)})`),!0;if(e.stack.length>=15e3)for(;e.stack.length>9e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let i=0;i<l.length;){let a=l[i++],c=l[i++],u=l[i++],d=i==l.length||!n,h=d?e:e.split();if(h.apply(a,c,u),y&&console.log(s+this.stackID(h)+` (via ${0==(65536&a)?"shift":"reduce of "+o.getName(65535&a)} for ${o.getName(c)} @ ${r}${h==e?"":", split"})`),d)return!0;h.pos>r?t.push(h):n.push(h)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return A(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let o=0;o<e.length;o++){let s=e[o],a=t[o<<1],l=t[1+(o<<1)],c=y?this.stackID(s)+" -> ":"";if(s.deadEnd){if(i)continue;if(i=!0,s.restart(),y&&console.log(c+this.stackID(s)+" (restarted)"),this.advanceFully(s,n))continue}let u=s.split(),d=c;for(let e=0;u.forceReduce()&&e<10;e++){if(y&&console.log(d+this.stackID(u)+" (via force-reduce)"),this.advanceFully(u,n))break;y&&(d=this.stackID(u)+" -> ")}for(let e of s.recoverByInsert(a))y&&console.log(c+this.stackID(e)+" (via recover-insert)"),this.advanceFully(e,n);this.stream.end>s.pos?(l==s.pos&&(l++,a=0),s.recoverByDelete(a,l),y&&console.log(c+this.stackID(s)+` (via recover-delete ${this.parser.getName(a)})`),A(s,n)):(!r||r.score<s.score)&&(r=s)}return r}stackToTree(e){return e.close(),i.h.build({buffer:l.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(S||(S=new WeakMap)).get(e);return t||S.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function A(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(r.pos==e.pos&&r.sameState(e))return void(t[n].score<e.score&&(t[n]=e))}t.push(e)}class T{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||0==this.disabled[e]}}const C=e=>e;class M{constructor(e){this.start=e.start,this.shift=e.shift||C,this.reduce=e.reduce||C,this.reuse=e.reuse||C,this.hash=e.hash||(()=>0),this.strict=!1!==e.strict}}class $ extends i.g{constructor(e){if(super(),this.wrappers=[],14!=e.version)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let n=0;n<e.repeatNodeCount;n++)t.push("");let n=Object.keys(e.topRules).map(t=>e.topRules[t][1]),r=[];for(let e=0;e<t.length;e++)r.push([]);function o(e,t,n){r[e].push([t,t.deserialize(String(n))])}if(e.nodeProps)for(let t of e.nodeProps){let e=t[0];"string"==typeof e&&(e=i.c[e]);for(let n=1;n<t.length;){let r=t[n++];if(r>=0)o(r,e,t[n++]);else{let i=t[n+-r];for(let s=-r;s>0;s--)o(t[n++],e,i);n++}}}this.nodeSet=new i.d(t.map((t,o)=>i.e.define({name:o>=this.minRepeatTerm?void 0:t,id:o,props:r[o],top:n.indexOf(o)>-1,error:0==o,skipped:e.skippedNodes&&e.skippedNodes.indexOf(o)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=i.a;let s=c(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e<this.specializerSpecs.length;e++)this.specialized[e]=this.specializerSpecs[e].term;this.specializers=this.specializerSpecs.map(R),this.states=c(e.states,Uint32Array),this.data=c(e.stateData),this.goto=c(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(e=>"number"==typeof e?new p(s,e):e),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let r=new E(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return-1;for(let i=r[t+1];;){let t=r[i++],o=1&t,s=r[i++];if(o&&n)return s;for(let n=i+(t>>1);i<n;i++)if(r[i]==e)return s;if(o)return-1}}hasAction(e,t){let n=this.data;for(let r=0;r<2;r++)for(let i,o=this.stateSlot(e,r?2:1);;o+=3){if(65535==(i=n[o])){if(1!=n[o+1]){if(2==n[o+1])return P(n,o+2);break}i=n[o=P(n,o+2)]}if(i==t||0==i)return P(n,o+1)}return 0}stateSlot(e,t){return this.states[6*e+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){if(t==this.stateSlot(e,4))return!0;for(let n=this.stateSlot(e,1);;n+=3){if(65535==this.data[n]){if(1!=this.data[n+1])return!1;n=P(this.data,n+2)}if(t==P(this.data,n+1))return!0}}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(65535==this.data[n]){if(1!=this.data[n+1])break;n=P(this.data,n+2)}if(0==(1&this.data[n+2])){let e=this.data[n+1];t.some((t,n)=>1&n&&t==e)||t.push(this.data[n],e)}}return t}configure(e){let t=Object.assign(Object.create($.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw new RangeError("Invalid top rule name "+e.top);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(t=>{let n=e.tokenizers.find(e=>e.from==t);return n?n.to:t})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((n,r)=>{let i=e.specializers.find(e=>e.from==n.external);if(!i)return n;let o=Object.assign(Object.assign({},n),{external:i.to});return t.specializers[r]=R(o),o})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),null!=e.strict&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),null!=e.bufferLength&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return null==t?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let r of e.split(" ")){let e=t.indexOf(r);e>=0&&(n[e]=!0)}let r=null;for(let e=0;e<t.length;e++)if(!n[e])for(let n,i=this.dialects[t[e]];65535!=(n=this.data[i++]);)(r||(r=new Uint8Array(this.maxTerm+1)))[n]=1;return new T(e,n,r)}static deserialize(e){return new $(e)}}function P(e,t){return e[t]|e[t+1]<<16}function R(e){if(e.external){let t=e.extend?1:0;return(n,r)=>e.external(n,r)<<1|t}return e.get}}).call(this,n(36))},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(203)},function(e,t,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},,function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return f})),n.d(t,"e",(function(){return p})),n.d(t,"f",(function(){return l})),n.d(t,"g",(function(){return a})),n.d(t,"h",(function(){return d})),n.d(t,"i",(function(){return s})),n.d(t,"j",(function(){return h}));const r=Object.prototype.toString;function i(e){switch(r.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return f(e,Error)}}function o(e,t){return r.call(e)===`[object ${t}]`}function s(e){return o(e,"String")}function a(e){return null===e||"object"!=typeof e&&"function"!=typeof e}function l(e){return o(e,"Object")}function c(e){return"undefined"!=typeof Event&&f(e,Event)}function u(e){return"undefined"!=typeof Element&&f(e,Element)}function d(e){return o(e,"RegExp")}function h(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function p(e){return"number"==typeof e&&e!=e}function f(e,t){try{return e instanceof t}catch(e){return!1}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return i})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return h})),n.d(t,"g",(function(){return v})),n.d(t,"h",(function(){return b})),n.d(t,"i",(function(){return d})),n.d(t,"j",(function(){return u})),n.d(t,"k",(function(){return f})),n.d(t,"l",(function(){return c})),n.d(t,"m",(function(){return g})),n.d(t,"n",(function(){return m}));const r=Object.prototype.toString;function i(e){switch(r.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return v(e,Error)}}function o(e,t){return r.call(e)===`[object ${t}]`}function s(e){return o(e,"ErrorEvent")}function a(e){return o(e,"DOMError")}function l(e){return o(e,"DOMException")}function c(e){return o(e,"String")}function u(e){return null===e||"object"!=typeof e&&"function"!=typeof e}function d(e){return o(e,"Object")}function h(e){return"undefined"!=typeof Event&&v(e,Event)}function p(e){return"undefined"!=typeof Element&&v(e,Element)}function f(e){return o(e,"RegExp")}function m(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function g(e){return d(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function b(e){return"number"==typeof e&&e!=e}function v(e,t){try{return e instanceof t}catch(e){return!1}}},function(e,t,n){"use strict";function r(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function i(e){return!!e&&!!e[V]}function o(e){var t;return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===W}(e)||Array.isArray(e)||!!e[H]||!!(null===(t=e.constructor)||void 0===t?void 0:t[H])||h(e)||p(e))}function s(e,t,n){void 0===n&&(n=!1),0===a(e)?(n?Object.keys:X)(e).forEach((function(r){n&&"symbol"==typeof r||t(r,e[r],e)})):e.forEach((function(n,r){return t(r,n,e)}))}function a(e){var t=e[V];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:h(e)?2:p(e)?3:0}function l(e,t){return 2===a(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function c(e,t){return 2===a(e)?e.get(t):e[t]}function u(e,t,n){var r=a(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function d(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function h(e){return U&&e instanceof Map}function p(e){return Q&&e instanceof Set}function f(e){return e.o||e.t}function m(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Y(e);delete t[V];for(var n=X(t),r=0;r<n.length;r++){var i=n[r],o=t[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function g(e,t){return void 0===t&&(t=!1),v(e)||i(e)||!o(e)||(a(e)>1&&(e.set=e.add=e.clear=e.delete=b),Object.freeze(e),t&&s(e,(function(e,t){return g(t,!0)}),!0)),e}function b(){r(2)}function v(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function y(e){var t=Z[e];return t||r(18,e),t}function S(e,t){Z[e]||(Z[e]=t)}function _(){return z}function x(e,t){t&&(y("Patches"),e.u=[],e.s=[],e.v=t)}function w(e){k(e),e.p.forEach(E),e.p=null}function k(e){e===z&&(z=e.l)}function O(e){return z={p:[],l:z,h:e,m:!0,_:0}}function E(e){var t=e[V];0===t.i||1===t.i?t.j():t.g=!0}function A(e,t){t._=t.p.length;var n=t.p[0],i=void 0!==e&&e!==n;return t.h.O||y("ES5").S(t,e,i),i?(n[V].P&&(w(t),r(4)),o(e)&&(e=T(t,e),t.l||M(t,e)),t.u&&y("Patches").M(n[V].t,e,t.u,t.s)):e=T(t,n,[]),w(t),t.u&&t.v(t.u,t.s),e!==G?e:void 0}function T(e,t,n){if(v(t))return t;var r=t[V];if(!r)return s(t,(function(i,o){return C(e,r,t,i,o,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return M(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=m(r.k):r.o,o=i,a=!1;3===r.i&&(o=new Set(i),i.clear(),a=!0),s(o,(function(t,o){return C(e,r,i,t,o,n,a)})),M(e,i,!1),n&&e.u&&y("Patches").N(r,n,e.u,e.s)}return r.o}function C(e,t,n,r,s,a,c){if(i(s)){var d=T(e,s,a&&t&&3!==t.i&&!l(t.R,r)?a.concat(r):void 0);if(u(n,r,d),!i(d))return;e.m=!1}else c&&n.add(s);if(o(s)&&!v(s)){if(!e.h.D&&e._<1)return;T(e,s),t&&t.A.l||M(e,s)}}function M(e,t,n){void 0===n&&(n=!1),!e.l&&e.h.D&&e.m&&g(t,n)}function $(e,t){var n=e[V];return(n?f(n):e)[t]}function P(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function R(e){e.P||(e.P=!0,e.l&&R(e.l))}function j(e){e.o||(e.o=m(e.t))}function N(e,t,n){var r=h(t)?y("MapSet").F(t,n):p(t)?y("MapSet").T(t,n):e.O?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:_(),P:!1,I:!1,R:{},l:t,t:e,k:null,o:null,j:null,C:!1},i=r,o=J;n&&(i=[r],o=K);var s=Proxy.revocable(i,o),a=s.revoke,l=s.proxy;return r.k=l,r.j=a,l}(t,n):y("ES5").J(t,n);return(n?n.A:_()).p.push(r),r}function D(e){return i(e)||r(22,e),function e(t){if(!o(t))return t;var n,r=t[V],i=a(t);if(r){if(!r.P&&(r.i<4||!y("ES5").K(r)))return r.t;r.I=!0,n=I(t,i),r.I=!1}else n=I(t,i);return s(n,(function(t,i){r&&c(r.t,t)===i||u(n,t,e(i))})),3===i?new Set(n):n}(e)}function I(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return m(e)}function L(){function e(e,t){var n=o[e];return n?n.enumerable=t:o[e]=n={configurable:!0,enumerable:t,get:function(){var t=this[V];return J.get(t,e)},set:function(t){var n=this[V];J.set(n,e,t)}},n}function t(e){for(var t=e.length-1;t>=0;t--){var i=e[t][V];if(!i.P)switch(i.i){case 5:r(i)&&R(i);break;case 4:n(i)&&R(i)}}}function n(e){for(var t=e.t,n=e.k,r=X(n),i=r.length-1;i>=0;i--){var o=r[i];if(o!==V){var s=t[o];if(void 0===s&&!l(t,o))return!0;var a=n[o],c=a&&a[V];if(c?c.t!==s:!d(a,s))return!0}}var u=!!t[V];return r.length!==X(t).length+(u?0:1)}function r(e){var t=e.k;if(t.length!==e.t.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);if(n&&!n.get)return!0;for(var r=0;r<t.length;r++)if(!t.hasOwnProperty(r))return!0;return!1}var o={};S("ES5",{J:function(t,n){var r=Array.isArray(t),i=function(t,n){if(t){for(var r=Array(n.length),i=0;i<n.length;i++)Object.defineProperty(r,""+i,e(i,!0));return r}var o=Y(n);delete o[V];for(var s=X(o),a=0;a<s.length;a++){var l=s[a];o[l]=e(l,t||!!o[l].enumerable)}return Object.create(Object.getPrototypeOf(n),o)}(r,t),o={i:r?5:4,A:n?n.A:_(),P:!1,I:!1,R:{},l:n,t:t,k:i,o:null,g:!1,C:!1};return Object.defineProperty(i,V,{value:o,writable:!0}),i},S:function(e,n,o){o?i(n)&&n[V].A===e&&t(e.p):(e.u&&function e(t){if(t&&"object"==typeof t){var n=t[V];if(n){var i=n.t,o=n.k,a=n.R,c=n.i;if(4===c)s(o,(function(t){t!==V&&(void 0!==i[t]||l(i,t)?a[t]||e(o[t]):(a[t]=!0,R(n)))})),s(i,(function(e){void 0!==o[e]||l(o,e)||(a[e]=!1,R(n))}));else if(5===c){if(r(n)&&(R(n),a.length=!0),o.length<i.length)for(var u=o.length;u<i.length;u++)a[u]=!1;else for(var d=i.length;d<o.length;d++)a[d]=!0;for(var h=Math.min(o.length,i.length),p=0;p<h;p++)o.hasOwnProperty(p)||(a[p]=!0),void 0===a[p]&&e(o[p])}}}}(e.p[0]),t(e.p))},K:function(e){return 4===e.i?n(e):r(e)}})}n.d(t,"a",(function(){return D})),n.d(t,"c",(function(){return L})),n.d(t,"d",(function(){return i})),n.d(t,"e",(function(){return o}));var B,z,F="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),U="undefined"!=typeof Map,Q="undefined"!=typeof Set,q="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,G=F?Symbol.for("immer-nothing"):((B={})["immer-nothing"]=!0,B),H=F?Symbol.for("immer-draftable"):"__$immer_draftable",V=F?Symbol.for("immer-state"):"__$immer_state",W=("undefined"!=typeof Symbol&&Symbol.iterator,""+Object.prototype.constructor),X="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Y=Object.getOwnPropertyDescriptors||function(e){var t={};return X(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},Z={},J={get:function(e,t){if(t===V)return e;var n=f(e);if(!l(n,t))return function(e,t,n){var r,i=P(t,n);return i?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!o(r)?r:r===$(e.t,t)?(j(e),e.o[t]=N(e.A.h,r,e)):r},has:function(e,t){return t in f(e)},ownKeys:function(e){return Reflect.ownKeys(f(e))},set:function(e,t,n){var r=P(f(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=$(f(e),t),o=null==i?void 0:i[V];if(o&&o.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(d(n,i)&&(void 0!==n||l(e.t,t)))return!0;j(e),R(e)}return e.o[t]===n&&(void 0!==n||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return void 0!==$(e.t,t)||t in e.t?(e.R[t]=!1,j(e),R(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=f(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){r(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){r(12)}},K={};s(J,(function(e,t){K[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),K.deleteProperty=function(e,t){return K.set.call(this,e,t,void 0)},K.set=function(e,t,n){return J.set.call(this,e[0],t,n,e[0])};var ee=new(function(){function e(e){var t=this;this.O=q,this.D=!0,this.produce=function(e,n,i){if("function"==typeof e&&"function"!=typeof n){var s=n;n=e;var a=t;return function(e){var t=this;void 0===e&&(e=s);for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return a.produce(e,(function(e){var r;return(r=n).call.apply(r,[t,e].concat(i))}))}}var l;if("function"!=typeof n&&r(6),void 0!==i&&"function"!=typeof i&&r(7),o(e)){var c=O(t),u=N(t,e,void 0),d=!0;try{l=n(u),d=!1}finally{d?w(c):k(c)}return"undefined"!=typeof Promise&&l instanceof Promise?l.then((function(e){return x(c,i),A(e,c)}),(function(e){throw w(c),e})):(x(c,i),A(l,c))}if(!e||"object"!=typeof e){if(void 0===(l=n(e))&&(l=e),l===G&&(l=void 0),t.D&&g(l,!0),i){var h=[],p=[];y("Patches").M(e,l,h,p),i(h,p)}return l}r(21,e)},this.produceWithPatches=function(e,n){if("function"==typeof e)return function(n){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(i))}))};var r,i,o=t.produce(e,n,(function(e,t){r=e,i=t}));return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(e){return[e,r,i]})):[o,r,i]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){o(e)||r(8),i(e)&&(e=D(e));var t=O(this),n=N(this,e,void 0);return n[V].C=!0,k(t),n},t.finishDraft=function(e,t){var n=(e&&e[V]).A;return x(n,t),A(void 0,n)},t.setAutoFreeze=function(e){this.D=e},t.setUseProxies=function(e){e&&!q&&r(20),this.O=e},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var o=y("Patches").$;return i(e)?o(e,t):this.produce(e,(function(e){return o(e,t)}))},e}()),te=ee.produce;ee.produceWithPatches.bind(ee),ee.setAutoFreeze.bind(ee),ee.setUseProxies.bind(ee),ee.applyPatches.bind(ee),ee.createDraft.bind(ee),ee.finishDraft.bind(ee);t.b=te},function(e,t,n){var r;r=e=>(()=>{var t={"./node_modules/css-mediaquery/index.js":
|
||
/*!**********************************************!*\
|
||
!*** ./node_modules/css-mediaquery/index.js ***!
|
||
\**********************************************/(e,t)=>{"use strict";t.match=function(e,t){return a(e).some((function(e){var n=e.inverse,r="all"===e.type||t.type===e.type;if(r&&n||!r&&!n)return!1;var i=e.expressions.every((function(e){var n=e.feature,r=e.modifier,i=e.value,o=t[n];if(!o)return!1;switch(n){case"orientation":case"scan":return o.toLowerCase()===i.toLowerCase();case"width":case"height":case"device-width":case"device-height":i=u(i),o=u(o);break;case"resolution":i=c(i),o=c(o);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":i=l(i),o=l(o);break;case"grid":case"color":case"color-index":case"monochrome":i=parseInt(i,10)||1,o=parseInt(o,10)||0}switch(r){case"min":return o>=i;case"max":return o<=i;default:return o===i}}));return i&&!n||!i&&n}))},t.parse=a;var n=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,r=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,i=/^(?:(min|max)-)?(.+)/,o=/(em|rem|px|cm|mm|in|pt|pc)?$/,s=/(dpi|dpcm|dppx)?$/;function a(e){return e.split(",").map((function(e){var t=(e=e.trim()).match(n),o=t[1],s=t[2],a=t[3]||"",l={};return l.inverse=!!o&&"not"===o.toLowerCase(),l.type=s?s.toLowerCase():"all",a=a.match(/\([^\)]+\)/g)||[],l.expressions=a.map((function(e){var t=e.match(r),n=t[1].toLowerCase().match(i);return{modifier:n[1],feature:n[2],value:t[2]}})),l}))}function l(e){var t,n=Number(e);return n||(n=(t=e.match(/^(\d+)\s*\/\s*(\d+)$/))[1]/t[2]),n}function c(e){var t=parseFloat(e);switch(String(e).match(s)[1]){case"dpcm":return t/2.54;case"dppx":return 96*t;default:return t}}function u(e){var t=parseFloat(e);switch(String(e).match(o)[1]){case"em":case"rem":return 16*t;case"cm":return 96*t/2.54;case"mm":return 96*t/2.54/10;case"in":return 96*t;case"pt":return 72*t;case"pc":return 72*t/12;default:return t}}},"./node_modules/hyphenate-style-name/index.js":
|
||
/*!****************************************************!*\
|
||
!*** ./node_modules/hyphenate-style-name/index.js ***!
|
||
\****************************************************/(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=/[A-Z]/g,i=/^ms-/,o={};function s(e){return"-"+e.toLowerCase()}const a=function(e){if(o.hasOwnProperty(e))return o[e];var t=e.replace(r,s);return o[e]=i.test(t)?"-"+t:t}},"./node_modules/matchmediaquery/index.js":
|
||
/*!***********************************************!*\
|
||
!*** ./node_modules/matchmediaquery/index.js ***!
|
||
\***********************************************/(e,t,n)=>{"use strict";var r=n(/*! css-mediaquery */"./node_modules/css-mediaquery/index.js").match,i="undefined"!=typeof window?window.matchMedia:null;function o(e,t,n){var o=this;if(i&&!n){var s=i.call(window,e);this.matches=s.matches,this.media=s.media,s.addListener(a)}else this.matches=r(e,t),this.media=e;function a(e){o.matches=e.matches,o.media=e.media}this.addListener=function(e){s&&s.addListener(e)},this.removeListener=function(e){s&&s.removeListener(e)},this.dispose=function(){s&&s.removeListener(a)}}e.exports=function(e,t,n){return new o(e,t,n)}},"./node_modules/object-assign/index.js":
|
||
/*!*********************************************!*\
|
||
!*** ./node_modules/object-assign/index.js ***!
|
||
\*********************************************/e=>{"use strict";
|
||
/*
|
||
object-assign
|
||
(c) Sindre Sorhus
|
||
@license MIT
|
||
*/var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var s,a,l=i(e),c=1;c<arguments.length;c++){for(var u in s=Object(arguments[c]))n.call(s,u)&&(l[u]=s[u]);if(t){a=t(s);for(var d=0;d<a.length;d++)r.call(s,a[d])&&(l[a[d]]=s[a[d]])}}return l}},"./node_modules/prop-types/checkPropTypes.js":
|
||
/*!***************************************************!*\
|
||
!*** ./node_modules/prop-types/checkPropTypes.js ***!
|
||
\***************************************************/(e,t,n)=>{"use strict";var r=function(){},i=n(/*! ./lib/ReactPropTypesSecret */"./node_modules/prop-types/lib/ReactPropTypesSecret.js"),o={},s=n(/*! ./lib/has */"./node_modules/prop-types/lib/has.js");function a(e,t,n,a,l){for(var c in e)if(s(e,c)){var u;try{if("function"!=typeof e[c]){var d=Error((a||"React class")+": "+n+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}u=e[c](t,c,a,n,null,i)}catch(e){u=e}if(!u||u instanceof Error||r((a||"React class")+": type specification of "+n+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in o)){o[u.message]=!0;var h=l?l():"";r("Failed "+n+" type: "+u.message+(null!=h?h:""))}}}r=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}},a.resetWarningCache=function(){o={}},e.exports=a},"./node_modules/prop-types/factoryWithTypeCheckers.js":
|
||
/*!************************************************************!*\
|
||
!*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***!
|
||
\************************************************************/(e,t,n)=>{"use strict";var r=n(/*! react-is */"./node_modules/react-is/index.js"),i=n(/*! object-assign */"./node_modules/object-assign/index.js"),o=n(/*! ./lib/ReactPropTypesSecret */"./node_modules/prop-types/lib/ReactPropTypesSecret.js"),s=n(/*! ./lib/has */"./node_modules/prop-types/lib/has.js"),a=n(/*! ./checkPropTypes */"./node_modules/prop-types/checkPropTypes.js"),l=function(){};function c(){return null}l=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}},e.exports=function(e,t){var n="function"==typeof Symbol&&Symbol.iterator,u={array:f("array"),bigint:f("bigint"),bool:f("boolean"),func:f("function"),number:f("number"),object:f("object"),string:f("string"),symbol:f("symbol"),any:p(c),arrayOf:function(e){return p((function(t,n,r,i,s){if("function"!=typeof e)return new h("Property `"+s+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a))return new h("Invalid "+i+" `"+s+"` of type `"+b(a)+"` supplied to `"+r+"`, expected an array.");for(var l=0;l<a.length;l++){var c=e(a,l,r,i,s+"["+l+"]",o);if(c instanceof Error)return c}return null}))},element:p((function(t,n,r,i,o){var s=t[n];return e(s)?null:new h("Invalid "+i+" `"+o+"` of type `"+b(s)+"` supplied to `"+r+"`, expected a single ReactElement.")})),elementType:p((function(e,t,n,i,o){var s=e[t];return r.isValidElementType(s)?null:new h("Invalid "+i+" `"+o+"` of type `"+b(s)+"` supplied to `"+n+"`, expected a single ReactElement type.")})),instanceOf:function(e){return p((function(t,n,r,i,o){if(!(t[n]instanceof e)){var s=e.name||"<<anonymous>>";return new h("Invalid "+i+" `"+o+"` of type `"+(((a=t[n]).constructor&&a.constructor.name?a.constructor.name:"<<anonymous>>")+"` supplied to `")+r+"`, expected instance of `"+s+"`.")}var a;return null}))},node:p((function(e,t,n,r,i){return g(e[t])?null:new h("Invalid "+r+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return p((function(t,n,r,i,a){if("function"!=typeof e)return new h("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var l=t[n],c=b(l);if("object"!==c)return new h("Invalid "+i+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected an object.");for(var u in l)if(s(l,u)){var d=e(l,u,r,i,a+"."+u,o);if(d instanceof Error)return d}return null}))},oneOf:function(e){if(!Array.isArray(e))return l(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),c;function t(t,n,r,i,o){for(var s=t[n],a=0;a<e.length;a++)if(d(s,e[a]))return null;var l=JSON.stringify(e,(function(e,t){return"symbol"===v(t)?String(t):t}));return new h("Invalid "+i+" `"+o+"` of value `"+String(s)+"` supplied to `"+r+"`, expected one of "+l+".")}return p(t)},oneOfType:function(e){if(!Array.isArray(e))return l("Invalid argument supplied to oneOfType, expected an instance of array."),c;for(var t=0;t<e.length;t++){var n=e[t];if("function"!=typeof n)return l("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+y(n)+" at index "+t+"."),c}return p((function(t,n,r,i,a){for(var l=[],c=0;c<e.length;c++){var u=(0,e[c])(t,n,r,i,a,o);if(null==u)return null;u.data&&s(u.data,"expectedType")&&l.push(u.data.expectedType)}return new h("Invalid "+i+" `"+a+"` supplied to `"+r+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return p((function(t,n,r,i,s){var a=t[n],l=b(a);if("object"!==l)return new h("Invalid "+i+" `"+s+"` of type `"+l+"` supplied to `"+r+"`, expected `object`.");for(var c in e){var u=e[c];if("function"!=typeof u)return m(r,i,s,c,v(u));var d=u(a,c,r,i,s+"."+c,o);if(d)return d}return null}))},exact:function(e){return p((function(t,n,r,a,l){var c=t[n],u=b(c);if("object"!==u)return new h("Invalid "+a+" `"+l+"` of type `"+u+"` supplied to `"+r+"`, expected `object`.");var d=i({},t[n],e);for(var p in d){var f=e[p];if(s(e,p)&&"function"!=typeof f)return m(r,a,l,p,v(f));if(!f)return new h("Invalid "+a+" `"+l+"` key `"+p+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var g=f(c,p,r,a,l+"."+p,o);if(g)return g}return null}))}};function d(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function h(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function p(e){var n={},r=0;function i(i,s,a,c,u,d,p){if(c=c||"<<anonymous>>",d=d||a,p!==o){if(t){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}if("undefined"!=typeof console){var m=c+":"+a;!n[m]&&r<3&&(l("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[m]=!0,r++)}}return null==s[a]?i?null===s[a]?new h("The "+u+" `"+d+"` is marked as required in `"+c+"`, but its value is `null`."):new h("The "+u+" `"+d+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(s,a,c,u,d)}var s=i.bind(null,!1);return s.isRequired=i.bind(null,!0),s}function f(e){return p((function(t,n,r,i,o,s){var a=t[n];return b(a)!==e?new h("Invalid "+i+" `"+o+"` of type `"+v(a)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function m(e,t,n,r,i){return new h((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function g(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(g);if(null===t||e(t))return!0;var r=function(e){var t=e&&(n&&e[n]||e["@@iterator"]);if("function"==typeof t)return t}(t);if(!r)return!1;var i,o=r.call(t);if(r!==t.entries){for(;!(i=o.next()).done;)if(!g(i.value))return!1}else for(;!(i=o.next()).done;){var s=i.value;if(s&&!g(s[1]))return!1}return!0;default:return!1}}function b(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function v(e){if(null==e)return""+e;var t=b(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function y(e){var t=v(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return h.prototype=Error.prototype,u.checkPropTypes=a,u.resetWarningCache=a.resetWarningCache,u.PropTypes=u,u}},"./node_modules/prop-types/index.js":
|
||
/*!******************************************!*\
|
||
!*** ./node_modules/prop-types/index.js ***!
|
||
\******************************************/(e,t,n)=>{var r=n(/*! react-is */"./node_modules/react-is/index.js");e.exports=n(/*! ./factoryWithTypeCheckers */"./node_modules/prop-types/factoryWithTypeCheckers.js")(r.isElement,!0)},"./node_modules/prop-types/lib/ReactPropTypesSecret.js":
|
||
/*!*************************************************************!*\
|
||
!*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
|
||
\*************************************************************/e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},"./node_modules/prop-types/lib/has.js":
|
||
/*!********************************************!*\
|
||
!*** ./node_modules/prop-types/lib/has.js ***!
|
||
\********************************************/e=>{e.exports=Function.call.bind(Object.prototype.hasOwnProperty)},"./node_modules/react-is/cjs/react-is.development.js":
|
||
/*!***********************************************************!*\
|
||
!*** ./node_modules/react-is/cjs/react-is.development.js ***!
|
||
\***********************************************************/(e,t)=>{"use strict";
|
||
/** @license React v16.13.1
|
||
* react-is.development.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/!function(){var e="function"==typeof Symbol&&Symbol.for,n=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function S(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:var p=e.type;switch(p){case c:case u:case i:case s:case o:case h:return p;default:var g=p&&p.$$typeof;switch(g){case l:case d:case m:case f:case a:return g;default:return t}}case r:return t}}}var _=c,x=u,w=l,k=a,O=n,E=d,A=i,T=m,C=f,M=r,$=s,P=o,R=h,j=!1;function N(e){return S(e)===u}t.AsyncMode=_,t.ConcurrentMode=x,t.ContextConsumer=w,t.ContextProvider=k,t.Element=O,t.ForwardRef=E,t.Fragment=A,t.Lazy=T,t.Memo=C,t.Portal=M,t.Profiler=$,t.StrictMode=P,t.Suspense=R,t.isAsyncMode=function(e){return j||(j=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),N(e)||S(e)===c},t.isConcurrentMode=N,t.isContextConsumer=function(e){return S(e)===l},t.isContextProvider=function(e){return S(e)===a},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return S(e)===d},t.isFragment=function(e){return S(e)===i},t.isLazy=function(e){return S(e)===m},t.isMemo=function(e){return S(e)===f},t.isPortal=function(e){return S(e)===r},t.isProfiler=function(e){return S(e)===s},t.isStrictMode=function(e){return S(e)===o},t.isSuspense=function(e){return S(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===u||e===s||e===o||e===h||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===f||e.$$typeof===a||e.$$typeof===l||e.$$typeof===d||e.$$typeof===b||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},t.typeOf=S}()},"./node_modules/react-is/index.js":
|
||
/*!****************************************!*\
|
||
!*** ./node_modules/react-is/index.js ***!
|
||
\****************************************/(e,t,n)=>{"use strict";e.exports=n(/*! ./cjs/react-is.development.js */"./node_modules/react-is/cjs/react-is.development.js")},"./node_modules/shallow-equal/dist/index.esm.js":
|
||
/*!******************************************************!*\
|
||
!*** ./node_modules/shallow-equal/dist/index.esm.js ***!
|
||
\******************************************************/(e,t,n)=>{"use strict";function r(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=Object.keys(e),r=Object.keys(t),i=n.length;if(r.length!==i)return!1;for(var o=0;o<i;o++){var s=n[o];if(e[s]!==t[s]||!Object.prototype.hasOwnProperty.call(t,s))return!1}return!0}function i(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=e.length;if(t.length!==n)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}n.r(t),n.d(t,{shallowEqualArrays:()=>i,shallowEqualObjects:()=>r})},"./src/Component.ts":
|
||
/*!**************************!*\
|
||
!*** ./src/Component.ts ***!
|
||
\**************************/function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=i(n(/*! ./useMediaQuery */"./src/useMediaQuery.ts"));t.default=function(e){var t=e.children,n=e.device,i=e.onChange,s=r(e,["children","device","onChange"]),a=(0,o.default)(s,n,i);return"function"==typeof t?t(a):a?t:null}},"./src/Context.ts":
|
||
/*!************************!*\
|
||
!*** ./src/Context.ts ***!
|
||
\************************/(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(0,n(/*! react */"react").createContext)(void 0);t.default=r},"./src/index.ts":
|
||
/*!**********************!*\
|
||
!*** ./src/index.ts ***!
|
||
\**********************/function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Context=t.toQuery=t.useMediaQuery=t.default=void 0;var i=r(n(/*! ./useMediaQuery */"./src/useMediaQuery.ts"));t.useMediaQuery=i.default;var o=r(n(/*! ./Component */"./src/Component.ts"));t.default=o.default;var s=r(n(/*! ./toQuery */"./src/toQuery.ts"));t.toQuery=s.default;var a=r(n(/*! ./Context */"./src/Context.ts"));t.Context=a.default},"./src/mediaQuery.ts":
|
||
/*!***************************!*\
|
||
!*** ./src/mediaQuery.ts ***!
|
||
\***************************/function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(n(/*! prop-types */"./node_modules/prop-types/index.js")),a=s.default.oneOfType([s.default.string,s.default.number]),l={all:s.default.bool,grid:s.default.bool,aural:s.default.bool,braille:s.default.bool,handheld:s.default.bool,print:s.default.bool,projection:s.default.bool,screen:s.default.bool,tty:s.default.bool,tv:s.default.bool,embossed:s.default.bool},c={orientation:s.default.oneOf(["portrait","landscape"]),scan:s.default.oneOf(["progressive","interlace"]),aspectRatio:s.default.string,deviceAspectRatio:s.default.string,height:a,deviceHeight:a,width:a,deviceWidth:a,color:s.default.bool,colorIndex:s.default.bool,monochrome:s.default.bool,resolution:a,type:Object.keys(l)},u=i(c,["type"]),d=r({minAspectRatio:s.default.string,maxAspectRatio:s.default.string,minDeviceAspectRatio:s.default.string,maxDeviceAspectRatio:s.default.string,minHeight:a,maxHeight:a,minDeviceHeight:a,maxDeviceHeight:a,minWidth:a,maxWidth:a,minDeviceWidth:a,maxDeviceWidth:a,minColor:s.default.number,maxColor:s.default.number,minColorIndex:s.default.number,maxColorIndex:s.default.number,minMonochrome:s.default.number,maxMonochrome:s.default.number,minResolution:a,maxResolution:a},u),h=r(r({},l),d);t.default={all:h,types:l,matchers:c,features:d}},"./src/toQuery.ts":
|
||
/*!************************!*\
|
||
!*** ./src/toQuery.ts ***!
|
||
\************************/function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(/*! hyphenate-style-name */"./node_modules/hyphenate-style-name/index.js")),o=r(n(/*! ./mediaQuery */"./src/mediaQuery.ts"));t.default=function(e){var t=[];return Object.keys(o.default.all).forEach((function(n){var r=e[n];null!=r&&t.push(function(e,t){var n=(0,i.default)(e);return"number"==typeof t&&(t="".concat(t,"px")),!0===t?n:!1===t?"not ".concat(n):"(".concat(n,": ").concat(t,")")}(n,r))})),t.join(" and ")}},"./src/useMediaQuery.ts":
|
||
/*!******************************!*\
|
||
!*** ./src/useMediaQuery.ts ***!
|
||
\******************************/function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(/*! react */"react"),o=r(n(/*! matchmediaquery */"./node_modules/matchmediaquery/index.js")),s=r(n(/*! hyphenate-style-name */"./node_modules/hyphenate-style-name/index.js")),a=n(/*! shallow-equal */"./node_modules/shallow-equal/dist/index.esm.js"),l=r(n(/*! ./toQuery */"./src/toQuery.ts")),c=r(n(/*! ./Context */"./src/Context.ts")),u=function(e){if(e)return Object.keys(e).reduce((function(t,n){return t[(0,s.default)(n)]=e[n],t}),{})},d=function(){var e=(0,i.useRef)(!1);return(0,i.useEffect)((function(){e.current=!0}),[]),e.current},h=function(e){var t=function(){return function(e){return e.query||(0,l.default)(e)}(e)},n=(0,i.useState)(t),r=n[0],o=n[1];return(0,i.useEffect)((function(){var e=t();r!==e&&o(e)}),[e]),r};t.default=function(e,t,n){var r=function(e){var t=(0,i.useContext)(c.default),n=function(){return u(e)||u(t)},r=(0,i.useState)(n),o=r[0],s=r[1];return(0,i.useEffect)((function(){var e=n();(0,a.shallowEqualObjects)(o,e)||s(e)}),[e,t]),o}(t),s=h(e);if(!s)throw new Error("Invalid or missing MediaQuery!");var l=function(e,t){var n=function(){return(0,o.default)(e,t||{},!!t)},r=(0,i.useState)(n),s=r[0],a=r[1],l=d();return(0,i.useEffect)((function(){if(l){var e=n();return a(e),function(){e&&e.dispose()}}}),[e,t]),s}(s,r),p=function(e){var t=(0,i.useState)(e.matches),n=t[0],r=t[1];return(0,i.useEffect)((function(){var t=function(e){r(e.matches)};return e.addListener(t),r(e.matches),function(){e.removeListener(t)}}),[e]),n}(l),f=d();return(0,i.useEffect)((function(){f&&n&&n(p)}),[p]),(0,i.useEffect)((function(){return function(){l&&l.dispose()}}),[]),p}},react:
|
||
/*!**************************************************************************************!*\
|
||
!*** external {"commonjs":"react","commonjs2":"react","amd":"react","root":"React"} ***!
|
||
\**************************************************************************************/t=>{"use strict";t.exports=e}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var o=n[e]={exports:{}};return t[e].call(o.exports,o,o.exports,r),o.exports}return r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r("./src/index.ts")})(),e.exports=r(n(0))},function(e,t,n){"use strict";e.exports=n(392)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return i}));n(7);var r=n(17);n(50);function i(e,t,n){if(!(t in e))return;const r=e[t],i=n(r);if("function"==typeof i)try{!function(e,t){const n=t.prototype||{};e.prototype=t.prototype=n,o(e,"__sentry_original__",t)}(i,r)}catch(e){}e[t]=i}function o(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}function s(e){return function e(t,n){if(Object(r.f)(t)){const r=n.get(t);if(void 0!==r)return r;const i={};n.set(t,i);for(const r of Object.keys(t))void 0!==t[r]&&(i[r]=e(t[r],n));return i}if(Array.isArray(t)){const r=n.get(t);if(void 0!==r)return r;const i=[];return n.set(t,i),t.forEach(t=>{i.push(e(t,n))}),i}return t}(e,new Map)}},,function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return h})),n.d(t,"d",(function(){return m})),n.d(t,"e",(function(){return d}));var r=n(5);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var a="function"==typeof Symbol&&Symbol.observable||"@@observable",l=function(){return Math.random().toString(36).substring(7).split("").join(".")},c={INIT:"@@redux/INIT"+l(),REPLACE:"@@redux/REPLACE"+l(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+l()}};function u(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function d(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(s(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(s(1));return n(d)(e,t)}if("function"!=typeof e)throw new Error(s(2));var i=e,o=t,l=[],h=l,p=!1;function f(){h===l&&(h=l.slice())}function m(){if(p)throw new Error(s(3));return o}function g(e){if("function"!=typeof e)throw new Error(s(4));if(p)throw new Error(s(5));var t=!0;return f(),h.push(e),function(){if(t){if(p)throw new Error(s(6));t=!1,f();var n=h.indexOf(e);h.splice(n,1),l=null}}}function b(e){if(!u(e))throw new Error(s(7));if(void 0===e.type)throw new Error(s(8));if(p)throw new Error(s(9));try{p=!0,o=i(o,e)}finally{p=!1}for(var t=l=h,n=0;n<t.length;n++){(0,t[n])()}return e}function v(e){if("function"!=typeof e)throw new Error(s(10));i=e,b({type:c.REPLACE})}function y(){var e,t=g;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(s(11));function n(){e.next&&e.next(m())}return n(),{unsubscribe:t(n)}}})[a]=function(){return this},e}return b({type:c.INIT}),(r={dispatch:b,subscribe:g,getState:m,replaceReducer:v})[a]=y,r}function h(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r];0,"function"==typeof e[i]&&(n[i]=e[i])}var o,a=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:c.INIT}))throw new Error(s(12));if(void 0===n(void 0,{type:c.PROBE_UNKNOWN_ACTION()}))throw new Error(s(13))}))}(n)}catch(e){o=e}return function(e,t){if(void 0===e&&(e={}),o)throw o;for(var r=!1,i={},l=0;l<a.length;l++){var c=a[l],u=n[c],d=e[c],h=u(d,t);if(void 0===h){t&&t.type;throw new Error(s(14))}i[c]=h,r=r||h!==d}return(r=r||a.length!==Object.keys(e).length)?i:e}}function p(e,t){return function(){return t(e.apply(this,arguments))}}function f(e,t){if("function"==typeof e)return p(e,t);if("object"!=typeof e||null===e)throw new Error(s(16));var n={};for(var r in e){var i=e[r];"function"==typeof i&&(n[r]=p(i,t))}return n}function m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function g(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error(s(15))},i={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},a=t.map((function(e){return e(i)}));return r=m.apply(void 0,a)(n.dispatch),o(o({},n),{},{dispatch:r})}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return m})),n.d(t,"d",(function(){return f})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return l})),n.d(t,"h",(function(){return u}));var r=n(8),i=n(18),o=n(51);function s(e,t,n){if(!(t in e))return;const r=e[t],i=n(r);if("function"==typeof i)try{l(i,r)}catch(e){}e[t]=i}function a(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}function l(e,t){const n=t.prototype||{};e.prototype=t.prototype=n,a(e,"__sentry_original__",t)}function c(e){return e.__sentry_original__}function u(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function d(e){if(Object(i.d)(e))return{message:e.message,name:e.name,stack:e.stack,...p(e)};if(Object(i.f)(e)){const t={type:e.type,target:h(e.target),currentTarget:h(e.currentTarget),...p(e)};return"undefined"!=typeof CustomEvent&&Object(i.g)(e,CustomEvent)&&(t.detail=e.detail),t}return e}function h(e){try{return Object(i.c)(e)?Object(r.c)(e):Object.prototype.toString.call(e)}catch(e){return"<unknown>"}}function p(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function f(e,t=40){const n=Object.keys(d(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return Object(o.d)(n[0],t);for(let e=n.length;e>0;e--){const r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:Object(o.d)(r,t)}return""}function m(e){return function e(t,n){if(Object(i.i)(t)){const r=n.get(t);if(void 0!==r)return r;const i={};n.set(t,i);for(const r of Object.keys(t))void 0!==t[r]&&(i[r]=e(t[r],n));return i}if(Array.isArray(t)){const r=n.get(t);if(void 0!==r)return r;const i=[];return n.set(t,i),t.forEach(t=>{i.push(e(t,n))}),i}return t}(e,new Map)}},function(e,t,n){var r=n(151);e.exports=function(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r=n(117),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function s(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function l(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===i.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isPlainObject:l,isUndefined:s,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:c,isStream:function(e){return a(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:u,merge:function e(){var t={};function n(n,r){l(t[r])&&l(n)?t[r]=e(t[r],n):l(n)?t[r]=e({},n):o(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)u(arguments[r],n);return t},extend:function(e,t,n){return u(t,(function(t,i){e[i]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},function(e,t,n){e.exports=n(351)()},function(e,t,n){var r=n(340);e.exports=function(e,t){if(null==e)return{};var n,i,o=r(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(128),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return A})),n.d(t,"b",(function(){return D})),n.d(t,"c",(function(){return M}));var i,o=n(19),s=(n(80),n(25)),a=n(109),l=(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},u=function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},d=Object.defineProperty,h=Object.defineProperties,p=Object.getOwnPropertyDescriptors,f=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,b=function(e,t,n){return t in e?d(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},v=function(e,t){for(var n in t||(t={}))m.call(t,n)&&b(e,n,t[n]);if(f)for(var r=0,i=f(t);r<i.length;r++){n=i[r];g.call(t,n)&&b(e,n,t[n])}return e},y=function(e,t){return h(e,p(t))},S=function(e,t,n){return new Promise((function(r,i){var o=function(e){try{a(n.next(e))}catch(e){i(e)}},s=function(e){try{a(n.throw(e))}catch(e){i(e)}},a=function(e){return e.done?r(e.value):Promise.resolve(e.value).then(o,s)};a((n=n.apply(e,t)).next())}))},_="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?s.d:s.d.apply(null,arguments)};"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function x(e){if("object"!=typeof e||null===e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;for(var n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return t===n}var w=function(e){function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=e.apply(this,n)||this;return Object.setPrototypeOf(i,t.prototype),i}return l(t,e),Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.prototype.concat.apply(this,t)},t.prototype.prepend=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return 1===e.length&&Array.isArray(e[0])?new(t.bind.apply(t,u([void 0],e[0].concat(this)))):new(t.bind.apply(t,u([void 0],e.concat(this))))},t}(Array),k=function(e){function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=e.apply(this,n)||this;return Object.setPrototypeOf(i,t.prototype),i}return l(t,e),Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.prototype.concat.apply(this,t)},t.prototype.prepend=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return 1===e.length&&Array.isArray(e[0])?new(t.bind.apply(t,u([void 0],e[0].concat(this)))):new(t.bind.apply(t,u([void 0],e.concat(this))))},t}(Array);function O(e){return Object(o.e)(e)?Object(o.b)(e,(function(){})):e}function E(){return function(e){return function(e){void 0===e&&(e={});var t=e.thunk,n=void 0===t||t,r=(e.immutableCheck,e.serializableCheck,new w);n&&("boolean"==typeof n?r.push(a.a):r.push(a.a.withExtraArgument(n.extraArgument)));0;return r}(e)}}function A(e){var t,n=E(),r=e||{},i=r.reducer,o=void 0===i?void 0:i,a=r.middleware,l=void 0===a?n():a,c=r.devTools,d=void 0===c||c,h=r.preloadedState,p=void 0===h?void 0:h,f=r.enhancers,m=void 0===f?void 0:f;if("function"==typeof o)t=o;else{if(!x(o))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');t=Object(s.c)(o)}var g=l;"function"==typeof g&&(g=g(n));var b=s.a.apply(void 0,g),y=s.d;d&&(y=_(v({trace:!1},"object"==typeof d&&d)));var S=new k(b),w=S;Array.isArray(m)?w=u([b],m):"function"==typeof m&&(w=m(S));var O=y.apply(void 0,w);return Object(s.e)(t,p,O)}function T(e,t){function n(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return v(v({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:n[0]}}return n.toString=function(){return""+e},n.type=e,n.match=function(t){return t.type===e},n}function C(e){var t,n={},r=[],i={addCase:function(e,t){var r="string"==typeof e?e:e.type;if(r in n)throw new Error("addCase cannot be called with two reducers for the same action type");return n[r]=t,i},addMatcher:function(e,t){return r.push({matcher:e,reducer:t}),i},addDefaultCase:function(e){return t=e,i}};return e(i),[n,r,t]}function M(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");var n,r="function"==typeof e.initialState?e.initialState:O(e.initialState),i=e.reducers||{},s=Object.keys(i),a={},l={},c={};function d(){var t="function"==typeof e.extraReducers?C(e.extraReducers):[e.extraReducers],n=t[0],i=void 0===n?{}:n,s=t[1],a=void 0===s?[]:s,c=t[2],d=void 0===c?void 0:c,h=v(v({},i),l);return function(e,t,n,r){void 0===n&&(n=[]);var i,s="function"==typeof t?C(t):[t,n,r],a=s[0],l=s[1],c=s[2];if("function"==typeof e)i=function(){return O(e())};else{var d=O(e);i=function(){return d}}function h(e,t){void 0===e&&(e=i());var n=u([a[t.type]],l.filter((function(e){return(0,e.matcher)(t)})).map((function(e){return e.reducer})));return 0===n.filter((function(e){return!!e})).length&&(n=[c]),n.reduce((function(e,n){if(n){var r;if(Object(o.d)(e))return void 0===(r=n(e,t))?e:r;if(Object(o.e)(e))return Object(o.b)(e,(function(e){return n(e,t)}));if(void 0===(r=n(e,t))){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}return e}),e)}return h.getInitialState=i,h}(r,(function(e){for(var t in h)e.addCase(t,h[t]);for(var n=0,r=a;n<r.length;n++){var i=r[n];e.addMatcher(i.matcher,i.reducer)}d&&e.addDefaultCase(d)}))}return s.forEach((function(e){var n,r,o=i[e],s=t+"/"+e;"reducer"in o?(n=o.reducer,r=o.prepare):n=o,a[e]=n,l[s]=n,c[e]=r?T(s,r):T(s)})),{name:t,reducer:function(e,t){return n||(n=d()),n(e,t)},actions:c,caseReducers:a,getInitialState:function(){return n||(n=d()),n.getInitialState()}}}var $=function(e){void 0===e&&(e=21);for(var t="",n=e;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},P=["name","message","stack","code"],R=function(e,t){this.payload=e,this.meta=t},j=function(e,t){this.payload=e,this.meta=t},N=function(e){if("object"==typeof e&&null!==e){for(var t={},n=0,r=P;n<r.length;n++){var i=r[n];"string"==typeof e[i]&&(t[i]=e[i])}return t}return{message:String(e)}},D=function(){function e(e,t,n){var r=T(e+"/fulfilled",(function(e,t,n,r){return{payload:e,meta:y(v({},r||{}),{arg:n,requestId:t,requestStatus:"fulfilled"})}})),i=T(e+"/pending",(function(e,t,n){return{payload:void 0,meta:y(v({},n||{}),{arg:t,requestId:e,requestStatus:"pending"})}})),o=T(e+"/rejected",(function(e,t,r,i,o){return{payload:i,error:(n&&n.serializeError||N)(e||"Rejected"),meta:y(v({},o||{}),{arg:r,requestId:t,rejectedWithValue:!!i,requestStatus:"rejected",aborted:"AbortError"===(null==e?void 0:e.name),condition:"ConditionError"===(null==e?void 0:e.name)})}})),s="undefined"!=typeof AbortController?AbortController:function(){function e(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return e.prototype.abort=function(){0},e}();return Object.assign((function(e){return function(a,l,u){var d,h=(null==n?void 0:n.idGenerator)?n.idGenerator(e):$(),p=new s;function f(e){d=e,p.abort()}var m=function(){return S(this,null,(function(){var s,m,g,b,v,y;return c(this,(function(c){switch(c.label){case 0:return c.trys.push([0,4,,5]),b=null==(s=null==n?void 0:n.condition)?void 0:s.call(n,e,{getState:l,extra:u}),null===(S=b)||"object"!=typeof S||"function"!=typeof S.then?[3,2]:[4,b];case 1:b=c.sent(),c.label=2;case 2:if(!1===b||p.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return!0,v=new Promise((function(e,t){return p.signal.addEventListener("abort",(function(){return t({name:"AbortError",message:d||"Aborted"})}))})),a(i(h,e,null==(m=null==n?void 0:n.getPendingMeta)?void 0:m.call(n,{requestId:h,arg:e},{getState:l,extra:u}))),[4,Promise.race([v,Promise.resolve(t(e,{dispatch:a,getState:l,extra:u,requestId:h,signal:p.signal,abort:f,rejectWithValue:function(e,t){return new R(e,t)},fulfillWithValue:function(e,t){return new j(e,t)}})).then((function(t){if(t instanceof R)throw t;return t instanceof j?r(t.payload,h,e,t.meta):r(t,h,e)}))])];case 3:return g=c.sent(),[3,5];case 4:return y=c.sent(),g=y instanceof R?o(null,h,e,y.payload,y.meta):o(y,h,e),[3,5];case 5:return n&&!n.dispatchConditionRejection&&o.match(g)&&g.meta.condition||a(g),[2,g]}var S}))}))}();return Object.assign(m,{abort:f,requestId:h,arg:e,unwrap:function(){return m.then(I)}})}}),{pending:i,rejected:o,fulfilled:r,typePrefix:e})}return e.withTypes=function(){return e},e}();function I(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}Object.assign;var L="listenerMiddleware";T(L+"/add"),T(L+"/removeAll"),T(L+"/remove");"function"==typeof queueMicrotask&&queueMicrotask.bind("undefined"!=typeof window?window:void 0!==r?r:globalThis);var B,z=function(e){return function(t){setTimeout(t,e)}};"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:z(10);Object(o.c)()}).call(this,n(36),n(28))},function(e,t){function n(t){return e.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var l,c=[],u=!1,d=-1;function h(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&p())}function p(){if(!u){var e=a(h);u=!0;for(var t=c.length;t;){for(l=c,c=[];++d<t;)l&&l[d].run();d=-1,t=c.length}l=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function m(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new f(e,t)),1!==c.length||u||a(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,':root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.sense-hat{inline-size:100%;flex:1;display:flex;flex-flow:column}.sense-hat-model{display:flex;flex-flow:column;max-block-size:50%;min-block-size:200px;flex:1;padding-block-end:calc(.5rem*var(--scale-factor, 1))}.sense-hat-model canvas{cursor:grab}.sense-hat-model-orientation{display:flex;align-items:center;justify-content:center;margin:0 calc(.5rem*var(--scale-factor, 1))}.sense-hat-model-orientation__spacing{flex:1}.sense-hat-model-orientation__values{flex:10;display:flex;margin:0 calc(.5rem*var(--scale-factor, 1))}.sense-hat-model-orientation__reading{font-size:calc(.75rem*var(--scale-factor, 1));line-height:calc(1rem*var(--scale-factor, 1));flex:1;text-transform:uppercase;font-weight:700;margin:0 calc(.5rem*var(--scale-factor, 1))}.sense-hat-model-orientation__reset-btn{flex:1;display:flex;margin-inline-start:auto}.sense-hat-model-orientation__reset-btn svg{padding:calc(.5rem*var(--scale-factor, 1));border-radius:5px;fill:#000}.sense-hat-model-orientation__reset-btn button{cursor:pointer}.sense-hat-controls{padding:calc(.5rem*var(--scale-factor, 1));display:flex;flex-flow:column}.sense-hat-controls-heading{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));font-weight:400;margin-block:0 calc(.5rem*var(--scale-factor, 1));margin-inline:0}.sense-hat-controls-panel{flex:1;display:flex;flex-flow:column}.sense-hat-controls-panel__control{display:flex;flex-flow:column;align-items:center;text-align:center;padding-block:calc(.25rem*var(--scale-factor, 1)) calc(.5rem*var(--scale-factor, 1));padding-inline:calc(.5rem*var(--scale-factor, 1));box-sizing:border-box;border-radius:5px;inline-size:32%;justify-content:space-between}.sense-hat-controls-panel__control-reading{inline-size:100%;border-radius:5px;margin-block-start:calc(.25rem*var(--scale-factor, 1));padding:calc(.25rem*var(--scale-factor, 1));box-sizing:border-box;display:flex;align-items:center;justify-content:center;font-family:source-code-pro,Menlo,Monaco,Consolas,"Courier New",monospace}.sense-hat-controls-panel__control-reading-timer{margin-block-start:0;padding:calc(.5rem*var(--scale-factor, 1)) 0;inline-size:100%}.sense-hat-controls-panel__control-toggle{border-radius:5px;inline-size:100%;flex:1;box-sizing:border-box;display:flex;align-items:center;justify-content:center}.sense-hat-controls-panel__control-toggle label{flex:1}.sense-hat-controls-panel__control-input{cursor:pointer;inline-size:85px;transform:rotate(270deg)}.sense-hat-controls-panel__control input[type=color]{border-radius:5px;flex:1;inline-size:100%;padding:calc(.25rem*var(--scale-factor, 1)) calc(1.5rem*var(--scale-factor, 1))}.sense-hat-controls-panel__control-name{font-variant:small-caps;text-transform:lowercase;margin:calc(.25rem*var(--scale-factor, 1)) 0}.sense-hat-controls-panel__control-value{margin-inline-start:calc(.25rem*var(--scale-factor, 1))}.sense-hat-controls-panel__control-last{margin-block-start:calc(.5rem*var(--scale-factor, 1));flex-flow:row;inline-size:100%;align-items:inherit;justify-content:space-between}.sense-hat-controls-panel__sliders{display:flex;justify-content:space-between}.sense-hat-controls-panel__sliders .sense-hat-controls-panel__control{min-block-size:175px}.sense-hat-controls-panel__container{display:flex;flex-flow:column;align-items:center;inline-size:32%}.sense-hat-controls-panel__container .sense-hat-controls-panel__control-name,.sense-hat-controls-panel__container input{cursor:pointer}.sense-hat-controls-panel__container-timer .sense-hat-controls-panel__control-name{cursor:default}.--dark .sense-hat{background-color:#2a2b32}.--dark .sense-hat-controls{border-block-start:7px solid #17181c}.--dark .sense-hat-controls-panel__control{box-shadow:inset 0 0 calc(3rem*var(--scale-factor, 1)) #33353d;background-color:#33353d}.--dark .sense-hat-controls-panel__control-reading{background-color:#2a2b32;border:1px solid #636674}.--dark .sense-hat-controls-panel__control input[type=color]{background-color:#2a2b32;border:1px solid #636674}.--dark .sense-hat-controls-panel__control-toggle{background-color:#2a2b32;border:1px solid #636674}.--dark .sense-hat-controls-panel__control-toggle .react-toggle-thumb{border:1px solid #fff;background-color:#fff}.--dark .sense-hat-model{background-color:#002b3f}.--dark .sense-hat-model-orientation{background-color:#002b3f;color:#fff}.--dark .sense-hat-model-orientation__reset-btn svg{background-color:#fff}.--light .sense-hat{background-color:#fff}.--light .sense-hat-controls{border-block-start:5px solid #e3e4e8}.--light .sense-hat-controls-panel__control{box-shadow:inset 0 0 calc(3rem*var(--scale-factor, 1)) #e3e4e8;background-color:#f1f2f3}.--light .sense-hat-controls-panel__control-reading{background-color:#e3e4e8;border:2px solid #babcc5}.--light .sense-hat-controls-panel__control input[type=color]{background-color:#fff;border:2px solid #babcc5}.--light .sense-hat-controls-panel__control-toggle{background-color:#fff;border:2px solid #babcc5}.--light .sense-hat-controls-panel__control-toggle .react-toggle-thumb{border:1px solid #e3e4e8;background-color:#e3e4e8}.--light .sense-hat-model{background-color:#002b3f}.--light .sense-hat-model-orientation{background-color:#002b3f;color:#fff}.--light .sense-hat-model-orientation__reset-btn svg{background-color:#fff}',""])},function(e,t,n){"use strict";(function(e){function r(e){return e&&e.Math==Math?e:void 0}n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));const i="object"==typeof globalThis&&r(globalThis)||"object"==typeof window&&r(window)||"object"==typeof self&&r(self)||"object"==typeof e&&r(e)||function(){return this}()||{};function o(e,t,n){const r=n||i,o=r.__SENTRY__=r.__SENTRY__||{};return o[e]||(o[e]=t())}}).call(this,n(28))},function(e,t,n){"use strict";(function(e){function r(e){return e&&e.Math==Math?e:void 0}n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));const i="object"==typeof globalThis&&r(globalThis)||"object"==typeof window&&r(window)||"object"==typeof self&&r(self)||"object"==typeof e&&r(e)||function(){return this}()||{};function o(e,t,n){const r=n||i,o=r.__SENTRY__=r.__SENTRY__||{};return o[e]||(o[e]=t())}}).call(this,n(28))},function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a}));var i=n(165);function o(){return!Object(i.a)()&&"[object process]"===Object.prototype.toString.call(void 0!==e?e:0)}function s(e,t){return e.require(t)}function a(e){let t;try{t=s(r,e)}catch(e){}try{const{cwd:n}=s(r,"process");t=s(r,`${n()}/node_modules/${e}`)}catch(e){}return t}}).call(this,n(36),n(64)(e))},function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return l}));var r=n(61),i=n(194),o=n(60),s=n(11),a=n(22);class l{__init(){this.spans=[]}constructor(e=1e3){l.prototype.__init.call(this),this._maxlen=e}add(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e)}}class c{__init2(){this.traceId=Object(i.b)()}__init3(){this.spanId=Object(i.b)().substring(16)}__init4(){this.startTimestamp=Object(o.d)()}__init5(){this.tags={}}__init6(){this.data={}}constructor(e){if(c.prototype.__init2.call(this),c.prototype.__init3.call(this),c.prototype.__init4.call(this),c.prototype.__init5.call(this),c.prototype.__init6.call(this),!e)return this;e.traceId&&(this.traceId=e.traceId),e.spanId&&(this.spanId=e.spanId),e.parentSpanId&&(this.parentSpanId=e.parentSpanId),"sampled"in e&&(this.sampled=e.sampled),e.op&&(this.op=e.op),e.description&&(this.description=e.description),e.data&&(this.data=e.data),e.tags&&(this.tags=e.tags),e.status&&(this.status=e.status),e.startTimestamp&&(this.startTimestamp=e.startTimestamp),e.endTimestamp&&(this.endTimestamp=e.endTimestamp)}startChild(e){const t=new c({...e,parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId});if(t.spanRecorder=this.spanRecorder,t.spanRecorder&&t.spanRecorder.add(t),t.transaction=this.transaction,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&t.transaction){const n=`[Tracing] Starting '${e&&e.op||"< unknown op >"}' span on transaction '${t.transaction.name||"< unknown name >"}' (${t.transaction.spanId}).`;t.transaction.metadata.spanMetadata[t.spanId]={logMessage:n},s.c.log(n)}return t}setTag(e,t){return this.tags={...this.tags,[e]:t},this}setData(e,t){return this.data={...this.data,[e]:t},this}setStatus(e){return this.status=e,this}setHttpStatus(e){this.setTag("http.status_code",String(e));const t=function(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}(e);return"unknown_error"!==t&&this.setStatus(t),this}isSuccess(){return"ok"===this.status}finish(e){if(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this.transaction&&this.transaction.spanId!==this.spanId){const{logMessage:e}=this.transaction.metadata.spanMetadata[this.spanId];e&&s.c.log(e.replace("Starting","Finishing"))}this.endTimestamp="number"==typeof e?e:Object(o.d)()}toTraceparent(){let e="";return void 0!==this.sampled&&(e=this.sampled?"-1":"-0"),`${this.traceId}-${this.spanId}${e}`}toContext(){return Object(a.b)({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(e){return this.data=Object(r.a)(e.data,()=>({})),this.description=e.description,this.endTimestamp=e.endTimestamp,this.op=e.op,this.parentSpanId=e.parentSpanId,this.sampled=e.sampled,this.spanId=Object(r.a)(e.spanId,()=>this.spanId),this.startTimestamp=Object(r.a)(e.startTimestamp,()=>this.startTimestamp),this.status=e.status,this.tags=Object(r.a)(e.tags,()=>({})),this.traceId=Object(r.a)(e.traceId,()=>this.traceId),this}getTraceContext(){return Object(a.b)({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return Object(a.b)({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId})}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return d}));var r=n(60),i=n(11),o=n(42),s=n(54);const a=1e3,l=3e4,c=5e3;class u extends o.b{constructor(e,t,n,r){super(r),this._pushActivity=e,this._popActivity=t,this.transactionSpanId=n}add(e){e.spanId!==this.transactionSpanId&&(e.finish=t=>{e.endTimestamp="number"==typeof t?t:Object(r.d)(),this._popActivity(e.spanId)},void 0===e.endTimestamp&&this._pushActivity(e.spanId)),super.add(e)}}class d extends s.a{__init(){this.activities={}}__init2(){this._heartbeatCounter=0}__init3(){this._finished=!1}__init4(){this._beforeFinishCallbacks=[]}constructor(e,t,n=a,r=l,o=c,s=!1){super(e,t),this._idleHub=t,this._idleTimeout=n,this._finalTimeout=r,this._heartbeatInterval=o,this._onScope=s,d.prototype.__init.call(this),d.prototype.__init2.call(this),d.prototype.__init3.call(this),d.prototype.__init4.call(this),s&&(h(t),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.log("Setting idle transaction on scope. Span ID: "+this.spanId),t.configureScope(e=>e.setSpan(this))),this._startIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this.finish())},this._finalTimeout)}finish(e=Object(r.d)()){if(this._finished=!0,this.activities={},this.spanRecorder){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.log("[Tracing] finishing IdleTransaction",new Date(1e3*e).toISOString(),this.op);for(const t of this._beforeFinishCallbacks)t(this,e);this.spanRecorder.spans=this.spanRecorder.spans.filter(t=>{if(t.spanId===this.spanId)return!0;t.endTimestamp||(t.endTimestamp=e,t.setStatus("cancelled"),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(t,void 0,2)));const n=t.startTimestamp<e;return n||("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.log("[Tracing] discarding Span since it happened after Transaction was finished",JSON.stringify(t,void 0,2)),n}),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.log("[Tracing] flushing IdleTransaction")}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.log("[Tracing] No active IdleTransaction");return this._onScope&&h(this._idleHub),super.finish(e)}registerBeforeFinishCallback(e){this._beforeFinishCallbacks.push(e)}initSpanRecorder(e){if(!this.spanRecorder){const t=e=>{this._finished||this._pushActivity(e)},n=e=>{this._finished||this._popActivity(e)};this.spanRecorder=new u(t,n,this.spanId,e),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}_cancelIdleTimeout(){this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0)}_startIdleTimeout(e){this._cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{this._finished||0!==Object.keys(this.activities).length||this.finish(e)},this._idleTimeout)}_pushActivity(e){this._cancelIdleTimeout(),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.log("[Tracing] pushActivity: "+e),this.activities[e]=!0,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(e){if(this.activities[e]&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.log("[Tracing] popActivity "+e),delete this.activities[e],("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.log("[Tracing] new activities count",Object.keys(this.activities).length)),0===Object.keys(this.activities).length){const e=Object(r.d)()+this._idleTimeout/1e3;this._startIdleTimeout(e)}}_beat(){if(this._finished)return;const e=Object.keys(this.activities).join("");e===this._prevHeartbeatString?this._heartbeatCounter+=1:this._heartbeatCounter=1,this._prevHeartbeatString=e,this._heartbeatCounter>=3?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this.finish()):this._pingHeartbeat()}_pingHeartbeat(){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.log("pinging Heartbeat -> current counter: "+this._heartbeatCounter),setTimeout(()=>{this._beat()},this._heartbeatInterval)}}function h(e){const t=e.getScope();if(t){t.getTransaction()&&t.setSpan(void 0)}}},function(e,t,n){"use strict";e.exports=n(348)},function(e,t,n){var r=n(245),i=n(250);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";n.d(t,"a",(function(){return $}));var r=n(9),i=n(15),o=n(0),s=n(1),a=n(110),l=n.n(a);function c(e){let{debounce:t,scroll:n,polyfill:r,offsetSize:i}=void 0===e?{debounce:0,scroll:!1,offsetSize:!1}:e;const s=r||("undefined"==typeof window?class{}:window.ResizeObserver);if(!s)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[a,c]=Object(o.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),u=Object(o.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a}),h=t?"number"==typeof t?t:t.scroll:null,p=t?"number"==typeof t?t:t.resize:null,f=Object(o.useRef)(!1);Object(o.useEffect)(()=>(f.current=!0,()=>{f.current=!1}));const[m,g,b]=Object(o.useMemo)(()=>{const e=()=>{if(!u.current.element)return;const{left:e,top:t,width:n,height:r,bottom:o,right:s,x:a,y:l}=u.current.element.getBoundingClientRect(),h={left:e,top:t,width:n,height:r,bottom:o,right:s,x:a,y:l};u.current.element instanceof HTMLElement&&i&&(h.height=u.current.element.offsetHeight,h.width=u.current.element.offsetWidth),Object.freeze(h),f.current&&!d(u.current.lastBounds,h)&&c(u.current.lastBounds=h)};return[e,p?l()(e,p):e,h?l()(e,h):e]},[c,i,h,p]);function v(){u.current.scrollContainers&&(u.current.scrollContainers.forEach(e=>e.removeEventListener("scroll",b,!0)),u.current.scrollContainers=null),u.current.resizeObserver&&(u.current.resizeObserver.disconnect(),u.current.resizeObserver=null)}function y(){u.current.element&&(u.current.resizeObserver=new s(b),u.current.resizeObserver.observe(u.current.element),n&&u.current.scrollContainers&&u.current.scrollContainers.forEach(e=>e.addEventListener("scroll",b,{capture:!0,passive:!0})))}var S,_,x;return S=b,_=Boolean(n),Object(o.useEffect)(()=>{if(_){const e=S;return window.addEventListener("scroll",e,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",e,!0)}}},[S,_]),x=g,Object(o.useEffect)(()=>{const e=x;return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[x]),Object(o.useEffect)(()=>{v(),y()},[n,b,g]),Object(o.useEffect)(()=>v,[]),[e=>{e&&e!==u.current.element&&(v(),u.current.element=e,u.current.scrollContainers=function e(t){const n=[];if(!t||t===document.body)return n;const{overflow:r,overflowX:i,overflowY:o}=window.getComputedStyle(t);[r,i,o].some(e=>"auto"===e||"scroll"===e)&&n.push(t);return[...n,...e(t.parentElement)]}(e),y())},a,m]}const u=["x","y","top","bottom","left","right","width","height"],d=(e,t)=>u.every(n=>e[n]===t[n]);var h=Object.defineProperty,p=Object.defineProperties,f=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,v=(e,t,n)=>t in e?h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,y=(e,t)=>{for(var n in t||(t={}))g.call(t,n)&&v(e,n,t[n]);if(m)for(var n of m(t))b.call(t,n)&&v(e,n,t[n]);return e};function S(e,t,n){if(!e)return;if(!0===n(e))return e;let r=t?e.return:e.child;for(;r;){const e=S(r,t,n);if(e)return e;r=t?null:r.sibling}}function _(e){try{return Object.defineProperties(e,{_currentRenderer:{get:()=>null,set(){}},_currentRenderer2:{get:()=>null,set(){}}})}catch(t){return e}}const x=_(o.createContext(null));class w extends o.Component{render(){return o.createElement(x.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:k,ReactCurrentDispatcher:O}=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(){const e=o.useContext(x);if(null===e)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const t=o.useId();return o.useMemo(()=>{for(const n of[null==k?void 0:k.current,e,null==e?void 0:e.alternate]){if(!n)continue;const e=S(n,!1,e=>{let n=e.memoizedState;for(;n;){if(n.memoizedState===t)return!0;n=n.next}});if(e)return e}},[e,t])}function A(){const e=function(){var e,t;const n=E(),[r]=o.useState(()=>new Map);r.clear();let i=n;for(;i;){const n=null==(e=i.type)?void 0:e._context;n&&n!==x&&!r.has(n)&&r.set(n,null==(t=null==O?void 0:O.current)?void 0:t.readContext(_(n))),i=i.return}return r}();return o.useMemo(()=>Array.from(e.keys()).reduce((t,n)=>r=>{return o.createElement(t,null,o.createElement(n.Provider,(i=y({},r),s={value:e.get(n)},p(i,f(s)))));var i,s},e=>o.createElement(w,y({},e))),[e])}n(44),n(107),n(70);const T={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function C(e){const{handlePointer:t}=Object(r.g)(e);return{priority:1,enabled:!0,compute(e,t,n){t.pointer.set(e.offsetX/t.size.width*2-1,-e.offsetY/t.size.height*2+1),t.raycaster.setFromCamera(t.pointer,t.camera)},connected:void 0,handlers:Object.keys(T).reduce((e,n)=>({...e,[n]:t(n)}),{}),update:()=>{var t;const{events:n,internal:r}=e.getState();null!=(t=r.lastEvent)&&t.current&&n.handlers&&n.handlers.onPointerMove(r.lastEvent.current)},connect:t=>{var n;const{set:r,events:i}=e.getState();null==i.disconnect||i.disconnect(),r(e=>({events:{...e.events,connected:t}})),Object.entries(null!=(n=i.handlers)?n:[]).forEach(([e,n])=>{const[r,i]=T[e];t.addEventListener(r,n,{passive:i})})},disconnect:()=>{const{set:t,events:n}=e.getState();var r;n.connected&&(Object.entries(null!=(r=n.handlers)?r:[]).forEach(([e,t])=>{if(n&&n.connected instanceof HTMLElement){const[r]=T[e];n.connected.removeEventListener(r,t)}}),t(e=>({events:{...e.events,connected:void 0}})))}}}const M=o.forwardRef((function({children:e,fallback:t,resize:n,style:a,gl:l,events:u=C,eventSource:d,eventPrefix:h,shadows:p,linear:f,flat:m,legacy:g,orthographic:b,frameloop:v,dpr:y,performance:S,raycaster:_,camera:x,onPointerMissed:w,onCreated:k,...O},E){o.useMemo(()=>Object(r.i)(s),[]);const T=A(),[M,$]=c({scroll:!0,debounce:{scroll:50,resize:0},...n}),P=o.useRef(null),R=o.useRef(null);o.useImperativeHandle(E,()=>P.current);const j=Object(r.l)(w),[N,D]=o.useState(!1),[I,L]=o.useState(!1);if(N)throw N;if(I)throw I;const B=o.useRef(null);Object(r.e)(()=>{const t=P.current;$.width>0&&$.height>0&&t&&(B.current||(B.current=Object(r.f)(t)),B.current.configure({gl:l,events:u,shadows:p,linear:f,flat:m,legacy:g,orthographic:b,frameloop:v,dpr:y,performance:S,raycaster:_,camera:x,size:$,onPointerMissed:(...e)=>null==j.current?void 0:j.current(...e),onCreated:e=>{null==e.events.connect||e.events.connect(d?Object(r.j)(d)?d.current:d:R.current),h&&e.setEvents({compute:(e,t)=>{const n=e[h+"X"],r=e[h+"Y"];t.pointer.set(n/t.size.width*2-1,-r/t.size.height*2+1),t.raycaster.setFromCamera(t.pointer,t.camera)}}),null==k||k(e)}}),B.current.render(o.createElement(T,null,o.createElement(r.d,{set:L},o.createElement(o.Suspense,{fallback:o.createElement(r.b,{set:D})},e)))))}),o.useEffect(()=>{const e=P.current;if(e)return()=>Object(r.h)(e)},[]);const z=d?"none":"auto";return o.createElement("div",Object(i.a)({ref:R,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:z,...a}},O),o.createElement("div",{ref:M,style:{width:"100%",height:"100%"}},o.createElement("canvas",{ref:P,style:{display:"block"}},t)))})),$=o.forwardRef((function(e,t){return o.createElement(w,null,o.createElement(M,Object(i.a)({},e,{ref:t})))}))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return f}));var r=n(62),i=n(11),o=n(17),s=n(40),a=n(166),l=n(43),c=n(54),u=n(10);function d(){const e=this.getScope();if(e){const t=e.getSpan();if(t)return{"sentry-trace":t.toTraceparent()}}return{}}function h(e,t,n){if(!Object(u.b)(t))return e.sampled=!1,e;if(void 0!==e.sampled)return e.setMetadata({sampleRate:Number(e.sampled)}),e;let r;return"function"==typeof t.tracesSampler?(r=t.tracesSampler(n),e.setMetadata({sampleRate:Number(r)})):void 0!==n.parentSampled?r=n.parentSampled:(r=t.tracesSampleRate,e.setMetadata({sampleRate:Number(r)})),function(e){if(Object(o.e)(e)||"number"!=typeof e&&"boolean"!=typeof e)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1;if(e<0||e>1)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${e}.`),!1;return!0}(r)?r?(e.sampled=Math.random()<r,e.sampled?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.log(`[Tracing] starting ${e.op} transaction - ${e.name}`),e):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`),e)):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.log("[Tracing] Discarding transaction because "+("function"==typeof t.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),e.sampled=!1,e):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.warn("[Tracing] Discarding transaction because of invalid sample rate."),e.sampled=!1,e)}function p(e,t){const n=this.getClient(),r=n&&n.getOptions()||{};let i=new c.a(e,this);return i=h(i,r,{parentSampled:e.parentSampled,transactionContext:e,...t}),i.sampled&&i.initSpanRecorder(r._experiments&&r._experiments.maxSpans),i}function f(e,t,n,r,i,o,s){const a=e.getClient(),c=a&&a.getOptions()||{};let u=new l.d(t,e,n,r,s,i);return u=h(u,c,{parentSampled:t.parentSampled,transactionContext:t,...o}),u.sampled&&u.initSpanRecorder(c._experiments&&c._experiments.maxSpans),u}function m(){!function(){const e=Object(r.b)();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=p),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=d))}(),Object(s.b)()&&function(){const t=Object(r.b)();if(!t.__SENTRY__)return;const n={mongodb:()=>new(Object(s.a)(e,"./integrations/node/mongo").Mongo),mongoose:()=>new(Object(s.a)(e,"./integrations/node/mongo").Mongo)({mongoose:!0}),mysql:()=>new(Object(s.a)(e,"./integrations/node/mysql").Mysql),pg:()=>new(Object(s.a)(e,"./integrations/node/postgres").Postgres)},i=Object.keys(n).filter(e=>!!Object(s.c)(e)).map(e=>{try{return n[e]()}catch(e){return}}).filter(e=>e);i.length>0&&(t.__SENTRY__.integrations=[...t.__SENTRY__.integrations||[],...i])}(),Object(a.a)()}}).call(this,n(64)(e))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i}));var r=n(17);function i(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:e.substr(0,t)+"..."}function o(e,t){let n=e;const r=n.length;if(r<=150)return n;t>r&&(t=r);let i=Math.max(t-60,0);i<5&&(i=0);let o=Math.min(i+140,r);return o>r-5&&(o=r),o===r&&(i=Math.max(o-140,0)),n=n.slice(i,o),i>0&&(n="'{snip} "+n),o<r&&(n+=" {snip}"),n}function s(e,t){return!!Object(r.i)(e)&&(Object(r.h)(t)?t.test(e):"string"==typeof t&&-1!==e.indexOf(t))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return i}));var r=n(18);function i(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:e.substr(0,t)+"..."}function o(e,t){let n=e;const r=n.length;if(r<=150)return n;t>r&&(t=r);let i=Math.max(t-60,0);i<5&&(i=0);let o=Math.min(i+140,r);return o>r-5&&(o=r),o===r&&(i=Math.max(o-140,0)),n=n.slice(i,o),i>0&&(n="'{snip} "+n),o<r&&(n+=" {snip}"),n}function s(e,t){if(!Array.isArray(e))return"";const n=[];for(let t=0;t<e.length;t++){const r=e[t];try{n.push(String(r))}catch(e){n.push("[value cannot be serialized]")}}return n.join(t)}function a(e,t){return!!Object(r.l)(e)&&(Object(r.k)(t)?t.test(e):"string"==typeof t&&-1!==e.indexOf(t))}},function(e,t,n){var r=n(66),i=n(246),o=n(247),s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?i(e):o(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.belongToTypes=t.isValidObject=t.isArrayObject=t.validateOptions=t.DefaultOption=void 0,t.DefaultOption={recursive:!1,recursiveInArray:!1,keepTypesOnRecursion:[]},t.validateOptions=function(e){return void 0===e&&(e=t.DefaultOption),null==e.recursive?e=t.DefaultOption:null==e.recursiveInArray&&(e.recursiveInArray=!1),e},t.isArrayObject=function(e){return null!=e&&Array.isArray(e)},t.isValidObject=function(e){return null!=e&&"object"==typeof e&&!Array.isArray(e)},t.belongToTypes=function(e,t){return(t||[]).some((function(t){return e instanceof t}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(61),i=n(62),o=n(60),s=n(11),a=n(22),l=n(42);class c extends l.a{__init(){this._measurements={}}__init2(){this._frozenDynamicSamplingContext=void 0}constructor(e,t){super(e),c.prototype.__init.call(this),c.prototype.__init2.call(this),this._hub=t||Object(i.a)(),this._name=e.name||"",this.metadata={source:"custom",...e.metadata,spanMetadata:{},changes:[],propagations:0},this._trimEnd=e.trimEnd,this.transaction=this;const n=this.metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(e){this.setName(e)}setName(e,t="custom"){e===this.name&&t===this.metadata.source||this.metadata.changes.push({source:this.metadata.source,timestamp:Object(o.c)(),propagations:this.metadata.propagations}),this._name=e,this.metadata.source=t}initSpanRecorder(e=1e3){this.spanRecorder||(this.spanRecorder=new l.b(e)),this.spanRecorder.add(this)}setMeasurement(e,t,n=""){this._measurements[e]={value:t,unit:n}}setMetadata(e){this.metadata={...this.metadata,...e}}finish(e){if(void 0!==this.endTimestamp)return;if(this.name||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.c.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this.name="<unlabeled transaction>"),super.finish(e),!0!==this.sampled){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.c.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled.");const e=this._hub.getClient();return void(e&&e.recordDroppedEvent("sample_rate","transaction"))}const t=this.spanRecorder?this.spanRecorder.spans.filter(e=>e!==this&&e.endTimestamp):[];this._trimEnd&&t.length>0&&(this.endTimestamp=t.reduce((e,t)=>e.endTimestamp&&t.endTimestamp?e.endTimestamp>t.endTimestamp?e:t:e).endTimestamp);const n=this.metadata,r={contexts:{trace:this.getTraceContext()},spans:t,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...n,dynamicSamplingContext:this.getDynamicSamplingContext()},...n.source&&{transaction_info:{source:n.source,changes:n.changes,propagations:n.propagations}}};return Object.keys(this._measurements).length>0&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.c.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),r.measurements=this._measurements),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.c.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`),this._hub.captureEvent(r)}toContext(){const e=super.toContext();return Object(a.b)({...e,name:this.name,trimEnd:this._trimEnd})}updateWithContext(e){return super.updateWithContext(e),this.name=Object(r.a)(e.name,()=>""),this._trimEnd=e.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext;const e=this._hub||Object(i.a)(),t=e&&e.getClient();if(!t)return{};const{environment:n,release:r}=t.getOptions()||{},{publicKey:o}=t.getDsn()||{},s=this.metadata.sampleRate,l=void 0!==s?s.toString():void 0,c=e.getScope(),{segment:u}=c&&c.getUser()||{},d=this.metadata.source,h=d&&"url"!==d?this.name:void 0;return Object(a.b)({environment:n,release:r,transaction:h,user_segment:u,public_key:o,trace_id:this.traceId,sample_rate:l})}}},function(e,t,n){var r=n(341),i=n(342),o=n(343),s=n(345);e.exports=function(e,t){return r(e)||i(e,t)||o(e,t)||s()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";var r=n(207),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function l(e){return r.isMemo(e)?s:a[e.$$typeof]||i}a[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[r.Memo]=s;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(f){var i=p(n);i&&i!==f&&e(t,i,r)}var s=u(n);d&&(s=s.concat(d(n)));for(var a=l(t),m=l(n),g=0;g<s.length;++g){var b=s[g];if(!(o[b]||r&&r[b]||m&&m[b]||a&&a[b])){var v=h(n,b);try{c(t,b,v)}catch(e){}}}}return t}},function(e,t,n){"use strict";
|
||
/*!
|
||
* cookie
|
||
* Copyright(c) 2012-2014 Roman Shtylman
|
||
* Copyright(c) 2015 Douglas Christopher Wilson
|
||
* MIT Licensed
|
||
*/t.parse=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var n={},i=t||{},o=e.split(";"),a=i.decode||r,l=0;l<o.length;l++){var c=o[l],u=c.indexOf("=");if(!(u<0)){var d=c.substring(0,u).trim();if(null==n[d]){var h=c.substring(u+1,c.length).trim();'"'===h[0]&&(h=h.slice(1,-1)),n[d]=s(h,a)}}}return n},t.serialize=function(e,t,n){var r=n||{},s=r.encode||i;if("function"!=typeof s)throw new TypeError("option encode is invalid");if(!o.test(e))throw new TypeError("argument name is invalid");var a=s(t);if(a&&!o.test(a))throw new TypeError("argument val is invalid");var l=e+"="+a;if(null!=r.maxAge){var c=r.maxAge-0;if(isNaN(c)||!isFinite(c))throw new TypeError("option maxAge is invalid");l+="; Max-Age="+Math.floor(c)}if(r.domain){if(!o.test(r.domain))throw new TypeError("option domain is invalid");l+="; Domain="+r.domain}if(r.path){if(!o.test(r.path))throw new TypeError("option path is invalid");l+="; Path="+r.path}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");l+="; Expires="+r.expires.toUTCString()}r.httpOnly&&(l+="; HttpOnly");r.secure&&(l+="; Secure");if(r.sameSite){switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"strict":l+="; SameSite=Strict";break;case"none":l+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return l};var r=decodeURIComponent,i=encodeURIComponent,o=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function s(e,t){try{return t(e)}catch(t){return e}}},function(e,t,n){"use strict";e.exports=function(e,t){return t||(t={}),"string"!=typeof(e=e&&e.__esModule?e.default:e)?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(24),i=n(35);function o(e,t){if(t&&("object"===Object(r.a)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Object(i.a)(e)}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return u}));var r=n(7),i=n(40);const o={nowSeconds:()=>Date.now()/1e3};const s=Object(i.b)()?function(){try{return Object(i.a)(e,"perf_hooks").performance}catch(e){return}}():function(){const{performance:e}=r.a;if(!e||!e.now)return;return{now:()=>e.now(),timeOrigin:Date.now()-e.now()}}(),a=void 0===s?o:{nowSeconds:()=>(s.timeOrigin+s.now())/1e3},l=o.nowSeconds.bind(o),c=a.nowSeconds.bind(a),u=c;let d;const h=(()=>{const{performance:e}=r.a;if(!e||!e.now)return void(d="none");const t=e.now(),n=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+t-n):36e5,o=i<36e5,s=e.timing&&e.timing.navigationStart,a="number"==typeof s?Math.abs(s+t-n):36e5;return o||a<36e5?i<=a?(d="timeOrigin",e.timeOrigin):(d="navigationStart",s):(d="dateNow",n)})()}).call(this,n(64)(e))},function(e,t,n){"use strict";function r(e,t){return null!=e?e:t()}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return S})),n.d(t,"b",(function(){return v}));var r,i=n(194),o=n(60),s=n(11),a=n(38),l=n(40),c=n(17);!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(r||(r={}));class u{__init(){this._state=r.PENDING}__init2(){this._handlers=[]}constructor(e){u.prototype.__init.call(this),u.prototype.__init2.call(this),u.prototype.__init3.call(this),u.prototype.__init4.call(this),u.prototype.__init5.call(this),u.prototype.__init6.call(this);try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new u((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new u((t,n)=>{let r,i;return this.then(t=>{i=!1,r=t,e&&e()},t=>{i=!0,r=t,e&&e()}).then(()=>{i?n(r):t(r)})})}__init3(){this._resolve=e=>{this._setResult(r.RESOLVED,e)}}__init4(){this._reject=e=>{this._setResult(r.REJECTED,e)}}__init5(){this._setResult=(e,t)=>{this._state===r.PENDING&&(Object(c.j)(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init6(){this._executeHandlers=()=>{if(this._state===r.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(this._state===r.RESOLVED&&e[1](this._value),this._state===r.REJECTED&&e[2](this._value),e[0]=!0)})}}}var d=n(22);function h(e){const t=Object(o.c)(),n={sid:Object(i.b)(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return Object(d.b)({sid:""+e.sid,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?""+e.did:void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&p(n,e),n}function p(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Object(o.c)(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:Object(i.b)()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=""+t.did),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}class f{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(e){const t=new f;return e&&(t._breadcrumbs=[...e._breadcrumbs],t._tags={...e._tags},t._extra={...e._extra},t._contexts={...e._contexts},t._user=e._user,t._level=e._level,t._span=e._span,t._session=e._session,t._transactionName=e._transactionName,t._fingerprint=e._fingerprint,t._eventProcessors=[...e._eventProcessors],t._requestSession=e._requestSession,t._attachments=[...e._attachments]),t}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&p(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts={...this._contexts,[e]:t},this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if("function"==typeof e){const t=e(this);return t instanceof f?t:this}return e instanceof f?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession)):Object(c.f)(e)&&(e=e,this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:Object(o.b)(),...e};return this._breadcrumbs=[...this._breadcrumbs,r].slice(-n),this._notifyScopeListeners(),this}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,t={}){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};const t=this._span.transaction&&this._span.transaction.name;t&&(e.tags={transaction:t,...e.tags})}return this._applyFingerprint(e),e.breadcrumbs=[...e.breadcrumbs||[],...this._breadcrumbs],e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...m(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}_notifyEventProcessors(e,t,n,r=0){return new u((i,o)=>{const a=e[r];if(null===t||"function"!=typeof a)i(t);else{const l=a({...t},n);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.id&&null===l&&s.c.log(`Event processor "${a.id}" dropped event`),Object(c.j)(l)?l.then(t=>this._notifyEventProcessors(e,t,n,r+1).then(i)).then(null,o):this._notifyEventProcessors(e,l,n,r+1).then(i).then(null,o)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?Object(i.a)(e.fingerprint):[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}}function m(){return Object(a.b)("globalEventProcessors",()=>[])}const g=100;class b{__init(){this._stack=[{}]}constructor(e,t=new f,n=4){this._version=n,b.prototype.__init.call(this),this.getStackTop().scope=t,e&&this.bindClient(e)}isOlderThan(e){return this._version<e}bindClient(e){this.getStackTop().client=e,e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){const e=f.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(e){const t=this.pushScope();try{e(t)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){const n=this._lastEventId=t&&t.event_id?t.event_id:Object(i.b)(),r=new Error("Sentry syntheticException");return this._withClient((i,o)=>{i.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},o)}),n}captureMessage(e,t,n){const r=this._lastEventId=n&&n.event_id?n.event_id:Object(i.b)(),o=new Error(e);return this._withClient((i,s)=>{i.captureMessage(e,t,{originalException:e,syntheticException:o,...n,event_id:r},s)}),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:Object(i.b)();return"transaction"!==e.type&&(this._lastEventId=n),this._withClient((r,i)=>{r.captureEvent(e,{...t,event_id:n},i)}),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:n,client:r}=this.getStackTop();if(!n||!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:a=g}=r.getOptions&&r.getOptions()||{};if(a<=0)return;const l={timestamp:Object(o.b)(),...e},c=i?Object(s.b)(()=>i(l,t)):l;null!==c&&n.addBreadcrumb(c,a)}setUser(e){const t=this.getScope();t&&t.setUser(e)}setTags(e){const t=this.getScope();t&&t.setTags(e)}setExtras(e){const t=this.getScope();t&&t.setExtras(e)}setTag(e,t){const n=this.getScope();n&&n.setTag(e,t)}setExtra(e,t){const n=this.getScope();n&&n.setExtra(e,t)}setContext(e,t){const n=this.getScope();n&&n.setContext(e,t)}configureScope(e){const{scope:t,client:n}=this.getStackTop();t&&n&&e(t)}run(e){const t=y(this);try{e(this)}finally{y(t)}}getIntegration(e){const t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(t){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.c.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){return this._callExtensionMethod("startTransaction",e,t)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){const e=this.getStackTop(),t=e&&e.scope,n=t&&t.getSession();n&&function(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),p(e,n)}(n),this._sendSessionUpdate(),t&&t.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:r,environment:i}=n&&n.getOptions()||{},{userAgent:o}=a.a.navigator||{},s=h({release:r,environment:i,...t&&{user:t.getUser()},...o&&{userAgent:o},...e});if(t){const e=t.getSession&&t.getSession();e&&"ok"===e.status&&p(e,{status:"exited"}),this.endSession(),t.setSession(s)}return s}shouldSendDefaultPii(){const e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop();if(!e)return;const n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}_withClient(e){const{scope:t,client:n}=this.getStackTop();n&&e(n,t)}_callExtensionMethod(e,...t){const n=v().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[e])return n.extensions[e].apply(this,t);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.c.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function v(){return a.a.__SENTRY__=a.a.__SENTRY__||{extensions:{},hub:void 0},a.a}function y(e){const t=v(),n=x(t);return w(t,e),n}function S(){const e=v();return _(e)&&!x(e).isOlderThan(4)||w(e,new b),Object(l.b)()?function(e){try{const t=v().__SENTRY__,n=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active;if(!n)return x(e);if(!_(n)||x(n).isOlderThan(4)){const t=x(e).getStackTop();w(n,new b(t.client,f.clone(t.scope)))}return x(n)}catch(t){return x(e)}}(e):x(e)}function _(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function x(e){return Object(a.b)("hub",()=>new b,e)}function w(e,t){if(!e)return!1;return(e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0}},,function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var r=n(32).Symbol;e.exports=r},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(131),i=n(132);e.exports=function(e,t,n,o){var s=!n;n||(n={});for(var a=-1,l=t.length;++a<l;){var c=t[a],u=o?o(n[c],e[c],c,n,e):void 0;void 0===u&&(u=e[c]),s?i(n,c,u):r(n,c,u)}return n}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE"}(r||(r={})),t.default=r},function(e,t,n){"use strict";e.exports=n(350)},function(e,t,n){"use strict";function r(e,t,n=((e,t)=>e===t)){if(e===t)return!0;if(!e||!t)return!1;const r=e.length;if(t.length!==r)return!1;for(let i=0;i<r;i++)if(!n(e[i],t[i]))return!1;return!0}n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return s}));const i=[];function o(e,t,n=!1,o={}){for(const e of i)if(r(t,e.keys,e.equal)){if(n)return;if(Object.prototype.hasOwnProperty.call(e,"error"))throw e.error;if(Object.prototype.hasOwnProperty.call(e,"response"))return e.response;if(!n)throw e.promise}const s={keys:t,equal:o.equal,promise:e(...t).then(e=>s.response=e).then(()=>{o.lifespan&&o.lifespan>0&&setTimeout(()=>{const e=i.indexOf(s);-1!==e&&i.splice(e,1)},o.lifespan)}).catch(e=>s.error=e)};if(i.push(s),!n)throw s.promise}const s=(e,t,n)=>o(e,t,!1,n),a=(e,t,n)=>{o(e,t,!0,n)},l=e=>{if(void 0===e||0===e.length)i.splice(0,i.length);else{const t=i.find(t=>r(e,t.keys,t.equal));if(t){const e=i.indexOf(t);-1!==e&&i.splice(e,1)}}}},function(e,t,n){e.exports=n(216)},function(e,t,n){"use strict";(function(t){var r=n(29),i=n(221),o=n(119),s={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var l,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==t&&"[object process]"===Object.prototype.toString.call(t))&&(l=n(120)),l),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(a(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||c.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,s=!n&&"json"===this.responseType;if(s||i&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(s){if("SyntaxError"===e.name)throw o(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){c.headers[e]=r.merge(s)})),e.exports=c}).call(this,n(36))},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){var r=n(235),i=n(236),o=n(237),s=n(238),a=n(239);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},function(e,t,n){var r=n(126);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(45)(Object,"create");e.exports=r},function(e,t,n){var r=n(259);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(103),i=function(){function e(e,t){void 0===e&&(e=null),this.parentNode=e,this.childNodes=[],Object.defineProperty(this,"range",{enumerable:!1,writable:!0,configurable:!0,value:null!=t?t:[-1,-1]})}return e.prototype.remove=function(){var e=this;if(this.parentNode){var t=this.parentNode.childNodes;this.parentNode.childNodes=t.filter((function(t){return e!==t})),this.parentNode=null}return this},Object.defineProperty(e.prototype,"innerText",{get:function(){return this.rawText},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textContent",{get:function(){return(0,r.decode)(this.rawText)},set:function(e){this.rawText=(0,r.encode)(e)},enumerable:!1,configurable:!0}),e}();t.default=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=function(e,t){return e===t};function i(e,t){var n,i,o="object"==typeof t?t:{equalityCheck:t},s=o.equalityCheck,a=void 0===s?r:s,l=o.maxSize,c=void 0===l?1:l,u=o.resultEqualityCheck,d=function(e){return function(t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var r=t.length,i=0;i<r;i++)if(!e(t[i],n[i]))return!1;return!0}}(a),h=1===c?(n=d,{get:function(e){return i&&n(i.key,e)?i.value:"NOT_FOUND"},put:function(e,t){i={key:e,value:t}},getEntries:function(){return i?[i]:[]},clear:function(){i=void 0}}):function(e,t){var n=[];function r(e){var r=n.findIndex((function(n){return t(e,n.key)}));if(r>-1){var i=n[r];return r>0&&(n.splice(r,1),n.unshift(i)),i.value}return"NOT_FOUND"}return{get:r,put:function(t,i){"NOT_FOUND"===r(t)&&(n.unshift({key:t,value:i}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(c,d);function p(){var t=h.get(arguments);if("NOT_FOUND"===t){if(t=e.apply(null,arguments),u){var n=h.getEntries(),r=n.find((function(e){return u(e.value,t)}));r&&(t=r.value)}h.put(arguments,t)}return t}return p.clearCache=function(){return h.clear()},p}function o(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"==typeof e}))){var n=t.map((function(e){return"function"==typeof e?"function "+(e.name||"unnamed")+"()":typeof e})).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return t}function s(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];var s,a=0,l={memoizeOptions:void 0},c=r.pop();if("object"==typeof c&&(l=c,c=r.pop()),"function"!=typeof c)throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof c+"]");var u=l,d=u.memoizeOptions,h=void 0===d?n:d,p=Array.isArray(h)?h:[h],f=o(r),m=e.apply(void 0,[function(){return a++,c.apply(null,arguments)}].concat(p)),g=e((function(){for(var e=[],t=f.length,n=0;n<t;n++)e.push(f[n].apply(null,arguments));return s=m.apply(null,e)}));return Object.assign(g,{resultFunc:c,memoizedResultFunc:m,dependencies:f,lastResult:function(){return s},recomputations:function(){return a},resetRecomputations:function(){return a=0}}),g};return i}var a=s(i)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);function i(e){var t,n=new Set,r=function(e,r){var i="function"==typeof e?e(t):e;if(i!==t){var o=t;t=r?i:Object.assign({},t,i),n.forEach((function(e){return e(t,o)}))}},i=function(){return t},o={setState:r,getState:i,subscribe:function(e,r,o){return r||o?function(e,r,o){void 0===r&&(r=i),void 0===o&&(o=Object.is),console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");var s=r(t);function a(){var n=r(t);if(!o(s,n)){var i=s;e(s=n,i)}}return n.add(a),function(){return n.delete(a)}}(e,r,o):(n.add(e),function(){return n.delete(e)})},destroy:function(){return n.clear()}};return t=e(r,i,o),o}var o="undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent)?r.useEffect:r.useLayoutEffect;t.default=function(e){var t="function"==typeof e?i(e):e,n=function(e,n){void 0===e&&(e=t.getState),void 0===n&&(n=Object.is);var i,s=r.useReducer((function(e){return e+1}),0)[1],a=t.getState(),l=r.useRef(a),c=r.useRef(e),u=r.useRef(n),d=r.useRef(!1),h=r.useRef();void 0===h.current&&(h.current=e(a));var p=!1;(l.current!==a||c.current!==e||u.current!==n||d.current)&&(i=e(a),p=!n(h.current,i)),o((function(){p&&(h.current=i),l.current=a,c.current=e,u.current=n,d.current=!1}));var f=r.useRef(a);o((function(){var e=function(){try{var e=t.getState(),n=c.current(e);u.current(h.current,n)||(l.current=e,h.current=n,s())}catch(e){d.current=!0,s()}},n=t.subscribe(e);return t.getState()!==f.current&&e(),n}),[]);var m=p?i:h.current;return r.useDebugValue(m),m};return Object.assign(n,t),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");var e=[n,t];return{next:function(){var t=e.length<=0;return{value:e.shift(),done:t}}}},n}},function(e,t,n){"use strict";t.a="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBkPSJNMTIgMjJDMTEuNDUgMjIgMTAuOTc5MyAyMS44MDQzIDEwLjU4OCAyMS40MTNDMTAuMTk2IDIxLjAyMSAxMCAyMC41NSAxMCAyMEgxNEMxNCAyMC41NSAxMy44MDQzIDIxLjAyMSAxMy40MTMgMjEuNDEzQzEzLjAyMSAyMS44MDQzIDEyLjU1IDIyIDEyIDIyWk04IDE5VjE3SDE2VjE5SDhaTTguMjUgMTZDNy4xIDE1LjMxNjcgNi4xODc2NyAxNC40IDUuNTEzIDEzLjI1QzQuODM3NjcgMTIuMSA0LjUgMTAuODUgNC41IDkuNUM0LjUgNy40MTY2NyA1LjIyOTMzIDUuNjQ2IDYuNjg4IDQuMTg4QzguMTQ2IDIuNzI5MzMgOS45MTY2NyAyIDEyIDJDMTQuMDgzMyAyIDE1Ljg1NCAyLjcyOTMzIDE3LjMxMiA0LjE4OEMxOC43NzA3IDUuNjQ2IDE5LjUgNy40MTY2NyAxOS41IDkuNUMxOS41IDEwLjg1IDE5LjE2MjcgMTIuMSAxOC40ODggMTMuMjVDMTcuODEyNyAxNC40IDE2LjkgMTUuMzE2NyAxNS43NSAxNkg4LjI1Wk04Ljg1IDE0SDE1LjE1QzE1LjkgMTMuNDY2NyAxNi40NzkzIDEyLjgwODMgMTYuODg4IDEyLjAyNUMxNy4yOTYgMTEuMjQxNyAxNy41IDEwLjQgMTcuNSA5LjVDMTcuNSA3Ljk2NjY3IDE2Ljk2NjcgNi42NjY2NyAxNS45IDUuNkMxNC44MzMzIDQuNTMzMzMgMTMuNTMzMyA0IDEyIDRDMTAuNDY2NyA0IDkuMTY2NjcgNC41MzMzMyA4LjEgNS42QzcuMDMzMzMgNi42NjY2NyA2LjUgNy45NjY2NyA2LjUgOS41QzYuNSAxMC40IDYuNzA0MzMgMTEuMjQxNyA3LjExMyAxMi4wMjVDNy41MjEgMTIuODA4MyA4LjEgMTMuNDY2NyA4Ljg1IDE0WiIgZmlsbD0iIzQ2QUY0QiIvPgo8L3N2Zz4K"},function(e,t,n){"use strict";t.a="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBkPSJNMTIgMjFDMTAuOTE2NyAyMSA5LjkxMjUgMjAuNzMzMyA4Ljk4NzUgMjAuMkM4LjA2MjUgMTkuNjY2NyA3LjMzMzMzIDE4LjkzMzMgNi44IDE4SDRWMTZINi4xQzYuMDUgMTUuNjY2NyA2LjAyMDgzIDE1LjMzMzMgNi4wMTI1IDE1QzYuMDA0MTcgMTQuNjY2NyA2IDE0LjMzMzMgNiAxNEg0VjEySDZDNiAxMS42NjY3IDYuMDA0MTcgMTEuMzMzMyA2LjAxMjUgMTFDNi4wMjA4MyAxMC42NjY3IDYuMDUgMTAuMzMzMyA2LjEgMTBINFY4SDYuOEM3LjAzMzMzIDcuNjE2NjcgNy4yOTU4MyA3LjI1ODMzIDcuNTg3NSA2LjkyNUM3Ljg3OTE3IDYuNTkxNjcgOC4yMTY2NyA2LjMgOC42IDYuMDVMNyA0LjRMOC40IDNMMTAuNTUgNS4xNUMxMS4wMTY3IDUgMTEuNDkxNyA0LjkyNSAxMS45NzUgNC45MjVDMTIuNDU4MyA0LjkyNSAxMi45MzMzIDUgMTMuNCA1LjE1TDE1LjYgM0wxNyA0LjRMMTUuMzUgNi4wNUMxNS43MzMzIDYuMyAxNi4wNzkyIDYuNTg3NSAxNi4zODc1IDYuOTEyNUMxNi42OTU4IDcuMjM3NSAxNi45NjY3IDcuNiAxNy4yIDhIMjBWMTBIMTcuOUMxNy45NSAxMC4zMzMzIDE3Ljk3OTIgMTAuNjY2NyAxNy45ODc1IDExQzE3Ljk5NTggMTEuMzMzMyAxOCAxMS42NjY3IDE4IDEySDIwVjE0SDE4QzE4IDE0LjMzMzMgMTcuOTk1OCAxNC42NjY3IDE3Ljk4NzUgMTVDMTcuOTc5MiAxNS4zMzMzIDE3Ljk1IDE1LjY2NjcgMTcuOSAxNkgyMFYxOEgxNy4yQzE2LjY2NjcgMTguOTMzMyAxNS45Mzc1IDE5LjY2NjcgMTUuMDEyNSAyMC4yQzE0LjA4NzUgMjAuNzMzMyAxMy4wODMzIDIxIDEyIDIxWk0xMiAxOUMxMy4xIDE5IDE0LjA0MTcgMTguNjA4MyAxNC44MjUgMTcuODI1QzE1LjYwODMgMTcuMDQxNyAxNiAxNi4xIDE2IDE1VjExQzE2IDkuOSAxNS42MDgzIDguOTU4MzMgMTQuODI1IDguMTc1QzE0LjA0MTcgNy4zOTE2NyAxMy4xIDcgMTIgN0MxMC45IDcgOS45NTgzMyA3LjM5MTY3IDkuMTc1IDguMTc1QzguMzkxNjcgOC45NTgzMyA4IDkuOSA4IDExVjE1QzggMTYuMSA4LjM5MTY3IDE3LjA0MTcgOS4xNzUgMTcuODI1QzkuOTU4MzMgMTguNjA4MyAxMC45IDE5IDEyIDE5Wk0xMCAxNkgxNFYxNEgxMFYxNlpNMTAgMTJIMTRWMTBIMTBWMTJaIiBmaWxsPSIjRjM1MTRGIi8+Cjwvc3ZnPgo="},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(418),o=(r=i)&&r.__esModule?r:{default:r};t.default=o.default,e.exports=t.default},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(24);function i(e){var t=function(e,t){if("object"!==Object(r.a)(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==Object(r.a)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Object(r.a)(t)?t:String(t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i}));function r(...e){const t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0)=>{const r=[];for(const i of e.split("\n").slice(n)){const e=i.replace(/\(error: (.*)\)/,"$1");for(const n of t){const t=n(e);if(t){r.push(t);break}}}return function(e){if(!e.length)return[];let t=e;const n=t[0].function||"",r=t[t.length-1].function||"";-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(t=t.slice(1));-1!==r.indexOf("sentryWrapped")&&(t=t.slice(0,-1));return t.slice(0,50).map(e=>({...e,filename:e.filename||t[0].filename,function:e.function||"?"})).reverse()}(r)}}function i(e){return Array.isArray(e)?r(...e):e}function o(e){try{return e&&"function"==typeof e&&e.name||"<anonymous>"}catch(e){return"<anonymous>"}}},,,function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(206),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(28))},function(e,t,n){var r=n(45)(n(32),"Map");e.exports=r},function(e,t,n){var r=n(134),i=n(271),o=n(139);e.exports=function(e){return o(e)?r(e):i(e)}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(128),i=t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,s=o&&o.exports===i&&r.process,a=function(){try{var e=o&&o.require&&o.require("util").types;return e||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a}).call(this,n(65)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(134),i=n(274),o=n(139);e.exports=function(e){return o(e)?r(e,!0):i(e)}},function(e,t,n){var r=n(279),i=n(140),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(e){return null==e?[]:(e=Object(e),r(s(e),(function(t){return o.call(e,t)})))}:i;e.exports=a},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},function(e,t,n){var r=n(138)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(282),i=n(90),o=n(283),s=n(284),a=n(285),l=n(52),c=n(129),u=c(r),d=c(i),h=c(o),p=c(s),f=c(a),m=l;(r&&"[object DataView]"!=m(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=m(new i)||o&&"[object Promise]"!=m(o.resolve())||s&&"[object Set]"!=m(new s)||a&&"[object WeakMap]"!=m(new a))&&(m=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case u:return"[object DataView]";case d:return"[object Map]";case h:return"[object Promise]";case p:return"[object Set]";case f:return"[object WeakMap]"}return t}),e.exports=m},function(e,t,n){var r=n(288);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},function(e,t,n){var r=n(47),i=n(300),o=n(301),s=n(304);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(s(e))}},function(e,t,n){var r=n(52),i=n(46);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},function(e,t,n){(function(e,r){var i;/*! https://mths.be/he v1.2.0 by @mathias | MIT license */!function(o){var s=t,a=(e&&e.exports,"object"==typeof r&&r);a.global!==a&&a.window;var l=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=/[\x01-\x7F]/g,u=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,d=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,h={"":"shy","":"zwnj","":"zwj","":"lrm","":"ic","":"it","":"af","":"rlm","":"ZeroWidthSpace","":"NoBreak","̑":"DownBreve","⃛":"tdot","⃜":"DotDot","\t":"Tab","\n":"NewLine"," ":"puncsp"," ":"MediumSpace"," ":"thinsp"," ":"hairsp"," ":"emsp13"," ":"ensp"," ":"emsp14"," ":"emsp"," ":"numsp"," ":"nbsp"," ":"ThickSpace","‾":"oline",_:"lowbar","‐":"dash","–":"ndash","—":"mdash","―":"horbar",",":"comma",";":"semi","⁏":"bsemi",":":"colon","⩴":"Colone","!":"excl","¡":"iexcl","?":"quest","¿":"iquest",".":"period","‥":"nldr","…":"mldr","·":"middot","'":"apos","‘":"lsquo","’":"rsquo","‚":"sbquo","‹":"lsaquo","›":"rsaquo",'"':"quot","“":"ldquo","”":"rdquo","„":"bdquo","«":"laquo","»":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","⌈":"lceil","⌉":"rceil","⌊":"lfloor","⌋":"rfloor","⦅":"lopar","⦆":"ropar","⦋":"lbrke","⦌":"rbrke","⦍":"lbrkslu","⦎":"rbrksld","⦏":"lbrksld","⦐":"rbrkslu","⦑":"langd","⦒":"rangd","⦓":"lparlt","⦔":"rpargt","⦕":"gtlPar","⦖":"ltrPar","⟦":"lobrk","⟧":"robrk","⟨":"lang","⟩":"rang","⟪":"Lang","⟫":"Rang","⟬":"loang","⟭":"roang","❲":"lbbrk","❳":"rbbrk","‖":"Vert","§":"sect","¶":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","‰":"permil","‱":"pertenk","†":"dagger","‡":"Dagger","•":"bull","⁃":"hybull","′":"prime","″":"Prime","‴":"tprime","⁗":"qprime","‵":"bprime","⁁":"caret","`":"grave","´":"acute","˜":"tilde","^":"Hat","¯":"macr","˘":"breve","˙":"dot","¨":"die","˚":"ring","˝":"dblac","¸":"cedil","˛":"ogon","ˆ":"circ","ˇ":"caron","°":"deg","©":"copy","®":"reg","℗":"copysr","℘":"wp","℞":"rx","℧":"mho","℩":"iiota","←":"larr","↚":"nlarr","→":"rarr","↛":"nrarr","↑":"uarr","↓":"darr","↔":"harr","↮":"nharr","↕":"varr","↖":"nwarr","↗":"nearr","↘":"searr","↙":"swarr","↝":"rarrw","↝̸":"nrarrw","↞":"Larr","↟":"Uarr","↠":"Rarr","↡":"Darr","↢":"larrtl","↣":"rarrtl","↤":"mapstoleft","↥":"mapstoup","↦":"map","↧":"mapstodown","↩":"larrhk","↪":"rarrhk","↫":"larrlp","↬":"rarrlp","↭":"harrw","↰":"lsh","↱":"rsh","↲":"ldsh","↳":"rdsh","↵":"crarr","↶":"cularr","↷":"curarr","↺":"olarr","↻":"orarr","↼":"lharu","↽":"lhard","↾":"uharr","↿":"uharl","⇀":"rharu","⇁":"rhard","⇂":"dharr","⇃":"dharl","⇄":"rlarr","⇅":"udarr","⇆":"lrarr","⇇":"llarr","⇈":"uuarr","⇉":"rrarr","⇊":"ddarr","⇋":"lrhar","⇌":"rlhar","⇐":"lArr","⇍":"nlArr","⇑":"uArr","⇒":"rArr","⇏":"nrArr","⇓":"dArr","⇔":"iff","⇎":"nhArr","⇕":"vArr","⇖":"nwArr","⇗":"neArr","⇘":"seArr","⇙":"swArr","⇚":"lAarr","⇛":"rAarr","⇝":"zigrarr","⇤":"larrb","⇥":"rarrb","⇵":"duarr","⇽":"loarr","⇾":"roarr","⇿":"hoarr","∀":"forall","∁":"comp","∂":"part","∂̸":"npart","∃":"exist","∄":"nexist","∅":"empty","∇":"Del","∈":"in","∉":"notin","∋":"ni","∌":"notni","϶":"bepsi","∏":"prod","∐":"coprod","∑":"sum","+":"plus","±":"pm","÷":"div","×":"times","<":"lt","≮":"nlt","<⃒":"nvlt","=":"equals","≠":"ne","=⃥":"bne","⩵":"Equal",">":"gt","≯":"ngt",">⃒":"nvgt","¬":"not","|":"vert","¦":"brvbar","−":"minus","∓":"mp","∔":"plusdo","⁄":"frasl","∖":"setmn","∗":"lowast","∘":"compfn","√":"Sqrt","∝":"prop","∞":"infin","∟":"angrt","∠":"ang","∠⃒":"nang","∡":"angmsd","∢":"angsph","∣":"mid","∤":"nmid","∥":"par","∦":"npar","∧":"and","∨":"or","∩":"cap","∩︀":"caps","∪":"cup","∪︀":"cups","∫":"int","∬":"Int","∭":"tint","⨌":"qint","∮":"oint","∯":"Conint","∰":"Cconint","∱":"cwint","∲":"cwconint","∳":"awconint","∴":"there4","∵":"becaus","∶":"ratio","∷":"Colon","∸":"minusd","∺":"mDDot","∻":"homtht","∼":"sim","≁":"nsim","∼⃒":"nvsim","∽":"bsim","∽̱":"race","∾":"ac","∾̳":"acE","∿":"acd","≀":"wr","≂":"esim","≂̸":"nesim","≃":"sime","≄":"nsime","≅":"cong","≇":"ncong","≆":"simne","≈":"ap","≉":"nap","≊":"ape","≋":"apid","≋̸":"napid","≌":"bcong","≍":"CupCap","≭":"NotCupCap","≍⃒":"nvap","≎":"bump","≎̸":"nbump","≏":"bumpe","≏̸":"nbumpe","≐":"doteq","≐̸":"nedot","≑":"eDot","≒":"efDot","≓":"erDot","≔":"colone","≕":"ecolon","≖":"ecir","≗":"cire","≙":"wedgeq","≚":"veeeq","≜":"trie","≟":"equest","≡":"equiv","≢":"nequiv","≡⃥":"bnequiv","≤":"le","≰":"nle","≤⃒":"nvle","≥":"ge","≱":"nge","≥⃒":"nvge","≦":"lE","≦̸":"nlE","≧":"gE","≧̸":"ngE","≨︀":"lvnE","≨":"lnE","≩":"gnE","≩︀":"gvnE","≪":"ll","≪̸":"nLtv","≪⃒":"nLt","≫":"gg","≫̸":"nGtv","≫⃒":"nGt","≬":"twixt","≲":"lsim","≴":"nlsim","≳":"gsim","≵":"ngsim","≶":"lg","≸":"ntlg","≷":"gl","≹":"ntgl","≺":"pr","⊀":"npr","≻":"sc","⊁":"nsc","≼":"prcue","⋠":"nprcue","≽":"sccue","⋡":"nsccue","≾":"prsim","≿":"scsim","≿̸":"NotSucceedsTilde","⊂":"sub","⊄":"nsub","⊂⃒":"vnsub","⊃":"sup","⊅":"nsup","⊃⃒":"vnsup","⊆":"sube","⊈":"nsube","⊇":"supe","⊉":"nsupe","⊊︀":"vsubne","⊊":"subne","⊋︀":"vsupne","⊋":"supne","⊍":"cupdot","⊎":"uplus","⊏":"sqsub","⊏̸":"NotSquareSubset","⊐":"sqsup","⊐̸":"NotSquareSuperset","⊑":"sqsube","⋢":"nsqsube","⊒":"sqsupe","⋣":"nsqsupe","⊓":"sqcap","⊓︀":"sqcaps","⊔":"sqcup","⊔︀":"sqcups","⊕":"oplus","⊖":"ominus","⊗":"otimes","⊘":"osol","⊙":"odot","⊚":"ocir","⊛":"oast","⊝":"odash","⊞":"plusb","⊟":"minusb","⊠":"timesb","⊡":"sdotb","⊢":"vdash","⊬":"nvdash","⊣":"dashv","⊤":"top","⊥":"bot","⊧":"models","⊨":"vDash","⊭":"nvDash","⊩":"Vdash","⊮":"nVdash","⊪":"Vvdash","⊫":"VDash","⊯":"nVDash","⊰":"prurel","⊲":"vltri","⋪":"nltri","⊳":"vrtri","⋫":"nrtri","⊴":"ltrie","⋬":"nltrie","⊴⃒":"nvltrie","⊵":"rtrie","⋭":"nrtrie","⊵⃒":"nvrtrie","⊶":"origof","⊷":"imof","⊸":"mumap","⊹":"hercon","⊺":"intcal","⊻":"veebar","⊽":"barvee","⊾":"angrtvb","⊿":"lrtri","⋀":"Wedge","⋁":"Vee","⋂":"xcap","⋃":"xcup","⋄":"diam","⋅":"sdot","⋆":"Star","⋇":"divonx","⋈":"bowtie","⋉":"ltimes","⋊":"rtimes","⋋":"lthree","⋌":"rthree","⋍":"bsime","⋎":"cuvee","⋏":"cuwed","⋐":"Sub","⋑":"Sup","⋒":"Cap","⋓":"Cup","⋔":"fork","⋕":"epar","⋖":"ltdot","⋗":"gtdot","⋘":"Ll","⋘̸":"nLl","⋙":"Gg","⋙̸":"nGg","⋚︀":"lesg","⋚":"leg","⋛":"gel","⋛︀":"gesl","⋞":"cuepr","⋟":"cuesc","⋦":"lnsim","⋧":"gnsim","⋨":"prnsim","⋩":"scnsim","⋮":"vellip","⋯":"ctdot","⋰":"utdot","⋱":"dtdot","⋲":"disin","⋳":"isinsv","⋴":"isins","⋵":"isindot","⋵̸":"notindot","⋶":"notinvc","⋷":"notinvb","⋹":"isinE","⋹̸":"notinE","⋺":"nisd","⋻":"xnis","⋼":"nis","⋽":"notnivc","⋾":"notnivb","⌅":"barwed","⌆":"Barwed","⌌":"drcrop","⌍":"dlcrop","⌎":"urcrop","⌏":"ulcrop","⌐":"bnot","⌒":"profline","⌓":"profsurf","⌕":"telrec","⌖":"target","⌜":"ulcorn","⌝":"urcorn","⌞":"dlcorn","⌟":"drcorn","⌢":"frown","⌣":"smile","⌭":"cylcty","⌮":"profalar","⌶":"topbot","⌽":"ovbar","⌿":"solbar","⍼":"angzarr","⎰":"lmoust","⎱":"rmoust","⎴":"tbrk","⎵":"bbrk","⎶":"bbrktbrk","⏜":"OverParenthesis","⏝":"UnderParenthesis","⏞":"OverBrace","⏟":"UnderBrace","⏢":"trpezium","⏧":"elinters","␣":"blank","─":"boxh","│":"boxv","┌":"boxdr","┐":"boxdl","└":"boxur","┘":"boxul","├":"boxvr","┤":"boxvl","┬":"boxhd","┴":"boxhu","┼":"boxvh","═":"boxH","║":"boxV","╒":"boxdR","╓":"boxDr","╔":"boxDR","╕":"boxdL","╖":"boxDl","╗":"boxDL","╘":"boxuR","╙":"boxUr","╚":"boxUR","╛":"boxuL","╜":"boxUl","╝":"boxUL","╞":"boxvR","╟":"boxVr","╠":"boxVR","╡":"boxvL","╢":"boxVl","╣":"boxVL","╤":"boxHd","╥":"boxhD","╦":"boxHD","╧":"boxHu","╨":"boxhU","╩":"boxHU","╪":"boxvH","╫":"boxVh","╬":"boxVH","▀":"uhblk","▄":"lhblk","█":"block","░":"blk14","▒":"blk12","▓":"blk34","□":"squ","▪":"squf","▫":"EmptyVerySmallSquare","▭":"rect","▮":"marker","▱":"fltns","△":"xutri","▴":"utrif","▵":"utri","▸":"rtrif","▹":"rtri","▽":"xdtri","▾":"dtrif","▿":"dtri","◂":"ltrif","◃":"ltri","◊":"loz","○":"cir","◬":"tridot","◯":"xcirc","◸":"ultri","◹":"urtri","◺":"lltri","◻":"EmptySmallSquare","◼":"FilledSmallSquare","★":"starf","☆":"star","☎":"phone","♀":"female","♂":"male","♠":"spades","♣":"clubs","♥":"hearts","♦":"diams","♪":"sung","✓":"check","✗":"cross","✠":"malt","✶":"sext","❘":"VerticalSeparator","⟈":"bsolhsub","⟉":"suphsol","⟵":"xlarr","⟶":"xrarr","⟷":"xharr","⟸":"xlArr","⟹":"xrArr","⟺":"xhArr","⟼":"xmap","⟿":"dzigrarr","⤂":"nvlArr","⤃":"nvrArr","⤄":"nvHarr","⤅":"Map","⤌":"lbarr","⤍":"rbarr","⤎":"lBarr","⤏":"rBarr","⤐":"RBarr","⤑":"DDotrahd","⤒":"UpArrowBar","⤓":"DownArrowBar","⤖":"Rarrtl","⤙":"latail","⤚":"ratail","⤛":"lAtail","⤜":"rAtail","⤝":"larrfs","⤞":"rarrfs","⤟":"larrbfs","⤠":"rarrbfs","⤣":"nwarhk","⤤":"nearhk","⤥":"searhk","⤦":"swarhk","⤧":"nwnear","⤨":"toea","⤩":"tosa","⤪":"swnwar","⤳":"rarrc","⤳̸":"nrarrc","⤵":"cudarrr","⤶":"ldca","⤷":"rdca","⤸":"cudarrl","⤹":"larrpl","⤼":"curarrm","⤽":"cularrp","⥅":"rarrpl","⥈":"harrcir","⥉":"Uarrocir","⥊":"lurdshar","⥋":"ldrushar","⥎":"LeftRightVector","⥏":"RightUpDownVector","⥐":"DownLeftRightVector","⥑":"LeftUpDownVector","⥒":"LeftVectorBar","⥓":"RightVectorBar","⥔":"RightUpVectorBar","⥕":"RightDownVectorBar","⥖":"DownLeftVectorBar","⥗":"DownRightVectorBar","⥘":"LeftUpVectorBar","⥙":"LeftDownVectorBar","⥚":"LeftTeeVector","⥛":"RightTeeVector","⥜":"RightUpTeeVector","⥝":"RightDownTeeVector","⥞":"DownLeftTeeVector","⥟":"DownRightTeeVector","⥠":"LeftUpTeeVector","⥡":"LeftDownTeeVector","⥢":"lHar","⥣":"uHar","⥤":"rHar","⥥":"dHar","⥦":"luruhar","⥧":"ldrdhar","⥨":"ruluhar","⥩":"rdldhar","⥪":"lharul","⥫":"llhard","⥬":"rharul","⥭":"lrhard","⥮":"udhar","⥯":"duhar","⥰":"RoundImplies","⥱":"erarr","⥲":"simrarr","⥳":"larrsim","⥴":"rarrsim","⥵":"rarrap","⥶":"ltlarr","⥸":"gtrarr","⥹":"subrarr","⥻":"suplarr","⥼":"lfisht","⥽":"rfisht","⥾":"ufisht","⥿":"dfisht","⦚":"vzigzag","⦜":"vangrt","⦝":"angrtvbd","⦤":"ange","⦥":"range","⦦":"dwangle","⦧":"uwangle","⦨":"angmsdaa","⦩":"angmsdab","⦪":"angmsdac","⦫":"angmsdad","⦬":"angmsdae","⦭":"angmsdaf","⦮":"angmsdag","⦯":"angmsdah","⦰":"bemptyv","⦱":"demptyv","⦲":"cemptyv","⦳":"raemptyv","⦴":"laemptyv","⦵":"ohbar","⦶":"omid","⦷":"opar","⦹":"operp","⦻":"olcross","⦼":"odsold","⦾":"olcir","⦿":"ofcir","⧀":"olt","⧁":"ogt","⧂":"cirscir","⧃":"cirE","⧄":"solb","⧅":"bsolb","⧉":"boxbox","⧍":"trisb","⧎":"rtriltri","⧏":"LeftTriangleBar","⧏̸":"NotLeftTriangleBar","⧐":"RightTriangleBar","⧐̸":"NotRightTriangleBar","⧜":"iinfin","⧝":"infintie","⧞":"nvinfin","⧣":"eparsl","⧤":"smeparsl","⧥":"eqvparsl","⧫":"lozf","⧴":"RuleDelayed","⧶":"dsol","⨀":"xodot","⨁":"xoplus","⨂":"xotime","⨄":"xuplus","⨆":"xsqcup","⨍":"fpartint","⨐":"cirfnint","⨑":"awint","⨒":"rppolint","⨓":"scpolint","⨔":"npolint","⨕":"pointint","⨖":"quatint","⨗":"intlarhk","⨢":"pluscir","⨣":"plusacir","⨤":"simplus","⨥":"plusdu","⨦":"plussim","⨧":"plustwo","⨩":"mcomma","⨪":"minusdu","⨭":"loplus","⨮":"roplus","⨯":"Cross","⨰":"timesd","⨱":"timesbar","⨳":"smashp","⨴":"lotimes","⨵":"rotimes","⨶":"otimesas","⨷":"Otimes","⨸":"odiv","⨹":"triplus","⨺":"triminus","⨻":"tritime","⨼":"iprod","⨿":"amalg","⩀":"capdot","⩂":"ncup","⩃":"ncap","⩄":"capand","⩅":"cupor","⩆":"cupcap","⩇":"capcup","⩈":"cupbrcap","⩉":"capbrcup","⩊":"cupcup","⩋":"capcap","⩌":"ccups","⩍":"ccaps","⩐":"ccupssm","⩓":"And","⩔":"Or","⩕":"andand","⩖":"oror","⩗":"orslope","⩘":"andslope","⩚":"andv","⩛":"orv","⩜":"andd","⩝":"ord","⩟":"wedbar","⩦":"sdote","⩪":"simdot","⩭":"congdot","⩭̸":"ncongdot","⩮":"easter","⩯":"apacir","⩰":"apE","⩰̸":"napE","⩱":"eplus","⩲":"pluse","⩳":"Esim","⩷":"eDDot","⩸":"equivDD","⩹":"ltcir","⩺":"gtcir","⩻":"ltquest","⩼":"gtquest","⩽":"les","⩽̸":"nles","⩾":"ges","⩾̸":"nges","⩿":"lesdot","⪀":"gesdot","⪁":"lesdoto","⪂":"gesdoto","⪃":"lesdotor","⪄":"gesdotol","⪅":"lap","⪆":"gap","⪇":"lne","⪈":"gne","⪉":"lnap","⪊":"gnap","⪋":"lEg","⪌":"gEl","⪍":"lsime","⪎":"gsime","⪏":"lsimg","⪐":"gsiml","⪑":"lgE","⪒":"glE","⪓":"lesges","⪔":"gesles","⪕":"els","⪖":"egs","⪗":"elsdot","⪘":"egsdot","⪙":"el","⪚":"eg","⪝":"siml","⪞":"simg","⪟":"simlE","⪠":"simgE","⪡":"LessLess","⪡̸":"NotNestedLessLess","⪢":"GreaterGreater","⪢̸":"NotNestedGreaterGreater","⪤":"glj","⪥":"gla","⪦":"ltcc","⪧":"gtcc","⪨":"lescc","⪩":"gescc","⪪":"smt","⪫":"lat","⪬":"smte","⪬︀":"smtes","⪭":"late","⪭︀":"lates","⪮":"bumpE","⪯":"pre","⪯̸":"npre","⪰":"sce","⪰̸":"nsce","⪳":"prE","⪴":"scE","⪵":"prnE","⪶":"scnE","⪷":"prap","⪸":"scap","⪹":"prnap","⪺":"scnap","⪻":"Pr","⪼":"Sc","⪽":"subdot","⪾":"supdot","⪿":"subplus","⫀":"supplus","⫁":"submult","⫂":"supmult","⫃":"subedot","⫄":"supedot","⫅":"subE","⫅̸":"nsubE","⫆":"supE","⫆̸":"nsupE","⫇":"subsim","⫈":"supsim","⫋︀":"vsubnE","⫋":"subnE","⫌︀":"vsupnE","⫌":"supnE","⫏":"csub","⫐":"csup","⫑":"csube","⫒":"csupe","⫓":"subsup","⫔":"supsub","⫕":"subsub","⫖":"supsup","⫗":"suphsub","⫘":"supdsub","⫙":"forkv","⫚":"topfork","⫛":"mlcp","⫤":"Dashv","⫦":"Vdashl","⫧":"Barv","⫨":"vBar","⫩":"vBarv","⫫":"Vbar","⫬":"Not","⫭":"bNot","⫮":"rnmid","⫯":"cirmid","⫰":"midcir","⫱":"topcir","⫲":"nhpar","⫳":"parsim","⫽":"parsl","⫽⃥":"nparsl","♭":"flat","♮":"natur","♯":"sharp","¤":"curren","¢":"cent",$:"dollar","£":"pound","¥":"yen","€":"euro","¹":"sup1","½":"half","⅓":"frac13","¼":"frac14","⅕":"frac15","⅙":"frac16","⅛":"frac18","²":"sup2","⅔":"frac23","⅖":"frac25","³":"sup3","¾":"frac34","⅗":"frac35","⅜":"frac38","⅘":"frac45","⅚":"frac56","⅝":"frac58","⅞":"frac78","𝒶":"ascr","𝕒":"aopf","𝔞":"afr","𝔸":"Aopf","𝔄":"Afr","𝒜":"Ascr","ª":"ordf","á":"aacute","Á":"Aacute","à":"agrave","À":"Agrave","ă":"abreve","Ă":"Abreve","â":"acirc","Â":"Acirc","å":"aring","Å":"angst","ä":"auml","Ä":"Auml","ã":"atilde","Ã":"Atilde","ą":"aogon","Ą":"Aogon","ā":"amacr","Ā":"Amacr","æ":"aelig","Æ":"AElig","𝒷":"bscr","𝕓":"bopf","𝔟":"bfr","𝔹":"Bopf","ℬ":"Bscr","𝔅":"Bfr","𝔠":"cfr","𝒸":"cscr","𝕔":"copf","ℭ":"Cfr","𝒞":"Cscr","ℂ":"Copf","ć":"cacute","Ć":"Cacute","ĉ":"ccirc","Ĉ":"Ccirc","č":"ccaron","Č":"Ccaron","ċ":"cdot","Ċ":"Cdot","ç":"ccedil","Ç":"Ccedil","℅":"incare","𝔡":"dfr","ⅆ":"dd","𝕕":"dopf","𝒹":"dscr","𝒟":"Dscr","𝔇":"Dfr","ⅅ":"DD","𝔻":"Dopf","ď":"dcaron","Ď":"Dcaron","đ":"dstrok","Đ":"Dstrok","ð":"eth","Ð":"ETH","ⅇ":"ee","ℯ":"escr","𝔢":"efr","𝕖":"eopf","ℰ":"Escr","𝔈":"Efr","𝔼":"Eopf","é":"eacute","É":"Eacute","è":"egrave","È":"Egrave","ê":"ecirc","Ê":"Ecirc","ě":"ecaron","Ě":"Ecaron","ë":"euml","Ë":"Euml","ė":"edot","Ė":"Edot","ę":"eogon","Ę":"Eogon","ē":"emacr","Ē":"Emacr","𝔣":"ffr","𝕗":"fopf","𝒻":"fscr","𝔉":"Ffr","𝔽":"Fopf","ℱ":"Fscr","ff":"fflig","ffi":"ffilig","ffl":"ffllig","fi":"filig",fj:"fjlig","fl":"fllig","ƒ":"fnof","ℊ":"gscr","𝕘":"gopf","𝔤":"gfr","𝒢":"Gscr","𝔾":"Gopf","𝔊":"Gfr","ǵ":"gacute","ğ":"gbreve","Ğ":"Gbreve","ĝ":"gcirc","Ĝ":"Gcirc","ġ":"gdot","Ġ":"Gdot","Ģ":"Gcedil","𝔥":"hfr","ℎ":"planckh","𝒽":"hscr","𝕙":"hopf","ℋ":"Hscr","ℌ":"Hfr","ℍ":"Hopf","ĥ":"hcirc","Ĥ":"Hcirc","ℏ":"hbar","ħ":"hstrok","Ħ":"Hstrok","𝕚":"iopf","𝔦":"ifr","𝒾":"iscr","ⅈ":"ii","𝕀":"Iopf","ℐ":"Iscr","ℑ":"Im","í":"iacute","Í":"Iacute","ì":"igrave","Ì":"Igrave","î":"icirc","Î":"Icirc","ï":"iuml","Ï":"Iuml","ĩ":"itilde","Ĩ":"Itilde","İ":"Idot","į":"iogon","Į":"Iogon","ī":"imacr","Ī":"Imacr","ij":"ijlig","IJ":"IJlig","ı":"imath","𝒿":"jscr","𝕛":"jopf","𝔧":"jfr","𝒥":"Jscr","𝔍":"Jfr","𝕁":"Jopf","ĵ":"jcirc","Ĵ":"Jcirc","ȷ":"jmath","𝕜":"kopf","𝓀":"kscr","𝔨":"kfr","𝒦":"Kscr","𝕂":"Kopf","𝔎":"Kfr","ķ":"kcedil","Ķ":"Kcedil","𝔩":"lfr","𝓁":"lscr","ℓ":"ell","𝕝":"lopf","ℒ":"Lscr","𝔏":"Lfr","𝕃":"Lopf","ĺ":"lacute","Ĺ":"Lacute","ľ":"lcaron","Ľ":"Lcaron","ļ":"lcedil","Ļ":"Lcedil","ł":"lstrok","Ł":"Lstrok","ŀ":"lmidot","Ŀ":"Lmidot","𝔪":"mfr","𝕞":"mopf","𝓂":"mscr","𝔐":"Mfr","𝕄":"Mopf","ℳ":"Mscr","𝔫":"nfr","𝕟":"nopf","𝓃":"nscr","ℕ":"Nopf","𝒩":"Nscr","𝔑":"Nfr","ń":"nacute","Ń":"Nacute","ň":"ncaron","Ň":"Ncaron","ñ":"ntilde","Ñ":"Ntilde","ņ":"ncedil","Ņ":"Ncedil","№":"numero","ŋ":"eng","Ŋ":"ENG","𝕠":"oopf","𝔬":"ofr","ℴ":"oscr","𝒪":"Oscr","𝔒":"Ofr","𝕆":"Oopf","º":"ordm","ó":"oacute","Ó":"Oacute","ò":"ograve","Ò":"Ograve","ô":"ocirc","Ô":"Ocirc","ö":"ouml","Ö":"Ouml","ő":"odblac","Ő":"Odblac","õ":"otilde","Õ":"Otilde","ø":"oslash","Ø":"Oslash","ō":"omacr","Ō":"Omacr","œ":"oelig","Œ":"OElig","𝔭":"pfr","𝓅":"pscr","𝕡":"popf","ℙ":"Popf","𝔓":"Pfr","𝒫":"Pscr","𝕢":"qopf","𝔮":"qfr","𝓆":"qscr","𝒬":"Qscr","𝔔":"Qfr","ℚ":"Qopf","ĸ":"kgreen","𝔯":"rfr","𝕣":"ropf","𝓇":"rscr","ℛ":"Rscr","ℜ":"Re","ℝ":"Ropf","ŕ":"racute","Ŕ":"Racute","ř":"rcaron","Ř":"Rcaron","ŗ":"rcedil","Ŗ":"Rcedil","𝕤":"sopf","𝓈":"sscr","𝔰":"sfr","𝕊":"Sopf","𝔖":"Sfr","𝒮":"Sscr","Ⓢ":"oS","ś":"sacute","Ś":"Sacute","ŝ":"scirc","Ŝ":"Scirc","š":"scaron","Š":"Scaron","ş":"scedil","Ş":"Scedil","ß":"szlig","𝔱":"tfr","𝓉":"tscr","𝕥":"topf","𝒯":"Tscr","𝔗":"Tfr","𝕋":"Topf","ť":"tcaron","Ť":"Tcaron","ţ":"tcedil","Ţ":"Tcedil","™":"trade","ŧ":"tstrok","Ŧ":"Tstrok","𝓊":"uscr","𝕦":"uopf","𝔲":"ufr","𝕌":"Uopf","𝔘":"Ufr","𝒰":"Uscr","ú":"uacute","Ú":"Uacute","ù":"ugrave","Ù":"Ugrave","ŭ":"ubreve","Ŭ":"Ubreve","û":"ucirc","Û":"Ucirc","ů":"uring","Ů":"Uring","ü":"uuml","Ü":"Uuml","ű":"udblac","Ű":"Udblac","ũ":"utilde","Ũ":"Utilde","ų":"uogon","Ų":"Uogon","ū":"umacr","Ū":"Umacr","𝔳":"vfr","𝕧":"vopf","𝓋":"vscr","𝔙":"Vfr","𝕍":"Vopf","𝒱":"Vscr","𝕨":"wopf","𝓌":"wscr","𝔴":"wfr","𝒲":"Wscr","𝕎":"Wopf","𝔚":"Wfr","ŵ":"wcirc","Ŵ":"Wcirc","𝔵":"xfr","𝓍":"xscr","𝕩":"xopf","𝕏":"Xopf","𝔛":"Xfr","𝒳":"Xscr","𝔶":"yfr","𝓎":"yscr","𝕪":"yopf","𝒴":"Yscr","𝔜":"Yfr","𝕐":"Yopf","ý":"yacute","Ý":"Yacute","ŷ":"ycirc","Ŷ":"Ycirc","ÿ":"yuml","Ÿ":"Yuml","𝓏":"zscr","𝔷":"zfr","𝕫":"zopf","ℨ":"Zfr","ℤ":"Zopf","𝒵":"Zscr","ź":"zacute","Ź":"Zacute","ž":"zcaron","Ž":"Zcaron","ż":"zdot","Ż":"Zdot","Ƶ":"imped","þ":"thorn","Þ":"THORN","ʼn":"napos","α":"alpha","Α":"Alpha","β":"beta","Β":"Beta","γ":"gamma","Γ":"Gamma","δ":"delta","Δ":"Delta","ε":"epsi","ϵ":"epsiv","Ε":"Epsilon","ϝ":"gammad","Ϝ":"Gammad","ζ":"zeta","Ζ":"Zeta","η":"eta","Η":"Eta","θ":"theta","ϑ":"thetav","Θ":"Theta","ι":"iota","Ι":"Iota","κ":"kappa","ϰ":"kappav","Κ":"Kappa","λ":"lambda","Λ":"Lambda","μ":"mu","µ":"micro","Μ":"Mu","ν":"nu","Ν":"Nu","ξ":"xi","Ξ":"Xi","ο":"omicron","Ο":"Omicron","π":"pi","ϖ":"piv","Π":"Pi","ρ":"rho","ϱ":"rhov","Ρ":"Rho","σ":"sigma","Σ":"Sigma","ς":"sigmaf","τ":"tau","Τ":"Tau","υ":"upsi","Υ":"Upsilon","ϒ":"Upsi","φ":"phi","ϕ":"phiv","Φ":"Phi","χ":"chi","Χ":"Chi","ψ":"psi","Ψ":"Psi","ω":"omega","Ω":"ohm","а":"acy","А":"Acy","б":"bcy","Б":"Bcy","в":"vcy","В":"Vcy","г":"gcy","Г":"Gcy","ѓ":"gjcy","Ѓ":"GJcy","д":"dcy","Д":"Dcy","ђ":"djcy","Ђ":"DJcy","е":"iecy","Е":"IEcy","ё":"iocy","Ё":"IOcy","є":"jukcy","Є":"Jukcy","ж":"zhcy","Ж":"ZHcy","з":"zcy","З":"Zcy","ѕ":"dscy","Ѕ":"DScy","и":"icy","И":"Icy","і":"iukcy","І":"Iukcy","ї":"yicy","Ї":"YIcy","й":"jcy","Й":"Jcy","ј":"jsercy","Ј":"Jsercy","к":"kcy","К":"Kcy","ќ":"kjcy","Ќ":"KJcy","л":"lcy","Л":"Lcy","љ":"ljcy","Љ":"LJcy","м":"mcy","М":"Mcy","н":"ncy","Н":"Ncy","њ":"njcy","Њ":"NJcy","о":"ocy","О":"Ocy","п":"pcy","П":"Pcy","р":"rcy","Р":"Rcy","с":"scy","С":"Scy","т":"tcy","Т":"Tcy","ћ":"tshcy","Ћ":"TSHcy","у":"ucy","У":"Ucy","ў":"ubrcy","Ў":"Ubrcy","ф":"fcy","Ф":"Fcy","х":"khcy","Х":"KHcy","ц":"tscy","Ц":"TScy","ч":"chcy","Ч":"CHcy","џ":"dzcy","Џ":"DZcy","ш":"shcy","Ш":"SHcy","щ":"shchcy","Щ":"SHCHcy","ъ":"hardcy","Ъ":"HARDcy","ы":"ycy","Ы":"Ycy","ь":"softcy","Ь":"SOFTcy","э":"ecy","Э":"Ecy","ю":"yucy","Ю":"YUcy","я":"yacy","Я":"YAcy","ℵ":"aleph","ℶ":"beth","ℷ":"gimel","ℸ":"daleth"},p=/["&'<>`]/g,f={'"':""","&":"&","'":"'","<":"<",">":">","`":"`"},m=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,g=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,b=/&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g,v={aacute:"á",Aacute:"Á",abreve:"ă",Abreve:"Ă",ac:"∾",acd:"∿",acE:"∾̳",acirc:"â",Acirc:"Â",acute:"´",acy:"а",Acy:"А",aelig:"æ",AElig:"Æ",af:"",afr:"𝔞",Afr:"𝔄",agrave:"à",Agrave:"À",alefsym:"ℵ",aleph:"ℵ",alpha:"α",Alpha:"Α",amacr:"ā",Amacr:"Ā",amalg:"⨿",amp:"&",AMP:"&",and:"∧",And:"⩓",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",Aogon:"Ą",aopf:"𝕒",Aopf:"𝔸",ap:"≈",apacir:"⩯",ape:"≊",apE:"⩰",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",aring:"å",Aring:"Å",ascr:"𝒶",Ascr:"𝒜",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",Bcy:"Б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",beta:"β",Beta:"Β",beth:"ℶ",between:"≬",bfr:"𝔟",Bfr:"𝔅",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bNot:"⫭",bopf:"𝕓",Bopf:"𝔹",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxhD:"╥",boxHd:"╤",boxHD:"╦",boxhu:"┴",boxhU:"╨",boxHu:"╧",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpe:"≏",bumpE:"⪮",bumpeq:"≏",Bumpeq:"≎",cacute:"ć",Cacute:"Ć",cap:"∩",Cap:"⋒",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",ccaron:"č",Ccaron:"Č",ccedil:"ç",Ccedil:"Ç",ccirc:"ĉ",Ccirc:"Ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",Cdot:"Ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",chcy:"ч",CHcy:"Ч",check:"✓",checkmark:"✓",chi:"χ",Chi:"Χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cire:"≗",cirE:"⧃",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",colone:"≔",Colone:"⩴",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",cscr:"𝒸",Cscr:"𝒞",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",Cup:"⋓",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",dArr:"⇓",Darr:"↡",dash:"‐",dashv:"⊣",Dashv:"⫤",dbkarow:"⤏",dblac:"˝",dcaron:"ď",Dcaron:"Ď",dcy:"д",Dcy:"Д",dd:"ⅆ",DD:"ⅅ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",delta:"δ",Delta:"Δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",Dfr:"𝔇",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",DJcy:"Ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",Dopf:"𝔻",dot:"˙",Dot:"¨",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",downarrow:"↓",Downarrow:"⇓",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",Dscr:"𝒟",dscy:"ѕ",DScy:"Ѕ",dsol:"⧶",dstrok:"đ",Dstrok:"Đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",DZcy:"Џ",dzigrarr:"⟿",eacute:"é",Eacute:"É",easter:"⩮",ecaron:"ě",Ecaron:"Ě",ecir:"≖",ecirc:"ê",Ecirc:"Ê",ecolon:"≕",ecy:"э",Ecy:"Э",eDDot:"⩷",edot:"ė",eDot:"≑",Edot:"Ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",Efr:"𝔈",eg:"⪚",egrave:"è",Egrave:"È",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",Emacr:"Ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",eng:"ŋ",ENG:"Ŋ",ensp:" ",eogon:"ę",Eogon:"Ę",eopf:"𝕖",Eopf:"𝔼",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",Epsilon:"Ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",esim:"≂",Esim:"⩳",eta:"η",Eta:"Η",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",fcy:"ф",Fcy:"Ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",Ffr:"𝔉",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",Fopf:"𝔽",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",gamma:"γ",Gamma:"Γ",gammad:"ϝ",Gammad:"Ϝ",gap:"⪆",gbreve:"ğ",Gbreve:"Ğ",Gcedil:"Ģ",gcirc:"ĝ",Gcirc:"Ĝ",gcy:"г",Gcy:"Г",gdot:"ġ",Gdot:"Ġ",ge:"≥",gE:"≧",gel:"⋛",gEl:"⪌",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",Gfr:"𝔊",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",GJcy:"Ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",Gopf:"𝔾",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",gscr:"ℊ",Gscr:"𝒢",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",Gt:"≫",GT:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",HARDcy:"Ъ",harr:"↔",hArr:"⇔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",hcirc:"ĥ",Hcirc:"Ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",hstrok:"ħ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",iacute:"í",Iacute:"Í",ic:"",icirc:"î",Icirc:"Î",icy:"и",Icy:"И",Idot:"İ",iecy:"е",IEcy:"Е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",igrave:"ì",Igrave:"Ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",IJlig:"IJ",Im:"ℑ",imacr:"ī",Imacr:"Ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",Int:"∬",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",iocy:"ё",IOcy:"Ё",iogon:"į",Iogon:"Į",iopf:"𝕚",Iopf:"𝕀",iota:"ι",Iota:"Ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",itilde:"ĩ",Itilde:"Ĩ",iukcy:"і",Iukcy:"І",iuml:"ï",Iuml:"Ï",jcirc:"ĵ",Jcirc:"Ĵ",jcy:"й",Jcy:"Й",jfr:"𝔧",Jfr:"𝔍",jmath:"ȷ",jopf:"𝕛",Jopf:"𝕁",jscr:"𝒿",Jscr:"𝒥",jsercy:"ј",Jsercy:"Ј",jukcy:"є",Jukcy:"Є",kappa:"κ",Kappa:"Κ",kappav:"ϰ",kcedil:"ķ",Kcedil:"Ķ",kcy:"к",Kcy:"К",kfr:"𝔨",Kfr:"𝔎",kgreen:"ĸ",khcy:"х",KHcy:"Х",kjcy:"ќ",KJcy:"Ќ",kopf:"𝕜",Kopf:"𝕂",kscr:"𝓀",Kscr:"𝒦",lAarr:"⇚",lacute:"ĺ",Lacute:"Ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",Lambda:"Λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larr:"←",lArr:"⇐",Larr:"↞",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",lAtail:"⤛",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",Lcaron:"Ľ",lcedil:"ļ",Lcedil:"Ļ",lceil:"⌈",lcub:"{",lcy:"л",Lcy:"Л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",leftarrow:"←",Leftarrow:"⇐",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",Leftrightarrow:"⇔",LeftRightArrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",leg:"⋚",lEg:"⪋",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",Lfr:"𝔏",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",LJcy:"Љ",ll:"≪",Ll:"⋘",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",lmidot:"ŀ",Lmidot:"Ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",Longleftarrow:"⟸",LongLeftArrow:"⟵",longleftrightarrow:"⟷",Longleftrightarrow:"⟺",LongLeftRightArrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",Longrightarrow:"⟹",LongRightArrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",Lopf:"𝕃",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",Lstrok:"Ł",lt:"<",Lt:"≪",LT:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",Map:"⤅",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",Mcy:"М",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",mfr:"𝔪",Mfr:"𝔐",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",Mopf:"𝕄",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",mu:"μ",Mu:"Μ",multimap:"⊸",mumap:"⊸",nabla:"∇",nacute:"ń",Nacute:"Ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",Ncaron:"Ň",ncedil:"ņ",Ncedil:"Ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",Ncy:"Н",ndash:"–",ne:"≠",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",nfr:"𝔫",Nfr:"𝔑",nge:"≱",ngE:"≧̸",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",ngt:"≯",nGt:"≫⃒",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",NJcy:"Њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nle:"≰",nlE:"≦̸",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nlt:"≮",nLt:"≪⃒",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",not:"¬",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrarr:"↛",nrArr:"⇏",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",Nscr:"𝒩",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsube:"⊈",nsubE:"⫅̸",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupe:"⊉",nsupE:"⫆̸",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",Ntilde:"Ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",Nu:"Ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",oacute:"ó",Oacute:"Ó",oast:"⊛",ocir:"⊚",ocirc:"ô",Ocirc:"Ô",ocy:"о",Ocy:"О",odash:"⊝",odblac:"ő",Odblac:"Ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",OElig:"Œ",ofcir:"⦿",ofr:"𝔬",Ofr:"𝔒",ogon:"˛",ograve:"ò",Ograve:"Ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",Omacr:"Ō",omega:"ω",Omega:"Ω",omicron:"ο",Omicron:"Ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",Oopf:"𝕆",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",or:"∨",Or:"⩔",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",oscr:"ℴ",Oscr:"𝒪",oslash:"ø",Oslash:"Ø",osol:"⊘",otilde:"õ",Otilde:"Õ",otimes:"⊗",Otimes:"⨷",otimesas:"⨶",ouml:"ö",Ouml:"Ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",pcy:"п",Pcy:"П",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",Pfr:"𝔓",phi:"φ",Phi:"Φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",Pi:"Π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",pr:"≺",Pr:"⪻",prap:"⪷",prcue:"≼",pre:"⪯",prE:"⪳",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",Pscr:"𝒫",psi:"ψ",Psi:"Ψ",puncsp:" ",qfr:"𝔮",Qfr:"𝔔",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",qscr:"𝓆",Qscr:"𝒬",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",racute:"ŕ",Racute:"Ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rArr:"⇒",Rarr:"↠",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",Rarrtl:"⤖",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",Rcaron:"Ř",rcedil:"ŗ",Rcedil:"Ŗ",rceil:"⌉",rcub:"}",rcy:"р",Rcy:"Р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",Rho:"Ρ",rhov:"ϱ",RightAngleBracket:"⟩",rightarrow:"→",Rightarrow:"⇒",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",sacute:"ś",Sacute:"Ś",sbquo:"‚",sc:"≻",Sc:"⪼",scap:"⪸",scaron:"š",Scaron:"Š",sccue:"≽",sce:"⪰",scE:"⪴",scedil:"ş",Scedil:"Ş",scirc:"ŝ",Scirc:"Ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",Scy:"С",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",Sfr:"𝔖",sfrown:"⌢",sharp:"♯",shchcy:"щ",SHCHcy:"Щ",shcy:"ш",SHcy:"Ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",sigma:"σ",Sigma:"Σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",SOFTcy:"Ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",Sopf:"𝕊",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",Sscr:"𝒮",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",Star:"⋆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",sube:"⊆",subE:"⫅",subedot:"⫃",submult:"⫁",subne:"⊊",subnE:"⫋",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup:"⊃",Sup:"⋑",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supe:"⊇",supE:"⫆",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supne:"⊋",supnE:"⫌",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",tau:"τ",Tau:"Τ",tbrk:"⎴",tcaron:"ť",Tcaron:"Ť",tcedil:"ţ",Tcedil:"Ţ",tcy:"т",Tcy:"Т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",Tfr:"𝔗",there4:"∴",therefore:"∴",Therefore:"∴",theta:"θ",Theta:"Θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",thorn:"þ",THORN:"Þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",Topf:"𝕋",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",Tscr:"𝒯",tscy:"ц",TScy:"Ц",tshcy:"ћ",TSHcy:"Ћ",tstrok:"ŧ",Tstrok:"Ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uacute:"ú",Uacute:"Ú",uarr:"↑",uArr:"⇑",Uarr:"↟",Uarrocir:"⥉",ubrcy:"ў",Ubrcy:"Ў",ubreve:"ŭ",Ubreve:"Ŭ",ucirc:"û",Ucirc:"Û",ucy:"у",Ucy:"У",udarr:"⇅",udblac:"ű",Udblac:"Ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",Ufr:"𝔘",ugrave:"ù",Ugrave:"Ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",Umacr:"Ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",uogon:"ų",Uogon:"Ų",uopf:"𝕦",Uopf:"𝕌",uparrow:"↑",Uparrow:"⇑",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",updownarrow:"↕",Updownarrow:"⇕",UpDownArrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",upsilon:"υ",Upsilon:"Υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",Uring:"Ů",urtri:"◹",uscr:"𝓊",Uscr:"𝒰",utdot:"⋰",utilde:"ũ",Utilde:"Ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",Uuml:"Ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",vcy:"в",Vcy:"В",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",vee:"∨",Vee:"⋁",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",vfr:"𝔳",Vfr:"𝔙",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",Vopf:"𝕍",vprop:"∝",vrtri:"⊳",vscr:"𝓋",Vscr:"𝒱",vsubne:"⊊︀",vsubnE:"⫋︀",vsupne:"⊋︀",vsupnE:"⫌︀",Vvdash:"⊪",vzigzag:"⦚",wcirc:"ŵ",Wcirc:"Ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",wfr:"𝔴",Wfr:"𝔚",wopf:"𝕨",Wopf:"𝕎",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",Wscr:"𝒲",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",Xfr:"𝔛",xharr:"⟷",xhArr:"⟺",xi:"ξ",Xi:"Ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",Xopf:"𝕏",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",xscr:"𝓍",Xscr:"𝒳",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",Yacute:"Ý",yacy:"я",YAcy:"Я",ycirc:"ŷ",Ycirc:"Ŷ",ycy:"ы",Ycy:"Ы",yen:"¥",yfr:"𝔶",Yfr:"𝔜",yicy:"ї",YIcy:"Ї",yopf:"𝕪",Yopf:"𝕐",yscr:"𝓎",Yscr:"𝒴",yucy:"ю",YUcy:"Ю",yuml:"ÿ",Yuml:"Ÿ",zacute:"ź",Zacute:"Ź",zcaron:"ž",Zcaron:"Ž",zcy:"з",Zcy:"З",zdot:"ż",Zdot:"Ż",zeetrf:"ℨ",ZeroWidthSpace:"",zeta:"ζ",Zeta:"Ζ",zfr:"𝔷",Zfr:"ℨ",zhcy:"ж",ZHcy:"Ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",zscr:"𝓏",Zscr:"𝒵",zwj:"",zwnj:""},y={aacute:"á",Aacute:"Á",acirc:"â",Acirc:"Â",acute:"´",aelig:"æ",AElig:"Æ",agrave:"à",Agrave:"À",amp:"&",AMP:"&",aring:"å",Aring:"Å",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",brvbar:"¦",ccedil:"ç",Ccedil:"Ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",Eacute:"É",ecirc:"ê",Ecirc:"Ê",egrave:"è",Egrave:"È",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",iacute:"í",Iacute:"Í",icirc:"î",Icirc:"Î",iexcl:"¡",igrave:"ì",Igrave:"Ì",iquest:"¿",iuml:"ï",Iuml:"Ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",Ntilde:"Ñ",oacute:"ó",Oacute:"Ó",ocirc:"ô",Ocirc:"Ô",ograve:"ò",Ograve:"Ò",ordf:"ª",ordm:"º",oslash:"ø",Oslash:"Ø",otilde:"õ",Otilde:"Õ",ouml:"ö",Ouml:"Ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",THORN:"Þ",times:"×",uacute:"ú",Uacute:"Ú",ucirc:"û",Ucirc:"Û",ugrave:"ù",Ugrave:"Ù",uml:"¨",uuml:"ü",Uuml:"Ü",yacute:"ý",Yacute:"Ý",yen:"¥",yuml:"ÿ"},S={0:"<22>",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},_=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],x=String.fromCharCode,w={}.hasOwnProperty,k=function(e,t){return w.call(e,t)},O=function(e,t){if(!e)return t;var n,r={};for(n in t)r[n]=k(e,n)?e[n]:t[n];return r},E=function(e,t){var n="";return e>=55296&&e<=57343||e>1114111?(t&&C("character reference outside the permissible Unicode range"),"<22>"):k(S,e)?(t&&C("disallowed character reference"),S[e]):(t&&function(e,t){for(var n=-1,r=e.length;++n<r;)if(e[n]==t)return!0;return!1}(_,e)&&C("disallowed character reference"),e>65535&&(n+=x((e-=65536)>>>10&1023|55296),e=56320|1023&e),n+=x(e))},A=function(e){return"&#x"+e.toString(16).toUpperCase()+";"},T=function(e){return"&#"+e+";"},C=function(e){throw Error("Parse error: "+e)},M=function(e,t){(t=O(t,M.options)).strict&&g.test(e)&&C("forbidden code point");var n=t.encodeEverything,r=t.useNamedReferences,i=t.allowUnsafeSymbols,o=t.decimal?T:A,s=function(e){return o(e.charCodeAt(0))};return n?(e=e.replace(c,(function(e){return r&&k(h,e)?"&"+h[e]+";":s(e)})),r&&(e=e.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),r&&(e=e.replace(d,(function(e){return"&"+h[e]+";"})))):r?(i||(e=e.replace(p,(function(e){return"&"+h[e]+";"}))),e=(e=e.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒")).replace(d,(function(e){return"&"+h[e]+";"}))):i||(e=e.replace(p,s)),e.replace(l,(function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1);return o(1024*(t-55296)+n-56320+65536)})).replace(u,s)};M.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1,decimal:!1};var $=function(e,t){var n=(t=O(t,$.options)).strict;return n&&m.test(e)&&C("malformed character reference"),e.replace(b,(function(e,r,i,o,s,a,l,c,u){var d,h,p,f,m,g;return r?v[m=r]:i?(m=i,(g=o)&&t.isAttributeValue?(n&&"="==g&&C("`&` did not start a character reference"),e):(n&&C("named character reference was not terminated by a semicolon"),y[m]+(g||""))):s?(p=s,h=a,n&&!h&&C("character reference was not terminated by a semicolon"),d=parseInt(p,10),E(d,n)):l?(f=l,h=c,n&&!h&&C("character reference was not terminated by a semicolon"),d=parseInt(f,16),E(d,n)):(n&&C("named character reference was not terminated by a semicolon"),e)}))};$.options={isAttributeValue:!1,strict:!1};var P={version:"1.2.0",encode:M,decode:$,escape:function(e){return e.replace(p,(function(e){return f[e]}))},unescape:$};void 0===(i=function(){return P}.call(t,n,t,e))||(e.exports=i)}()}).call(this,n(65)(e),n(28))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},s=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.parse=t.base_parse=void 0;var l=n(429),c=a(n(103)),u=a(n(365)),d=a(n(366)),h=a(n(367)),p=a(n(153)),f=a(n(79)),m=a(n(154)),g=a(n(69));function b(e){return JSON.parse(JSON.stringify(c.default.decode(e)))}var v=new Set;!function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=function(e){for(var t=0;t<e.length;t++){var n=e[t];v.add(n),v.add(n.toUpperCase())}},r=0,i=e;r<i.length;r++){var o=i[r];n(o)}}(["h1","h2","h3","h4","h5","h6","header","hgroup"],["details","dialog","dd","div","dt"],["fieldset","figcaption","figure","footer","form"],["table","td","tr"],["address","article","aside","blockquote","br","hr","li","main","nav","ol","p","pre","section","ul"]);var y=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=function(){return null}),this._set=new Set(e),this._afterUpdate=t}return e.prototype._validate=function(e){if(/\s/.test(e))throw new Error("DOMException in DOMTokenList.add: The token '".concat(e,"' contains HTML space characters, which are not valid in tokens."))},e.prototype.add=function(e){this._validate(e),this._set.add(e),this._afterUpdate(this)},e.prototype.replace=function(e,t){this._validate(t),this._set.delete(e),this._set.add(t),this._afterUpdate(this)},e.prototype.remove=function(e){this._set.delete(e)&&this._afterUpdate(this)},e.prototype.toggle=function(e){this._validate(e),this._set.has(e)?this._set.delete(e):this._set.add(e),this._afterUpdate(this)},e.prototype.contains=function(e){return this._set.has(e)},Object.defineProperty(e.prototype,"length",{get:function(){return this._set.size},enumerable:!1,configurable:!0}),e.prototype.values=function(){return this._set.values()},Object.defineProperty(e.prototype,"value",{get:function(){return Array.from(this._set.values())},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return Array.from(this._set.values()).join(" ")},e}(),S=function(e){function t(t,n,r,i,o,s,a){void 0===r&&(r=""),void 0===s&&(s=new h.default),void 0===a&&(a={});var l=e.call(this,i,o)||this;if(l.rawAttrs=r,l.voidTag=s,l.nodeType=g.default.ELEMENT_NODE,l.rawTagName=t,l.rawAttrs=r||"",l.id=n.id||"",l.childNodes=[],l._parseOptions=a,l.classList=new y(n.class?n.class.split(/\s+/):[],(function(e){return l.setAttribute("class",e.toString())})),n.id&&(r||(l.rawAttrs='id="'.concat(n.id,'"'))),n.class&&!r){var c='class="'.concat(l.classList.toString(),'"');l.rawAttrs?l.rawAttrs+=" ".concat(c):l.rawAttrs=c}return l}return i(t,e),t.prototype.quoteAttribute=function(e){return null==e?"null":JSON.stringify(e.replace(/"/g,"""))},t.prototype.removeChild=function(e){return this.childNodes=this.childNodes.filter((function(t){return t!==e})),this},t.prototype.exchangeChild=function(e,t){var n=this.childNodes;return this.childNodes=n.map((function(n){return n===e?t:n})),this},Object.defineProperty(t.prototype,"tagName",{get:function(){return this.rawTagName?this.rawTagName.toUpperCase():this.rawTagName},set:function(e){this.rawTagName=e.toLowerCase()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"localName",{get:function(){return this.rawTagName.toLowerCase()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isVoidElement",{get:function(){return this.voidTag.isVoidElement(this.localName)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rawText",{get:function(){return this.childNodes.reduce((function(e,t){return e+t.rawText}),"")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textContent",{get:function(){return b(this.rawText)},set:function(e){var t=[new m.default(e,this)];this.childNodes=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"text",{get:function(){return b(this.rawText)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"structuredText",{get:function(){var e=[],t=[e];return function n(r){if(r.nodeType===g.default.ELEMENT_NODE)v.has(r.rawTagName)?(e.length>0&&t.push(e=[]),r.childNodes.forEach(n),e.length>0&&t.push(e=[])):r.childNodes.forEach(n);else if(r.nodeType===g.default.TEXT_NODE)if(r.isWhitespace)e.prependWhitespace=!0;else{var i=r.trimmedText;e.prependWhitespace&&(i=" ".concat(i),e.prependWhitespace=!1),e.push(i)}}(this),t.map((function(e){return e.join("").replace(/\s{2,}/g," ")})).join("\n").replace(/\s+$/,"")},enumerable:!1,configurable:!0}),t.prototype.toString=function(){var e=this.rawTagName;if(e){var t=this.rawAttrs?" ".concat(this.rawAttrs):"";return this.voidTag.formatNode(e,t,this.innerHTML)}return this.innerHTML},Object.defineProperty(t.prototype,"innerHTML",{get:function(){return this.childNodes.map((function(e){return e.toString()})).join("")},set:function(e){var t=T(e,this._parseOptions),n=t.childNodes.length?t.childNodes:[new m.default(e,this)];C(n,this),C(this.childNodes,null),this.childNodes=n},enumerable:!1,configurable:!0}),t.prototype.set_content=function(e,t){if(void 0===t&&(t={}),e instanceof f.default)e=[e];else if("string"==typeof e){var n=T(e,t=o(o({},this._parseOptions),t));e=n.childNodes.length?n.childNodes:[new m.default(n.innerHTML,this)]}return C(this.childNodes,null),C(e,this),this.childNodes=e,this},t.prototype.replaceWith=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=this.parentNode,i=t.map((function(t){if(t instanceof f.default)return[t];if("string"==typeof t){var n=T(t,e._parseOptions);return n.childNodes.length?n.childNodes:[new m.default(t,e)]}return[]})).flat(),o=r.childNodes.findIndex((function(t){return t===e}));return C([this],null),r.childNodes=s(s(s([],r.childNodes.slice(0,o),!0),C(i,r),!0),r.childNodes.slice(o+1),!0),this},Object.defineProperty(t.prototype,"outerHTML",{get:function(){return this.toString()},enumerable:!1,configurable:!0}),t.prototype.trimRight=function(e){for(var t=0;t<this.childNodes.length;t++){var n=this.childNodes[t];if(n.nodeType===g.default.ELEMENT_NODE)n.trimRight(e);else{var r=n.rawText.search(e);r>-1&&(n.rawText=n.rawText.substr(0,r),this.childNodes.length=t+1)}}return this},Object.defineProperty(t.prototype,"structure",{get:function(){var e=[],t=0;function n(n){e.push(" ".repeat(t)+n)}return function e(r){var i=r.id?"#".concat(r.id):"",o=r.classList.length?".".concat(r.classList.value.join(".")):"";n("".concat(r.rawTagName).concat(i).concat(o)),t++,r.childNodes.forEach((function(t){t.nodeType===g.default.ELEMENT_NODE?e(t):t.nodeType===g.default.TEXT_NODE&&(t.isWhitespace||n("#text"))})),t--}(this),e.join("\n")},enumerable:!1,configurable:!0}),t.prototype.removeWhitespace=function(){var e=this,t=0;return this.childNodes.forEach((function(n){if(n.nodeType===g.default.TEXT_NODE){if(n.isWhitespace)return;n.rawText=n.trimmedRawText}else n.nodeType===g.default.ELEMENT_NODE&&n.removeWhitespace();e.childNodes[t++]=n})),this.childNodes.length=t,this},t.prototype.querySelectorAll=function(e){return(0,l.selectAll)(e,this,{xmlMode:!0,adapter:d.default})},t.prototype.querySelector=function(e){return(0,l.selectOne)(e,this,{xmlMode:!0,adapter:d.default})},t.prototype.getElementsByTagName=function(e){for(var t=e.toUpperCase(),n=[],r=[],i=this,o=0;void 0!==o;){var s=void 0;do{s=i.childNodes[o++]}while(o<i.childNodes.length&&void 0===s);void 0!==s?s.nodeType===g.default.ELEMENT_NODE&&("*"!==e&&s.tagName!==t||n.push(s),s.childNodes.length>0&&(r.push(o),i=s,o=0)):(i=i.parentNode,o=r.pop())}return n},t.prototype.getElementById=function(e){for(var t=[],n=this,r=0;void 0!==r;){var i=void 0;do{i=n.childNodes[r++]}while(r<n.childNodes.length&&void 0===i);if(void 0!==i){if(i.nodeType===g.default.ELEMENT_NODE){if(i.id===e)return i;i.childNodes.length>0&&(t.push(r),n=i,r=0)}}else n=n.parentNode,r=t.pop()}return null},t.prototype.closest=function(e){var t=new Map,n=this,r=null;function i(e,n){for(var r=null,o=0,s=n.length;o<s&&!r;o++){var a=n[o];if(e(a))r=a;else{var l=t.get(a);l&&(r=i(e,[l]))}}return r}for(;n;)t.set(n,r),r=n,n=n.parentNode;for(n=this;n;){var s=(0,l.selectOne)(e,n,{xmlMode:!0,adapter:o(o({},d.default),{getChildren:function(e){var n=t.get(e);return n&&[n]},getSiblings:function(e){return[e]},findOne:i,findAll:function(){return[]}})});if(s)return s;n=n.parentNode}return null},t.prototype.appendChild=function(e){return e.remove(),this.childNodes.push(e),e.parentNode=this,e},Object.defineProperty(t.prototype,"firstChild",{get:function(){return this.childNodes[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return(0,u.default)(this.childNodes)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attrs",{get:function(){if(this._attrs)return this._attrs;this._attrs={};var e=this.rawAttributes;for(var t in e){var n=e[t]||"";this._attrs[t.toLowerCase()]=b(n)}return this._attrs},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e={},t=this.rawAttributes;for(var n in t){var r=t[n]||"";e[n]=b(r)}return e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rawAttributes",{get:function(){if(this._rawAttrs)return this._rawAttrs;var e={};if(this.rawAttrs)for(var t=/([a-zA-Z()[\]#@$.?:][a-zA-Z0-9-_:()[\]#]*)(?:\s*=\s*((?:'[^']*')|(?:"[^"]*")|\S+))?/g,n=void 0;n=t.exec(this.rawAttrs);){var r=n[1],i=n[2]||null;!i||"'"!==i[0]&&'"'!==i[0]||(i=i.slice(1,i.length-1)),e[r]=e[r]||i}return this._rawAttrs=e,e},enumerable:!1,configurable:!0}),t.prototype.removeAttribute=function(e){var t=this.rawAttributes;return delete t[e],this._attrs&&delete this._attrs[e],this.rawAttrs=Object.keys(t).map((function(e){var n=JSON.stringify(t[e]);return void 0===n||"null"===n?e:"".concat(e,"=").concat(n)})).join(" "),"id"===e&&(this.id=""),this},t.prototype.hasAttribute=function(e){return e.toLowerCase()in this.attrs},t.prototype.getAttribute=function(e){return this.attrs[e.toLowerCase()]},t.prototype.setAttribute=function(e,t){var n=this;if(arguments.length<2)throw new Error("Failed to execute 'setAttribute' on 'Element'");var r=e.toLowerCase(),i=this.rawAttributes;for(var o in i)if(o.toLowerCase()===r){e=o;break}return i[e]=String(t),this._attrs&&(this._attrs[r]=b(i[e])),this.rawAttrs=Object.keys(i).map((function(e){var t=n.quoteAttribute(i[e]);return"null"===t||'""'===t?e:"".concat(e,"=").concat(t)})).join(" "),"id"===e&&(this.id=t),this},t.prototype.setAttributes=function(e){var t=this;return this._attrs&&delete this._attrs,this._rawAttrs&&delete this._rawAttrs,this.rawAttrs=Object.keys(e).map((function(n){var r=e[n];return"null"===r||'""'===r?n:"".concat(n,"=").concat(t.quoteAttribute(String(r)))})).join(" "),this},t.prototype.insertAdjacentHTML=function(e,t){var n,r,i,o=this;if(arguments.length<2)throw new Error("2 arguments required");var a=T(t,this._parseOptions);if("afterend"===e){var l=this.parentNode.childNodes.findIndex((function(e){return e===o}));C(a.childNodes,this.parentNode),(n=this.parentNode.childNodes).splice.apply(n,s([l+1,0],a.childNodes,!1))}else if("afterbegin"===e)C(a.childNodes,this),(r=this.childNodes).unshift.apply(r,a.childNodes);else if("beforeend"===e)a.childNodes.forEach((function(e){o.appendChild(e)}));else{if("beforebegin"!==e)throw new Error("The value provided ('".concat(e,"') is not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'"));l=this.parentNode.childNodes.findIndex((function(e){return e===o}));C(a.childNodes,this.parentNode),(i=this.parentNode.childNodes).splice.apply(i,s([l,0],a.childNodes,!1))}return this},Object.defineProperty(t.prototype,"nextSibling",{get:function(){if(this.parentNode){for(var e=this.parentNode.childNodes,t=0;t<e.length;){if(this===e[t++])return e[t]||null}return null}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextElementSibling",{get:function(){if(this.parentNode){for(var e=this.parentNode.childNodes,n=0,r=!1;n<e.length;){var i=e[n++];if(r){if(i instanceof t)return i||null}else this===i&&(r=!0)}return null}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousSibling",{get:function(){if(this.parentNode){for(var e=this.parentNode.childNodes,t=e.length;t>0;){if(this===e[--t])return e[t-1]||null}return null}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousElementSibling",{get:function(){if(this.parentNode){for(var e=this.parentNode.childNodes,n=e.length,r=!1;n>0;){var i=e[--n];if(r){if(i instanceof t)return i||null}else this===i&&(r=!0)}return null}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"classNames",{get:function(){return this.classList.toString()},enumerable:!1,configurable:!0}),t.prototype.clone=function(){return T(this.toString(),this._parseOptions).firstChild},t}(f.default);t.default=S;var _=/<!--[\s\S]*?-->|<(\/?)([a-zA-Z][-.:0-9_a-zA-Z]*)((?:\s+[^>]*?(?:(?:'[^']*')|(?:"[^"]*"))?)*)\s*(\/?)>/g,x=/(?:^|\s)(id|class)\s*=\s*((?:'[^']*')|(?:"[^"]*")|\S+)/gi,w={area:!0,AREA:!0,base:!0,BASE:!0,br:!0,BR:!0,col:!0,COL:!0,hr:!0,HR:!0,img:!0,IMG:!0,input:!0,INPUT:!0,link:!0,LINK:!0,meta:!0,META:!0,source:!0,SOURCE:!0,embed:!0,EMBED:!0,param:!0,PARAM:!0,track:!0,TRACK:!0,wbr:!0,WBR:!0},k={li:{li:!0,LI:!0},LI:{li:!0,LI:!0},p:{p:!0,div:!0,P:!0,DIV:!0},P:{p:!0,div:!0,P:!0,DIV:!0},b:{div:!0,DIV:!0},B:{div:!0,DIV:!0},td:{td:!0,th:!0,TD:!0,TH:!0},TD:{td:!0,th:!0,TD:!0,TH:!0},th:{td:!0,th:!0,TD:!0,TH:!0},TH:{td:!0,th:!0,TD:!0,TH:!0},h1:{h1:!0,H1:!0},H1:{h1:!0,H1:!0},h2:{h2:!0,H2:!0},H2:{h2:!0,H2:!0},h3:{h3:!0,H3:!0},H3:{h3:!0,H3:!0},h4:{h4:!0,H4:!0},H4:{h4:!0,H4:!0},h5:{h5:!0,H5:!0},H5:{h5:!0,H5:!0},h6:{h6:!0,H6:!0},H6:{h6:!0,H6:!0}},O={li:{ul:!0,ol:!0,UL:!0,OL:!0},LI:{ul:!0,ol:!0,UL:!0,OL:!0},a:{div:!0,DIV:!0},A:{div:!0,DIV:!0},b:{div:!0,DIV:!0},B:{div:!0,DIV:!0},i:{div:!0,DIV:!0},I:{div:!0,DIV:!0},p:{div:!0,DIV:!0},P:{div:!0,DIV:!0},td:{tr:!0,table:!0,TR:!0,TABLE:!0},TD:{tr:!0,table:!0,TR:!0,TABLE:!0},th:{tr:!0,table:!0,TR:!0,TABLE:!0},TH:{tr:!0,table:!0,TR:!0,TABLE:!0}},E="documentfragmentcontainer";function A(e,t){var n,r;void 0===t&&(t={});var i=new h.default(null===(n=null==t?void 0:t.voidTag)||void 0===n?void 0:n.closingSlash,null===(r=null==t?void 0:t.voidTag)||void 0===r?void 0:r.tags),o=t.blockTextElements||{script:!0,noscript:!0,style:!0,pre:!0},s=Object.keys(o),a=s.map((function(e){return new RegExp("^".concat(e,"$"),"i")})),l=s.filter((function(e){return o[e]})).map((function(e){return new RegExp("^".concat(e,"$"),"i")}));function c(e){return l.some((function(t){return t.test(e)}))}function d(e){return a.some((function(t){return t.test(e)}))}var f,g=function(e,t){return[e-P,t-P]},b=new S(null,{},"",null,[0,e.length],i,t),v=b,y=[b],A=-1,T=void 0;e="<".concat(E,">").concat(e,"</").concat(E,">");for(var C=t.lowerCaseTagName,M=t.fixNestedATags,$=e.length-(E.length+2),P=E.length+2;f=_.exec(e);){var R=f[0],j=f[1],N=f[2],D=f[3],I=f[4],L=R.length,B=_.lastIndex-L,z=_.lastIndex;if(A>-1&&A+L<z){var F=e.substring(A,B);v.appendChild(new m.default(F,v,g(A,B)))}if(A=_.lastIndex,N!==E)if("!"!==R[1]){if(C&&(N=N.toLowerCase()),!j){for(var U={},Q=void 0;Q=x.exec(D);){var q=Q[1],G=Q[2],H="'"===G[0]||'"'===G[0];U[q.toLowerCase()]=H?G.slice(1,G.length-1):G}var V=v.rawTagName;!I&&k[V]&&k[V][N]&&(y.pop(),v=(0,u.default)(y)),!M||"a"!==N&&"A"!==N||(void 0!==T&&(y.splice(T),v=(0,u.default)(y)),T=y.length);var W=_.lastIndex,X=W-L;if(v=v.appendChild(new S(N,U,D.slice(1),null,g(X,W),i,t)),y.push(v),d(N)){var Y="</".concat(N,">"),Z=C?e.toLocaleLowerCase().indexOf(Y,_.lastIndex):e.indexOf(Y,_.lastIndex),J=-1===Z?$:Z;if(c(N))(F=e.substring(W,J)).length>0&&/\S/.test(F)&&v.appendChild(new m.default(F,v,g(W,J)));-1===Z?A=_.lastIndex=e.length+1:(A=_.lastIndex=Z+Y.length,j="/")}}if(j||I||w[N])for(;;){if(null==T||"a"!==N&&"A"!==N||(T=void 0),v.rawTagName===N){v.range[1]=g(-1,Math.max(A,z))[1],y.pop(),v=(0,u.default)(y);break}V=v.tagName;if(!O[V]||!O[V][N])break;y.pop(),v=(0,u.default)(y)}}else if(t.comment){var F=e.substring(B+4,z-3);v.appendChild(new p.default(F,v,g(B,z)))}}return y}function T(e,t){void 0===t&&(t={});for(var n=A(e,t),r=n[0],i=function(){var e=n.pop(),r=(0,u.default)(n);e.parentNode&&e.parentNode.parentNode&&(e.parentNode===r&&e.tagName===r.tagName?!0!==t.parseNoneClosedTags&&(r.removeChild(e),e.childNodes.forEach((function(e){r.parentNode.appendChild(e)})),n.pop()):!0!==t.parseNoneClosedTags&&(r.removeChild(e),e.childNodes.forEach((function(e){r.appendChild(e)}))))};n.length>1;)i();return r}function C(e,t){return e.map((function(e){return e.parentNode=t,e}))}t.base_parse=A,t.parse=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var r,i=n(423);var o=((r=i)&&r.__esModule?r:{default:r}).default,s=o.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=o.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=o.canUseDOM?window.NodeList:{},t.canUseDOM=o.canUseDOM;t.default=s},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.modal-overlay{display:flex;align-items:center;justify-content:center;padding:calc(5rem*var(--scale-factor, 1));z-index:1000;position:fixed;inset:0px}@media screen and (max-width: 480px){.modal-overlay{padding:calc(2rem*var(--scale-factor, 1))}}.modal-content{inline-size:560px;max-block-size:100%;border:0;border-radius:10px;display:flex;flex-direction:column}.modal-content label,.modal-content legend{font-weight:700}.modal-content input[type=text]{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));inline-size:100%;box-sizing:border-box;border:2px solid rgba(0,0,0,0);border-radius:12px;padding:calc(.5rem*var(--scale-factor, 1));display:block}.modal-content:focus-visible{border:3px solid #cd2356;outline:none}.modal-content__header{display:flex;align-items:center;min-block-size:fit-content;padding:calc(1rem*var(--scale-factor, 1)) calc(.5rem*var(--scale-factor, 1)) calc(1rem*var(--scale-factor, 1)) calc(1rem*var(--scale-factor, 1))}.modal-content__header button{margin-inline-start:auto;block-size:fit-content}.modal-content__heading{font-size:calc(1.5rem*var(--scale-factor, 1));line-height:calc(2rem*var(--scale-factor, 1));margin-block:calc(.5rem*var(--scale-factor, 1));margin-inline:calc(.5rem*var(--scale-factor, 1)) 0}.modal-content__body{padding:calc(1.5rem*var(--scale-factor, 1));display:flex;flex-direction:column;row-gap:calc(.5rem*var(--scale-factor, 1));overflow-y:auto}.modal-content__subheading{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));margin:0;font-weight:700}.modal-content__text{margin:0;line-height:1.4}.modal-content__help-text{margin:calc(.25rem*var(--scale-factor, 1)) 0;font-weight:400}.modal-content__inputs{display:flex;flex-direction:column;gap:calc(2rem*var(--scale-factor, 1))}.modal-content__input-section{display:flex;flex-direction:column;gap:calc(.5rem*var(--scale-factor, 1))}.modal-content__buttons{padding:calc(1rem*var(--scale-factor, 1));display:flex;flex-wrap:wrap;flex-direction:row-reverse;gap:calc(1rem*var(--scale-factor, 1));justify-content:flex-start}@media screen and (max-width: 480px){.modal-content__buttons{display:flex;flex-direction:column}}.modal-content__buttons button,.modal-content__buttons a{margin:0}.modal-content__buttons button span,.modal-content__buttons a span{inline-size:100%}@media screen and (max-width: 480px){.modal-content__buttons button,.modal-content__buttons a{inline-size:100%}}.modal-content__links{text-align:center;margin-block:calc(.5rem*var(--scale-factor, 1)) calc(.25rem*var(--scale-factor, 1));margin-inline:0}.modal-content__links button{text-decoration:underline}.--dark .modal-overlay{background-color:rgba(0,0,0,.5)}.--dark .modal-overlay input{border:2px solid #fff;background-color:#33353d;color:inherit}.--dark .modal-overlay input:focus-visible{border:2px solid var(--rpf-input-active-border);outline:none}.--dark .modal-content{background-color:#33353d}.--dark .modal-content__header{border-block-end:1px solid #636674}.--dark .modal-content__help-text{color:#ccc}.--dark .modal-content__buttons{border-block-start:1px solid #636674}.--light .modal-overlay{background-color:rgba(67,69,76,.5)}.--light .modal-overlay input{border:2px solid #e3e4e8}.--light .modal-overlay input:focus-visible{border:2px solid var(--rpf-input-active-border);outline:none}.--light .modal-content{background-color:#fff}.--light .modal-content__header{border-block-end:1px solid #d5d7dc}.--light .modal-content__help-text{color:#4d575b}.--light .modal-content__buttons{border-block-start:1px solid #d5d7dc}",""])},function(e,t,n){"use strict";e.exports=n(349)},function(e,t,n){"use strict";e.exports=n(412)},function(e,t,n){"use strict";function r(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(i){return"function"==typeof i?i(n,r,e):t(i)}}}}var i=r();i.withExtraArgument=r,t.a=i},function(e,t){function n(e,t,n){var r,i,o,s,a;function l(){var c=Date.now()-s;c<t&&c>=0?r=setTimeout(l,t-c):(r=null,n||(a=e.apply(o,i),o=i=null))}null==t&&(t=100);var c=function(){o=this,i=arguments,s=Date.now();var c=n&&!r;return r||(r=setTimeout(l,t)),c&&(a=e.apply(o,i),o=i=null),a};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(a=e.apply(o,i),o=i=null,clearTimeout(r),r=null)},c}n.debounce=n,e.exports=n},function(e,t,n){"use strict";
|
||
/*!
|
||
* mime-types
|
||
* Copyright(c) 2014 Jonathan Ong
|
||
* Copyright(c) 2015 Douglas Christopher Wilson
|
||
* MIT Licensed
|
||
*/var r,i,o,s=n(362),a=n(364).extname,l=/^\s*([^;\s]*)(?:;|\s|$)/,c=/^text\//i;function u(e){if(!e||"string"!=typeof e)return!1;var t=l.exec(e),n=t&&s[t[1].toLowerCase()];return n&&n.charset?n.charset:!(!t||!c.test(t[1]))&&"UTF-8"}t.charset=u,t.charsets={lookup:u},t.contentType=function(e){if(!e||"string"!=typeof e)return!1;var n=-1===e.indexOf("/")?t.lookup(e):e;if(!n)return!1;if(-1===n.indexOf("charset")){var r=t.charset(n);r&&(n+="; charset="+r.toLowerCase())}return n},t.extension=function(e){if(!e||"string"!=typeof e)return!1;var n=l.exec(e),r=n&&t.extensions[n[1].toLowerCase()];if(!r||!r.length)return!1;return r[0]},t.extensions=Object.create(null),t.lookup=function(e){if(!e||"string"!=typeof e)return!1;var n=a("x."+e).toLowerCase().substr(1);if(!n)return!1;return t.types[n]||!1},t.types=Object.create(null),r=t.extensions,i=t.types,o=["nginx","apache",void 0,"iana"],Object.keys(s).forEach((function(e){var t=s[e],n=t.extensions;if(n&&n.length){r[e]=n;for(var a=0;a<n.length;a++){var l=n[a];if(i[l]){var c=o.indexOf(s[i[l]].source),u=o.indexOf(t.source);if("application/octet-stream"!==i[l]&&(c>u||c===u&&"application/"===i[l].substr(0,12)))continue}i[l]=e}}}))},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.NodeType=t.TextNode=t.Node=t.valid=t.CommentNode=t.HTMLElement=t.parse=void 0;var i=r(n(153));t.CommentNode=i.default;var o=r(n(104));t.HTMLElement=o.default;var s=r(n(79));t.Node=s.default;var a=r(n(154));t.TextNode=a.default;var l=r(n(69));t.NodeType=l.default;var c=r(n(368)),u=r(n(369));function d(e,t){return void 0===t&&(t={}),(0,c.default)(e,t)}t.valid=u.default,t.default=d,t.parse=d,d.parse=c.default,d.HTMLElement=o.default,d.CommentNode=i.default,d.valid=u.default,d.Node=s.default,d.TextNode=a.default,d.NodeType=l.default},function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return o}));var i=n(190);function o(){return!Object(i.a)()&&"[object process]"===Object.prototype.toString.call(void 0!==e?e:0)}function s(e,t){return e.require(t)}}).call(this,n(36),n(64)(e))},,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const r=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function i(e){const t=e.match(r);if(!e||!t)return;let n;return"1"===t[3]?n=!0:"0"===t[3]&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}},function(e,t,n){"use strict";t.decode=t.parse=n(210),t.encode=t.stringify=n(211)},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";var r=n(29);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var s=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),s.push(i(t)+"="+i(e))})))})),o=s.join("&")}if(o){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},function(e,t,n){"use strict";var r=n(29),i=n(222),o=n(223),s=n(118),a=n(224),l=n(227),c=n(228),u=n(121),d=n(73),h=n(74);e.exports=function(e){return new Promise((function(t,n){var p,f=e.data,m=e.headers,g=e.responseType;function b(){e.cancelToken&&e.cancelToken.unsubscribe(p),e.signal&&e.signal.removeEventListener("abort",p)}r.isFormData(f)&&delete m["Content-Type"];var v=new XMLHttpRequest;if(e.auth){var y=e.auth.username||"",S=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";m.Authorization="Basic "+btoa(y+":"+S)}var _=a(e.baseURL,e.url);function x(){if(v){var r="getAllResponseHeaders"in v?l(v.getAllResponseHeaders()):null,o={data:g&&"text"!==g&&"json"!==g?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:r,config:e,request:v};i((function(e){t(e),b()}),(function(e){n(e),b()}),o),v=null}}if(v.open(e.method.toUpperCase(),s(_,e.params,e.paramsSerializer),!0),v.timeout=e.timeout,"onloadend"in v?v.onloadend=x:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(x)},v.onabort=function(){v&&(n(u("Request aborted",e,"ECONNABORTED",v)),v=null)},v.onerror=function(){n(u("Network Error",e,null,v)),v=null},v.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||d.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(u(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",v)),v=null},r.isStandardBrowserEnv()){var w=(e.withCredentials||c(_))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;w&&(m[e.xsrfHeaderName]=w)}"setRequestHeader"in v&&r.forEach(m,(function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete m[t]:v.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(v.withCredentials=!!e.withCredentials),g&&"json"!==g&&(v.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&v.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&v.upload&&v.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(p=function(e){v&&(n(!e||e&&e.type?new h("canceled"):e),v.abort(),v=null)},e.cancelToken&&e.cancelToken.subscribe(p),e.signal&&(e.signal.aborted?p():e.signal.addEventListener("abort",p))),f||(f=null),v.send(f)}))}},function(e,t,n){"use strict";var r=n(119);e.exports=function(e,t,n,i,o){var s=new Error(e);return r(s,t,n,i,o)}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";var r=n(29);e.exports=function(e,t){t=t||{};var n={};function i(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function o(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(e[n],t[n])}function s(e){if(!r.isUndefined(t[e]))return i(void 0,t[e])}function a(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(void 0,t[n])}function l(n){return n in t?i(e[n],t[n]):n in e?i(void 0,e[n]):void 0}var c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||o,i=t(e);r.isUndefined(i)&&t!==l||(n[e]=i)})),n}},function(e,t){e.exports={version:"0.24.0"}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(52),i=n(67);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(28))},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var r=n(251),i=n(258),o=n(260),s=n(261),a=n(262);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},function(e,t,n){var r=n(132),i=n(126),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var s=e[t];o.call(e,t)&&i(s,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t,n){var r=n(133);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var r=n(45),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},function(e,t,n){var r=n(265),i=n(135),o=n(47),s=n(136),a=n(268),l=n(269),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),u=!n&&i(e),d=!n&&!u&&s(e),h=!n&&!u&&!d&&l(e),p=n||u||d||h,f=p?r(e.length,String):[],m=f.length;for(var g in e)!t&&!c.call(e,g)||p&&("length"==g||d&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,m))||f.push(g);return f}},function(e,t,n){var r=n(266),i=n(46),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return i(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=l},function(e,t,n){(function(e){var r=n(32),i=n(267),o=t&&!t.nodeType&&t,s=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=s&&s.exports===o?r.Buffer:void 0,l=(a?a.isBuffer:void 0)||i;e.exports=l}).call(this,n(65)(e))},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(127),i=n(137);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(97),i=n(98),o=n(96),s=n(140),a=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,o(e)),e=i(e);return t}:s;e.exports=a},function(e,t,n){var r=n(97),i=n(47);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},function(e,t,n){var r=n(142),i=n(141),o=n(95);e.exports=function(e){return r(e,o,i)}},function(e,t,n){var r=n(102);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.proj{display:flex;flex-flow:column;overflow:hidden;block-size:100%;block-size:-moz-available;block-size:-webkit-stretch;block-size:stretch}.proj-header{display:flex;flex:1 0 auto;justify-content:space-between;padding-inline:5px}.editor-controls{display:flex}.proj-controls{padding-block-start:20px}.proj-share-link{padding-inline:5px}.proj-container{display:flex;flex-direction:row;overflow-y:hidden;grid-gap:calc(1rem*var(--scale-factor, 1));margin:calc(1rem*var(--scale-factor, 1));block-size:100%}.proj-container .project-wrapper{container-type:inline-size;display:flex;flex-direction:column;grid-gap:calc(.5rem*var(--scale-factor, 1));flex:1 1 auto;overflow:hidden}.proj-container .proj-editor-wrapper{display:flex;flex:0 1 auto;flex-flow:column;grid-gap:calc(1rem*var(--scale-factor, 1));overflow:hidden;block-size:100%;inline-size:100%}@container (min-width: 720px){.proj-container .proj-editor-wrapper{flex-flow:row}.proj-container .proj-editor-container{max-block-size:100% !important}.proj-container--wc .proj-runner-container,.proj-container--wc .proj-editor-container{inline-size:50%}}.proj-container .sidebar,.proj-container .proj-editor-container,.proj-container .proj-runner-container{border-radius:8px}.proj-container .proj-editor-container{display:flex;box-sizing:border-box;min-block-size:30%;max-block-size:70%}.proj-container .proj-editor-container .react-tabs__tab-panel--selected{overflow-y:hidden}.proj-container .proj-runner-container{display:flex;box-sizing:border-box;flex:5;overflow:hidden}.proj-container .proj-runner-container .react-tabs__tab-panel--selected{overflow-y:auto}.proj-container--wc{min-block-size:200px}.proj-container--wc .proj-runner-container,.proj-container--wc .proj-editor-container{inline-size:100%}.proj-editor-container .react-tabs__tab-list,.proj-runner-container .react-tabs__tab-list{flex:1}.proj-editor-container .react-tabs__tab-container .btn--run,.proj-editor-container .react-tabs__tab-container .btn--stop,.proj-runner-container .react-tabs__tab-container .btn--run,.proj-runner-container .react-tabs__tab-container .btn--stop{margin-block-start:0;margin-block-end:0}.--light .proj-runner-container,.--light .proj-editor-container,.--light .sidebar{background-color:#fff}@media screen and (min-width: 601px){.--light .proj-runner-container,.--light .proj-editor-container,.--light .sidebar{border:1px solid #d5d7dc}}.--dark .proj-runner-container,.--dark .proj-editor-container,.--dark .sidebar{background-color:#2a2b32}@media screen and (min-width: 601px){.--dark .proj-runner-container,.--dark .proj-editor-container,.--dark .sidebar{border:1px solid #4a4d59}}",""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){for(var t=[],n=0,r=Object.keys(e);n<r.length;n++){var i=r[n],o=e[i];t.push({minWidth:null!=o.minWidth?o.minWidth:0,maxWidth:null!=o.maxWidth?o.maxWidth:1/0,minHeight:null!=o.minHeight?o.minHeight:0,maxHeight:null!=o.maxHeight?o.maxHeight:1/0,className:i})}return function(e){for(var n=e.height,r=e.width,i={},o=0,s=t;o<s.length;o++){var a=s[o],l=a.className,c=a.minWidth,u=a.maxWidth,d=a.minHeight,h=a.maxHeight;i[l]=null!=n&&null!=r?c<=r&&r<=u&&d<=n&&n<=h:null==n&&null!=r?c<=r&&r<=u:null==n||null!=r||d<=n&&n<=h}return i}}},function(e,t,n){"use strict";(e.exports={}).forEach=function(e,t){for(var n=0;n<e.length;n++){var r=t(e[n]);if(r)return r}}},function(e,t,n){"use strict";var r=e.exports={};r.isIE=function(e){return(-1!==(t=navigator.userAgent.toLowerCase()).indexOf("msie")||-1!==t.indexOf("trident")||-1!==t.indexOf(" edge/"))&&(!e||e===function(){var e=3,t=document.createElement("div"),n=t.getElementsByTagName("i");do{t.innerHTML="\x3c!--[if gt IE "+ ++e+"]><i></i><![endif]--\x3e"}while(n[0]);return e>4?e:void 0}());var t},r.isLegacyOpera=function(){return!!window.opera}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.prototype.hasOwnProperty;t.default=function(e,t){var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var o=0;o<n.length;o++)if(!r.call(t,n[o])||e[n[o]]!==t[n[o]])return!1;return!0}},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.pythonrunner-container{display:flex;flex-direction:column;flex:1;block-size:100%;inline-size:100%}.pythonrunner-console{padding:calc(.5rem*var(--scale-factor, 1)) calc(1.5rem*var(--scale-factor, 1));margin:0;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;width:100%;word-wrap:break-word;overflow-y:auto}.pythonrunner-console--medium{font-size:calc(1.5rem*var(--scale-factor, 1));line-height:calc(2rem*var(--scale-factor, 1))}.pythonrunner-console--large{font-size:calc(2rem*var(--scale-factor, 1));line-height:calc(2.5rem*var(--scale-factor, 1))}.pythonrunner-console-output-line{padding-inline-end:5px}.pythonrunner-console-output-line.stderr{color:red}.pythonrunner-input{caret-color:inherit;color:#2467ec;display:block;line-height:20px;padding:2px 1px 2px 0}.pythonrunner-input:focus{outline:0}.pythonrunner-graphic{overflow:auto;position:relative}.visual-output{flex:1;display:flex;min-block-size:100%;inline-size:100%}#p5Sketch{display:flex;flex:1;position:absolute}.--light .visual-output{background:url(\"data:image/svg+xml,%3Csvg width='525' height='686' viewBox='0 0 525 686' fill='none' xmlns='http:%2F%2Fwww.w3.org/2000/svg' xmlns:xlink='http:%2F%2Fwww.w3.org/1999/xlink'%3E%3Crect width='526' height='686' transform='translate(0.5)' fill='url(%23pattern0)' fill-opacity='0.1'/%3E%3Cdefs%3E%3Cpattern id='pattern0' patternContentUnits='objectBoundingBox' width='0.0152091' height='0.0116618'%3E%3Cuse xlink:href='%23image0_214_29626' transform='scale(0.00190114 0.00145773)'/%3E%3C/pattern%3E%3Cimage id='image0_214_29626' width='8' height='8' xlink:href='data:image/png%3Bbase64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAAXNSR0IArs4c6QAAABdJREFUGBljYGBg+A/FQAoTMGEKDUcRAATwAgFGIXEOAAAAAElFTkSuQmCC'/%3E%3C/defs%3E%3C/svg%3E\")}.--dark .visual-output{background:url(\"data:image/svg+xml,%3Csvg width='527' height='684' viewBox='0 0 527 684' fill='none' xmlns='http:%2F%2Fwww.w3.org/2000/svg' xmlns:xlink='http:%2F%2Fwww.w3.org/1999/xlink'%3E%3Crect width='526' height='686' transform='translate(0.388916)' fill='url(%23pattern0)'/%3E%3Cdefs%3E%3Cpattern id='pattern0' patternContentUnits='objectBoundingBox' width='0.0152091' height='0.0116618'%3E%3Cuse xlink:href='%23image0_214_22403' transform='scale(0.00190114 0.00145773)'/%3E%3C/pattern%3E%3Cimage id='image0_214_22403' width='8' height='8' xlink:href='data:image/png%3Bbase64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAAXNSR0IArs4c6QAAABdJREFUGBljYGBg+A/FQAoTMGEKDUcRAATwAgFGIXEOAAAAAElFTkSuQmCC'/%3E%3C/defs%3E%3C/svg%3E%0A\")}.output-panel{display:flex;overflow:hidden}.output-panel--text{flex:3}.output-panel--visual{flex:7}.--light .output-panel--visual{border-block-end:5px solid #e3e4e8}.--dark .output-panel--visual{border-block-end:5px solid #4a4d59}.--light .output-panel--single,.--dark .output-panel--single{border-block-end:none}",""])},function(e,t,n){var r=n(34).default,i=n(339);e.exports=function(e){var t=i(e,"string");return"symbol"===r(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,".error-message{color:#7e0305;background-color:#fde2e1;padding:calc(.75rem*var(--scale-factor, 1)) calc(1.25rem*var(--scale-factor, 1))}.error-message__content{padding:0;margin:0;white-space:pre-wrap;word-break:break-word}.error-message--medium{font-size:calc(1.5rem*var(--scale-factor, 1));line-height:calc(2rem*var(--scale-factor, 1))}.error-message--large{font-size:calc(2rem*var(--scale-factor, 1));line-height:calc(2.5rem*var(--scale-factor, 1))}",""])},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(n(79)),a=o(n(69)),l=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.rawText=t,i.nodeType=a.default.COMMENT_NODE,i}return i(t,e),t.prototype.clone=function(){return new t(this.rawText,null)},Object.defineProperty(t.prototype,"text",{get:function(){return this.rawText},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"\x3c!--".concat(this.rawText,"--\x3e")},t}(s.default);t.default=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(103),a=o(n(79)),l=o(n(69)),c=function(e){function t(t,n,r){var i=e.call(this,n,r)||this;return i.nodeType=l.default.TEXT_NODE,i._rawText=t,i}return i(t,e),t.prototype.clone=function(){return new t(this._rawText,null)},Object.defineProperty(t.prototype,"rawText",{get:function(){return this._rawText},set:function(e){this._rawText=e,this._trimmedRawText=void 0,this._trimmedText=void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"trimmedRawText",{get:function(){return void 0!==this._trimmedRawText||(this._trimmedRawText=u(this.rawText)),this._trimmedRawText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"trimmedText",{get:function(){return void 0!==this._trimmedText||(this._trimmedText=u(this.text)),this._trimmedText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"text",{get:function(){return(0,s.decode)(this.rawText)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isWhitespace",{get:function(){return/^(\s| )*$/.test(this.rawText)},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return this.rawText},t}(a.default);function u(e){for(var t,n,r=0;r>=0&&r<e.length;)/\S/.test(e[r])&&(void 0===t?(t=r,r=e.length):(n=r,r=void 0)),void 0===t?r++:r--;void 0===t&&(t=0),void 0===n&&(n=e.length-1);var i=t>0&&/[^\S\r\n]/.test(e[t-1]),o=n<e.length-1&&/[^\S\r\n]/.test(e[n+1]);return(i?" ":"")+e.slice(t,n+1)+(o?" ":"")}t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return void 0===e&&(e=""),e?String(e).replace(/^[^A-Za-z0-9]*|[^A-Za-z0-9]*$/g,"").replace(/[^A-Za-z0-9]+/g,"$").replace(/([a-z])([A-Z])/g,(function(e,t,n){return t+"$"+n})).toLowerCase().replace(/(\$)(\w)/g,(function(e,t,n){return n.toUpperCase()})):""}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return void 0===e&&(e=""),e?String(e).replace(/^[^A-Za-z0-9]*|[^A-Za-z0-9]*$/g,"").replace(/([a-z])([A-Z])/g,(function(e,t,n){return t+"_"+n.toLowerCase()})).replace(/[^A-Za-z0-9]+|_+/g,"_").toLowerCase():""}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return void 0===e&&(e=""),e?String(e).replace(/^[^A-Za-z0-9]*|[^A-Za-z0-9]*$/g,"$").replace(/[^A-Za-z0-9]+/g,"$").replace(/([a-z])([A-Z])/g,(function(e,t,n){return t+"$"+n})).toLowerCase().replace(/(\$)(\w?)/g,(function(e,t,n){return n.toUpperCase()})):""}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return void 0===e&&(e=""),e?String(e).replace(/^[^A-Za-z0-9]*|[^A-Za-z0-9]*$/g,"").replace(/([a-z])([A-Z])/g,(function(e,t,n){return t+"_"+n.toLowerCase()})).replace(/[^A-Za-z0-9]+|_+/g,"-").toLowerCase():""}},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.sidebar{display:flex;position:relative;scrollbar-width:none}.sidebar--mobile{inline-size:100%;overflow-y:hidden}.editor-logo{block-size:calc(2.5rem*var(--scale-factor, 1));inline-size:calc(2.5rem*var(--scale-factor, 1));padding:calc(.75rem*var(--scale-factor, 1))}.sidebar__bar{display:flex;flex-direction:column;justify-content:space-between;border-radius:8px;background-color:var(--sidebar-background)}.sidebar__bar--selected{border-radius:8px 0 0 8px;background-color:var(--sidebar-background-selected);border-inline-end:1px solid var(--sidebar-border)}.sidebar__bar-options--top,.sidebar__bar-options--bottom{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:calc(.5rem*var(--scale-factor, 1))}.sidebar__bar-option-wrapper{padding:calc(.75*.5rem*var(--scale-factor, 1));border:1px solid rgba(0,0,0,0)}.sidebar__bar-option-wrapper--selected{background-color:var(--sidebar-panel-background);border-radius:calc(.5rem*var(--scale-factor, 1)) 0 0 calc(.5rem*var(--scale-factor, 1));border-block:1px solid var(--sidebar-border);border-inline-start:1px solid var(--sidebar-border)}.sidebar__bar-option-wrapper--selected .sidebar__bar-option{border:2px solid var(--sidebar-option-selected-border)}.sidebar__bar-option{display:flex;align-items:center;justify-content:center;box-sizing:border-box;margin:0;border:2px solid rgba(0,0,0,0)}.sidebar__bar-option svg{margin:0}.sidebar__bar-option:hover{background-color:var(--sidebar-option-hover)}.sidebar__bar-option--selected{background-color:var(--sidebar-option-selected-background)}.sidebar__bar-option--selected svg{fill:var(--sidebar-option-selected-icon)}.sidebar__bar-option--selected:hover{background-color:var(--sidebar-option-selected-background-hover)}.sidebar__bar-close{border-block-start:1px solid var(--sidebar-border)}.sidebar__panel{display:flex;flex-direction:column;padding:calc(1rem*var(--scale-factor, 1));border-radius:0 8px 8px 0;inline-size:inherit;background:var(--sidebar-panel-background)}.sidebar__panel--with-footer{padding-block-end:calc(2rem*var(--scale-factor, 1))}.sidebar__panel-heading{margin:0;font-size:calc(1.5rem*var(--scale-factor, 1));line-height:calc(2rem*var(--scale-factor, 1))}.sidebar__panel-header{display:flex;flex-direction:column;gap:calc(1rem*var(--scale-factor, 1));padding-block-end:calc(1rem*var(--scale-factor, 1));border-block-end:1px solid var(--sidebar-border)}.sidebar__panel-content{flex:1;padding:calc(1rem*var(--scale-factor, 1)) 0;overflow-y:scroll;scrollbar-width:thin;overflow:auto}.sidebar__panel-footer{border-block-start:1px solid #d5d7dc;inset-block-end:0px;inline-size:100%;inline-size:-moz-available;inline-size:-webkit-stretch;inline-size:stretch;background-color:#fff;border-end-end-radius:8px}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.draggable-tab{user-select:none}.draggable-tab:focus-visible{outline:none}.--dark .draggable-tab:focus-visible .react-tabs__tab{outline:2px auto #fff;outline-offset:-1px}.--light .draggable-tab:focus-visible .react-tabs__tab{outline:2px auto Highlight;outline:2px auto -webkit-focus-ring-color;outline-offset:-1px}.droppable-tab-list{display:flex;inline-size:100%}",""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]).filter(s)};
|
||
/*!
|
||
* Adapted from jQuery UI core
|
||
*
|
||
* http://jqueryui.com
|
||
*
|
||
* Copyright 2014 jQuery Foundation and other contributors
|
||
* Released under the MIT license.
|
||
* http://jquery.org/license
|
||
*
|
||
* http://api.jqueryui.com/category/ui-core/
|
||
*/
|
||
var r=/input|select|textarea|button|object|iframe/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var n=window.getComputedStyle(e),r=n.getPropertyValue("display");return t?"contents"!==r&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,n):"none"===r}catch(e){return console.warn("Failed to inspect element style"),!1}}function o(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),i(t))return!1;t=t.parentNode}return!0}(e)}function s(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&o(e,!n)}e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){a&&(a.removeAttribute?a.removeAttribute("aria-hidden"):null!=a.length?a.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(a).forEach((function(e){return e.removeAttribute("aria-hidden")})));a=null},t.log=function(){0},t.assertNodeList=l,t.setElement=function(e){var t=e;if("string"==typeof t&&s.canUseDOM){var n=document.querySelectorAll(t);l(n,t),t=n}return a=t||a},t.validateElement=c,t.hide=function(e){var t=!0,n=!1,r=void 0;try{for(var i,o=c(e)[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){i.value.setAttribute("aria-hidden","true")}}catch(e){n=!0,r=e}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}},t.show=function(e){var t=!0,n=!1,r=void 0;try{for(var i,o=c(e)[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){i.value.removeAttribute("aria-hidden")}}catch(e){n=!0,r=e}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}},t.documentNotReadyOrSSRTesting=function(){a=null};var r,i=n(422),o=(r=i)&&r.__esModule?r:{default:r},s=n(105);var a=null;function l(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function c(e){var t=e||a;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,o.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(i.openInstances.length),i.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){i=new r};var r=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},i=new r;t.default=i},function(e,t,n){"use strict";var r=n(14);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},function(e,t,n){"use strict";function r(){return"undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(195),i=n(11),o=n(10);function s(){Object(r.a)("error",a),Object(r.a)("unhandledrejection",a)}function a(){const e=Object(o.a)();if(e){const t="internal_error";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}},function(e,t,n){"use strict";e.exports=n(209)},function(e,t,n){"use strict";(function(t){var r=n(116),i=n(212),o=n(215);const s=parseInt(t.env.PARSE_LINK_HEADER_MAXLEN)||2e3,a=null!=t.env.PARSE_LINK_HEADER_THROW_ON_MAXLEN_EXCEEDED;function l(e){return e&&e.rel}function c(e,t){return t.rel.split(/\s+/).forEach((function(n){e[n]=o(t,{rel:n})})),e}function u(e,t){var n=t.match(/\s*(.+)\s*=\s*"?([^"]+)"?/);return n&&(e[n[1]]=n[2]),e}function d(e){try{var t=e.match(/<?([^>]*)>(.*)/),n=t[1],s=t[2].split(";"),a=i.parse(n),l=r.parse(a.query);s.shift();var c=s.reduce(u,{});return(c=o(l,c)).url=n,c}catch(e){return null}}e.exports=function(e){return function(e){if(!e)return!1;if(e.length>s){if(a)throw new Error("Input string too long, it should be under "+s+" characters.");return!1}return!0}(e)?e.split(/,\s*</).map(d).filter(l).reduce(c,{}):null}}).call(this,n(36))},function(e,t,n){var r=n(125),i=n(233),o=n(299),s=n(101),a=n(68),l=n(310),c=n(312),u=n(143),d=c((function(e,t){var n={};if(null==e)return n;var c=!1;t=r(t,(function(t){return t=s(t,e),c||(c=t.length>1),t})),a(e,u(e),n),c&&(n=i(n,7,l));for(var d=t.length;d--;)o(n,t[d]);return n}));e.exports=d},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),a=n(14),l=n(146),c=n(326),u=n(149);t.useContainerQuery=function(e,t){var n=s.useState((function(){return t?l.default(e)(t):{}})),r=n[0],i=n[1],o=s.useState(null),a=o[0],u=o[1],d=s.useCallback((function(e){u(e)}),[u]);return s.useEffect((function(){if(a){var t=new c.default(e,(function(e){i(e)}));return t.observe(a),function(){t.disconnect(),t=null}}}),[e,a,i]),[r,d]};var d=function(e){function t(t){var n=e.call(this,t)||this;return n.cqCore=null,n.state={params:t.initialSize?l.default(t.query)(t.initialSize):{}},n}return i(t,e),t.prototype.componentDidMount=function(){this._startObserving(this.props.query)},t.prototype.UNSAFE_componentWillReceiveProps=function(e){this.cqCore&&!function(e,t){var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!h.call(t,n[i])||!u.default(e[n[i]],t[n[i]]))return!1;return!0}(this.props.query,e.query)&&(this.cqCore.disconnect(),this.cqCore=null,this._startObserving(e.query))},t.prototype.componentDidUpdate=function(){this.cqCore.observe(a.findDOMNode(this))},t.prototype.componentWillUnmount=function(){this.cqCore.disconnect(),this.cqCore=null},t.prototype.render=function(){return this.props.children(this.state.params)},t.prototype._startObserving=function(e){var t=this;this.cqCore=new c.default(e,(function(e){t.setState({params:e})})),this.cqCore.observe(a.findDOMNode(this))},t}(s.Component);t.ContainerQuery=d,t.applyContainerQuery=function(e,t,n){return(r=function(r){function u(e){var i=r.call(this,e)||this;return i.cqCore=null,i.state={params:n?l.default(t)(n):{}},i}return i(u,r),u.prototype.componentDidMount=function(){var e=this;this.cqCore=new c.default(t,(function(t){e.setState({params:t})})),this.cqCore.observe(a.findDOMNode(this))},u.prototype.componentDidUpdate=function(){this.cqCore.observe(a.findDOMNode(this))},u.prototype.componentWillUnmount=function(){this.cqCore.disconnect(),this.cqCore=null},u.prototype.render=function(){return s.createElement(e,o({},this.props,{containerQuery:this.state.params}))},u}(s.Component)).displayName=e.displayName?"ContainerQuery("+e.displayName+")":"ContainerQuery",r;var r};var h=Object.prototype.hasOwnProperty},function(e,t){e.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(151);function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i)}}e.exports=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(0),s=h(o),a=h(n(12)),l=h(n(30)),c=h(n(353)),u=h(n(354)),d=n(355);function h(e){return e&&e.__esModule?e:{default:e}}var p=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleClick=n.handleClick.bind(n),n.handleTouchStart=n.handleTouchStart.bind(n),n.handleTouchMove=n.handleTouchMove.bind(n),n.handleTouchEnd=n.handleTouchEnd.bind(n),n.handleFocus=n.handleFocus.bind(n),n.handleBlur=n.handleBlur.bind(n),n.previouslyChecked=!(!e.checked&&!e.defaultChecked),n.state={checked:!(!e.checked&&!e.defaultChecked),hasFocus:!1},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidUpdate",value:function(e){e.checked!==this.props.checked&&this.setState({checked:!!this.props.checked})}},{key:"handleClick",value:function(e){if(!this.props.disabled){var t=this.input;if(e.target!==t&&!this.moved)return this.previouslyChecked=t.checked,e.preventDefault(),t.focus(),void t.click();var n=this.props.hasOwnProperty("checked")?this.props.checked:t.checked;this.setState({checked:n})}}},{key:"handleTouchStart",value:function(e){this.props.disabled||(this.startX=(0,d.pointerCoord)(e).x,this.activated=!0)}},{key:"handleTouchMove",value:function(e){if(this.activated&&(this.moved=!0,this.startX)){var t=(0,d.pointerCoord)(e).x;this.state.checked&&t+15<this.startX?(this.setState({checked:!1}),this.startX=t,this.activated=!0):t-15>this.startX&&(this.setState({checked:!0}),this.startX=t,this.activated=t<this.startX+5)}}},{key:"handleTouchEnd",value:function(e){if(this.moved){var t=this.input;if(e.preventDefault(),this.startX){var n=(0,d.pointerCoord)(e).x;!0===this.previouslyChecked&&this.startX+4>n?this.previouslyChecked!==this.state.checked&&(this.setState({checked:!1}),this.previouslyChecked=this.state.checked,t.click()):this.startX-4<n&&this.previouslyChecked!==this.state.checked&&(this.setState({checked:!0}),this.previouslyChecked=this.state.checked,t.click()),this.activated=!1,this.startX=null,this.moved=!1}}}},{key:"handleFocus",value:function(e){var t=this.props.onFocus;t&&t(e),this.setState({hasFocus:!0})}},{key:"handleBlur",value:function(e){var t=this.props.onBlur;t&&t(e),this.setState({hasFocus:!1})}},{key:"getIcon",value:function(e){var n=this.props.icons;return n?void 0===n[e]?t.defaultProps.icons[e]:n[e]:null}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,i=(t.icons,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["className","icons"])),o=(0,a.default)("react-toggle",{"react-toggle--checked":this.state.checked,"react-toggle--focus":this.state.hasFocus,"react-toggle--disabled":this.props.disabled},n);return s.default.createElement("div",{className:o,onClick:this.handleClick,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd},s.default.createElement("div",{className:"react-toggle-track"},s.default.createElement("div",{className:"react-toggle-track-check"},this.getIcon("checked")),s.default.createElement("div",{className:"react-toggle-track-x"},this.getIcon("unchecked"))),s.default.createElement("div",{className:"react-toggle-thumb"}),s.default.createElement("input",r({},i,{ref:function(t){e.input=t},onFocus:this.handleFocus,onBlur:this.handleBlur,className:"react-toggle-screenreader-only",type:"checkbox"})))}}]),t}(o.PureComponent);t.default=p,p.displayName="Toggle",p.defaultProps={icons:{checked:s.default.createElement(c.default,null),unchecked:s.default.createElement(u.default,null)}},p.propTypes={checked:l.default.bool,disabled:l.default.bool,defaultChecked:l.default.bool,onChange:l.default.func,onFocus:l.default.func,onBlur:l.default.func,className:l.default.string,name:l.default.string,value:l.default.string,id:l.default.string,"aria-labelledby":l.default.string,"aria-label":l.default.string,icons:l.default.oneOfType([l.default.bool,l.default.shape({checked:l.default.node,unchecked:l.default.node})])}},function(e,t,n){var r;"undefined"!=typeof self&&self,e.exports=(r=n(0),function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t){e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Validate=t.Time=void 0;var r=o(n(5)),i=o(n(6));function o(e){return e&&e.__esModule?e:{default:e}}t.Time=r.default,t.Validate=i.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useInterval=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(7));t.useInterval=r.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useTime=t.useStopwatch=t.useTimer=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.default=function(e){if((0,i.useEffect)((function(){console.warn("react-timer-hook: default export useTimer is deprecated, use named exports { useTimer, useStopwatch, useTime } instead")}),[]),e.expiryTimestamp){var t=(0,o.default)(e);return r({},t,{startTimer:t.start,stopTimer:t.pause,resetTimer:function(){}})}var n=(0,s.default)(e);return r({},n,{startTimer:n.start,stopTimer:n.pause,resetTimer:n.reset})};var i=n(0),o=l(n(4)),s=l(n(8)),a=l(n(9));function l(e){return e&&e.__esModule?e:{default:e}}t.useTimer=o.default,t.useStopwatch=s.default,t.useTime=a.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.default=function(e){var t=e.expiryTimestamp,n=e.onExpire,u=e.autoStart,d=void 0===u||u,h=(0,o.useState)(t),p=i(h,2),f=p[0],m=p[1],g=(0,o.useState)(s.Time.getSecondsFromExpiry(f)),b=i(g,2),v=b[0],y=b[1],S=(0,o.useState)(d),_=i(S,2),x=_[0],w=_[1],k=(0,o.useState)(d),O=i(k,2),E=O[0],A=O[1],T=(0,o.useState)(c(f)),C=i(T,2),M=C[0],$=C[1];function P(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];$(c(e)),A(t),w(t),m(e),y(s.Time.getSecondsFromExpiry(e))}function R(){var e=new Date;e.setMilliseconds(e.getMilliseconds()+1e3*v),P(e)}return(0,a.useInterval)((function(){M!==l&&$(l);var e=s.Time.getSecondsFromExpiry(f);y(e),e<=0&&(s.Validate.onExpire(n)&&n(),w(!1),$(null))}),x?M:null),r({},s.Time.getTimeFromSeconds(v),{start:function(){E?(y(s.Time.getSecondsFromExpiry(f)),w(!0)):R()},pause:function(){w(!1)},resume:R,restart:P,isRunning:x})};var o=n(0),s=n(1),a=n(2),l=1e3;function c(e){if(!s.Validate.expiryTimestamp(e))return null;var t=s.Time.getSecondsFromExpiry(e),n=Math.floor(1e3*(t-Math.floor(t)));return n>0?n:l}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"getTimeFromSeconds",value:function(e){var t=Math.ceil(e),n=Math.floor(t/86400),r=Math.floor(t%86400/3600),i=Math.floor(t%3600/60);return{seconds:Math.floor(t%60),minutes:i,hours:r,days:n}}},{key:"getSecondsFromExpiry",value:function(e,t){var n=e-(new Date).getTime();if(n>0){var r=n/1e3;return t?Math.round(r):r}return 0}},{key:"getSecondsFromPrevTime",value:function(e,t){var n=(new Date).getTime()-e;if(n>0){var r=n/1e3;return t?Math.round(r):r}return 0}},{key:"getSecondsFromTimeNow",value:function(){var e=new Date;return e.getTime()/1e3-60*e.getTimezoneOffset()}},{key:"getFormattedTimeFromSeconds",value:function(t,n){var r=e.getTimeFromSeconds(t),i=r.seconds,o=r.minutes,s=r.hours,a="",l=s;return"12-hour"===n&&(a=s>=12?"pm":"am",l=s%12),{seconds:i,minutes:o,hours:l,ampm:a}}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"expiryTimestamp",value:function(e){var t=new Date(e).getTime()>0;return t||console.warn("react-timer-hook: { useTimer } Invalid expiryTimestamp settings",e),t}},{key:"onExpire",value:function(e){var t=e&&"function"==typeof e;return e&&!t&&console.warn("react-timer-hook: { useTimer } Invalid onExpire settings function",e),t}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,r.useRef)();(0,r.useEffect)((function(){n.current=e})),(0,r.useEffect)((function(){if(!t)return function(){};var e=setInterval((function(){n.current&&n.current()}),t);return function(){return clearInterval(e)}}),[t])};var r=n(0)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.default=function(e){var t=e.autoStart,n=e.offsetTimestamp,l=(0,o.useState)(s.Time.getSecondsFromExpiry(n,!0)||0),c=i(l,2),u=c[0],d=c[1],h=(0,o.useState)(new Date),p=i(h,2),f=p[0],m=p[1],g=(0,o.useState)(u+s.Time.getSecondsFromPrevTime(f||0,!0)),b=i(g,2),v=b[0],y=b[1],S=(0,o.useState)(t),_=i(S,2),x=_[0],w=_[1];return(0,a.useInterval)((function(){y(u+s.Time.getSecondsFromPrevTime(f,!0))}),x?1e3:null),r({},s.Time.getTimeFromSeconds(v),{start:function(){var e=new Date;m(e),w(!0),y(u+s.Time.getSecondsFromPrevTime(e,!0))},pause:function(){d(v),w(!1)},reset:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=s.Time.getSecondsFromExpiry(e,!0)||0,r=new Date;m(r),d(n),w(t),y(n+s.Time.getSecondsFromPrevTime(r,!0))},isRunning:x})};var o=n(0),s=n(1),a=n(2)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.default=function(e){var t=e.format,n=(0,o.useState)(s.Time.getSecondsFromTimeNow()),l=i(n,2),c=l[0],u=l[1];return(0,a.useInterval)((function(){u(s.Time.getSecondsFromTimeNow())}),1e3),r({},s.Time.getFormattedTimeFromSeconds(c,t))};var o=n(0),s=n(1),a=n(2)}]))},function(e,t,n){"use strict";var r;!function(i,o){e.exports?(o.default=o,e.exports=i.document?o(i):o):void 0===(r=function(){return o(i)}.call(t,n,t,e))||(e.exports=r)}("undefined"!=typeof window?window:this,(function(e){function t(e,t,n,r){e.hasOwnProperty(t)||(e[t]=r.apply(null,n))}var n={};return t(n,"Core/Globals.js",[],(function(){var t,n=void 0!==e?e:"undefined"!=typeof window?window:{};return function(e){e.SVG_NS="http://www.w3.org/2000/svg",e.product="Highcharts",e.version="9.3.3",e.win=n,e.doc=e.win.document,e.svg=e.doc&&e.doc.createElementNS&&!!e.doc.createElementNS(e.SVG_NS,"svg").createSVGRect,e.userAgent=e.win.navigator&&e.win.navigator.userAgent||"",e.isChrome=-1!==e.userAgent.indexOf("Chrome"),e.isFirefox=-1!==e.userAgent.indexOf("Firefox"),e.isMS=/(edge|msie|trident)/i.test(e.userAgent)&&!e.win.opera,e.isSafari=!e.isChrome&&-1!==e.userAgent.indexOf("Safari"),e.isTouchDevice=/(Mobile|Android|Windows Phone)/.test(e.userAgent),e.isWebKit=-1!==e.userAgent.indexOf("AppleWebKit"),e.deg2rad=2*Math.PI/360,e.hasBidiBug=e.isFirefox&&4>parseInt(e.userAgent.split("Firefox/")[1],10),e.hasTouch=!!e.win.TouchEvent,e.marginNames=["plotTop","marginRight","marginBottom","plotLeft"],e.noop=function(){},e.supportsPassiveEvents=function(){var t=!1;if(!e.isMS){var n=Object.defineProperty({},"passive",{get:function(){t=!0}});e.win.addEventListener&&e.win.removeEventListener&&(e.win.addEventListener("testPassive",e.noop,n),e.win.removeEventListener("testPassive",e.noop,n))}return t}(),e.charts=[],e.dateFormats={},e.seriesTypes={},e.symbolSizes={},e.chartCount=0}(t||(t={})),t})),t(n,"Core/Utilities.js",[n["Core/Globals.js"]],(function(e){function t(n,r,i,o){var s=r?"Highcharts error":"Highcharts warning";32===n&&(n=s+": Deprecated member");var a=l(n),c=a?s+" #"+n+": www.highcharts.com/errors/"+n+"/":n.toString();if(void 0!==o){var u="";a&&(c+="?"),m(o,(function(e,t){u+="\n - "+t+": "+e,a&&(c+=encodeURI(t)+"="+encodeURI(e))})),c+=u}b(e,"displayError",{chart:i,code:n,message:c,params:o},(function(){if(r)throw Error(c);S.console&&-1===t.messages.indexOf(c)&&console.warn(c)})),t.messages.push(c)}function n(e,t){return parseInt(e,t||10)}function r(e){return"string"==typeof e}function i(e){return"[object Array]"===(e=Object.prototype.toString.call(e))||"[object Array Iterator]"===e}function o(e,t){return!(!e||"object"!=typeof e||t&&i(e))}function s(e){return o(e)&&"number"==typeof e.nodeType}function a(e){var t=e&&e.constructor;return!(!o(e,!0)||s(e)||!t||!t.name||"Object"===t.name)}function l(e){return"number"==typeof e&&!isNaN(e)&&1/0>e&&-1/0<e}function c(e){return null!=e}function u(e,t,n){var i;return r(t)?c(n)?e.setAttribute(t,n):e&&e.getAttribute&&((i=e.getAttribute(t))||"class"!==t||(i=e.getAttribute(t+"Name"))):m(t,(function(t,n){c(t)?e.setAttribute(n,t):e.removeAttribute(n)})),i}function d(e,t){var n;for(n in e||(e={}),t)e[n]=t[n];return e}function h(){for(var e=arguments,t=e.length,n=0;n<t;n++){var r=e[n];if(null!=r)return r}}function p(t,n){e.isMS&&!e.svg&&n&&void 0!==n.opacity&&(n.filter="alpha(opacity="+100*n.opacity+")"),d(t.style,n)}function f(e,t){return 1e14<e?e:parseFloat(e.toPrecision(t||14))}function m(e,t,n){for(var r in e)Object.hasOwnProperty.call(e,r)&&t.call(n||e[r],e[r],r,e)}function g(t,n,r){function i(n,r){var i=t.removeEventListener||e.removeEventListenerPolyfill;i&&i.call(t,n,r,!1)}function o(e){var r;if(t.nodeName){if(n){var o={};o[n]=!0}else o=e;m(o,(function(t,n){if(e[n])for(r=e[n].length;r--;)i(n,e[n][r].fn)}))}}var s="function"==typeof t&&t.prototype||t;if(Object.hasOwnProperty.call(s,"hcEvents")){var a=s.hcEvents;n?(s=a[n]||[],r?(a[n]=s.filter((function(e){return r!==e.fn})),i(n,r)):(o(a),a[n]=[])):(o(a),delete s.hcEvents)}}function b(t,n,r,i){if(r=r||{},y.createEvent&&(t.dispatchEvent||t.fireEvent&&t!==e)){var o=y.createEvent("Events");o.initEvent(n,!0,!0),r=d(o,r),t.dispatchEvent?t.dispatchEvent(r):t.fireEvent(n,r)}else if(t.hcEvents){r.target||d(r,{preventDefault:function(){r.defaultPrevented=!0},target:t,type:n}),o=[];for(var s=t,a=!1;s.hcEvents;)Object.hasOwnProperty.call(s,"hcEvents")&&s.hcEvents[n]&&(o.length&&(a=!0),o.unshift.apply(o,s.hcEvents[n])),s=Object.getPrototypeOf(s);a&&o.sort((function(e,t){return e.order-t.order})),o.forEach((function(e){!1===e.fn.call(t,r)&&r.preventDefault()}))}i&&!r.defaultPrevented&&i.call(t,r)}var v=e.charts,y=e.doc,S=e.win;(t||(t={})).messages=[],Math.easeInOutSine=function(e){return-.5*(Math.cos(Math.PI*e)-1)};var _=Array.prototype.find?function(e,t){return e.find(t)}:function(e,t){var n,r=e.length;for(n=0;n<r;n++)if(t(e[n],n))return e[n]};m({map:"map",each:"forEach",grep:"filter",reduce:"reduce",some:"some"},(function(n,r){e[r]=function(e){var i;return t(32,!1,void 0,((i={})["Highcharts."+r]="use Array."+n,i)),Array.prototype[n].apply(e,[].slice.call(arguments,1))}}));var x,w=function(){var e=Math.random().toString(36).substring(2,9)+"-",t=0;return function(){return"highcharts-"+(x?"":e)+t++}}();return S.jQuery&&(S.jQuery.fn.highcharts=function(){var t=[].slice.call(arguments);if(this[0])return t[0]?(new(e[r(t[0])?t.shift():"Chart"])(this[0],t[0],t[1]),this):v[u(this[0],"data-highcharts-chart")]}),_={addEvent:function(t,n,r,i){void 0===i&&(i={});var o="function"==typeof t&&t.prototype||t;Object.hasOwnProperty.call(o,"hcEvents")||(o.hcEvents={}),o=o.hcEvents,e.Point&&t instanceof e.Point&&t.series&&t.series.chart&&(t.series.chart.runTrackerClick=!0);var s=t.addEventListener||e.addEventListenerPolyfill;return s&&s.call(t,n,r,!!e.supportsPassiveEvents&&{passive:void 0===i.passive?-1!==n.indexOf("touch"):i.passive,capture:!1}),o[n]||(o[n]=[]),o[n].push({fn:r,order:"number"==typeof i.order?i.order:1/0}),o[n].sort((function(e,t){return e.order-t.order})),function(){g(t,n,r)}},arrayMax:function(e){for(var t=e.length,n=e[0];t--;)e[t]>n&&(n=e[t]);return n},arrayMin:function(e){for(var t=e.length,n=e[0];t--;)e[t]<n&&(n=e[t]);return n},attr:u,clamp:function(e,t,n){return e>t?e<n?e:n:t},cleanRecursively:function e(t,n){var r={};return m(t,(function(i,s){o(t[s],!0)&&!t.nodeType&&n[s]?(i=e(t[s],n[s]),Object.keys(i).length&&(r[s]=i)):(o(t[s])||t[s]!==n[s])&&(r[s]=t[s])})),r},clearTimeout:function(e){c(e)&&clearTimeout(e)},correctFloat:f,createElement:function(e,t,n,r,i){return e=y.createElement(e),t&&d(e,t),i&&p(e,{padding:"0",border:"none",margin:"0"}),n&&p(e,n),r&&r.appendChild(e),e},css:p,defined:c,destroyObjectProperties:function(e,t){m(e,(function(n,r){n&&n!==t&&n.destroy&&n.destroy(),delete e[r]}))},discardElement:function(e){e&&e.parentElement&&e.parentElement.removeChild(e)},erase:function(e,t){for(var n=e.length;n--;)if(e[n]===t){e.splice(n,1);break}},error:t,extend:d,extendClass:function(e,t){var n=function(){};return d(n.prototype=new e,t),n},find:_,fireEvent:b,getMagnitude:function(e){return Math.pow(10,Math.floor(Math.log(e)/Math.LN10))},getNestedProperty:function(e,t){for(e=e.split(".");e.length&&c(t);){var n=e.shift();if(void 0===n||"__proto__"===n)return;if(!c(t=t[n])||"function"==typeof t||"number"==typeof t.nodeType||t===S)return}return t},getStyle:function r(i,o,s){var a=e.getStyle||r;if("width"===o)return o=Math.min(i.offsetWidth,i.scrollWidth),(s=i.getBoundingClientRect&&i.getBoundingClientRect().width)<o&&s>=o-1&&(o=Math.floor(s)),Math.max(0,o-(a(i,"padding-left",!0)||0)-(a(i,"padding-right",!0)||0));if("height"===o)return Math.max(0,Math.min(i.offsetHeight,i.scrollHeight)-(a(i,"padding-top",!0)||0)-(a(i,"padding-bottom",!0)||0));if(S.getComputedStyle||t(27,!0),i=S.getComputedStyle(i,void 0)){var l=i.getPropertyValue(o);h(s,"opacity"!==o)&&(l=n(l))}return l},inArray:function(e,n,r){return t(32,!1,void 0,{"Highcharts.inArray":"use Array.indexOf"}),n.indexOf(e,r)},isArray:i,isClass:a,isDOMElement:s,isFunction:function(e){return"function"==typeof e},isNumber:l,isObject:o,isString:r,keys:function(e){return t(32,!1,void 0,{"Highcharts.keys":"use Object.keys"}),Object.keys(e)},merge:function(){var e,t=arguments,n={},r=function(e,t){return"object"!=typeof e&&(e={}),m(t,(function(n,i){"__proto__"!==i&&"constructor"!==i&&(!o(n,!0)||a(n)||s(n)?e[i]=t[i]:e[i]=r(e[i]||{},n))})),e};!0===t[0]&&(n=t[1],t=Array.prototype.slice.call(t,2));var i=t.length;for(e=0;e<i;e++)n=r(n,t[e]);return n},normalizeTickInterval:function(e,t,n,r,i){var o=e,s=e/(n=h(n,1));for(t||(t=i?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===r&&(1===n?t=t.filter((function(e){return 0==e%1})):.1>=n&&(t=[1/n]))),r=0;r<t.length&&(o=t[r],!(i&&o*n>=e||!i&&s<=(t[r]+(t[r+1]||t[r]))/2));r++);return f(o*n,-Math.round(Math.log(.001)/Math.LN10))},objectEach:m,offset:function(e){var t=y.documentElement;return{top:(e=e.parentElement||e.parentNode?e.getBoundingClientRect():{top:0,left:0,width:0,height:0}).top+(S.pageYOffset||t.scrollTop)-(t.clientTop||0),left:e.left+(S.pageXOffset||t.scrollLeft)-(t.clientLeft||0),width:e.width,height:e.height}},pad:function(e,t,n){return Array((t||2)+1-String(e).replace("-","").length).join(n||"0")+e},pick:h,pInt:n,relativeLength:function(e,t,n){return/%$/.test(e)?t*parseFloat(e)/100+(n||0):parseFloat(e)},removeEvent:g,splat:function(e){return i(e)?e:[e]},stableSort:function(e,t){var n,r,i=e.length;for(r=0;r<i;r++)e[r].safeI=r;for(e.sort((function(e,r){return 0===(n=t(e,r))?e.safeI-r.safeI:n})),r=0;r<i;r++)delete e[r].safeI},syncTimeout:function(e,t,n){return 0<t?setTimeout(e,t,n):(e.call(0,n),-1)},timeUnits:{millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:24192e5,year:314496e5},uniqueKey:w,useSerialIds:function(e){return x=h(e,x)},wrap:function(e,t,n){var r=e[t];e[t]=function(){var e=Array.prototype.slice.call(arguments),t=arguments,i=this;return i.proceed=function(){r.apply(i,arguments.length?arguments:t)},e.unshift(r),e=n.apply(this,e),i.proceed=null,e}}}})),t(n,"Core/Chart/ChartDefaults.js",[],(function(){return{panning:{enabled:!1,type:"x"},styledMode:!1,borderRadius:0,colorCount:10,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}},zoomBySingleTouch:!1,width:null,height:null,borderColor:"#335cad",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"}})),t(n,"Core/Color/Color.js",[n["Core/Globals.js"],n["Core/Utilities.js"]],(function(e,t){var n=t.isNumber,r=t.merge,i=t.pInt;return t=function(){function t(n){this.rgba=[NaN,NaN,NaN,NaN],this.input=n;var r=e.Color;return r&&r!==t?new r(n):this instanceof t?void this.init(n):new t(n)}return t.parse=function(e){return e?new t(e):t.None},t.prototype.init=function(e){var n;if("object"==typeof e&&void 0!==e.stops)this.stops=e.stops.map((function(e){return new t(e[1])}));else if("string"==typeof e){if(this.input=e=t.names[e.toLowerCase()]||e,"#"===e.charAt(0)){var r=e.length,i=parseInt(e.substr(1),16);7===r?n=[(16711680&i)>>16,(65280&i)>>8,255&i,1]:4===r&&(n=[(3840&i)>>4|(3840&i)>>8,(240&i)>>4|240&i,(15&i)<<4|15&i,1])}if(!n)for(i=t.parsers.length;i--&&!n;){var o=t.parsers[i];(r=o.regex.exec(e))&&(n=o.parse(r))}}n&&(this.rgba=n)},t.prototype.get=function(e){var t=this.input,i=this.rgba;if("object"==typeof t&&void 0!==this.stops){var o=r(t);return o.stops=[].slice.call(o.stops),this.stops.forEach((function(t,n){o.stops[n]=[o.stops[n][0],t.get(e)]})),o}return i&&n(i[0])?"rgb"===e||!e&&1===i[3]?"rgb("+i[0]+","+i[1]+","+i[2]+")":"a"===e?""+i[3]:"rgba("+i.join(",")+")":t},t.prototype.brighten=function(e){var t=this.rgba;if(this.stops)this.stops.forEach((function(t){t.brighten(e)}));else if(n(e)&&0!==e)for(var r=0;3>r;r++)t[r]+=i(255*e),0>t[r]&&(t[r]=0),255<t[r]&&(t[r]=255);return this},t.prototype.setOpacity=function(e){return this.rgba[3]=e,this},t.prototype.tweenTo=function(e,t){var r=this.rgba,i=e.rgba;return n(r[0])&&n(i[0])?((e=1!==i[3]||1!==r[3])?"rgba(":"rgb(")+Math.round(i[0]+(r[0]-i[0])*(1-t))+","+Math.round(i[1]+(r[1]-i[1])*(1-t))+","+Math.round(i[2]+(r[2]-i[2])*(1-t))+(e?","+(i[3]+(r[3]-i[3])*(1-t)):"")+")":e.input||"none"},t.names={white:"#ffffff",black:"#000000"},t.parsers=[{regex:/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,parse:function(e){return[i(e[1]),i(e[2]),i(e[3]),parseFloat(e[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(e){return[i(e[1]),i(e[2]),i(e[3]),1]}}],t.None=new t(""),t}()})),t(n,"Core/Color/Palettes.js",[],(function(){return{colors:"#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" ")}})),t(n,"Core/Time.js",[n["Core/Globals.js"],n["Core/Utilities.js"]],(function(e,t){var n=e.win,r=t.defined,i=t.error,o=t.extend,s=t.isObject,a=t.merge,l=t.objectEach,c=t.pad,u=t.pick,d=t.splat,h=t.timeUnits,p=e.isSafari&&n.Intl&&n.Intl.DateTimeFormat.prototype.formatRange,f=e.isSafari&&n.Intl&&!n.Intl.DateTimeFormat.prototype.formatRange;return t=function(){function t(e){this.options={},this.variableTimezone=this.useUTC=!1,this.Date=n.Date,this.getTimezoneOffset=this.timezoneOffsetFunction(),this.update(e)}return t.prototype.get=function(e,t){if(this.variableTimezone||this.timezoneOffset){var n=t.getTime(),r=n-this.getTimezoneOffset(t);return t.setTime(r),e=t["getUTC"+e](),t.setTime(n),e}return this.useUTC?t["getUTC"+e]():t["get"+e]()},t.prototype.set=function(e,t,n){if(this.variableTimezone||this.timezoneOffset){if("Milliseconds"===e||"Seconds"===e||"Minutes"===e&&0==this.getTimezoneOffset(t)%36e5)return t["setUTC"+e](n);var r=this.getTimezoneOffset(t);return r=t.getTime()-r,t.setTime(r),t["setUTC"+e](n),e=this.getTimezoneOffset(t),r=t.getTime()+e,t.setTime(r)}return this.useUTC||p&&"FullYear"===e?t["setUTC"+e](n):t["set"+e](n)},t.prototype.update=function(e){var t=u(e&&e.useUTC,!0);this.options=e=a(!0,this.options||{},e),this.Date=e.Date||n.Date||Date,this.timezoneOffset=(this.useUTC=t)&&e.timezoneOffset,this.getTimezoneOffset=this.timezoneOffsetFunction(),this.variableTimezone=t&&!(!e.getTimezoneOffset&&!e.timezone)},t.prototype.makeTime=function(e,t,n,r,i,o){if(this.useUTC){var s=this.Date.UTC.apply(0,arguments),a=this.getTimezoneOffset(s);s+=a;var l=this.getTimezoneOffset(s);a!==l?s+=l-a:a-36e5!==this.getTimezoneOffset(s-36e5)||f||(s-=36e5)}else s=new this.Date(e,t,u(n,1),u(r,0),u(i,0),u(o,0)).getTime();return s},t.prototype.timezoneOffsetFunction=function(){var e=this,t=this.options,r=t.getTimezoneOffset,o=t.moment||n.moment;if(!this.useUTC)return function(e){return 6e4*new Date(e.toString()).getTimezoneOffset()};if(t.timezone){if(o)return function(e){return 6e4*-o.tz(e,t.timezone).utcOffset()};i(25)}return this.useUTC&&r?function(e){return 6e4*r(e.valueOf())}:function(){return 6e4*(e.timezoneOffset||0)}},t.prototype.dateFormat=function(t,n,i){if(!r(n)||isNaN(n))return e.defaultOptions.lang&&e.defaultOptions.lang.invalidDate||"";t=u(t,"%Y-%m-%d %H:%M:%S");var s=this,a=new this.Date(n),d=this.get("Hours",a),h=this.get("Day",a),p=this.get("Date",a),f=this.get("Month",a),m=this.get("FullYear",a),g=e.defaultOptions.lang,b=g&&g.weekdays,v=g&&g.shortWeekdays;return a=o({a:v?v[h]:b[h].substr(0,3),A:b[h],d:c(p),e:c(p,2," "),w:h,b:g.shortMonths[f],B:g.months[f],m:c(f+1),o:f+1,y:m.toString().substr(2,2),Y:m,H:c(d),k:d,I:c(d%12||12),l:d%12||12,M:c(this.get("Minutes",a)),p:12>d?"AM":"PM",P:12>d?"am":"pm",S:c(a.getSeconds()),L:c(Math.floor(n%1e3),3)},e.dateFormats),l(a,(function(e,r){for(;-1!==t.indexOf("%"+r);)t=t.replace("%"+r,"function"==typeof e?e.call(s,n):e)})),i?t.substr(0,1).toUpperCase()+t.substr(1):t},t.prototype.resolveDTLFormat=function(e){return s(e,!0)?e:{main:(e=d(e))[0],from:e[1],to:e[2]}},t.prototype.getTimeTicks=function(e,t,n,i){var s,a=this,l=[],c={},d=new a.Date(t),p=e.unitRange,f=e.count||1;if(i=u(i,1),r(t)){if(a.set("Milliseconds",d,p>=h.second?0:f*Math.floor(a.get("Milliseconds",d)/f)),p>=h.second&&a.set("Seconds",d,p>=h.minute?0:f*Math.floor(a.get("Seconds",d)/f)),p>=h.minute&&a.set("Minutes",d,p>=h.hour?0:f*Math.floor(a.get("Minutes",d)/f)),p>=h.hour&&a.set("Hours",d,p>=h.day?0:f*Math.floor(a.get("Hours",d)/f)),p>=h.day&&a.set("Date",d,p>=h.month?1:Math.max(1,f*Math.floor(a.get("Date",d)/f))),p>=h.month){a.set("Month",d,p>=h.year?0:f*Math.floor(a.get("Month",d)/f));var m=a.get("FullYear",d)}p>=h.year&&a.set("FullYear",d,m-m%f),p===h.week&&(m=a.get("Day",d),a.set("Date",d,a.get("Date",d)-m+i+(m<i?-7:0))),m=a.get("FullYear",d),i=a.get("Month",d);var g=a.get("Date",d),b=a.get("Hours",d);for(t=d.getTime(),!a.variableTimezone&&a.useUTC||!r(n)||(s=n-t>4*h.month||a.getTimezoneOffset(t)!==a.getTimezoneOffset(n)),t=d.getTime(),d=1;t<n;)l.push(t),t=p===h.year?a.makeTime(m+d*f,0):p===h.month?a.makeTime(m,i+d*f):!s||p!==h.day&&p!==h.week?s&&p===h.hour&&1<f?a.makeTime(m,i,g,b+d*f):t+p*f:a.makeTime(m,i,g+d*f*(p===h.day?1:7)),d++;l.push(t),p<=h.hour&&1e4>l.length&&l.forEach((function(e){0==e%18e5&&"000000000"===a.dateFormat("%H%M%S%L",e)&&(c[e]="day")}))}return l.info=o(e,{higherRanks:c,totalRange:p*f}),l},t.prototype.getDateFormat=function(e,t,n,r){var i=this.dateFormat("%m-%d %H:%M:%S.%L",t),o={millisecond:15,second:12,minute:9,hour:6,day:3},s="millisecond";for(a in h){if(e===h.week&&+this.dateFormat("%w",t)===n&&"00:00:00.000"===i.substr(6)){var a="week";break}if(h[a]>e){a=s;break}if(o[a]&&i.substr(o[a])!=="01-01 00:00:00.000".substr(o[a]))break;"week"!==a&&(s=a)}if(a)var l=this.resolveDTLFormat(r[a]).main;return l},t}()})),t(n,"Core/DefaultOptions.js",[n["Core/Chart/ChartDefaults.js"],n["Core/Color/Color.js"],n["Core/Globals.js"],n["Core/Color/Palettes.js"],n["Core/Time.js"],n["Core/Utilities.js"]],(function(e,t,n,r,i,o){t=t.parse;var s=o.merge,a={colors:r.colors,symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),decimalPoint:".",numericSymbols:"kMGTPE".split(""),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{},time:{Date:void 0,getTimezoneOffset:void 0,timezone:void 0,timezoneOffset:0,useUTC:!0},chart:e,title:{text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{text:"",align:"center",widthAdjust:-44},caption:{margin:15,text:"",align:"left",verticalAlign:"bottom"},plotOptions:{},labels:{style:{position:"absolute",color:"#333333"}},legend:{enabled:!0,align:"center",alignColumns:!0,className:"highcharts-no-tooltip",layout:"horizontal",labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{activeColor:"#003399",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",cursor:"pointer",fontSize:"12px",fontWeight:"bold",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#cccccc"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:n.svg,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},footerFormat:"",headerShape:"callout",hideDelay:500,padding:8,shape:"callout",shared:!1,snap:n.isTouchDevice?25:10,headerFormat:'<span style="font-size: 10px">{point.key}</span><br/>',pointFormat:'<span style="color:{point.color}">●</span> {series.name}: <b>{point.y}</b><br/>',backgroundColor:t("#f7f7f7").setOpacity(.85).get(),borderWidth:1,shadow:!0,stickOnContact:!1,style:{color:"#333333",cursor:"default",fontSize:"12px",whiteSpace:"nowrap"},useHTML:!1},credits:{enabled:!0,href:"https://www.highcharts.com?credits",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"9px"},text:"Highcharts.com"}};a.chart.styledMode=!1;var l=new i(s(a.global,a.time));return e={defaultOptions:a,defaultTime:l,getOptions:function(){return a},setOptions:function(e){return s(!0,a,e),(e.time||e.global)&&(n.time?n.time.update(s(a.global,a.time,e.global,e.time)):n.time=l),a}}})),t(n,"Core/Animation/Fx.js",[n["Core/Color/Color.js"],n["Core/Globals.js"],n["Core/Utilities.js"]],(function(e,t,n){var r=e.parse,i=t.win,o=n.isNumber,s=n.objectEach;return function(){function e(e,t,n){this.pos=NaN,this.options=t,this.elem=e,this.prop=n}return e.prototype.dSetter=function(){var e=this.paths,t=e&&e[0];e=e&&e[1];var n=this.now||0,r=[];if(1!==n&&t&&e)if(t.length===e.length&&1>n)for(var i=0;i<e.length;i++){for(var s=t[i],a=e[i],l=[],c=0;c<a.length;c++){var u=s[c],d=a[c];o(u)&&o(d)&&("A"!==a[0]||4!==c&&5!==c)?l[c]=u+n*(d-u):l[c]=d}r.push(l)}else r=e;else r=this.toD||[];this.elem.attr("d",r,void 0,!0)},e.prototype.update=function(){var e=this.elem,t=this.prop,n=this.now,r=this.options.step;this[t+"Setter"]?this[t+"Setter"]():e.attr?e.element&&e.attr(t,n,null,!0):e.style[t]=n+this.unit,r&&r.call(e,n,this)},e.prototype.run=function(t,n,r){var o=this,s=o.options,a=function(e){return!a.stopped&&o.step(e)},l=i.requestAnimationFrame||function(e){setTimeout(e,13)},c=function(){for(var t=0;t<e.timers.length;t++)e.timers[t]()||e.timers.splice(t--,1);e.timers.length&&l(c)};t!==n||this.elem["forceAnimate:"+this.prop]?(this.startTime=+new Date,this.start=t,this.end=n,this.unit=r,this.now=this.start,this.pos=0,a.elem=this.elem,a.prop=this.prop,a()&&1===e.timers.push(a)&&l(c)):(delete s.curAnim[this.prop],s.complete&&0===Object.keys(s.curAnim).length&&s.complete.call(this.elem))},e.prototype.step=function(e){var t=+new Date,n=this.options,r=this.elem,i=n.complete,o=n.duration,a=n.curAnim;if(r.attr&&!r.element)e=!1;else if(e||t>=o+this.startTime){this.now=this.end,this.pos=1,this.update();var l=a[this.prop]=!0;s(a,(function(e){!0!==e&&(l=!1)})),l&&i&&i.call(r),e=!1}else this.pos=n.easing((t-this.startTime)/o),this.now=this.start+(this.end-this.start)*this.pos,this.update(),e=!0;return e},e.prototype.initPath=function(e,t,n){function r(e,t){for(;e.length<h;){var n=e[0],r=t[h-e.length];r&&"M"===n[0]&&(e[0]="C"===r[0]?["C",n[1],n[2],n[1],n[2],n[1],n[2]]:["L",n[1],n[2]]),e.unshift(n),l&&(n=e.pop(),e.push(e[e.length-1],n))}}function i(e,t){for(;e.length<h;)if("C"===(t=e[Math.floor(e.length/c)-1].slice())[0]&&(t[1]=t[5],t[2]=t[6]),l){var n=e[Math.floor(e.length/c)].slice();e.splice(e.length/2,0,t,n)}else e.push(t)}var s=e.startX,a=e.endX;n=n.slice();var l=e.isArea,c=l?2:1;if(!(t=t&&t.slice()))return[n,n];if(s&&a&&a.length){for(e=0;e<s.length;e++){if(s[e]===a[0]){var u=e;break}if(s[0]===a[a.length-s.length+e]){u=e;var d=!0;break}if(s[s.length-1]===a[a.length-s.length+e]){u=s.length-e;break}}void 0===u&&(t=[])}if(t.length&&o(u)){var h=n.length+u*c;d?(r(t,n),i(n,t)):(r(n,t),i(t,n))}return[t,n]},e.prototype.fillSetter=function(){e.prototype.strokeSetter.apply(this,arguments)},e.prototype.strokeSetter=function(){this.elem.attr(this.prop,r(this.start).tweenTo(r(this.end),this.pos),void 0,!0)},e.timers=[],e}()})),t(n,"Core/Animation/AnimationUtilities.js",[n["Core/Animation/Fx.js"],n["Core/Utilities.js"]],(function(e,t){function n(e){return l(e)?c({duration:500,defer:0},e):{duration:e?500:0,defer:0}}function r(t,n){for(var r=e.timers.length;r--;)e.timers[r].elem!==t||n&&n!==e.timers[r].prop||(e.timers[r].stopped=!0)}var i=t.defined,o=t.getStyle,s=t.isArray,a=t.isNumber,l=t.isObject,c=t.merge,u=t.objectEach,d=t.pick;return{animate:function(t,n,i){var d,h,p,f="";if(!l(i)){var m=arguments;i={duration:m[2],easing:m[3],complete:m[4]}}a(i.duration)||(i.duration=400),i.easing="function"==typeof i.easing?i.easing:Math[i.easing]||Math.easeInOutSine,i.curAnim=c(n),u(n,(function(a,l){r(t,l),p=new e(t,i,l),h=void 0,"d"===l&&s(n.d)?(p.paths=p.initPath(t,t.pathArray,n.d),p.toD=n.d,d=0,h=1):t.attr?d=t.attr(l):(d=parseFloat(o(t,l))||0,"opacity"!==l&&(f="px")),h||(h=a),"string"==typeof h&&h.match("px")&&(h=h.replace(/px/g,"")),p.run(d,h,f)}))},animObject:n,getDeferredAnimation:function(e,t,r){var o=n(t),s=0,a=0;return(r?[r]:e.series).forEach((function(e){e=n(e.options.animation),s=t&&i(t.defer)?o.defer:Math.max(s,e.duration+e.defer),a=Math.min(o.duration,e.duration)})),e.renderer.forExport&&(s=0),{defer:Math.max(0,s-a),duration:Math.min(s,a)}},setAnimation:function(e,t){t.renderer.globalAnimation=d(e,t.options.chart.animation,!0)},stop:r}})),t(n,"Core/Renderer/HTML/AST.js",[n["Core/Globals.js"],n["Core/Utilities.js"]],(function(e,t){var n=e.SVG_NS,r=t.attr,i=t.createElement,o=t.error,s=t.isFunction,a=t.isString,l=t.objectEach,c=t.splat,u=(t=e.win.trustedTypes)&&s(t.createPolicy)&&t.createPolicy("highcharts",{createHTML:function(e){return e}}),d=u?u.createHTML(""):"";try{var h=!!(new DOMParser).parseFromString(d,"text/html")}catch(e){h=!1}return s=function(){function t(e){this.nodes="string"==typeof e?this.parseMarkup(e):e}return t.filterUserAttributes=function(e){return l(e,(function(n,r){var i=!0;-1===t.allowedAttributes.indexOf(r)&&(i=!1),-1!==["background","dynsrc","href","lowsrc","src"].indexOf(r)&&(i=a(n)&&t.allowedReferences.some((function(e){return 0===n.indexOf(e)}))),i||(o("Highcharts warning: Invalid attribute '"+r+"' in config"),delete e[r])})),e},t.setElementHTML=function(e,n){e.innerHTML=t.emptyHTML,n&&new t(n).addToDOM(e)},t.prototype.addToDOM=function(i){return function i(s,a){var u;return c(s).forEach((function(s){var c=s.tagName,d=s.textContent?e.doc.createTextNode(s.textContent):void 0;if(c)if("#text"===c)var h=d;else if(-1!==t.allowedTags.indexOf(c)){c=e.doc.createElementNS("svg"===c?n:a.namespaceURI||n,c);var p=s.attributes||{};l(s,(function(e,t){"tagName"!==t&&"attributes"!==t&&"children"!==t&&"textContent"!==t&&(p[t]=e)})),r(c,t.filterUserAttributes(p)),d&&c.appendChild(d),i(s.children||[],c),h=c}else o("Highcharts warning: Invalid tagName "+c+" in config");h&&a.appendChild(h),u=h})),u}(this.nodes,i)},t.prototype.parseMarkup=function(e){var t=[];if(e=e.trim(),h)e=(new DOMParser).parseFromString(u?u.createHTML(e):e,"text/html");else{var n=i("div");n.innerHTML=e,e={body:n}}var r=function(e,t){var n=e.nodeName.toLowerCase(),i={tagName:n};if("#text"===n&&(i.textContent=e.textContent||""),n=e.attributes){var o={};[].forEach.call(n,(function(e){o[e.name]=e.value})),i.attributes=o}if(e.childNodes.length){var s=[];[].forEach.call(e.childNodes,(function(e){r(e,s)})),s.length&&(i.children=s)}t.push(i)};return[].forEach.call(e.body.childNodes,(function(e){return r(e,t)})),t},t.allowedAttributes="aria-controls aria-describedby aria-expanded aria-haspopup aria-hidden aria-label aria-labelledby aria-live aria-pressed aria-readonly aria-roledescription aria-selected class clip-path color colspan cx cy d dx dy disabled fill height href id in markerHeight markerWidth offset opacity orient padding paddingLeft paddingRight patternUnits r refX refY role scope slope src startOffset stdDeviation stroke stroke-linecap stroke-width style tableValues result rowspan summary target tabindex text-align textAnchor textLength title type valign width x x1 x2 y y1 y2 zIndex".split(" "),t.allowedReferences="https:// http:// mailto: / ../ ./ #".split(" "),t.allowedTags="a abbr b br button caption circle clipPath code dd defs div dl dt em feComponentTransfer feFuncA feFuncB feFuncG feFuncR feGaussianBlur feOffset feMerge feMergeNode filter h1 h2 h3 h4 h5 h6 hr i img li linearGradient marker ol p path pattern pre rect small span stop strong style sub sup svg table text thead tbody tspan td th tr u ul #text".split(" "),t.emptyHTML=d,t}()})),t(n,"Core/FormatUtilities.js",[n["Core/DefaultOptions.js"],n["Core/Utilities.js"]],(function(e,t){function n(e,t,n,i){e=+e||0,t=+t;var o=r.lang,c=(e.toString().split(".")[1]||"").split("e")[0].length,u=e.toString().split("e"),d=t;if(-1===t)t=Math.min(c,20);else if(s(t)){if(t&&u[1]&&0>u[1]){var h=t+ +u[1];0<=h?(u[0]=(+u[0]).toExponential(h).split("e")[0],t=h):(u[0]=u[0].split(".")[0]||0,e=20>t?(u[0]*Math.pow(10,u[1])).toFixed(t):0,u[1]=0)}}else t=2;h=(Math.abs(u[1]?u[0]:e)+Math.pow(10,-Math.max(t,c)-1)).toFixed(t);var p=3<(c=String(l(h))).length?c.length%3:0;return n=a(n,o.decimalPoint),i=a(i,o.thousandsSep),e=(0>e?"-":"")+(p?c.substr(0,p)+i:""),e=0>+u[1]&&!d?"0":e+c.substr(p).replace(/(\d{3})(?=\d)/g,"$1"+i),t&&(e+=n+h.slice(-t)),u[1]&&0!=+e&&(e+="e"+u[1]),e}var r=e.defaultOptions,i=e.defaultTime,o=t.getNestedProperty,s=t.isNumber,a=t.pick,l=t.pInt;return{dateFormat:function(e,t,n){return i.dateFormat(e,t,n)},format:function(e,t,s){var a="{",l=!1,c=/f$/,u=/\.([0-9])/,d=r.lang,h=s&&s.time||i;s=s&&s.numberFormatter||n;for(var p=[];e;){var f=e.indexOf(a);if(-1===f)break;var m=e.slice(0,f);if(l){if(m=m.split(":"),a=o(m.shift()||"",t),m.length&&"number"==typeof a)if(m=m.join(":"),c.test(m)){var g=parseInt((m.match(u)||["","-1"])[1],10);null!==a&&(a=s(a,g,d.decimalPoint,-1<m.indexOf(",")?d.thousandsSep:""))}else a=h.dateFormat(m,a);p.push(a)}else p.push(m);e=e.slice(f+1),a=(l=!l)?"}":"{"}return p.push(e),p.join("")},numberFormat:n}})),t(n,"Core/Renderer/RendererUtilities.js",[n["Core/Utilities.js"]],(function(e){var t,n=e.clamp,r=e.pick,i=e.stableSort;return function(e){e.distribute=function e(t,o,s){var a,l=t,c=l.reducedLen||o,u=function(e,t){return(t.rank||0)-(e.rank||0)},d=function(e,t){return e.target-t.target},h=!0,p=[],f=0;for(a=t.length;a--;)f+=t[a].size;if(f>c){for(i(t,u),f=a=0;f<=c;)f+=t[a].size,a++;p=t.splice(a-1,t.length)}for(i(t,d),t=t.map((function(e){return{size:e.size,targets:[e.target],align:r(e.align,.5)}}));h;){for(a=t.length;a--;)c=t[a],u=(Math.min.apply(0,c.targets)+Math.max.apply(0,c.targets))/2,c.pos=n(u-c.size*c.align,0,o-c.size);for(a=t.length,h=!1;a--;)0<a&&t[a-1].pos+t[a-1].size>t[a].pos&&(t[a-1].size+=t[a].size,t[a-1].targets=t[a-1].targets.concat(t[a].targets),t[a-1].align=.5,t[a-1].pos+t[a-1].size>o&&(t[a-1].pos=o-t[a-1].size),t.splice(a,1),h=!0)}return l.push.apply(l,p),a=0,t.some((function(t){var n=0;return(t.targets||[]).some((function(){return l[a].pos=t.pos+n,void 0!==s&&Math.abs(l[a].pos-l[a].target)>s?(l.slice(0,a+1).forEach((function(e){return delete e.pos})),l.reducedLen=(l.reducedLen||o)-.1*o,l.reducedLen>.1*o&&e(l,o,s),!0):(n+=l[a].size,a++,!1)}))})),i(l,d),l}}(t||(t={})),t})),t(n,"Core/Renderer/SVG/SVGElement.js",[n["Core/Animation/AnimationUtilities.js"],n["Core/Renderer/HTML/AST.js"],n["Core/Color/Color.js"],n["Core/Globals.js"],n["Core/Utilities.js"]],(function(e,t,n,r,i){var o=e.animate,s=e.animObject,a=e.stop,l=r.deg2rad,c=r.doc,u=r.noop,d=r.svg,h=r.SVG_NS,p=r.win,f=i.addEvent,m=i.attr,g=i.createElement,b=i.css,v=i.defined,y=i.erase,S=i.extend,_=i.fireEvent,x=i.isArray,w=i.isFunction,k=i.isNumber,O=i.isString,E=i.merge,A=i.objectEach,T=i.pick,C=i.pInt,M=i.syncTimeout,$=i.uniqueKey;return(e=function(){function e(){this.element=void 0,this.onEvents={},this.opacity=1,this.renderer=void 0,this.SVG_NS=h,this.symbolCustomAttribs="x y width height r start end innerR anchorX anchorY rounded".split(" ")}return e.prototype._defaultGetter=function(e){return e=T(this[e+"Value"],this[e],this.element?this.element.getAttribute(e):null,0),/^[\-0-9\.]+$/.test(e)&&(e=parseFloat(e)),e},e.prototype._defaultSetter=function(e,t,n){n.setAttribute(t,e)},e.prototype.add=function(e){var t=this.renderer,n=this.element;if(e&&(this.parentGroup=e),this.parentInverted=e&&e.inverted,void 0!==this.textStr&&"text"===this.element.nodeName&&t.buildText(this),this.added=!0,!e||e.handleZ||this.zIndex)var r=this.zIndexSetter();return r||(e?e.element:t.box).appendChild(n),this.onAdd&&this.onAdd(),this},e.prototype.addClass=function(e,t){var n=t?"":this.attr("class")||"";return(e=(e||"").split(/ /g).reduce((function(e,t){return-1===n.indexOf(t)&&e.push(t),e}),n?[n]:[]).join(" "))!==n&&this.attr("class",e),this},e.prototype.afterSetters=function(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)},e.prototype.align=function(e,t,n){var r,i,o,s={},a=this.renderer,l=a.alignedObjects;e?(this.alignOptions=e,this.alignByTranslate=t,(!n||O(n))&&(this.alignTo=r=n||"renderer",y(l,this),l.push(this),n=void 0)):(e=this.alignOptions,t=this.alignByTranslate,r=this.alignTo),n=T(n,a[r],"scrollablePlotBox"===r?a.plotBox:void 0,a),r=e.align;var c=e.verticalAlign;return a=(n.x||0)+(e.x||0),l=(n.y||0)+(e.y||0),"right"===r?i=1:"center"===r&&(i=2),i&&(a+=(n.width-(e.width||0))/i),s[t?"translateX":"x"]=Math.round(a),"bottom"===c?o=1:"middle"===c&&(o=2),o&&(l+=(n.height-(e.height||0))/o),s[t?"translateY":"y"]=Math.round(l),this[this.placed?"animate":"attr"](s),this.placed=!0,this.alignAttr=s,this},e.prototype.alignSetter=function(e){var t={left:"start",center:"middle",right:"end"};t[e]&&(this.alignValue=e,this.element.setAttribute("text-anchor",t[e]))},e.prototype.animate=function(e,t,n){var r=this,i=s(T(t,this.renderer.globalAnimation,!0));return t=i.defer,T(c.hidden,c.msHidden,c.webkitHidden,!1)&&(i.duration=0),0!==i.duration?(n&&(i.complete=n),M((function(){r.element&&o(r,e,i)}),t)):(this.attr(e,void 0,n),A(e,(function(e,t){i.step&&i.step.call(this,e,{prop:t,pos:1,elem:this})}),this)),this},e.prototype.applyTextOutline=function(e){var t=this.element;-1!==e.indexOf("contrast")&&(e=e.replace(/contrast/g,this.renderer.getContrast(t.style.fill)));var n=e.split(" ");if(e=n[n.length-1],(n=n[0])&&"none"!==n&&r.svg){this.fakeTS=!0,this.ySetter=this.xSetter,n=n.replace(/(^[\d\.]+)(.*?)$/g,(function(e,t,n){return 2*Number(t)+n})),this.removeTextOutline();var i=c.createElementNS(h,"tspan");m(i,{class:"highcharts-text-outline",fill:e,stroke:e,"stroke-width":n,"stroke-linejoin":"round"}),[].forEach.call(t.childNodes,(function(e){var t=e.cloneNode(!0);t.removeAttribute&&["fill","stroke","stroke-width","stroke"].forEach((function(e){return t.removeAttribute(e)})),i.appendChild(t)}));var o=c.createElementNS(h,"tspan");o.textContent="",["x","y"].forEach((function(e){var n=t.getAttribute(e);n&&o.setAttribute(e,n)})),i.appendChild(o),t.insertBefore(i,t.firstChild)}},e.prototype.attr=function(e,t,n,r){var i,o,s,l=this.element,c=this.symbolCustomAttribs,u=this;if("string"==typeof e&&void 0!==t){var d=e;(e={})[d]=t}return"string"==typeof e?u=(this[e+"Getter"]||this._defaultGetter).call(this,e,l):(A(e,(function(t,n){o=!1,r||a(this,n),this.symbolName&&-1!==c.indexOf(n)&&(i||(this.symbolAttr(e),i=!0),o=!0),!this.rotation||"x"!==n&&"y"!==n||(this.doTransform=!0),o||((s=this[n+"Setter"]||this._defaultSetter).call(this,t,n,l),!this.styledMode&&this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(n)&&this.updateShadows(n,t,s))}),this),this.afterSetters()),n&&n.call(this),u},e.prototype.clip=function(e){return this.attr("clip-path",e?"url("+this.renderer.url+"#"+e.id+")":"none")},e.prototype.crisp=function(e,t){t=t||e.strokeWidth||0;var n=Math.round(t)%2/2;return e.x=Math.floor(e.x||this.x||0)+n,e.y=Math.floor(e.y||this.y||0)+n,e.width=Math.floor((e.width||this.width||0)-2*n),e.height=Math.floor((e.height||this.height||0)-2*n),v(e.strokeWidth)&&(e.strokeWidth=t),e},e.prototype.complexColor=function(e,t,r){var i,o,s,a,l,c,u,d,h,p,f,m=this.renderer,g=[];_(this.renderer,"complexColor",{args:arguments},(function(){if(e.radialGradient?o="radialGradient":e.linearGradient&&(o="linearGradient"),o){if(s=e[o],l=m.gradients,c=e.stops,h=r.radialReference,x(s)&&(e[o]=s={x1:s[0],y1:s[1],x2:s[2],y2:s[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===o&&h&&!v(s.gradientUnits)&&(a=s,s=E(s,m.getRadialAttr(h,a),{gradientUnits:"userSpaceOnUse"})),A(s,(function(e,t){"id"!==t&&g.push(t,e)})),A(c,(function(e){g.push(e)})),g=g.join(","),l[g])p=l[g].attr("id");else{s.id=p=$();var b=l[g]=m.createElement(o).attr(s).add(m.defs);b.radAttr=a,b.stops=[],c.forEach((function(e){0===e[1].indexOf("rgba")?(i=n.parse(e[1]),u=i.get("rgb"),d=i.get("a")):(u=e[1],d=1),e=m.createElement("stop").attr({offset:e[0],"stop-color":u,"stop-opacity":d}).add(b),b.stops.push(e)}))}f="url("+m.url+"#"+p+")",r.setAttribute(t,f),r.gradient=g,e.toString=function(){return f}}}))},e.prototype.css=function(e){var t=this.styles,n={},r=this.element,i=["textOutline","textOverflow","width"],o="",s=!t;if(e&&e.color&&(e.fill=e.color),t&&A(e,(function(e,r){t&&t[r]!==e&&(n[r]=e,s=!0)})),s){if(t&&(e=S(t,n)),e)if(null===e.width||"auto"===e.width)delete this.textWidth;else if("text"===r.nodeName.toLowerCase()&&e.width)var a=this.textWidth=C(e.width);if(this.styles=e,a&&!d&&this.renderer.forExport&&delete e.width,r.namespaceURI===this.SVG_NS){var l=function(e,t){return"-"+t.toLowerCase()};A(e,(function(e,t){-1===i.indexOf(t)&&(o+=t.replace(/([A-Z])/g,l)+":"+e+";")})),o&&m(r,"style",o)}else b(r,e);this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),e&&e.textOutline&&this.applyTextOutline(e.textOutline))}return this},e.prototype.dashstyleSetter=function(e){var t=this["stroke-width"];if("inherit"===t&&(t=1),e=e&&e.toLowerCase()){var n=e.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(e=n.length;e--;)n[e]=""+C(n[e])*T(t,NaN);e=n.join(",").replace(/NaN/g,"none"),this.element.setAttribute("stroke-dasharray",e)}},e.prototype.destroy=function(){var e=this,t=e.element||{},n=e.renderer,r=t.ownerSVGElement,i=n.isSVG&&"SPAN"===t.nodeName&&e.parentGroup||void 0;if(t.onclick=t.onmouseout=t.onmouseover=t.onmousemove=t.point=null,a(e),e.clipPath&&r){var o=e.clipPath;[].forEach.call(r.querySelectorAll("[clip-path],[CLIP-PATH]"),(function(e){-1<e.getAttribute("clip-path").indexOf(o.element.id)&&e.removeAttribute("clip-path")})),e.clipPath=o.destroy()}if(e.stops){for(r=0;r<e.stops.length;r++)e.stops[r].destroy();e.stops.length=0,e.stops=void 0}for(e.safeRemoveChild(t),n.styledMode||e.destroyShadows();i&&i.div&&0===i.div.childNodes.length;)t=i.parentGroup,e.safeRemoveChild(i.div),delete i.div,i=t;e.alignTo&&y(n.alignedObjects,e),A(e,(function(t,n){e[n]&&e[n].parentGroup===e&&e[n].destroy&&e[n].destroy(),delete e[n]}))},e.prototype.destroyShadows=function(){(this.shadows||[]).forEach((function(e){this.safeRemoveChild(e)}),this),this.shadows=void 0},e.prototype.destroyTextPath=function(e,t){var n=e.getElementsByTagName("text")[0];if(n){if(n.removeAttribute("dx"),n.removeAttribute("dy"),t.element.setAttribute("id",""),this.textPathWrapper&&n.getElementsByTagName("textPath").length){for(e=this.textPathWrapper.element.childNodes;e.length;)n.appendChild(e[0]);n.removeChild(this.textPathWrapper.element)}}else(e.getAttribute("dx")||e.getAttribute("dy"))&&(e.removeAttribute("dx"),e.removeAttribute("dy"));this.textPathWrapper&&(this.textPathWrapper=this.textPathWrapper.destroy())},e.prototype.dSetter=function(e,t,n){x(e)&&("string"==typeof e[0]&&(e=this.renderer.pathToSegments(e)),this.pathArray=e,e=e.reduce((function(e,t,n){return t&&t.join?(n?e+" ":"")+t.join(" "):(t||"").toString()}),"")),/(NaN| {2}|^$)/.test(e)&&(e="M 0 0"),this[t]!==e&&(n.setAttribute(t,e),this[t]=e)},e.prototype.fadeOut=function(e){var t=this;t.animate({opacity:0},{duration:T(e,150),complete:function(){t.attr({y:-9999}).hide()}})},e.prototype.fillSetter=function(e,t,n){"string"==typeof e?n.setAttribute(t,e):e&&this.complexColor(e,t,n)},e.prototype.getBBox=function(t,n){var r=this.renderer,i=this.element,o=this.styles,s=this.textStr,a=r.cache,c=r.cacheKeys,u=i.namespaceURI===this.SVG_NS;n=T(n,this.rotation,0);var d,h=r.styledMode?i&&e.prototype.getStyle.call(i,"font-size"):o&&o.fontSize;if(v(s)){var p=s.toString();-1===p.indexOf("<")&&(p=p.replace(/[0-9]/g,"0")),p+=["",n,h,this.textWidth,o&&o.textOverflow,o&&o.fontWeight].join()}if(p&&!t&&(d=a[p]),!d){if(u||r.forExport){try{var f=this.fakeTS&&function(e){var t=i.querySelector(".highcharts-text-outline");t&&b(t,{display:e})};w(f)&&f("none"),d=i.getBBox?S({},i.getBBox()):{width:i.offsetWidth,height:i.offsetHeight},w(f)&&f("")}catch(e){}(!d||0>d.width)&&(d={width:0,height:0})}else d=this.htmlGetBBox();if(r.isSVG&&(t=d.width,r=d.height,u&&(d.height=r={"11px,17":14,"13px,20":16}[(h||"")+","+Math.round(r)]||r),n&&(u=n*l,d.width=Math.abs(r*Math.sin(u))+Math.abs(t*Math.cos(u)),d.height=Math.abs(r*Math.cos(u))+Math.abs(t*Math.sin(u)))),p&&(""===s||0<d.height)){for(;250<c.length;)delete a[c.shift()];a[p]||c.push(p),a[p]=d}}return d},e.prototype.getStyle=function(e){return p.getComputedStyle(this.element||this,"").getPropertyValue(e)},e.prototype.hasClass=function(e){return-1!==(""+this.attr("class")).split(" ").indexOf(e)},e.prototype.hide=function(e){return e?this.attr({y:-9999}):this.attr({visibility:"hidden"}),this},e.prototype.htmlGetBBox=function(){return{height:0,width:0,x:0,y:0}},e.prototype.init=function(e,t){this.element="span"===t?g(t):c.createElementNS(this.SVG_NS,t),this.renderer=e,_(this,"afterInit")},e.prototype.invert=function(e){return this.inverted=e,this.updateTransform(),this},e.prototype.on=function(e,t){var n=this.onEvents;return n[e]&&n[e](),n[e]=f(this.element,e,t),this},e.prototype.opacitySetter=function(e,t,n){this.opacity=e=Number(Number(e).toFixed(3)),n.setAttribute(t,e)},e.prototype.removeClass=function(e){return this.attr("class",(""+this.attr("class")).replace(O(e)?new RegExp("(^| )"+e+"( |$)"):e," ").replace(/ +/g," ").trim())},e.prototype.removeTextOutline=function(){var e=this.element.querySelector("tspan.highcharts-text-outline");e&&this.safeRemoveChild(e)},e.prototype.safeRemoveChild=function(e){var t=e.parentNode;t&&t.removeChild(e)},e.prototype.setRadialReference=function(e){var t=this.element.gradient&&this.renderer.gradients[this.element.gradient];return this.element.radialReference=e,t&&t.radAttr&&t.animate(this.renderer.getRadialAttr(e,t.radAttr)),this},e.prototype.setTextPath=function(e,n){var r=this.element,i=this.text?this.text.element:r,o={textAnchor:"text-anchor"},s=!1,a=this.textPathWrapper,l=!a;n=E(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},n);var c=t.filterUserAttributes(n.attributes);if(e&&n&&n.enabled){a&&null===a.element.parentNode?(l=!0,a=a.destroy()):a&&this.removeTextOutline.call(a.parentGroup),this.options&&this.options.padding&&(c.dx=-this.options.padding),a||(this.textPathWrapper=a=this.renderer.createElement("textPath"),s=!0);var d=a.element;if((n=e.element.getAttribute("id"))||e.element.setAttribute("id",n=$()),l)for(i.setAttribute("y",0),k(c.dx)&&i.setAttribute("x",-c.dx),e=[].slice.call(i.childNodes),l=0;l<e.length;l++){var h=e[l];h.nodeType!==p.Node.TEXT_NODE&&"tspan"!==h.nodeName||d.appendChild(h)}s&&a&&a.add({element:i}),d.setAttributeNS("http://www.w3.org/1999/xlink","href",this.renderer.url+"#"+n),v(c.dy)&&(d.parentNode.setAttribute("dy",c.dy),delete c.dy),v(c.dx)&&(d.parentNode.setAttribute("dx",c.dx),delete c.dx),A(c,(function(e,t){d.setAttribute(o[t]||t,e)})),r.removeAttribute("transform"),this.removeTextOutline.call(a),this.text&&!this.renderer.styledMode&&this.attr({fill:"none","stroke-width":0}),this.applyTextOutline=this.updateTransform=u}else a&&(delete this.updateTransform,delete this.applyTextOutline,this.destroyTextPath(r,e),this.updateTransform(),this.options&&this.options.rotation&&this.applyTextOutline(this.options.style.textOutline));return this},e.prototype.shadow=function(e,t,n){var r,i=[],o=this.element,s=this.oldShadowOptions,a={color:"#000000",offsetX:this.parentInverted?-1:1,offsetY:this.parentInverted?-1:1,opacity:.15,width:3},l=!1;if(!0===e?r=a:"object"==typeof e&&(r=S(a,e)),r&&(r&&s&&A(r,(function(e,t){e!==s[t]&&(l=!0)})),l&&this.destroyShadows(),this.oldShadowOptions=r),r){if(!this.shadows){var c=r.opacity/r.width,u=this.parentInverted?"translate("+r.offsetY+", "+r.offsetX+")":"translate("+r.offsetX+", "+r.offsetY+")";for(a=1;a<=r.width;a++){var d=o.cloneNode(!1),h=2*r.width+1-2*a;m(d,{stroke:e.color||"#000000","stroke-opacity":c*a,"stroke-width":h,transform:u,fill:"none"}),d.setAttribute("class",(d.getAttribute("class")||"")+" highcharts-shadow"),n&&(m(d,"height",Math.max(m(d,"height")-h,0)),d.cutHeight=h),t?t.element.appendChild(d):o.parentNode&&o.parentNode.insertBefore(d,o),i.push(d)}this.shadows=i}}else this.destroyShadows();return this},e.prototype.show=function(e){return this.attr({visibility:e?"inherit":"visible"})},e.prototype.strokeSetter=function(t,n,r){this[n]=t,this.stroke&&this["stroke-width"]?(e.prototype.fillSetter.call(this,this.stroke,"stroke",r),r.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===n&&0===t&&this.hasStroke?(r.removeAttribute("stroke"),this.hasStroke=!1):this.renderer.styledMode&&this["stroke-width"]&&(r.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0)},e.prototype.strokeWidth=function(){if(!this.renderer.styledMode)return this["stroke-width"]||0;var e=this.getStyle("stroke-width"),t=0;if(e.indexOf("px")===e.length-2)t=C(e);else if(""!==e){var n=c.createElementNS(h,"rect");m(n,{width:e,"stroke-width":0}),this.element.parentNode.appendChild(n),t=n.getBBox().width,n.parentNode.removeChild(n)}return t},e.prototype.symbolAttr=function(e){var t=this;"x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach((function(n){t[n]=T(e[n],t[n])})),t.attr({d:t.renderer.symbols[t.symbolName](t.x,t.y,t.width,t.height,t)})},e.prototype.textSetter=function(e){e!==this.textStr&&(delete this.textPxLength,this.textStr=e,this.added&&this.renderer.buildText(this))},e.prototype.titleSetter=function(e){var t=this.element,n=t.getElementsByTagName("title")[0]||c.createElementNS(this.SVG_NS,"title");t.insertBefore?t.insertBefore(n,t.firstChild):t.appendChild(n),n.textContent=String(T(e,"")).replace(/<[^>]*>/g,"").replace(/</g,"<").replace(/>/g,">")},e.prototype.toFront=function(){var e=this.element;return e.parentNode.appendChild(e),this},e.prototype.translate=function(e,t){return this.attr({translateX:e,translateY:t})},e.prototype.updateShadows=function(e,t,n){var r=this.shadows;if(r)for(var i=r.length;i--;)n.call(r[i],"height"===e?Math.max(t-(r[i].cutHeight||0),0):"d"===e?this.d:t,e,r[i])},e.prototype.updateTransform=function(){var e=this.scaleX,t=this.scaleY,n=this.inverted,r=this.rotation,i=this.matrix,o=this.element,s=this.translateX||0,a=this.translateY||0;n&&(s+=this.width,a+=this.height),s=["translate("+s+","+a+")"],v(i)&&s.push("matrix("+i.join(",")+")"),n?s.push("rotate(90) scale(-1,1)"):r&&s.push("rotate("+r+" "+T(this.rotationOriginX,o.getAttribute("x"),0)+" "+T(this.rotationOriginY,o.getAttribute("y")||0)+")"),(v(e)||v(t))&&s.push("scale("+T(e,1)+" "+T(t,1)+")"),s.length&&o.setAttribute("transform",s.join(" "))},e.prototype.visibilitySetter=function(e,t,n){"inherit"===e?n.removeAttribute(t):this[t]!==e&&n.setAttribute(t,e),this[t]=e},e.prototype.xGetter=function(e){return"circle"===this.element.nodeName&&("x"===e?e="cx":"y"===e&&(e="cy")),this._defaultGetter(e)},e.prototype.zIndexSetter=function(e,t){var n=this.renderer,r=this.parentGroup,i=(r||n).element||n.box,o=this.element;n=i===n.box;var s,a=!1,l=this.added;if(v(e)?(o.setAttribute("data-z-index",e),e=+e,this[t]===e&&(l=!1)):v(this[t])&&o.removeAttribute("data-z-index"),this[t]=e,l){for((e=this.zIndex)&&r&&(r.handleZ=!0),s=(t=i.childNodes).length-1;0<=s&&!a;s--){l=(r=t[s]).getAttribute("data-z-index");var c=!v(l);r!==o&&(0>e&&c&&!n&&!s?(i.insertBefore(o,t[s]),a=!0):(C(l)<=e||c&&(!v(e)||0<=e))&&(i.insertBefore(o,t[s+1]||null),a=!0))}a||(i.insertBefore(o,t[n?3:0]||null),a=!0)}return a},e}()).prototype["stroke-widthSetter"]=e.prototype.strokeSetter,e.prototype.yGetter=e.prototype.xGetter,e.prototype.matrixSetter=e.prototype.rotationOriginXSetter=e.prototype.rotationOriginYSetter=e.prototype.rotationSetter=e.prototype.scaleXSetter=e.prototype.scaleYSetter=e.prototype.translateXSetter=e.prototype.translateYSetter=e.prototype.verticalAlignSetter=function(e,t){this[t]=e,this.doTransform=!0},e})),t(n,"Core/Renderer/RendererRegistry.js",[n["Core/Globals.js"]],(function(e){var t;return function(t){var n;t.rendererTypes={},t.getRendererType=function(e){return void 0===e&&(e=n),t.rendererTypes[e]||t.rendererTypes[n]},t.registerRendererType=function(r,i,o){t.rendererTypes[r]=i,n&&!o||(n=r,e.Renderer=i)}}(t||(t={})),t})),t(n,"Core/Renderer/SVG/SVGLabel.js",[n["Core/Renderer/SVG/SVGElement.js"],n["Core/Utilities.js"]],(function(e,t){var n=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),r=t.defined,i=t.extend,o=t.isNumber,s=t.merge,a=t.pick,l=t.removeEvent;return function(t){function c(e,n,r,i,o,s,a,l,u,d){var h,p=t.call(this)||this;return p.paddingLeftSetter=p.paddingSetter,p.paddingRightSetter=p.paddingSetter,p.init(e,"g"),p.textStr=n,p.x=r,p.y=i,p.anchorX=s,p.anchorY=a,p.baseline=u,p.className=d,p.addClass("button"===d?"highcharts-no-tooltip":"highcharts-label"),d&&p.addClass("highcharts-"+d),p.text=e.text(void 0,0,0,l).attr({zIndex:1}),"string"==typeof o&&((h=/^url\((.*?)\)$/.test(o))||p.renderer.symbols[o])&&(p.symbolKey=o),p.bBox=c.emptyBBox,p.padding=3,p.baselineOffset=0,p.needsBox=e.styledMode||h,p.deferredAttr={},p.alignFactor=0,p}return n(c,t),c.prototype.alignSetter=function(e){(e={left:0,center:.5,right:1}[e])!==this.alignFactor&&(this.alignFactor=e,this.bBox&&o(this.xSetting)&&this.attr({x:this.xSetting}))},c.prototype.anchorXSetter=function(e,t){this.anchorX=e,this.boxAttr(t,Math.round(e)-this.getCrispAdjust()-this.xSetting)},c.prototype.anchorYSetter=function(e,t){this.anchorY=e,this.boxAttr(t,e-this.ySetting)},c.prototype.boxAttr=function(e,t){this.box?this.box.attr(e,t):this.deferredAttr[e]=t},c.prototype.css=function(t){if(t){var n={};t=s(t),c.textProps.forEach((function(e){void 0!==t[e]&&(n[e]=t[e],delete t[e])})),this.text.css(n);var r="width"in n;"fontSize"in n||"fontWeight"in n?this.updateTextPadding():r&&this.updateBoxSize()}return e.prototype.css.call(this,t)},c.prototype.destroy=function(){l(this.element,"mouseenter"),l(this.element,"mouseleave"),this.text&&this.text.destroy(),this.box&&(this.box=this.box.destroy()),e.prototype.destroy.call(this)},c.prototype.fillSetter=function(e,t){e&&(this.needsBox=!0),this.fill=e,this.boxAttr(t,e)},c.prototype.getBBox=function(){this.textStr&&0===this.bBox.width&&0===this.bBox.height&&this.updateBoxSize();var e=this.padding,t=a(this.paddingLeft,e);return{width:this.width,height:this.height,x:this.bBox.x-t,y:this.bBox.y-e}},c.prototype.getCrispAdjust=function(){return this.renderer.styledMode&&this.box?this.box.strokeWidth()%2/2:(this["stroke-width"]?parseInt(this["stroke-width"],10):0)%2/2},c.prototype.heightSetter=function(e){this.heightSetting=e},c.prototype.onAdd=function(){var e=this.textStr;this.text.add(this),this.attr({text:r(e)?e:"",x:this.x,y:this.y}),this.box&&r(this.anchorX)&&this.attr({anchorX:this.anchorX,anchorY:this.anchorY})},c.prototype.paddingSetter=function(e,t){o(e)?e!==this[t]&&(this[t]=e,this.updateTextPadding()):this[t]=void 0},c.prototype.rSetter=function(e,t){this.boxAttr(t,e)},c.prototype.shadow=function(e){return e&&!this.renderer.styledMode&&(this.updateBoxSize(),this.box&&this.box.shadow(e)),this},c.prototype.strokeSetter=function(e,t){this.stroke=e,this.boxAttr(t,e)},c.prototype["stroke-widthSetter"]=function(e,t){e&&(this.needsBox=!0),this["stroke-width"]=e,this.boxAttr(t,e)},c.prototype["text-alignSetter"]=function(e){this.textAlign=e},c.prototype.textSetter=function(e){void 0!==e&&this.text.attr({text:e}),this.updateTextPadding()},c.prototype.updateBoxSize=function(){var e=this.text.element.style,t={},n=this.padding,s=this.bBox=o(this.widthSetting)&&o(this.heightSetting)&&!this.textAlign||!r(this.text.textStr)?c.emptyBBox:this.text.getBBox();this.width=this.getPaddedWidth(),this.height=(this.heightSetting||s.height||0)+2*n,e=this.renderer.fontMetrics(e&&e.fontSize,this.text),this.baselineOffset=n+Math.min((this.text.firstLineMetrics||e).b,s.height||1/0),this.heightSetting&&(this.baselineOffset+=(this.heightSetting-e.h)/2),this.needsBox&&(this.box||((n=this.box=this.symbolKey?this.renderer.symbol(this.symbolKey):this.renderer.rect()).addClass(("button"===this.className?"":"highcharts-label-box")+(this.className?" highcharts-"+this.className+"-box":"")),n.add(this)),n=this.getCrispAdjust(),t.x=n,t.y=(this.baseline?-this.baselineOffset:0)+n,t.width=Math.round(this.width),t.height=Math.round(this.height),this.box.attr(i(t,this.deferredAttr)),this.deferredAttr={})},c.prototype.updateTextPadding=function(){var e=this.text;this.updateBoxSize();var t=this.baseline?0:this.baselineOffset,n=a(this.paddingLeft,this.padding);r(this.widthSetting)&&this.bBox&&("center"===this.textAlign||"right"===this.textAlign)&&(n+={center:.5,right:1}[this.textAlign]*(this.widthSetting-this.bBox.width)),n===e.x&&t===e.y||(e.attr("x",n),e.hasBoxWidthChanged&&(this.bBox=e.getBBox(!0)),void 0!==t&&e.attr("y",t)),e.x=n,e.y=t},c.prototype.widthSetter=function(e){this.widthSetting=o(e)?e:void 0},c.prototype.getPaddedWidth=function(){var e=this.padding,t=a(this.paddingLeft,e);return e=a(this.paddingRight,e),(this.widthSetting||this.bBox.width||0)+t+e},c.prototype.xSetter=function(e){this.x=e,this.alignFactor&&(e-=this.alignFactor*this.getPaddedWidth(),this["forceAnimate:x"]=!0),this.xSetting=Math.round(e),this.attr("translateX",this.xSetting)},c.prototype.ySetter=function(e){this.ySetting=this.y=Math.round(e),this.attr("translateY",this.ySetting)},c.emptyBBox={width:0,height:0,x:0,y:0},c.textProps="color direction fontFamily fontSize fontStyle fontWeight lineHeight textAlign textDecoration textOutline textOverflow width".split(" "),c}(e)})),t(n,"Core/Renderer/SVG/Symbols.js",[n["Core/Utilities.js"]],(function(e){function t(e,t,n,r,o){var a=[];if(o){var l=o.start||0,c=s(o.r,n);n=s(o.r,r||n);var u=(o.end||0)-.001;r=o.innerR;var d=s(o.open,.001>Math.abs((o.end||0)-l-2*Math.PI)),h=Math.cos(l),p=Math.sin(l),f=Math.cos(u),m=Math.sin(u);l=s(o.longArc,.001>u-l-Math.PI?0:1),a.push(["M",e+c*h,t+n*p],["A",c,n,0,l,s(o.clockwise,1),e+c*f,t+n*m]),i(r)&&a.push(d?["M",e+r*f,t+r*m]:["L",e+r*f,t+r*m],["A",r,r,0,l,i(o.clockwise)?1-o.clockwise:0,e+r*h,t+r*p]),d||a.push(["Z"])}return a}function n(e,t,n,i,o){return o&&o.r?r(e,t,n,i,o):[["M",e,t],["L",e+n,t],["L",e+n,t+i],["L",e,t+i],["Z"]]}function r(e,t,n,r,i){return[["M",e+(i=i&&i.r||0),t],["L",e+n-i,t],["C",e+n,t,e+n,t,e+n,t+i],["L",e+n,t+r-i],["C",e+n,t+r,e+n,t+r,e+n-i,t+r],["L",e+i,t+r],["C",e,t+r,e,t+r,e,t+r-i],["L",e,t+i],["C",e,t,e,t,e+i,t]]}var i=e.defined,o=e.isNumber,s=e.pick;return{arc:t,callout:function(e,t,n,i,s){var a=Math.min(s&&s.r||0,n,i),l=a+6,c=s&&s.anchorX;s=s&&s.anchorY||0;var u=r(e,t,n,i,{r:a});return o(c)?(e+c>=n?s>t+l&&s<t+i-l?u.splice(3,1,["L",e+n,s-6],["L",e+n+6,s],["L",e+n,s+6],["L",e+n,t+i-a]):u.splice(3,1,["L",e+n,i/2],["L",c,s],["L",e+n,i/2],["L",e+n,t+i-a]):0>=e+c?s>t+l&&s<t+i-l?u.splice(7,1,["L",e,s+6],["L",e-6,s],["L",e,s-6],["L",e,t+a]):u.splice(7,1,["L",e,i/2],["L",c,s],["L",e,i/2],["L",e,t+a]):s&&s>i&&c>e+l&&c<e+n-l?u.splice(5,1,["L",c+6,t+i],["L",c,t+i+6],["L",c-6,t+i],["L",e+a,t+i]):s&&0>s&&c>e+l&&c<e+n-l&&u.splice(1,1,["L",c-6,t],["L",c,t-6],["L",c+6,t],["L",n-a,t]),u):u},circle:function(e,n,r,i){return t(e+r/2,n+i/2,r/2,i/2,{start:.5*Math.PI,end:2.5*Math.PI,open:!1})},diamond:function(e,t,n,r){return[["M",e+n/2,t],["L",e+n,t+r/2],["L",e+n/2,t+r],["L",e,t+r/2],["Z"]]},rect:n,roundedRect:r,square:n,triangle:function(e,t,n,r){return[["M",e+n/2,t],["L",e+n,t+r],["L",e,t+r],["Z"]]},"triangle-down":function(e,t,n,r){return[["M",e,t],["L",e+n,t],["L",e+n/2,t+r],["Z"]]}}})),t(n,"Core/Renderer/SVG/TextBuilder.js",[n["Core/Renderer/HTML/AST.js"],n["Core/Globals.js"],n["Core/Utilities.js"]],(function(e,t,n){var r=t.doc,i=t.SVG_NS,o=t.win,s=n.attr,a=n.isString,l=n.objectEach,c=n.pick;return function(){function t(e){var t=e.styles;this.renderer=e.renderer,this.svgElement=e,this.width=e.textWidth,this.textLineHeight=t&&t.lineHeight,this.textOutline=t&&t.textOutline,this.ellipsis=!(!t||"ellipsis"!==t.textOverflow),this.noWrap=!(!t||"nowrap"!==t.whiteSpace),this.fontSize=t&&t.fontSize}return t.prototype.buildSVG=function(){var t=this.svgElement,n=t.element,i=t.renderer,o=c(t.textStr,"").toString(),s=-1!==o.indexOf("<"),l=n.childNodes;i=this.width&&!t.added&&i.box;var u=[o,this.ellipsis,this.noWrap,this.textLineHeight,this.textOutline,this.fontSize,this.width].join();if(u!==t.textCache){for(t.textCache=u,delete t.actualWidth,u=l.length;u--;)n.removeChild(l[u]);s||this.ellipsis||this.width||-1!==o.indexOf(" ")&&(!this.noWrap||/<br.*?>/g.test(o))?""!==o&&(i&&i.appendChild(n),o=new e(o),this.modifyTree(o.nodes),o.addToDOM(t.element),this.modifyDOM(),this.ellipsis&&-1!==(n.textContent||"").indexOf("…")&&t.attr("title",this.unescapeEntities(t.textStr||"",["<",">"])),i&&i.removeChild(n)):n.appendChild(r.createTextNode(this.unescapeEntities(o))),a(this.textOutline)&&t.applyTextOutline&&t.applyTextOutline(this.textOutline)}},t.prototype.modifyDOM=function(){var e,t=this,n=this.svgElement,a=s(n.element,"x");for(n.firstLineMetrics=void 0;(e=n.element.firstChild)&&/^[\s\u200B]*$/.test(e.textContent||" ");)n.element.removeChild(e);[].forEach.call(n.element.querySelectorAll("tspan.highcharts-br"),(function(e,r){e.nextSibling&&e.previousSibling&&(0===r&&1===e.previousSibling.nodeType&&(n.firstLineMetrics=n.renderer.fontMetrics(void 0,e.previousSibling)),s(e,{dy:t.getLineHeight(e.nextSibling),x:a}))}));var l=this.width||0;if(l){var c=function(e,o){var c=e.textContent||"",u=c.replace(/([^\^])-/g,"$1- ").split(" "),d=!t.noWrap&&(1<u.length||1<n.element.childNodes.length),h=t.getLineHeight(o),p=0,f=n.actualWidth;if(t.ellipsis)c&&t.truncate(e,c,void 0,0,Math.max(0,l-parseInt(t.fontSize||12,10)),(function(e,t){return e.substring(0,t)+"…"}));else if(d){for(c=[],d=[];o.firstChild&&o.firstChild!==e;)d.push(o.firstChild),o.removeChild(o.firstChild);for(;u.length;)u.length&&!t.noWrap&&0<p&&(c.push(e.textContent||""),e.textContent=u.join(" ").replace(/- /g,"-")),t.truncate(e,void 0,u,0===p&&f||0,l,(function(e,t){return u.slice(0,t).join(" ").replace(/- /g,"-")})),f=n.actualWidth,p++;d.forEach((function(t){o.insertBefore(t,e)})),c.forEach((function(t){o.insertBefore(r.createTextNode(t),e),(t=r.createElementNS(i,"tspan")).textContent="",s(t,{dy:h,x:a}),o.insertBefore(t,e)}))}},u=function(e){[].slice.call(e.childNodes).forEach((function(t){t.nodeType===o.Node.TEXT_NODE?c(t,e):(-1!==t.className.baseVal.indexOf("highcharts-br")&&(n.actualWidth=0),u(t))}))};u(n.element)}},t.prototype.getLineHeight=function(e){var t;return e=e.nodeType===o.Node.TEXT_NODE?e.parentElement:e,this.renderer.styledMode||(t=e&&/(px|em)$/.test(e.style.fontSize)?e.style.fontSize:this.fontSize||this.renderer.style.fontSize||12),this.textLineHeight?parseInt(this.textLineHeight.toString(),10):this.renderer.fontMetrics(t,e||this.svgElement.element).h},t.prototype.modifyTree=function(e){var t=this,n=function(r,i){var o=r.attributes;o=void 0===o?{}:o;var s=r.children,l=r.tagName,c=t.renderer.styledMode;"b"===l||"strong"===l?c?o.class="highcharts-strong":o.style="font-weight:bold;"+(o.style||""):"i"!==l&&"em"!==l||(c?o.class="highcharts-emphasized":o.style="font-style:italic;"+(o.style||"")),a(o.style)&&(o.style=o.style.replace(/(;| |^)color([ :])/,"$1fill$2")),"br"===l?(o.class="highcharts-br",r.textContent="",(i=e[i+1])&&i.textContent&&(i.textContent=i.textContent.replace(/^ +/gm,""))):"a"===l&&s&&s.some((function(e){return"#text"===e.tagName}))&&(r.children=[{children:s,tagName:"tspan"}]),"#text"!==l&&"a"!==l&&(r.tagName="tspan"),r.attributes=o,s&&s.filter((function(e){return"#text"!==e.tagName})).forEach(n)};e.forEach(n)},t.prototype.truncate=function(e,t,n,r,i,o){var s,a=this.svgElement,l=a.renderer,c=a.rotation,u=[],d=n?1:0,h=(t||n||"").length,p=h,f=function(i,s){s=s||i;var c=e.parentNode;if(c&&void 0===u[s])if(c.getSubStringLength)try{u[s]=r+c.getSubStringLength(0,n?s+1:s)}catch(e){}else l.getSpanWidth&&(e.textContent=o(t||n,i),u[s]=r+l.getSpanWidth(a,e));return u[s]};a.rotation=0;var m=f(e.textContent.length);if(r+m>i){for(;d<=h;)p=Math.ceil((d+h)/2),n&&(s=o(n,p)),m=f(p,s&&s.length-1),d===h?d=h+1:m>i?h=p-1:d=p;0===h?e.textContent="":t&&h===t.length-1||(e.textContent=s||o(t||n,p))}n&&n.splice(0,p),a.actualWidth=m,a.rotation=c},t.prototype.unescapeEntities=function(e,t){return l(this.renderer.escapes,(function(n,r){t&&-1!==t.indexOf(n)||(e=e.toString().replace(new RegExp(n,"g"),r))})),e},t}()})),t(n,"Core/Renderer/SVG/SVGRenderer.js",[n["Core/Renderer/HTML/AST.js"],n["Core/Color/Color.js"],n["Core/Globals.js"],n["Core/Renderer/RendererRegistry.js"],n["Core/Renderer/SVG/SVGElement.js"],n["Core/Renderer/SVG/SVGLabel.js"],n["Core/Renderer/SVG/Symbols.js"],n["Core/Renderer/SVG/TextBuilder.js"],n["Core/Utilities.js"]],(function(e,t,n,r,i,o,s,a,l){var c,u=n.charts,d=n.deg2rad,h=n.doc,p=n.isFirefox,f=n.isMS,m=n.isWebKit,g=n.noop,b=n.SVG_NS,v=n.symbolSizes,y=n.win,S=l.addEvent,_=l.attr,x=l.createElement,w=l.css,k=l.defined,O=l.destroyObjectProperties,E=l.extend,A=l.isArray,T=l.isNumber,C=l.isObject,M=l.isString,$=l.merge,P=l.pick,R=l.pInt,j=l.uniqueKey;return n=function(){function n(e,t,n,r,i,o,s){this.width=this.url=this.style=this.isSVG=this.imgCount=this.height=this.gradients=this.globalAnimation=this.defs=this.chartIndex=this.cacheKeys=this.cache=this.boxWrapper=this.box=this.alignedObjects=void 0,this.init(e,t,n,r,i,o,s)}return n.prototype.init=function(e,t,n,r,i,o,s){var a,l=this.createElement("svg").attr({version:"1.1",class:"highcharts-root"}),c=l.element;s||l.css(this.getStyle(r)),e.appendChild(c),_(e,"dir","ltr"),-1===e.innerHTML.indexOf("xmlns")&&_(c,"xmlns",this.SVG_NS),this.isSVG=!0,this.box=c,this.boxWrapper=l,this.alignedObjects=[],this.url=this.getReferenceURL(),this.createElement("desc").add().element.appendChild(h.createTextNode("Created with Highcharts 9.3.3")),this.defs=this.createElement("defs").add(),this.allowHTML=o,this.forExport=i,this.styledMode=s,this.gradients={},this.cache={},this.cacheKeys=[],this.imgCount=0,this.setSize(t,n,!1),p&&e.getBoundingClientRect&&((t=function(){w(e,{left:0,top:0}),a=e.getBoundingClientRect(),w(e,{left:Math.ceil(a.left)-a.left+"px",top:Math.ceil(a.top)-a.top+"px"})})(),this.unSubPixelFix=S(y,"resize",t))},n.prototype.definition=function(t){return new e([t]).addToDOM(this.defs.element)},n.prototype.getReferenceURL=function(){if((p||m)&&h.getElementsByTagName("base").length){if(!k(c)){var t=j();t=new e([{tagName:"svg",attributes:{width:8,height:8},children:[{tagName:"defs",children:[{tagName:"clipPath",attributes:{id:t},children:[{tagName:"rect",attributes:{width:4,height:4}}]}]},{tagName:"rect",attributes:{id:"hitme",width:8,height:8,"clip-path":"url(#"+t+")",fill:"rgba(0,0,0,0.001)"}}]}]).addToDOM(h.body),w(t,{position:"fixed",top:0,left:0,zIndex:9e5});var n=h.elementFromPoint(6,6);c="hitme"===(n&&n.id),h.body.removeChild(t)}if(c)return y.location.href.split("#")[0].replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20")}return""},n.prototype.getStyle=function(e){return this.style=E({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},e)},n.prototype.setStyle=function(e){this.boxWrapper.css(this.getStyle(e))},n.prototype.isHidden=function(){return!this.boxWrapper.getBBox().width},n.prototype.destroy=function(){var e=this.defs;return this.box=null,this.boxWrapper=this.boxWrapper.destroy(),O(this.gradients||{}),this.gradients=null,e&&(this.defs=e.destroy()),this.unSubPixelFix&&this.unSubPixelFix(),this.alignedObjects=null},n.prototype.createElement=function(e){var t=new this.Element;return t.init(this,e),t},n.prototype.getRadialAttr=function(e,t){return{cx:e[0]-e[2]/2+(t.cx||0)*e[2],cy:e[1]-e[2]/2+(t.cy||0)*e[2],r:(t.r||0)*e[2]}},n.prototype.buildText=function(e){new a(e).buildSVG()},n.prototype.getContrast=function(e){return(e=t.parse(e).rgba)[0]*=1,e[1]*=1.2,e[2]*=.5,459<e[0]+e[1]+e[2]?"#000000":"#FFFFFF"},n.prototype.button=function(t,n,r,i,o,s,a,l,c,u){var d=this.label(t,n,r,c,void 0,void 0,u,void 0,"button"),h=this.styledMode,p=0,m=o?$(o):{};if(t=m&&m.style||{},m=e.filterUserAttributes(m),d.attr($({padding:8,r:2},m)),!h){var g=(m=$({fill:"#f7f7f7",stroke:"#cccccc","stroke-width":1,style:{color:"#333333",cursor:"pointer",fontWeight:"normal"}},{style:t},m)).style;delete m.style;var b=(s=$(m,{fill:"#e6e6e6"},e.filterUserAttributes(s||{}))).style;delete s.style;var v=(a=$(m,{fill:"#e6ebf5",style:{color:"#000000",fontWeight:"bold"}},e.filterUserAttributes(a||{}))).style;delete a.style;var y=(l=$(m,{style:{color:"#cccccc"}},e.filterUserAttributes(l||{}))).style;delete l.style}return S(d.element,f?"mouseover":"mouseenter",(function(){3!==p&&d.setState(1)})),S(d.element,f?"mouseout":"mouseleave",(function(){3!==p&&d.setState(p)})),d.setState=function(e){1!==e&&(d.state=p=e),d.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][e||0]),h||d.attr([m,s,a,l][e||0]).css([g,b,v,y][e||0])},h||d.attr(m).css(E({cursor:"default"},g)),d.on("touchstart",(function(e){return e.stopPropagation()})).on("click",(function(e){3!==p&&i.call(d,e)}))},n.prototype.crispLine=function(e,t,n){void 0===n&&(n="round");var r=e[0],i=e[1];return k(r[1])&&r[1]===i[1]&&(r[1]=i[1]=Math[n](r[1])-t%2/2),k(r[2])&&r[2]===i[2]&&(r[2]=i[2]=Math[n](r[2])+t%2/2),e},n.prototype.path=function(e){var t=this.styledMode?{}:{fill:"none"};return A(e)?t.d=e:C(e)&&E(t,e),this.createElement("path").attr(t)},n.prototype.circle=function(e,t,n){return e=C(e)?e:void 0===e?{}:{x:e,y:t,r:n},(t=this.createElement("circle")).xSetter=t.ySetter=function(e,t,n){n.setAttribute("c"+t,e)},t.attr(e)},n.prototype.arc=function(e,t,n,r,i,o){return C(e)?(t=(r=e).y,n=r.r,e=r.x):r={innerR:r,start:i,end:o},(e=this.symbol("arc",e,t,n,n,r)).r=n,e},n.prototype.rect=function(e,t,n,r,i,o){i=C(e)?e.r:i;var s=this.createElement("rect");return e=C(e)?e:void 0===e?{}:{x:e,y:t,width:Math.max(n,0),height:Math.max(r,0)},this.styledMode||(void 0!==o&&(e["stroke-width"]=o,e=s.crisp(e)),e.fill="none"),i&&(e.r=i),s.rSetter=function(e,t,n){s.r=e,_(n,{rx:e,ry:e})},s.rGetter=function(){return s.r||0},s.attr(e)},n.prototype.setSize=function(e,t,n){this.width=e,this.height=t,this.boxWrapper.animate({width:e,height:t},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:P(n,!0)?void 0:0}),this.alignElements()},n.prototype.g=function(e){var t=this.createElement("g");return e?t.attr({class:"highcharts-"+e}):t},n.prototype.image=function(e,t,n,r,i,o){var s={preserveAspectRatio:"none"},a=function(e,t){e.setAttributeNS?e.setAttributeNS("http://www.w3.org/1999/xlink","href",t):e.setAttribute("hc-svg-href",t)};T(t)&&(s.x=t),T(n)&&(s.y=n),T(r)&&(s.width=r),T(i)&&(s.height=i);var l=this.createElement("image").attr(s);return t=function(t){a(l.element,e),o.call(l,t)},o?(a(l.element,"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),n=new y.Image,S(n,"load",t),n.src=e,n.complete&&t({})):a(l.element,e),l},n.prototype.symbol=function(e,t,n,r,i,o){var s,a=this,l=/^url\((.*?)\)$/,c=l.test(e),d=!c&&(this.symbols[e]?e:"circle"),p=d&&this.symbols[d];if(p){"number"==typeof t&&(s=p.call(this.symbols,Math.round(t||0),Math.round(n||0),r||0,i||0,o));var f=this.path(s);a.styledMode||f.attr("fill","none"),E(f,{symbolName:d||void 0,x:t,y:n,width:r,height:i}),o&&E(f,o)}else if(c){var m=e.match(l)[1],g=f=this.image(m);g.imgwidth=P(v[m]&&v[m].width,o&&o.width),g.imgheight=P(v[m]&&v[m].height,o&&o.height);var b=function(e){return e.attr({width:e.width,height:e.height})};["width","height"].forEach((function(e){g[e+"Setter"]=function(e,t){var n=this["img"+t];this[t]=e,k(n)&&(o&&"within"===o.backgroundSize&&this.width&&this.height&&(n=Math.round(n*Math.min(this.width/this.imgwidth,this.height/this.imgheight))),this.element&&this.element.setAttribute(t,n),this.alignByTranslate||(e=((this[t]||0)-n)/2,this.attr("width"===t?{translateX:e}:{translateY:e})))}})),k(t)&&g.attr({x:t,y:n}),g.isImg=!0,k(g.imgwidth)&&k(g.imgheight)?b(g):(g.attr({width:0,height:0}),x("img",{onload:function(){var e=u[a.chartIndex];0===this.width&&(w(this,{position:"absolute",top:"-999em"}),h.body.appendChild(this)),v[m]={width:this.width,height:this.height},g.imgwidth=this.width,g.imgheight=this.height,g.element&&b(g),this.parentNode&&this.parentNode.removeChild(this),a.imgCount--,a.imgCount||!e||e.hasLoaded||e.onload()},src:m}),this.imgCount++)}return f},n.prototype.clipRect=function(e,t,n,r){var i=j()+"-",o=this.createElement("clipPath").attr({id:i}).add(this.defs);return(e=this.rect(e,t,n,r,0).add(o)).id=i,e.clipPath=o,e.count=0,e},n.prototype.text=function(e,t,n,r){var i={};return!r||!this.allowHTML&&this.forExport?(i.x=Math.round(t||0),n&&(i.y=Math.round(n)),k(e)&&(i.text=e),e=this.createElement("text").attr(i),(!r||this.forExport&&!this.allowHTML)&&(e.xSetter=function(e,t,n){for(var r,i=n.getElementsByTagName("tspan"),o=n.getAttribute(t),s=0;s<i.length;s++)(r=i[s]).getAttribute(t)===o&&r.setAttribute(t,e);n.setAttribute(t,e)}),e):this.html(e,t,n)},n.prototype.fontMetrics=function(e,t){return e=!this.styledMode&&/px/.test(e)||!y.getComputedStyle?e||t&&t.style&&t.style.fontSize||this.style&&this.style.fontSize:t&&i.prototype.getStyle.call(t,"font-size"),{h:t=24>(e=/px/.test(e)?R(e):12)?e+3:Math.round(1.2*e),b:Math.round(.8*t),f:e}},n.prototype.rotCorr=function(e,t,n){var r=e;return t&&n&&(r=Math.max(r*Math.cos(t*d),4)),{x:-e/3*Math.sin(t*d),y:r}},n.prototype.pathToSegments=function(e){for(var t=[],n=[],r={A:8,C:7,H:2,L:3,M:3,Q:5,S:5,T:3,V:2},i=0;i<e.length;i++)M(n[0])&&T(e[i])&&n.length===r[n[0].toUpperCase()]&&e.splice(i,0,n[0].replace("M","L").replace("m","l")),"string"==typeof e[i]&&(n.length&&t.push(n.slice(0)),n.length=0),n.push(e[i]);return t.push(n.slice(0)),t},n.prototype.label=function(e,t,n,r,i,s,a,l,c){return new o(this,e,t,n,r,i,s,a,l,c)},n.prototype.alignElements=function(){this.alignedObjects.forEach((function(e){return e.align()}))},n}(),E(n.prototype,{Element:i,SVG_NS:b,escapes:{"&":"&","<":"<",">":">","'":"'",'"':"""},symbols:s,draw:g}),r.registerRendererType("svg",n,!0),n})),t(n,"Core/Renderer/HTML/HTMLElement.js",[n["Core/Globals.js"],n["Core/Renderer/SVG/SVGElement.js"],n["Core/Utilities.js"]],(function(e,t,n){var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=e.isFirefox,o=e.isMS,s=e.isWebKit,a=e.win,l=n.css,c=n.defined,u=n.extend,d=n.pick,h=n.pInt;return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.compose=function(e){if(-1===t.composedClasses.indexOf(e)){t.composedClasses.push(e);var n=t.prototype,r=e.prototype;r.getSpanCorrection=n.getSpanCorrection,r.htmlCss=n.htmlCss,r.htmlGetBBox=n.htmlGetBBox,r.htmlUpdateTransform=n.htmlUpdateTransform,r.setSpanRotation=n.setSpanRotation}return e},t.prototype.getSpanCorrection=function(e,t,n){this.xCorr=-e*n,this.yCorr=-t},t.prototype.htmlCss=function(e){var t="SPAN"===this.element.tagName&&e&&"width"in e,n=d(t&&e.width,void 0);if(t){delete e.width,this.textWidth=n;var r=!0}return e&&"ellipsis"===e.textOverflow&&(e.whiteSpace="nowrap",e.overflow="hidden"),this.styles=u(this.styles,e),l(this.element,e),r&&this.htmlUpdateTransform(),this},t.prototype.htmlGetBBox=function(){var e=this.element;return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}},t.prototype.htmlUpdateTransform=function(){if(this.added){var e=this.renderer,t=this.element,n=this.translateX||0,r=this.translateY||0,i=this.x||0,o=this.y||0,s=this.textAlign||"left",a={left:0,center:.5,right:1}[s],u=this.styles;if(u=u&&u.whiteSpace,l(t,{marginLeft:n,marginTop:r}),!e.styledMode&&this.shadows&&this.shadows.forEach((function(e){l(e,{marginLeft:n+1,marginTop:r+1})})),this.inverted&&[].forEach.call(t.childNodes,(function(n){e.invertChild(n,t)})),"SPAN"===t.tagName){var d=this.rotation,p=this.textWidth&&h(this.textWidth),f=[d,s,t.innerHTML,this.textWidth,this.textAlign].join(),m=void 0;if(m=!1,p!==this.oldTextWidth){if(this.textPxLength)var g=this.textPxLength;else l(t,{width:"",whiteSpace:u||"nowrap"}),g=t.offsetWidth;(p>this.oldTextWidth||g>p)&&(/[ \-]/.test(t.textContent||t.innerText)||"ellipsis"===t.style.textOverflow)&&(l(t,{width:g>p||d?p+"px":"auto",display:"block",whiteSpace:u||"normal"}),this.oldTextWidth=p,m=!0)}this.hasBoxWidthChanged=m,f!==this.cTT&&(m=e.fontMetrics(t.style.fontSize,t).b,!c(d)||d===(this.oldRotation||0)&&s===this.oldAlign||this.setSpanRotation(d,a,m),this.getSpanCorrection(!c(d)&&this.textPxLength||t.offsetWidth,m,a,d,s)),l(t,{left:i+(this.xCorr||0)+"px",top:o+(this.yCorr||0)+"px"}),this.cTT=f,this.oldRotation=d,this.oldAlign=s}}else this.alignOnAdd=!0},t.prototype.setSpanRotation=function(e,t,n){var r={},c=o&&!/Edge/.test(a.navigator.userAgent)?"-ms-transform":s?"-webkit-transform":i?"MozTransform":a.opera?"-o-transform":void 0;c&&(r[c]=r.transform="rotate("+e+"deg)",r[c+(i?"Origin":"-origin")]=r.transformOrigin=100*t+"% "+n+"px",l(this.element,r))},t.composedClasses=[],t}(t)})),t(n,"Core/Renderer/HTML/HTMLRenderer.js",[n["Core/Renderer/HTML/AST.js"],n["Core/Renderer/SVG/SVGElement.js"],n["Core/Renderer/SVG/SVGRenderer.js"],n["Core/Utilities.js"]],(function(e,t,n,r){var i=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=r.attr,s=r.createElement,a=r.extend,l=r.pick;return function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return i(r,n),r.compose=function(e){return-1===r.composedClasses.indexOf(e)&&(r.composedClasses.push(e),e.prototype.html=r.prototype.html),e},r.prototype.html=function(n,r,i){var c=this.createElement("span"),u=c.element,d=c.renderer,h=d.isSVG,p=function(e,n){["opacity","visibility"].forEach((function(r){e[r+"Setter"]=function(i,o,s){var a=e.div?e.div.style:n;t.prototype[r+"Setter"].call(this,i,o,s),a&&(a[o]=i)}})),e.addedSetters=!0};return c.textSetter=function(t){t!==this.textStr&&(delete this.bBox,delete this.oldTextWidth,e.setElementHTML(this.element,l(t,"")),this.textStr=t,c.doTransform=!0)},h&&p(c,c.element.style),c.xSetter=c.ySetter=c.alignSetter=c.rotationSetter=function(e,t){"align"===t?c.alignValue=c.textAlign=e:c[t]=e,c.doTransform=!0},c.afterSetters=function(){this.doTransform&&(this.htmlUpdateTransform(),this.doTransform=!1)},c.attr({text:n,x:Math.round(r),y:Math.round(i)}).css({position:"absolute"}),d.styledMode||c.css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize}),u.style.whiteSpace="nowrap",c.css=c.htmlCss,h&&(c.add=function(e){var t=d.box.parentNode,n=[];if(this.parentGroup=e){var r=e.div;if(!r){for(;e;)n.push(e),e=e.parentGroup;n.reverse().forEach((function(e){function i(t,n){e[n]=t,"translateX"===n?d.left=t+"px":d.top=t+"px",e.doTransform=!0}var l=o(e.element,"class"),u=e.styles||{},d=(r=e.div=e.div||s("div",l?{className:l}:void 0,{position:"absolute",left:(e.translateX||0)+"px",top:(e.translateY||0)+"px",display:e.display,opacity:e.opacity,cursor:u.cursor,pointerEvents:u.pointerEvents,visibility:e.visibility},r||t)).style;a(e,{classSetter:function(e){return function(t){this.element.setAttribute("class",t),e.className=t}}(r),on:function(){return n[0].div&&c.on.apply({element:n[0].div,onEvents:e.onEvents},arguments),e},translateXSetter:i,translateYSetter:i}),e.addedSetters||p(e)}))}}else r=t;return r.appendChild(u),c.added=!0,c.alignOnAdd&&c.htmlUpdateTransform(),c}),c},r.composedClasses=[],r}(n)})),t(n,"Core/Axis/AxisDefaults.js",[],(function(){var e;return function(e){e.defaultXAxisOptions={alignTicks:!0,allowDecimals:void 0,panningEnabled:!0,zIndex:2,zoomEnabled:!0,dateTimeLabelFormats:{millisecond:{main:"%H:%M:%S.%L",range:!1},second:{main:"%H:%M:%S",range:!1},minute:{main:"%H:%M",range:!1},hour:{main:"%H:%M",range:!1},day:{main:"%e. %b"},week:{main:"%e. %b"},month:{main:"%b '%y"},year:{main:"%Y"}},endOnTick:!1,gridLineDashStyle:"Solid",gridZIndex:1,labels:{autoRotation:void 0,autoRotationLimit:80,distance:void 0,enabled:!0,indentation:10,overflow:"justify",padding:5,reserveSpace:void 0,rotation:void 0,staggerLines:0,step:0,useHTML:!1,x:0,zIndex:7,style:{color:"#666666",cursor:"default",fontSize:"11px"}},maxPadding:.01,minorGridLineDashStyle:"Solid",minorTickLength:2,minorTickPosition:"outside",minPadding:.01,offset:void 0,opposite:!1,reversed:void 0,reversedStacks:!1,showEmpty:!0,showFirstLabel:!0,showLastLabel:!0,startOfWeek:1,startOnTick:!1,tickLength:10,tickPixelInterval:100,tickmarkPlacement:"between",tickPosition:"outside",title:{align:"middle",rotation:0,useHTML:!1,x:0,y:0,style:{color:"#666666"}},type:"linear",uniqueNames:!0,visible:!0,minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#ccd6eb",lineWidth:1,gridLineColor:"#e6e6e6",gridLineWidth:void 0,tickColor:"#ccd6eb"},e.defaultYAxisOptions={reversedStacks:!0,endOnTick:!0,maxPadding:.05,minPadding:.05,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{animation:{},allowOverlap:!1,enabled:!1,crop:!0,overflow:"justify",formatter:function(){return(0,this.axis.chart.numberFormatter)(this.total,-1)},style:{color:"#000000",fontSize:"11px",fontWeight:"bold",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},e.defaultLeftAxisOptions={labels:{x:-15},title:{rotation:270}},e.defaultRightAxisOptions={labels:{x:15},title:{rotation:90}},e.defaultBottomAxisOptions={labels:{autoRotation:[-45],x:0},margin:15,title:{rotation:0}},e.defaultTopAxisOptions={labels:{autoRotation:[-45],x:0},margin:15,title:{rotation:0}}}(e||(e={})),e})),t(n,"Core/Foundation.js",[n["Core/Utilities.js"]],(function(e){var t,n=e.addEvent,r=e.isFunction,i=e.objectEach,o=e.removeEvent;return function(e){e.registerEventOptions=function(e,t){e.eventOptions=e.eventOptions||{},i(t.events,(function(t,i){e.eventOptions[i]!==t&&(e.eventOptions[i]&&(o(e,i,e.eventOptions[i]),delete e.eventOptions[i]),r(t)&&(e.eventOptions[i]=t,n(e,i,t)))}))}}(t||(t={})),t})),t(n,"Core/Axis/Tick.js",[n["Core/FormatUtilities.js"],n["Core/Globals.js"],n["Core/Utilities.js"]],(function(e,t,n){var r=t.deg2rad,i=n.clamp,o=n.correctFloat,s=n.defined,a=n.destroyObjectProperties,l=n.extend,c=n.fireEvent,u=n.isNumber,d=n.merge,h=n.objectEach,p=n.pick;return t=function(){function t(e,t,n,r,i){this.isNewLabel=this.isNew=!0,this.axis=e,this.pos=t,this.type=n||"",this.parameters=i||{},this.tickmarkOffset=this.parameters.tickmarkOffset,this.options=this.parameters.options,c(this,"init"),n||r||this.addLabel()}return t.prototype.addLabel=function(){var t=this,n=t.axis,r=n.options,i=n.chart,a=n.categories,d=n.logarithmic,h=n.names,f=t.pos,m=p(t.options&&t.options.labels,r.labels),g=n.tickPositions,b=f===g[0],v=f===g[g.length-1],y=(!m.step||1===m.step)&&1===n.tickInterval;g=g.info;var S,_=t.label;if(a=this.parameters.category||(a?p(a[f],h[f],f):f),d&&u(a)&&(a=o(d.lin2log(a))),n.dateTime)if(g)var x=i.time.resolveDTLFormat(r.dateTimeLabelFormats[!r.grid&&g.higherRanks[f]||g.unitName]),w=x.main;else u(a)&&(w=n.dateTime.getXDateFormat(a,r.dateTimeLabelFormats||{}));t.isFirst=b,t.isLast=v;var k={axis:n,chart:i,dateTimeLabelFormat:w,isFirst:b,isLast:v,pos:f,tick:t,tickPositionInfo:g,value:a};c(this,"labelFormat",k);var O=function(t){return m.formatter?m.formatter.call(t,t):m.format?(t.text=n.defaultLabelFormatter.call(t),e.format(m.format,t,i)):n.defaultLabelFormatter.call(t,t)};r=O.call(k,k);var E=x&&x.list;t.shortenLabel=E?function(){for(S=0;S<E.length;S++)if(l(k,{dateTimeLabelFormat:E[S]}),_.attr({text:O.call(k,k)}),_.getBBox().width<n.getSlotWidth(t)-2*m.padding)return;_.attr({text:""})}:void 0,y&&n._addedPlotLB&&t.moveLabel(r,m),s(_)||t.movedLabel?_&&_.textStr!==r&&!y&&(!_.textWidth||m.style.width||_.styles.width||_.css({width:null}),_.attr({text:r}),_.textPxLength=_.getBBox().width):(t.label=_=t.createLabel({x:0,y:0},r,m),t.rotation=0)},t.prototype.createLabel=function(e,t,n){var r=this.axis,i=r.chart;return(e=s(t)&&n.enabled?i.renderer.text(t,e.x,e.y,n.useHTML).add(r.labelGroup):null)&&(i.styledMode||e.css(d(n.style)),e.textPxLength=e.getBBox().width),e},t.prototype.destroy=function(){a(this,this.axis)},t.prototype.getPosition=function(e,t,n,r){var s=this.axis,a=s.chart,l=r&&a.oldChartHeight||a.chartHeight;return(e={x:e?o(s.translate(t+n,null,null,r)+s.transB):s.left+s.offset+(s.opposite?(r&&a.oldChartWidth||a.chartWidth)-s.right-s.left:0),y:e?l-s.bottom+s.offset-(s.opposite?s.height:0):o(l-s.translate(t+n,null,null,r)-s.transB)}).y=i(e.y,-1e5,1e5),c(this,"afterGetPosition",{pos:e}),e},t.prototype.getLabelPosition=function(e,t,n,i,o,a,l,u){var d=this.axis,h=d.transA,p=d.isLinked&&d.linkedParent?d.linkedParent.reversed:d.reversed,f=d.staggerLines,m=d.tickRotCorr||{x:0,y:0},g=i||d.reserveSpaceDefault?0:-d.labelOffset*("center"===d.labelAlign?.5:1),b={},v=o.y;return s(v)||(v=0===d.side?n.rotation?-8:-n.getBBox().height:2===d.side?m.y+8:Math.cos(n.rotation*r)*(m.y-n.getBBox(!1,0).height/2)),e=e+o.x+g+m.x-(a&&i?a*h*(p?-1:1):0),t=t+v-(a&&!i?a*h*(p?1:-1):0),f&&(n=l/(u||1)%f,d.opposite&&(n=f-n-1),t+=d.labelOffset/f*n),b.x=e,b.y=Math.round(t),c(this,"afterGetLabelPosition",{pos:b,tickmarkOffset:a,index:l}),b},t.prototype.getLabelSize=function(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0},t.prototype.getMarkPath=function(e,t,n,r,i,o){return o.crispLine([["M",e,t],["L",e+(i?0:-n),t+(i?n:0)]],r)},t.prototype.handleOverflow=function(e){var t=this.axis,n=t.options.labels,i=e.x,o=t.chart.chartWidth,s=t.chart.spacing,a=p(t.labelLeft,Math.min(t.pos,s[3]));s=p(t.labelRight,Math.max(t.isRadial?0:t.pos+t.len,o-s[1]));var l,c=this.label,u=this.rotation,d={left:0,center:.5,right:1}[t.labelAlign||c.attr("align")],h=c.getBBox().width,f=t.getSlotWidth(this),m={},g=f,b=1;u||"justify"!==n.overflow?0>u&&i-d*h<a?l=Math.round(i/Math.cos(u*r)-a):0<u&&i+d*h>s&&(l=Math.round((o-i)/Math.cos(u*r))):(o=i+(1-d)*h,i-d*h<a?g=e.x+g*(1-d)-a:o>s&&(g=s-e.x+g*d,b=-1),(g=Math.min(f,g))<f&&"center"===t.labelAlign&&(e.x+=b*(f-g-d*(f-Math.min(h,g)))),(h>g||t.autoRotation&&(c.styles||{}).width)&&(l=g)),l&&(this.shortenLabel?this.shortenLabel():(m.width=Math.floor(l)+"px",(n.style||{}).textOverflow||(m.textOverflow="ellipsis"),c.css(m)))},t.prototype.moveLabel=function(e,t){var n=this,r=n.label,i=n.axis,o=i.reversed,s=!1;if(r&&r.textStr===e?(n.movedLabel=r,s=!0,delete n.label):h(i.ticks,(function(t){s||t.isNew||t===n||!t.label||t.label.textStr!==e||(n.movedLabel=t.label,s=!0,t.labelPos=n.movedLabel.xy,delete t.label)})),!s&&(n.labelPos||r)){var a=n.labelPos||r.xy;r=i.horiz?o?0:i.width+i.left:a.x,i=i.horiz?a.y:o?i.width+i.left:0,n.movedLabel=n.createLabel({x:r,y:i},e,t),n.movedLabel&&n.movedLabel.attr({opacity:0})}},t.prototype.render=function(e,t,n){var r=this.axis,i=r.horiz,o=this.pos,s=p(this.tickmarkOffset,r.tickmarkOffset);s=(o=this.getPosition(i,o,s,t)).x;var a=o.y;r=i&&s===r.pos+r.len||!i&&a===r.pos?-1:1,i=p(n,this.label&&this.label.newOpacity,1),n=p(n,1),this.isActive=!0,this.renderGridLine(t,n,r),this.renderMark(o,n,r),this.renderLabel(o,t,i,e),this.isNew=!1,c(this,"afterRender")},t.prototype.renderGridLine=function(e,t,n){var r=this.axis,i=r.options,o={},s=this.pos,a=this.type,l=p(this.tickmarkOffset,r.tickmarkOffset),c=r.chart.renderer,u=this.gridLine,d=i.gridLineWidth,h=i.gridLineColor,f=i.gridLineDashStyle;"minor"===this.type&&(d=i.minorGridLineWidth,h=i.minorGridLineColor,f=i.minorGridLineDashStyle),u||(r.chart.styledMode||(o.stroke=h,o["stroke-width"]=d||0,o.dashstyle=f),a||(o.zIndex=1),e&&(t=0),this.gridLine=u=c.path().attr(o).addClass("highcharts-"+(a?a+"-":"")+"grid-line").add(r.gridGroup)),u&&(n=r.getPlotLinePath({value:s+l,lineWidth:u.strokeWidth()*n,force:"pass",old:e}))&&u[e||this.isNew?"attr":"animate"]({d:n,opacity:t})},t.prototype.renderMark=function(e,t,n){var r=this.axis,i=r.options,o=r.chart.renderer,s=this.type,a=r.tickSize(s?s+"Tick":"tick"),l=e.x;e=e.y;var c=p(i["minor"!==s?"tickWidth":"minorTickWidth"],!s&&r.isXAxis?1:0);i=i["minor"!==s?"tickColor":"minorTickColor"];var u=this.mark,d=!u;a&&(r.opposite&&(a[0]=-a[0]),u||(this.mark=u=o.path().addClass("highcharts-"+(s?s+"-":"")+"tick").add(r.axisGroup),r.chart.styledMode||u.attr({stroke:i,"stroke-width":c})),u[d?"attr":"animate"]({d:this.getMarkPath(l,e,a[0],u.strokeWidth()*n,r.horiz,o),opacity:t}))},t.prototype.renderLabel=function(e,t,n,r){var i=this.axis,o=i.horiz,s=i.options,a=this.label,l=s.labels,c=l.step;i=p(this.tickmarkOffset,i.tickmarkOffset);var d=e.x;e=e.y;var h=!0;a&&u(d)&&(a.xy=e=this.getLabelPosition(d,e,a,o,l,i,r,c),this.isFirst&&!this.isLast&&!s.showFirstLabel||this.isLast&&!this.isFirst&&!s.showLastLabel?h=!1:!o||l.step||l.rotation||t||0===n||this.handleOverflow(e),c&&r%c&&(h=!1),h&&u(e.y)?(e.opacity=n,a[this.isNewLabel?"attr":"animate"](e),this.isNewLabel=!1):(a.attr("y",-9999),this.isNewLabel=!0))},t.prototype.replaceMovedLabel=function(){var e=this.label,t=this.axis,n=t.reversed;if(e&&!this.isNew){var r=t.horiz?n?t.left:t.width+t.left:e.xy.x;n=t.horiz?e.xy.y:n?t.width+t.top:t.top,e.animate({x:r,y:n,opacity:0},void 0,e.destroy),delete this.label}t.isDirty=!0,this.label=this.movedLabel,delete this.movedLabel},t}()})),t(n,"Core/Axis/Axis.js",[n["Core/Animation/AnimationUtilities.js"],n["Core/Axis/AxisDefaults.js"],n["Core/Color/Color.js"],n["Core/DefaultOptions.js"],n["Core/Foundation.js"],n["Core/Globals.js"],n["Core/Axis/Tick.js"],n["Core/Utilities.js"]],(function(e,t,n,r,i,o,s,a){var l=e.animObject,c=r.defaultOptions,u=i.registerEventOptions,d=o.deg2rad,h=a.arrayMax,p=a.arrayMin,f=a.clamp,m=a.correctFloat,g=a.defined,b=a.destroyObjectProperties,v=a.erase,y=a.error,S=a.extend,_=a.fireEvent,x=a.getMagnitude,w=a.isArray,k=a.isNumber,O=a.isString,E=a.merge,A=a.normalizeTickInterval,T=a.objectEach,C=a.pick,M=a.relativeLength,$=a.removeEvent,P=a.splat,R=a.syncTimeout;return e=function(){function e(e,t){this.zoomEnabled=this.width=this.visible=this.userOptions=this.translationSlope=this.transB=this.transA=this.top=this.ticks=this.tickRotCorr=this.tickPositions=this.tickmarkOffset=this.tickInterval=this.tickAmount=this.side=this.series=this.right=this.positiveValuesOnly=this.pos=this.pointRangePadding=this.pointRange=this.plotLinesAndBandsGroups=this.plotLinesAndBands=this.paddedTicks=this.overlap=this.options=this.offset=this.names=this.minPixelPadding=this.minorTicks=this.minorTickInterval=this.min=this.maxLabelLength=this.max=this.len=this.left=this.labelFormatter=this.labelEdge=this.isLinked=this.height=this.hasVisibleSeries=this.hasNames=this.eventOptions=this.coll=this.closestPointRange=this.chart=this.categories=this.bottom=this.alternateBands=void 0,this.init(e,t)}return e.prototype.init=function(e,t){var n=t.isX;this.chart=e,this.horiz=e.inverted&&!this.isZAxis?!n:n,this.isXAxis=n,this.coll=this.coll||(n?"xAxis":"yAxis"),_(this,"init",{userOptions:t}),this.opposite=C(t.opposite,this.opposite),this.side=C(t.side,this.side,this.horiz?this.opposite?0:2:this.opposite?1:3),this.setOptions(t);var r=this.options,i=r.labels,o=r.type;this.userOptions=t,this.minPixelPadding=0,this.reversed=C(r.reversed,this.reversed),this.visible=r.visible,this.zoomEnabled=r.zoomEnabled,this.hasNames="category"===o||!0===r.categories,this.categories=r.categories||this.hasNames,this.names||(this.names=[],this.names.keys={}),this.plotLinesAndBandsGroups={},this.positiveValuesOnly=!!this.logarithmic,this.isLinked=g(r.linkedTo),this.ticks={},this.labelEdge=[],this.minorTicks={},this.plotLinesAndBands=[],this.alternateBands={},this.len=0,this.minRange=this.userMinRange=r.minRange||r.maxZoom,this.range=r.range,this.offset=r.offset||0,this.min=this.max=null,t=C(r.crosshair,P(e.options.tooltip.crosshairs)[n?0:1]),this.crosshair=!0===t?{}:t,-1===e.axes.indexOf(this)&&(n?e.axes.splice(e.xAxis.length,0,this):e.axes.push(this),e[this.coll].push(this)),this.series=this.series||[],e.inverted&&!this.isZAxis&&n&&void 0===this.reversed&&(this.reversed=!0),this.labelRotation=k(i.rotation)?i.rotation:void 0,u(this,r),_(this,"afterInit")},e.prototype.setOptions=function(e){this.options=E(t.defaultXAxisOptions,"yAxis"===this.coll&&t.defaultYAxisOptions,[t.defaultTopAxisOptions,t.defaultRightAxisOptions,t.defaultBottomAxisOptions,t.defaultLeftAxisOptions][this.side],E(c[this.coll],e)),_(this,"afterSetOptions",{userOptions:e})},e.prototype.defaultLabelFormatter=function(e){var t=this.axis;e=this.chart.numberFormatter;var n=k(this.value)?this.value:NaN,r=t.chart.time,i=this.dateTimeLabelFormat,o=c.lang,s=o.numericSymbols;o=o.numericSymbolMagnitude||1e3;var a=t.logarithmic?Math.abs(n):t.tickInterval,l=s&&s.length;if(t.categories)var u=""+this.value;else if(i)u=r.dateFormat(i,n);else if(l&&1e3<=a)for(;l--&&void 0===u;)a>=(t=Math.pow(o,l+1))&&0==10*n%t&&null!==s[l]&&0!==n&&(u=e(n/t,-1)+s[l]);return void 0===u&&(u=1e4<=Math.abs(n)?e(n,-1):e(n,-1,void 0,"")),u},e.prototype.getSeriesExtremes=function(){var e,t=this,n=t.chart;_(this,"getSeriesExtremes",null,(function(){t.hasVisibleSeries=!1,t.dataMin=t.dataMax=t.threshold=null,t.softThreshold=!t.isXAxis,t.stacking&&t.stacking.buildStacks(),t.series.forEach((function(r){if(r.visible||!n.options.chart.ignoreHiddenSeries){var i=r.options,o=i.threshold;if(t.hasVisibleSeries=!0,t.positiveValuesOnly&&0>=o&&(o=null),t.isXAxis){if((i=r.xData).length){i=t.logarithmic?i.filter(t.validatePositiveValue):i;var s=(e=r.getXExtremes(i)).min,a=e.max;k(s)||s instanceof Date||(i=i.filter(k),s=(e=r.getXExtremes(i)).min,a=e.max),i.length&&(t.dataMin=Math.min(C(t.dataMin,s),s),t.dataMax=Math.max(C(t.dataMax,a),a))}}else r=r.applyExtremes(),k(r.dataMin)&&(s=r.dataMin,t.dataMin=Math.min(C(t.dataMin,s),s)),k(r.dataMax)&&(a=r.dataMax,t.dataMax=Math.max(C(t.dataMax,a),a)),g(o)&&(t.threshold=o),(!i.softThreshold||t.positiveValuesOnly)&&(t.softThreshold=!1)}}))})),_(this,"afterGetSeriesExtremes")},e.prototype.translate=function(e,t,n,r,i,o){var s=this.linkedParent||this,a=r&&s.old?s.old.min:s.min,l=s.minPixelPadding;i=(s.isOrdinal||s.brokenAxis&&s.brokenAxis.hasBreaks||s.logarithmic&&i)&&s.lin2val;var c=1,u=0;return(r=r&&s.old?s.old.transA:s.transA)||(r=s.transA),n&&(c*=-1,u=s.len),s.reversed&&(u-=(c*=-1)*(s.sector||s.len)),t?(e=(e*c+u-l)/r+a,i&&(e=s.lin2val(e))):(i&&(e=s.val2lin(e)),e=k(a)?c*(e-a)*r+u+c*l+(k(o)?r*o:0):void 0),e},e.prototype.toPixels=function(e,t){return this.translate(e,!1,!this.horiz,null,!0)+(t?0:this.pos)},e.prototype.toValue=function(e,t){return this.translate(e-(t?0:this.pos),!0,!this.horiz,null,!0)},e.prototype.getPlotLinePath=function(e){function t(e,t,n){return("pass"!==y&&e<t||e>n)&&(y?e=f(e,t,n):s=!0),e}var n,r,i,o,s,a=this,l=a.chart,c=a.left,u=a.top,d=e.old,h=e.value,p=e.lineWidth,m=d&&l.oldChartHeight||l.chartHeight,g=d&&l.oldChartWidth||l.chartWidth,b=a.transB,v=e.translatedValue,y=e.force;return e={value:h,lineWidth:p,old:d,force:y,acrossPanes:e.acrossPanes,translatedValue:v},_(this,"getPlotLinePath",e,(function(e){v=C(v,a.translate(h,null,null,d)),v=f(v,-1e5,1e5),n=i=Math.round(v+b),r=o=Math.round(m-v-b),k(v)?a.horiz?(r=u,o=m-a.bottom,n=i=t(n,c,c+a.width)):(n=c,i=g-a.right,r=o=t(r,u,u+a.height)):(s=!0,y=!1),e.path=s&&!y?null:l.renderer.crispLine([["M",n,r],["L",i,o]],p||1)})),e.path},e.prototype.getLinearTickPositions=function(e,t,n){var r=m(Math.floor(t/e)*e);n=m(Math.ceil(n/e)*e);var i,o=[];if(m(r+e)===r&&(i=20),this.single)return[t];for(t=r;t<=n&&(o.push(t),(t=m(t+e,i))!==s);)var s=t;return o},e.prototype.getMinorTickInterval=function(){var e=this.options;return!0===e.minorTicks?C(e.minorTickInterval,"auto"):!1===e.minorTicks?null:e.minorTickInterval},e.prototype.getMinorTickPositions=function(){var e=this.options,t=this.tickPositions,n=this.minorTickInterval,r=this.pointRangePadding||0,i=this.min-r,o=(r=this.max+r)-i,s=[];if(o&&o/n<this.len/3){var a=this.logarithmic;if(a)this.paddedTicks.forEach((function(e,t,r){t&&s.push.apply(s,a.getLogTickPositions(n,r[t-1],r[t],!0))}));else if(this.dateTime&&"auto"===this.getMinorTickInterval())s=s.concat(this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(n),i,r,e.startOfWeek));else for(e=i+(t[0]-i)%n;e<=r&&e!==s[0];e+=n)s.push(e)}return 0!==s.length&&this.trimTicks(s),s},e.prototype.adjustForMinRange=function(){var e,t,n,r,i=this.options,o=this.logarithmic,s=this.min,a=this.max,l=0;if(this.isXAxis&&void 0===this.minRange&&!o&&(g(i.min)||g(i.max)||g(i.floor)||g(i.ceiling)?this.minRange=null:(this.series.forEach((function(i){if(n=i.xData,r=i.xIncrement?1:n.length-1,1<n.length)for(e=r;0<e;e--)t=n[e]-n[e-1],(!l||t<l)&&(l=t)})),this.minRange=Math.min(5*l,this.dataMax-this.dataMin))),a-s<this.minRange){var c=this.dataMax-this.dataMin>=this.minRange,u=this.minRange,d=(u-a+s)/2;d=[s-d,C(i.min,s-d)],c&&(d[2]=this.logarithmic?this.logarithmic.log2lin(this.dataMin):this.dataMin),a=[(s=h(d))+u,C(i.max,s+u)],c&&(a[2]=o?o.log2lin(this.dataMax):this.dataMax),(a=p(a))-s<u&&(d[0]=a-u,d[1]=C(i.min,a-u),s=h(d))}this.min=s,this.max=a},e.prototype.getClosest=function(){var e;return this.categories?e=1:this.series.forEach((function(t){var n=t.closestPointRange,r=t.visible||!t.chart.options.chart.ignoreHiddenSeries;!t.noSharedTooltip&&g(n)&&r&&(e=g(e)?Math.min(e,n):n)})),e},e.prototype.nameToX=function(e){var t=w(this.categories),n=t?this.categories:this.names,r=e.options.x;if(e.series.requireSorting=!1,g(r)||(r=this.options.uniqueNames?t?n.indexOf(e.name):C(n.keys[e.name],-1):e.series.autoIncrement()),-1===r){if(!t)var i=n.length}else i=r;return void 0!==i&&(this.names[i]=e.name,this.names.keys[e.name]=i),i},e.prototype.updateNames=function(){var e=this,t=this.names;0<t.length&&(Object.keys(t.keys).forEach((function(e){delete t.keys[e]})),t.length=0,this.minRange=this.userMinRange,(this.series||[]).forEach((function(t){t.xIncrement=null,t.points&&!t.isDirtyData||(e.max=Math.max(e.max,t.xData.length-1),t.processData(),t.generatePoints()),t.data.forEach((function(n,r){if(n&&n.options&&void 0!==n.name){var i=e.nameToX(n);void 0!==i&&i!==n.x&&(n.x=i,t.xData[r]=i)}}))})))},e.prototype.setAxisTranslation=function(){var e=this,t=e.max-e.min,n=e.linkedParent,r=!!e.categories,i=e.isXAxis,o=e.axisPointRange||0,s=0,a=0,l=e.transA;if(i||r||o){var c=e.getClosest();n?(s=n.minPointOffset,a=n.pointRangePadding):e.series.forEach((function(t){var n=r?1:i?C(t.options.pointRange,c,0):e.axisPointRange||0,l=t.options.pointPlacement;o=Math.max(o,n),e.single&&!r||(t=t.is("xrange")?!i:i,s=Math.max(s,t&&O(l)?0:n/2),a=Math.max(a,t&&"on"===l?0:n))})),n=e.ordinal&&e.ordinal.slope&&c?e.ordinal.slope/c:1,e.minPointOffset=s*=n,e.pointRangePadding=a*=n,e.pointRange=Math.min(o,e.single&&r?1:t),i&&(e.closestPointRange=c)}e.translationSlope=e.transA=l=e.staticScale||e.len/(t+a||1),e.transB=e.horiz?e.left:e.bottom,e.minPixelPadding=l*s,_(this,"afterSetAxisTranslation")},e.prototype.minFromRange=function(){return this.max-this.range},e.prototype.setTickInterval=function(e){var t=this.chart,n=this.logarithmic,r=this.options,i=this.isXAxis,o=this.isLinked,s=r.tickPixelInterval,a=this.categories,l=this.softThreshold,c=r.maxPadding,u=r.minPadding,d=k(r.tickInterval)&&0<=r.tickInterval?r.tickInterval:void 0,h=k(this.threshold)?this.threshold:null;this.dateTime||a||o||this.getTickAmount();var p=C(this.userMin,r.min),f=C(this.userMax,r.max);if(o){this.linkedParent=t[this.coll][r.linkedTo];var b=this.linkedParent.getExtremes();this.min=C(b.min,b.dataMin),this.max=C(b.max,b.dataMax),r.type!==this.linkedParent.options.type&&y(11,1,t)}else{if(l&&g(h))if(this.dataMin>=h)b=h,u=0;else if(this.dataMax<=h){var v=h;c=0}this.min=C(p,b,this.dataMin),this.max=C(f,v,this.dataMax)}if(n&&(this.positiveValuesOnly&&!e&&0>=Math.min(this.min,C(this.dataMin,this.min))&&y(10,1,t),this.min=m(n.log2lin(this.min),16),this.max=m(n.log2lin(this.max),16)),this.range&&g(this.max)&&(this.userMin=this.min=p=Math.max(this.dataMin,this.minFromRange()),this.userMax=f=this.max,this.range=null),_(this,"foundExtremes"),this.beforePadding&&this.beforePadding(),this.adjustForMinRange(),!(a||this.axisPointRange||this.stacking&&this.stacking.usePercentage||o)&&g(this.min)&&g(this.max)&&(t=this.max-this.min)&&(!g(p)&&u&&(this.min-=t*u),!g(f)&&c&&(this.max+=t*c)),k(this.userMin)||(k(r.softMin)&&r.softMin<this.min&&(this.min=p=r.softMin),k(r.floor)&&(this.min=Math.max(this.min,r.floor))),k(this.userMax)||(k(r.softMax)&&r.softMax>this.max&&(this.max=f=r.softMax),k(r.ceiling)&&(this.max=Math.min(this.max,r.ceiling))),l&&g(this.dataMin)&&(h=h||0,!g(p)&&this.min<h&&this.dataMin>=h?this.min=this.options.minRange?Math.min(h,this.max-this.minRange):h:!g(f)&&this.max>h&&this.dataMax<=h&&(this.max=this.options.minRange?Math.max(h,this.min+this.minRange):h)),k(this.min)&&k(this.max)&&!this.chart.polar&&this.min>this.max&&(g(this.options.min)?this.max=this.min:g(this.options.max)&&(this.min=this.max)),this.tickInterval=this.min===this.max||void 0===this.min||void 0===this.max?1:o&&this.linkedParent&&!d&&s===this.linkedParent.options.tickPixelInterval?d=this.linkedParent.tickInterval:C(d,this.tickAmount?(this.max-this.min)/Math.max(this.tickAmount-1,1):void 0,a?1:(this.max-this.min)*s/Math.max(this.len,s)),i&&!e){var S=this.min!==(this.old&&this.old.min)||this.max!==(this.old&&this.old.max);this.series.forEach((function(e){e.forceCrop=e.forceCropping&&e.forceCropping(),e.processData(S)})),_(this,"postProcessData",{hasExtemesChanged:S})}this.setAxisTranslation(),_(this,"initialAxisTranslation"),this.pointRange&&!d&&(this.tickInterval=Math.max(this.pointRange,this.tickInterval)),e=C(r.minTickInterval,this.dateTime&&!this.series.some((function(e){return e.noSharedTooltip}))?this.closestPointRange:0),!d&&this.tickInterval<e&&(this.tickInterval=e),this.dateTime||this.logarithmic||d||(this.tickInterval=A(this.tickInterval,void 0,x(this.tickInterval),C(r.allowDecimals,.5>this.tickInterval||void 0!==this.tickAmount),!!this.tickAmount)),this.tickAmount||(this.tickInterval=this.unsquish()),this.setTickPositions()},e.prototype.setTickPositions=function(){var e=this.options,t=e.tickPositions,n=this.getMinorTickInterval(),r=this.hasVerticalPanning(),i="colorAxis"===this.coll,o=(i||!r)&&e.startOnTick;r=(i||!r)&&e.endOnTick,i=e.tickPositioner,this.tickmarkOffset=this.categories&&"between"===e.tickmarkPlacement&&1===this.tickInterval?.5:0,this.minorTickInterval="auto"===n&&this.tickInterval?this.tickInterval/5:n,this.single=this.min===this.max&&g(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||!1!==e.allowDecimals),this.tickPositions=n=t&&t.slice(),!n&&(this.ordinal&&this.ordinal.positions||!((this.max-this.min)/this.tickInterval>Math.max(2*this.len,200))?n=this.dateTime?this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(this.tickInterval,e.units),this.min,this.max,e.startOfWeek,this.ordinal&&this.ordinal.positions,this.closestPointRange,!0):this.logarithmic?this.logarithmic.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval,this.min,this.max):(n=[this.min,this.max],y(19,!1,this.chart)),n.length>this.len&&((n=[n[0],n.pop()])[0]===n[1]&&(n.length=1)),this.tickPositions=n,i&&(i=i.apply(this,[this.min,this.max])))&&(this.tickPositions=n=i),this.paddedTicks=n.slice(0),this.trimTicks(n,o,r),this.isLinked||(this.single&&2>n.length&&!this.categories&&!this.series.some((function(e){return e.is("heatmap")&&"between"===e.options.pointPlacement}))&&(this.min-=.5,this.max+=.5),t||i||this.adjustTickAmount()),_(this,"afterSetTickPositions")},e.prototype.trimTicks=function(e,t,n){var r=e[0],i=e[e.length-1],o=!this.isOrdinal&&this.minPointOffset||0;if(_(this,"trimTicks"),!this.isLinked){if(t&&-1/0!==r)this.min=r;else for(;this.min-o>e[0];)e.shift();if(n)this.max=i;else for(;this.max+o<e[e.length-1];)e.pop();0===e.length&&g(r)&&!this.options.tickPositions&&e.push((i+r)/2)}},e.prototype.alignToOthers=function(){var e,t={},n=this.options;return!1!==this.chart.options.chart.alignTicks&&n.alignTicks&&!1!==n.startOnTick&&!1!==n.endOnTick&&!this.logarithmic&&this.chart[this.coll].forEach((function(n){var r=n.options;r=[n.horiz?r.left:r.top,r.width,r.height,r.pane].join(),n.series.length&&(t[r]?e=!0:t[r]=1)})),e},e.prototype.getTickAmount=function(){var e=this.options,t=e.tickPixelInterval,n=e.tickAmount;!g(e.tickInterval)&&!n&&this.len<t&&!this.isRadial&&!this.logarithmic&&e.startOnTick&&e.endOnTick&&(n=2),!n&&this.alignToOthers()&&(n=Math.ceil(this.len/t)+1),4>n&&(this.finalTickAmt=n,n=5),this.tickAmount=n},e.prototype.adjustTickAmount=function(){var e=this.options,t=this.tickInterval,n=this.tickPositions,r=this.tickAmount,i=this.finalTickAmt,o=n&&n.length,s=C(this.threshold,this.softThreshold?0:null);if(this.hasData()&&k(this.min)&&k(this.max)){if(o<r){for(;n.length<r;)n.length%2||this.min===s?n.push(m(n[n.length-1]+t)):n.unshift(m(n[0]-t));this.transA*=(o-1)/(r-1),this.min=e.startOnTick?n[0]:Math.min(this.min,n[0]),this.max=e.endOnTick?n[n.length-1]:Math.max(this.max,n[n.length-1])}else o>r&&(this.tickInterval*=2,this.setTickPositions());if(g(i)){for(t=e=n.length;t--;)(3===i&&1==t%2||2>=i&&0<t&&t<e-1)&&n.splice(t,1);this.finalTickAmt=void 0}}},e.prototype.setScale=function(){var e=!1,t=!1;this.series.forEach((function(n){e=e||n.isDirtyData||n.isDirty,t=t||n.xAxis&&n.xAxis.isDirty||!1})),this.setAxisSize();var n=this.len!==(this.old&&this.old.len);n||e||t||this.isLinked||this.forceRedraw||this.userMin!==(this.old&&this.old.userMin)||this.userMax!==(this.old&&this.old.userMax)||this.alignToOthers()?(this.stacking&&this.stacking.resetStacks(),this.forceRedraw=!1,this.getSeriesExtremes(),this.setTickInterval(),this.isDirty||(this.isDirty=n||this.min!==(this.old&&this.old.min)||this.max!==(this.old&&this.old.max))):this.stacking&&this.stacking.cleanStacks(),e&&this.panningState&&(this.panningState.isDirty=!0),_(this,"afterSetScale")},e.prototype.setExtremes=function(e,t,n,r,i){var o=this,s=o.chart;n=C(n,!0),o.series.forEach((function(e){delete e.kdTree})),i=S(i,{min:e,max:t}),_(o,"setExtremes",i,(function(){o.userMin=e,o.userMax=t,o.eventArgs=i,n&&s.redraw(r)}))},e.prototype.zoom=function(e,t){var n=this,r=this.dataMin,i=this.dataMax,o=this.options,s=Math.min(r,C(o.min,r)),a=Math.max(i,C(o.max,i));return _(this,"zoom",e={newMin:e,newMax:t},(function(e){var t=e.newMin,o=e.newMax;t===n.min&&o===n.max||(n.allowZoomOutside||(g(r)&&(t<s&&(t=s),t>a&&(t=a)),g(i)&&(o<s&&(o=s),o>a&&(o=a))),n.displayBtn=void 0!==t||void 0!==o,n.setExtremes(t,o,!1,void 0,{trigger:"zoom"})),e.zoomed=!0})),e.zoomed},e.prototype.setAxisSize=function(){var e=this.chart,t=this.options,n=t.offsets||[0,0,0,0],r=this.horiz,i=this.width=Math.round(M(C(t.width,e.plotWidth-n[3]+n[1]),e.plotWidth)),o=this.height=Math.round(M(C(t.height,e.plotHeight-n[0]+n[2]),e.plotHeight)),s=this.top=Math.round(M(C(t.top,e.plotTop+n[0]),e.plotHeight,e.plotTop));t=this.left=Math.round(M(C(t.left,e.plotLeft+n[3]),e.plotWidth,e.plotLeft)),this.bottom=e.chartHeight-o-s,this.right=e.chartWidth-i-t,this.len=Math.max(r?i:o,0),this.pos=r?t:s},e.prototype.getExtremes=function(){var e=this.logarithmic;return{min:e?m(e.lin2log(this.min)):this.min,max:e?m(e.lin2log(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},e.prototype.getThreshold=function(e){var t=this.logarithmic,n=t?t.lin2log(this.min):this.min;return t=t?t.lin2log(this.max):this.max,null===e||-1/0===e?e=n:1/0===e?e=t:n>e?e=n:t<e&&(e=t),this.translate(e,0,1,0,1)},e.prototype.autoLabelAlign=function(e){var t=(C(e,0)-90*this.side+720)%360;return _(this,"autoLabelAlign",e={align:"center"},(function(e){15<t&&165>t?e.align="right":195<t&&345>t&&(e.align="left")})),e.align},e.prototype.tickSize=function(e){var t=this.options,n=C(t["tick"===e?"tickWidth":"minorTickWidth"],"tick"===e&&this.isXAxis&&!this.categories?1:0),r=t["tick"===e?"tickLength":"minorTickLength"];if(n&&r){"inside"===t[e+"Position"]&&(r=-r);var i=[r,n]}return _(this,"afterTickSize",e={tickSize:i}),e.tickSize},e.prototype.labelMetrics=function(){var e=this.tickPositions&&this.tickPositions[0]||0;return this.chart.renderer.fontMetrics(this.options.labels.style.fontSize,this.ticks[e]&&this.ticks[e].label)},e.prototype.unsquish=function(){var e,t,n=this.options.labels,r=this.horiz,i=this.tickInterval,o=this.len/(((this.categories?1:0)+this.max-this.min)/i),s=n.rotation,a=this.labelMetrics(),l=Math.max(this.max-this.min,0),c=function(e){var t=e/(o||1);return(t=1<t?Math.ceil(t):1)*i>l&&1/0!==e&&1/0!==o&&l&&(t=Math.ceil(l/i)),m(t*i)},u=i,h=Number.MAX_VALUE;if(r){if(!n.staggerLines&&!n.step)if(k(s))var p=[s];else o<n.autoRotationLimit&&(p=n.autoRotation);p&&p.forEach((function(n){if(n===s||n&&-90<=n&&90>=n){var r=(t=c(Math.abs(a.h/Math.sin(d*n))))+Math.abs(n/360);r<h&&(h=r,e=n,u=t)}}))}else n.step||(u=c(a.h));return this.autoRotation=p,this.labelRotation=C(e,k(s)?s:0),u},e.prototype.getSlotWidth=function(e){var t=this.chart,n=this.horiz,r=this.options.labels,i=Math.max(this.tickPositions.length-(this.categories?0:1),1),o=t.margin[3];if(e&&k(e.slotWidth))return e.slotWidth;if(n&&2>r.step)return r.rotation?0:(this.staggerLines||1)*this.len/i;if(!n){if(void 0!==(e=r.style.width))return parseInt(String(e),10);if(o)return o-t.spacing[3]}return.33*t.chartWidth},e.prototype.renderUnsquish=function(){var e=this.chart,t=e.renderer,n=this.tickPositions,r=this.ticks,i=this.options.labels,o=i.style,s=this.horiz,a=this.getSlotWidth(),l=Math.max(1,Math.round(a-2*i.padding)),c={},u=this.labelMetrics(),d=o.textOverflow,h=0;if(O(i.rotation)||(c.rotation=i.rotation||0),n.forEach((function(e){(e=r[e]).movedLabel&&e.replaceMovedLabel(),e&&e.label&&e.label.textPxLength>h&&(h=e.label.textPxLength)})),this.maxLabelLength=h,this.autoRotation)h>l&&h>u.h?c.rotation=this.labelRotation:this.labelRotation=0;else if(a){var p=l;if(!d){var f="clip";for(l=n.length;!s&&l--;){var m=n[l];(m=r[m].label)&&(m.styles&&"ellipsis"===m.styles.textOverflow?m.css({textOverflow:"clip"}):m.textPxLength>a&&m.css({width:a+"px"}),m.getBBox().height>this.len/n.length-(u.h-u.f)&&(m.specificTextOverflow="ellipsis"))}}}c.rotation&&(p=h>.5*e.chartHeight?.33*e.chartHeight:h,d||(f="ellipsis")),(this.labelAlign=i.align||this.autoLabelAlign(this.labelRotation))&&(c.align=this.labelAlign),n.forEach((function(e){var t=(e=r[e])&&e.label,n=o.width,i={};t&&(t.attr(c),e.shortenLabel?e.shortenLabel():p&&!n&&"nowrap"!==o.whiteSpace&&(p<t.textPxLength||"SPAN"===t.element.tagName)?(i.width=p+"px",d||(i.textOverflow=t.specificTextOverflow||f),t.css(i)):t.styles&&t.styles.width&&!i.width&&!n&&t.css({width:null}),delete t.specificTextOverflow,e.rotation=c.rotation)}),this),this.tickRotCorr=t.rotCorr(u.b,this.labelRotation||0,0!==this.side)},e.prototype.hasData=function(){return this.series.some((function(e){return e.hasData()}))||this.options.showEmpty&&g(this.min)&&g(this.max)},e.prototype.addTitle=function(e){var t,n=this.chart.renderer,r=this.horiz,i=this.opposite,o=this.options.title,s=this.chart.styledMode;this.axisTitle||((t=o.textAlign)||(t=(r?{low:"left",middle:"center",high:"right"}:{low:i?"right":"left",middle:"center",high:i?"left":"right"})[o.align]),this.axisTitle=n.text(o.text||"",0,0,o.useHTML).attr({zIndex:7,rotation:o.rotation,align:t}).addClass("highcharts-axis-title"),s||this.axisTitle.css(E(o.style)),this.axisTitle.add(this.axisGroup),this.axisTitle.isNew=!0),s||o.style.width||this.isRadial||this.axisTitle.css({width:this.len+"px"}),this.axisTitle[e?"show":"hide"](e)},e.prototype.generateTick=function(e){var t=this.ticks;t[e]?t[e].addLabel():t[e]=new s(this,e)},e.prototype.getOffset=function(){var e=this,t=this,n=t.chart,r=t.horiz,i=t.options,o=t.side,s=t.ticks,a=t.tickPositions,l=t.coll,c=t.axisParent,u=n.renderer,d=n.inverted&&!t.isZAxis?[1,0,3,2][o]:o,h=t.hasData(),p=i.title,f=i.labels,m=n.axisOffset;n=n.clipOffset;var b,v=[-1,1,1,-1][o],y=i.className,S=0,x=0,w=0;if(t.showAxis=b=h||i.showEmpty,t.staggerLines=t.horiz&&f.staggerLines||void 0,!t.axisGroup){var k=function(t,n,r){return u.g(t).attr({zIndex:r}).addClass("highcharts-"+l.toLowerCase()+n+" "+(e.isRadial?"highcharts-radial-axis"+n+" ":"")+(y||"")).add(c)};t.gridGroup=k("grid","-grid",i.gridZIndex),t.axisGroup=k("axis","",i.zIndex),t.labelGroup=k("axis-labels","-labels",f.zIndex)}if(h||t.isLinked?(a.forEach((function(e){t.generateTick(e)})),t.renderUnsquish(),t.reserveSpaceDefault=0===o||2===o||{1:"left",3:"right"}[o]===t.labelAlign,C(f.reserveSpace,"center"===t.labelAlign||null,t.reserveSpaceDefault)&&a.forEach((function(e){w=Math.max(s[e].getLabelSize(),w)})),t.staggerLines&&(w*=t.staggerLines),t.labelOffset=w*(t.opposite?-1:1)):T(s,(function(e,t){e.destroy(),delete s[t]})),p&&p.text&&!1!==p.enabled&&(t.addTitle(b),b&&!1!==p.reserveSpace)){t.titleOffset=S=t.axisTitle.getBBox()[r?"height":"width"];var O=p.offset;x=g(O)?0:C(p.margin,r?5:10)}t.renderLine(),t.offset=v*C(i.offset,m[o]?m[o]+(i.margin||0):0),t.tickRotCorr=t.tickRotCorr||{x:0,y:0},p=0===o?-t.labelMetrics().h:2===o?t.tickRotCorr.y:0,h=Math.abs(w)+x,w&&(h=h-p+v*(r?C(f.y,t.tickRotCorr.y+8*v):f.x)),t.axisTitleMargin=C(O,h),t.getMaxLabelDimensions&&(t.maxLabelDimensions=t.getMaxLabelDimensions(s,a)),"colorAxis"!==l&&(r=this.tickSize("tick"),m[o]=Math.max(m[o],(t.axisTitleMargin||0)+S+v*t.offset,h,a&&a.length&&r?r[0]+v*t.offset:0),i=!t.axisLine||i.offset?0:2*Math.floor(t.axisLine.strokeWidth()/2),n[d]=Math.max(n[d],i)),_(this,"afterGetOffset")},e.prototype.getLinePath=function(e){var t=this.chart,n=this.opposite,r=this.offset,i=this.horiz,o=this.left+(n?this.width:0)+r;return r=t.chartHeight-this.bottom-(n?this.height:0)+r,n&&(e*=-1),t.renderer.crispLine([["M",i?this.left:o,i?r:this.top],["L",i?t.chartWidth-this.right:o,i?r:t.chartHeight-this.bottom]],e)},e.prototype.renderLine=function(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup),this.chart.styledMode||this.axisLine.attr({stroke:this.options.lineColor,"stroke-width":this.options.lineWidth,zIndex:7}))},e.prototype.getTitlePosition=function(){var e=this.horiz,t=this.left,n=this.top,r=this.len,i=this.options.title,o=e?t:n,s=this.opposite,a=this.offset,l=i.x,c=i.y,u=this.axisTitle,d=this.chart.renderer.fontMetrics(i.style.fontSize,u);return u=Math.max(u.getBBox(null,0).height-d.h-1,0),r={low:o+(e?0:r),middle:o+r/2,high:o+(e?r:0)}[i.align],t=(e?n+this.height:t)+(e?1:-1)*(s?-1:1)*this.axisTitleMargin+[-u,u,d.f,-u][this.side],e={x:e?r+l:t+(s?this.width:0)+a+l,y:e?t+c-(s?this.height:0)+a:r+c},_(this,"afterGetTitlePosition",{titlePosition:e}),e},e.prototype.renderMinorTick=function(e,t){var n=this.minorTicks;n[e]||(n[e]=new s(this,e,"minor")),t&&n[e].isNew&&n[e].render(null,!0),n[e].render(null,!1,1)},e.prototype.renderTick=function(e,t,n){var r=this.ticks;(!this.isLinked||e>=this.min&&e<=this.max||this.grid&&this.grid.isColumn)&&(r[e]||(r[e]=new s(this,e)),n&&r[e].isNew&&r[e].render(t,!0,-1),r[e].render(t))},e.prototype.render=function(){var e,t,n=this,r=n.chart,i=n.logarithmic,a=n.options,c=n.isLinked,u=n.tickPositions,d=n.axisTitle,h=n.ticks,p=n.minorTicks,f=n.alternateBands,m=a.stackLabels,g=a.alternateGridColor,b=n.tickmarkOffset,v=n.axisLine,y=n.showAxis,S=l(r.renderer.globalAnimation);if(n.labelEdge.length=0,n.overlap=!1,[h,p,f].forEach((function(e){T(e,(function(e){e.isActive=!1}))})),n.hasData()||c){var x=n.chart.hasRendered&&n.old&&k(n.old.min);n.minorTickInterval&&!n.categories&&n.getMinorTickPositions().forEach((function(e){n.renderMinorTick(e,x)})),u.length&&(u.forEach((function(e,t){n.renderTick(e,t,x)})),b&&(0===n.min||n.single)&&(h[-1]||(h[-1]=new s(n,-1,null,!0)),h[-1].render(-1))),g&&u.forEach((function(s,a){t=void 0!==u[a+1]?u[a+1]+b:n.max-b,0==a%2&&s<n.max&&t<=n.max+(r.polar?-b:b)&&(f[s]||(f[s]=new o.PlotLineOrBand(n)),e=s+b,f[s].options={from:i?i.lin2log(e):e,to:i?i.lin2log(t):t,color:g,className:"highcharts-alternate-grid"},f[s].render(),f[s].isActive=!0)})),n._addedPlotLB||(n._addedPlotLB=!0,(a.plotLines||[]).concat(a.plotBands||[]).forEach((function(e){n.addPlotBandOrLine(e)})))}[h,p,f].forEach((function(e){var t=[],n=S.duration;T(e,(function(e,n){e.isActive||(e.render(n,!1,0),e.isActive=!1,t.push(n))})),R((function(){for(var n=t.length;n--;)e[t[n]]&&!e[t[n]].isActive&&(e[t[n]].destroy(),delete e[t[n]])}),e!==f&&r.hasRendered&&n?n:0)})),v&&(v[v.isPlaced?"animate":"attr"]({d:this.getLinePath(v.strokeWidth())}),v.isPlaced=!0,v[y?"show":"hide"](y)),d&&y&&(a=n.getTitlePosition(),k(a.y)?(d[d.isNew?"attr":"animate"](a),d.isNew=!1):(d.attr("y",-9999),d.isNew=!0)),m&&m.enabled&&n.stacking&&n.stacking.renderStackTotals(),n.old={len:n.len,max:n.max,min:n.min,transA:n.transA,userMax:n.userMax,userMin:n.userMin},n.isDirty=!1,_(this,"afterRender")},e.prototype.redraw=function(){this.visible&&(this.render(),this.plotLinesAndBands.forEach((function(e){e.render()}))),this.series.forEach((function(e){e.isDirty=!0}))},e.prototype.getKeepProps=function(){return this.keepProps||e.keepProps},e.prototype.destroy=function(e){var t=this,n=t.plotLinesAndBands,r=this.eventOptions;if(_(this,"destroy",{keepEvents:e}),e||$(t),[t.ticks,t.minorTicks,t.alternateBands].forEach((function(e){b(e)})),n)for(e=n.length;e--;)n[e].destroy();for(var i in"axisLine axisTitle axisGroup gridGroup labelGroup cross scrollbar".split(" ").forEach((function(e){t[e]&&(t[e]=t[e].destroy())})),t.plotLinesAndBandsGroups)t.plotLinesAndBandsGroups[i]=t.plotLinesAndBandsGroups[i].destroy();T(t,(function(e,n){-1===t.getKeepProps().indexOf(n)&&delete t[n]})),this.eventOptions=r},e.prototype.drawCrosshair=function(e,t){var r,i=this.crosshair,o=C(i&&i.snap,!0),s=this.chart,a=this.cross;if(_(this,"drawCrosshair",{e:e,point:t}),e||(e=this.cross&&this.cross.e),i&&!1!==(g(t)||!o)){if(o?g(t)&&(r=C("colorAxis"!==this.coll?t.crosshairPos:null,this.isXAxis?t.plotX:this.len-t.plotY)):r=e&&(this.horiz?e.chartX-this.pos:this.len-e.chartY+this.pos),g(r)){var l={value:t&&(this.isXAxis?t.x:C(t.stackY,t.y)),translatedValue:r};s.polar&&S(l,{isCrosshair:!0,chartX:e&&e.chartX,chartY:e&&e.chartY,point:t}),l=this.getPlotLinePath(l)||null}if(!g(l))return void this.hideCrosshair();o=this.categories&&!this.isRadial,a||(this.cross=a=s.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+(o?"category ":"thin ")+(i.className||"")).attr({zIndex:C(i.zIndex,2)}).add(),s.styledMode||(a.attr({stroke:i.color||(o?n.parse("#ccd6eb").setOpacity(.25).get():"#cccccc"),"stroke-width":C(i.width,1)}).css({"pointer-events":"none"}),i.dashStyle&&a.attr({dashstyle:i.dashStyle}))),a.show().attr({d:l}),o&&!i.width&&a.attr({"stroke-width":this.transA}),this.cross.e=e}else this.hideCrosshair();_(this,"afterDrawCrosshair",{e:e,point:t})},e.prototype.hideCrosshair=function(){this.cross&&this.cross.hide(),_(this,"afterHideCrosshair")},e.prototype.hasVerticalPanning=function(){var e=this.chart.options.chart.panning;return!!(e&&e.enabled&&/y/.test(e.type))},e.prototype.validatePositiveValue=function(e){return k(e)&&0<e},e.prototype.update=function(e,t){var n=this.chart;e=E(this.userOptions,e),this.destroy(!0),this.init(n,e),n.isDirtyBox=!0,C(t,!0)&&n.redraw()},e.prototype.remove=function(e){for(var t=this.chart,n=this.coll,r=this.series,i=r.length;i--;)r[i]&&r[i].remove(!1);v(t.axes,this),v(t[n],this),t[n].forEach((function(e,t){e.options.index=e.userOptions.index=t})),this.destroy(),t.isDirtyBox=!0,C(e,!0)&&t.redraw()},e.prototype.setTitle=function(e,t){this.update({title:e},t)},e.prototype.setCategories=function(e,t){this.update({categories:e},t)},e.defaultOptions=t.defaultXAxisOptions,e.keepProps="extKey hcEvents names series userMax userMin".split(" "),e}()})),t(n,"Core/Axis/DateTimeAxis.js",[n["Core/Utilities.js"]],(function(e){var t,n=e.addEvent,r=e.getMagnitude,i=e.normalizeTickInterval,o=e.timeUnits;return function(e){function t(){return this.chart.time.getTimeTicks.apply(this.chart.time,arguments)}function s(e){"datetime"!==e.userOptions.type?this.dateTime=void 0:this.dateTime||(this.dateTime=new l(this))}var a=[];e.compose=function(e){return-1===a.indexOf(e)&&(a.push(e),e.keepProps.push("dateTime"),e.prototype.getTimeTicks=t,n(e,"init",s)),e};var l=function(){function e(e){this.axis=e}return e.prototype.normalizeTimeTickInterval=function(e,t){var n=t||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]];t=n[n.length-1];var s,a=o[t[0]],l=t[1];for(s=0;s<n.length&&(t=n[s],a=o[t[0]],l=t[1],!(n[s+1]&&e<=(a*l[l.length-1]+o[n[s+1][0]])/2));s++);return a===o.year&&e<5*a&&(l=[1,2,5]),{unitRange:a,count:e=i(e/a,l,"year"===t[0]?Math.max(r(e/a),1):1),unitName:t[0]}},e.prototype.getXDateFormat=function(e,t){var n=this.axis;return n.closestPointRange?n.chart.time.getDateFormat(n.closestPointRange,e,n.options.startOfWeek,t)||t.year:t.day},e}();e.Additions=l}(t||(t={})),t})),t(n,"Core/Axis/LogarithmicAxis.js",[n["Core/Utilities.js"]],(function(e){var t,n=e.addEvent,r=e.getMagnitude,i=e.normalizeTickInterval,o=e.pick;return function(e){function t(e){var t=this.logarithmic;"logarithmic"!==e.userOptions.type?this.logarithmic=void 0:t||(this.logarithmic=new l(this))}function s(){var e=this.logarithmic;e&&(this.lin2val=function(t){return e.lin2log(t)},this.val2lin=function(t){return e.log2lin(t)})}var a=[];e.compose=function(e){return-1===a.indexOf(e)&&(a.push(e),e.keepProps.push("logarithmic"),n(e,"init",t),n(e,"afterInit",s)),e};var l=function(){function e(e){this.axis=e}return e.prototype.getLogTickPositions=function(e,t,n,s){var a=this.axis,l=a.len,c=a.options,u=[];if(s||(this.minorAutoInterval=void 0),.5<=e)e=Math.round(e),u=a.getLinearTickPositions(e,t,n);else if(.08<=e){var d,h=Math.floor(t),p=c=void 0;for(l=.3<e?[1,2,4]:.15<e?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];h<n+1&&!p;h++){var f=l.length;for(d=0;d<f&&!p;d++){var m=this.log2lin(this.lin2log(h)*l[d]);m>t&&(!s||c<=n)&&void 0!==c&&u.push(c),c>n&&(p=!0),c=m}}}else t=this.lin2log(t),n=this.lin2log(n),e=s?a.getMinorTickInterval():c.tickInterval,e=o("auto"===e?null:e,this.minorAutoInterval,c.tickPixelInterval/(s?5:1)*(n-t)/((s?l/a.tickPositions.length:l)||1)),e=i(e,void 0,r(e)),u=a.getLinearTickPositions(e,t,n).map(this.log2lin),s||(this.minorAutoInterval=e/5);return s||(a.tickInterval=e),u},e.prototype.lin2log=function(e){return Math.pow(10,e)},e.prototype.log2lin=function(e){return Math.log(e)/Math.LN10},e}();e.Additions=l}(t||(t={})),t})),t(n,"Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js",[n["Core/Utilities.js"]],(function(e){var t,n=e.erase,r=e.extend,i=e.isNumber;return function(e){var t,o=[];e.compose=function(e,n){return t||(t=e),-1===o.indexOf(n)&&(o.push(n),r(n.prototype,s.prototype)),n};var s=function(){function e(){}return e.prototype.getPlotBandPath=function(e,t,n){void 0===n&&(n=this.options);var r=this.getPlotLinePath({value:t,force:!0,acrossPanes:n.acrossPanes}),o=[],s=this.horiz;if(t=!i(this.min)||!i(this.max)||e<this.min&&t<this.min||e>this.max&&t>this.max,e=this.getPlotLinePath({value:e,force:!0,acrossPanes:n.acrossPanes}),n=1,e&&r){if(t){var a=e.toString()===r.toString();n=0}for(t=0;t<e.length;t+=2){var l=e[t],c=e[t+1],u=r[t],d=r[t+1];"M"!==l[0]&&"L"!==l[0]||"M"!==c[0]&&"L"!==c[0]||"M"!==u[0]&&"L"!==u[0]||"M"!==d[0]&&"L"!==d[0]||(s&&u[1]===l[1]?(u[1]+=n,d[1]+=n):s||u[2]!==l[2]||(u[2]+=n,d[2]+=n),o.push(["M",l[1],l[2]],["L",c[1],c[2]],["L",d[1],d[2]],["L",u[1],u[2]],["Z"])),o.isFlat=a}}return o},e.prototype.addPlotBand=function(e){return this.addPlotBandOrLine(e,"plotBands")},e.prototype.addPlotLine=function(e){return this.addPlotBandOrLine(e,"plotLines")},e.prototype.addPlotBandOrLine=function(e,n){var r=this,i=this.userOptions,o=new t(this,e);if(this.visible&&(o=o.render()),o){if(this._addedPlotLB||(this._addedPlotLB=!0,(i.plotLines||[]).concat(i.plotBands||[]).forEach((function(e){r.addPlotBandOrLine(e)}))),n){var s=i[n]||[];s.push(e),i[n]=s}this.plotLinesAndBands.push(o)}return o},e.prototype.removePlotBandOrLine=function(e){var t=this.plotLinesAndBands,r=this.options,i=this.userOptions;if(t){for(var o=t.length;o--;)t[o].id===e&&t[o].destroy();[r.plotLines||[],i.plotLines||[],r.plotBands||[],i.plotBands||[]].forEach((function(t){for(o=t.length;o--;)(t[o]||{}).id===e&&n(t,t[o])}))}},e.prototype.removePlotBand=function(e){this.removePlotBandOrLine(e)},e.prototype.removePlotLine=function(e){this.removePlotBandOrLine(e)},e}()}(t||(t={})),t})),t(n,"Core/Axis/PlotLineOrBand/PlotLineOrBand.js",[n["Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js"],n["Core/Utilities.js"]],(function(e,t){var n=t.arrayMax,r=t.arrayMin,i=t.defined,o=t.destroyObjectProperties,s=t.erase,a=t.fireEvent,l=t.merge,c=t.objectEach,u=t.pick;return t=function(){function t(e,t){this.axis=e,t&&(this.options=t,this.id=t.id)}return t.compose=function(n){return e.compose(t,n)},t.prototype.render=function(){a(this,"render");var e=this,t=e.axis,n=t.horiz,r=t.logarithmic,o=e.options,s=o.color,d=u(o.zIndex,0),h=o.events,p={},f=t.chart.renderer,m=o.label,g=e.label,b=o.to,v=o.from,y=o.value,S=e.svgElem,_=[],x=i(v)&&i(b);_=i(y);var w=!S,k={class:"highcharts-plot-"+(x?"band ":"line ")+(o.className||"")},O=x?"bands":"lines";if(r&&(v=r.log2lin(v),b=r.log2lin(b),y=r.log2lin(y)),t.chart.styledMode||(_?(k.stroke=s||"#999999",k["stroke-width"]=u(o.width,1),o.dashStyle&&(k.dashstyle=o.dashStyle)):x&&(k.fill=s||"#e6ebf5",o.borderWidth&&(k.stroke=o.borderColor,k["stroke-width"]=o.borderWidth))),p.zIndex=d,O+="-"+d,(r=t.plotLinesAndBandsGroups[O])||(t.plotLinesAndBandsGroups[O]=r=f.g("plot-"+O).attr(p).add()),w&&(e.svgElem=S=f.path().attr(k).add(r)),_)_=t.getPlotLinePath({value:y,lineWidth:S.strokeWidth(),acrossPanes:o.acrossPanes});else{if(!x)return;_=t.getPlotBandPath(v,b,o)}return!e.eventsAdded&&h&&(c(h,(function(t,n){S.on(n,(function(t){h[n].apply(e,[t])}))})),e.eventsAdded=!0),(w||!S.d)&&_&&_.length?S.attr({d:_}):S&&(_?(S.show(!0),S.animate({d:_})):S.d&&(S.hide(),g&&(e.label=g=g.destroy()))),m&&(i(m.text)||i(m.formatter))&&_&&_.length&&0<t.width&&0<t.height&&!_.isFlat?(m=l({align:n&&x&&"center",x:n?!x&&4:10,verticalAlign:!n&&x&&"middle",y:n?x?16:10:x?6:-4,rotation:n&&!x&&90},m),this.renderLabel(m,_,x,d)):g&&g.hide(),e},t.prototype.renderLabel=function(e,t,i,o){var s=this.axis,a=s.chart.renderer,c=this.label;c||(this.label=c=a.text(this.getLabelText(e),0,0,e.useHTML).attr({align:e.textAlign||e.align,rotation:e.rotation,class:"highcharts-plot-"+(i?"band":"line")+"-label "+(e.className||""),zIndex:o}).add(),s.chart.styledMode||c.css(l({textOverflow:"ellipsis"},e.style))),o=t.xBounds||[t[0][1],t[1][1],i?t[2][1]:t[0][1]],t=t.yBounds||[t[0][2],t[1][2],i?t[2][2]:t[0][2]],i=r(o),a=r(t),c.align(e,!1,{x:i,y:a,width:n(o)-i,height:n(t)-a}),c.alignValue&&"left"!==c.alignValue||c.css({width:(90===c.rotation?s.height-(c.alignAttr.y-s.top):s.width-(c.alignAttr.x-s.left))+"px"}),c.show(!0)},t.prototype.getLabelText=function(e){return i(e.formatter)?e.formatter.call(this):e.text},t.prototype.destroy=function(){s(this.axis.plotLinesAndBands,this),delete this.axis,o(this)},t}()})),t(n,"Core/Tooltip.js",[n["Core/FormatUtilities.js"],n["Core/Globals.js"],n["Core/Renderer/RendererUtilities.js"],n["Core/Renderer/RendererRegistry.js"],n["Core/Utilities.js"]],(function(e,t,n,r,i){var o=e.format,s=t.doc,a=n.distribute,l=i.addEvent,c=i.clamp,u=i.css,d=i.defined,h=i.discardElement,p=i.extend,f=i.fireEvent,m=i.isArray,g=i.isNumber,b=i.isString,v=i.merge,y=i.pick,S=i.splat,_=i.syncTimeout;return e=function(){function e(e,t){this.allowShared=!0,this.container=void 0,this.crosshairs=[],this.distance=0,this.isHidden=!0,this.isSticky=!1,this.now={},this.options={},this.outside=!1,this.chart=e,this.init(e,t)}return e.prototype.applyFilter=function(){var e=this.chart;e.renderer.definition({tagName:"filter",attributes:{id:"drop-shadow-"+e.index,opacity:.5},children:[{tagName:"feGaussianBlur",attributes:{in:"SourceAlpha",stdDeviation:1}},{tagName:"feOffset",attributes:{dx:1,dy:1}},{tagName:"feComponentTransfer",children:[{tagName:"feFuncA",attributes:{type:"linear",slope:.3}}]},{tagName:"feMerge",children:[{tagName:"feMergeNode"},{tagName:"feMergeNode",attributes:{in:"SourceGraphic"}}]}]})},e.prototype.bodyFormatter=function(e){return e.map((function(e){var t=e.series.tooltipOptions;return(t[(e.point.formatPrefix||"point")+"Formatter"]||e.point.tooltipFormatter).call(e.point,t[(e.point.formatPrefix||"point")+"Format"]||"")}))},e.prototype.cleanSplit=function(e){this.chart.series.forEach((function(t){var n=t&&t.tt;n&&(!n.isActive||e?t.tt=n.destroy():n.isActive=!1)}))},e.prototype.defaultFormatter=function(e){var t=this.points||S(this),n=[e.tooltipFooterHeaderFormatter(t[0])];return(n=n.concat(e.bodyFormatter(t))).push(e.tooltipFooterHeaderFormatter(t[0],!0)),n},e.prototype.destroy=function(){this.label&&(this.label=this.label.destroy()),this.split&&this.tt&&(this.cleanSplit(!0),this.tt=this.tt.destroy()),this.renderer&&(this.renderer=this.renderer.destroy(),h(this.container)),i.clearTimeout(this.hideTimer),i.clearTimeout(this.tooltipTimeout)},e.prototype.getAnchor=function(e,t){var n,r,i=this.chart,o=i.pointer,s=i.inverted,a=i.plotTop,l=i.plotLeft,c=0,u=0;return e=S(e),this.followPointer&&t?(void 0===t.chartX&&(t=o.normalize(t)),o=[t.chartX-l,t.chartY-a]):e[0].tooltipPos?o=e[0].tooltipPos:(e.forEach((function(e){n=e.series.yAxis,r=e.series.xAxis,c+=e.plotX||0,u+=e.plotLow?(e.plotLow+(e.plotHigh||0))/2:e.plotY||0,r&&n&&(s?(c+=a+i.plotHeight-r.len-r.pos,u+=l+i.plotWidth-n.len-n.pos):(c+=r.pos-l,u+=n.pos-a))})),c/=e.length,u/=e.length,o=[s?i.plotWidth-u:c,s?i.plotHeight-c:u],this.shared&&1<e.length&&t&&(s?o[0]=t.chartX-l:o[1]=t.chartY-a)),o.map(Math.round)},e.prototype.getLabel=function(){var e,n=this,i=this.chart.styledMode,o=this.options,s=this.split&&this.allowShared,a="tooltip"+(d(o.className)?" "+o.className:""),c=o.style.pointerEvents||(!this.followPointer&&o.stickOnContact?"auto":"none"),h=function(){n.inContact=!0},p=function(e){var t=n.chart.hoverSeries;n.inContact=n.shouldStickOnContact()&&n.chart.pointer.inClass(e.relatedTarget,"highcharts-tooltip"),!n.inContact&&t&&t.onMouseOut&&t.onMouseOut()},f=this.chart.renderer;if(n.label){var m=!n.label.hasClass("highcharts-label");(s&&!m||!s&&m)&&n.destroy()}if(!this.label){if(this.outside){m=this.chart.options.chart.style;var g=r.getRendererType();this.container=e=t.doc.createElement("div"),e.className="highcharts-tooltip-container",u(e,{position:"absolute",top:"1px",pointerEvents:c,zIndex:Math.max(this.options.style.zIndex||0,(m&&m.zIndex||0)+3)}),l(e,"mouseenter",h),l(e,"mouseleave",p),t.doc.body.appendChild(e),this.renderer=f=new g(e,0,0,m,void 0,void 0,f.styledMode)}if(s?this.label=f.g(a):(this.label=f.label("",0,0,o.shape,void 0,void 0,o.useHTML,void 0,a).attr({padding:o.padding,r:o.borderRadius}),i||this.label.attr({fill:o.backgroundColor,"stroke-width":o.borderWidth}).css(o.style).css({pointerEvents:c}).shadow(o.shadow)),i&&o.shadow&&(this.applyFilter(),this.label.attr({filter:"url(#drop-shadow-"+this.chart.index+")"})),n.outside&&!n.split){var b=this.label,v=b.xSetter,y=b.ySetter;b.xSetter=function(t){v.call(b,n.distance),e.style.left=t+"px"},b.ySetter=function(t){y.call(b,n.distance),e.style.top=t+"px"}}this.label.on("mouseenter",h).on("mouseleave",p).attr({zIndex:8}).add()}return this.label},e.prototype.getPosition=function(e,t,n){var r,i=this.chart,o=this.distance,a={},l=i.inverted&&n.h||0,c=this.outside,u=c?s.documentElement.clientWidth-2*o:i.chartWidth,d=c?Math.max(s.body.scrollHeight,s.documentElement.scrollHeight,s.body.offsetHeight,s.documentElement.offsetHeight,s.documentElement.clientHeight):i.chartHeight,h=i.pointer.getChartPosition(),p=function(r){var s="x"===r;return[r,s?u:d,s?e:t].concat(c?[s?e*h.scaleX:t*h.scaleY,s?h.left-o+(n.plotX+i.plotLeft)*h.scaleX:h.top-o+(n.plotY+i.plotTop)*h.scaleY,0,s?u:d]:[s?e:t,s?n.plotX+i.plotLeft:n.plotY+i.plotTop,s?i.plotLeft:i.plotTop,s?i.plotLeft+i.plotWidth:i.plotTop+i.plotHeight])},f=p("y"),m=p("x");p=!!n.negative,!i.polar&&i.hoverSeries&&i.hoverSeries.yAxis&&i.hoverSeries.yAxis.reversed&&(p=!p);var g=!this.followPointer&&y(n.ttBelow,!i.inverted===p),b=function(e,t,n,r,i,s,u){var d=c?"y"===e?o*h.scaleY:o*h.scaleX:o,p=(n-r)/2,f=r<i-o,m=i+o+r<t,b=i-d-n+p;if(i=i+d-p,g&&m)a[e]=i;else if(!g&&f)a[e]=b;else if(f)a[e]=Math.min(u-r,0>b-l?b:b-l);else{if(!m)return!1;a[e]=Math.max(s,i+l+n>t?i:i+l)}},v=function(e,t,n,r,i){var s;return i<o||i>t-o?s=!1:a[e]=i<n/2?1:i>t-r/2?t-r-2:i-n/2,s},S=function(e){var t=f;f=m,m=t,r=e},_=function(){!1!==b.apply(0,f)?!1!==v.apply(0,m)||r||(S(!0),_()):r?a.x=a.y=0:(S(!0),_())};return(i.inverted||1<this.len)&&S(),_(),a},e.prototype.hide=function(e){var t=this;i.clearTimeout(this.hideTimer),e=y(e,this.options.hideDelay),this.isHidden||(this.hideTimer=_((function(){t.getLabel().fadeOut(e?void 0:e),t.isHidden=!0}),e))},e.prototype.init=function(e,t){this.chart=e,this.options=t,this.crosshairs=[],this.now={x:0,y:0},this.isHidden=!0,this.split=t.split&&!e.inverted&&!e.polar,this.shared=t.shared||this.split,this.outside=y(t.outside,!(!e.scrollablePixelsX&&!e.scrollablePixelsY))},e.prototype.shouldStickOnContact=function(){return!(this.followPointer||!this.options.stickOnContact)},e.prototype.isStickyOnContact=function(){return!(!this.shouldStickOnContact()||!this.inContact)},e.prototype.move=function(e,t,n,r){var o=this,s=o.now,a=!1!==o.options.animation&&!o.isHidden&&(1<Math.abs(e-s.x)||1<Math.abs(t-s.y)),l=o.followPointer||1<o.len;p(s,{x:a?(2*s.x+e)/3:e,y:a?(s.y+t)/2:t,anchorX:l?void 0:a?(2*s.anchorX+n)/3:n,anchorY:l?void 0:a?(s.anchorY+r)/2:r}),o.getLabel().attr(s),o.drawTracker(),a&&(i.clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout((function(){o&&o.move(e,t,n,r)}),32))},e.prototype.refresh=function(e,t){var n=this.chart,r=this.options,o=S(e),s=o[0],a=[],l=r.formatter||this.defaultFormatter,c=this.shared,u=n.styledMode,d={};if(r.enabled){i.clearTimeout(this.hideTimer),this.allowShared=!(!m(e)&&e.series&&e.series.noSharedTooltip),this.followPointer=!this.split&&s.series.tooltipOptions.followPointer;var h=(e=this.getAnchor(e,t))[0],p=e[1];if(c&&this.allowShared?(n.pointer.applyInactiveState(o),o.forEach((function(e){e.setState("hover"),a.push(e.getLabelConfig())})),(d={x:s.category,y:s.y}).points=a):d=s.getLabelConfig(),this.len=a.length,l=l.call(d,this),c=s.series,this.distance=y(c.tooltipOptions.distance,16),!1===l)this.hide();else{if(this.split&&this.allowShared)this.renderSplit(l,o);else{var g=h,b=p;if(t&&n.pointer.isDirectTouch&&(g=t.chartX-n.plotLeft,b=t.chartY-n.plotTop),!n.polar&&!1!==c.options.clip&&!o.some((function(e){return e.series.shouldShowTooltip(g,b)})))return void this.hide();t=this.getLabel(),r.style.width&&!u||t.css({width:this.chart.spacingBox.width+"px"}),t.attr({text:l&&l.join?l.join(""):l}),t.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-"+y(s.colorIndex,c.colorIndex)),u||t.attr({stroke:r.borderColor||s.color||c.color||"#666666"}),this.updatePosition({plotX:h,plotY:p,negative:s.negative,ttBelow:s.ttBelow,h:e[2]||0})}this.isHidden&&this.label&&this.label.attr({opacity:1}).show(),this.isHidden=!1}f(this,"refresh")}},e.prototype.renderSplit=function(e,t){function n(e,t,n,i,o){return void 0===o&&(o=!0),n?(t=C?0:R,e=c(e-i/2,E.left,E.right-i-(r.outside?M:0))):(t-=$,e=c(e=o?e-i-w:e+w,o?e:E.left,E.right)),{x:e,y:t}}var r=this,i=r.chart,o=r.chart,l=o.chartWidth,u=o.chartHeight,d=o.plotHeight,h=o.plotLeft,f=o.plotTop,m=o.pointer,g=o.scrollablePixelsY;g=void 0===g?0:g;var v=o.scrollablePixelsX,S=o.scrollingContainer,_=(S=void 0===S?{scrollLeft:0,scrollTop:0}:S).scrollLeft;S=S.scrollTop;var x=o.styledMode,w=r.distance,k=r.options,O=r.options.positioner,E=r.outside&&"number"!=typeof v?s.documentElement.getBoundingClientRect():{left:_,right:_+l,top:S,bottom:S+u},A=r.getLabel(),T=this.renderer||i.renderer,C=!(!i.xAxis[0]||!i.xAxis[0].opposite),M=(i=m.getChartPosition()).left;i=i.top;var $=f+S,P=0,R=d-g;b(e)&&(e=[!1,e]),e=e.slice(0,t.length+1).reduce((function(e,i,o){if(!1!==i&&""!==i){var s=(o=t[o-1]||{isHeader:!0,plotX:t[0].plotX,plotY:d,series:{}}).isHeader,a=s?r:o.series;i=i.toString();var l=a.tt,u=o.isHeader,p=o.series,m="highcharts-color-"+y(o.colorIndex,p.colorIndex,"none");if(l||(l={padding:k.padding,r:k.borderRadius},x||(l.fill=k.backgroundColor,l["stroke-width"]=k.borderWidth),l=T.label("",0,0,k[u?"headerShape":"shape"],void 0,void 0,k.useHTML).addClass((u?"highcharts-tooltip-header ":"")+"highcharts-tooltip-box "+m).attr(l).add(A)),l.isActive=!0,l.attr({text:i}),x||l.css(k.style).shadow(k.shadow).attr({stroke:k.borderColor||o.color||p.color||"#333333"}),i=(u=(a=a.tt=l).getBBox()).width+a.strokeWidth(),s&&(P=u.height,R+=P,C&&($-=P)),p=void 0===(p=o.plotX)?0:p,m=void 0===(m=o.plotY)?0:m,l=o.series,o.isHeader){p=h+p;var g=f+d/2}else{var b=l.xAxis,v=l.yAxis;p=b.pos+c(p,-w,b.len+w),l.shouldShowTooltip(0,v.pos-f+m,{ignoreX:!0})&&(g=v.pos+m)}p=c(p,E.left-w,E.right+w),"number"==typeof g?(u=u.height+1,m=O?O.call(r,i,u,o):n(p,g,s,i),e.push({align:O?0:void 0,anchorX:p,anchorY:g,boxWidth:i,point:o,rank:y(m.rank,s?1:0),size:u,target:m.y,tt:a,x:m.x})):a.isActive=!1}return e}),[]),!O&&e.some((function(e){var t=(r.outside?M:0)+e.anchorX;return t<E.left&&t+e.boxWidth<E.right||t<M-E.left+e.boxWidth&&E.right-t>t}))&&(e=e.map((function(e){var t=n(e.anchorX,e.anchorY,e.point.isHeader,e.boxWidth,!1);return p(e,{target:t.y,x:t.x})}))),r.cleanSplit(),a(e,R);var j=M,N=M;e.forEach((function(e){var t=e.x,n=e.boxWidth;(e=e.isHeader)||(r.outside&&M+t<j&&(j=M+t),!e&&r.outside&&j+n>N&&(N=M+t))})),e.forEach((function(e){var t=e.x,n=e.anchorX,i=e.pos,o=e.point.isHeader;if(i={visibility:void 0===i?"hidden":"inherit",x:t,y:i+$,anchorX:n,anchorY:e.anchorY},r.outside&&t<n){var s=M-j;0<s&&(o||(i.x=t+s,i.anchorX=n+s),o&&(i.x=(N-j)/2,i.anchorX=n+s))}e.tt.attr(i)})),e=r.container,g=r.renderer,r.outside&&e&&g&&(o=A.getBBox(),g.setSize(o.width+o.x,o.height+o.y,!1),e.style.left=j+"px",e.style.top=i+"px")},e.prototype.drawTracker=function(){if(this.followPointer||!this.options.stickOnContact)this.tracker&&this.tracker.destroy();else{var e=this.chart,t=this.label,n=this.shared?e.hoverPoints:e.hoverPoint;if(t&&n){var r={x:0,y:0,width:0,height:0};n=this.getAnchor(n);var i=t.getBBox();n[0]+=e.plotLeft-t.translateX,n[1]+=e.plotTop-t.translateY,r.x=Math.min(0,n[0]),r.y=Math.min(0,n[1]),r.width=0>n[0]?Math.max(Math.abs(n[0]),i.width-n[0]):Math.max(Math.abs(n[0]),i.width),r.height=0>n[1]?Math.max(Math.abs(n[1]),i.height-Math.abs(n[1])):Math.max(Math.abs(n[1]),i.height),this.tracker?this.tracker.attr(r):(this.tracker=t.renderer.rect(r).addClass("highcharts-tracker").add(t),e.styledMode||this.tracker.attr({fill:"rgba(0,0,0,0)"}))}}},e.prototype.styledModeFormat=function(e){return e.replace('style="font-size: 10px"','class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g,'class="highcharts-color-{$1.colorIndex}"')},e.prototype.tooltipFooterHeaderFormatter=function(e,t){var n=e.series,r=n.tooltipOptions,i=n.xAxis,s=i&&i.dateTime;i={isFooter:t,labelConfig:e};var a=r.xDateFormat,l=r[t?"footerFormat":"headerFormat"];return f(this,"headerFormatter",i,(function(t){s&&!a&&g(e.key)&&(a=s.getXDateFormat(e.key,r.dateTimeLabelFormats)),s&&a&&(e.point&&e.point.tooltipDateKeys||["key"]).forEach((function(e){l=l.replace("{point."+e+"}","{point."+e+":"+a+"}")})),n.chart.styledMode&&(l=this.styledModeFormat(l)),t.text=o(l,{point:e,series:n},this.chart)})),i.text},e.prototype.update=function(e){this.destroy(),v(!0,this.chart.options.tooltip.userOptions,e),this.init(this.chart,v(!0,this.options,e))},e.prototype.updatePosition=function(e){var t=this.chart,n=this.options,r=t.pointer,i=this.getLabel();r=r.getChartPosition();var o=(n.positioner||this.getPosition).call(this,i.width,i.height,e),s=e.plotX+t.plotLeft;e=e.plotY+t.plotTop,this.outside&&(n=n.borderWidth+2*this.distance,this.renderer.setSize(i.width+n,i.height+n,!1),1===r.scaleX&&1===r.scaleY||(u(this.container,{transform:"scale("+r.scaleX+", "+r.scaleY+")"}),s*=r.scaleX,e*=r.scaleY),s+=r.left-o.x,e+=r.top-o.y),this.move(Math.round(o.x),Math.round(o.y||0),s,e)},e}()})),t(n,"Core/Series/Point.js",[n["Core/Renderer/HTML/AST.js"],n["Core/Animation/AnimationUtilities.js"],n["Core/DefaultOptions.js"],n["Core/FormatUtilities.js"],n["Core/Utilities.js"]],(function(e,t,n,r,i){var o=t.animObject,s=n.defaultOptions,a=r.format,l=i.addEvent,c=i.defined,u=i.erase,d=i.extend,h=i.fireEvent,p=i.getNestedProperty,f=i.isArray,m=i.isFunction,g=i.isNumber,b=i.isObject,v=i.merge,y=i.objectEach,S=i.pick,_=i.syncTimeout,x=i.removeEvent,w=i.uniqueKey;return t=function(){function t(){this.colorIndex=this.category=void 0,this.formatPrefix="point",this.id=void 0,this.isNull=!1,this.percentage=this.options=this.name=void 0,this.selected=!1,this.total=this.series=void 0,this.visible=!0,this.x=void 0}return t.prototype.animateBeforeDestroy=function(){var e=this,t={x:e.startXPos,opacity:0},n=e.getGraphicalProps();n.singular.forEach((function(n){e[n]=e[n].animate("dataLabel"===n?{x:e[n].startXPos,y:e[n].startYPos,opacity:0}:t)})),n.plural.forEach((function(t){e[t].forEach((function(t){t.element&&t.animate(d({x:e.startXPos},t.startYPos?{x:t.startXPos,y:t.startYPos}:{}))}))}))},t.prototype.applyOptions=function(e,n){var r=this.series,i=r.options.pointValKey||r.pointValKey;return e=t.prototype.optionsToObject.call(this,e),d(this,e),this.options=this.options?d(this.options,e):e,e.group&&delete this.group,e.dataLabels&&delete this.dataLabels,i&&(this.y=t.prototype.getNestedProperty.call(this,i)),this.formatPrefix=(this.isNull=S(this.isValid&&!this.isValid(),null===this.x||!g(this.y)))?"null":"point",this.selected&&(this.state="select"),"name"in this&&void 0===n&&r.xAxis&&r.xAxis.hasNames&&(this.x=r.xAxis.nameToX(this)),void 0===this.x&&r?this.x=void 0===n?r.autoIncrement():n:g(e.x)&&r.options.relativeXValue&&(this.x=r.autoIncrement(e.x)),this},t.prototype.destroy=function(){function e(){for(i in(t.graphic||t.dataLabel||t.dataLabels)&&(x(t),t.destroyElements()),t)t[i]=null}var t=this,n=t.series,r=n.chart;n=n.options.dataSorting;var i,s=r.hoverPoints,a=o(t.series.chart.renderer.globalAnimation);t.legendItem&&r.legend.destroyItem(t),s&&(t.setState(),u(s,t),s.length||(r.hoverPoints=null)),t===r.hoverPoint&&t.onMouseOut(),n&&n.enabled?(this.animateBeforeDestroy(),_(e,a.duration)):e(),r.pointCount--},t.prototype.destroyElements=function(e){var t=this;(e=t.getGraphicalProps(e)).singular.forEach((function(e){t[e]=t[e].destroy()})),e.plural.forEach((function(e){t[e].forEach((function(e){e.element&&e.destroy()})),delete t[e]}))},t.prototype.firePointEvent=function(e,t,n){var r=this,i=this.series.options;(i.point.events[e]||r.options&&r.options.events&&r.options.events[e])&&r.importEvents(),"click"===e&&i.allowPointSelect&&(n=function(e){r.select&&r.select(null,e.ctrlKey||e.metaKey||e.shiftKey)}),h(r,e,t,n)},t.prototype.getClassName=function(){return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+(void 0!==this.colorIndex?" highcharts-color-"+this.colorIndex:"")+(this.options.className?" "+this.options.className:"")+(this.zone&&this.zone.className?" "+this.zone.className.replace("highcharts-negative",""):"")},t.prototype.getGraphicalProps=function(e){var t,n=this,r=[],i={singular:[],plural:[]};for((e=e||{graphic:1,dataLabel:1}).graphic&&r.push("graphic","upperGraphic","shadowGroup"),e.dataLabel&&r.push("dataLabel","dataLabelUpper","connector"),t=r.length;t--;){var o=r[t];n[o]&&i.singular.push(o)}return["dataLabel","connector"].forEach((function(t){var r=t+"s";e[t]&&n[r]&&i.plural.push(r)})),i},t.prototype.getLabelConfig=function(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},t.prototype.getNestedProperty=function(e){if(e)return 0===e.indexOf("custom.")?p(e,this.options):this[e]},t.prototype.getZone=function(){var e=this.series,t=e.zones;e=e.zoneAxis||"y";var n,r=0;for(n=t[r];this[e]>=n.value;)n=t[++r];return this.nonZonedColor||(this.nonZonedColor=this.color),this.color=n&&n.color&&!this.options.color?n.color:this.nonZonedColor,n},t.prototype.hasNewShapeType=function(){return(this.graphic&&(this.graphic.symbolName||this.graphic.element.nodeName))!==this.shapeType},t.prototype.init=function(e,t,n){return this.series=e,this.applyOptions(t,n),this.id=c(this.id)?this.id:w(),this.resolveColor(),e.chart.pointCount++,h(this,"afterInit"),this},t.prototype.optionsToObject=function(e){var n=this.series,r=n.options.keys,i=r||n.pointArrayMap||["y"],o=i.length,s={},a=0,l=0;if(g(e)||null===e)s[i[0]]=e;else if(f(e))for(!r&&e.length>o&&("string"===(n=typeof e[0])?s.name=e[0]:"number"===n&&(s.x=e[0]),a++);l<o;)r&&void 0===e[a]||(0<i[l].indexOf(".")?t.prototype.setNestedProperty(s,e[a],i[l]):s[i[l]]=e[a]),a++,l++;else"object"==typeof e&&(s=e,e.dataLabels&&(n._hasPointLabels=!0),e.marker&&(n._hasPointMarkers=!0));return s},t.prototype.resolveColor=function(){var e=this.series,t=e.chart.styledMode,n=e.chart.options.chart.colorCount;if(delete this.nonZonedColor,e.options.colorByPoint){if(!t){var r=(n=e.options.colors||e.chart.options.colors)[e.colorCounter];n=n.length}t=e.colorCounter,e.colorCounter++,e.colorCounter===n&&(e.colorCounter=0)}else t||(r=e.color),t=e.colorIndex;this.colorIndex=S(this.options.colorIndex,t),this.color=S(this.options.color,r)},t.prototype.setNestedProperty=function(e,t,n){return n.split(".").reduce((function(e,n,r,i){return e[n]=i.length-1===r?t:b(e[n],!0)?e[n]:{},e[n]}),e),e},t.prototype.tooltipFormatter=function(e){var t=this.series,n=t.tooltipOptions,r=S(n.valueDecimals,""),i=n.valuePrefix||"",o=n.valueSuffix||"";return t.chart.styledMode&&(e=t.chart.tooltip.styledModeFormat(e)),(t.pointArrayMap||["y"]).forEach((function(t){t="{point."+t,(i||o)&&(e=e.replace(RegExp(t+"}","g"),i+t+"}"+o)),e=e.replace(RegExp(t+"}","g"),t+":,."+r+"f}")})),a(e,{point:this,series:this.series},t.chart)},t.prototype.update=function(e,t,n,r){function i(){s.applyOptions(e);var r=l&&s.hasDummyGraphic;r=null===s.y?!r:r,l&&r&&(s.graphic=l.destroy(),delete s.hasDummyGraphic),b(e,!0)&&(l&&l.element&&e&&e.marker&&void 0!==e.marker.symbol&&(s.graphic=l.destroy()),e&&e.dataLabels&&s.dataLabel&&(s.dataLabel=s.dataLabel.destroy()),s.connector&&(s.connector=s.connector.destroy())),o=s.index,a.updateParallelArrays(s,o),u.data[o]=b(u.data[o],!0)||b(e,!0)?s.options:S(e,u.data[o]),a.isDirty=a.isDirtyData=!0,!a.fixedBox&&a.hasCartesianSeries&&(c.isDirtyBox=!0),"point"===u.legendType&&(c.isDirtyLegend=!0),t&&c.redraw(n)}var o,s=this,a=s.series,l=s.graphic,c=a.chart,u=a.options;t=S(t,!0),!1===r?i():s.firePointEvent("update",{options:e},i)},t.prototype.remove=function(e,t){this.series.removePoint(this.series.data.indexOf(this),e,t)},t.prototype.select=function(e,t){var n=this,r=n.series,i=r.chart;this.selectedStaging=e=S(e,!n.selected),n.firePointEvent(e?"select":"unselect",{accumulate:t},(function(){n.selected=n.options.selected=e,r.options.data[r.data.indexOf(n)]=n.options,n.setState(e&&"select"),t||i.getSelectedPoints().forEach((function(e){var t=e.series;e.selected&&e!==n&&(e.selected=e.options.selected=!1,t.options.data[t.data.indexOf(e)]=e.options,e.setState(i.hoverPoints&&t.options.inactiveOtherPoints?"inactive":""),e.firePointEvent("unselect"))}))})),delete this.selectedStaging},t.prototype.onMouseOver=function(e){var t=this.series.chart,n=t.pointer;e=e?n.normalize(e):n.getChartCoordinatesFromPoint(this,t.inverted),n.runPointActions(e,this)},t.prototype.onMouseOut=function(){var e=this.series.chart;this.firePointEvent("mouseOut"),this.series.options.inactiveOtherPoints||(e.hoverPoints||[]).forEach((function(e){e.setState()})),e.hoverPoints=e.hoverPoint=null},t.prototype.importEvents=function(){if(!this.hasImportedEvents){var e=this,t=v(e.series.options.point,e.options).events;e.events=t,y(t,(function(t,n){m(t)&&l(e,n,t)})),this.hasImportedEvents=!0}},t.prototype.setState=function(t,n){var r,i=this.series,o=this.state,a=i.options.states[t||"normal"]||{},l=s.plotOptions[i.type].marker&&i.options.marker,c=l&&!1===l.enabled,u=l&&l.states&&l.states[t||"normal"]||{},p=!1===u.enabled,f=this.marker||{},m=i.chart,b=l&&i.markerAttribs,v=i.halo,y=i.stateMarkerGraphic;if(!((t=t||"")===this.state&&!n||this.selected&&"select"!==t||!1===a.enabled||t&&(p||c&&!1===u.enabled)||t&&f.states&&f.states[t]&&!1===f.states[t].enabled)){if(this.state=t,b&&(r=i.markerAttribs(this,t)),this.graphic&&!this.hasDummyGraphic){if(o&&this.graphic.removeClass("highcharts-point-"+o),t&&this.graphic.addClass("highcharts-point-"+t),!m.styledMode){var _=i.pointAttribs(this,t),x=S(m.options.chart.animation,a.animation);i.options.inactiveOtherPoints&&g(_.opacity)&&((this.dataLabels||[]).forEach((function(e){e&&e.animate({opacity:_.opacity},x)})),this.connector&&this.connector.animate({opacity:_.opacity},x)),this.graphic.animate(_,x)}r&&this.graphic.animate(r,S(m.options.chart.animation,u.animation,l.animation)),y&&y.hide()}else t&&u&&(o=f.symbol||i.symbol,y&&y.currentSymbol!==o&&(y=y.destroy()),r&&(y?y[n?"animate":"attr"]({x:r.x,y:r.y}):o&&(i.stateMarkerGraphic=y=m.renderer.symbol(o,r.x,r.y,r.width,r.height).add(i.markerGroup),y.currentSymbol=o)),!m.styledMode&&y&&"inactive"!==this.state&&y.attr(i.pointAttribs(this,t))),y&&(y[t&&this.isInside?"show":"hide"](),y.element.point=this,y.addClass(this.getClassName(),!0));a=a.halo,r=(y=this.graphic||y)&&y.visibility||"inherit",a&&a.size&&y&&"hidden"!==r&&!this.isCluster?(v||(i.halo=v=m.renderer.path().add(y.parentGroup)),v.show()[n?"animate":"attr"]({d:this.haloPath(a.size)}),v.attr({class:"highcharts-halo highcharts-color-"+S(this.colorIndex,i.colorIndex)+(this.className?" "+this.className:""),visibility:r,zIndex:-1}),v.point=this,m.styledMode||v.attr(d({fill:this.color||i.color,"fill-opacity":a.opacity},e.filterUserAttributes(a.attributes||{})))):v&&v.point&&v.point.haloPath&&v.animate({d:v.point.haloPath(0)},null,v.hide),h(this,"afterSetState",{state:t})}},t.prototype.haloPath=function(e){return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX)-e,this.plotY-e,2*e,2*e)},t}()})),t(n,"Core/Pointer.js",[n["Core/Color/Color.js"],n["Core/Globals.js"],n["Core/Tooltip.js"],n["Core/Utilities.js"]],(function(e,t,n,r){var i=e.parse,o=t.charts,s=t.noop,a=r.addEvent,l=r.attr,c=r.css,u=r.defined,d=r.extend,h=r.find,p=r.fireEvent,f=r.isNumber,m=r.isObject,g=r.objectEach,b=r.offset,v=r.pick,y=r.splat;return e=function(){function e(e,t){this.lastValidTouch={},this.pinchDown=[],this.runChartClick=!1,this.eventsToUnbind=[],this.chart=e,this.hasDragged=!1,this.options=t,this.init(e,t)}return e.prototype.applyInactiveState=function(e){var t,n=[];(e||[]).forEach((function(e){t=e.series,n.push(t),t.linkedParent&&n.push(t.linkedParent),t.linkedSeries&&(n=n.concat(t.linkedSeries)),t.navigatorSeries&&n.push(t.navigatorSeries)})),this.chart.series.forEach((function(e){-1===n.indexOf(e)?e.setState("inactive",!0):e.options.inactiveOtherPoints&&e.setAllPointsToState("inactive")}))},e.prototype.destroy=function(){var n=this;this.eventsToUnbind.forEach((function(e){return e()})),this.eventsToUnbind=[],t.chartCount||(e.unbindDocumentMouseUp&&(e.unbindDocumentMouseUp=e.unbindDocumentMouseUp()),e.unbindDocumentTouchEnd&&(e.unbindDocumentTouchEnd=e.unbindDocumentTouchEnd())),clearInterval(n.tooltipTimeout),g(n,(function(e,t){n[t]=void 0}))},e.prototype.drag=function(e){var t=this.chart,n=t.options.chart,r=this.zoomHor,o=this.zoomVert,s=t.plotLeft,a=t.plotTop,l=t.plotWidth,c=t.plotHeight,u=this.mouseDownX||0,d=this.mouseDownY||0,h=m(n.panning)?n.panning&&n.panning.enabled:n.panning,p=n.panKey&&e[n.panKey+"Key"],f=e.chartX,g=e.chartY,b=this.selectionMarker;if((!b||!b.touch)&&(f<s?f=s:f>s+l&&(f=s+l),g<a?g=a:g>a+c&&(g=a+c),this.hasDragged=Math.sqrt(Math.pow(u-f,2)+Math.pow(d-g,2)),10<this.hasDragged)){var v=t.isInsidePlot(u-s,d-a,{visiblePlotOnly:!0});!t.hasCartesianSeries&&!t.mapView||!this.zoomX&&!this.zoomY||!v||p||b||(this.selectionMarker=b=t.renderer.rect(s,a,r?1:l,o?1:c,0).attr({class:"highcharts-selection-marker",zIndex:7}).add(),t.styledMode||b.attr({fill:n.selectionMarkerFill||i("#335cad").setOpacity(.25).get()})),b&&r&&(r=f-u,b.attr({width:Math.abs(r),x:(0<r?0:r)+u})),b&&o&&(r=g-d,b.attr({height:Math.abs(r),y:(0<r?0:r)+d})),v&&!b&&h&&t.pan(e,n.panning)}},e.prototype.dragStart=function(e){var t=this.chart;t.mouseIsDown=e.type,t.cancelClick=!1,t.mouseDownX=this.mouseDownX=e.chartX,t.mouseDownY=this.mouseDownY=e.chartY},e.prototype.drop=function(e){var t=this,n=this.chart,r=this.hasPinched;if(this.selectionMarker){var i=this.selectionMarker,o=i.attr?i.attr("x"):i.x,s=i.attr?i.attr("y"):i.y,a=i.attr?i.attr("width"):i.width,l=i.attr?i.attr("height"):i.height,h={originalEvent:e,xAxis:[],yAxis:[],x:o,y:s,width:a,height:l},m=!!n.mapView;(this.hasDragged||r)&&(n.axes.forEach((function(n){if(n.zoomEnabled&&u(n.min)&&(r||t[{xAxis:"zoomX",yAxis:"zoomY"}[n.coll]])&&f(o)&&f(s)){var i=n.horiz,c="touchend"===e.type?n.minPixelPadding:0,d=n.toValue((i?o:s)+c);i=n.toValue((i?o+a:s+l)-c),h[n.coll].push({axis:n,min:Math.min(d,i),max:Math.max(d,i)}),m=!0}})),m&&p(n,"selection",h,(function(e){n.zoom(d(e,r?{animation:!1}:null))}))),f(n.index)&&(this.selectionMarker=this.selectionMarker.destroy()),r&&this.scaleGroups()}n&&f(n.index)&&(c(n.container,{cursor:n._cursor}),n.cancelClick=10<this.hasDragged,n.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},e.prototype.findNearestKDPoint=function(e,t,n){var r,i=this.chart,o=i.hoverPoint;return i=i.tooltip,o&&i&&i.isStickyOnContact()?o:(e.forEach((function(e){var i=!(e.noSharedTooltip&&t)&&0>e.options.findNearestPointBy.indexOf("y");if(e=e.searchPoint(n,i),(i=m(e,!0)&&e.series)&&!(i=!m(r,!0))){i=r.distX-e.distX;var o=r.dist-e.dist,s=(e.series.group&&e.series.group.zIndex)-(r.series.group&&r.series.group.zIndex);i=0<(0!==i&&t?i:0!==o?o:0!==s?s:r.series.index>e.series.index?-1:1)}i&&(r=e)})),r)},e.prototype.getChartCoordinatesFromPoint=function(e,t){var n=e.series,r=n.xAxis;n=n.yAxis;var i=e.shapeArgs;if(r&&n){var o=v(e.clientX,e.plotX),s=e.plotY||0;return e.isNode&&i&&f(i.x)&&f(i.y)&&(o=i.x,s=i.y),t?{chartX:n.len+n.pos-s,chartY:r.len+r.pos-o}:{chartX:o+r.pos,chartY:s+n.pos}}if(i&&i.x&&i.y)return{chartX:i.x,chartY:i.y}},e.prototype.getChartPosition=function(){if(this.chartPosition)return this.chartPosition;var e=this.chart.container,t=b(e);this.chartPosition={left:t.left,top:t.top,scaleX:1,scaleY:1};var n=e.offsetWidth;return e=e.offsetHeight,2<n&&2<e&&(this.chartPosition.scaleX=t.width/n,this.chartPosition.scaleY=t.height/e),this.chartPosition},e.prototype.getCoordinates=function(e){var t={xAxis:[],yAxis:[]};return this.chart.axes.forEach((function(n){t[n.isXAxis?"xAxis":"yAxis"].push({axis:n,value:n.toValue(e[n.horiz?"chartX":"chartY"])})})),t},e.prototype.getHoverData=function(e,t,n,r,i,o){var s=[];r=!(!r||!e);var a={chartX:o?o.chartX:void 0,chartY:o?o.chartY:void 0,shared:i};p(this,"beforeGetHoverData",a);var l=t&&!t.stickyTracking?[t]:n.filter((function(e){return a.filter?a.filter(e):e.visible&&!(!i&&e.directTouch)&&v(e.options.enableMouseTracking,!0)&&e.stickyTracking})),c=r||!o?e:this.findNearestKDPoint(l,i,o);return t=c&&c.series,c&&(i&&!t.noSharedTooltip?(l=n.filter((function(e){return a.filter?a.filter(e):e.visible&&!(!i&&e.directTouch)&&v(e.options.enableMouseTracking,!0)&&!e.noSharedTooltip}))).forEach((function(e){var t=h(e.points,(function(e){return e.x===c.x&&!e.isNull}));m(t)&&(e.chart.isBoosting&&(t=e.getPoint(t)),s.push(t))})):s.push(c)),p(this,"afterGetHoverData",a={hoverPoint:c}),{hoverPoint:a.hoverPoint,hoverSeries:t,hoverPoints:s}},e.prototype.getPointFromEvent=function(e){e=e.target;for(var t;e&&!t;)t=e.point,e=e.parentNode;return t},e.prototype.onTrackerMouseOut=function(e){e=e.relatedTarget||e.toElement;var t=this.chart.hoverSeries;this.isDirectTouch=!1,!t||!e||t.stickyTracking||this.inClass(e,"highcharts-tooltip")||this.inClass(e,"highcharts-series-"+t.index)&&this.inClass(e,"highcharts-tracker")||t.onMouseOut()},e.prototype.inClass=function(e,t){for(var n;e;){if(n=l(e,"class")){if(-1!==n.indexOf(t))return!0;if(-1!==n.indexOf("highcharts-container"))return!1}e=e.parentNode}},e.prototype.init=function(e,t){this.options=t,this.chart=e,this.runChartClick=!(!t.chart.events||!t.chart.events.click),this.pinchDown=[],this.lastValidTouch={},n&&(e.tooltip=new n(e,t.tooltip),this.followTouchMove=v(t.tooltip.followTouchMove,!0)),this.setDOMEvents()},e.prototype.normalize=function(e,t){var n=e.touches,r=n?n.length?n.item(0):v(n.changedTouches,e.changedTouches)[0]:e;return t||(t=this.getChartPosition()),n=r.pageX-t.left,r=r.pageY-t.top,n/=t.scaleX,r/=t.scaleY,d(e,{chartX:Math.round(n),chartY:Math.round(r)})},e.prototype.onContainerClick=function(e){var t=this.chart,n=t.hoverPoint;e=this.normalize(e);var r=t.plotLeft,i=t.plotTop;t.cancelClick||(n&&this.inClass(e.target,"highcharts-tracker")?(p(n.series,"click",d(e,{point:n})),t.hoverPoint&&n.firePointEvent("click",e)):(d(e,this.getCoordinates(e)),t.isInsidePlot(e.chartX-r,e.chartY-i,{visiblePlotOnly:!0})&&p(t,"click",e)))},e.prototype.onContainerMouseDown=function(e){var n=1==(1&(e.buttons||e.button));e=this.normalize(e),t.isFirefox&&0!==e.button&&this.onContainerMouseMove(e),(void 0===e.button||n)&&(this.zoomOption(e),n&&e.preventDefault&&e.preventDefault(),this.dragStart(e))},e.prototype.onContainerMouseLeave=function(t){var n=o[v(e.hoverChartIndex,-1)],r=this.chart.tooltip;r&&r.shouldStickOnContact()&&this.inClass(t.relatedTarget,"highcharts-tooltip-container")||(t=this.normalize(t),n&&(t.relatedTarget||t.toElement)&&(n.pointer.reset(),n.pointer.chartPosition=void 0),r&&!r.isHidden&&this.reset())},e.prototype.onContainerMouseEnter=function(e){delete this.chartPosition},e.prototype.onContainerMouseMove=function(e){var t=this.chart;e=this.normalize(e),this.setHoverChartIndex(),e.preventDefault||(e.returnValue=!1),("mousedown"===t.mouseIsDown||this.touchSelect(e))&&this.drag(e),t.openMenu||!this.inClass(e.target,"highcharts-tracker")&&!t.isInsidePlot(e.chartX-t.plotLeft,e.chartY-t.plotTop,{visiblePlotOnly:!0})||(this.inClass(e.target,"highcharts-no-tooltip")?this.reset(!1,0):this.runPointActions(e))},e.prototype.onDocumentTouchEnd=function(t){var n=o[v(e.hoverChartIndex,-1)];n&&n.pointer.drop(t)},e.prototype.onContainerTouchMove=function(e){this.touchSelect(e)?this.onContainerMouseMove(e):this.touch(e)},e.prototype.onContainerTouchStart=function(e){this.touchSelect(e)?this.onContainerMouseDown(e):(this.zoomOption(e),this.touch(e,!0))},e.prototype.onDocumentMouseMove=function(e){var t=this.chart,n=this.chartPosition;e=this.normalize(e,n);var r=t.tooltip;!n||r&&r.isStickyOnContact()||t.isInsidePlot(e.chartX-t.plotLeft,e.chartY-t.plotTop,{visiblePlotOnly:!0})||this.inClass(e.target,"highcharts-tracker")||this.reset()},e.prototype.onDocumentMouseUp=function(t){var n=o[v(e.hoverChartIndex,-1)];n&&n.pointer.drop(t)},e.prototype.pinch=function(e){var t=this,n=t.chart,r=t.pinchDown,i=e.touches||[],o=i.length,a=t.lastValidTouch,l=t.hasZoom,c={},u=1===o&&(t.inClass(e.target,"highcharts-tracker")&&n.runTrackerClick||t.runChartClick),h={},f=t.selectionMarker;1<o?t.initiated=!0:1===o&&this.followTouchMove&&(t.initiated=!1),l&&t.initiated&&!u&&!1!==e.cancelable&&e.preventDefault(),[].map.call(i,(function(e){return t.normalize(e)})),"touchstart"===e.type?([].forEach.call(i,(function(e,t){r[t]={chartX:e.chartX,chartY:e.chartY}})),a.x=[r[0].chartX,r[1]&&r[1].chartX],a.y=[r[0].chartY,r[1]&&r[1].chartY],n.axes.forEach((function(e){if(e.zoomEnabled){var t=n.bounds[e.horiz?"h":"v"],r=e.minPixelPadding,i=e.toPixels(Math.min(v(e.options.min,e.dataMin),e.dataMin)),o=e.toPixels(Math.max(v(e.options.max,e.dataMax),e.dataMax)),s=Math.max(i,o);t.min=Math.min(e.pos,Math.min(i,o)-r),t.max=Math.max(e.pos+e.len,s+r)}})),t.res=!0):t.followTouchMove&&1===o?this.runPointActions(t.normalize(e)):r.length&&(p(n,"touchpan",{originalEvent:e},(function(){f||(t.selectionMarker=f=d({destroy:s,touch:!0},n.plotBox)),t.pinchTranslate(r,i,c,f,h,a),t.hasPinched=l,t.scaleGroups(c,h)})),t.res&&(t.res=!1,this.reset(!1,0)))},e.prototype.pinchTranslate=function(e,t,n,r,i,o){this.zoomHor&&this.pinchTranslateDirection(!0,e,t,n,r,i,o),this.zoomVert&&this.pinchTranslateDirection(!1,e,t,n,r,i,o)},e.prototype.pinchTranslateDirection=function(e,t,n,r,i,o,s,a){var l=this.chart,c=e?"x":"y",u=e?"X":"Y",d="chart"+u,h=e?"width":"height",p=l["plot"+(e?"Left":"Top")],f=l.inverted,m=l.bounds[e?"h":"v"],g=1===t.length,b=t[0][d],v=!g&&t[1][d];t=function(){"number"==typeof w&&20<Math.abs(b-v)&&(_=a||Math.abs(x-w)/Math.abs(b-v)),S=(p-x)/_+b,y=l["plot"+(e?"Width":"Height")]/_};var y,S,_=a||1,x=n[0][d],w=!g&&n[1][d];if(t(),(n=S)<m.min){n=m.min;var k=!0}else n+y>m.max&&(n=m.max-y,k=!0);k?(x-=.8*(x-s[c][0]),"number"==typeof w&&(w-=.8*(w-s[c][1])),t()):s[c]=[x,w],f||(o[c]=S-p,o[h]=y),o=f?1/_:_,i[h]=y,i[c]=n,r[f?e?"scaleY":"scaleX":"scale"+u]=_,r["translate"+u]=o*p+(x-o*b)},e.prototype.reset=function(e,t){var n=this.chart,r=n.hoverSeries,i=n.hoverPoint,o=n.hoverPoints,s=n.tooltip,a=s&&s.shared?o:i;e&&a&&y(a).forEach((function(t){t.series.isCartesian&&void 0===t.plotX&&(e=!1)})),e?s&&a&&y(a).length&&(s.refresh(a),s.shared&&o?o.forEach((function(e){e.setState(e.state,!0),e.series.isCartesian&&(e.series.xAxis.crosshair&&e.series.xAxis.drawCrosshair(null,e),e.series.yAxis.crosshair&&e.series.yAxis.drawCrosshair(null,e))})):i&&(i.setState(i.state,!0),n.axes.forEach((function(e){e.crosshair&&i.series[e.coll]===e&&e.drawCrosshair(null,i)})))):(i&&i.onMouseOut(),o&&o.forEach((function(e){e.setState()})),r&&r.onMouseOut(),s&&s.hide(t),this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove()),n.axes.forEach((function(e){e.hideCrosshair()})),this.hoverX=n.hoverPoints=n.hoverPoint=null)},e.prototype.runPointActions=function(t,n){var r=this.chart,i=r.tooltip&&r.tooltip.options.enabled?r.tooltip:void 0,s=!!i&&i.shared,l=n||r.hoverPoint,c=l&&l.series||r.hoverSeries;l=(n=this.getHoverData(l,c,r.series,(!t||"touchmove"!==t.type)&&(!!n||c&&c.directTouch&&this.isDirectTouch),s,t)).hoverPoint,c=n.hoverSeries;var u=n.hoverPoints;if(n=c&&c.tooltipOptions.followPointer&&!c.tooltipOptions.split,s=s&&c&&!c.noSharedTooltip,l&&(l!==r.hoverPoint||i&&i.isHidden)){if((r.hoverPoints||[]).forEach((function(e){-1===u.indexOf(e)&&e.setState()})),r.hoverSeries!==c&&c.onMouseOver(),this.applyInactiveState(u),(u||[]).forEach((function(e){e.setState("hover")})),r.hoverPoint&&r.hoverPoint.firePointEvent("mouseOut"),!l.series)return;r.hoverPoints=u,r.hoverPoint=l,l.firePointEvent("mouseOver"),i&&i.refresh(s?u:l,t)}else n&&i&&!i.isHidden&&(l=i.getAnchor([{}],t),r.isInsidePlot(l[0],l[1],{visiblePlotOnly:!0})&&i.updatePosition({plotX:l[0],plotY:l[1]}));this.unDocMouseMove||(this.unDocMouseMove=a(r.container.ownerDocument,"mousemove",(function(t){var n=o[e.hoverChartIndex];n&&n.pointer.onDocumentMouseMove(t)})),this.eventsToUnbind.push(this.unDocMouseMove)),r.axes.forEach((function(e){var n,i=v((e.crosshair||{}).snap,!0);i&&((n=r.hoverPoint)&&n.series[e.coll]===e||(n=h(u,(function(t){return t.series[e.coll]===e})))),n||!i?e.drawCrosshair(t,n):e.hideCrosshair()}))},e.prototype.scaleGroups=function(e,t){var n=this.chart;n.series.forEach((function(r){var i=e||r.getPlotBox();r.group&&(r.xAxis&&r.xAxis.zoomEnabled||n.mapView)&&(r.group.attr(i),r.markerGroup&&(r.markerGroup.attr(i),r.markerGroup.clip(t?n.clipRect:null)),r.dataLabelsGroup&&r.dataLabelsGroup.attr(i))})),n.clipRect.attr(t||n.clipBox)},e.prototype.setDOMEvents=function(){var n=this,r=this.chart.container,i=r.ownerDocument;r.onmousedown=this.onContainerMouseDown.bind(this),r.onmousemove=this.onContainerMouseMove.bind(this),r.onclick=this.onContainerClick.bind(this),this.eventsToUnbind.push(a(r,"mouseenter",this.onContainerMouseEnter.bind(this))),this.eventsToUnbind.push(a(r,"mouseleave",this.onContainerMouseLeave.bind(this))),e.unbindDocumentMouseUp||(e.unbindDocumentMouseUp=a(i,"mouseup",this.onDocumentMouseUp.bind(this)));for(var o=this.chart.renderTo.parentElement;o&&"BODY"!==o.tagName;)this.eventsToUnbind.push(a(o,"scroll",(function(){delete n.chartPosition}))),o=o.parentElement;t.hasTouch&&(this.eventsToUnbind.push(a(r,"touchstart",this.onContainerTouchStart.bind(this),{passive:!1})),this.eventsToUnbind.push(a(r,"touchmove",this.onContainerTouchMove.bind(this),{passive:!1})),e.unbindDocumentTouchEnd||(e.unbindDocumentTouchEnd=a(i,"touchend",this.onDocumentTouchEnd.bind(this),{passive:!1})))},e.prototype.setHoverChartIndex=function(){var n=this.chart,r=t.charts[v(e.hoverChartIndex,-1)];r&&r!==n&&r.pointer.onContainerMouseLeave({relatedTarget:!0}),r&&r.mouseIsDown||(e.hoverChartIndex=n.index)},e.prototype.touch=function(e,t){var n=this.chart;if(this.setHoverChartIndex(),1===e.touches.length)if(e=this.normalize(e),n.isInsidePlot(e.chartX-n.plotLeft,e.chartY-n.plotTop,{visiblePlotOnly:!0})&&!n.openMenu){if(t&&this.runPointActions(e),"touchmove"===e.type)var r=!!(t=this.pinchDown)[0]&&4<=Math.sqrt(Math.pow(t[0].chartX-e.chartX,2)+Math.pow(t[0].chartY-e.chartY,2));v(r,!0)&&this.pinch(e)}else t&&this.reset();else 2===e.touches.length&&this.pinch(e)},e.prototype.touchSelect=function(e){return!(!this.chart.options.chart.zoomBySingleTouch||!e.touches||1!==e.touches.length)},e.prototype.zoomOption=function(e){var t=this.chart,n=t.options.chart;t=t.inverted;var r=n.zoomType||"";/touch/.test(e.type)&&(r=v(n.pinchType,r)),this.zoomX=e=/x/.test(r),this.zoomY=n=/y/.test(r),this.zoomHor=e&&!t||n&&t,this.zoomVert=n&&!t||e&&t,this.hasZoom=e||n},e}()})),t(n,"Core/MSPointer.js",[n["Core/Globals.js"],n["Core/Pointer.js"],n["Core/Utilities.js"]],(function(e,t,n){function r(){var e=[];return e.item=function(e){return this[e]},h(f,(function(t){e.push({pageX:t.pageX,pageY:t.pageY,target:t.target})})),e}function i(e,n,i,o){var a=s[t.hoverChartIndex||NaN];"touch"!==e.pointerType&&e.pointerType!==e.MSPOINTER_TYPE_TOUCH||!a||(a=a.pointer,o(e),a[n]({type:i,target:e.currentTarget,preventDefault:l,touches:r()}))}var o=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),s=e.charts,a=e.doc,l=e.noop,c=e.win,u=n.addEvent,d=n.css,h=n.objectEach,p=n.removeEvent,f={},m=!!c.PointerEvent;return function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.isRequired=function(){return!(e.hasTouch||!c.PointerEvent&&!c.MSPointerEvent)},n.prototype.batchMSEvents=function(e){e(this.chart.container,m?"pointerdown":"MSPointerDown",this.onContainerPointerDown),e(this.chart.container,m?"pointermove":"MSPointerMove",this.onContainerPointerMove),e(a,m?"pointerup":"MSPointerUp",this.onDocumentPointerUp)},n.prototype.destroy=function(){this.batchMSEvents(p),t.prototype.destroy.call(this)},n.prototype.init=function(e,n){t.prototype.init.call(this,e,n),this.hasZoom&&d(e.container,{"-ms-touch-action":"none","touch-action":"none"})},n.prototype.onContainerPointerDown=function(e){i(e,"onContainerTouchStart","touchstart",(function(e){f[e.pointerId]={pageX:e.pageX,pageY:e.pageY,target:e.currentTarget}}))},n.prototype.onContainerPointerMove=function(e){i(e,"onContainerTouchMove","touchmove",(function(e){f[e.pointerId]={pageX:e.pageX,pageY:e.pageY},f[e.pointerId].target||(f[e.pointerId].target=e.currentTarget)}))},n.prototype.onDocumentPointerUp=function(e){i(e,"onDocumentTouchEnd","touchend",(function(e){delete f[e.pointerId]}))},n.prototype.setDOMEvents=function(){t.prototype.setDOMEvents.call(this),(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(u)},n}(t)})),t(n,"Core/Legend/Legend.js",[n["Core/Animation/AnimationUtilities.js"],n["Core/FormatUtilities.js"],n["Core/Globals.js"],n["Core/Series/Point.js"],n["Core/Renderer/RendererUtilities.js"],n["Core/Utilities.js"]],(function(e,t,n,r,i,o){var s=e.animObject,a=e.setAnimation,l=t.format;e=n.isFirefox;var c=n.marginNames;n=n.win;var u=i.distribute,d=o.addEvent,h=o.createElement,p=o.css,f=o.defined,m=o.discardElement,g=o.find,b=o.fireEvent,v=o.isNumber,y=o.merge,S=o.pick,_=o.relativeLength,x=o.stableSort,w=o.syncTimeout;return i=o.wrap,o=function(){function e(e,t){this.allItems=[],this.contentGroup=this.box=void 0,this.display=!1,this.group=void 0,this.offsetWidth=this.maxLegendWidth=this.maxItemWidth=this.legendWidth=this.legendHeight=this.lastLineHeight=this.lastItemY=this.itemY=this.itemX=this.itemMarginTop=this.itemMarginBottom=this.itemHeight=this.initialItemY=0,this.options={},this.padding=0,this.pages=[],this.proximate=!1,this.scrollGroup=void 0,this.widthOption=this.totalItemWidth=this.titleHeight=this.symbolWidth=this.symbolHeight=0,this.chart=e,this.init(e,t)}return e.prototype.init=function(e,t){this.chart=e,this.setOptions(t),t.enabled&&(this.render(),d(this.chart,"endResize",(function(){this.legend.positionCheckboxes()})),this.proximate?this.unchartrender=d(this.chart,"render",(function(){this.legend.proximatePositions(),this.legend.positionItems()})):this.unchartrender&&this.unchartrender())},e.prototype.setOptions=function(e){var t=S(e.padding,8);this.options=e,this.chart.styledMode||(this.itemStyle=e.itemStyle,this.itemHiddenStyle=y(this.itemStyle,e.itemHiddenStyle)),this.itemMarginTop=e.itemMarginTop||0,this.itemMarginBottom=e.itemMarginBottom||0,this.padding=t,this.initialItemY=t-5,this.symbolWidth=S(e.symbolWidth,16),this.pages=[],this.proximate="proximate"===e.layout&&!this.chart.inverted,this.baseline=void 0},e.prototype.update=function(e,t){var n=this.chart;this.setOptions(y(!0,this.options,e)),this.destroy(),n.isDirtyLegend=n.isDirtyBox=!0,S(t,!0)&&n.redraw(),b(this,"afterUpdate")},e.prototype.colorizeItem=function(e,t){if(e.legendGroup[t?"removeClass":"addClass"]("highcharts-legend-item-hidden"),!this.chart.styledMode){var n=this.options,r=e.legendItem,i=e.legendLine,o=e.legendSymbol,s=this.itemHiddenStyle.color;n=t?n.itemStyle.color:s;var a=t&&e.color||s,l=e.options&&e.options.marker,c={fill:a};r&&r.css({fill:n,color:n}),i&&i.attr({stroke:a}),o&&(l&&o.isMarker&&(c=e.pointAttribs(),t||(c.stroke=c.fill=s)),o.attr(c))}b(this,"afterColorizeItem",{item:e,visible:t})},e.prototype.positionItems=function(){this.allItems.forEach(this.positionItem,this),this.chart.isResizing||this.positionCheckboxes()},e.prototype.positionItem=function(e){var t=this,n=this.options,r=n.symbolPadding,i=!n.rtl,o=e._legendItemPos;n=o[0],o=o[1];var s=e.checkbox,a=e.legendGroup;a&&a.element&&(r={translateX:i?n:this.legendWidth-n-2*r-4,translateY:o},i=function(){b(t,"afterPositionItem",{item:e})},f(a.translateY)?a.animate(r,void 0,i):(a.attr(r),i())),s&&(s.x=n,s.y=o)},e.prototype.destroyItem=function(e){var t=e.checkbox;["legendItem","legendLine","legendSymbol","legendGroup"].forEach((function(t){e[t]&&(e[t]=e[t].destroy())})),t&&m(e.checkbox)},e.prototype.destroy=function(){function e(e){this[e]&&(this[e]=this[e].destroy())}this.getAllItems().forEach((function(t){["legendItem","legendGroup"].forEach(e,t)})),"clipRect up down pager nav box title group".split(" ").forEach(e,this),this.display=null},e.prototype.positionCheckboxes=function(){var e=this.group&&this.group.alignAttr,t=this.clipHeight||this.legendHeight,n=this.titleHeight;if(e){var r=e.translateY;this.allItems.forEach((function(i){var o=i.checkbox;if(o){var s=r+n+o.y+(this.scrollOffset||0)+3;p(o,{left:e.translateX+i.checkboxOffset+o.x-20+"px",top:s+"px",display:this.proximate||s>r-6&&s<r+t-6?"":"none"})}}),this)}},e.prototype.renderTitle=function(){var e=this.options,t=this.padding,n=e.title,r=0;n.text&&(this.title||(this.title=this.chart.renderer.label(n.text,t-3,t-4,null,null,null,e.useHTML,null,"legend-title").attr({zIndex:1}),this.chart.styledMode||this.title.css(n.style),this.title.add(this.group)),n.width||this.title.css({width:this.maxLegendWidth+"px"}),r=(e=this.title.getBBox()).height,this.offsetWidth=e.width,this.contentGroup.attr({translateY:r})),this.titleHeight=r},e.prototype.setText=function(e){var t=this.options;e.legendItem.attr({text:t.labelFormat?l(t.labelFormat,e,this.chart):t.labelFormatter.call(e)})},e.prototype.renderItem=function(e){var t=this.chart,n=t.renderer,r=this.options,i=this.symbolWidth,o=r.symbolPadding||0,s=this.itemStyle,a=this.itemHiddenStyle,l="horizontal"===r.layout?S(r.itemDistance,20):0,c=!r.rtl,u=!e.series,d=!u&&e.series.drawLegendSymbol?e.series:e,h=d.options,p=this.createCheckboxForItem&&h&&h.showCheckbox,f=r.useHTML,m=e.options.className,g=e.legendItem;h=i+o+l+(p?20:0),g||(e.legendGroup=n.g("legend-item").addClass("highcharts-"+d.type+"-series highcharts-color-"+e.colorIndex+(m?" "+m:"")+(u?" highcharts-series-"+e.index:"")).attr({zIndex:1}).add(this.scrollGroup),e.legendItem=g=n.text("",c?i+o:-o,this.baseline||0,f),t.styledMode||g.css(y(e.visible?s:a)),g.attr({align:c?"left":"right",zIndex:2}).add(e.legendGroup),this.baseline||(this.fontMetrics=n.fontMetrics(t.styledMode?12:s.fontSize,g),this.baseline=this.fontMetrics.f+3+this.itemMarginTop,g.attr("y",this.baseline),this.symbolHeight=r.symbolHeight||this.fontMetrics.f,r.squareSymbol&&(this.symbolWidth=S(r.symbolWidth,Math.max(this.symbolHeight,16)),h=this.symbolWidth+o+l+(p?20:0),c&&g.attr("x",this.symbolWidth+o))),d.drawLegendSymbol(this,e),this.setItemEvents&&this.setItemEvents(e,g,f)),p&&!e.checkbox&&this.createCheckboxForItem&&this.createCheckboxForItem(e),this.colorizeItem(e,e.visible),!t.styledMode&&s.width||g.css({width:(r.itemWidth||this.widthOption||t.spacingBox.width)-h+"px"}),this.setText(e),t=g.getBBox(),n=this.fontMetrics&&this.fontMetrics.h||0,e.itemWidth=e.checkboxOffset=r.itemWidth||e.legendItemWidth||t.width+h,this.maxItemWidth=Math.max(this.maxItemWidth,e.itemWidth),this.totalItemWidth+=e.itemWidth,this.itemHeight=e.itemHeight=Math.round(e.legendItemHeight||(t.height>1.5*n?t.height:n))},e.prototype.layoutItem=function(e){var t=this.options,n=this.padding,r="horizontal"===t.layout,i=e.itemHeight,o=this.itemMarginBottom,s=this.itemMarginTop,a=r?S(t.itemDistance,20):0,l=this.maxLegendWidth;t=t.alignColumns&&this.totalItemWidth>l?this.maxItemWidth:e.itemWidth,r&&this.itemX-n+t>l&&(this.itemX=n,this.lastLineHeight&&(this.itemY+=s+this.lastLineHeight+o),this.lastLineHeight=0),this.lastItemY=s+this.itemY+o,this.lastLineHeight=Math.max(i,this.lastLineHeight),e._legendItemPos=[this.itemX,this.itemY],r?this.itemX+=t:(this.itemY+=s+i+o,this.lastLineHeight=i),this.offsetWidth=this.widthOption||Math.max((r?this.itemX-n-(e.checkbox?0:a):t)+n,this.offsetWidth)},e.prototype.getAllItems=function(){var e=[];return this.chart.series.forEach((function(t){var n=t&&t.options;t&&S(n.showInLegend,!f(n.linkedTo)&&void 0,!0)&&(e=e.concat(t.legendItems||("point"===n.legendType?t.data:t)))})),b(this,"afterGetAllItems",{allItems:e}),e},e.prototype.getAlignment=function(){var e=this.options;return this.proximate?e.align.charAt(0)+"tv":e.floating?"":e.align.charAt(0)+e.verticalAlign.charAt(0)+e.layout.charAt(0)},e.prototype.adjustMargins=function(e,t){var n=this.chart,r=this.options,i=this.getAlignment();i&&[/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/].forEach((function(o,s){o.test(i)&&!f(e[s])&&(n[c[s]]=Math.max(n[c[s]],n.legend[(s+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][s]*r[s%2?"x":"y"]+S(r.margin,12)+t[s]+(n.titleOffset[s]||0)))}))},e.prototype.proximatePositions=function(){var e=this.chart,t=[],n="left"===this.options.align;this.allItems.forEach((function(r){var i,o=n;if(r.yAxis){r.xAxis.options.reversed&&(o=!o),r.points&&(i=g(o?r.points:r.points.slice(0).reverse(),(function(e){return v(e.plotY)}))),o=this.itemMarginTop+r.legendItem.getBBox().height+this.itemMarginBottom;var s=r.yAxis.top-e.plotTop;r.visible?(i=i?i.plotY:r.yAxis.height,i+=s-.3*o):i=s+r.yAxis.height,t.push({target:i,size:o,item:r})}}),this),u(t,e.plotHeight).forEach((function(t){t.item._legendItemPos&&(t.item._legendItemPos[1]=e.plotTop-e.spacing[0]+t.pos)}))},e.prototype.render=function(){var e=this.chart,t=e.renderer,n=this.options,r=this.padding,i=this.getAllItems(),o=this.group,s=this.box;this.itemX=r,this.itemY=this.initialItemY,this.lastItemY=this.offsetWidth=0,this.widthOption=_(n.width,e.spacingBox.width-r);var a=e.spacingBox.width-2*r-n.x;-1<["rm","lm"].indexOf(this.getAlignment().substring(0,2))&&(a/=2),this.maxLegendWidth=this.widthOption||a,o||(this.group=o=t.g("legend").addClass(n.className||"").attr({zIndex:7}).add(),this.contentGroup=t.g().attr({zIndex:1}).add(o),this.scrollGroup=t.g().add(this.contentGroup)),this.renderTitle(),x(i,(function(e,t){return(e.options&&e.options.legendIndex||0)-(t.options&&t.options.legendIndex||0)})),n.reversed&&i.reverse(),this.allItems=i,this.display=a=!!i.length,this.itemHeight=this.totalItemWidth=this.maxItemWidth=this.lastLineHeight=0,i.forEach(this.renderItem,this),i.forEach(this.layoutItem,this),i=(this.widthOption||this.offsetWidth)+r;var l=this.lastItemY+this.lastLineHeight+this.titleHeight;l=this.handleOverflow(l),l+=r,s||(this.box=s=t.rect().addClass("highcharts-legend-box").attr({r:n.borderRadius}).add(o),s.isNew=!0),e.styledMode||s.attr({stroke:n.borderColor,"stroke-width":n.borderWidth||0,fill:n.backgroundColor||"none"}).shadow(n.shadow),0<i&&0<l&&(s[s.isNew?"attr":"animate"](s.crisp.call({},{x:0,y:0,width:i,height:l},s.strokeWidth())),s.isNew=!1),s[a?"show":"hide"](),e.styledMode&&"none"===o.getStyle("display")&&(i=l=0),this.legendWidth=i,this.legendHeight=l,a&&this.align(),this.proximate||this.positionItems(),b(this,"afterRender")},e.prototype.align=function(e){void 0===e&&(e=this.chart.spacingBox);var t=this.chart,n=this.options,r=e.y;/(lth|ct|rth)/.test(this.getAlignment())&&0<t.titleOffset[0]?r+=t.titleOffset[0]:/(lbh|cb|rbh)/.test(this.getAlignment())&&0<t.titleOffset[2]&&(r-=t.titleOffset[2]),r!==e.y&&(e=y(e,{y:r})),this.group.align(y(n,{width:this.legendWidth,height:this.legendHeight,verticalAlign:this.proximate?"top":n.verticalAlign}),!0,e)},e.prototype.handleOverflow=function(e){var t,n,r=this,i=this.chart,o=i.renderer,s=this.options,a=s.y,l="top"===s.verticalAlign,c=this.padding,u=s.maxHeight,d=s.navigation,h=S(d.animation,!0),p=d.arrowSize||12,f=this.pages,m=this.allItems,g=function(e){"number"==typeof e?y.attr({height:e}):y&&(r.clipRect=y.destroy(),r.contentGroup.clip()),r.contentGroup.div&&(r.contentGroup.div.style.clip=e?"rect("+c+"px,9999px,"+(c+e)+"px,0)":"auto")},b=function(e){return r[e]=o.circle(0,0,1.3*p).translate(p/2,p/2).add(v),i.styledMode||r[e].attr("fill","rgba(0,0,0,0.0001)"),r[e]};a=i.spacingBox.height+(l?-a:a)-c;var v=this.nav,y=this.clipRect;return"horizontal"!==s.layout||"middle"===s.verticalAlign||s.floating||(a/=2),u&&(a=Math.min(a,u)),f.length=0,e&&0<a&&e>a&&!1!==d.enabled?(this.clipHeight=t=Math.max(a-20-this.titleHeight-c,0),this.currentPage=S(this.currentPage,1),this.fullHeight=e,m.forEach((function(e,r){var i=e._legendItemPos[1],o=Math.round(e.legendItem.getBBox().height),s=f.length;(!s||i-f[s-1]>t&&(n||i)!==f[s-1])&&(f.push(n||i),s++),e.pageIx=s-1,n&&(m[r-1].pageIx=s-1),r===m.length-1&&i+o-f[s-1]>t&&o<=t&&(f.push(i),e.pageIx=s),i!==n&&(n=i)})),y||(y=r.clipRect=o.clipRect(0,c,9999,0),r.contentGroup.clip(y)),g(t),v||(this.nav=v=o.g().attr({zIndex:1}).add(this.group),this.up=o.symbol("triangle",0,0,p,p).add(v),b("upTracker").on("click",(function(){r.scroll(-1,h)})),this.pager=o.text("",15,10).addClass("highcharts-legend-navigation"),i.styledMode||this.pager.css(d.style),this.pager.add(v),this.down=o.symbol("triangle-down",0,0,p,p).add(v),b("downTracker").on("click",(function(){r.scroll(1,h)}))),r.scroll(0),e=a):v&&(g(),this.nav=v.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),e},e.prototype.scroll=function(e,t){var n=this,r=this.chart,i=this.pages,o=i.length,l=this.clipHeight,c=this.options.navigation,u=this.pager,d=this.padding,h=this.currentPage+e;h>o&&(h=o),0<h&&(void 0!==t&&a(t,r),this.nav.attr({translateX:d,translateY:l+this.padding+7+this.titleHeight,visibility:"visible"}),[this.up,this.upTracker].forEach((function(e){e.attr({class:1===h?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})})),u.attr({text:h+"/"+o}),[this.down,this.downTracker].forEach((function(e){e.attr({x:18+this.pager.getBBox().width,class:h===o?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})}),this),r.styledMode||(this.up.attr({fill:1===h?c.inactiveColor:c.activeColor}),this.upTracker.css({cursor:1===h?"default":"pointer"}),this.down.attr({fill:h===o?c.inactiveColor:c.activeColor}),this.downTracker.css({cursor:h===o?"default":"pointer"})),this.scrollOffset=-i[h-1]+this.initialItemY,this.scrollGroup.animate({translateY:this.scrollOffset}),this.currentPage=h,this.positionCheckboxes(),e=s(S(t,r.renderer.globalAnimation,!0)),w((function(){b(n,"afterScroll",{currentPage:h})}),e.duration))},e.prototype.setItemEvents=function(e,t,n){var i=this,o=i.chart.renderer.boxWrapper,s=e instanceof r,a="highcharts-legend-"+(s?"point":"series")+"-active",l=i.chart.styledMode,c=function(t){i.allItems.forEach((function(n){e!==n&&[n].concat(n.linkedSeries||[]).forEach((function(e){e.setState(t,!s)}))}))};(n?[t,e.legendSymbol]:[e.legendGroup]).forEach((function(n){n&&n.on("mouseover",(function(){e.visible&&c("inactive"),e.setState("hover"),e.visible&&o.addClass(a),l||t.css(i.options.itemHoverStyle)})).on("mouseout",(function(){i.chart.styledMode||t.css(y(e.visible?i.itemStyle:i.itemHiddenStyle)),c(""),o.removeClass(a),e.setState()})).on("click",(function(t){var n=function(){e.setVisible&&e.setVisible(),c(e.visible?"inactive":"")};o.removeClass(a),t={browserEvent:t},e.firePointEvent?e.firePointEvent("legendItemClick",t,n):b(e,"legendItemClick",t,n)}))}))},e.prototype.createCheckboxForItem=function(e){e.checkbox=h("input",{type:"checkbox",className:"highcharts-legend-checkbox",checked:e.selected,defaultChecked:e.selected},this.options.itemCheckboxStyle,this.chart.container),d(e.checkbox,"click",(function(t){b(e.series||e,"checkboxClick",{checked:t.target.checked,item:e},(function(){e.select()}))}))},e}(),(/Trident\/7\.0/.test(n.navigator&&n.navigator.userAgent)||e)&&i(o.prototype,"positionItem",(function(e,t){var n=this,r=function(){t._legendItemPos&&e.call(n,t)};r(),n.bubbleLegend||setTimeout(r)})),o})),t(n,"Core/Series/SeriesRegistry.js",[n["Core/Globals.js"],n["Core/DefaultOptions.js"],n["Core/Series/Point.js"],n["Core/Utilities.js"]],(function(e,t,n,r){var i,o=t.defaultOptions,s=r.error,a=r.extendClass,l=r.merge;return function(t){function r(e,r){var i=o.plotOptions||{},s=r.defaultOptions;r.prototype.pointClass||(r.prototype.pointClass=n),r.prototype.type=e,s&&(i[e]=s),t.seriesTypes[e]=r}t.seriesTypes=e.seriesTypes,t.getSeries=function(e,n){void 0===n&&(n={});var r=e.options.chart;r=n.type||r.type||r.defaultSeriesType||"";var i=t.seriesTypes[r];return t||s(17,!0,e,{missingModuleFor:r}),"function"==typeof(r=new i).init&&r.init(e,n),r},t.registerSeriesType=r,t.seriesType=function(e,i,s,c,u){var d=o.plotOptions||{};return i=i||"",d[e]=l(d[i],s),r(e,a(t.seriesTypes[i]||function(){},c)),t.seriesTypes[e].prototype.type=e,u&&(t.seriesTypes[e].prototype.pointClass=a(n,u)),t.seriesTypes[e]}}(i||(i={})),i})),t(n,"Core/Chart/Chart.js",[n["Core/Animation/AnimationUtilities.js"],n["Core/Axis/Axis.js"],n["Core/FormatUtilities.js"],n["Core/Foundation.js"],n["Core/Globals.js"],n["Core/Legend/Legend.js"],n["Core/MSPointer.js"],n["Core/DefaultOptions.js"],n["Core/Pointer.js"],n["Core/Renderer/RendererRegistry.js"],n["Core/Series/SeriesRegistry.js"],n["Core/Renderer/SVG/SVGRenderer.js"],n["Core/Time.js"],n["Core/Utilities.js"],n["Core/Renderer/HTML/AST.js"]],(function(e,t,n,r,i,o,s,a,l,c,u,d,h,p,f){var m=e.animate,g=e.animObject,b=e.setAnimation,v=n.numberFormat,y=r.registerEventOptions,S=i.charts,_=i.doc,x=i.marginNames,w=i.svg,k=i.win,O=a.defaultOptions,E=a.defaultTime,A=u.seriesTypes,T=p.addEvent,C=p.attr,M=p.cleanRecursively,$=p.createElement,P=p.css,R=p.defined,j=p.discardElement,N=p.erase,D=p.error,I=p.extend,L=p.find,B=p.fireEvent,z=p.getStyle,F=p.isArray,U=p.isNumber,Q=p.isObject,q=p.isString,G=p.merge,H=p.objectEach,V=p.pick,W=p.pInt,X=p.relativeLength,Y=p.removeEvent,Z=p.splat,J=p.syncTimeout,K=p.uniqueKey;return e=function(){function e(e,t,n){this.series=this.renderTo=this.renderer=this.pointer=this.pointCount=this.plotWidth=this.plotTop=this.plotLeft=this.plotHeight=this.plotBox=this.options=this.numberFormatter=this.margin=this.legend=this.labelCollectors=this.isResizing=this.index=this.eventOptions=this.container=this.colorCounter=this.clipBox=this.chartWidth=this.chartHeight=this.bounds=this.axisOffset=this.axes=void 0,this.sharedClips={},this.yAxis=this.xAxis=this.userOptions=this.titleOffset=this.time=this.symbolCounter=this.spacingBox=this.spacing=void 0,this.getArgs(e,t,n)}return e.chart=function(t,n,r){return new e(t,n,r)},e.prototype.getArgs=function(e,t,n){q(e)||e.nodeName?(this.renderTo=e,this.init(t,n)):this.init(e,t)},e.prototype.init=function(e,t){var n=e.plotOptions||{};B(this,"init",{args:arguments},(function(){var r=G(O,e),o=r.chart;H(r.plotOptions,(function(e,t){Q(e)&&(e.tooltip=n[t]&&G(n[t].tooltip)||void 0)})),r.tooltip.userOptions=e.chart&&e.chart.forExport&&e.tooltip.userOptions||e.tooltip,this.userOptions=e,this.margin=[],this.spacing=[],this.bounds={h:{},v:{}},this.labelCollectors=[],this.callback=t,this.isResizing=0,this.options=r,this.axes=[],this.series=[],this.time=e.time&&Object.keys(e.time).length?new h(e.time):i.time,this.numberFormatter=o.numberFormatter||v,this.styledMode=o.styledMode,this.hasCartesianSeries=o.showAxes,this.index=S.length,S.push(this),i.chartCount++,y(this,o),this.xAxis=[],this.yAxis=[],this.pointCount=this.colorCounter=this.symbolCounter=0,B(this,"afterInit"),this.firstRender()}))},e.prototype.initSeries=function(e){var t=this.options.chart;t=e.type||t.type||t.defaultSeriesType;var n=A[t];return n||D(17,!0,this,{missingModuleFor:t}),"function"==typeof(t=new n).init&&t.init(this,e),t},e.prototype.setSeriesData=function(){this.getSeriesOrderByLinks().forEach((function(e){e.points||e.data||!e.enabledDataSorting||e.setData(e.options.data,!1)}))},e.prototype.getSeriesOrderByLinks=function(){return this.series.concat().sort((function(e,t){return e.linkedSeries.length||t.linkedSeries.length?t.linkedSeries.length-e.linkedSeries.length:0}))},e.prototype.orderSeries=function(e){var t=this.series;e=e||0;for(var n=t.length;e<n;++e)t[e]&&(t[e].index=e,t[e].name=t[e].getName())},e.prototype.isInsidePlot=function(e,t,n){void 0===n&&(n={});var r=this.inverted,i=this.plotBox,o=this.plotLeft,s=this.plotTop,a=this.scrollablePlotBox,l=0,c=0;n.visiblePlotOnly&&this.scrollingContainer&&(l=(c=this.scrollingContainer).scrollLeft,c=c.scrollTop);var u=n.series;if(i=n.visiblePlotOnly&&a||i,e={x:a=n.inverted?t:e,y:t=n.inverted?e:t,isInsidePlot:!0},!n.ignoreX){var d=u&&(r?u.yAxis:u.xAxis)||{pos:o,len:1/0};(a=n.paneCoordinates?d.pos+a:o+a)>=Math.max(l+o,d.pos)&&a<=Math.min(l+o+i.width,d.pos+d.len)||(e.isInsidePlot=!1)}return!n.ignoreY&&e.isInsidePlot&&(r=u&&(r?u.xAxis:u.yAxis)||{pos:s,len:1/0},(n=n.paneCoordinates?r.pos+t:s+t)>=Math.max(c+s,r.pos)&&n<=Math.min(c+s+i.height,r.pos+r.len)||(e.isInsidePlot=!1)),B(this,"afterIsInsidePlot",e),e.isInsidePlot},e.prototype.redraw=function(e){B(this,"beforeRedraw");var t=this.hasCartesianSeries?this.axes:this.colorAxis||[],n=this.series,r=this.pointer,i=this.legend,o=this.userOptions.legend,s=this.renderer,a=s.isHidden(),l=[],c=this.isDirtyBox,u=this.isDirtyLegend;for(this.setResponsive&&this.setResponsive(!1),b(!!this.hasRendered&&e,this),a&&this.temporaryDisplay(),this.layOutTitles(),e=n.length;e--;){var d=n[e];if(d.options.stacking||d.options.centerInCategory){var h=!0;if(d.isDirty){var p=!0;break}}}if(p)for(e=n.length;e--;)(d=n[e]).options.stacking&&(d.isDirty=!0);n.forEach((function(e){e.isDirty&&("point"===e.options.legendType?("function"==typeof e.updateTotals&&e.updateTotals(),u=!0):o&&(o.labelFormatter||o.labelFormat)&&(u=!0)),e.isDirtyData&&B(e,"updatedData")})),u&&i&&i.options.enabled&&(i.render(),this.isDirtyLegend=!1),h&&this.getStacks(),t.forEach((function(e){e.updateNames(),e.setScale()})),this.getMargins(),t.forEach((function(e){e.isDirty&&(c=!0)})),t.forEach((function(e){var t=e.min+","+e.max;e.extKey!==t&&(e.extKey=t,l.push((function(){B(e,"afterSetExtremes",I(e.eventArgs,e.getExtremes())),delete e.eventArgs}))),(c||h)&&e.redraw()})),c&&this.drawChartBox(),B(this,"predraw"),n.forEach((function(e){(c||e.isDirty)&&e.visible&&e.redraw(),e.isDirtyData=!1})),r&&r.reset(!0),s.draw(),B(this,"redraw"),B(this,"render"),a&&this.temporaryDisplay(!0),l.forEach((function(e){e.call()}))},e.prototype.get=function(e){function t(t){return t.id===e||t.options&&t.options.id===e}for(var n=this.series,r=L(this.axes,t)||L(this.series,t),i=0;!r&&i<n.length;i++)r=L(n[i].points||[],t);return r},e.prototype.getAxes=function(){var e=this,n=this.options,r=n.xAxis=Z(n.xAxis||{});n=n.yAxis=Z(n.yAxis||{}),B(this,"getAxes"),r.forEach((function(e,t){e.index=t,e.isX=!0})),n.forEach((function(e,t){e.index=t})),r.concat(n).forEach((function(n){new t(e,n)})),B(this,"afterGetAxes")},e.prototype.getSelectedPoints=function(){return this.series.reduce((function(e,t){return t.getPointsCollection().forEach((function(t){V(t.selectedStaging,t.selected)&&e.push(t)})),e}),[])},e.prototype.getSelectedSeries=function(){return this.series.filter((function(e){return e.selected}))},e.prototype.setTitle=function(e,t,n){this.applyDescription("title",e),this.applyDescription("subtitle",t),this.applyDescription("caption",void 0),this.layOutTitles(n)},e.prototype.applyDescription=function(e,t){var n=this,r="title"===e?{color:"#333333",fontSize:this.options.isStock?"16px":"18px"}:{color:"#666666"};r=this.options[e]=G(!this.styledMode&&{style:r},this.options[e],t);var i=this[e];i&&t&&(this[e]=i=i.destroy()),r&&!i&&((i=this.renderer.text(r.text,0,0,r.useHTML).attr({align:r.align,class:"highcharts-"+e,zIndex:r.zIndex||4}).add()).update=function(t){n[{title:"setTitle",subtitle:"setSubtitle",caption:"setCaption"}[e]](t)},this.styledMode||i.css(r.style),this[e]=i)},e.prototype.layOutTitles=function(e){var t=[0,0,0],n=this.renderer,r=this.spacingBox;["title","subtitle","caption"].forEach((function(e){var i,o=this[e],s=this.options[e],a=s.verticalAlign||"top";if(e="title"===e?"top"===a?-3:0:"top"===a?t[0]+2:0,o){this.styledMode||(i=s.style&&s.style.fontSize),i=n.fontMetrics(i,o).b,o.css({width:(s.width||r.width+(s.widthAdjust||0))+"px"});var l=Math.round(o.getBBox(s.useHTML).height);o.align(I({y:"bottom"===a?i:e+i,height:l},s),!1,"spacingBox"),s.floating||("top"===a?t[0]=Math.ceil(t[0]+l):"bottom"===a&&(t[2]=Math.ceil(t[2]+l)))}}),this),t[0]&&"top"===(this.options.title.verticalAlign||"top")&&(t[0]+=this.options.title.margin),t[2]&&"bottom"===this.options.caption.verticalAlign&&(t[2]+=this.options.caption.margin);var i=!this.titleOffset||this.titleOffset.join(",")!==t.join(",");this.titleOffset=t,B(this,"afterLayOutTitles"),!this.isDirtyBox&&i&&(this.isDirtyBox=this.isDirtyLegend=i,this.hasRendered&&V(e,!0)&&this.isDirtyBox&&this.redraw())},e.prototype.getChartSize=function(){var e=this.options.chart,t=e.width;e=e.height;var n=this.renderTo;R(t)||(this.containerWidth=z(n,"width")),R(e)||(this.containerHeight=z(n,"height")),this.chartWidth=Math.max(0,t||this.containerWidth||600),this.chartHeight=Math.max(0,X(e,this.chartWidth)||(1<this.containerHeight?this.containerHeight:400))},e.prototype.temporaryDisplay=function(e){var t=this.renderTo;if(e)for(;t&&t.style;)t.hcOrigStyle&&(P(t,t.hcOrigStyle),delete t.hcOrigStyle),t.hcOrigDetached&&(_.body.removeChild(t),t.hcOrigDetached=!1),t=t.parentNode;else for(;t&&t.style&&(_.body.contains(t)||t.parentNode||(t.hcOrigDetached=!0,_.body.appendChild(t)),("none"===z(t,"display",!1)||t.hcOricDetached)&&(t.hcOrigStyle={display:t.style.display,height:t.style.height,overflow:t.style.overflow},e={display:"block",overflow:"hidden"},t!==this.renderTo&&(e.height=0),P(t,e),t.offsetWidth||t.style.setProperty("display","block","important")),(t=t.parentNode)!==_.body););},e.prototype.setClassName=function(e){this.container.className="highcharts-container "+(e||"")},e.prototype.getContainer=function(){var e,t=this.options,n=t.chart,r=K(),i=this.renderTo;i||(this.renderTo=i=n.renderTo),q(i)&&(this.renderTo=i=_.getElementById(i)),i||D(13,!0,this);var o=W(C(i,"data-highcharts-chart"));U(o)&&S[o]&&S[o].hasRendered&&S[o].destroy(),C(i,"data-highcharts-chart",this.index),i.innerHTML=f.emptyHTML,n.skipClone||i.offsetWidth||this.temporaryDisplay(),this.getChartSize(),o=this.chartWidth;var s=this.chartHeight;if(P(i,{overflow:"hidden"}),this.styledMode||(e=I({position:"relative",overflow:"hidden",width:o+"px",height:s+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)",userSelect:"none","touch-action":"manipulation",outline:"none"},n.style||{})),this.container=r=$("div",{id:r},e,i),this._cursor=r.style.cursor,this.renderer=new(n.renderer||!w?c.getRendererType(n.renderer):d)(r,o,s,void 0,n.forExport,t.exporting&&t.exporting.allowHTML,this.styledMode),b(void 0,this),this.setClassName(n.className),this.styledMode)for(var a in t.defs)this.renderer.definition(t.defs[a]);else this.renderer.setStyle(n.style);this.renderer.chartIndex=this.index,B(this,"afterGetContainer")},e.prototype.getMargins=function(e){var t=this.spacing,n=this.margin,r=this.titleOffset;this.resetMargins(),r[0]&&!R(n[0])&&(this.plotTop=Math.max(this.plotTop,r[0]+t[0])),r[2]&&!R(n[2])&&(this.marginBottom=Math.max(this.marginBottom,r[2]+t[2])),this.legend&&this.legend.display&&this.legend.adjustMargins(n,t),B(this,"getMargins"),e||this.getAxisMargins()},e.prototype.getAxisMargins=function(){var e=this,t=e.axisOffset=[0,0,0,0],n=e.colorAxis,r=e.margin,i=function(e){e.forEach((function(e){e.visible&&e.getOffset()}))};e.hasCartesianSeries?i(e.axes):n&&n.length&&i(n),x.forEach((function(n,i){R(r[i])||(e[n]+=t[i])})),e.setChartSize()},e.prototype.reflow=function(e){var t=this,n=t.options.chart,r=t.renderTo,i=R(n.width)&&R(n.height),o=n.width||z(r,"width");n=n.height||z(r,"height"),r=e?e.target:k,delete t.pointer.chartPosition,i||t.isPrinting||!o||!n||r!==k&&r!==_||(o===t.containerWidth&&n===t.containerHeight||(p.clearTimeout(t.reflowTimeout),t.reflowTimeout=J((function(){t.container&&t.setSize(void 0,void 0,!1)}),e?100:0)),t.containerWidth=o,t.containerHeight=n)},e.prototype.setReflow=function(e){var t=this;!1===e||this.unbindReflow?!1===e&&this.unbindReflow&&(this.unbindReflow=this.unbindReflow()):(this.unbindReflow=T(k,"resize",(function(e){t.options&&t.reflow(e)})),T(this,"destroy",this.unbindReflow))},e.prototype.setSize=function(e,t,n){var r=this,i=r.renderer;r.isResizing+=1,b(n,r),n=i.globalAnimation,r.oldChartHeight=r.chartHeight,r.oldChartWidth=r.chartWidth,void 0!==e&&(r.options.chart.width=e),void 0!==t&&(r.options.chart.height=t),r.getChartSize(),r.styledMode||(n?m:P)(r.container,{width:r.chartWidth+"px",height:r.chartHeight+"px"},n),r.setChartSize(!0),i.setSize(r.chartWidth,r.chartHeight,n),r.axes.forEach((function(e){e.isDirty=!0,e.setScale()})),r.isDirtyLegend=!0,r.isDirtyBox=!0,r.layOutTitles(),r.getMargins(),r.redraw(n),r.oldChartHeight=null,B(r,"resize"),J((function(){r&&B(r,"endResize",null,(function(){--r.isResizing}))}),g(n).duration)},e.prototype.setChartSize=function(e){var t,n,r,i,o=this.inverted,s=this.renderer,a=this.chartWidth,l=this.chartHeight,c=this.options.chart,u=this.spacing,d=this.clipOffset;this.plotLeft=t=Math.round(this.plotLeft),this.plotTop=n=Math.round(this.plotTop),this.plotWidth=r=Math.max(0,Math.round(a-t-this.marginRight)),this.plotHeight=i=Math.max(0,Math.round(l-n-this.marginBottom)),this.plotSizeX=o?i:r,this.plotSizeY=o?r:i,this.plotBorderWidth=c.plotBorderWidth||0,this.spacingBox=s.spacingBox={x:u[3],y:u[0],width:a-u[3]-u[1],height:l-u[0]-u[2]},this.plotBox=s.plotBox={x:t,y:n,width:r,height:i},o=2*Math.floor(this.plotBorderWidth/2),a=Math.ceil(Math.max(o,d[3])/2),l=Math.ceil(Math.max(o,d[0])/2),this.clipBox={x:a,y:l,width:Math.floor(this.plotSizeX-Math.max(o,d[1])/2-a),height:Math.max(0,Math.floor(this.plotSizeY-Math.max(o,d[2])/2-l))},e||(this.axes.forEach((function(e){e.setAxisSize(),e.setAxisTranslation()})),s.alignElements()),B(this,"afterSetChartSize",{skipAxes:e})},e.prototype.resetMargins=function(){B(this,"resetMargins");var e=this,t=e.options.chart;["margin","spacing"].forEach((function(n){var r=t[n],i=Q(r)?r:[r,r,r,r];["Top","Right","Bottom","Left"].forEach((function(r,o){e[n][o]=V(t[n+r],i[o])}))})),x.forEach((function(t,n){e[t]=V(e.margin[n],e.spacing[n])})),e.axisOffset=[0,0,0,0],e.clipOffset=[0,0,0,0]},e.prototype.drawChartBox=function(){var e,t=this.options.chart,n=this.renderer,r=this.chartWidth,i=this.chartHeight,o=this.styledMode,s=this.plotBGImage,a=t.backgroundColor,l=t.plotBackgroundColor,c=t.plotBackgroundImage,u=this.plotLeft,d=this.plotTop,h=this.plotWidth,p=this.plotHeight,f=this.plotBox,m=this.clipRect,g=this.clipBox,b=this.chartBackground,v=this.plotBackground,y=this.plotBorder,S="animate";if(b||(this.chartBackground=b=n.rect().addClass("highcharts-background").add(),S="attr"),o)var _=e=b.strokeWidth();else e=(_=t.borderWidth||0)+(t.shadow?8:0),a={fill:a||"none"},(_||b["stroke-width"])&&(a.stroke=t.borderColor,a["stroke-width"]=_),b.attr(a).shadow(t.shadow);b[S]({x:e/2,y:e/2,width:r-e-_%2,height:i-e-_%2,r:t.borderRadius}),S="animate",v||(S="attr",this.plotBackground=v=n.rect().addClass("highcharts-plot-background").add()),v[S](f),o||(v.attr({fill:l||"none"}).shadow(t.plotShadow),c&&(s?(c!==s.attr("href")&&s.attr("href",c),s.animate(f)):this.plotBGImage=n.image(c,u,d,h,p).add())),m?m.animate({width:g.width,height:g.height}):this.clipRect=n.clipRect(g),S="animate",y||(S="attr",this.plotBorder=y=n.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add()),o||y.attr({stroke:t.plotBorderColor,"stroke-width":t.plotBorderWidth||0,fill:"none"}),y[S](y.crisp({x:u,y:d,width:h,height:p},-y.strokeWidth())),this.isDirtyBox=!1,B(this,"afterDrawChartBox")},e.prototype.propFromSeries=function(){var e,t,n,r=this,i=r.options.chart,o=r.options.series;["inverted","angular","polar"].forEach((function(s){for(t=A[i.type||i.defaultSeriesType],n=i[s]||t&&t.prototype[s],e=o&&o.length;!n&&e--;)(t=A[o[e].type])&&t.prototype[s]&&(n=!0);r[s]=n}))},e.prototype.linkSeries=function(){var e=this,t=e.series;t.forEach((function(e){e.linkedSeries.length=0})),t.forEach((function(t){var n=t.options.linkedTo;q(n)&&(n=":previous"===n?e.series[t.index-1]:e.get(n))&&n.linkedParent!==t&&(n.linkedSeries.push(t),t.linkedParent=n,n.enabledDataSorting&&t.setDataSortingOptions(),t.visible=V(t.options.visible,n.options.visible,t.visible))})),B(this,"afterLinkSeries")},e.prototype.renderSeries=function(){this.series.forEach((function(e){e.translate(),e.render()}))},e.prototype.renderLabels=function(){var e=this,t=e.options.labels;t.items&&t.items.forEach((function(n){var r=I(t.style,n.style),i=W(r.left)+e.plotLeft,o=W(r.top)+e.plotTop+12;delete r.left,delete r.top,e.renderer.text(n.html,i,o).attr({zIndex:2}).css(r).add()}))},e.prototype.render=function(){var e=this.axes,t=this.colorAxis,n=this.renderer,r=this.options,i=function(e){e.forEach((function(e){e.visible&&e.render()}))},s=0;this.setTitle(),this.legend=new o(this,r.legend),this.getStacks&&this.getStacks(),this.getMargins(!0),this.setChartSize(),r=this.plotWidth,e.some((function(e){if(e.horiz&&e.visible&&e.options.labels.enabled&&e.series.length)return s=21,!0}));var a=this.plotHeight=Math.max(this.plotHeight-s,0);e.forEach((function(e){e.setScale()})),this.getAxisMargins();var l=1.1<r/this.plotWidth,c=1.05<a/this.plotHeight;(l||c)&&(e.forEach((function(e){(e.horiz&&l||!e.horiz&&c)&&e.setTickInterval(!0)})),this.getMargins()),this.drawChartBox(),this.hasCartesianSeries?i(e):t&&t.length&&i(t),this.seriesGroup||(this.seriesGroup=n.g("series-group").attr({zIndex:3}).add()),this.renderSeries(),this.renderLabels(),this.addCredits(),this.setResponsive&&this.setResponsive(),this.hasRendered=!0},e.prototype.addCredits=function(e){var t=this,n=G(!0,this.options.credits,e);n.enabled&&!this.credits&&(this.credits=this.renderer.text(n.text+(this.mapCredits||""),0,0).addClass("highcharts-credits").on("click",(function(){n.href&&(k.location.href=n.href)})).attr({align:n.position.align,zIndex:8}),t.styledMode||this.credits.css(n.style),this.credits.add().align(n.position),this.credits.update=function(e){t.credits=t.credits.destroy(),t.addCredits(e)})},e.prototype.destroy=function(){var e,t=this,n=t.axes,r=t.series,o=t.container,s=o&&o.parentNode;for(B(t,"destroy"),t.renderer.forExport?N(S,t):S[t.index]=void 0,i.chartCount--,t.renderTo.removeAttribute("data-highcharts-chart"),Y(t),e=n.length;e--;)n[e]=n[e].destroy();for(this.scroller&&this.scroller.destroy&&this.scroller.destroy(),e=r.length;e--;)r[e]=r[e].destroy();"title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" ").forEach((function(e){var n=t[e];n&&n.destroy&&(t[e]=n.destroy())})),o&&(o.innerHTML=f.emptyHTML,Y(o),s&&j(o)),H(t,(function(e,n){delete t[n]}))},e.prototype.firstRender=function(){var e=this,t=e.options;e.isReadyToRender&&!e.isReadyToRender()||(e.getContainer(),e.resetMargins(),e.setChartSize(),e.propFromSeries(),e.getAxes(),(F(t.series)?t.series:[]).forEach((function(t){e.initSeries(t)})),e.linkSeries(),e.setSeriesData(),B(e,"beforeRender"),l&&(s.isRequired()?e.pointer=new s(e,t):e.pointer=new l(e,t)),e.render(),e.pointer.getChartPosition(),e.renderer.imgCount||e.hasLoaded||e.onload(),e.temporaryDisplay(!0))},e.prototype.onload=function(){this.callbacks.concat([this.callback]).forEach((function(e){e&&void 0!==this.index&&e.apply(this,[this])}),this),B(this,"load"),B(this,"render"),R(this.index)&&this.setReflow(this.options.chart.reflow),this.hasLoaded=!0},e.prototype.addSeries=function(e,t,n){var r,i=this;return e&&(t=V(t,!0),B(i,"addSeries",{options:e},(function(){r=i.initSeries(e),i.isDirtyLegend=!0,i.linkSeries(),r.enabledDataSorting&&r.setData(e.data,!1),B(i,"afterAddSeries",{series:r}),t&&i.redraw(n)}))),r},e.prototype.addAxis=function(e,t,n,r){return this.createAxis(t?"xAxis":"yAxis",{axis:e,redraw:n,animation:r})},e.prototype.addColorAxis=function(e,t,n){return this.createAxis("colorAxis",{axis:e,redraw:t,animation:n})},e.prototype.createAxis=function(e,n){return e=new t(this,G(n.axis,{index:this[e].length,isX:"xAxis"===e})),V(n.redraw,!0)&&this.redraw(n.animation),e},e.prototype.showLoading=function(e){var t=this,n=t.options,r=n.loading,i=function(){o&&P(o,{left:t.plotLeft+"px",top:t.plotTop+"px",width:t.plotWidth+"px",height:t.plotHeight+"px"})},o=t.loadingDiv,s=t.loadingSpan;o||(t.loadingDiv=o=$("div",{className:"highcharts-loading highcharts-loading-hidden"},null,t.container)),s||(t.loadingSpan=s=$("span",{className:"highcharts-loading-inner"},null,o),T(t,"redraw",i)),o.className="highcharts-loading",f.setElementHTML(s,V(e,n.lang.loading,"")),t.styledMode||(P(o,I(r.style,{zIndex:10})),P(s,r.labelStyle),t.loadingShown||(P(o,{opacity:0,display:""}),m(o,{opacity:r.style.opacity||.5},{duration:r.showDuration||0}))),t.loadingShown=!0,i()},e.prototype.hideLoading=function(){var e=this.options,t=this.loadingDiv;t&&(t.className="highcharts-loading highcharts-loading-hidden",this.styledMode||m(t,{opacity:0},{duration:e.loading.hideDuration||100,complete:function(){P(t,{display:"none"})}})),this.loadingShown=!1},e.prototype.update=function(e,t,n,r){var i,o,s=this,a={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle",caption:"setCaption"},l=e.isResponsiveOptions,c=[];B(s,"update",{options:e}),l||s.setResponsive(!1,!0),e=M(e,s.options),s.userOptions=G(s.userOptions,e);var u=e.chart;if(u){if(G(!0,s.options.chart,u),"className"in u&&s.setClassName(u.className),"reflow"in u&&s.setReflow(u.reflow),"inverted"in u||"polar"in u||"type"in u){s.propFromSeries();var d=!0}"alignTicks"in u&&(d=!0),"events"in u&&y(this,u),H(u,(function(e,t){-1!==s.propsRequireUpdateSeries.indexOf("chart."+t)&&(i=!0),-1!==s.propsRequireDirtyBox.indexOf(t)&&(s.isDirtyBox=!0),-1!==s.propsRequireReflow.indexOf(t)&&(l?s.isDirtyBox=!0:o=!0)})),!s.styledMode&&u.style&&s.renderer.setStyle(s.options.chart.style||{})}!s.styledMode&&e.colors&&(this.options.colors=e.colors),e.time&&(this.time===E&&(this.time=new h(e.time)),G(!0,s.options.time,e.time)),H(e,(function(t,n){s[n]&&"function"==typeof s[n].update?s[n].update(t,!1):"function"==typeof s[a[n]]?s[a[n]](t):"colors"!==n&&-1===s.collectionsWithUpdate.indexOf(n)&&G(!0,s.options[n],e[n]),"chart"!==n&&-1!==s.propsRequireUpdateSeries.indexOf(n)&&(i=!0)})),this.collectionsWithUpdate.forEach((function(t){if(e[t]){var r=[];s[t].forEach((function(e,t){e.options.isInternal||r.push(V(e.options.index,t))})),Z(e[t]).forEach((function(e,i){var o,a=R(e.id);a&&(o=s.get(e.id)),!o&&s[t]&&(o=s[t][r?r[i]:i])&&a&&R(o.options.id)&&(o=void 0),o&&o.coll===t&&(o.update(e,!1),n&&(o.touched=!0)),!o&&n&&s.collectionsWithInit[t]&&(s.collectionsWithInit[t][0].apply(s,[e].concat(s.collectionsWithInit[t][1]||[]).concat([!1])).touched=!0)})),n&&s[t].forEach((function(e){e.touched||e.options.isInternal?delete e.touched:c.push(e)}))}})),c.forEach((function(e){e.chart&&e.remove&&e.remove(!1)})),d&&s.axes.forEach((function(e){e.update({},!1)})),i&&s.getSeriesOrderByLinks().forEach((function(e){e.chart&&e.update({},!1)}),this),d=u&&u.width,u=u&&(q(u.height)?X(u.height,d||s.chartWidth):u.height),o||U(d)&&d!==s.chartWidth||U(u)&&u!==s.chartHeight?s.setSize(d,u,r):V(t,!0)&&s.redraw(r),B(s,"afterUpdate",{options:e,redraw:t,animation:r})},e.prototype.setSubtitle=function(e,t){this.applyDescription("subtitle",e),this.layOutTitles(t)},e.prototype.setCaption=function(e,t){this.applyDescription("caption",e),this.layOutTitles(t)},e.prototype.showResetZoom=function(){function e(){t.zoomOut()}var t=this,n=O.lang,r=t.options.chart.resetZoomButton,i=r.theme,o=i.states,s="chart"===r.relativeTo||"spacingBox"===r.relativeTo?null:"scrollablePlotBox";B(this,"beforeShowResetZoom",null,(function(){t.resetZoomButton=t.renderer.button(n.resetZoom,null,null,e,i,o&&o.hover).attr({align:r.position.align,title:n.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(r.position,!1,s)})),B(this,"afterShowResetZoom")},e.prototype.zoomOut=function(){B(this,"selection",{resetSelection:!0},this.zoom)},e.prototype.zoom=function(e){var t,n=this,r=n.pointer,i=n.inverted?r.mouseDownX:r.mouseDownY,o=!1;!e||e.resetSelection?(n.axes.forEach((function(e){t=e.zoom()})),r.initiated=!1):e.xAxis.concat(e.yAxis).forEach((function(e){var s=e.axis,a=n.inverted?s.left:s.top,l=n.inverted?a+s.width:a+s.height,c=s.isXAxis,u=!1;(!c&&i>=a&&i<=l||c||!R(i))&&(u=!0),r[c?"zoomX":"zoomY"]&&u&&(t=s.zoom(e.min,e.max),s.displayBtn&&(o=!0))}));var s=n.resetZoomButton;o&&!s?n.showResetZoom():!o&&Q(s)&&(n.resetZoomButton=s.destroy()),t&&n.redraw(V(n.options.chart.animation,e&&e.animation,100>n.pointCount))},e.prototype.pan=function(e,t){var n=this,r=n.hoverPoints;t="object"==typeof t?t:{enabled:t,type:"x"};var i=n.options.chart,o=n.options.mapNavigation&&n.options.mapNavigation.enabled;i&&i.panning&&(i.panning=t);var s,a=t.type;B(this,"pan",{originalEvent:e},(function(){r&&r.forEach((function(e){e.setState()}));var t=n.xAxis;"xy"===a?t=t.concat(n.yAxis):"y"===a&&(t=n.yAxis);var i={};t.forEach((function(t){if(t.options.panningEnabled&&!t.options.isInternal){var r=t.horiz,l=e[r?"chartX":"chartY"],c=n[r=r?"mouseDownX":"mouseDownY"],u=t.minPointOffset||0,d=t.reversed&&!n.inverted||!t.reversed&&n.inverted?-1:1,h=t.getExtremes(),p=t.toValue(c-l,!0)+u*d,f=t.toValue(c+t.len-l,!0)-(u*d||t.isXAxis&&t.pointRangePadding||0),m=f<p;d=t.hasVerticalPanning(),c=m?f:p,p=m?p:f;var g=t.panningState;!d||t.isXAxis||g&&!g.isDirty||t.series.forEach((function(e){var t=e.getProcessedData(!0);t=e.getExtremes(t.yData,!0),g||(g={startMin:Number.MAX_VALUE,startMax:-Number.MAX_VALUE}),U(t.dataMin)&&U(t.dataMax)&&(g.startMin=Math.min(V(e.options.threshold,1/0),t.dataMin,g.startMin),g.startMax=Math.max(V(e.options.threshold,-1/0),t.dataMax,g.startMax))})),d=Math.min(V(g&&g.startMin,h.dataMin),u?h.min:t.toValue(t.toPixels(h.min)-t.minPixelPadding)),f=Math.max(V(g&&g.startMax,h.dataMax),u?h.max:t.toValue(t.toPixels(h.max)+t.minPixelPadding)),t.panningState=g,t.isOrdinal||(0<(u=d-c)&&(p+=u,c=d),0<(u=p-f)&&(p=f,c-=u),t.series.length&&c!==h.min&&p!==h.max&&c>=d&&p<=f&&(t.setExtremes(c,p,!1,!1,{trigger:"pan"}),n.resetZoomButton||o||c===d||p===f||!a.match("y")||(n.showResetZoom(),t.displayBtn=!1),s=!0),i[r]=l)}})),H(i,(function(e,t){n[t]=e})),s&&n.redraw(!1),P(n.container,{cursor:"move"})}))},e}(),I(e.prototype,{callbacks:[],collectionsWithInit:{xAxis:[e.prototype.addAxis,[!0]],yAxis:[e.prototype.addAxis,[!1]],series:[e.prototype.addSeries]},collectionsWithUpdate:["xAxis","yAxis","series"],propsRequireDirtyBox:"backgroundColor borderColor borderWidth borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),propsRequireReflow:"margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft".split(" "),propsRequireUpdateSeries:"chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions time tooltip".split(" ")}),e})),t(n,"Core/Legend/LegendSymbol.js",[n["Core/Utilities.js"]],(function(e){var t,n=e.merge,r=e.pick;return function(e){e.drawLineMarker=function(e){var t=this.options,i=e.symbolWidth,o=e.symbolHeight,s=o/2,a=this.chart.renderer,l=this.legendGroup;e=e.baseline-Math.round(.3*e.fontMetrics.b);var c={},u=t.marker;this.chart.styledMode||(c={"stroke-width":t.lineWidth||0},t.dashStyle&&(c.dashstyle=t.dashStyle)),this.legendLine=a.path([["M",0,e],["L",i,e]]).addClass("highcharts-graph").attr(c).add(l),u&&!1!==u.enabled&&i&&(t=Math.min(r(u.radius,s),s),0===this.symbol.indexOf("url")&&(u=n(u,{width:o,height:o}),t=0),this.legendSymbol=i=a.symbol(this.symbol,i/2-t,e-t,2*t,2*t,u).addClass("highcharts-point").add(l),i.isMarker=!0)},e.drawRectangle=function(e,t){var n=e.symbolHeight,i=e.options.squareSymbol;t.legendSymbol=this.chart.renderer.rect(i?(e.symbolWidth-n)/2:0,e.baseline-n+1,i?n:e.symbolWidth,n,r(e.options.symbolRadius,n/2)).addClass("highcharts-point").attr({zIndex:3}).add(t.legendGroup)}}(t||(t={})),t})),t(n,"Core/Series/SeriesDefaults.js",[],(function(){return{lineWidth:2,allowPointSelect:!1,crisp:!0,showCheckbox:!1,animation:{duration:1e3},events:{},marker:{enabledThreshold:2,lineColor:"#ffffff",lineWidth:0,radius:4,states:{normal:{animation:!0},hover:{animation:{duration:50},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{animation:{},align:"center",defer:!0,formatter:function(){var e=this.series.chart.numberFormatter;return"number"!=typeof this.y?"":e(this.y,-1)},padding:5,style:{fontSize:"11px",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0},cropThreshold:300,opacity:1,pointRange:0,softThreshold:!0,states:{normal:{animation:!0},hover:{animation:{duration:50},lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{animation:{duration:0}},inactive:{animation:{duration:50},opacity:.2}},stickyTracking:!0,turboThreshold:1e3,findNearestPointBy:"x"}})),t(n,"Core/Series/Series.js",[n["Core/Animation/AnimationUtilities.js"],n["Core/DefaultOptions.js"],n["Core/Foundation.js"],n["Core/Globals.js"],n["Core/Legend/LegendSymbol.js"],n["Core/Series/Point.js"],n["Core/Series/SeriesDefaults.js"],n["Core/Series/SeriesRegistry.js"],n["Core/Renderer/SVG/SVGElement.js"],n["Core/Utilities.js"]],(function(e,t,n,r,i,o,s,a,l,c){var u=e.animObject,d=e.setAnimation,h=t.defaultOptions,p=n.registerEventOptions,f=r.hasTouch,m=r.svg,g=r.win,b=a.seriesTypes,v=c.addEvent,y=c.arrayMax,S=c.arrayMin,_=c.clamp,x=c.cleanRecursively,w=c.correctFloat,k=c.defined,O=c.erase,E=c.error,A=c.extend,T=c.find,C=c.fireEvent,M=c.getNestedProperty,$=c.isArray,P=c.isNumber,R=c.isString,j=c.merge,N=c.objectEach,D=c.pick,I=c.removeEvent,L=c.splat,B=c.syncTimeout;return e=function(){function e(){this.zones=this.yAxis=this.xAxis=this.userOptions=this.tooltipOptions=this.processedYData=this.processedXData=this.points=this.options=this.linkedSeries=this.index=this.eventsToUnbind=this.eventOptions=this.data=this.chart=this._i=void 0}return e.prototype.init=function(e,t){C(this,"init",{options:t});var n=this,r=e.series;this.eventsToUnbind=[],n.chart=e,n.options=n.setOptions(t),t=n.options,n.linkedSeries=[],n.bindAxes(),A(n,{name:t.name,state:"",visible:!1!==t.visible,selected:!0===t.selected}),p(this,t);var i,o=t.events;(o&&o.click||t.point&&t.point.events&&t.point.events.click||t.allowPointSelect)&&(e.runTrackerClick=!0),n.getColor(),n.getSymbol(),n.parallelArrays.forEach((function(e){n[e+"Data"]||(n[e+"Data"]=[])})),n.isCartesian&&(e.hasCartesianSeries=!0),r.length&&(i=r[r.length-1]),n._i=D(i&&i._i,-1)+1,n.opacity=n.options.opacity,e.orderSeries(this.insert(r)),t.dataSorting&&t.dataSorting.enabled?n.setDataSortingOptions():n.points||n.data||n.setData(t.data,!1),C(this,"afterInit")},e.prototype.is=function(e){return b[e]&&this instanceof b[e]},e.prototype.insert=function(e){var t,n=this.options.index;if(P(n)){for(t=e.length;t--;)if(n>=D(e[t].options.index,e[t]._i)){e.splice(t+1,0,this);break}-1===t&&e.unshift(this),t+=1}else e.push(this);return D(t,e.length-1)},e.prototype.bindAxes=function(){var e,t=this,n=t.options,r=t.chart;C(this,"bindAxes",null,(function(){(t.axisTypes||[]).forEach((function(i){var o=0;r[i].forEach((function(r){e=r.options,(n[i]===o&&!e.isInternal||void 0!==n[i]&&n[i]===e.id||void 0===n[i]&&0===e.index)&&(t.insert(r.series),t[i]=r,r.isDirty=!0),e.isInternal||o++})),t[i]||t.optionalAxis===i||E(18,!0,r)}))})),C(this,"afterBindAxes")},e.prototype.updateParallelArrays=function(e,t){var n=e.series,r=arguments,i=P(t)?function(r){var i="y"===r&&n.toYData?n.toYData(e):e[r];n[r+"Data"][t]=i}:function(e){Array.prototype[t].apply(n[e+"Data"],Array.prototype.slice.call(r,2))};n.parallelArrays.forEach(i)},e.prototype.hasData=function(){return this.visible&&void 0!==this.dataMax&&void 0!==this.dataMin||this.visible&&this.yData&&0<this.yData.length},e.prototype.autoIncrement=function(e){var t,n=this.options,r=n.pointIntervalUnit,i=n.relativeXValue,o=this.chart.time,s=this.xIncrement;return s=D(s,n.pointStart,0),this.pointInterval=t=D(this.pointInterval,n.pointInterval,1),i&&P(e)&&(t*=e),r&&(n=new o.Date(s),"day"===r?o.set("Date",n,o.get("Date",n)+t):"month"===r?o.set("Month",n,o.get("Month",n)+t):"year"===r&&o.set("FullYear",n,o.get("FullYear",n)+t),t=n.getTime()-s),i&&P(e)?s+t:(this.xIncrement=s+t,s)},e.prototype.setDataSortingOptions=function(){var e=this.options;A(this,{requireSorting:!1,sorted:!1,enabledDataSorting:!0,allowDG:!1}),k(e.pointRange)||(e.pointRange=1)},e.prototype.setOptions=function(e){var t=this.chart,n=t.options,r=n.plotOptions,i=t.userOptions||{};e=j(e),t=t.styledMode;var o={plotOptions:r,userOptions:e};C(this,"setOptions",o);var s=o.plotOptions[this.type],a=i.plotOptions||{};return this.userOptions=o.userOptions,i=j(s,r.series,i.plotOptions&&i.plotOptions[this.type],e),this.tooltipOptions=j(h.tooltip,h.plotOptions.series&&h.plotOptions.series.tooltip,h.plotOptions[this.type].tooltip,n.tooltip.userOptions,r.series&&r.series.tooltip,r[this.type].tooltip,e.tooltip),this.stickyTracking=D(e.stickyTracking,a[this.type]&&a[this.type].stickyTracking,a.series&&a.series.stickyTracking,!(!this.tooltipOptions.shared||this.noSharedTooltip)||i.stickyTracking),null===s.marker&&delete i.marker,this.zoneAxis=i.zoneAxis,r=this.zones=(i.zones||[]).slice(),!i.negativeColor&&!i.negativeFillColor||i.zones||(n={value:i[this.zoneAxis+"Threshold"]||i.threshold||0,className:"highcharts-negative"},t||(n.color=i.negativeColor,n.fillColor=i.negativeFillColor),r.push(n)),r.length&&k(r[r.length-1].value)&&r.push(t?{}:{color:this.color,fillColor:this.fillColor}),C(this,"afterSetOptions",{options:i}),i},e.prototype.getName=function(){return D(this.options.name,"Series "+(this.index+1))},e.prototype.getCyclic=function(e,t,n){var r=this.chart,i=this.userOptions,o=e+"Index",s=e+"Counter",a=n?n.length:D(r.options.chart[e+"Count"],r[e+"Count"]);if(!t){var l=D(i[o],i["_"+o]);k(l)||(r.series.length||(r[s]=0),i["_"+o]=l=r[s]%a,r[s]+=1),n&&(t=n[l])}void 0!==l&&(this[o]=l),this[e]=t},e.prototype.getColor=function(){this.chart.styledMode?this.getCyclic("color"):this.options.colorByPoint?this.color="#cccccc":this.getCyclic("color",this.options.color||h.plotOptions[this.type].color,this.chart.options.colors)},e.prototype.getPointsCollection=function(){return(this.hasGroupedData?this.points:this.data)||[]},e.prototype.getSymbol=function(){this.getCyclic("symbol",this.options.marker.symbol,this.chart.options.symbols)},e.prototype.findPointIndex=function(e,t){var n,r,i=e.id,s=e.x,a=this.points,l=this.options.dataSorting;if(i)(l=this.chart.get(i))instanceof o&&(n=l);else if((this.linkedParent||this.enabledDataSorting||this.options.relativeXValue)&&(n=function(t){return!t.touched&&t.index===e.index},l&&l.matchByName?n=function(t){return!t.touched&&t.name===e.name}:this.options.relativeXValue&&(n=function(t){return!t.touched&&t.options.x===e.x}),!(n=T(a,n))))return;if(n){var c=n&&n.index;void 0!==c&&(r=!0)}return void 0===c&&P(s)&&(c=this.xData.indexOf(s,t)),-1!==c&&void 0!==c&&this.cropped&&(c=c>=this.cropStart?c-this.cropStart:c),!r&&P(c)&&a[c]&&a[c].touched&&(c=void 0),c},e.prototype.updateData=function(e,t){var n,r,i,o=this.options,s=o.dataSorting,a=this.points,l=[],c=this.requireSorting,u=e.length===a.length,d=!0;if(this.xIncrement=null,e.forEach((function(e,t){var r=k(e)&&this.pointClass.prototype.optionsToObject.call({series:this},e)||{},d=r.x;r.id||P(d)?(-1===(r=this.findPointIndex(r,i))||void 0===r?l.push(e):a[r]&&e!==o.data[r]?(a[r].update(e,!1,null,!1),a[r].touched=!0,c&&(i=r+1)):a[r]&&(a[r].touched=!0),(!u||t!==r||s&&s.enabled||this.hasDerivedData)&&(n=!0)):l.push(e)}),this),n)for(e=a.length;e--;)(r=a[e])&&!r.touched&&r.remove&&r.remove(!1,t);else!u||s&&s.enabled?d=!1:(e.forEach((function(e,t){e!==a[t].y&&a[t].update&&a[t].update(e,!1,null,!1)})),l.length=0);return a.forEach((function(e){e&&(e.touched=!1)})),!!d&&(l.forEach((function(e){this.addPoint(e,!1,null,null,!1)}),this),null===this.xIncrement&&this.xData&&this.xData.length&&(this.xIncrement=y(this.xData),this.autoIncrement()),!0)},e.prototype.setData=function(e,t,n,r){var i=this,o=i.points,s=o&&o.length||0,a=i.options,l=i.chart,c=a.dataSorting,u=i.xAxis,d=a.turboThreshold,h=this.xData,p=this.yData,f=i.pointArrayMap;f=f&&f.length;var m,g=a.keys,b=0,v=1,y=null,S=(e=e||[]).length;if(t=D(t,!0),c&&c.enabled&&(e=this.sortData(e)),!1!==r&&S&&s&&!i.cropped&&!i.hasGroupedData&&i.visible&&!i.isSeriesBoosting&&(m=this.updateData(e,n)),!m){if(i.xIncrement=null,i.colorCounter=0,this.parallelArrays.forEach((function(e){i[e+"Data"].length=0})),d&&S>d)if(y=i.getFirstValidPoint(e),P(y))for(n=0;n<S;n++)h[n]=this.autoIncrement(),p[n]=e[n];else if($(y))if(f)if(y.length===f)for(n=0;n<S;n++)h[n]=this.autoIncrement(),p[n]=e[n];else for(n=0;n<S;n++)r=e[n],h[n]=r[0],p[n]=r.slice(1,f+1);else if(g&&(b=0<=(b=g.indexOf("x"))?b:0,v=0<=(v=g.indexOf("y"))?v:1),1===y.length&&(v=0),b===v)for(n=0;n<S;n++)h[n]=this.autoIncrement(),p[n]=e[n][v];else for(n=0;n<S;n++)r=e[n],h[n]=r[b],p[n]=r[v];else E(12,!1,l);else for(n=0;n<S;n++)void 0!==e[n]&&(r={series:i},i.pointClass.prototype.applyOptions.apply(r,[e[n]]),i.updateParallelArrays(r,n));for(p&&R(p[0])&&E(14,!0,l),i.data=[],i.options.data=i.userOptions.data=e,n=s;n--;)o[n]&&o[n].destroy&&o[n].destroy();u&&(u.minRange=u.userMinRange),i.isDirty=l.isDirtyBox=!0,i.isDirtyData=!!o,n=!1}"point"===a.legendType&&(this.processData(),this.generatePoints()),t&&l.redraw(n)},e.prototype.sortData=function(e){var t=this,n=t.options.dataSorting.sortKey||"y",r=function(e,t){return k(t)&&e.pointClass.prototype.optionsToObject.call({series:e},t)||{}};return e.forEach((function(n,i){e[i]=r(t,n),e[i].index=i}),this),e.concat().sort((function(e,t){return e=M(n,e),(t=M(n,t))<e?-1:t>e?1:0})).forEach((function(e,t){e.x=t}),this),t.linkedSeries&&t.linkedSeries.forEach((function(t){var n=t.options,i=n.data;n.dataSorting&&n.dataSorting.enabled||!i||(i.forEach((function(n,o){i[o]=r(t,n),e[o]&&(i[o].x=e[o].x,i[o].index=o)})),t.setData(i,!1))})),e},e.prototype.getProcessedData=function(e){var t=this.xAxis,n=this.options,r=n.cropThreshold,i=e||this.getExtremesFromAll||n.getExtremesFromAll,o=this.isCartesian;e=t&&t.val2lin,n=!(!t||!t.logarithmic);var s=0,a=this.xData,l=this.yData,c=this.requireSorting,u=!1,d=a.length;if(t){var h=(u=t.getExtremes()).min,p=u.max;u=t.categories&&!t.names.length}if(o&&this.sorted&&!i&&(!r||d>r||this.forceCrop))if(a[d-1]<h||a[0]>p)a=[],l=[];else if(this.yData&&(a[0]<h||a[d-1]>p)){var f=this.cropData(this.xData,this.yData,h,p);a=f.xData,l=f.yData,s=f.start,f=!0}for(r=a.length||1;--r;)if(0<(t=n?e(a[r])-e(a[r-1]):a[r]-a[r-1])&&(void 0===m||t<m))var m=t;else 0>t&&c&&!u&&(E(15,!1,this.chart),c=!1);return{xData:a,yData:l,cropped:f,cropStart:s,closestPointRange:m}},e.prototype.processData=function(e){var t=this.xAxis;if(this.isCartesian&&!this.isDirty&&!t.isDirty&&!this.yAxis.isDirty&&!e)return!1;e=this.getProcessedData(),this.cropped=e.cropped,this.cropStart=e.cropStart,this.processedXData=e.xData,this.processedYData=e.yData,this.closestPointRange=this.basePointRange=e.closestPointRange,C(this,"afterProcessData")},e.prototype.cropData=function(e,t,n,r,i){var o,s=e.length,a=0,l=s;for(i=D(i,this.cropShoulder),o=0;o<s;o++)if(e[o]>=n){a=Math.max(0,o-i);break}for(n=o;n<s;n++)if(e[n]>r){l=n+i;break}return{xData:e.slice(a,l),yData:t.slice(a,l),start:a,end:l}},e.prototype.generatePoints=function(){var e=this.options,t=e.data,n=this.processedXData,r=this.processedYData,i=this.pointClass,o=n.length,s=this.cropStart||0,a=this.hasGroupedData,l=e.keys,c=[];e=e.dataGrouping&&e.dataGrouping.groupAll?s:0;var u,d,h=this.data;if(!h&&!a){var p=[];p.length=t.length,h=this.data=p}for(l&&a&&(this.options.keys=!1),d=0;d<o;d++){if(p=s+d,a){var f=(new i).init(this,[n[d]].concat(L(r[d])));f.dataGroup=this.groupMap[e+d],f.dataGroup.options&&(f.options=f.dataGroup.options,A(f,f.dataGroup.options),delete f.dataLabels)}else(f=h[p])||void 0===t[p]||(h[p]=f=(new i).init(this,t[p],n[d]));f&&(f.index=a?e+d:p,c[d]=f)}if(this.options.keys=l,h&&(o!==(u=h.length)||a))for(d=0;d<u;d++)d!==s||a||(d+=o),h[d]&&(h[d].destroyElements(),h[d].plotX=void 0);this.data=h,this.points=c,C(this,"afterGeneratePoints")},e.prototype.getXExtremes=function(e){return{min:S(e),max:y(e)}},e.prototype.getExtremes=function(e,t){var n=this.xAxis,r=this.yAxis,i=this.processedXData||this.xData,o=[],s=this.requireSorting?this.cropShoulder:0;r=!!r&&r.positiveValuesOnly;var a,l=0,c=0,u=0,d=(e=e||this.stackedYData||this.processedYData||[]).length;if(n){var h=n.getExtremes();l=h.min,c=h.max}for(a=0;a<d;a++){var p=i[a];h=e[a];var f=(P(h)||$(h))&&(h.length||0<h||!r);if(p=t||this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||!n||(i[a+s]||p)>=l&&(i[a-s]||p)<=c,f&&p)if(f=h.length)for(;f--;)P(h[f])&&(o[u++]=h[f]);else o[u++]=h}return e={activeYData:o,dataMin:S(o),dataMax:y(o)},C(this,"afterGetExtremes",{dataExtremes:e}),e},e.prototype.applyExtremes=function(){var e=this.getExtremes();return this.dataMin=e.dataMin,this.dataMax=e.dataMax,e},e.prototype.getFirstValidPoint=function(e){for(var t=e.length,n=0,r=null;null===r&&n<t;)r=e[n],n++;return r},e.prototype.translate=function(){this.processedXData||this.processData(),this.generatePoints();var e,t,n=this.options,r=n.stacking,i=this.xAxis,o=i.categories,s=this.enabledDataSorting,a=this.yAxis,l=this.points,c=l.length,u=this.pointPlacementToXValue(),d=!!u,h=n.threshold,p=n.startFromThreshold?h:0,f=this.zoneAxis||"y",m=Number.MAX_VALUE;for(e=0;e<c;e++){var g=l[e],b=g.x,v=void 0,y=void 0,S=g.y,x=g.low,O=r&&a.stacking&&a.stacking.stacks[(this.negStacks&&S<(p?0:h)?"-":"")+this.stackKey];if((a.positiveValuesOnly&&!a.validatePositiveValue(S)||i.positiveValuesOnly&&!i.validatePositiveValue(b))&&(g.isNull=!0),g.plotX=t=w(_(i.translate(b,0,0,0,1,u,"flags"===this.type),-1e5,1e5)),r&&this.visible&&O&&O[b]){var E=this.getStackIndicator(E,b,this.index);g.isNull||(y=(v=O[b]).points[E.key])}if($(y)&&(x=y[0],S=y[1],x===p&&E.key===O[b].base&&(x=D(P(h)&&h,a.min)),a.positiveValuesOnly&&0>=x&&(x=null),g.total=g.stackTotal=v.total,g.percentage=v.total&&g.y/v.total*100,g.stackY=S,this.irregularWidths||v.setOffset(this.pointXOffset||0,this.barW||0)),g.yBottom=k(x)?_(a.translate(x,0,1,0,1),-1e5,1e5):null,this.dataModify&&(S=this.dataModify.modifyValue(S,e)),g.plotY=void 0,P(S)&&(void 0!==(v=a.translate(S,!1,!0,!1,!0))&&(g.plotY=_(v,-1e5,1e5))),g.isInside=this.isPointInside(g),g.clientX=d?w(i.translate(b,0,0,0,1,u)):t,g.negative=g[f]<(n[f+"Threshold"]||h||0),g.category=o&&void 0!==o[g.x]?o[g.x]:g.x,!g.isNull&&!1!==g.visible){void 0!==A&&(m=Math.min(m,Math.abs(t-A)));var A=t}g.zone=this.zones.length?g.getZone():void 0,!g.graphic&&this.group&&s&&(g.isNew=!0)}this.closestPointRangePx=m,C(this,"afterTranslate")},e.prototype.getValidPoints=function(e,t,n){var r=this.chart;return(e||this.points||[]).filter((function(e){return!(t&&!r.isInsidePlot(e.plotX,e.plotY,{inverted:r.inverted}))&&(!1!==e.visible&&(n||!e.isNull))}))},e.prototype.getClipBox=function(){var e=this.chart,t=this.xAxis,n=this.yAxis,r=j(e.clipBox);return t&&t.len!==e.plotSizeX&&(r.width=t.len),n&&n.len!==e.plotSizeY&&(r.height=n.len),r},e.prototype.getSharedClipKey=function(){return this.sharedClipKey=(this.options.xAxis||0)+","+(this.options.yAxis||0)},e.prototype.setClip=function(){var e=this.chart,t=this.group,n=this.markerGroup,r=e.sharedClips;e=e.renderer;var i=this.getClipBox(),o=this.getSharedClipKey(),s=r[o];s?s.animate(i):r[o]=s=e.clipRect(i),t&&t.clip(!1===this.options.clip?void 0:s),n&&n.clip()},e.prototype.animate=function(e){var t=this.chart,n=this.group,r=this.markerGroup,i=t.inverted,o=u(this.options.animation),s=[this.getSharedClipKey(),o.duration,o.easing,o.defer].join(),a=t.sharedClips[s],l=t.sharedClips[s+"m"];if(e&&n)o=this.getClipBox(),a?a.attr("height",o.height):(o.width=0,i&&(o.x=t.plotHeight),a=t.renderer.clipRect(o),t.sharedClips[s]=a,l=t.renderer.clipRect({x:i?(t.plotSizeX||0)+99:-99,y:i?-t.plotLeft:-t.plotTop,width:99,height:i?t.chartWidth:t.chartHeight}),t.sharedClips[s+"m"]=l),n.clip(a),r&&r.clip(l);else if(a&&!a.hasClass("highcharts-animating")){t=this.getClipBox();var c=o.step;r&&r.element.childNodes.length&&(o.step=function(e,t){c&&c.apply(t,arguments),l&&l.element&&l.attr(t.prop,"width"===t.prop?e+99:e)}),a.addClass("highcharts-animating").animate(t,o)}},e.prototype.afterAnimate=function(){var e=this;this.setClip(),N(this.chart.sharedClips,(function(t,n,r){t&&!e.chart.container.querySelector('[clip-path="url(#'+t.id+')"]')&&(t.destroy(),delete r[n])})),this.finishedAnimating=!0,C(this,"afterAnimate")},e.prototype.drawPoints=function(){var e,t,n=this.points,r=this.chart,i=this.options.marker,o=this[this.specialGroup]||this.markerGroup,s=this.xAxis,a=D(i.enabled,!(s&&!s.isRadial)||null,this.closestPointRangePx>=i.enabledThreshold*i.radius);if(!1!==i.enabled||this._hasPointMarkers)for(e=0;e<n.length;e++){var l=n[e],c=(t=l.graphic)?"animate":"attr",u=l.marker||{},d=!!l.marker;if((a&&void 0===u.enabled||u.enabled)&&!l.isNull&&!1!==l.visible){var h=D(u.symbol,this.symbol,"rect"),p=this.markerAttribs(l,l.selected&&"select");this.enabledDataSorting&&(l.startXPos=s.reversed?-(p.width||0):s.width);var f=!1!==l.isInside;t?t[f?"show":"hide"](f).animate(p):f&&(0<(p.width||0)||l.hasImage)&&(l.graphic=t=r.renderer.symbol(h,p.x,p.y,p.width,p.height,d?u:i).add(o),this.enabledDataSorting&&r.hasRendered&&(t.attr({x:l.startXPos}),c="animate")),t&&"animate"===c&&t[f?"show":"hide"](f).animate(p),t&&!r.styledMode&&t[c](this.pointAttribs(l,l.selected&&"select")),t&&t.addClass(l.getClassName(),!0)}else t&&(l.graphic=t.destroy())}},e.prototype.markerAttribs=function(e,t){var n=this.options,r=n.marker,i=e.marker||{},o=i.symbol||r.symbol,s=D(i.radius,r.radius);return t&&(r=r.states[t],t=i.states&&i.states[t],s=D(t&&t.radius,r&&r.radius,s+(r&&r.radiusPlus||0))),e.hasImage=o&&0===o.indexOf("url"),e.hasImage&&(s=0),e={x:n.crisp?Math.floor(e.plotX-s):e.plotX-s,y:e.plotY-s},s&&(e.width=e.height=2*s),e},e.prototype.pointAttribs=function(e,t){var n=this.options.marker,r=e&&e.options,i=r&&r.marker||{},o=r&&r.color,s=e&&e.color,a=e&&e.zone&&e.zone.color,l=this.color;return e=D(i.lineWidth,n.lineWidth),r=1,l=o||a||s||l,o=i.fillColor||n.fillColor||l,s=i.lineColor||n.lineColor||l,t=t||"normal",n=n.states[t]||{},t=i.states&&i.states[t]||{},e=D(t.lineWidth,n.lineWidth,e+D(t.lineWidthPlus,n.lineWidthPlus,0)),o=t.fillColor||n.fillColor||o,{stroke:s=t.lineColor||n.lineColor||s,"stroke-width":e,fill:o,opacity:r=D(t.opacity,n.opacity,r)}},e.prototype.destroy=function(e){var t,n,r,i=this,o=i.chart,s=/AppleWebKit\/533/.test(g.navigator.userAgent),a=i.data||[];for(C(i,"destroy"),this.removeEvents(e),(i.axisTypes||[]).forEach((function(e){(r=i[e])&&r.series&&(O(r.series,i),r.isDirty=r.forceRedraw=!0)})),i.legendItem&&i.chart.legend.destroyItem(i),t=a.length;t--;)(n=a[t])&&n.destroy&&n.destroy();i.clips&&i.clips.forEach((function(e){return e.destroy()})),c.clearTimeout(i.animationTimeout),N(i,(function(e,t){e instanceof l&&!e.survive&&e[s&&"group"===t?"hide":"destroy"]()})),o.hoverSeries===i&&(o.hoverSeries=void 0),O(o.series,i),o.orderSeries(),N(i,(function(t,n){e&&"hcEvents"===n||delete i[n]}))},e.prototype.applyZones=function(){var e,t,n,r,i,o,s,a,l=this,c=this.chart,u=c.renderer,d=this.zones,h=this.clips||[],p=this.graph,f=this.area,m=Math.max(c.chartWidth,c.chartHeight),g=this[(this.zoneAxis||"y")+"Axis"],b=c.inverted,v=!1;if(d.length&&(p||f)&&g&&void 0!==g.min){var y=g.reversed,S=g.horiz;p&&!this.showLine&&p.hide(),f&&f.hide();var x=g.getExtremes();d.forEach((function(d,w){e=y?S?c.plotWidth:0:S?0:g.toPixels(x.min)||0,e=_(D(t,e),0,m),t=_(Math.round(g.toPixels(D(d.value,x.max),!0)||0),0,m),v&&(e=t=g.toPixels(x.max)),r=Math.abs(e-t),i=Math.min(e,t),o=Math.max(e,t),g.isXAxis?(n={x:b?o:i,y:0,width:r,height:m},S||(n.x=c.plotHeight-n.x)):(n={x:0,y:b?o:i,width:m,height:r},S&&(n.y=c.plotWidth-n.y)),b&&u.isVML&&(n=g.isXAxis?{x:0,y:y?i:o,height:n.width,width:c.chartWidth}:{x:n.y-c.plotLeft-c.spacingBox.x,y:0,width:n.height,height:c.chartHeight}),h[w]?h[w].animate(n):h[w]=u.clipRect(n),s=l["zone-area-"+w],a=l["zone-graph-"+w],p&&a&&a.clip(h[w]),f&&s&&s.clip(h[w]),v=d.value>x.max,l.resetZones&&0===t&&(t=void 0)})),this.clips=h}else l.visible&&(p&&p.show(!0),f&&f.show(!0))},e.prototype.invertGroups=function(e){function t(){["group","markerGroup"].forEach((function(t){n[t]&&(r.renderer.isVML&&n[t].attr({width:n.yAxis.len,height:n.xAxis.len}),n[t].width=n.yAxis.len,n[t].height=n.xAxis.len,n[t].invert(!n.isRadialSeries&&e))}))}var n=this,r=n.chart;n.xAxis&&(n.eventsToUnbind.push(v(r,"resize",t)),t(),n.invertGroups=t)},e.prototype.plotGroup=function(e,t,n,r,i){var o=this[e],s=!o;return n={visibility:n,zIndex:r||.1},void 0===this.opacity||this.chart.styledMode||"inactive"===this.state||(n.opacity=this.opacity),s&&(this[e]=o=this.chart.renderer.g().add(i)),o.addClass("highcharts-"+t+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(k(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(o.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0),o.attr(n)[s?"attr":"animate"](this.getPlotBox()),o},e.prototype.getPlotBox=function(){var e=this.chart,t=this.xAxis,n=this.yAxis;return e.inverted&&(t=n,n=this.xAxis),{translateX:t?t.left:e.plotLeft,translateY:n?n.top:e.plotTop,scaleX:1,scaleY:1}},e.prototype.removeEvents=function(e){e||I(this),this.eventsToUnbind.length&&(this.eventsToUnbind.forEach((function(e){e()})),this.eventsToUnbind.length=0)},e.prototype.render=function(){var e=this,t=e.chart,n=e.options,r=u(n.animation),i=e.visible?"inherit":"hidden",o=n.zIndex,s=e.hasRendered,a=t.seriesGroup,l=t.inverted;t=!e.finishedAnimating&&t.renderer.isSVG?r.duration:0,C(this,"render");var c=e.plotGroup("group","series",i,o,a);e.markerGroup=e.plotGroup("markerGroup","markers",i,o,a),!1!==n.clip&&e.setClip(),e.animate&&t&&e.animate(!0),c.inverted=!!D(e.invertible,e.isCartesian)&&l,e.drawGraph&&(e.drawGraph(),e.applyZones()),e.visible&&e.drawPoints(),e.drawDataLabels&&e.drawDataLabels(),e.redrawPoints&&e.redrawPoints(),e.drawTracker&&!1!==e.options.enableMouseTracking&&e.drawTracker(),e.invertGroups(l),e.animate&&t&&e.animate(),s||(t&&r.defer&&(t+=r.defer),e.animationTimeout=B((function(){e.afterAnimate()}),t||0)),e.isDirty=!1,e.hasRendered=!0,C(e,"afterRender")},e.prototype.redraw=function(){var e=this.chart,t=this.isDirty||this.isDirtyData,n=this.group,r=this.xAxis,i=this.yAxis;n&&(e.inverted&&n.attr({width:e.plotWidth,height:e.plotHeight}),n.animate({translateX:D(r&&r.left,e.plotLeft),translateY:D(i&&i.top,e.plotTop)})),this.translate(),this.render(),t&&delete this.kdTree},e.prototype.searchPoint=function(e,t){var n=this.xAxis,r=this.yAxis,i=this.chart.inverted;return this.searchKDTree({clientX:i?n.len-e.chartY+n.pos:e.chartX-n.pos,plotY:i?r.len-e.chartX+r.pos:e.chartY-r.pos},t,e)},e.prototype.buildKDTree=function(e){this.buildingKdTree=!0;var t=this,n=-1<t.options.findNearestPointBy.indexOf("y")?2:1;delete t.kdTree,B((function(){t.kdTree=function e(n,r,i){var o=n&&n.length;if(o){var s=t.kdAxisArray[r%i];return n.sort((function(e,t){return e[s]-t[s]})),{point:n[o=Math.floor(o/2)],left:e(n.slice(0,o),r+1,i),right:e(n.slice(o+1),r+1,i)}}}(t.getValidPoints(null,!t.directTouch),n,n),t.buildingKdTree=!1}),t.options.kdNow||e&&"touchstart"===e.type?0:1)},e.prototype.searchKDTree=function(e,t,n){var r=this,i=this.kdAxisArray[0],o=this.kdAxisArray[1],s=t?"distX":"dist";if(t=-1<r.options.findNearestPointBy.indexOf("y")?2:1,this.kdTree||this.buildingKdTree||this.buildKDTree(n),this.kdTree)return function e(t,n,a,l){var c=n.point,u=r.kdAxisArray[a%l],d=c,h=k(t[i])&&k(c[i])?Math.pow(t[i]-c[i],2):null,p=k(t[o])&&k(c[o])?Math.pow(t[o]-c[o],2):null;return p=(h||0)+(p||0),c.dist=k(p)?Math.sqrt(p):Number.MAX_VALUE,c.distX=k(h)?Math.sqrt(h):Number.MAX_VALUE,h=0>(u=t[u]-c[u])?"right":"left",n[p=0>u?"left":"right"]&&(d=(p=e(t,n[p],a+1,l))[s]<d[s]?p:c),n[h]&&Math.sqrt(u*u)<d[s]&&(d=(t=e(t,n[h],a+1,l))[s]<d[s]?t:d),d}(e,this.kdTree,t,t)},e.prototype.pointPlacementToXValue=function(){var e=this.options,t=e.pointRange,n=this.xAxis;return"between"===(e=e.pointPlacement)&&(e=n.reversed?-.5:.5),P(e)?e*(t||n.pointRange):0},e.prototype.isPointInside=function(e){var t=this.chart,n=this.xAxis,r=this.yAxis;return void 0!==e.plotY&&void 0!==e.plotX&&0<=e.plotY&&e.plotY<=(r?r.len:t.plotHeight)&&0<=e.plotX&&e.plotX<=(n?n.len:t.plotWidth)},e.prototype.drawTracker=function(){var e=this,t=e.options,n=t.trackByArea,r=[].concat(n?e.areaPath:e.graphPath),i=e.chart,o=i.pointer,s=i.renderer,a=i.options.tooltip.snap,l=e.tracker,c=function(t){i.hoverSeries!==e&&e.onMouseOver()},u="rgba(192,192,192,"+(m?1e-4:.002)+")";l?l.attr({d:r}):e.graph&&(e.tracker=s.path(r).attr({visibility:e.visible?"visible":"hidden",zIndex:2}).addClass(n?"highcharts-tracker-area":"highcharts-tracker-line").add(e.group),i.styledMode||e.tracker.attr({"stroke-linecap":"round","stroke-linejoin":"round",stroke:u,fill:n?u:"none","stroke-width":e.graph.strokeWidth()+(n?0:2*a)}),[e.tracker,e.markerGroup,e.dataLabelsGroup].forEach((function(e){e&&(e.addClass("highcharts-tracker").on("mouseover",c).on("mouseout",(function(e){o.onTrackerMouseOut(e)})),t.cursor&&!i.styledMode&&e.css({cursor:t.cursor}),f)&&e.on("touchstart",c)}))),C(this,"afterDrawTracker")},e.prototype.addPoint=function(e,t,n,r,i){var o=this.options,s=this.data,a=this.chart,l=this.xAxis;l=l&&l.hasNames&&l.names;var c,u=o.data,d=this.xData;t=D(t,!0);var h={series:this};this.pointClass.prototype.applyOptions.apply(h,[e]);var p=h.x,f=d.length;if(this.requireSorting&&p<d[f-1])for(c=!0;f&&d[f-1]>p;)f--;this.updateParallelArrays(h,"splice",f,0,0),this.updateParallelArrays(h,f),l&&h.name&&(l[p]=h.name),u.splice(f,0,e),c&&(this.data.splice(f,0,null),this.processData()),"point"===o.legendType&&this.generatePoints(),n&&(s[0]&&s[0].remove?s[0].remove(!1):(s.shift(),this.updateParallelArrays(h,"shift"),u.shift())),!1!==i&&C(this,"addPoint",{point:h}),this.isDirtyData=this.isDirty=!0,t&&a.redraw(r)},e.prototype.removePoint=function(e,t,n){var r=this,i=r.data,o=i[e],s=r.points,a=r.chart,l=function(){s&&s.length===i.length&&s.splice(e,1),i.splice(e,1),r.options.data.splice(e,1),r.updateParallelArrays(o||{series:r},"splice",e,1),o&&o.destroy(),r.isDirty=!0,r.isDirtyData=!0,t&&a.redraw()};d(n,a),t=D(t,!0),o?o.firePointEvent("remove",null,l):l()},e.prototype.remove=function(e,t,n,r){function i(){o.destroy(r),s.isDirtyLegend=s.isDirtyBox=!0,s.linkSeries(),D(e,!0)&&s.redraw(t)}var o=this,s=o.chart;!1!==n?C(o,"remove",null,i):i()},e.prototype.update=function(e,t){e=x(e,this.userOptions),C(this,"update",{options:e});var n,r=this,i=r.chart,o=r.userOptions,s=r.initialType||r.type,a=i.options.plotOptions,l=b[s].prototype,c=r.finishedAnimating&&{animation:!1},u={},d=["eventOptions","navigatorSeries","baseSeries"],h=e.type||o.type||i.options.chart.type,p=!(this.hasDerivedData||h&&h!==this.type||void 0!==e.pointStart||void 0!==e.pointInterval||void 0!==e.relativeXValue||r.hasOptionChanged("dataGrouping")||r.hasOptionChanged("pointStart")||r.hasOptionChanged("pointInterval")||r.hasOptionChanged("pointIntervalUnit")||r.hasOptionChanged("keys"));if(h=h||s,p&&(d.push("data","isDirtyData","points","processedXData","processedYData","xIncrement","cropped","_hasPointMarkers","_hasPointLabels","clips","nodes","layout","mapMap","mapData","minY","maxY","minX","maxX"),!1!==e.visible&&d.push("area","graph"),r.parallelArrays.forEach((function(e){d.push(e+"Data")})),e.data&&(e.dataSorting&&A(r.options.dataSorting,e.dataSorting),this.setData(e.data,!1))),e=j(o,c,{index:void 0===o.index?r.index:o.index,pointStart:D(a&&a.series&&a.series.pointStart,o.pointStart,r.xData[0])},!p&&{data:r.options.data},e),p&&e.data&&(e.data=r.options.data),(d=["group","markerGroup","dataLabelsGroup","transformGroup"].concat(d)).forEach((function(e){d[e]=r[e],delete r[e]})),a=!1,b[h]){if(a=h!==r.type,r.remove(!1,!1,!1,!0),a)if(Object.setPrototypeOf)Object.setPrototypeOf(r,b[h].prototype);else{for(n in c=Object.hasOwnProperty.call(r,"hcEvents")&&r.hcEvents,l)r[n]=void 0;A(r,b[h].prototype),c?r.hcEvents=c:delete r.hcEvents}}else E(17,!0,i,{missingModuleFor:h});if(d.forEach((function(e){r[e]=d[e]})),r.init(i,e),p&&this.points){var f=r.options;!1===f.visible?(u.graphic=1,u.dataLabel=1):r._hasPointLabels||(e=f.marker,l=f.dataLabels,!e||!1!==e.enabled&&(o.marker&&o.marker.symbol)===e.symbol||(u.graphic=1),l&&!1===l.enabled&&(u.dataLabel=1)),this.points.forEach((function(e){e&&e.series&&(e.resolveColor(),Object.keys(u).length&&e.destroyElements(u),!1===f.showInLegend&&e.legendItem&&i.legend.destroyItem(e))}),this)}r.initialType=s,i.linkSeries(),a&&r.linkedSeries.length&&(r.isDirtyData=!0),C(this,"afterUpdate"),D(t,!0)&&i.redraw(!!p&&void 0)},e.prototype.setName=function(e){this.name=this.options.name=this.userOptions.name=e,this.chart.isDirtyLegend=!0},e.prototype.hasOptionChanged=function(e){var t=this.options[e],n=this.chart.options.plotOptions,r=this.userOptions[e];return r?t!==r:t!==D(n&&n[this.type]&&n[this.type][e],n&&n.series&&n.series[e],t)},e.prototype.onMouseOver=function(){var e=this.chart,t=e.hoverSeries;e.pointer.setHoverChartIndex(),t&&t!==this&&t.onMouseOut(),this.options.events.mouseOver&&C(this,"mouseOver"),this.setState("hover"),e.hoverSeries=this},e.prototype.onMouseOut=function(){var e=this.options,t=this.chart,n=t.tooltip,r=t.hoverPoint;t.hoverSeries=null,r&&r.onMouseOut(),this&&e.events.mouseOut&&C(this,"mouseOut"),!n||this.stickyTracking||n.shared&&!this.noSharedTooltip||n.hide(),t.series.forEach((function(e){e.setState("",!0)}))},e.prototype.setState=function(e,t){var n=this,r=n.options,i=n.graph,o=r.inactiveOtherPoints,s=r.states,a=D(s[e||"normal"]&&s[e||"normal"].animation,n.chart.options.chart.animation),l=r.lineWidth,c=0,u=r.opacity;if(e=e||"",n.state!==e&&([n.group,n.markerGroup,n.dataLabelsGroup].forEach((function(t){t&&(n.state&&t.removeClass("highcharts-series-"+n.state),e&&t.addClass("highcharts-series-"+e))})),n.state=e,!n.chart.styledMode)){if(s[e]&&!1===s[e].enabled)return;if(e&&(l=s[e].lineWidth||l+(s[e].lineWidthPlus||0),u=D(s[e].opacity,u)),i&&!i.dashstyle)for(r={"stroke-width":l},i.animate(r,a);n["zone-graph-"+c];)n["zone-graph-"+c].animate(r,a),c+=1;o||[n.group,n.markerGroup,n.dataLabelsGroup,n.labelBySeries].forEach((function(e){e&&e.animate({opacity:u},a)}))}t&&o&&n.points&&n.setAllPointsToState(e||void 0)},e.prototype.setAllPointsToState=function(e){this.points.forEach((function(t){t.setState&&t.setState(e)}))},e.prototype.setVisible=function(e,t){var n=this,r=n.chart,i=n.legendItem,o=r.options.chart.ignoreHiddenSeries,s=n.visible,a=(n.visible=e=n.options.visible=n.userOptions.visible=void 0===e?!s:e)?"show":"hide";["group","dataLabelsGroup","markerGroup","tracker","tt"].forEach((function(e){n[e]&&n[e][a]()})),r.hoverSeries!==n&&(r.hoverPoint&&r.hoverPoint.series)!==n||n.onMouseOut(),i&&r.legend.colorizeItem(n,e),n.isDirty=!0,n.options.stacking&&r.series.forEach((function(e){e.options.stacking&&e.visible&&(e.isDirty=!0)})),n.linkedSeries.forEach((function(t){t.setVisible(e,!1)})),o&&(r.isDirtyBox=!0),C(n,a),!1!==t&&r.redraw()},e.prototype.show=function(){this.setVisible(!0)},e.prototype.hide=function(){this.setVisible(!1)},e.prototype.select=function(e){this.selected=e=this.options.selected=void 0===e?!this.selected:e,this.checkbox&&(this.checkbox.checked=e),C(this,e?"select":"unselect")},e.prototype.shouldShowTooltip=function(e,t,n){return void 0===n&&(n={}),n.series=this,n.visiblePlotOnly=!0,this.chart.isInsidePlot(e,t,n)},e.defaultOptions=s,e}(),A(e.prototype,{axisTypes:["xAxis","yAxis"],coll:"series",colorCounter:0,cropShoulder:1,directTouch:!1,drawLegendSymbol:i.drawLineMarker,isCartesian:!0,kdAxisArray:["clientX","plotY"],parallelArrays:["x","y"],pointClass:o,requireSorting:!0,sorted:!0}),a.series=e,e})),t(n,"Extensions/ScrollablePlotArea.js",[n["Core/Animation/AnimationUtilities.js"],n["Core/Axis/Axis.js"],n["Core/Chart/Chart.js"],n["Core/Series/Series.js"],n["Core/Renderer/RendererRegistry.js"],n["Core/Utilities.js"]],(function(e,t,n,r,i,o){var s=e.stop,a=o.addEvent,l=o.createElement,c=o.merge,u=o.pick;a(n,"afterSetChartSize",(function(e){var n=this.options.chart.scrollablePlotArea,r=n&&n.minWidth;if(n=n&&n.minHeight,!this.renderer.forExport){if(r){if(this.scrollablePixelsX=r=Math.max(0,r-this.chartWidth)){this.scrollablePlotBox=this.renderer.scrollablePlotBox=c(this.plotBox),this.plotBox.width=this.plotWidth+=r,this.inverted?this.clipBox.height+=r:this.clipBox.width+=r;var i={1:{name:"right",value:r}}}}else n&&(this.scrollablePixelsY=r=Math.max(0,n-this.chartHeight))&&(this.scrollablePlotBox=this.renderer.scrollablePlotBox=c(this.plotBox),this.plotBox.height=this.plotHeight+=r,this.inverted?this.clipBox.width+=r:this.clipBox.height+=r,i={2:{name:"bottom",value:r}});i&&!e.skipAxes&&this.axes.forEach((function(e){i[e.side]?e.getPlotLinePath=function(){var n=i[e.side].name,r=this[n];this[n]=r-i[e.side].value;var o=t.prototype.getPlotLinePath.apply(this,arguments);return this[n]=r,o}:(e.setAxisSize(),e.setAxisTranslation())}))}})),a(n,"render",(function(){this.scrollablePixelsX||this.scrollablePixelsY?(this.setUpScrolling&&this.setUpScrolling(),this.applyFixed()):this.fixedDiv&&this.applyFixed()})),n.prototype.setUpScrolling=function(){var e=this,t={WebkitOverflowScrolling:"touch",overflowX:"hidden",overflowY:"hidden"};this.scrollablePixelsX&&(t.overflowX="auto"),this.scrollablePixelsY&&(t.overflowY="auto"),this.scrollingParent=l("div",{className:"highcharts-scrolling-parent"},{position:"relative"},this.renderTo),this.scrollingContainer=l("div",{className:"highcharts-scrolling"},t,this.scrollingParent),a(this.scrollingContainer,"scroll",(function(){e.pointer&&delete e.pointer.chartPosition})),this.innerContainer=l("div",{className:"highcharts-inner-container"},null,this.scrollingContainer),this.innerContainer.appendChild(this.container),this.setUpScrolling=null},n.prototype.moveFixedElements=function(){var e,t=this.container,n=this.fixedRenderer,r=".highcharts-contextbutton .highcharts-credits .highcharts-legend .highcharts-legend-checkbox .highcharts-navigator-series .highcharts-navigator-xaxis .highcharts-navigator-yaxis .highcharts-navigator .highcharts-reset-zoom .highcharts-drillup-button .highcharts-scrollbar .highcharts-subtitle .highcharts-title".split(" ");this.scrollablePixelsX&&!this.inverted?e=".highcharts-yaxis":this.scrollablePixelsX&&this.inverted||this.scrollablePixelsY&&!this.inverted?e=".highcharts-xaxis":this.scrollablePixelsY&&this.inverted&&(e=".highcharts-yaxis"),e&&r.push(e+":not(.highcharts-radial-axis)",e+"-labels:not(.highcharts-radial-axis-labels)"),r.forEach((function(e){[].forEach.call(t.querySelectorAll(e),(function(e){(e.namespaceURI===n.SVG_NS?n.box:n.box.parentNode).appendChild(e),e.style.pointerEvents="auto"}))}))},n.prototype.applyFixed=function(){var e=!this.fixedDiv,t=this.options.chart,n=t.scrollablePlotArea,r=i.getRendererType();e?(this.fixedDiv=l("div",{className:"highcharts-fixed"},{position:"absolute",overflow:"hidden",pointerEvents:"none",zIndex:(t.style&&t.style.zIndex||0)+2,top:0},null,!0),this.scrollingContainer&&this.scrollingContainer.parentNode.insertBefore(this.fixedDiv,this.scrollingContainer),this.renderTo.style.overflow="visible",this.fixedRenderer=t=new r(this.fixedDiv,this.chartWidth,this.chartHeight,this.options.chart.style),this.scrollableMask=t.path().attr({fill:this.options.chart.backgroundColor||"#fff","fill-opacity":u(n.opacity,.85),zIndex:-1}).addClass("highcharts-scrollable-mask").add(),a(this,"afterShowResetZoom",this.moveFixedElements),a(this,"afterDrilldown",this.moveFixedElements),a(this,"afterLayOutTitles",this.moveFixedElements)):this.fixedRenderer.setSize(this.chartWidth,this.chartHeight),(this.scrollableDirty||e)&&(this.scrollableDirty=!1,this.moveFixedElements()),t=this.chartWidth+(this.scrollablePixelsX||0),r=this.chartHeight+(this.scrollablePixelsY||0),s(this.container),this.container.style.width=t+"px",this.container.style.height=r+"px",this.renderer.boxWrapper.attr({width:t,height:r,viewBox:[0,0,t,r].join(" ")}),this.chartBackground.attr({width:t,height:r}),this.scrollingContainer.style.height=this.chartHeight+"px",e&&(n.scrollPositionX&&(this.scrollingContainer.scrollLeft=this.scrollablePixelsX*n.scrollPositionX),n.scrollPositionY&&(this.scrollingContainer.scrollTop=this.scrollablePixelsY*n.scrollPositionY)),r=this.axisOffset,e=this.plotTop-r[0]-1,n=this.plotLeft-r[3]-1,t=this.plotTop+this.plotHeight+r[2]+1,r=this.plotLeft+this.plotWidth+r[1]+1;var o=this.plotLeft+this.plotWidth-(this.scrollablePixelsX||0),c=this.plotTop+this.plotHeight-(this.scrollablePixelsY||0);e=this.scrollablePixelsX?[["M",0,e],["L",this.plotLeft-1,e],["L",this.plotLeft-1,t],["L",0,t],["Z"],["M",o,e],["L",this.chartWidth,e],["L",this.chartWidth,t],["L",o,t],["Z"]]:this.scrollablePixelsY?[["M",n,0],["L",n,this.plotTop-1],["L",r,this.plotTop-1],["L",r,0],["Z"],["M",n,c],["L",n,this.chartHeight],["L",r,this.chartHeight],["L",r,c],["Z"]]:[["M",0,0]],"adjustHeight"!==this.redrawTrigger&&this.scrollableMask.attr({d:e})},a(t,"afterInit",(function(){this.chart.scrollableDirty=!0})),a(r,"show",(function(){this.chart.scrollableDirty=!0}))})),t(n,"Core/Axis/StackingAxis.js",[n["Core/Animation/AnimationUtilities.js"],n["Core/Axis/Axis.js"],n["Core/Utilities.js"]],(function(e,t,n){var r,i=e.getDeferredAnimation,o=n.addEvent,s=n.destroyObjectProperties,a=n.fireEvent,l=n.isNumber,c=n.objectEach;return function(e){function t(){var e=this.stacking;if(e){var t=e.stacks;c(t,(function(e,n){s(e),t[n]=null})),e&&e.stackTotalGroup&&e.stackTotalGroup.destroy()}}function n(){this.stacking||(this.stacking=new u(this))}var r=[];e.compose=function(e){return-1===r.indexOf(e)&&(r.push(e),o(e,"init",n),o(e,"destroy",t)),e};var u=function(){function e(e){this.oldStacks={},this.stacks={},this.stacksTouched=0,this.axis=e}return e.prototype.buildStacks=function(){var e,t=this.axis,n=t.series,r=t.options.reversedStacks,i=n.length;if(!t.isXAxis){for(this.usePercentage=!1,e=i;e--;){var o=n[r?e:i-e-1];o.setStackedPoints(),o.setGroupedPoints()}for(e=0;e<i;e++)n[e].modifyStacks();a(t,"afterBuildStacks")}},e.prototype.cleanStacks=function(){if(!this.axis.isXAxis){if(this.oldStacks)var e=this.stacks=this.oldStacks;c(e,(function(e){c(e,(function(e){e.cumulative=e.total}))}))}},e.prototype.resetStacks=function(){var e=this,t=e.stacks;e.axis.isXAxis||c(t,(function(t){c(t,(function(n,r){l(n.touched)&&n.touched<e.stacksTouched?(n.destroy(),delete t[r]):(n.total=null,n.cumulative=null)}))}))},e.prototype.renderStackTotals=function(){var e=this.axis,t=e.chart,n=t.renderer,r=this.stacks;e=i(t,e.options.stackLabels&&e.options.stackLabels.animation||!1);var o=this.stackTotalGroup=this.stackTotalGroup||n.g("stack-labels").attr({visibility:"visible",zIndex:6,opacity:0}).add();o.translate(t.plotLeft,t.plotTop),c(r,(function(e){c(e,(function(e){e.render(o)}))})),o.animate({opacity:1},e)},e}();e.Additions=u}(r||(r={})),r})),t(n,"Extensions/Stacking.js",[n["Core/Axis/Axis.js"],n["Core/Chart/Chart.js"],n["Core/FormatUtilities.js"],n["Core/Globals.js"],n["Core/Series/Series.js"],n["Core/Axis/StackingAxis.js"],n["Core/Utilities.js"]],(function(e,t,n,r,i,o,s){var a=n.format,l=s.correctFloat,c=s.defined,u=s.destroyObjectProperties,d=s.isArray,h=s.isNumber,p=s.objectEach,f=s.pick,m=function(){function e(e,t,n,r,i){var o=e.chart.inverted;this.axis=e,this.isNegative=n,this.options=t=t||{},this.x=r,this.total=null,this.points={},this.hasValidPoints=!1,this.stack=i,this.rightCliff=this.leftCliff=0,this.alignOptions={align:t.align||(o?n?"left":"right":"center"),verticalAlign:t.verticalAlign||(o?"middle":n?"bottom":"top"),y:t.y,x:t.x},this.textAlign=t.textAlign||(o?n?"right":"left":"center")}return e.prototype.destroy=function(){u(this,this.axis)},e.prototype.render=function(e){var t=this.axis.chart,n=this.options,r=n.format;r=r?a(r,this,t):n.formatter.call(this),this.label?this.label.attr({text:r,visibility:"hidden"}):(this.label=t.renderer.label(r,null,null,n.shape,null,null,n.useHTML,!1,"stack-labels"),r={r:n.borderRadius||0,text:r,rotation:n.rotation,padding:f(n.padding,5),visibility:"hidden"},t.styledMode||(r.fill=n.backgroundColor,r.stroke=n.borderColor,r["stroke-width"]=n.borderWidth,this.label.css(n.style)),this.label.attr(r),this.label.added||this.label.add(e)),this.label.labelrank=t.plotSizeY},e.prototype.setOffset=function(e,t,n,r,o){var s=this.axis,a=s.chart;r=s.translate(s.stacking.usePercentage?100:r||this.total,0,0,0,1),n=s.translate(n||0),n=c(r)&&Math.abs(r-n),e=f(o,a.xAxis[0].translate(this.x))+e,s=c(r)&&this.getStackBox(a,this,e,r,t,n,s),t=this.label,n=this.isNegative,e="justify"===f(this.options.overflow,"justify");var l=this.textAlign;t&&s&&(o=t.getBBox(),r=t.padding,l="left"===l?a.inverted?-r:r:"right"===l?o.width:a.inverted&&"center"===l?o.width/2:a.inverted?n?o.width+r:-r:o.width/2,n=a.inverted?o.height/2:n?-r:o.height,this.alignOptions.x=f(this.options.x,0),this.alignOptions.y=f(this.options.y,0),s.x-=l,s.y-=n,t.align(this.alignOptions,null,s),a.isInsidePlot(t.alignAttr.x+l-this.alignOptions.x,t.alignAttr.y+n-this.alignOptions.y)?t.show():(t.alignAttr.y=-9999,e=!1),e&&i.prototype.justifyDataLabel.call(this.axis,t,this.alignOptions,t.alignAttr,o,s),t.attr({x:t.alignAttr.x,y:t.alignAttr.y}),f(!e&&this.options.crop,!0)&&((a=h(t.x)&&h(t.y)&&a.isInsidePlot(t.x-r+t.width,t.y)&&a.isInsidePlot(t.x+r,t.y))||t.hide()))},e.prototype.getStackBox=function(e,t,n,r,i,o,s){var a=t.axis.reversed,l=e.inverted,c=s.height+s.pos-(l?e.plotLeft:e.plotTop);return t=t.isNegative&&!a||!t.isNegative&&a,{x:l?t?r-s.right:r-o+s.pos-e.plotLeft:n+e.xAxis[0].transB-e.plotLeft,y:l?s.height-n-i:t?c-r-o:c-r,width:l?o:i,height:l?i:o}},e}();return t.prototype.getStacks=function(){var e=this,t=e.inverted;e.yAxis.forEach((function(e){e.stacking&&e.stacking.stacks&&e.hasVisibleSeries&&(e.stacking.oldStacks=e.stacking.stacks)})),e.series.forEach((function(n){var r=n.xAxis&&n.xAxis.options||{};!n.options.stacking||!0!==n.visible&&!1!==e.options.chart.ignoreHiddenSeries||(n.stackKey=[n.type,f(n.options.stack,""),t?r.top:r.left,t?r.height:r.width].join())}))},o.compose(e),i.prototype.setGroupedPoints=function(){var e=this.yAxis.stacking;this.options.centerInCategory&&(this.is("column")||this.is("columnrange"))&&!this.options.stacking&&1<this.chart.series.length?i.prototype.setStackedPoints.call(this,"group"):e&&p(e.stacks,(function(t,n){"group"===n.slice(-5)&&(p(t,(function(e){return e.destroy()})),delete e.stacks[n])}))},i.prototype.setStackedPoints=function(e){var t=e||this.options.stacking;if(t&&(!0===this.visible||!1===this.chart.options.chart.ignoreHiddenSeries)){var n=this.processedXData,r=this.processedYData,i=[],o=r.length,s=this.options,a=s.threshold,u=f(s.startFromThreshold&&a,0);s=s.stack;var h,p,g="-"+(e=e?this.type+","+t:this.stackKey),b=this.negStacks,v=this.yAxis,y=v.stacking.stacks,S=v.stacking.oldStacks;for(v.stacking.stacksTouched+=1,p=0;p<o;p++){var _=n[p],x=r[p],w=this.getStackIndicator(w,_,this.index),k=w.key,O=(h=b&&x<(u?0:a))?g:e;y[O]||(y[O]={}),y[O][_]||(S[O]&&S[O][_]?(y[O][_]=S[O][_],y[O][_].total=null):y[O][_]=new m(v,v.options.stackLabels,h,_,s)),O=y[O][_],null!==x?(O.points[k]=O.points[this.index]=[f(O.cumulative,u)],c(O.cumulative)||(O.base=k),O.touched=v.stacking.stacksTouched,0<w.index&&!1===this.singleStacks&&(O.points[k][0]=O.points[this.index+","+_+",0"][0])):O.points[k]=O.points[this.index]=null,"percent"===t?(h=h?e:g,b&&y[h]&&y[h][_]?(h=y[h][_],O.total=h.total=Math.max(h.total,O.total)+Math.abs(x)||0):O.total=l(O.total+(Math.abs(x)||0))):"group"===t?(d(x)&&(x=x[0]),null!==x&&(O.total=(O.total||0)+1)):O.total=l(O.total+(x||0)),O.cumulative="group"===t?(O.total||1)-1:f(O.cumulative,u)+(x||0),null!==x&&(O.points[k].push(O.cumulative),i[p]=O.cumulative,O.hasValidPoints=!0)}"percent"===t&&(v.stacking.usePercentage=!0),"group"!==t&&(this.stackedYData=i),v.stacking.oldStacks={}}},i.prototype.modifyStacks=function(){var e,t=this,n=t.stackKey,r=t.yAxis.stacking.stacks,i=t.processedXData,o=t.options.stacking;t[o+"Stacker"]&&[n,"-"+n].forEach((function(n){for(var s,a,l=i.length;l--;)s=i[l],e=t.getStackIndicator(e,s,t.index,n),(a=(s=r[n]&&r[n][s])&&s.points[e.key])&&t[o+"Stacker"](a,s,l)}))},i.prototype.percentStacker=function(e,t,n){t=t.total?100/t.total:0,e[0]=l(e[0]*t),e[1]=l(e[1]*t),this.stackedYData[n]=e[1]},i.prototype.getStackIndicator=function(e,t,n,r){return!c(e)||e.x!==t||r&&e.key!==r?e={x:t,index:0,key:r}:e.index++,e.key=[n,t,e.index].join(),e},r.StackItem=m,r.StackItem})),t(n,"Series/Line/LineSeries.js",[n["Core/Series/Series.js"],n["Core/Series/SeriesRegistry.js"],n["Core/Utilities.js"]],(function(e,t,n){var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=n.defined,o=n.merge;return n=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.data=void 0,e.options=void 0,e.points=void 0,e}return r(n,t),n.prototype.drawGraph=function(){var e=this,t=this.options,n=(this.gappedPath||this.getGraphPath).call(this),r=this.chart.styledMode,i=[["graph","highcharts-graph"]];r||i[0].push(t.lineColor||this.color||"#cccccc",t.dashStyle),(i=e.getZonesGraphs(i)).forEach((function(i,o){var s=i[0],a=e[s],l=a?"animate":"attr";a?(a.endX=e.preventGraphAnimation?null:n.xMap,a.animate({d:n})):n.length&&(e[s]=a=e.chart.renderer.path(n).addClass(i[1]).attr({zIndex:1}).add(e.group)),a&&!r&&(s={stroke:i[2],"stroke-width":t.lineWidth,fill:e.fillGraph&&e.color||"none"},i[3]?s.dashstyle=i[3]:"square"!==t.linecap&&(s["stroke-linecap"]=s["stroke-linejoin"]="round"),a[l](s).shadow(2>o&&t.shadow)),a&&(a.startX=n.xMap,a.isArea=n.isArea)}))},n.prototype.getGraphPath=function(e,t,n){var r,o=this,s=o.options,a=[],l=[],c=s.step,u=(e=e||o.points).reversed;return u&&e.reverse(),(c={right:1,center:2}[c]||c&&3)&&u&&(c=4-c),(e=this.getValidPoints(e,!1,!(s.connectNulls&&!t&&!n))).forEach((function(u,d){var h=u.plotX,p=u.plotY,f=e[d-1];(u.leftCliff||f&&f.rightCliff)&&!n&&(r=!0),u.isNull&&!i(t)&&0<d?r=!s.connectNulls:u.isNull&&!t?r=!0:(0===d||r?d=[["M",u.plotX,u.plotY]]:o.getPointSpline?d=[o.getPointSpline(e,u,d)]:c?(d=1===c?[["L",f.plotX,p]]:2===c?[["L",(f.plotX+h)/2,f.plotY],["L",(f.plotX+h)/2,p]]:[["L",h,f.plotY]]).push(["L",h,p]):d=[["L",h,p]],l.push(u.x),c&&(l.push(u.x),2===c&&l.push(u.x)),a.push.apply(a,d),r=!1)})),a.xMap=l,o.graphPath=a},n.prototype.getZonesGraphs=function(e){return this.zones.forEach((function(t,n){n=["zone-graph-"+n,"highcharts-graph highcharts-zone-graph-"+n+" "+(t.className||"")],this.chart.styledMode||n.push(t.color||this.color,t.dashStyle||this.options.dashStyle),e.push(n)}),this),e},n.defaultOptions=o(e.defaultOptions,{}),n}(e),t.registerSeriesType("line",n),n})),t(n,"Series/Area/AreaSeries.js",[n["Core/Color/Color.js"],n["Core/Legend/LegendSymbol.js"],n["Core/Series/SeriesRegistry.js"],n["Core/Utilities.js"]],(function(e,t,n,r){var i=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=e.parse,s=n.seriesTypes.line;e=r.extend;var a=r.merge,l=r.objectEach,c=r.pick;return r=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.data=void 0,t.options=void 0,t.points=void 0,t}return i(t,e),t.prototype.drawGraph=function(){this.areaPath=[],e.prototype.drawGraph.apply(this);var t=this,n=this.areaPath,r=this.options,i=[["area","highcharts-area",this.color,r.fillColor]];this.zones.forEach((function(e,n){i.push(["zone-area-"+n,"highcharts-area highcharts-zone-area-"+n+" "+e.className,e.color||t.color,e.fillColor||r.fillColor])})),i.forEach((function(e){var i=e[0],s=t[i],a=s?"animate":"attr",l={};s?(s.endX=t.preventGraphAnimation?null:n.xMap,s.animate({d:n})):(l.zIndex=0,(s=t[i]=t.chart.renderer.path(n).addClass(e[1]).add(t.group)).isArea=!0),t.chart.styledMode||(l.fill=c(e[3],o(e[2]).setOpacity(c(r.fillOpacity,.75)).get())),s[a](l),s.startX=n.xMap,s.shiftUnit=r.step?2:1}))},t.prototype.getGraphPath=function(e){var t,n=s.prototype.getGraphPath,r=this.options,i=r.stacking,o=this.yAxis,a=[],l=[],u=this.index,d=o.stacking.stacks[this.stackKey],h=r.threshold,p=Math.round(o.getThreshold(r.threshold));r=c(r.connectNulls,"percent"===i);var f=function(t,n,r){var s=e[t];t=i&&d[s.x].points[u];var c=s[r+"Null"]||0;if(r=s[r+"Cliff"]||0,s=!0,r||c){var f=(c?t[0]:t[1])+r,m=t[0]+r;s=!!c}else!i&&e[n]&&e[n].isNull&&(f=m=h);void 0!==f&&(l.push({plotX:g,plotY:null===f?p:o.getThreshold(f),isNull:s,isCliff:!0}),a.push({plotX:g,plotY:null===m?p:o.getThreshold(m),doCurve:!1}))};for(e=e||this.points,i&&(e=this.getStackPoints(e)),t=0;t<e.length;t++){i||(e[t].leftCliff=e[t].rightCliff=e[t].leftNull=e[t].rightNull=void 0);var m=e[t].isNull,g=c(e[t].rectPlotX,e[t].plotX),b=i?c(e[t].yBottom,p):p;m&&!r||(r||f(t,t-1,"left"),m&&!i&&r||(l.push(e[t]),a.push({x:t,plotX:g,plotY:b})),r||f(t,t+1,"right"))}return t=n.call(this,l,!0,!0),a.reversed=!0,(b=(m=n.call(this,a,!0,!0))[0])&&"M"===b[0]&&(m[0]=["L",b[1],b[2]]),(m=t.concat(m)).length&&m.push(["Z"]),n=n.call(this,l,!1,r),m.xMap=t.xMap,this.areaPath=m,n},t.prototype.getStackPoints=function(e){var t=this,n=[],r=[],i=this.xAxis,o=this.yAxis,s=o.stacking.stacks[this.stackKey],a={},u=o.series,d=u.length,h=o.options.reversedStacks?1:-1,p=u.indexOf(t);if(e=e||this.points,this.options.stacking){for(var f=0;f<e.length;f++)e[f].leftNull=e[f].rightNull=void 0,a[e[f].x]=e[f];l(s,(function(e,t){null!==e.total&&r.push(t)})),r.sort((function(e,t){return e-t}));var m=u.map((function(e){return e.visible}));r.forEach((function(e,l){var f,g,b=0;if(a[e]&&!a[e].isNull)n.push(a[e]),[-1,1].forEach((function(n){var i=1===n?"rightNull":"leftNull",o=0,c=s[r[l+n]];if(c)for(var b=p;0<=b&&b<d;){var v=u[b].index;(f=c.points[v])||(v===t.index?a[e][i]=!0:m[b]&&(g=s[e].points[v])&&(o-=g[1]-g[0])),b+=h}a[e][1===n?"rightCliff":"leftCliff"]=o}));else{for(var v=p;0<=v&&v<d;){if(f=s[e].points[u[v].index]){b=f[1];break}v+=h}b=c(b,0),b=o.translate(b,0,1,0,1),n.push({isNull:!0,plotX:i.translate(e,0,0,0,1),x:e,plotY:b,yBottom:b})}}))}return n},t.defaultOptions=a(s.defaultOptions,{threshold:0}),t}(s),e(r.prototype,{singleStacks:!1,drawLegendSymbol:t.drawRectangle}),n.registerSeriesType("area",r),r})),t(n,"Series/Spline/SplineSeries.js",[n["Core/Series/SeriesRegistry.js"],n["Core/Utilities.js"]],(function(e,t){var n=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),r=e.seriesTypes.line,i=t.merge,o=t.pick;return t=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.data=void 0,t.options=void 0,t.points=void 0,t}return n(t,e),t.prototype.getPointSpline=function(e,t,n){var r=t.plotX||0,i=t.plotY||0,s=e[n-1];if(n=e[n+1],s&&!s.isNull&&!1!==s.doCurve&&!t.isCliff&&n&&!n.isNull&&!1!==n.doCurve&&!t.isCliff){e=s.plotY||0;var a=n.plotX||0;n=n.plotY||0;var l=0,c=(1.5*r+(s.plotX||0))/2.5,u=(1.5*i+e)/2.5,d=(1.5*i+n)/2.5;(a=(1.5*r+a)/2.5)!==c&&(l=(d-u)*(a-r)/(a-c)+i-d),d+=l,(u+=l)>e&&u>i?d=2*i-(u=Math.max(e,i)):u<e&&u<i&&(d=2*i-(u=Math.min(e,i))),d>n&&d>i?u=2*i-(d=Math.max(n,i)):d<n&&d<i&&(u=2*i-(d=Math.min(n,i))),t.rightContX=a,t.rightContY=d}return t=["C",o(s.rightContX,s.plotX,0),o(s.rightContY,s.plotY,0),o(c,r,0),o(u,i,0),r,i],s.rightContX=s.rightContY=void 0,t},t.defaultOptions=i(r.defaultOptions),t}(r),e.registerSeriesType("spline",t),t})),t(n,"Series/AreaSpline/AreaSplineSeries.js",[n["Series/Area/AreaSeries.js"],n["Series/Spline/SplineSeries.js"],n["Core/Legend/LegendSymbol.js"],n["Core/Series/SeriesRegistry.js"],n["Core/Utilities.js"]],(function(e,t,n,r,i){var o=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),s=e.prototype,a=i.extend,l=i.merge;return a((i=function(n){function r(){var e=null!==n&&n.apply(this,arguments)||this;return e.data=void 0,e.points=void 0,e.options=void 0,e}return o(r,n),r.defaultOptions=l(t.defaultOptions,e.defaultOptions),r}(t)).prototype,{getGraphPath:s.getGraphPath,getStackPoints:s.getStackPoints,drawGraph:s.drawGraph,drawLegendSymbol:n.drawRectangle}),r.registerSeriesType("areaspline",i),i})),t(n,"Series/Column/ColumnSeries.js",[n["Core/Animation/AnimationUtilities.js"],n["Core/Color/Color.js"],n["Core/Globals.js"],n["Core/Legend/LegendSymbol.js"],n["Core/Series/Series.js"],n["Core/Series/SeriesRegistry.js"],n["Core/Utilities.js"]],(function(e,t,n,r,i,o,s){var a=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),l=e.animObject,c=t.parse,u=n.hasTouch;e=n.noop;var d=s.clamp,h=s.css,p=s.defined,f=s.extend,m=s.fireEvent,g=s.isArray,b=s.isNumber,v=s.merge,y=s.pick,S=s.objectEach;return s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.borderWidth=void 0,t.data=void 0,t.group=void 0,t.options=void 0,t.points=void 0,t}return a(t,e),t.prototype.animate=function(e){var t=this,n=this.yAxis,r=t.options,i=this.chart.inverted,o={},s=i?"translateX":"translateY";if(e)o.scaleY=.001,e=d(n.toPixels(r.threshold),n.pos,n.pos+n.len),i?o.translateX=e-n.len:o.translateY=e,t.clipBox&&t.setClip(),t.group.attr(o);else{var a=Number(t.group.attr(s));t.group.animate({scaleY:1},f(l(t.options.animation),{step:function(e,r){t.group&&(o[s]=a+r.pos*(n.pos-a),t.group.attr(o))}}))}},t.prototype.init=function(t,n){e.prototype.init.apply(this,arguments);var r=this;(t=r.chart).hasRendered&&t.series.forEach((function(e){e.type===r.type&&(e.isDirty=!0)}))},t.prototype.getColumnMetrics=function(){var e=this,t=e.options,n=e.xAxis,r=e.yAxis,i=n.options.reversedStacks;i=n.reversed&&!i||!n.reversed&&i;var o,s={},a=0;!1===t.grouping?a=1:e.chart.series.forEach((function(t){var n=t.yAxis,i=t.options;if(t.type===e.type&&(t.visible||!e.chart.options.chart.ignoreHiddenSeries)&&r.len===n.len&&r.pos===n.pos){if(i.stacking&&"group"!==i.stacking){o=t.stackKey,void 0===s[o]&&(s[o]=a++);var l=s[o]}else!1!==i.grouping&&(l=a++);t.columnIndex=l}}));var l=Math.min(Math.abs(n.transA)*(n.ordinal&&n.ordinal.slope||t.pointRange||n.closestPointRange||n.tickInterval||1),n.len),c=l*t.groupPadding,u=(l-2*c)/(a||1);return t=Math.min(t.maxPointWidth||n.len,y(t.pointWidth,u*(1-2*t.pointPadding))),e.columnMetrics={width:t,offset:(u-t)/2+(c+((e.columnIndex||0)+(i?1:0))*u-l/2)*(i?-1:1),paddedWidth:u,columnCount:a},e.columnMetrics},t.prototype.crispCol=function(e,t,n,r){var i=this.chart,o=this.borderWidth,s=-(o%2?.5:0);return o=o%2?.5:1,i.inverted&&i.renderer.isVML&&(o+=1),this.options.crisp&&(n=Math.round(e+n)+s,n-=e=Math.round(e)+s),r=Math.round(t+r)+o,s=.5>=Math.abs(t)&&.5<r,r-=t=Math.round(t)+o,s&&r&&(--t,r+=1),{x:e,y:t,width:n,height:r}},t.prototype.adjustForMissingColumns=function(e,t,n,r){var i=this,o=this.options.stacking;if(!n.isNull&&1<r.columnCount){var s=0,a=0;S(this.yAxis.stacking&&this.yAxis.stacking.stacks,(function(e){if("number"==typeof n.x&&(e=e[n.x.toString()])){var t=e.points[i.index],r=e.total;o?(t&&(s=a),e.hasValidPoints&&a++):g(t)&&(s=t[1],a=r||0)}})),e=(n.plotX||0)+((a-1)*r.paddedWidth+t)/2-t-s*r.paddedWidth}return e},t.prototype.translate=function(){var e=this,t=e.chart,n=e.options,r=e.dense=2>e.closestPointRange*e.xAxis.transA;r=e.borderWidth=y(n.borderWidth,r?0:1);var o=e.xAxis,s=e.yAxis,a=n.threshold,l=e.translatedThreshold=s.getThreshold(a),c=y(n.minPointLength,5),u=e.getColumnMetrics(),h=u.width,f=e.pointXOffset=u.offset,m=e.dataMin,g=e.dataMax,v=e.barW=Math.max(h,1+2*r);t.inverted&&(l-=.5),n.pointPadding&&(v=Math.ceil(v)),i.prototype.translate.apply(e),e.points.forEach((function(r){var i=y(r.yBottom,l),S=999+Math.abs(i),_=r.plotX||0;S=d(r.plotY,-S,s.len+S);var x=Math.min(S,i),w=Math.max(S,i)-x,k=h,O=_+f,E=v;c&&Math.abs(w)<c&&(w=c,_=!s.reversed&&!r.negative||s.reversed&&r.negative,b(a)&&b(g)&&r.y===a&&g<=a&&(s.min||0)<a&&(m!==g||(s.max||0)<=a)&&(_=!_),x=Math.abs(x-l)>c?i-c:l-(_?c:0)),p(r.options.pointWidth)&&(k=E=Math.ceil(r.options.pointWidth),O-=Math.round((k-h)/2)),n.centerInCategory&&(O=e.adjustForMissingColumns(O,k,r,u)),r.barX=O,r.pointWidth=k,r.tooltipPos=t.inverted?[d(s.len+s.pos-t.plotLeft-S,s.pos-t.plotLeft,s.len+s.pos-t.plotLeft),o.len+o.pos-t.plotTop-O-E/2,w]:[o.left-t.plotLeft+O+E/2,d(S+s.pos-t.plotTop,s.pos-t.plotTop,s.len+s.pos-t.plotTop),w],r.shapeType=e.pointClass.prototype.shapeType||"rect",r.shapeArgs=e.crispCol.apply(e,r.isNull?[O,l,E,0]:[O,x,E,w])}))},t.prototype.drawGraph=function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},t.prototype.pointAttribs=function(e,t){var n=this.options,r=this.pointAttrToOptions||{},i=r.stroke||"borderColor",o=r["stroke-width"]||"borderWidth",s=e&&e.color||this.color,a=e&&e[i]||n[i]||s;r=e&&e.options.dashStyle||n.dashStyle;var l=e&&e[o]||n[o]||this[o]||0,u=y(e&&e.opacity,n.opacity,1);if(e&&this.zones.length){var d=e.getZone();s=e.options.color||d&&(d.color||e.nonZonedColor)||this.color,d&&(a=d.borderColor||a,r=d.dashStyle||r,l=d.borderWidth||l)}return t&&e&&(t=(e=v(n.states[t],e.options.states&&e.options.states[t]||{})).brightness,s=e.color||void 0!==t&&c(s).brighten(e.brightness).get()||s,a=e[i]||a,l=e[o]||l,r=e.dashStyle||r,u=y(e.opacity,u)),i={fill:s,stroke:a,"stroke-width":l,opacity:u},r&&(i.dashstyle=r),i},t.prototype.drawPoints=function(){var e,t=this,n=this.chart,r=t.options,i=n.renderer,o=r.animationLimit||250;t.points.forEach((function(s){var a=s.graphic,l=!!a,c=a&&n.pointCount<o?"animate":"attr";b(s.plotY)&&null!==s.y?(e=s.shapeArgs,a&&s.hasNewShapeType()&&(a=a.destroy()),t.enabledDataSorting&&(s.startXPos=t.xAxis.reversed?-(e&&e.width||0):t.xAxis.width),a||(s.graphic=a=i[s.shapeType](e).add(s.group||t.group))&&t.enabledDataSorting&&n.hasRendered&&n.pointCount<o&&(a.attr({x:s.startXPos}),l=!0,c="animate"),a&&l&&a[c](v(e)),r.borderRadius&&a[c]({r:r.borderRadius}),n.styledMode||a[c](t.pointAttribs(s,s.selected&&"select")).shadow(!1!==s.allowShadow&&r.shadow,null,r.stacking&&!r.borderRadius),a&&(a.addClass(s.getClassName(),!0),a.attr({visibility:s.visible?"inherit":"hidden"}))):a&&(s.graphic=a.destroy())}))},t.prototype.drawTracker=function(){var e,t=this,n=t.chart,r=n.pointer,i=function(e){var t=r.getPointFromEvent(e);void 0!==t&&(r.isDirectTouch=!0,t.onMouseOver(e))};t.points.forEach((function(t){e=g(t.dataLabels)?t.dataLabels:t.dataLabel?[t.dataLabel]:[],t.graphic&&(t.graphic.element.point=t),e.forEach((function(e){e.div?e.div.point=t:e.element.point=t}))})),t._hasTracking||(t.trackerGroups.forEach((function(e){t[e]&&(t[e].addClass("highcharts-tracker").on("mouseover",i).on("mouseout",(function(e){r.onTrackerMouseOut(e)})),u&&t[e].on("touchstart",i),!n.styledMode&&t.options.cursor&&t[e].css(h).css({cursor:t.options.cursor}))})),t._hasTracking=!0),m(this,"afterDrawTracker")},t.prototype.remove=function(){var e=this,t=e.chart;t.hasRendered&&t.series.forEach((function(t){t.type===e.type&&(t.isDirty=!0)})),i.prototype.remove.apply(e,arguments)},t.defaultOptions=v(i.defaultOptions,{borderRadius:0,centerInCategory:!1,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{halo:!1,brightness:.1},select:{color:"#cccccc",borderColor:"#000000"}},dataLabels:{align:void 0,verticalAlign:void 0,y:void 0},startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},threshold:0,borderColor:"#ffffff"}),t}(i),f(s.prototype,{cropShoulder:0,directTouch:!0,drawLegendSymbol:r.drawRectangle,getSymbol:e,negStacks:!0,trackerGroups:["group","dataLabelsGroup"]}),o.registerSeriesType("column",s),s})),t(n,"Core/Series/DataLabel.js",[n["Core/Animation/AnimationUtilities.js"],n["Core/FormatUtilities.js"],n["Core/Utilities.js"]],(function(e,t,n){var r,i=e.getDeferredAnimation,o=t.format,s=n.defined,a=n.extend,l=n.fireEvent,c=n.isArray,u=n.merge,d=n.objectEach,h=n.pick,p=n.splat;return function(e){function t(e,t,n,r,i){var o=this,s=this.chart,l=this.isCartesian&&s.inverted,c=this.enabledDataSorting,u=h(e.dlBox&&e.dlBox.centerX,e.plotX,-9999),d=h(e.plotY,-9999),p=t.getBBox(),f=n.rotation,m=n.align,g=s.isInsidePlot(u,Math.round(d),{inverted:l,paneCoordinates:!0,series:o}),b=function(n){c&&o.xAxis&&!v&&o.setDataLabelStartPos(e,t,i,g,n)},v="justify"===h(n.overflow,c?"none":"justify"),y=this.visible&&!1!==e.visible&&(e.series.forceDL||c&&!v||g||h(n.inside,!!this.options.stacking)&&r&&s.isInsidePlot(u,l?r.x+1:r.y+r.height-1,{inverted:l,paneCoordinates:!0,series:o}));if(y){var S=s.renderer.fontMetrics(s.styledMode?void 0:n.style.fontSize,t).b;r=a({x:l?this.yAxis.len-d:u,y:Math.round(l?this.xAxis.len-u:d),width:0,height:0},r),a(n,{width:p.width,height:p.height}),f?(v=!1,u=s.renderer.rotCorr(S,f),b(u={x:r.x+(n.x||0)+r.width/2+u.x,y:r.y+(n.y||0)+{top:0,middle:.5,bottom:1}[n.verticalAlign]*r.height}),t[i?"attr":"animate"](u).attr({align:m}),b=180<(b=(f+720)%360)&&360>b,"left"===m?u.y-=b?p.height:0:"center"===m?(u.x-=p.width/2,u.y-=p.height/2):"right"===m&&(u.x-=p.width,u.y-=b?0:p.height),t.placed=!0,t.alignAttr=u):(b(r),t.align(n,void 0,r),u=t.alignAttr),v&&0<=r.height?this.justifyDataLabel(t,n,u,p,r,i):h(n.crop,!0)&&(y=s.isInsidePlot(u.x,u.y,{paneCoordinates:!0,series:o})&&s.isInsidePlot(u.x+p.width,u.y+p.height,{paneCoordinates:!0,series:o})),n.shape&&!f&&t[i?"attr":"animate"]({anchorX:l?s.plotWidth-e.plotY:e.plotX,anchorY:l?s.plotHeight-e.plotX:e.plotY})}i&&c&&(t.placed=!1),y||c&&!v||(t.hide(!0),t.placed=!1)}function n(){var e=this,t=e.chart,n=e.options,r=e.points,a=e.hasRendered||0,u=t.renderer,m=n.dataLabels,g=m.animation;if(g=m.defer?i(t,g,e):{defer:0,duration:0},m=f(f(t.options.plotOptions&&t.options.plotOptions.series&&t.options.plotOptions.series.dataLabels,t.options.plotOptions&&t.options.plotOptions[e.type]&&t.options.plotOptions[e.type].dataLabels),m),l(this,"drawDataLabels"),c(m)||m.enabled||e._hasPointLabels){var b=e.plotGroup("dataLabelsGroup","data-labels",a?"inherit":"hidden",m.zIndex||6);b.attr({opacity:+a}),!a&&(a=e.dataLabelsGroup)&&(e.visible&&b.show(!0),a[n.animation?"animate":"attr"]({opacity:1},g)),r.forEach((function(r){p(f(m,r.dlOptions||r.options&&r.options.dataLabels)).forEach((function(i,a){var l=i.enabled&&(!r.isNull||r.dataLabelOnNull)&&function(e,t){var n=t.filter;return!n||(t=n.operator,e=e[n.property],n=n.value,">"===t&&e>n||"<"===t&&e<n||">="===t&&e>=n||"<="===t&&e<=n||"=="===t&&e==n||"==="===t&&e===n)}(r,i),c=r.connectors?r.connectors[a]:r.connector,p=r.dataLabels?r.dataLabels[a]:r.dataLabel,f=h(i.distance,r.labelDistance),m=!p;if(l){var g=r.getLabelConfig(),v=h(i[r.formatPrefix+"Format"],i.format);g=s(v)?o(v,g,t):(i[r.formatPrefix+"Formatter"]||i.formatter).call(g,i),v=i.style;var y=i.rotation;t.styledMode||(v.color=h(i.color,v.color,e.color,"#000000"),"contrast"===v.color?(r.contrastColor=u.getContrast(r.color||e.color),v.color=!s(f)&&i.inside||0>f||n.stacking?r.contrastColor:"#000000"):delete r.contrastColor,n.cursor&&(v.cursor=n.cursor));var S={r:i.borderRadius||0,rotation:y,padding:i.padding,zIndex:1};t.styledMode||(S.fill=i.backgroundColor,S.stroke=i.borderColor,S["stroke-width"]=i.borderWidth),d(S,(function(e,t){void 0===e&&delete S[t]}))}!p||l&&s(g)&&!!p.div==!!i.useHTML||(r.dataLabel=p=r.dataLabel&&r.dataLabel.destroy(),r.dataLabels&&(1===r.dataLabels.length?delete r.dataLabels:delete r.dataLabels[a]),a||delete r.dataLabel,c&&(r.connector=r.connector.destroy(),r.connectors&&(1===r.connectors.length?delete r.connectors:delete r.connectors[a]))),l&&s(g)&&(p?S.text=g:(r.dataLabels=r.dataLabels||[],p=r.dataLabels[a]=y?u.text(g,0,-9999,i.useHTML).addClass("highcharts-data-label"):u.label(g,0,-9999,i.shape,null,null,i.useHTML,null,"data-label"),a||(r.dataLabel=p),p.addClass(" highcharts-data-label-color-"+r.colorIndex+" "+(i.className||"")+(i.useHTML?" highcharts-tracker":""))),p.options=i,p.attr(S),t.styledMode||p.css(v).shadow(i.shadow),p.added||p.add(b),i.textPath&&!i.useHTML&&(p.setTextPath(r.getDataLabelPath&&r.getDataLabelPath(p)||r.graphic,i.textPath),r.dataLabelPath&&!i.textPath.enabled&&(r.dataLabelPath=r.dataLabelPath.destroy())),e.alignDataLabel(r,p,i,null,m))}))}))}l(this,"afterDrawDataLabels")}function r(e,t,n,r,i,o){var s=this.chart,a=t.align,l=t.verticalAlign,c=e.box?0:e.padding||0,u=t.x;u=void 0===u?0:u;var d=t.y;d=void 0===d?0:d;var h=(n.x||0)+c;if(0>h){"right"===a&&0<=u?(t.align="left",t.inside=!0):u-=h;var p=!0}return(h=(n.x||0)+r.width-c)>s.plotWidth&&("left"===a&&0>=u?(t.align="right",t.inside=!0):u+=s.plotWidth-h,p=!0),0>(h=n.y+c)&&("bottom"===l&&0<=d?(t.verticalAlign="top",t.inside=!0):d-=h,p=!0),(h=(n.y||0)+r.height-c)>s.plotHeight&&("top"===l&&0>=d?(t.verticalAlign="bottom",t.inside=!0):d+=s.plotHeight-h,p=!0),p&&(t.x=u,t.y=d,e.placed=!o,e.align(t,void 0,i)),p}function f(e,t){var n,r=[];if(c(e)&&!c(t))r=e.map((function(e){return u(e,t)}));else if(c(t)&&!c(e))r=t.map((function(t){return u(e,t)}));else if(c(e)||c(t))for(n=Math.max(e.length,t.length);n--;)r[n]=u(e[n],t[n]);else r=u(e,t);return r}function m(e,t,n,r,i){var o=this.chart,s=o.inverted,a=this.xAxis,l=a.reversed,c=s?t.height/2:t.width/2;e=(e=e.pointWidth)?e/2:0,t.startXPos=s?i.x:l?-c-e:a.width-c+e,t.startYPos=s?l?this.yAxis.height-c+e:-c-e:i.y,r?"hidden"===t.visibility&&(t.show(),t.attr({opacity:0}).animate({opacity:1})):t.attr({opacity:1}).animate({opacity:0},void 0,t.hide),o.hasRendered&&(n&&t.attr({x:t.startXPos,y:t.startYPos}),t.placed=!0)}var g=[];e.compose=function(e){if(-1===g.indexOf(e)){var i=e.prototype;g.push(e),i.alignDataLabel=t,i.drawDataLabels=n,i.justifyDataLabel=r,i.setDataLabelStartPos=m}}}(r||(r={})),r})),t(n,"Series/Column/ColumnDataLabel.js",[n["Core/Series/DataLabel.js"],n["Core/Series/SeriesRegistry.js"],n["Core/Utilities.js"]],(function(e,t,n){var r,i=t.series,o=n.merge,s=n.pick;return function(t){function n(e,t,n,r,a){var l=this.chart.inverted,c=e.series,u=(c.xAxis?c.xAxis.len:this.chart.plotSizeX)||0;c=(c.yAxis?c.yAxis.len:this.chart.plotSizeY)||0;var d=e.dlBox||e.shapeArgs,h=s(e.below,e.plotY>s(this.translatedThreshold,c)),p=s(n.inside,!!this.options.stacking);d&&(0>(r=o(d)).y&&(r.height+=r.y,r.y=0),0<(d=r.y+r.height-c)&&d<r.height&&(r.height-=d),l&&(r={x:c-r.y-r.height,y:u-r.x-r.width,width:r.height,height:r.width}),p||(l?(r.x+=h?0:r.width,r.width=0):(r.y+=h?r.height:0,r.height=0))),n.align=s(n.align,!l||p?"center":h?"right":"left"),n.verticalAlign=s(n.verticalAlign,l||p?"middle":h?"top":"bottom"),i.prototype.alignDataLabel.call(this,e,t,n,r,a),n.inside&&e.contrastColor&&t.css({color:e.contrastColor})}var r=[];t.compose=function(t){e.compose(i),-1===r.indexOf(t)&&(r.push(t),t.prototype.alignDataLabel=n)}}(r||(r={})),r})),t(n,"Series/Bar/BarSeries.js",[n["Series/Column/ColumnSeries.js"],n["Core/Series/SeriesRegistry.js"],n["Core/Utilities.js"]],(function(e,t,n){var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=n.extend,o=n.merge;return n=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.data=void 0,e.options=void 0,e.points=void 0,e}return r(n,t),n.defaultOptions=o(e.defaultOptions,{}),n}(e),i(n.prototype,{inverted:!0}),t.registerSeriesType("bar",n),n})),t(n,"Series/Scatter/ScatterSeries.js",[n["Series/Column/ColumnSeries.js"],n["Series/Line/LineSeries.js"],n["Core/Series/SeriesRegistry.js"],n["Core/Utilities.js"]],(function(e,t,n,r){var i=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=r.addEvent,s=r.extend,a=r.merge;return s((r=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.data=void 0,t.options=void 0,t.points=void 0,t}return i(n,e),n.prototype.applyJitter=function(){var e=this,t=this.options.jitter,n=this.points.length;t&&this.points.forEach((function(r,i){["x","y"].forEach((function(o,s){var a="plot"+o.toUpperCase();if(t[o]&&!r.isNull){var l=e[o+"Axis"],c=t[o]*l.transA;if(l&&!l.isLog){var u=Math.max(0,r[a]-c);l=Math.min(l.len,r[a]+c),s=1e4*Math.sin(i+s*n),r[a]=u+(l-u)*(s-Math.floor(s)),"x"===o&&(r.clientX=r.plotX)}}}))}))},n.prototype.drawGraph=function(){this.options.lineWidth?e.prototype.drawGraph.call(this):this.graph&&(this.graph=this.graph.destroy())},n.defaultOptions=a(t.defaultOptions,{lineWidth:0,findNearestPointBy:"xy",jitter:{x:0,y:0},marker:{enabled:!0},tooltip:{headerFormat:'<span style="color:{point.color}">●</span> <span style="font-size: 10px"> {series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"}}),n}(t)).prototype,{drawTracker:e.prototype.drawTracker,sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1}),o(r,"afterTranslate",(function(){this.applyJitter()})),n.registerSeriesType("scatter",r),r})),t(n,"Series/CenteredUtilities.js",[n["Core/Globals.js"],n["Core/Series/Series.js"],n["Core/Utilities.js"]],(function(e,t,n){var r,i=e.deg2rad,o=n.isNumber,s=n.pick,a=n.relativeLength;return function(e){e.getCenter=function(){var e=this.options,n=this.chart,r=2*(e.slicedOffset||0),i=n.plotWidth-2*r,o=n.plotHeight-2*r,l=e.center,c=Math.min(i,o),u=e.size,d=e.innerSize||0;for("string"==typeof u&&(u=parseFloat(u)),"string"==typeof d&&(d=parseFloat(d)),e=[s(l[0],"50%"),s(l[1],"50%"),s(u&&0>u?void 0:e.size,"100%"),s(d&&0>d?void 0:e.innerSize||0,"0%")],!n.angular||this instanceof t||(e[3]=0),l=0;4>l;++l)u=e[l],n=2>l||2===l&&/%$/.test(u),e[l]=a(u,[i,o,c,e[2]][l])+(n?r:0);return e[3]>e[2]&&(e[3]=e[2]),e},e.getStartAndEndRadians=function(e,t){return e=o(e)?e:0,t=o(t)&&t>e&&360>t-e?t:e+360,{start:i*(e+-90),end:i*(t+-90)}}}(r||(r={})),r})),t(n,"Series/Pie/PiePoint.js",[n["Core/Animation/AnimationUtilities.js"],n["Core/Series/Point.js"],n["Core/Utilities.js"]],(function(e,t,n){var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=e.setAnimation,o=n.addEvent,s=n.defined;e=n.extend;var a=n.isNumber,l=n.pick,c=n.relativeLength;return t=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.labelDistance=void 0,t.options=void 0,t.series=void 0,t}return r(t,e),t.prototype.getConnectorPath=function(){var e=this.labelPosition,t=this.series.options.dataLabels,n=this.connectorShapes,r=t.connectorShape;return n[r]&&(r=n[r]),r.call(this,{x:e.final.x,y:e.final.y,alignment:e.alignment},e.connectorPosition,t)},t.prototype.getTranslate=function(){return this.sliced?this.slicedTranslation:{translateX:0,translateY:0}},t.prototype.haloPath=function(e){var t=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(t.x,t.y,t.r+e,t.r+e,{innerR:t.r-1,start:t.start,end:t.end})},t.prototype.init=function(){var t=this;e.prototype.init.apply(this,arguments),this.name=l(this.name,"Slice");var n=function(e){t.slice("select"===e.type)};return o(this,"select",n),o(this,"unselect",n),this},t.prototype.isValid=function(){return a(this.y)&&0<=this.y},t.prototype.setVisible=function(e,t){var n=this,r=this.series,i=r.chart,o=r.options.ignoreHiddenPoint;t=l(t,o),e!==this.visible&&(this.visible=this.options.visible=e=void 0===e?!this.visible:e,r.options.data[r.data.indexOf(this)]=this.options,["graphic","dataLabel","connector","shadowGroup"].forEach((function(t){n[t]&&n[t][e?"show":"hide"](e)})),this.legendItem&&i.legend.colorizeItem(this,e),e||"hover"!==this.state||this.setState(""),o&&(r.isDirty=!0),t&&i.redraw())},t.prototype.slice=function(e,t,n){var r=this.series;i(n,r.chart),l(t,!0),this.sliced=this.options.sliced=s(e)?e:!this.sliced,r.options.data[r.data.indexOf(this)]=this.options,this.graphic&&this.graphic.animate(this.getTranslate()),this.shadowGroup&&this.shadowGroup.animate(this.getTranslate())},t}(t),e(t.prototype,{connectorShapes:{fixedOffset:function(e,t,n){var r=t.breakAt;return t=t.touchingSliceAt,[["M",e.x,e.y],n.softConnector?["C",e.x+("left"===e.alignment?-5:5),e.y,2*r.x-t.x,2*r.y-t.y,r.x,r.y]:["L",r.x,r.y],["L",t.x,t.y]]},straight:function(e,t){return t=t.touchingSliceAt,[["M",e.x,e.y],["L",t.x,t.y]]},crookedLine:function(e,t,n){t=t.touchingSliceAt;var r=this.series,i=r.center[0],o=r.chart.plotWidth,s=r.chart.plotLeft;r=e.alignment;var a=this.shapeArgs.r;return n=c(n.crookDistance,1),n=["L",o="left"===r?i+a+(o+s-i-a)*(1-n):s+(i-a)*n,e.y],i=!0,("left"===r?o>e.x||o<t.x:o<e.x||o>t.x)&&(i=!1),e=[["M",e.x,e.y]],i&&e.push(n),e.push(["L",t.x,t.y]),e}}}),t})),t(n,"Series/Pie/PieSeries.js",[n["Series/CenteredUtilities.js"],n["Series/Column/ColumnSeries.js"],n["Core/Globals.js"],n["Core/Legend/LegendSymbol.js"],n["Series/Pie/PiePoint.js"],n["Core/Series/Series.js"],n["Core/Series/SeriesRegistry.js"],n["Core/Renderer/SVG/Symbols.js"],n["Core/Utilities.js"]],(function(e,t,n,r,i,o,s,a,l){var c=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),u=e.getStartAndEndRadians;n=n.noop;var d=l.clamp,h=l.extend,p=l.fireEvent,f=l.merge,m=l.pick,g=l.relativeLength;return l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.center=void 0,t.data=void 0,t.maxLabelDistance=void 0,t.options=void 0,t.points=void 0,t}return c(t,e),t.prototype.animate=function(e){var t=this,n=t.points,r=t.startAngleRad;e||n.forEach((function(e){var n=e.graphic,i=e.shapeArgs;n&&i&&(n.attr({r:m(e.startR,t.center&&t.center[3]/2),start:r,end:r}),n.animate({r:i.r,start:i.start,end:i.end},t.options.animation))}))},t.prototype.drawEmpty=function(){var e=this.startAngleRad,t=this.endAngleRad,n=this.options;if(0===this.total&&this.center){var r=this.center[0],i=this.center[1];this.graph||(this.graph=this.chart.renderer.arc(r,i,this.center[1]/2,0,e,t).addClass("highcharts-empty-series").add(this.group)),this.graph.attr({d:a.arc(r,i,this.center[2]/2,0,{start:e,end:t,innerR:this.center[3]/2})}),this.chart.styledMode||this.graph.attr({"stroke-width":n.borderWidth,fill:n.fillColor||"none",stroke:n.color||"#cccccc"})}else this.graph&&(this.graph=this.graph.destroy())},t.prototype.drawPoints=function(){var e=this.chart.renderer;this.points.forEach((function(t){t.graphic&&t.hasNewShapeType()&&(t.graphic=t.graphic.destroy()),t.graphic||(t.graphic=e[t.shapeType](t.shapeArgs).add(t.series.group),t.delayedRendering=!0)}))},t.prototype.generatePoints=function(){e.prototype.generatePoints.call(this),this.updateTotals()},t.prototype.getX=function(e,t,n){var r=this.center,i=this.radii?this.radii[n.index]||0:r[2]/2;return e=Math.asin(d((e-r[1])/(i+n.labelDistance),-1,1)),r[0]+(t?-1:1)*Math.cos(e)*(i+n.labelDistance)+(0<n.labelDistance?(t?-1:1)*this.options.dataLabels.padding:0)},t.prototype.hasData=function(){return!!this.processedXData.length},t.prototype.redrawPoints=function(){var e,t,n,r,i=this,o=i.chart,s=o.renderer,a=i.options.shadow;this.drawEmpty(),!a||i.shadowGroup||o.styledMode||(i.shadowGroup=s.g("shadow").attr({zIndex:-1}).add(i.group)),i.points.forEach((function(l){var c={};if(t=l.graphic,!l.isNull&&t){var u=void 0;r=l.shapeArgs,e=l.getTranslate(),o.styledMode||(u=l.shadowGroup,a&&!u&&(u=l.shadowGroup=s.g("shadow").add(i.shadowGroup)),u&&u.attr(e),n=i.pointAttribs(l,l.selected&&"select")),l.delayedRendering?(t.setRadialReference(i.center).attr(r).attr(e),o.styledMode||t.attr(n).attr({"stroke-linejoin":"round"}).shadow(a,u),l.delayedRendering=!1):(t.setRadialReference(i.center),o.styledMode||f(!0,c,n),f(!0,c,r,e),t.animate(c)),t.attr({visibility:l.visible?"inherit":"hidden"}),t.addClass(l.getClassName(),!0)}else t&&(l.graphic=t.destroy())}))},t.prototype.sortByAngle=function(e,t){e.sort((function(e,n){return void 0!==e.angle&&(n.angle-e.angle)*t}))},t.prototype.translate=function(e){this.generatePoints();var t=this.options,n=t.slicedOffset,r=n+(t.borderWidth||0),i=u(t.startAngle,t.endAngle),o=this.startAngleRad=i.start;i=(this.endAngleRad=i.end)-o;var s=this.points,a=t.dataLabels.distance;t=t.ignoreHiddenPoint;var l,c=s.length,d=0;for(e||(this.center=e=this.getCenter()),l=0;l<c;l++){var h=s[l],f=o+d*i;!h.isValid()||t&&!h.visible||(d+=h.percentage/100);var b=o+d*i,v={x:e[0],y:e[1],r:e[2]/2,innerR:e[3]/2,start:Math.round(1e3*f)/1e3,end:Math.round(1e3*b)/1e3};h.shapeType="arc",h.shapeArgs=v,h.labelDistance=m(h.options.dataLabels&&h.options.dataLabels.distance,a),h.labelDistance=g(h.labelDistance,v.r),this.maxLabelDistance=Math.max(this.maxLabelDistance||0,h.labelDistance),(b=(b+f)/2)>1.5*Math.PI?b-=2*Math.PI:b<-Math.PI/2&&(b+=2*Math.PI),h.slicedTranslation={translateX:Math.round(Math.cos(b)*n),translateY:Math.round(Math.sin(b)*n)},v=Math.cos(b)*e[2]/2;var y=Math.sin(b)*e[2]/2;h.tooltipPos=[e[0]+.7*v,e[1]+.7*y],h.half=b<-Math.PI/2||b>Math.PI/2?1:0,h.angle=b,f=Math.min(r,h.labelDistance/5),h.labelPosition={natural:{x:e[0]+v+Math.cos(b)*h.labelDistance,y:e[1]+y+Math.sin(b)*h.labelDistance},final:{},alignment:0>h.labelDistance?"center":h.half?"right":"left",connectorPosition:{breakAt:{x:e[0]+v+Math.cos(b)*f,y:e[1]+y+Math.sin(b)*f},touchingSliceAt:{x:e[0]+v,y:e[1]+y}}}}p(this,"afterTranslate")},t.prototype.updateTotals=function(){var e,t=this.points,n=t.length,r=this.options.ignoreHiddenPoint,i=0;for(e=0;e<n;e++){var o=t[e];!o.isValid()||r&&!o.visible||(i+=o.y)}for(this.total=i,e=0;e<n;e++)(o=t[e]).percentage=0<i&&(o.visible||!r)?o.y/i*100:0,o.total=i},t.defaultOptions=f(o.defaultOptions,{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{allowOverlap:!0,connectorPadding:5,connectorShape:"fixedOffset",crookDistance:"70%",distance:30,enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},softConnector:!0,x:0},fillColor:void 0,ignoreHiddenPoint:!0,inactiveOtherPoints:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,lineWidth:void 0,states:{hover:{brightness:.1}}}),t}(o),h(l.prototype,{axisTypes:[],directTouch:!0,drawGraph:void 0,drawLegendSymbol:r.drawRectangle,drawTracker:t.prototype.drawTracker,getCenter:e.getCenter,getSymbol:n,isCartesian:!1,noSharedTooltip:!0,pointAttribs:t.prototype.pointAttribs,pointClass:i,requireSorting:!1,searchPoint:n,trackerGroups:["group","dataLabelsGroup"]}),s.registerSeriesType("pie",l),l})),t(n,"Series/Pie/PieDataLabel.js",[n["Core/Series/DataLabel.js"],n["Core/Globals.js"],n["Core/Renderer/RendererUtilities.js"],n["Core/Series/SeriesRegistry.js"],n["Core/Utilities.js"]],(function(e,t,n,r,i){var o,s=t.noop,a=n.distribute,l=r.series,c=i.arrayMax,u=i.clamp,d=i.defined,h=i.merge,p=i.pick,f=i.relativeLength;return function(t){function n(){var e,t,n,r,i,o,s,u,f,m,g,b,v=this,y=v.data,S=v.chart,_=v.options.dataLabels||{},x=_.connectorPadding,w=S.plotWidth,k=S.plotHeight,O=S.plotLeft,E=Math.round(S.chartWidth/3),A=v.center,T=A[2]/2,C=A[1],M=[[],[]],$=[0,0,0,0],P=v.dataLabelPositioners;v.visible&&(_.enabled||v._hasPointLabels)&&(y.forEach((function(e){e.dataLabel&&e.visible&&e.dataLabel.shortened&&(e.dataLabel.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),e.dataLabel.shortened=!1)})),l.prototype.drawDataLabels.apply(v),y.forEach((function(e){e.dataLabel&&(e.visible?(M[e.half].push(e),e.dataLabel._pos=null,!d(_.style.width)&&!d(e.options.dataLabels&&e.options.dataLabels.style&&e.options.dataLabels.style.width)&&e.dataLabel.getBBox().width>E&&(e.dataLabel.css({width:Math.round(.7*E)+"px"}),e.dataLabel.shortened=!0)):(e.dataLabel=e.dataLabel.destroy(),e.dataLabels&&1===e.dataLabels.length&&delete e.dataLabels))})),M.forEach((function(t,n){var l,c=t.length,h=[];if(c){if(v.sortByAngle(t,n-.5),0<v.maxLabelDistance){var y=Math.max(0,C-T-v.maxLabelDistance),E=Math.min(C+T+v.maxLabelDistance,S.plotHeight);t.forEach((function(e){0<e.labelDistance&&e.dataLabel&&(e.top=Math.max(0,C-T-e.labelDistance),e.bottom=Math.min(C+T+e.labelDistance,S.plotHeight),l=e.dataLabel.getBBox().height||21,e.distributeBox={target:e.labelPosition.natural.y-e.top+l/2,size:l,rank:e.y},h.push(e.distributeBox))})),a(h,y=E+l-y,y/5)}for(g=0;g<c;g++){if(e=t[g],o=e.labelPosition,r=e.dataLabel,m=!1===e.visible?"hidden":"inherit",f=y=o.natural.y,h&&d(e.distributeBox)&&(void 0===e.distributeBox.pos?m="hidden":(s=e.distributeBox.size,f=P.radialDistributionY(e))),delete e.positionIndex,_.justify)u=P.justify(e,T,A);else switch(_.alignTo){case"connectors":u=P.alignToConnectors(t,n,w,O);break;case"plotEdges":u=P.alignToPlotEdges(r,n,w,O);break;default:u=P.radialDistributionX(v,e,f,y)}r._attr={visibility:m,align:o.alignment},b=e.options.dataLabels||{},r._pos={x:u+p(b.x,_.x)+({left:x,right:-x}[o.alignment]||0),y:f+p(b.y,_.y)-10},o.final.x=u,o.final.y=f,p(_.crop,!0)&&(i=r.getBBox().width,y=null,u-i<x&&1===n?(y=Math.round(i-u+x),$[3]=Math.max(y,$[3])):u+i>w-x&&0===n&&(y=Math.round(u+i-w+x),$[1]=Math.max(y,$[1])),0>f-s/2?$[0]=Math.max(Math.round(s/2-f),$[0]):f+s/2>k&&($[2]=Math.max(Math.round(f+s/2-k),$[2])),r.sideOverflow=y)}}})),0===c($)||this.verifyDataLabelOverflow($))&&(this.placeDataLabels(),this.points.forEach((function(e){var i;(b=h(_,e.options.dataLabels),t=p(b.connectorWidth,1))&&(n=e.connector,(r=e.dataLabel)&&r._pos&&e.visible&&0<e.labelDistance?(m=r._attr.visibility,(i=!n)&&(e.connector=n=S.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+e.colorIndex+(e.className?" "+e.className:"")).add(v.dataLabelsGroup),S.styledMode||n.attr({"stroke-width":t,stroke:b.connectorColor||e.color||"#666666"})),n[i?"attr":"animate"]({d:e.getConnectorPath()}),n.attr("visibility",m)):n&&(e.connector=n.destroy()))})))}function r(){this.points.forEach((function(e){var t,n=e.dataLabel;n&&e.visible&&((t=n._pos)?(n.sideOverflow&&(n._attr.width=Math.max(n.getBBox().width-n.sideOverflow,0),n.css({width:n._attr.width+"px",textOverflow:(this.options.dataLabels.style||{}).textOverflow||"ellipsis"}),n.shortened=!0),n.attr(n._attr),n[n.moved?"animate":"attr"](t),n.moved=!0):n&&n.attr({y:-9999})),delete e.distributeBox}),this)}function i(e){var t=this.center,n=this.options,r=n.center,i=n.minSize||80,o=null!==n.size;if(!o){if(null!==r[0])var s=Math.max(t[2]-Math.max(e[1],e[3]),i);else s=Math.max(t[2]-e[1]-e[3],i),t[0]+=(e[3]-e[1])/2;null!==r[1]?s=u(s,i,t[2]-Math.max(e[0],e[2])):(s=u(s,i,t[2]-e[0]-e[2]),t[1]+=(e[0]-e[2])/2),s<t[2]?(t[2]=s,t[3]=Math.min(f(n.innerSize||0,s),s),this.translate(t),this.drawDataLabels&&this.drawDataLabels()):o=!0}return o}var o=[],m={radialDistributionY:function(e){return e.top+e.distributeBox.pos},radialDistributionX:function(e,t,n,r){return e.getX(n<t.top+2||n>t.bottom-2?r:n,t.half,t)},justify:function(e,t,n){return n[0]+(e.half?-1:1)*(t+e.labelDistance)},alignToPlotEdges:function(e,t,n,r){return e=e.getBBox().width,t?e+r:n-e-r},alignToConnectors:function(e,t,n,r){var i,o=0;return e.forEach((function(e){(i=e.dataLabel.getBBox().width)>o&&(o=i)})),t?o+r:n-o-r}};t.compose=function(t){e.compose(l),-1===o.indexOf(t)&&(o.push(t),(t=t.prototype).dataLabelPositioners=m,t.alignDataLabel=s,t.drawDataLabels=n,t.placeDataLabels=r,t.verifyDataLabelOverflow=i)}}(o||(o={})),o})),t(n,"Extensions/OverlappingDataLabels.js",[n["Core/Chart/Chart.js"],n["Core/Utilities.js"]],(function(e,t){function n(e,t){var n=!1;if(e){var r=e.newOpacity;e.oldOpacity!==r&&(e.alignAttr&&e.placed?(e[r?"removeClass":"addClass"]("highcharts-data-label-hidden"),n=!0,e.alignAttr.opacity=r,e[e.isOld?"animate":"attr"](e.alignAttr,null,(function(){t.styledMode||e.css({pointerEvents:r?"auto":"none"})})),i(t,"afterHideOverlappingLabel")):e.attr({opacity:r})),e.isOld=!0}return n}var r=t.addEvent,i=t.fireEvent,o=t.isArray,s=t.isNumber,a=t.objectEach,l=t.pick;r(e,"render",(function(){var e=this,t=[];(this.labelCollectors||[]).forEach((function(e){t=t.concat(e())})),(this.yAxis||[]).forEach((function(e){e.stacking&&e.options.stackLabels&&!e.options.stackLabels.allowOverlap&&a(e.stacking.stacks,(function(e){a(e,(function(e){e.label&&"hidden"!==e.label.visibility&&t.push(e.label)}))}))})),(this.series||[]).forEach((function(r){var i=r.options.dataLabels;r.visible&&(!1!==i.enabled||r._hasPointLabels)&&((i=function(r){return r.forEach((function(r){r.visible&&(o(r.dataLabels)?r.dataLabels:r.dataLabel?[r.dataLabel]:[]).forEach((function(i){var o=i.options;i.labelrank=l(o.labelrank,r.labelrank,r.shapeArgs&&r.shapeArgs.height),o.allowOverlap?(i.oldOpacity=i.opacity,i.newOpacity=1,n(i,e)):t.push(i)}))}))})(r.nodes||[]),i(r.points))})),this.hideOverlappingLabels(t)})),e.prototype.hideOverlappingLabels=function(e){var t,r,o,a=this,l=e.length,c=a.renderer,u=!1,d=function(e){var t,n,r=e.box?0:e.padding||0,i=t=0;if(e&&(!e.alignAttr||e.placed)){var o=e.alignAttr||{x:e.attr("x"),y:e.attr("y")},a=e.parentGroup;e.width||(t=e.getBBox(),e.width=t.width,e.height=t.height,t=c.fontMetrics(null,e.element).h);var l=e.width-2*r;return(n={left:"0",center:"0.5",right:"1"}[e.alignValue])?i=+n*l:s(e.x)&&Math.round(e.x)!==e.translateX&&(i=e.x-e.translateX),{x:o.x+(a.translateX||0)+r-(i||0),y:o.y+(a.translateY||0)+r-t,width:e.width-2*r,height:e.height-2*r}}};for(r=0;r<l;r++)(t=e[r])&&(t.oldOpacity=t.opacity,t.newOpacity=1,t.absoluteBox=d(t));for(e.sort((function(e,t){return(t.labelrank||0)-(e.labelrank||0)})),r=0;r<l;r++){var h=(d=e[r])&&d.absoluteBox;for(t=r+1;t<l;++t){var p=(o=e[t])&&o.absoluteBox;!h||!p||d===o||0===d.newOpacity||0===o.newOpacity||p.x>=h.x+h.width||p.x+p.width<=h.x||p.y>=h.y+h.height||p.y+p.height<=h.y||((d.labelrank<o.labelrank?d:o).newOpacity=0)}}e.forEach((function(e){n(e,a)&&(u=!0)})),u&&i(a,"afterHideAllOverlappingLabels")}})),t(n,"Core/Responsive.js",[n["Core/Utilities.js"]],(function(e){var t,n=e.extend,r=e.find,i=e.isArray,o=e.isObject,s=e.merge,a=e.objectEach,l=e.pick,c=e.splat,u=e.uniqueKey;return function(e){var t=[];e.compose=function(e){return-1===t.indexOf(e)&&(t.push(e),n(e.prototype,d.prototype)),e};var d=function(){function e(){}return e.prototype.currentOptions=function(e){var t=this,n={};return function e(n,r,s,l){var u;a(n,(function(n,a){if(!l&&-1<t.collectionsWithUpdate.indexOf(a)&&r[a])for(n=c(n),s[a]=[],u=0;u<Math.max(n.length,r[a].length);u++)r[a][u]&&(void 0===n[u]?s[a][u]=r[a][u]:(s[a][u]={},e(n[u],r[a][u],s[a][u],l+1)));else o(n)?(s[a]=i(n)?[]:{},e(n,r[a]||{},s[a],l+1)):s[a]=void 0===r[a]?null:r[a]}))}(e,this.options,n,0),n},e.prototype.matchResponsiveRule=function(e,t){var n=e.condition;(n.callback||function(){return this.chartWidth<=l(n.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=l(n.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=l(n.minWidth,0)&&this.chartHeight>=l(n.minHeight,0)}).call(this)&&t.push(e._id)},e.prototype.setResponsive=function(e,t){var n=this,i=this.options.responsive,o=this.currentResponsive,a=[];!t&&i&&i.rules&&i.rules.forEach((function(e){void 0===e._id&&(e._id=u()),n.matchResponsiveRule(e,a)}),this),(t=s.apply(void 0,a.map((function(e){return r((i||{}).rules||[],(function(t){return t._id===e}))})).map((function(e){return e&&e.chartOptions})))).isResponsiveOptions=!0,(a=a.toString()||void 0)!==(o&&o.ruleIds)&&(o&&this.update(o.undoOptions,e,!0),a?((o=this.currentOptions(t)).isResponsiveOptions=!0,this.currentResponsive={ruleIds:a,mergedOptions:t,undoOptions:o},this.update(t,e,!0)):this.currentResponsive=void 0)},e}()}(t||(t={})),t})),t(n,"masters/highcharts.src.js",[n["Core/Globals.js"],n["Core/Utilities.js"],n["Core/DefaultOptions.js"],n["Core/Animation/Fx.js"],n["Core/Animation/AnimationUtilities.js"],n["Core/Renderer/HTML/AST.js"],n["Core/FormatUtilities.js"],n["Core/Renderer/RendererUtilities.js"],n["Core/Renderer/SVG/SVGElement.js"],n["Core/Renderer/SVG/SVGRenderer.js"],n["Core/Renderer/HTML/HTMLElement.js"],n["Core/Renderer/HTML/HTMLRenderer.js"],n["Core/Axis/Axis.js"],n["Core/Axis/DateTimeAxis.js"],n["Core/Axis/LogarithmicAxis.js"],n["Core/Axis/PlotLineOrBand/PlotLineOrBand.js"],n["Core/Axis/Tick.js"],n["Core/Tooltip.js"],n["Core/Series/Point.js"],n["Core/Pointer.js"],n["Core/MSPointer.js"],n["Core/Legend/Legend.js"],n["Core/Chart/Chart.js"],n["Core/Series/Series.js"],n["Core/Series/SeriesRegistry.js"],n["Series/Column/ColumnSeries.js"],n["Series/Column/ColumnDataLabel.js"],n["Series/Pie/PieSeries.js"],n["Series/Pie/PieDataLabel.js"],n["Core/Series/DataLabel.js"],n["Core/Responsive.js"],n["Core/Color/Color.js"],n["Core/Time.js"]],(function(e,t,n,r,i,o,s,a,l,c,u,d,h,p,f,m,g,b,v,y,S,_,x,w,k,O,E,A,T,C,M,$,P){return e.animate=i.animate,e.animObject=i.animObject,e.getDeferredAnimation=i.getDeferredAnimation,e.setAnimation=i.setAnimation,e.stop=i.stop,e.timers=r.timers,e.AST=o,e.Axis=h,e.Chart=x,e.chart=x.chart,e.Fx=r,e.Legend=_,e.PlotLineOrBand=m,e.Point=v,e.Pointer=S.isRequired()?S:y,e.Series=w,e.SVGElement=l,e.SVGRenderer=c,e.Tick=g,e.Time=P,e.Tooltip=b,e.Color=$,e.color=$.parse,d.compose(c),u.compose(l),e.defaultOptions=n.defaultOptions,e.getOptions=n.getOptions,e.time=n.defaultTime,e.setOptions=n.setOptions,e.dateFormat=s.dateFormat,e.format=s.format,e.numberFormat=s.numberFormat,e.addEvent=t.addEvent,e.arrayMax=t.arrayMax,e.arrayMin=t.arrayMin,e.attr=t.attr,e.clearTimeout=t.clearTimeout,e.correctFloat=t.correctFloat,e.createElement=t.createElement,e.css=t.css,e.defined=t.defined,e.destroyObjectProperties=t.destroyObjectProperties,e.discardElement=t.discardElement,e.distribute=a.distribute,e.erase=t.erase,e.error=t.error,e.extend=t.extend,e.extendClass=t.extendClass,e.find=t.find,e.fireEvent=t.fireEvent,e.getMagnitude=t.getMagnitude,e.getStyle=t.getStyle,e.inArray=t.inArray,e.isArray=t.isArray,e.isClass=t.isClass,e.isDOMElement=t.isDOMElement,e.isFunction=t.isFunction,e.isNumber=t.isNumber,e.isObject=t.isObject,e.isString=t.isString,e.keys=t.keys,e.merge=t.merge,e.normalizeTickInterval=t.normalizeTickInterval,e.objectEach=t.objectEach,e.offset=t.offset,e.pad=t.pad,e.pick=t.pick,e.pInt=t.pInt,e.relativeLength=t.relativeLength,e.removeEvent=t.removeEvent,e.seriesType=k.seriesType,e.splat=t.splat,e.stableSort=t.stableSort,e.syncTimeout=t.syncTimeout,e.timeUnits=t.timeUnits,e.uniqueKey=t.uniqueKey,e.useSerialIds=t.useSerialIds,e.wrap=t.wrap,E.compose(O),C.compose(w),p.compose(h),f.compose(h),T.compose(A),m.compose(h),M.compose(x),e})),n["masters/highcharts.src.js"]._modules=n,n["masters/highcharts.src.js"]}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.confirmAlert=function(e){document.body.classList.add("react-confirm-alert-body-element"),function(){if(document.getElementById("react-confirm-alert-firm-svg"))return;var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"feGaussianBlur");t.setAttribute("stdDeviation","0.3");var n=document.createElementNS(e,"filter");n.setAttribute("id","gaussian-blur"),n.appendChild(t);var r=document.createElementNS(e,"svg");r.setAttribute("id","react-confirm-alert-firm-svg"),r.setAttribute("class","react-confirm-alert-svg"),r.appendChild(n),document.body.appendChild(r)}(),function(e){var t=document.getElementById("react-confirm-alert");t||(document.body.children[0].classList.add("react-confirm-alert-blur"),(t=document.createElement("div")).id="react-confirm-alert",document.body.appendChild(t)),(0,c.render)(a.default.createElement(p,e),t)}(e)};var s=n(0),a=u(s),l=u(n(30)),c=n(14);function u(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var p=(i=r=function(e){function t(){var e,n,r;d(this,t);for(var i=arguments.length,o=Array(i),s=0;s<i;s++)o[s]=arguments[s];return n=r=h(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o))),r.handleClickButton=function(e){e.onClick&&e.onClick(),r.close()},r.handleClickOverlay=function(e){var t=r.props,n=t.closeOnClickOutside,i=t.onClickOutside,o=e.target===r.overlay;n&&o&&(i(),r.close())},r.close=function(){var e=r.props.afterClose;g(),m(),f(e)},r.keyboardClose=function(e){var t=r.props,n=t.closeOnEscape,i=t.onKeypressEscape,o=t.keyCodeForClose,s=e.keyCode,a=27===s;o.includes(s)&&r.close(),n&&a&&(i(e),r.close())},r.componentDidMount=function(){document.addEventListener("keydown",r.keyboardClose,!1)},r.componentWillUnmount=function(){document.removeEventListener("keydown",r.keyboardClose,!1),r.props.willUnmount()},r.renderCustomUI=function(){var e=r.props,t=e.title,n=e.message,i=e.buttons;return(0,e.customUI)({title:t,message:n,buttons:i,onClose:r.close})},h(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.title,r=t.message,i=t.buttons,o=t.childrenElement,s=t.customUI,l=t.overlayClassName;return a.default.createElement("div",{className:"react-confirm-alert-overlay "+l,ref:function(t){return e.overlay=t},onClick:this.handleClickOverlay},a.default.createElement("div",{className:"react-confirm-alert"},s?this.renderCustomUI():a.default.createElement("div",{className:"react-confirm-alert-body"},n&&a.default.createElement("h1",null,n),r,o(),a.default.createElement("div",{className:"react-confirm-alert-button-group"},i.map((function(t,n){return a.default.createElement("button",{key:n,onClick:function(){return e.handleClickButton(t)},className:t.className},t.label)}))))))}}]),t}(s.Component),r.propTypes={title:l.default.string,message:l.default.string,buttons:l.default.array.isRequired,childrenElement:l.default.func,customUI:l.default.func,closeOnClickOutside:l.default.bool,closeOnEscape:l.default.bool,keyCodeForClose:l.default.arrayOf(l.default.number),willUnmount:l.default.func,afterClose:l.default.func,onClickOutside:l.default.func,onKeypressEscape:l.default.func,overlayClassName:l.default.string},r.defaultProps={buttons:[{label:"Cancel",onClick:function(){return null},className:null},{label:"Confirm",onClick:function(){return null},className:null}],childrenElement:function(){return null},closeOnClickOutside:!0,closeOnEscape:!0,keyCodeForClose:[],willUnmount:function(){return null},afterClose:function(){return null},onClickOutside:function(){return null},onKeypressEscape:function(){return null}},i);function f(e){var t=document.getElementById("react-confirm-alert-firm-svg");t&&t.parentNode.removeChild(t),document.body.children[0].classList.remove("react-confirm-alert-blur"),e()}function m(){var e=document.getElementById("react-confirm-alert");e&&((0,c.unmountComponentAtNode)(e),e.parentNode.removeChild(e))}function g(){document.body.classList.remove("react-confirm-alert-body-element")}t.default=p},function(e,t,n){(function(n){var r,i,o;i=[],void 0===(o="function"==typeof(r=function(){"use strict";function t(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){a(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function r(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function i(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(e,n,s){var a=o.URL||o.webkitURL,l=document.createElement("a");n=n||e.name||"download",l.download=n,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?i(l):r(l.href)?t(e,n,s):i(l,l.target="_blank")):(l.href=a.createObjectURL(e),setTimeout((function(){a.revokeObjectURL(l.href)}),4e4),setTimeout((function(){i(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,o){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,o),n);else if(r(e))t(e,n,o);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout((function(){i(s)}))}}:function(e,n,r,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,r);var a="application/octet-stream"===e.type,l=/constructor/i.test(o.HTMLElement)||o.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||a&&l||s)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},u.readAsDataURL(e)}else{var d=o.URL||o.webkitURL,h=d.createObjectURL(e);i?i.location=h:location.href=h,i=null,setTimeout((function(){d.revokeObjectURL(h)}),4e4)}});o.saveAs=a.saveAs=a,e.exports=a})?r.apply(t,i):r)||(e.exports=o)}).call(this,n(28))},function(e,t,n){e.exports=n(374)},function(e,t,n){(function(t,n,r,i){e.exports=function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[s]={exports:{}};t[s][0].call(c.exports,(function(e){return i(t[s][1][e]||e)}),c,c.exports,e,t,n,r)}return n[s].exports}for(var o=!1,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(e,t,n){"use strict";var r=e("./utils"),i=e("./support"),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.encode=function(e){for(var t,n,i,s,a,l,c,u=[],d=0,h=e.length,p=h,f="string"!==r.getTypeOf(e);d<e.length;)p=h-d,i=f?(t=e[d++],n=d<h?e[d++]:0,d<h?e[d++]:0):(t=e.charCodeAt(d++),n=d<h?e.charCodeAt(d++):0,d<h?e.charCodeAt(d++):0),s=t>>2,a=(3&t)<<4|n>>4,l=1<p?(15&n)<<2|i>>6:64,c=2<p?63&i:64,u.push(o.charAt(s)+o.charAt(a)+o.charAt(l)+o.charAt(c));return u.join("")},n.decode=function(e){var t,n,r,s,a,l,c=0,u=0,d="data:";if(e.substr(0,d.length)===d)throw new Error("Invalid base64 input, it looks like a data url.");var h,p=3*(e=e.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(e.charAt(e.length-1)===o.charAt(64)&&p--,e.charAt(e.length-2)===o.charAt(64)&&p--,p%1!=0)throw new Error("Invalid base64 input, bad content length.");for(h=i.uint8array?new Uint8Array(0|p):new Array(0|p);c<e.length;)t=o.indexOf(e.charAt(c++))<<2|(s=o.indexOf(e.charAt(c++)))>>4,n=(15&s)<<4|(a=o.indexOf(e.charAt(c++)))>>2,r=(3&a)<<6|(l=o.indexOf(e.charAt(c++))),h[u++]=t,64!==a&&(h[u++]=n),64!==l&&(h[u++]=r);return h}},{"./support":30,"./utils":32}],2:[function(e,t,n){"use strict";var r=e("./external"),i=e("./stream/DataWorker"),o=e("./stream/Crc32Probe"),s=e("./stream/DataLengthProbe");function a(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}a.prototype={getContentWorker:function(){var e=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(e,t,n){return e.pipe(new o).pipe(new s("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new s("compressedSize")).withStreamInfo("compression",t)},t.exports=a},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){"use strict";var r=e("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},n.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){"use strict";var r=e("./utils"),i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==r.getTypeOf(e)?function(e,t,n,r){var o=i,s=0+n;e^=-1;for(var a=0;a<s;a++)e=e>>>8^o[255&(e^t[a])];return-1^e}(0|t,e,e.length):function(e,t,n,r){var o=i,s=0+n;e^=-1;for(var a=0;a<s;a++)e=e>>>8^o[255&(e^t.charCodeAt(a))];return-1^e}(0|t,e,e.length):0}},{"./utils":32}],5:[function(e,t,n){"use strict";n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t,n){"use strict";var r;r="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:r}},{lie:37}],7:[function(e,t,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=e("pako"),o=e("./utils"),s=e("./stream/GenericWorker"),a=r?"uint8array":"array";function l(e,t){s.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic="\b\0",o.inherits(l,s),l.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(a,e.data),!1)},l.prototype.flush=function(){s.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new l("Deflate",e)},n.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){"use strict";function r(e,t){var n,r="";for(n=0;n<t;n++)r+=String.fromCharCode(255&e),e>>>=8;return r}function i(e,t,n,i,s,u){var d,h,p=e.file,f=e.compression,m=u!==a.utf8encode,g=o.transformTo("string",u(p.name)),b=o.transformTo("string",a.utf8encode(p.name)),v=p.comment,y=o.transformTo("string",u(v)),S=o.transformTo("string",a.utf8encode(v)),_=b.length!==p.name.length,x=S.length!==v.length,w="",k="",O="",E=p.dir,A=p.date,T={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(T.crc32=e.crc32,T.compressedSize=e.compressedSize,T.uncompressedSize=e.uncompressedSize);var C=0;t&&(C|=8),m||!_&&!x||(C|=2048);var M=0,$=0;E&&(M|=16),"UNIX"===s?($=798,M|=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16}(p.unixPermissions,E)):($=20,M|=function(e){return 63&(e||0)}(p.dosPermissions)),d=A.getUTCHours(),d<<=6,d|=A.getUTCMinutes(),d<<=5,d|=A.getUTCSeconds()/2,h=A.getUTCFullYear()-1980,h<<=4,h|=A.getUTCMonth()+1,h<<=5,h|=A.getUTCDate(),_&&(k=r(1,1)+r(l(g),4)+b,w+="up"+r(k.length,2)+k),x&&(O=r(1,1)+r(l(y),4)+S,w+="uc"+r(O.length,2)+O);var P="";return P+="\n\0",P+=r(C,2),P+=f.magic,P+=r(d,2),P+=r(h,2),P+=r(T.crc32,4),P+=r(T.compressedSize,4),P+=r(T.uncompressedSize,4),P+=r(g.length,2),P+=r(w.length,2),{fileRecord:c.LOCAL_FILE_HEADER+P+g+w,dirRecord:c.CENTRAL_FILE_HEADER+r($,2)+P+r(y.length,2)+"\0\0\0\0"+r(M,4)+r(i,4)+g+w+y}}var o=e("../utils"),s=e("../stream/GenericWorker"),a=e("../utf8"),l=e("../crc32"),c=e("../signature");function u(e,t,n,r){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(u,s),u.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,s.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},u.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:function(e){return c.DATA_DESCRIPTOR+r(e.crc32,4)+r(e.compressedSize,4)+r(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var n=this.bytesWritten-e,i=function(e,t,n,i,s){var a=o.transformTo("string",s(i));return c.CENTRAL_DIRECTORY_END+"\0\0\0\0"+r(e,2)+r(e,2)+r(t,4)+r(n,4)+r(a.length,2)+a}(this.dirRecords.length,n,e,this.zipComment,this.encodeFileName);this.push({data:i,meta:{percent:100}})},u.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},u.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()})),e.on("error",(function(e){t.error(e)})),this},u.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},u.prototype.error=function(e){var t=this._sources;if(!s.prototype.error.call(this,e))return!1;for(var n=0;n<t.length;n++)try{t[n].error(e)}catch(e){}return!0},u.prototype.lock=function(){s.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},t.exports=u},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,n){"use strict";var r=e("../compressions"),i=e("./ZipFileWorker");n.generateWorker=function(e,t,n){var o=new i(t.streamFiles,n,t.platform,t.encodeFileName),s=0;try{e.forEach((function(e,n){s++;var i=function(e,t){var n=e||t,i=r[n];if(!i)throw new Error(n+" is not a valid compression method !");return i}(n.options.compression,t.compression),a=n.options.compressionOptions||t.compressionOptions||{},l=n.dir,c=n.date;n._compressWorker(i,a).withStreamInfo("file",{name:e,dir:l,date:c,comment:n.comment||"",unixPermissions:n.unixPermissions,dosPermissions:n.dosPermissions}).pipe(o)})),o.entriesCount=s}catch(e){o.error(e)}return o}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,n){"use strict";function r(){if(!(this instanceof r))return new r;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new r;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}(r.prototype=e("./object")).loadAsync=e("./load"),r.support=e("./support"),r.defaults=e("./defaults"),r.version="3.10.1",r.loadAsync=function(e,t){return(new r).loadAsync(e,t)},r.external=e("./external"),t.exports=r},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,n){"use strict";var r=e("./utils"),i=e("./external"),o=e("./utf8"),s=e("./zipEntries"),a=e("./stream/Crc32Probe"),l=e("./nodejsUtils");function c(e){return new i.Promise((function(t,n){var r=e.decompressed.getContentWorker().pipe(new a);r.on("error",(function(e){n(e)})).on("end",(function(){r.streamInfo.crc32!==e.decompressed.crc32?n(new Error("Corrupted zip : CRC32 mismatch")):t()})).resume()}))}t.exports=function(e,t){var n=this;return t=r.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),l.isNode&&l.isStream(e)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):r.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then((function(e){var n=new s(t);return n.load(e),n})).then((function(e){var n=[i.Promise.resolve(e)],r=e.files;if(t.checkCRC32)for(var o=0;o<r.length;o++)n.push(c(r[o]));return i.Promise.all(n)})).then((function(e){for(var i=e.shift(),o=i.files,s=0;s<o.length;s++){var a=o[s],l=a.fileNameStr,c=r.resolve(a.fileNameStr);n.file(c,a.decompressed,{binary:!0,optimizedBinaryString:!0,date:a.date,dir:a.dir,comment:a.fileCommentStr.length?a.fileCommentStr:null,unixPermissions:a.unixPermissions,dosPermissions:a.dosPermissions,createFolders:t.createFolders}),a.dir||(n.file(c).unsafeOriginalName=l)}return i.zipComment.length&&(n.comment=i.zipComment),n}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,n){"use strict";var r=e("../utils"),i=e("../stream/GenericWorker");function o(e,t){i.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}r.inherits(o,i),o.prototype._bindStream=function(e){var t=this;(this._stream=e).pause(),e.on("data",(function(e){t.push({data:e,meta:{percent:0}})})).on("error",(function(e){t.isPaused?this.generatedError=e:t.error(e)})).on("end",(function(){t.isPaused?t._upstreamEnded=!0:t.end()}))},o.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=o},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,t,n){"use strict";var r=e("readable-stream").Readable;function i(e,t,n){r.call(this,t),this._helper=e;var i=this;e.on("data",(function(e,t){i.push(e)||i._helper.pause(),n&&n(t)})).on("error",(function(e){i.emit("error",e)})).on("end",(function(){i.push(null)}))}e("../utils").inherits(i,r),i.prototype._read=function(){this._helper.resume()},t.exports=i},{"../utils":32,"readable-stream":16}],14:[function(e,n,r){"use strict";n.exports={isNode:void 0!==t,newBufferFrom:function(e,n){if(t.from&&t.from!==Uint8Array.from)return t.from(e,n);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new t(e,n)},allocBuffer:function(e){if(t.alloc)return t.alloc(e);var n=new t(e);return n.fill(0),n},isBuffer:function(e){return t.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}},{}],15:[function(e,t,n){"use strict";function r(e,t,n){var r,i=o.getTypeOf(t),a=o.extend(n||{},l);a.date=a.date||new Date,null!==a.compression&&(a.compression=a.compression.toUpperCase()),"string"==typeof a.unixPermissions&&(a.unixPermissions=parseInt(a.unixPermissions,8)),a.unixPermissions&&16384&a.unixPermissions&&(a.dir=!0),a.dosPermissions&&16&a.dosPermissions&&(a.dir=!0),a.dir&&(e=m(e)),a.createFolders&&(r=f(e))&&g.call(this,r,!0);var d,b="string"===i&&!1===a.binary&&!1===a.base64;n&&void 0!==n.binary||(a.binary=!b),(t instanceof c&&0===t.uncompressedSize||a.dir||!t||0===t.length)&&(a.base64=!1,a.binary=!0,t="",a.compression="STORE",i="string"),d=t instanceof c||t instanceof s?t:h.isNode&&h.isStream(t)?new p(e,t):o.prepareContent(e,t,a.binary,a.optimizedBinaryString,a.base64);var v=new u(e,d,a);this.files[e]=v}var i=e("./utf8"),o=e("./utils"),s=e("./stream/GenericWorker"),a=e("./stream/StreamHelper"),l=e("./defaults"),c=e("./compressedObject"),u=e("./zipObject"),d=e("./generate"),h=e("./nodejsUtils"),p=e("./nodejs/NodejsStreamInputAdapter"),f=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return 0<t?e.substring(0,t):""},m=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},g=function(e,t){return t=void 0!==t?t:l.createFolders,e=m(e),this.files[e]||r.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function b(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var v={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,n,r;for(t in this.files)r=this.files[t],(n=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(n,r)},filter:function(e){var t=[];return this.forEach((function(n,r){e(n,r)&&t.push(r)})),t},file:function(e,t,n){if(1!==arguments.length)return e=this.root+e,r.call(this,e,t,n),this;if(b(e)){var i=e;return this.filter((function(e,t){return!t.dir&&i.test(e)}))}var o=this.files[this.root+e];return o&&!o.dir?o:null},folder:function(e){if(!e)return this;if(b(e))return this.filter((function(t,n){return n.dir&&e.test(t)}));var t=this.root+e,n=g.call(this,t),r=this.clone();return r.root=n.name,r},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var n=this.filter((function(t,n){return n.name.slice(0,e.length)===e})),r=0;r<n.length;r++)delete this.files[n[r].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,n={};try{if((n=o.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=n.type.toLowerCase(),n.compression=n.compression.toUpperCase(),"binarystring"===n.type&&(n.type="string"),!n.type)throw new Error("No output type specified.");o.checkSupport(n.type),"darwin"!==n.platform&&"freebsd"!==n.platform&&"linux"!==n.platform&&"sunos"!==n.platform||(n.platform="UNIX"),"win32"===n.platform&&(n.platform="DOS");var r=n.comment||this.comment||"";t=d.generateWorker(this,n,r)}catch(e){(t=new s("error")).error(e)}return new a(t,n.type||"string",n.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};t.exports=v},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(e,t,n){"use strict";t.exports=e("stream")},{stream:void 0}],17:[function(e,t,n){"use strict";var r=e("./DataReader");function i(e){r.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}e("../utils").inherits(i,r),i.prototype.byteAt=function(e){return this.data[this.zero+e]},i.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),o=this.length-4;0<=o;--o)if(this.data[o]===t&&this.data[o+1]===n&&this.data[o+2]===r&&this.data[o+3]===i)return o-this.zero;return-1},i.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),o=this.readData(4);return t===o[0]&&n===o[1]&&r===o[2]&&i===o[3]},i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],18:[function(e,t,n){"use strict";var r=e("../utils");function i(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t,n=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,n){"use strict";var r=e("./Uint8ArrayReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){"use strict";var r=e("./DataReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){"use strict";var r=e("./ArrayReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,n){"use strict";var r=e("../utils"),i=e("../support"),o=e("./ArrayReader"),s=e("./StringReader"),a=e("./NodeBufferReader"),l=e("./Uint8ArrayReader");t.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new a(e):i.uint8array?new l(r.transformTo("uint8array",e)):new o(r.transformTo("array",e)):new s(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){"use strict";n.LOCAL_FILE_HEADER="PK",n.CENTRAL_FILE_HEADER="PK",n.CENTRAL_DIRECTORY_END="PK",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",n.ZIP64_CENTRAL_DIRECTORY_END="PK",n.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t,n){"use strict";var r=e("./GenericWorker"),i=e("../utils");function o(e){r.call(this,"ConvertWorker to "+e),this.destType=e}i.inherits(o,r),o.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){"use strict";var r=e("./GenericWorker"),i=e("../crc32");function o(){r.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(o,r),o.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){"use strict";var r=e("../utils"),i=e("./GenericWorker");function o(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}r.inherits(o,i),o.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){"use strict";var r=e("../utils"),i=e("./GenericWorker");function o(e){i.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}r.inherits(o,i),o.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){"use strict";function r(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n<this._listeners[e].length;n++)this._listeners[e][n].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.end()})),e.on("error",(function(e){t.error(e)})),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var e=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}},t.exports=r},{}],29:[function(e,n,r){"use strict";var i=e("../utils"),o=e("./ConvertWorker"),s=e("./GenericWorker"),a=e("../base64"),l=e("../support"),c=e("../external"),u=null;if(l.nodestream)try{u=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}function d(e,t,n){var r=t;switch(t){case"blob":case"arraybuffer":r="uint8array";break;case"base64":r="string"}try{this._internalType=r,this._outputType=t,this._mimeType=n,i.checkSupport(r),this._worker=e.pipe(new o(r)),e.lock()}catch(e){this._worker=new s("error"),this._worker.error(e)}}d.prototype={accumulate:function(e){return function(e,n){return new c.Promise((function(r,o){var s=[],l=e._internalType,c=e._outputType,u=e._mimeType;e.on("data",(function(e,t){s.push(e),n&&n(t)})).on("error",(function(e){s=[],o(e)})).on("end",(function(){try{var e=function(e,t,n){switch(e){case"blob":return i.newBlob(i.transformTo("arraybuffer",t),n);case"base64":return a.encode(t);default:return i.transformTo(e,t)}}(c,function(e,n){var r,i=0,o=null,s=0;for(r=0;r<n.length;r++)s+=n[r].length;switch(e){case"string":return n.join("");case"array":return Array.prototype.concat.apply([],n);case"uint8array":for(o=new Uint8Array(s),r=0;r<n.length;r++)o.set(n[r],i),i+=n[r].length;return o;case"nodebuffer":return t.concat(n);default:throw new Error("concat : unsupported type '"+e+"'")}}(l,s),u);r(e)}catch(e){o(e)}s=[]})).resume()}))}(this,e)},on:function(e,t){var n=this;return"data"===e?this._worker.on(e,(function(e){t.call(n,e.data,e.meta)})):this._worker.on(e,(function(){i.delay(t,arguments,n)})),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(i.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new u(this,{objectMode:"nodebuffer"!==this._outputType},e)}},n.exports=d},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,n,r){"use strict";if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,r.nodebuffer=void 0!==t,r.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)r.blob=!1;else{var i=new ArrayBuffer(0);try{r.blob=0===new Blob([i],{type:"application/zip"}).size}catch(e){try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(i),r.blob=0===o.getBlob("application/zip").size}catch(e){r.blob=!1}}}try{r.nodestream=!!e("readable-stream").Readable}catch(e){r.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,n){"use strict";for(var r=e("./utils"),i=e("./support"),o=e("./nodejsUtils"),s=e("./stream/GenericWorker"),a=new Array(256),l=0;l<256;l++)a[l]=252<=l?6:248<=l?5:240<=l?4:224<=l?3:192<=l?2:1;function c(){s.call(this,"utf-8 decode"),this.leftOver=null}function u(){s.call(this,"utf-8 encode")}a[254]=a[254]=1,n.utf8encode=function(e){return i.nodebuffer?o.newBufferFrom(e,"utf-8"):function(e){var t,n,r,o,s,a=e.length,l=0;for(o=0;o<a;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<a&&56320==(64512&(r=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),l+=n<128?1:n<2048?2:n<65536?3:4;for(t=i.uint8array?new Uint8Array(l):new Array(l),o=s=0;s<l;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<a&&56320==(64512&(r=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),n<128?t[s++]=n:(n<2048?t[s++]=192|n>>>6:(n<65536?t[s++]=224|n>>>12:(t[s++]=240|n>>>18,t[s++]=128|n>>>12&63),t[s++]=128|n>>>6&63),t[s++]=128|63&n);return t}(e)},n.utf8decode=function(e){return i.nodebuffer?r.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,n,i,o,s=e.length,l=new Array(2*s);for(t=n=0;t<s;)if((i=e[t++])<128)l[n++]=i;else if(4<(o=a[i]))l[n++]=65533,t+=o-1;else{for(i&=2===o?31:3===o?15:7;1<o&&t<s;)i=i<<6|63&e[t++],o--;1<o?l[n++]=65533:i<65536?l[n++]=i:(i-=65536,l[n++]=55296|i>>10&1023,l[n++]=56320|1023&i)}return l.length!==n&&(l.subarray?l=l.subarray(0,n):l.length=n),r.applyFromCharCode(l)}(e=r.transformTo(i.uint8array?"uint8array":"array",e))},r.inherits(c,s),c.prototype.processChunk=function(e){var t=r.transformTo(i.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var o=t;(t=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),t.set(o,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var s=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}(t),l=t;s!==t.length&&(i.uint8array?(l=t.subarray(0,s),this.leftOver=t.subarray(s,t.length)):(l=t.slice(0,s),this.leftOver=t.slice(s,t.length))),this.push({data:n.utf8decode(l),meta:e.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=c,r.inherits(u,s),u.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,r){"use strict";var i=e("./support"),o=e("./base64"),s=e("./nodejsUtils"),a=e("./external");function l(e){return e}function c(e,t){for(var n=0;n<e.length;++n)t[n]=255&e.charCodeAt(n);return t}e("setimmediate"),r.newBlob=function(e,t){r.checkSupport("blob");try{return new Blob([e],{type:t})}catch(r){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return n.append(e),n.getBlob(t)}catch(e){throw new Error("Bug : can't construct the Blob.")}}};var u={stringifyByChunk:function(e,t,n){var r=[],i=0,o=e.length;if(o<=n)return String.fromCharCode.apply(null,e);for(;i<o;)"array"===t||"nodebuffer"===t?r.push(String.fromCharCode.apply(null,e.slice(i,Math.min(i+n,o)))):r.push(String.fromCharCode.apply(null,e.subarray(i,Math.min(i+n,o)))),i+=n;return r.join("")},stringifyByChar:function(e){for(var t="",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t},applyCanBeUsed:{uint8array:function(){try{return i.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return!1}}(),nodebuffer:function(){try{return i.nodebuffer&&1===String.fromCharCode.apply(null,s.allocBuffer(1)).length}catch(e){return!1}}()}};function d(e){var t=65536,n=r.getTypeOf(e),i=!0;if("uint8array"===n?i=u.applyCanBeUsed.uint8array:"nodebuffer"===n&&(i=u.applyCanBeUsed.nodebuffer),i)for(;1<t;)try{return u.stringifyByChunk(e,n,t)}catch(e){t=Math.floor(t/2)}return u.stringifyByChar(e)}function h(e,t){for(var n=0;n<e.length;n++)t[n]=e[n];return t}r.applyFromCharCode=d;var p={};p.string={string:l,array:function(e){return c(e,new Array(e.length))},arraybuffer:function(e){return p.string.uint8array(e).buffer},uint8array:function(e){return c(e,new Uint8Array(e.length))},nodebuffer:function(e){return c(e,s.allocBuffer(e.length))}},p.array={string:d,array:l,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return s.newBufferFrom(e)}},p.arraybuffer={string:function(e){return d(new Uint8Array(e))},array:function(e){return h(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:l,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return s.newBufferFrom(new Uint8Array(e))}},p.uint8array={string:d,array:function(e){return h(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:l,nodebuffer:function(e){return s.newBufferFrom(e)}},p.nodebuffer={string:d,array:function(e){return h(e,new Array(e.length))},arraybuffer:function(e){return p.nodebuffer.uint8array(e).buffer},uint8array:function(e){return h(e,new Uint8Array(e.length))},nodebuffer:l},r.transformTo=function(e,t){if(t=t||"",!e)return t;r.checkSupport(e);var n=r.getTypeOf(t);return p[n][e](t)},r.resolve=function(e){for(var t=e.split("/"),n=[],r=0;r<t.length;r++){var i=t[r];"."===i||""===i&&0!==r&&r!==t.length-1||(".."===i?n.pop():n.push(i))}return n.join("/")},r.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":i.nodebuffer&&s.isBuffer(e)?"nodebuffer":i.uint8array&&e instanceof Uint8Array?"uint8array":i.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},r.checkSupport=function(e){if(!i[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},r.MAX_VALUE_16BITS=65535,r.MAX_VALUE_32BITS=-1,r.pretty=function(e){var t,n,r="";for(n=0;n<(e||"").length;n++)r+="\\x"+((t=e.charCodeAt(n))<16?"0":"")+t.toString(16).toUpperCase();return r},r.delay=function(e,t,r){n((function(){e.apply(r||null,t||[])}))},r.inherits=function(e,t){function n(){}n.prototype=t.prototype,e.prototype=new n},r.extend=function(){var e,t,n={};for(e=0;e<arguments.length;e++)for(t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&void 0===n[t]&&(n[t]=arguments[e][t]);return n},r.prepareContent=function(e,t,n,s,l){return a.Promise.resolve(t).then((function(e){return i.blob&&(e instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e)))&&"undefined"!=typeof FileReader?new a.Promise((function(t,n){var r=new FileReader;r.onload=function(e){t(e.target.result)},r.onerror=function(e){n(e.target.error)},r.readAsArrayBuffer(e)})):e})).then((function(t){var u=r.getTypeOf(t);return u?("arraybuffer"===u?t=r.transformTo("uint8array",t):"string"===u&&(l?t=o.decode(t):n&&!0!==s&&(t=function(e){return c(e,i.uint8array?new Uint8Array(e.length):new Array(e.length))}(t))),t):a.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,t,n){"use strict";var r=e("./reader/readerFor"),i=e("./utils"),o=e("./signature"),s=e("./zipEntry"),a=e("./support");function l(e){this.files=[],this.loadOptions=e}l.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(t)+", expected "+i.pretty(e)+")")}},isSignature:function(e,t){var n=this.reader.index;this.reader.setIndex(e);var r=this.reader.readString(4)===t;return this.reader.setIndex(n),r},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=a.uint8array?"uint8array":"array",n=i.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(n)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,n,r=this.zip64EndOfCentralSize-44;0<r;)e=this.reader.readInt(2),t=this.reader.readInt(4),n=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:n}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(o.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(e=new s({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);if(e<0)throw this.isSignature(0,o.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(e);var t=e;if(this.checkSignature(o.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,o.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var n=this.centralDirOffset+this.centralDirSize;this.zip64&&(n+=20,n+=12+this.zip64EndOfCentralSize);var r=t-n;if(0<r)this.isSignature(t,o.CENTRAL_FILE_HEADER)||(this.reader.zero=r);else if(r<0)throw new Error("Corrupted zip: missing "+Math.abs(r)+" bytes.")},prepareReader:function(e){this.reader=r(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=l},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(e,t,n){"use strict";var r=e("./reader/readerFor"),i=e("./utils"),o=e("./compressedObject"),s=e("./crc32"),a=e("./utf8"),l=e("./compressions"),c=e("./support");function u(e,t){this.options=e,this.loadOptions=t}u.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,n;if(e.skip(22),this.fileNameLength=e.readInt(2),n=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(n),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in l)if(Object.prototype.hasOwnProperty.call(l,t)&&l[t].magic===e)return l[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new o(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4<i;)t=e.readInt(2),n=e.readInt(2),r=e.readData(n),this.extraFields[t]={id:t,length:n,value:r};e.setIndex(i)},handleUTF8:function(){var e=c.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=a.utf8decode(this.fileName),this.fileCommentStr=a.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else{var n=i.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(n)}var r=this.findExtraFieldUnicodeComment();if(null!==r)this.fileCommentStr=r;else{var o=i.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(o)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=r(e.value);return 1!==t.readInt(1)||s(this.fileName)!==t.readInt(4)?null:a.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=r(e.value);return 1!==t.readInt(1)||s(this.fileComment)!==t.readInt(4)?null:a.utf8decode(t.readData(e.length-5))}return null}},t.exports=u},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,t,n){"use strict";function r(e,t,n){this.name=e,this.dir=n.dir,this.date=n.date,this.comment=n.comment,this.unixPermissions=n.unixPermissions,this.dosPermissions=n.dosPermissions,this._data=t,this._dataBinary=n.binary,this.options={compression:n.compression,compressionOptions:n.compressionOptions}}var i=e("./stream/StreamHelper"),o=e("./stream/DataWorker"),s=e("./utf8"),a=e("./compressedObject"),l=e("./stream/GenericWorker");r.prototype={internalStream:function(e){var t=null,n="string";try{if(!e)throw new Error("No output type specified.");var r="string"===(n=e.toLowerCase())||"text"===n;"binarystring"!==n&&"text"!==n||(n="string"),t=this._decompressWorker();var o=!this._dataBinary;o&&!r&&(t=t.pipe(new s.Utf8EncodeWorker)),!o&&r&&(t=t.pipe(new s.Utf8DecodeWorker))}catch(e){(t=new l("error")).error(e)}return new i(t,n,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof a&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var n=this._decompressWorker();return this._dataBinary||(n=n.pipe(new s.Utf8EncodeWorker)),a.createWorkerFrom(n,e,t)},_decompressWorker:function(){return this._data instanceof a?this._data.getContentWorker():this._data instanceof l?this._data:new o(this._data)}};for(var c=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],u=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},d=0;d<c.length;d++)r.prototype[c[d]]=u;t.exports=r},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,t,n){(function(e){"use strict";var n,r,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var o=0,s=new i(u),a=e.document.createTextNode("");s.observe(a,{characterData:!0}),n=function(){a.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)n="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){u(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(u,0)};else{var l=new e.MessageChannel;l.port1.onmessage=u,n=function(){l.port2.postMessage(0)}}var c=[];function u(){var e,t;r=!0;for(var n=c.length;n;){for(t=c,c=[],e=-1;++e<n;)t[e]();n=c.length}r=!1}t.exports=function(e){1!==c.push(e)||r||n()}}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(e,t,n){"use strict";var r=e("immediate");function i(){}var o={},s=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function c(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,e!==i&&p(this,e)}function u(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function d(e,t,n){r((function(){var r;try{r=t(n)}catch(r){return o.reject(e,r)}r===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,r)}))}function h(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function p(e,t){var n=!1;function r(t){n||(n=!0,o.reject(e,t))}function i(t){n||(n=!0,o.resolve(e,t))}var s=f((function(){t(i,r)}));"error"===s.status&&r(s.value)}function f(e,t){var n={};try{n.value=e(t),n.status="success"}catch(e){n.status="error",n.value=e}return n}(t.exports=c).prototype.finally=function(e){if("function"!=typeof e)return this;var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){throw n}))}))},c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===s)return this;var n=new this.constructor(i);return this.state!==l?d(n,this.state===a?e:t,this.outcome):this.queue.push(new u(n,e,t)),n},u.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},u.prototype.otherCallFulfilled=function(e){d(this.promise,this.onFulfilled,e)},u.prototype.callRejected=function(e){o.reject(this.promise,e)},u.prototype.otherCallRejected=function(e){d(this.promise,this.onRejected,e)},o.resolve=function(e,t){var n=f(h,t);if("error"===n.status)return o.reject(e,n.value);var r=n.value;if(r)p(e,r);else{e.state=a,e.outcome=t;for(var i=-1,s=e.queue.length;++i<s;)e.queue[i].callFulfilled(t)}return e},o.reject=function(e,t){e.state=s,e.outcome=t;for(var n=-1,r=e.queue.length;++n<r;)e.queue[n].callRejected(t);return e},c.resolve=function(e){return e instanceof this?e:o.resolve(new this(i),e)},c.reject=function(e){var t=new this(i);return o.reject(t,e)},c.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var s=new Array(n),a=0,l=-1,c=new this(i);++l<n;)u(e[l],l);return c;function u(e,i){t.resolve(e).then((function(e){s[i]=e,++a!==n||r||(r=!0,o.resolve(c,s))}),(function(e){r||(r=!0,o.reject(c,e))}))}},c.race=function(e){if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var t=e.length,n=!1;if(!t)return this.resolve([]);for(var r,s=-1,a=new this(i);++s<t;)r=e[s],this.resolve(r).then((function(e){n||(n=!0,o.resolve(a,e))}),(function(e){n||(n=!0,o.reject(a,e))}));return a}},{immediate:36}],38:[function(e,t,n){"use strict";var r={};(0,e("./lib/utils/common").assign)(r,e("./lib/deflate"),e("./lib/inflate"),e("./lib/zlib/constants")),t.exports=r},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(e,t,n){"use strict";var r=e("./zlib/deflate"),i=e("./utils/common"),o=e("./utils/strings"),s=e("./zlib/messages"),a=e("./zlib/zstream"),l=Object.prototype.toString;function c(e){if(!(this instanceof c))return new c(e);this.options=i.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&0<t.windowBits?t.windowBits=-t.windowBits:t.gzip&&0<t.windowBits&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var n=r.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw new Error(s[n]);if(t.header&&r.deflateSetHeader(this.strm,t.header),t.dictionary){var u;if(u="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=r.deflateSetDictionary(this.strm,u)))throw new Error(s[n]);this._dict_set=!0}}function u(e,t){var n=new c(t);if(n.push(e,!0),n.err)throw n.msg||s[n.err];return n.result}c.prototype.push=function(e,t){var n,s,a=this.strm,c=this.options.chunkSize;if(this.ended)return!1;s=t===~~t?t:!0===t?4:0,"string"==typeof e?a.input=o.string2buf(e):"[object ArrayBuffer]"===l.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new i.Buf8(c),a.next_out=0,a.avail_out=c),1!==(n=r.deflate(a,s))&&0!==n)return this.onEnd(n),!(this.ended=!0);0!==a.avail_out&&(0!==a.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(o.buf2binstring(i.shrinkBuf(a.output,a.next_out))):this.onData(i.shrinkBuf(a.output,a.next_out)))}while((0<a.avail_in||0===a.avail_out)&&1!==n);return 4===s?(n=r.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,0===n):2!==s||(this.onEnd(0),!(a.avail_out=0))},c.prototype.onData=function(e){this.chunks.push(e)},c.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Deflate=c,n.deflate=u,n.deflateRaw=function(e,t){return(t=t||{}).raw=!0,u(e,t)},n.gzip=function(e,t){return(t=t||{}).gzip=!0,u(e,t)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,t,n){"use strict";var r=e("./zlib/inflate"),i=e("./utils/common"),o=e("./utils/strings"),s=e("./zlib/constants"),a=e("./zlib/messages"),l=e("./zlib/zstream"),c=e("./zlib/gzheader"),u=Object.prototype.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=r.inflateInit2(this.strm,t.windowBits);if(n!==s.Z_OK)throw new Error(a[n]);this.header=new c,r.inflateGetHeader(this.strm,this.header)}function h(e,t){var n=new d(t);if(n.push(e,!0),n.err)throw n.msg||a[n.err];return n.result}d.prototype.push=function(e,t){var n,a,l,c,d,h,p=this.strm,f=this.options.chunkSize,m=this.options.dictionary,g=!1;if(this.ended)return!1;a=t===~~t?t:!0===t?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof e?p.input=o.binstring2buf(e):"[object ArrayBuffer]"===u.call(e)?p.input=new Uint8Array(e):p.input=e,p.next_in=0,p.avail_in=p.input.length;do{if(0===p.avail_out&&(p.output=new i.Buf8(f),p.next_out=0,p.avail_out=f),(n=r.inflate(p,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&m&&(h="string"==typeof m?o.string2buf(m):"[object ArrayBuffer]"===u.call(m)?new Uint8Array(m):m,n=r.inflateSetDictionary(this.strm,h)),n===s.Z_BUF_ERROR&&!0===g&&(n=s.Z_OK,g=!1),n!==s.Z_STREAM_END&&n!==s.Z_OK)return this.onEnd(n),!(this.ended=!0);p.next_out&&(0!==p.avail_out&&n!==s.Z_STREAM_END&&(0!==p.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(l=o.utf8border(p.output,p.next_out),c=p.next_out-l,d=o.buf2string(p.output,l),p.next_out=c,p.avail_out=f-c,c&&i.arraySet(p.output,p.output,l,c,0),this.onData(d)):this.onData(i.shrinkBuf(p.output,p.next_out)))),0===p.avail_in&&0===p.avail_out&&(g=!0)}while((0<p.avail_in||0===p.avail_out)&&n!==s.Z_STREAM_END);return n===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(n=r.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),!(p.avail_out=0))},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Inflate=d,n.inflate=h,n.inflateRaw=function(e,t){return(t=t||{}).raw=!0,h(e,t)},n.ungzip=h},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(e,t,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;n.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}}return e},n.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(var o=0;o<r;o++)e[i+o]=t[n+o]},flattenChunks:function(e){var t,n,r,i,o,s;for(t=r=0,n=e.length;t<n;t++)r+=e[t].length;for(s=new Uint8Array(r),t=i=0,n=e.length;t<n;t++)o=e[t],s.set(o,i),i+=o.length;return s}},o={arraySet:function(e,t,n,r,i){for(var o=0;o<r;o++)e[i+o]=t[n+o]},flattenChunks:function(e){return[].concat.apply([],e)}};n.setTyped=function(e){e?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,i)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,o))},n.setTyped(r)},{}],42:[function(e,t,n){"use strict";var r=e("./common"),i=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){o=!1}for(var s=new r.Buf8(256),a=0;a<256;a++)s[a]=252<=a?6:248<=a?5:240<=a?4:224<=a?3:192<=a?2:1;function l(e,t){if(t<65537&&(e.subarray&&o||!e.subarray&&i))return String.fromCharCode.apply(null,r.shrinkBuf(e,t));for(var n="",s=0;s<t;s++)n+=String.fromCharCode(e[s]);return n}s[254]=s[254]=1,n.string2buf=function(e){var t,n,i,o,s,a=e.length,l=0;for(o=0;o<a;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<a&&56320==(64512&(i=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(i-56320),o++),l+=n<128?1:n<2048?2:n<65536?3:4;for(t=new r.Buf8(l),o=s=0;s<l;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<a&&56320==(64512&(i=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(i-56320),o++),n<128?t[s++]=n:(n<2048?t[s++]=192|n>>>6:(n<65536?t[s++]=224|n>>>12:(t[s++]=240|n>>>18,t[s++]=128|n>>>12&63),t[s++]=128|n>>>6&63),t[s++]=128|63&n);return t},n.buf2binstring=function(e){return l(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n<i;n++)t[n]=e.charCodeAt(n);return t},n.buf2string=function(e,t){var n,r,i,o,a=t||e.length,c=new Array(2*a);for(n=r=0;n<a;)if((i=e[n++])<128)c[r++]=i;else if(4<(o=s[i]))c[r++]=65533,n+=o-1;else{for(i&=2===o?31:3===o?15:7;1<o&&n<a;)i=i<<6|63&e[n++],o--;1<o?c[r++]=65533:i<65536?c[r++]=i:(i-=65536,c[r++]=55296|i>>10&1023,c[r++]=56320|1023&i)}return l(c,r)},n.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return n<0||0===n?t:n+s[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){for(var i=65535&e|0,o=e>>>16&65535|0,s=0;0!==n;){for(n-=s=2e3<n?2e3:n;o=o+(i=i+t[r++]|0)|0,--s;);i%=65521,o%=65521}return i|o<<16|0}},{}],44:[function(e,t,n){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(e,t,n){"use strict";var r=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,i){var o=r,s=i+n;e^=-1;for(var a=i;a<s;a++)e=e>>>8^o[255&(e^t[a])];return-1^e}},{}],46:[function(e,t,n){"use strict";var r,i=e("../utils/common"),o=e("./trees"),s=e("./adler32"),a=e("./crc32"),l=e("./messages"),c=-2,u=258,d=262,h=113;function p(e,t){return e.msg=l[t],t}function f(e){return(e<<1)-(4<e?9:0)}function m(e){for(var t=e.length;0<=--t;)e[t]=0}function g(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function b(e,t){o._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,g(e.strm)}function v(e,t){e.pending_buf[e.pending++]=t}function y(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function S(e,t){var n,r,i=e.max_chain_length,o=e.strstart,s=e.prev_length,a=e.nice_match,l=e.strstart>e.w_size-d?e.strstart-(e.w_size-d):0,c=e.window,h=e.w_mask,p=e.prev,f=e.strstart+u,m=c[o+s-1],g=c[o+s];e.prev_length>=e.good_match&&(i>>=2),a>e.lookahead&&(a=e.lookahead);do{if(c[(n=t)+s]===g&&c[n+s-1]===m&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&o<f);if(r=u-(f-o),o=f-u,s<r){if(e.match_start=t,a<=(s=r))break;m=c[o+s-1],g=c[o+s]}}}while((t=p[t&h])>l&&0!=--i);return s<=e.lookahead?s:e.lookahead}function _(e){var t,n,r,o,l,c,u,h,p,f,m=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-d)){for(i.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=n=e.hash_size;r=e.head[--t],e.head[t]=m<=r?r-m:0,--n;);for(t=n=m;r=e.prev[--t],e.prev[t]=m<=r?r-m:0,--n;);o+=m}if(0===e.strm.avail_in)break;if(c=e.strm,u=e.window,h=e.strstart+e.lookahead,f=void 0,(p=o)<(f=c.avail_in)&&(f=p),n=0===f?0:(c.avail_in-=f,i.arraySet(u,c.input,c.next_in,f,h),1===c.state.wrap?c.adler=s(c.adler,u,f,h):2===c.state.wrap&&(c.adler=a(c.adler,u,f,h)),c.next_in+=f,c.total_in+=f,f),e.lookahead+=n,e.lookahead+e.insert>=3)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+3-1])&e.hash_mask,e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<d&&0!==e.strm.avail_in)}function x(e,t){for(var n,r;;){if(e.lookahead<d){if(_(e),e.lookahead<d&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-d&&(e.match_length=S(e,n)),e.match_length>=3)if(r=o._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,0!=--e.match_length;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(b(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(b(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(b(e,!1),0===e.strm.avail_out)?1:2}function w(e,t){for(var n,r,i;;){if(e.lookahead<d){if(_(e),e.lookahead<d&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-d&&(e.match_length=S(e,n),e.match_length<=5&&(1===e.strategy||3===e.match_length&&4096<e.strstart-e.match_start)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-3,r=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!=--e.prev_length;);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(b(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=o._tr_tally(e,0,e.window[e.strstart-1]))&&b(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=o._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(b(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(b(e,!1),0===e.strm.avail_out)?1:2}function k(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}function O(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),m(this.dyn_ltree),m(this.dyn_dtree),m(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),m(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),m(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function E(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:h,e.adler=2===t.wrap?0:1,t.last_flush=0,o._tr_init(t),0):p(e,c)}function A(e){var t=E(e);return 0===t&&function(e){e.window_size=2*e.w_size,m(e.head),e.max_lazy_match=r[e.level].max_lazy,e.good_match=r[e.level].good_length,e.nice_match=r[e.level].nice_length,e.max_chain_length=r[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0}(e.state),t}function T(e,t,n,r,o,s){if(!e)return c;var a=1;if(-1===t&&(t=6),r<0?(a=0,r=-r):15<r&&(a=2,r-=16),o<1||9<o||8!==n||r<8||15<r||t<0||9<t||s<0||4<s)return p(e,c);8===r&&(r=9);var l=new O;return(e.state=l).strm=e,l.wrap=a,l.gzhead=null,l.w_bits=r,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=o+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+3-1)/3),l.window=new i.Buf8(2*l.w_size),l.head=new i.Buf16(l.hash_size),l.prev=new i.Buf16(l.w_size),l.lit_bufsize=1<<o+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new i.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=t,l.strategy=s,l.method=n,A(e)}r=[new k(0,0,0,0,(function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(_(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,b(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-d&&(b(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(b(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(b(e,!1),e.strm.avail_out),1)})),new k(4,4,8,4,x),new k(4,5,16,8,x),new k(4,6,32,32,x),new k(4,4,16,16,w),new k(8,16,32,32,w),new k(8,16,128,128,w),new k(8,32,128,256,w),new k(32,128,258,1024,w),new k(32,258,258,4096,w)],n.deflateInit=function(e,t){return T(e,t,8,15,8,0)},n.deflateInit2=T,n.deflateReset=A,n.deflateResetKeep=E,n.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?c:(e.state.gzhead=t,0):c},n.deflate=function(e,t){var n,i,s,l;if(!e||!e.state||5<t||t<0)return e?p(e,c):c;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||666===i.status&&4!==t)return p(e,0===e.avail_out?-5:c);if(i.strm=e,n=i.last_flush,i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,v(i,31),v(i,139),v(i,8),i.gzhead?(v(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),v(i,255&i.gzhead.time),v(i,i.gzhead.time>>8&255),v(i,i.gzhead.time>>16&255),v(i,i.gzhead.time>>24&255),v(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),v(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(v(i,255&i.gzhead.extra.length),v(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=a(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(v(i,0),v(i,0),v(i,0),v(i,0),v(i,0),v(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),v(i,3),i.status=h);else{var d=8+(i.w_bits-8<<4)<<8;d|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(d|=32),d+=31-d%31,i.status=h,y(i,d),0!==i.strstart&&(y(i,e.adler>>>16),y(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),g(e),s=i.pending,i.pending!==i.pending_buf_size));)v(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),g(e),s=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,v(i,l)}while(0!==l);i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===l&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),g(e),s=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,v(i,l)}while(0!==l);i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===l&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&g(e),i.pending+2<=i.pending_buf_size&&(v(i,255&e.adler),v(i,e.adler>>8&255),e.adler=0,i.status=h)):i.status=h),0!==i.pending){if(g(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&f(t)<=f(n)&&4!==t)return p(e,-5);if(666===i.status&&0!==e.avail_in)return p(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&666!==i.status){var S=2===i.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(_(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(b(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(b(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(b(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var n,r,i,s,a=e.window;;){if(e.lookahead<=u){if(_(e),e.lookahead<=u&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&0<e.strstart&&(r=a[i=e.strstart-1])===a[++i]&&r===a[++i]&&r===a[++i]){s=e.strstart+u;do{}while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<s);e.match_length=u-(s-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=o._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(b(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(b(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(b(e,!1),0===e.strm.avail_out)?1:2}(i,t):r[i.level].func(i,t);if(3!==S&&4!==S||(i.status=666),1===S||3===S)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===S&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(m(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),g(e),0===e.avail_out))return i.last_flush=-1,0}return 4!==t?0:i.wrap<=0?1:(2===i.wrap?(v(i,255&e.adler),v(i,e.adler>>8&255),v(i,e.adler>>16&255),v(i,e.adler>>24&255),v(i,255&e.total_in),v(i,e.total_in>>8&255),v(i,e.total_in>>16&255),v(i,e.total_in>>24&255)):(y(i,e.adler>>>16),y(i,65535&e.adler)),g(e),0<i.wrap&&(i.wrap=-i.wrap),0!==i.pending?0:1)},n.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&t!==h&&666!==t?p(e,c):(e.state=null,t===h?p(e,-3):0):c},n.deflateSetDictionary=function(e,t){var n,r,o,a,l,u,d,h,p=t.length;if(!e||!e.state)return c;if(2===(a=(n=e.state).wrap)||1===a&&42!==n.status||n.lookahead)return c;for(1===a&&(e.adler=s(e.adler,t,p,0)),n.wrap=0,p>=n.w_size&&(0===a&&(m(n.head),n.strstart=0,n.block_start=0,n.insert=0),h=new i.Buf8(n.w_size),i.arraySet(h,t,p-n.w_size,n.w_size,0),t=h,p=n.w_size),l=e.avail_in,u=e.next_in,d=e.input,e.avail_in=p,e.next_in=0,e.input=t,_(n);n.lookahead>=3;){for(r=n.strstart,o=n.lookahead-2;n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+3-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++,--o;);n.strstart=r,n.lookahead=2,_(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=u,e.input=d,e.avail_in=l,n.wrap=a,0},n.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,t,n){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(e,t,n){"use strict";t.exports=function(e,t){var n,r,i,o,s,a,l,c,u,d,h,p,f,m,g,b,v,y,S,_,x,w,k,O,E;n=e.state,r=e.next_in,O=e.input,i=r+(e.avail_in-5),o=e.next_out,E=e.output,s=o-(t-e.avail_out),a=o+(e.avail_out-257),l=n.dmax,c=n.wsize,u=n.whave,d=n.wnext,h=n.window,p=n.hold,f=n.bits,m=n.lencode,g=n.distcode,b=(1<<n.lenbits)-1,v=(1<<n.distbits)-1;e:do{f<15&&(p+=O[r++]<<f,f+=8,p+=O[r++]<<f,f+=8),y=m[p&b];t:for(;;){if(p>>>=S=y>>>24,f-=S,0==(S=y>>>16&255))E[o++]=65535&y;else{if(!(16&S)){if(0==(64&S)){y=m[(65535&y)+(p&(1<<S)-1)];continue t}if(32&S){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}_=65535&y,(S&=15)&&(f<S&&(p+=O[r++]<<f,f+=8),_+=p&(1<<S)-1,p>>>=S,f-=S),f<15&&(p+=O[r++]<<f,f+=8,p+=O[r++]<<f,f+=8),y=g[p&v];n:for(;;){if(p>>>=S=y>>>24,f-=S,!(16&(S=y>>>16&255))){if(0==(64&S)){y=g[(65535&y)+(p&(1<<S)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(x=65535&y,f<(S&=15)&&(p+=O[r++]<<f,(f+=8)<S&&(p+=O[r++]<<f,f+=8)),l<(x+=p&(1<<S)-1)){e.msg="invalid distance too far back",n.mode=30;break e}if(p>>>=S,f-=S,(S=o-s)<x){if(u<(S=x-S)&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(k=h,(w=0)===d){if(w+=c-S,S<_){for(_-=S;E[o++]=h[w++],--S;);w=o-x,k=E}}else if(d<S){if(w+=c+d-S,(S-=d)<_){for(_-=S;E[o++]=h[w++],--S;);if(w=0,d<_){for(_-=S=d;E[o++]=h[w++],--S;);w=o-x,k=E}}}else if(w+=d-S,S<_){for(_-=S;E[o++]=h[w++],--S;);w=o-x,k=E}for(;2<_;)E[o++]=k[w++],E[o++]=k[w++],E[o++]=k[w++],_-=3;_&&(E[o++]=k[w++],1<_&&(E[o++]=k[w++]))}else{for(w=o-x;E[o++]=E[w++],E[o++]=E[w++],E[o++]=E[w++],2<(_-=3););_&&(E[o++]=E[w++],1<_&&(E[o++]=E[w++]))}break}}break}}while(r<i&&o<a);r-=_=f>>3,p&=(1<<(f-=_<<3))-1,e.next_in=r,e.next_out=o,e.avail_in=r<i?i-r+5:5-(r-i),e.avail_out=o<a?a-o+257:257-(o-a),n.hold=p,n.bits=f}},{}],49:[function(e,t,n){"use strict";var r=e("../utils/common"),i=e("./adler32"),o=e("./crc32"),s=e("./inffast"),a=e("./inftrees"),l=-2;function c(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function u(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function d(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(852),t.distcode=t.distdyn=new r.Buf32(592),t.sane=1,t.back=-1,0):l}function h(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,d(e)):l}function p(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?l:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,h(e))):l}function f(e,t){var n,r;return e?(r=new u,(e.state=r).window=null,0!==(n=p(e,t))&&(e.state=null),n):l}var m,g,b=!0;function v(e){if(b){var t;for(m=new r.Buf32(512),g=new r.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(1,e.lens,0,288,m,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(2,e.lens,0,32,g,0,e.work,{bits:5}),b=!1}e.lencode=m,e.lenbits=9,e.distcode=g,e.distbits=5}function y(e,t,n,i){var o,s=e.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new r.Buf8(s.wsize)),i>=s.wsize?(r.arraySet(s.window,t,n-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(i<(o=s.wsize-s.wnext)&&(o=i),r.arraySet(s.window,t,n-i,o,s.wnext),(i-=o)?(r.arraySet(s.window,t,n-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=o))),0}n.inflateReset=h,n.inflateReset2=p,n.inflateResetKeep=d,n.inflateInit=function(e){return f(e,15)},n.inflateInit2=f,n.inflate=function(e,t){var n,u,d,h,p,f,m,g,b,S,_,x,w,k,O,E,A,T,C,M,$,P,R,j,N=0,D=new r.Buf8(4),I=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return l;12===(n=e.state).mode&&(n.mode=13),p=e.next_out,d=e.output,m=e.avail_out,h=e.next_in,u=e.input,f=e.avail_in,g=n.hold,b=n.bits,S=f,_=m,P=0;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;b<16;){if(0===f)break e;f--,g+=u[h++]<<b,b+=8}if(2&n.wrap&&35615===g){D[n.check=0]=255&g,D[1]=g>>>8&255,n.check=o(n.check,D,2,0),b=g=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&g)<<8)+(g>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&g)){e.msg="unknown compression method",n.mode=30;break}if(b-=4,$=8+(15&(g>>>=4)),0===n.wbits)n.wbits=$;else if($>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<<$,e.adler=n.check=1,n.mode=512&g?10:12,b=g=0;break;case 2:for(;b<16;){if(0===f)break e;f--,g+=u[h++]<<b,b+=8}if(n.flags=g,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=30;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=30;break}n.head&&(n.head.text=g>>8&1),512&n.flags&&(D[0]=255&g,D[1]=g>>>8&255,n.check=o(n.check,D,2,0)),b=g=0,n.mode=3;case 3:for(;b<32;){if(0===f)break e;f--,g+=u[h++]<<b,b+=8}n.head&&(n.head.time=g),512&n.flags&&(D[0]=255&g,D[1]=g>>>8&255,D[2]=g>>>16&255,D[3]=g>>>24&255,n.check=o(n.check,D,4,0)),b=g=0,n.mode=4;case 4:for(;b<16;){if(0===f)break e;f--,g+=u[h++]<<b,b+=8}n.head&&(n.head.xflags=255&g,n.head.os=g>>8),512&n.flags&&(D[0]=255&g,D[1]=g>>>8&255,n.check=o(n.check,D,2,0)),b=g=0,n.mode=5;case 5:if(1024&n.flags){for(;b<16;){if(0===f)break e;f--,g+=u[h++]<<b,b+=8}n.length=g,n.head&&(n.head.extra_len=g),512&n.flags&&(D[0]=255&g,D[1]=g>>>8&255,n.check=o(n.check,D,2,0)),b=g=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(f<(x=n.length)&&(x=f),x&&(n.head&&($=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,u,h,x,$)),512&n.flags&&(n.check=o(n.check,u,x,h)),f-=x,h+=x,n.length-=x),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===f)break e;for(x=0;$=u[h+x++],n.head&&$&&n.length<65536&&(n.head.name+=String.fromCharCode($)),$&&x<f;);if(512&n.flags&&(n.check=o(n.check,u,x,h)),f-=x,h+=x,$)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===f)break e;for(x=0;$=u[h+x++],n.head&&$&&n.length<65536&&(n.head.comment+=String.fromCharCode($)),$&&x<f;);if(512&n.flags&&(n.check=o(n.check,u,x,h)),f-=x,h+=x,$)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;b<16;){if(0===f)break e;f--,g+=u[h++]<<b,b+=8}if(g!==(65535&n.check)){e.msg="header crc mismatch",n.mode=30;break}b=g=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;b<32;){if(0===f)break e;f--,g+=u[h++]<<b,b+=8}e.adler=n.check=c(g),b=g=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=p,e.avail_out=m,e.next_in=h,e.avail_in=f,n.hold=g,n.bits=b,2;e.adler=n.check=1,n.mode=12;case 12:if(5===t||6===t)break e;case 13:if(n.last){g>>>=7&b,b-=7&b,n.mode=27;break}for(;b<3;){if(0===f)break e;f--,g+=u[h++]<<b,b+=8}switch(n.last=1&g,b-=1,3&(g>>>=1)){case 0:n.mode=14;break;case 1:if(v(n),n.mode=20,6!==t)break;g>>>=2,b-=2;break e;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}g>>>=2,b-=2;break;case 14:for(g>>>=7&b,b-=7&b;b<32;){if(0===f)break e;f--,g+=u[h++]<<b,b+=8}if((65535&g)!=(g>>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&g,b=g=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(x=n.length){if(f<x&&(x=f),m<x&&(x=m),0===x)break e;r.arraySet(d,u,h,x,p),f-=x,h+=x,m-=x,p+=x,n.length-=x;break}n.mode=12;break;case 17:for(;b<14;){if(0===f)break e;f--,g+=u[h++]<<b,b+=8}if(n.nlen=257+(31&g),g>>>=5,b-=5,n.ndist=1+(31&g),g>>>=5,b-=5,n.ncode=4+(15&g),g>>>=4,b-=4,286<n.nlen||30<n.ndist){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;b<3;){if(0===f)break e;f--,g+=u[h++]<<b,b+=8}n.lens[I[n.have++]]=7&g,g>>>=3,b-=3}for(;n.have<19;)n.lens[I[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,R={bits:n.lenbits},P=a(0,n.lens,0,19,n.lencode,0,n.work,R),n.lenbits=R.bits,P){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;E=(N=n.lencode[g&(1<<n.lenbits)-1])>>>16&255,A=65535&N,!((O=N>>>24)<=b);){if(0===f)break e;f--,g+=u[h++]<<b,b+=8}if(A<16)g>>>=O,b-=O,n.lens[n.have++]=A;else{if(16===A){for(j=O+2;b<j;){if(0===f)break e;f--,g+=u[h++]<<b,b+=8}if(g>>>=O,b-=O,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}$=n.lens[n.have-1],x=3+(3&g),g>>>=2,b-=2}else if(17===A){for(j=O+3;b<j;){if(0===f)break e;f--,g+=u[h++]<<b,b+=8}b-=O,$=0,x=3+(7&(g>>>=O)),g>>>=3,b-=3}else{for(j=O+7;b<j;){if(0===f)break e;f--,g+=u[h++]<<b,b+=8}b-=O,$=0,x=11+(127&(g>>>=O)),g>>>=7,b-=7}if(n.have+x>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;x--;)n.lens[n.have++]=$}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,R={bits:n.lenbits},P=a(1,n.lens,0,n.nlen,n.lencode,0,n.work,R),n.lenbits=R.bits,P){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,R={bits:n.distbits},P=a(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,R),n.distbits=R.bits,P){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(6<=f&&258<=m){e.next_out=p,e.avail_out=m,e.next_in=h,e.avail_in=f,n.hold=g,n.bits=b,s(e,_),p=e.next_out,d=e.output,m=e.avail_out,h=e.next_in,u=e.input,f=e.avail_in,g=n.hold,b=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;E=(N=n.lencode[g&(1<<n.lenbits)-1])>>>16&255,A=65535&N,!((O=N>>>24)<=b);){if(0===f)break e;f--,g+=u[h++]<<b,b+=8}if(E&&0==(240&E)){for(T=O,C=E,M=A;E=(N=n.lencode[M+((g&(1<<T+C)-1)>>T)])>>>16&255,A=65535&N,!(T+(O=N>>>24)<=b);){if(0===f)break e;f--,g+=u[h++]<<b,b+=8}g>>>=T,b-=T,n.back+=T}if(g>>>=O,b-=O,n.back+=O,n.length=A,0===E){n.mode=26;break}if(32&E){n.back=-1,n.mode=12;break}if(64&E){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&E,n.mode=22;case 22:if(n.extra){for(j=n.extra;b<j;){if(0===f)break e;f--,g+=u[h++]<<b,b+=8}n.length+=g&(1<<n.extra)-1,g>>>=n.extra,b-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;E=(N=n.distcode[g&(1<<n.distbits)-1])>>>16&255,A=65535&N,!((O=N>>>24)<=b);){if(0===f)break e;f--,g+=u[h++]<<b,b+=8}if(0==(240&E)){for(T=O,C=E,M=A;E=(N=n.distcode[M+((g&(1<<T+C)-1)>>T)])>>>16&255,A=65535&N,!(T+(O=N>>>24)<=b);){if(0===f)break e;f--,g+=u[h++]<<b,b+=8}g>>>=T,b-=T,n.back+=T}if(g>>>=O,b-=O,n.back+=O,64&E){e.msg="invalid distance code",n.mode=30;break}n.offset=A,n.extra=15&E,n.mode=24;case 24:if(n.extra){for(j=n.extra;b<j;){if(0===f)break e;f--,g+=u[h++]<<b,b+=8}n.offset+=g&(1<<n.extra)-1,g>>>=n.extra,b-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===m)break e;if(x=_-m,n.offset>x){if((x=n.offset-x)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}w=x>n.wnext?(x-=n.wnext,n.wsize-x):n.wnext-x,x>n.length&&(x=n.length),k=n.window}else k=d,w=p-n.offset,x=n.length;for(m<x&&(x=m),m-=x,n.length-=x;d[p++]=k[w++],--x;);0===n.length&&(n.mode=21);break;case 26:if(0===m)break e;d[p++]=n.length,m--,n.mode=21;break;case 27:if(n.wrap){for(;b<32;){if(0===f)break e;f--,g|=u[h++]<<b,b+=8}if(_-=m,e.total_out+=_,n.total+=_,_&&(e.adler=n.check=n.flags?o(n.check,d,_,p-_):i(n.check,d,_,p-_)),_=m,(n.flags?g:c(g))!==n.check){e.msg="incorrect data check",n.mode=30;break}b=g=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;b<32;){if(0===f)break e;f--,g+=u[h++]<<b,b+=8}if(g!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=30;break}b=g=0}n.mode=29;case 29:P=1;break e;case 30:P=-3;break e;case 31:return-4;case 32:default:return l}return e.next_out=p,e.avail_out=m,e.next_in=h,e.avail_in=f,n.hold=g,n.bits=b,(n.wsize||_!==e.avail_out&&n.mode<30&&(n.mode<27||4!==t))&&y(e,e.output,e.next_out,_-e.avail_out)?(n.mode=31,-4):(S-=e.avail_in,_-=e.avail_out,e.total_in+=S,e.total_out+=_,n.total+=_,n.wrap&&_&&(e.adler=n.check=n.flags?o(n.check,d,_,e.next_out-_):i(n.check,d,_,e.next_out-_)),e.data_type=n.bits+(n.last?64:0)+(12===n.mode?128:0)+(20===n.mode||15===n.mode?256:0),(0==S&&0===_||4===t)&&0===P&&(P=-5),P)},n.inflateEnd=function(e){if(!e||!e.state)return l;var t=e.state;return t.window&&(t.window=null),e.state=null,0},n.inflateGetHeader=function(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?l:((n.head=t).done=!1,0):l},n.inflateSetDictionary=function(e,t){var n,r=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?l:11===n.mode&&i(1,t,r,0)!==n.check?-3:y(e,t,r,r)?(n.mode=31,-4):(n.havedict=1,0):l},n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,t,n){"use strict";var r=e("../utils/common"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,n,l,c,u,d,h){var p,f,m,g,b,v,y,S,_,x=h.bits,w=0,k=0,O=0,E=0,A=0,T=0,C=0,M=0,$=0,P=0,R=null,j=0,N=new r.Buf16(16),D=new r.Buf16(16),I=null,L=0;for(w=0;w<=15;w++)N[w]=0;for(k=0;k<l;k++)N[t[n+k]]++;for(A=x,E=15;1<=E&&0===N[E];E--);if(E<A&&(A=E),0===E)return c[u++]=20971520,c[u++]=20971520,h.bits=1,0;for(O=1;O<E&&0===N[O];O++);for(A<O&&(A=O),w=M=1;w<=15;w++)if(M<<=1,(M-=N[w])<0)return-1;if(0<M&&(0===e||1!==E))return-1;for(D[1]=0,w=1;w<15;w++)D[w+1]=D[w]+N[w];for(k=0;k<l;k++)0!==t[n+k]&&(d[D[t[n+k]]++]=k);if(v=0===e?(R=I=d,19):1===e?(R=i,j-=257,I=o,L-=257,256):(R=s,I=a,-1),w=O,b=u,C=k=P=0,m=-1,g=($=1<<(T=A))-1,1===e&&852<$||2===e&&592<$)return 1;for(;;){for(y=w-C,_=d[k]<v?(S=0,d[k]):d[k]>v?(S=I[L+d[k]],R[j+d[k]]):(S=96,0),p=1<<w-C,O=f=1<<T;c[b+(P>>C)+(f-=p)]=y<<24|S<<16|_|0,0!==f;);for(p=1<<w-1;P&p;)p>>=1;if(0!==p?(P&=p-1,P+=p):P=0,k++,0==--N[w]){if(w===E)break;w=t[n+d[k]]}if(A<w&&(P&g)!==m){for(0===C&&(C=A),b+=O,M=1<<(T=w-C);T+C<E&&!((M-=N[T+C])<=0);)T++,M<<=1;if($+=1<<T,1===e&&852<$||2===e&&592<$)return 1;c[m=P&g]=A<<24|T<<16|b-u|0}}return 0!==P&&(c[b+P]=w-C<<24|64<<16|0),h.bits=A,0}},{"../utils/common":41}],51:[function(e,t,n){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(e,t,n){"use strict";var r=e("../utils/common");function i(e){for(var t=e.length;0<=--t;)e[t]=0}var o=256,s=286,a=30,l=15,c=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],u=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],h=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=new Array(576);i(p);var f=new Array(60);i(f);var m=new Array(512);i(m);var g=new Array(256);i(g);var b=new Array(29);i(b);var v,y,S,_=new Array(a);function x(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function w(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function k(e){return e<256?m[e]:m[256+(e>>>7)]}function O(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function E(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,O(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function A(e,t,n){E(e,n[2*t],n[2*t+1])}function T(e,t){for(var n=0;n|=1&e,e>>>=1,n<<=1,0<--t;);return n>>>1}function C(e,t,n){var r,i,o=new Array(16),s=0;for(r=1;r<=l;r++)o[r]=s=s+n[r-1]<<1;for(i=0;i<=t;i++){var a=e[2*i+1];0!==a&&(e[2*i]=T(o[a]++,a))}}function M(e){var t;for(t=0;t<s;t++)e.dyn_ltree[2*t]=0;for(t=0;t<a;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function $(e){8<e.bi_valid?O(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function P(e,t,n,r){var i=2*t,o=2*n;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]}function R(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&P(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!P(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function j(e,t,n){var r,i,s,a,l=0;if(0!==e.last_lit)for(;r=e.pending_buf[e.d_buf+2*l]<<8|e.pending_buf[e.d_buf+2*l+1],i=e.pending_buf[e.l_buf+l],l++,0===r?A(e,i,t):(A(e,(s=g[i])+o+1,t),0!==(a=c[s])&&E(e,i-=b[s],a),A(e,s=k(--r),n),0!==(a=u[s])&&E(e,r-=_[s],a)),l<e.last_lit;);A(e,256,t)}function N(e,t){var n,r,i,o=t.dyn_tree,s=t.stat_desc.static_tree,a=t.stat_desc.has_stree,c=t.stat_desc.elems,u=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<c;n++)0!==o[2*n]?(e.heap[++e.heap_len]=u=n,e.depth[n]=0):o[2*n+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=u<2?++u:0)]=1,e.depth[i]=0,e.opt_len--,a&&(e.static_len-=s[2*i+1]);for(t.max_code=u,n=e.heap_len>>1;1<=n;n--)R(e,o,n);for(i=c;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],R(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*i]=o[2*n]+o[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=i,e.heap[1]=i++,R(e,o,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,o,s,a,c=t.dyn_tree,u=t.max_code,d=t.stat_desc.static_tree,h=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,f=t.stat_desc.extra_base,m=t.stat_desc.max_length,g=0;for(o=0;o<=l;o++)e.bl_count[o]=0;for(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)m<(o=c[2*c[2*(r=e.heap[n])+1]+1]+1)&&(o=m,g++),c[2*r+1]=o,u<r||(e.bl_count[o]++,s=0,f<=r&&(s=p[r-f]),a=c[2*r],e.opt_len+=a*(o+s),h&&(e.static_len+=a*(d[2*r+1]+s)));if(0!==g){do{for(o=m-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[m]--,g-=2}while(0<g);for(o=m;0!==o;o--)for(r=e.bl_count[o];0!==r;)u<(i=e.heap[--n])||(c[2*i+1]!==o&&(e.opt_len+=(o-c[2*i+1])*c[2*i],c[2*i+1]=o),r--)}}(e,t),C(o,u,e.bl_count)}function D(e,t,n){var r,i,o=-1,s=t[1],a=0,l=7,c=4;for(0===s&&(l=138,c=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=s,s=t[2*(r+1)+1],++a<l&&i===s||(a<c?e.bl_tree[2*i]+=a:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):a<=10?e.bl_tree[34]++:e.bl_tree[36]++,o=i,c=(a=0)===s?(l=138,3):i===s?(l=6,3):(l=7,4))}function I(e,t,n){var r,i,o=-1,s=t[1],a=0,l=7,c=4;for(0===s&&(l=138,c=3),r=0;r<=n;r++)if(i=s,s=t[2*(r+1)+1],!(++a<l&&i===s)){if(a<c)for(;A(e,i,e.bl_tree),0!=--a;);else 0!==i?(i!==o&&(A(e,i,e.bl_tree),a--),A(e,16,e.bl_tree),E(e,a-3,2)):a<=10?(A(e,17,e.bl_tree),E(e,a-3,3)):(A(e,18,e.bl_tree),E(e,a-11,7));o=i,c=(a=0)===s?(l=138,3):i===s?(l=6,3):(l=7,4)}}i(_);var L=!1;function B(e,t,n,i){E(e,0+(i?1:0),3),function(e,t,n,i){$(e),O(e,n),O(e,~n),r.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n)}n._tr_init=function(e){L||(function(){var e,t,n,r,i,o=new Array(16);for(r=n=0;r<28;r++)for(b[r]=n,e=0;e<1<<c[r];e++)g[n++]=r;for(g[n-1]=r,r=i=0;r<16;r++)for(_[r]=i,e=0;e<1<<u[r];e++)m[i++]=r;for(i>>=7;r<a;r++)for(_[r]=i<<7,e=0;e<1<<u[r]-7;e++)m[256+i++]=r;for(t=0;t<=l;t++)o[t]=0;for(e=0;e<=143;)p[2*e+1]=8,e++,o[8]++;for(;e<=255;)p[2*e+1]=9,e++,o[9]++;for(;e<=279;)p[2*e+1]=7,e++,o[7]++;for(;e<=287;)p[2*e+1]=8,e++,o[8]++;for(C(p,287,o),e=0;e<a;e++)f[2*e+1]=5,f[2*e]=T(e,5);v=new x(p,c,257,s,l),y=new x(f,u,0,a,l),S=new x(new Array(0),d,0,19,7)}(),L=!0),e.l_desc=new w(e.dyn_ltree,v),e.d_desc=new w(e.dyn_dtree,y),e.bl_desc=new w(e.bl_tree,S),e.bi_buf=0,e.bi_valid=0,M(e)},n._tr_stored_block=B,n._tr_flush_block=function(e,t,n,r){var i,s,a=0;0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<o;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),N(e,e.l_desc),N(e,e.d_desc),a=function(e){var t;for(D(e,e.dyn_ltree,e.l_desc.max_code),D(e,e.dyn_dtree,e.d_desc.max_code),N(e,e.bl_desc),t=18;3<=t&&0===e.bl_tree[2*h[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(s=e.static_len+3+7>>>3)<=i&&(i=s)):i=s=n+5,n+4<=i&&-1!==t?B(e,t,n,r):4===e.strategy||s===i?(E(e,2+(r?1:0),3),j(e,p,f)):(E(e,4+(r?1:0),3),function(e,t,n,r){var i;for(E(e,t-257,5),E(e,n-1,5),E(e,r-4,4),i=0;i<r;i++)E(e,e.bl_tree[2*h[i]+1],3);I(e,e.dyn_ltree,t-1),I(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),j(e,e.dyn_ltree,e.dyn_dtree)),M(e),r&&$(e)},n._tr_tally=function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(g[n]+o+1)]++,e.dyn_dtree[2*k(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){E(e,2,3),A(e,256,p),function(e){16===e.bi_valid?(O(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,n){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,n){(function(e){!function(e,t){"use strict";if(!e.setImmediate){var n,r,o,s,a=1,l={},c=!1,u=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,n="[object process]"==={}.toString.call(e.process)?function(e){i.nextTick((function(){p(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(s="setImmediate$"+Math.random()+"$",e.addEventListener?e.addEventListener("message",f,!1):e.attachEvent("onmessage",f),function(t){e.postMessage(s+t,"*")}):e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){p(e.data)},function(e){o.port2.postMessage(e)}):u&&"onreadystatechange"in u.createElement("script")?(r=u.documentElement,function(e){var t=u.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):function(e){setTimeout(p,0,e)},d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var i={callback:e,args:t};return l[a]=i,n(a),a++},d.clearImmediate=h}function h(e){delete l[e]}function p(e){if(c)setTimeout(p,0,e);else{var t=l[e];if(t){c=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{h(e),c=!1}}}}function f(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&p(+t.data.slice(s.length))}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[10])(10)}).call(this,n(386).Buffer,n(89).setImmediate,n(28),n(36))},function(e,t,n){"use strict";var r={};function i(){try{return new window.XMLHttpRequest}catch(e){}}r._getBinaryFromXHR=function(e){return e.response||e.responseText};var o="undefined"!=typeof window&&window.ActiveXObject?function(){return i()||function(){try{return new window.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}()}:i;r.getBinaryContent=function(e,t){var n,i,s,a;t||(t={}),"function"==typeof t?(a=t,t={}):"function"==typeof t.callback&&(a=t.callback),a||"undefined"==typeof Promise?(i=function(e){a(null,e)},s=function(e){a(e,null)}):n=new Promise((function(e,t){i=e,s=t}));try{var l=o();l.open("GET",e,!0),"responseType"in l&&(l.responseType="arraybuffer"),l.overrideMimeType&&l.overrideMimeType("text/plain; charset=x-user-defined"),l.onreadystatechange=function(t){if(4===l.readyState)if(200===l.status||0===l.status)try{i(r._getBinaryFromXHR(l))}catch(e){s(new Error(e))}else s(new Error("Ajax error for "+e+" : "+this.status+" "+this.statusText))},t.progress&&(l.onprogress=function(n){t.progress({path:e,originalEvent:n,percent:n.loaded/n.total*100,loaded:n.loaded,total:n.total})}),l.send()}catch(e){s(new Error(e),null)}return n},e.exports=r},function(e,t,n){"use strict";e.exports=n(413)},function(e,t,n){"use strict";e.exports=n(414)},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(58),s=n.n(o),a=n(82),l=n(83),c=i()(!1),u=s()(a.a),d=s()(l.a);c.push([e.i,':root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: #e74c3c;--toastify-color-transparent: rgba(255, 255, 255, 0.7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-toast-width: 320px;--toastify-toast-background: #fff;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient( to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55 );--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error)}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0, 0, var(--toastify-z-index) px);position:fixed;padding:4px;width:var(--toastify-toast-width);box-sizing:border-box;color:#fff}.Toastify__toast-container--top-left{top:1em;left:1em}.Toastify__toast-container--top-center{top:1em;left:50%;transform:translateX(-50%)}.Toastify__toast-container--top-right{top:1em;right:1em}.Toastify__toast-container--bottom-left{bottom:1em;left:1em}.Toastify__toast-container--bottom-center{bottom:1em;left:50%;transform:translateX(-50%)}.Toastify__toast-container--bottom-right{bottom:1em;right:1em}@media only screen and (max-width : 480px){.Toastify__toast-container{width:100vw;padding:0;left:0;margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:0;transform:translateX(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:0;transform:translateX(0)}.Toastify__toast-container--rtl{right:0;left:initial}}.Toastify__toast{position:relative;min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:8px;border-radius:4px;box-shadow:0 1px 10px 0 rgba(0,0,0,.1),0 2px 15px 0 rgba(0,0,0,.05);display:flex;justify-content:space-between;max-height:var(--toastify-toast-max-height);overflow:hidden;font-family:var(--toastify-font-family);cursor:pointer;direction:ltr}.Toastify__toast--rtl{direction:rtl}.Toastify__toast-body{margin:auto 0;flex:1 1 auto;padding:6px;display:flex;align-items:center}.Toastify__toast-body>div:last-child{flex:1}.Toastify__toast-icon{margin-inline-end:10px;width:20px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.7s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}@media only screen and (max-width : 480px){.Toastify__toast{margin-bottom:0;border-radius:0}}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;background:rgba(0,0,0,0);outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;align-self:flex-start}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}100%{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:5px;z-index:var(--toastify-z-index);opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{from,60%,75%,90%,to{animation-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1)}from{opacity:0;transform:translate3d(3000px, 0, 0)}60%{opacity:1;transform:translate3d(-25px, 0, 0)}75%{transform:translate3d(10px, 0, 0)}90%{transform:translate3d(-5px, 0, 0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px, 0, 0)}to{opacity:0;transform:translate3d(2000px, 0, 0)}}@keyframes Toastify__bounceInLeft{from,60%,75%,90%,to{animation-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1)}0%{opacity:0;transform:translate3d(-3000px, 0, 0)}60%{opacity:1;transform:translate3d(25px, 0, 0)}75%{transform:translate3d(-10px, 0, 0)}90%{transform:translate3d(5px, 0, 0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px, 0, 0)}to{opacity:0;transform:translate3d(-2000px, 0, 0)}}@keyframes Toastify__bounceInUp{from,60%,75%,90%,to{animation-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1)}from{opacity:0;transform:translate3d(0, 3000px, 0)}60%{opacity:1;transform:translate3d(0, -20px, 0)}75%{transform:translate3d(0, 10px, 0)}90%{transform:translate3d(0, -5px, 0)}to{transform:translate3d(0, 0, 0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0, -10px, 0)}40%,45%{opacity:1;transform:translate3d(0, 20px, 0)}to{opacity:0;transform:translate3d(0, -2000px, 0)}}@keyframes Toastify__bounceInDown{from,60%,75%,90%,to{animation-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1)}0%{opacity:0;transform:translate3d(0, -3000px, 0)}60%{opacity:1;transform:translate3d(0, 25px, 0)}75%{transform:translate3d(0, -10px, 0)}90%{transform:translate3d(0, 5px, 0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0, 10px, 0)}40%,45%{opacity:1;transform:translate3d(0, -20px, 0)}to{opacity:0;transform:translate3d(0, 2000px, 0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{from{opacity:0;transform:scale3d(0.3, 0.3, 0.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{from{opacity:1}50%{opacity:0;transform:scale3d(0.3, 0.3, 0.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{from{transform:perspective(400px) rotate3d(1, 0, 0, 90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotate3d(1, 0, 0, -20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotate3d(1, 0, 0, 10deg);opacity:1}80%{transform:perspective(400px) rotate3d(1, 0, 0, -5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{from{transform:perspective(400px)}30%{transform:perspective(400px) rotate3d(1, 0, 0, -20deg);opacity:1}to{transform:perspective(400px) rotate3d(1, 0, 0, 90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{from{transform:translate3d(110%, 0, 0);visibility:visible}to{transform:translate3d(0, 0, 0)}}@keyframes Toastify__slideInLeft{from{transform:translate3d(-110%, 0, 0);visibility:visible}to{transform:translate3d(0, 0, 0)}}@keyframes Toastify__slideInUp{from{transform:translate3d(0, 110%, 0);visibility:visible}to{transform:translate3d(0, 0, 0)}}@keyframes Toastify__slideInDown{from{transform:translate3d(0, -110%, 0);visibility:visible}to{transform:translate3d(0, 0, 0)}}@keyframes Toastify__slideOutRight{from{transform:translate3d(0, 0, 0)}to{visibility:hidden;transform:translate3d(110%, 0, 0)}}@keyframes Toastify__slideOutLeft{from{transform:translate3d(0, 0, 0)}to{visibility:hidden;transform:translate3d(-110%, 0, 0)}}@keyframes Toastify__slideOutDown{from{transform:translate3d(0, 0, 0)}to{visibility:hidden;transform:translate3d(0, 500px, 0)}}@keyframes Toastify__slideOutUp{from{transform:translate3d(0, 0, 0)}to{visibility:hidden;transform:translate3d(0, -500px, 0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown}@keyframes Toastify__spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}:root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}#app .react-tabs,#wc .react-tabs{flex:1;display:flex;flex-flow:column;overflow:hidden;position:relative;border-radius:8px}#app .react-tabs__tab,#wc .react-tabs__tab{border:none;background-color:rgba(0,0,0,0);padding:0;margin:0;inset-block-start:0;inset-block-end:0;block-size:calc(3rem*var(--scale-factor, 1));box-sizing:border-box;display:flex;align-items:center;justify-content:center;font-weight:700}#app .react-tabs__tab svg,#wc .react-tabs__tab svg{padding:0 0 0 calc(.75rem*var(--scale-factor, 1))}#app .react-tabs__tab:hover,#wc .react-tabs__tab:hover{text-decoration:underline}#app .react-tabs__tab--selected,#wc .react-tabs__tab--selected{border-radius:0;padding-block-start:calc(.25rem*var(--scale-factor, 1))}#app .react-tabs__tab--selected:hover,#wc .react-tabs__tab--selected:hover{text-decoration:none}#app .react-tabs__tab--selected:focus-visible,#wc .react-tabs__tab--selected:focus-visible{padding-block-start:7px}#app .react-tabs__tab:focus,#wc .react-tabs__tab:focus{box-shadow:none}#app .react-tabs__tab:focus-visible,#wc .react-tabs__tab:focus-visible{outline-offset:-3px;outline:3px solid #cd2356}#app .react-tabs__tab:focus:after,#wc .react-tabs__tab:focus:after{display:none}#app .react-tabs__tab-text,#wc .react-tabs__tab-text{block-size:fit-content;inline-size:fit-content;margin:0;padding:0 calc(.75rem*var(--scale-factor, 1));white-space:nowrap}#app .react-tabs__tab-text--split,#wc .react-tabs__tab-text--split{padding-inline-end:0}#app .react-tabs__tab-close-btn,#wc .react-tabs__tab-close-btn{block-size:100%;padding:calc(.25rem*var(--scale-factor, 1));background-color:rgba(0,0,0,0)}#app .react-tabs__tab-close-btn svg,#wc .react-tabs__tab-close-btn svg{padding:calc(.5rem*var(--scale-factor, 1));border-radius:8px}#app .react-tabs__tab-close-btn:focus-visible,#wc .react-tabs__tab-close-btn:focus-visible{border:0}#app .react-tabs__tab-close-btn:focus-visible svg,#wc .react-tabs__tab-close-btn:focus-visible svg{border:3px solid #cd2356}#app .react-tabs__tab-container,#wc .react-tabs__tab-container{display:flex;block-size:fit-content}#app .react-tabs__tab-list,#wc .react-tabs__tab-list{border-block-end:none;box-sizing:border-box;display:flex;overflow-y:hidden;margin:0;padding:0 calc(.25rem*var(--scale-factor, 1)) 0 0}#app .react-tabs__tab-container--hidden,#wc .react-tabs__tab-container--hidden{display:none}#app .react-tabs__tab-panel--selected,#wc .react-tabs__tab-panel--selected{flex:1;display:flex;flex-direction:column;overflow-y:auto}#app .react-tabs__tab-container,#wc .react-tabs__tab-container{border-block-end:1px solid var(--editor-color-outline)}#app .react-tabs__tab,#wc .react-tabs__tab{background-color:var(--rpf-tab-button-background);border-inline-end:1px solid var(--editor-color-outline)}#app .react-tabs__tab--selected,#wc .react-tabs__tab--selected{color:var(--editor-color-text);background-color:var(--editor-color-layer-3);border-block-end:4px solid var(--rpf-tab-border-bottom-selected)}#app .react-tabs__tab--selected:focus-visible,#wc .react-tabs__tab--selected:focus-visible{border-block-end:7px solid var(--rpf-tab-border-bottom-selected)}#app .react-tabs__tab-close-btn:hover svg,#wc .react-tabs__tab-close-btn:hover svg{background-color:var(--rpf-tab-button-hover)}a,button{border:3px solid rgba(0,0,0,0)}a:focus-visible,button:focus-visible{border:3px solid #cd2356;outline:none}button{all:initial;border:3px solid rgba(0,0,0,0);cursor:pointer}input{font-family:"Roboto",-apple-system,BlinkMacSystemFont,"Segoe UI","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif}.--light{background-color:#e7f8f7;color:#212121;caret-color:#000}.--light .pythonrunner-input{color:#2467ec}.--light svg{fill:var(--editor-color-text)}.--dark{background-color:#17181c;color:#fff;caret-color:#fff}.--dark .pythonrunner-input{color:#24baec}.--dark svg{fill:var(--editor-color-text)}#app{display:flex;flex-flow:column;font-family:"Roboto",-apple-system,BlinkMacSystemFont,"Segoe UI","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1))}html,body,#root,#app{overflow:auto;block-size:100%;block-size:-moz-available;block-size:-webkit-stretch;block-size:stretch;block-size:100dvh;-ms-overflow-style:none;scrollbar-width:none}::-webkit-scrollbar{display:none}#app .toast--bottom-center__message,#app .toast--top-center__message,#wc .toast--bottom-center__message,#wc .toast--top-center__message{min-block-size:fit-content;padding:calc(.25rem*var(--scale-factor, 1)) calc(.5rem*var(--scale-factor, 1));margin:0}#app .toast--bottom-center,#wc .toast--bottom-center{font-size:calc(.75rem*var(--scale-factor, 1));line-height:calc(1rem*var(--scale-factor, 1));inline-size:fit-content;max-inline-size:100%;inset-block-end:1em;padding:4px;inset-inline-start:50%;transform:translateX(-50%);white-space:nowrap}#app .toast--bottom-center .Toastify__toast-icon,#wc .toast--bottom-center .Toastify__toast-icon{margin-block:0;margin-inline:calc(.25rem*var(--scale-factor, 1)) 0}#app .toast--bottom-center__message,#wc .toast--bottom-center__message{border-radius:20px}#app .toast--top-center,#wc .toast--top-center{max-inline-size:fit-content;inline-size:100%;font-weight:700;inset-block-start:20%;z-index:1}#app .toast--top-center .Toastify__toast-icon,#wc .toast--top-center .Toastify__toast-icon{inline-size:fit-content}#app .toast--top-center__message,#wc .toast--top-center__message{background-color:#fff;border-radius:25px}#app .toast--info,#wc .toast--info{color:#1e398a;border:2px solid #1e398a}#app .toast--info svg,#wc .toast--info svg{fill:#17181c}#app .toast--info .Toastify__toast-icon svg,#wc .toast--info .Toastify__toast-icon svg{fill:#1e398a}#app.--dark .toast--bottom-center__message,#wc.--dark .toast--bottom-center__message{background-color:#fff;color:#17181c}#app.--dark .toast--bottom-center__message svg,#wc.--dark .toast--bottom-center__message svg{fill:#17181c}#app.--light .toast--bottom-center__message,#wc.--light .toast--bottom-center__message{background-color:#17181c;color:#fff}#app.--light .toast--bottom-center__message svg,#wc.--light .toast--bottom-center__message svg{fill:#fff}.proj{display:flex;flex-flow:column;overflow:hidden;block-size:100%;block-size:-moz-available;block-size:-webkit-stretch;block-size:stretch}.proj-header{display:flex;flex:1 0 auto;justify-content:space-between;padding-inline:5px}.editor-controls{display:flex}.proj-controls{padding-block-start:20px}.proj-share-link{padding-inline:5px}.proj-container{display:flex;flex-direction:row;overflow-y:hidden;grid-gap:calc(1rem*var(--scale-factor, 1));margin:calc(1rem*var(--scale-factor, 1));block-size:100%}.proj-container .project-wrapper{container-type:inline-size;display:flex;flex-direction:column;grid-gap:calc(.5rem*var(--scale-factor, 1));flex:1 1 auto;overflow:hidden}.proj-container .proj-editor-wrapper{display:flex;flex:0 1 auto;flex-flow:column;grid-gap:calc(1rem*var(--scale-factor, 1));overflow:hidden;block-size:100%;inline-size:100%}@container (min-width: 720px){.proj-container .proj-editor-wrapper{flex-flow:row}.proj-container .proj-editor-container{max-block-size:100% !important}.proj-container--wc .proj-runner-container,.proj-container--wc .proj-editor-container{inline-size:50%}}.proj-container .sidebar,.proj-container .proj-editor-container,.proj-container .proj-runner-container{border-radius:8px}.proj-container .proj-editor-container{display:flex;box-sizing:border-box;min-block-size:30%;max-block-size:70%}.proj-container .proj-editor-container .react-tabs__tab-panel--selected{overflow-y:hidden}.proj-container .proj-runner-container{display:flex;box-sizing:border-box;flex:5;overflow:hidden}.proj-container .proj-runner-container .react-tabs__tab-panel--selected{overflow-y:auto}.proj-container--wc{min-block-size:200px}.proj-container--wc .proj-runner-container,.proj-container--wc .proj-editor-container{inline-size:100%}.proj-editor-container .react-tabs__tab-list,.proj-runner-container .react-tabs__tab-list{flex:1}.proj-editor-container .react-tabs__tab-container .btn--run,.proj-editor-container .react-tabs__tab-container .btn--stop,.proj-runner-container .react-tabs__tab-container .btn--run,.proj-runner-container .react-tabs__tab-container .btn--stop{margin-block-start:0;margin-block-end:0}.--light .proj-runner-container,.--light .proj-editor-container,.--light .sidebar{background-color:#fff}@media screen and (min-width: 601px){.--light .proj-runner-container,.--light .proj-editor-container,.--light .sidebar{border:1px solid #d5d7dc}}.--dark .proj-runner-container,.--dark .proj-editor-container,.--dark .sidebar{background-color:#2a2b32}@media screen and (min-width: 601px){.--dark .proj-runner-container,.--dark .proj-editor-container,.--dark .sidebar{border:1px solid #4a4d59}}.project-bar{border-radius:calc(.5rem*var(--scale-factor, 1));display:flex;align-items:center;z-index:1;block-size:calc(4rem*var(--scale-factor, 1));container-type:inline-size;background-color:var(--editor-color-layer-3);border:1px solid var(--editor-color-outline)}@container (max-width: 367px){.project-bar{flex-direction:column;block-size:fit-content;justify-content:left}}.project-bar .project-name{border-inline-end:1px solid var(--editor-color-outline);margin-inline-end:-1px;min-inline-size:0px}@container (max-width: 365px){.project-bar .project-name{inline-size:100%;box-sizing:border-box;border-inline-end:none}}.project-bar .btn--save{border-radius:calc(.5rem*var(--scale-factor, 1))}@container (min-width: 560px){.project-bar .btn--save .icon{display:none}}.project-bar .project-bar__btn-wrapper{block-size:100%}.project-bar .project-bar__btn-wrapper:not(:last-child){border-inline-end:1px solid var(--editor-color-outline)}.project-bar__right{border-inline-start:1px solid var(--editor-color-outline);margin-inline-start:auto;display:flex;align-items:center;block-size:100%;flex-shrink:0;max-inline-size:55%}@container (max-width: 365px){.project-bar__right{margin-inline-start:0;border-inline-start:none;border-block-start:1px solid var(--editor-color-outline);block-size:fit-content;inline-size:100%;max-inline-size:100%}.project-bar__right .save-status{flex:1;justify-content:center}}.project-bar__btn{border-radius:calc(.5rem*var(--scale-factor, 1));justify-content:center;margin:calc(.5rem*var(--scale-factor, 1));gap:calc(.5rem*var(--scale-factor, 1))}.project-bar__btn .text{display:none}.project-bar__btn:hover .project-bar__btn{border-radius:inherit}@container (min-width: 560px){.project-bar__btn .text{min-inline-size:auto;display:block}}.proj-container--mobile{margin:0;gap:0}#app .proj-container--mobile .react-tabs{border-radius:0}#wc .proj-container--mobile{border-radius:8px}#app .mobile-nav,#wc .mobile-nav{display:flex;inline-size:100%}#app .mobile-nav .react-tabs__tab-list,#wc .mobile-nav .react-tabs__tab-list{padding:0}#app .mobile-nav .react-tabs__tab,#wc .mobile-nav .react-tabs__tab{flex:1;display:flex;block-size:calc(4rem*var(--scale-factor, 1))}#app .mobile-nav .react-tabs__tab:last-of-type,#wc .mobile-nav .react-tabs__tab:last-of-type{border-inline-end:none}.mobile-nav__menu{margin:0;border-radius:0;border:none;display:flex;align-items:center;justify-content:center;inline-size:calc(4rem*var(--scale-factor, 1))}.--dark .proj-container--mobile .runner-controls{border-inline-start:1px solid #4a4d59}.--dark .proj-container--mobile .mobile-nav{background-color:#2a2b32;border-block-start:1px solid #4a4d59}.--dark .proj-container--mobile .mobile-nav__menu{border-inline-end:1px solid #4a4d59}.--light .proj-container--mobile .runner-controls{border-inline-start:1px solid #d5d7dc}.--light .proj-container--mobile .mobile-nav{background-color:#f5f6f9;border-block-start:1px solid #d5d7dc}.--light .proj-container--mobile .mobile-nav__menu{border-inline-end:1px solid #d5d7dc}#app.--light .mobile-nav,#app.--dark .mobile-nav,#wc.--light .mobile-nav,#wc.--dark .mobile-nav{border-block-end:none}#app.--light .mobile-nav .react-tabs__tab--selected,#app.--dark .mobile-nav .react-tabs__tab--selected,#wc.--light .mobile-nav .react-tabs__tab--selected,#wc.--dark .mobile-nav .react-tabs__tab--selected{background-color:inherit}#wc.--light .proj-container--mobile{border:1px solid #d5d7dc}#wc.--dark .proj-container--mobile{border:1px solid #4a4d59}.draggable-tab{user-select:none}.draggable-tab:focus-visible{outline:none}.--dark .draggable-tab:focus-visible .react-tabs__tab{outline:2px auto #fff;outline-offset:-1px}.--light .draggable-tab:focus-visible .react-tabs__tab{outline:2px auto Highlight;outline:2px auto -webkit-focus-ring-color;outline-offset:-1px}.droppable-tab-list{display:flex;inline-size:100%}.resizable-with-handle__handle--right div{inset-inline-end:3px !important}.resizable-with-handle__handle--right div svg{block-size:100%;min-inline-size:0}.resizable-with-handle__handle--bottom div{inset-block-end:3px !important}.resizable-with-handle__handle--bottom div svg{inline-size:100%}.modal-overlay{display:flex;align-items:center;justify-content:center;padding:calc(5rem*var(--scale-factor, 1));z-index:1000;position:fixed;inset:0px}@media screen and (max-width: 480px){.modal-overlay{padding:calc(2rem*var(--scale-factor, 1))}}.modal-content{inline-size:560px;max-block-size:100%;border:0;border-radius:10px;display:flex;flex-direction:column}.modal-content label,.modal-content legend{font-weight:700}.modal-content input[type=text]{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));inline-size:100%;box-sizing:border-box;border:2px solid rgba(0,0,0,0);border-radius:12px;padding:calc(.5rem*var(--scale-factor, 1));display:block}.modal-content:focus-visible{border:3px solid #cd2356;outline:none}.modal-content__header{display:flex;align-items:center;min-block-size:fit-content;padding:calc(1rem*var(--scale-factor, 1)) calc(.5rem*var(--scale-factor, 1)) calc(1rem*var(--scale-factor, 1)) calc(1rem*var(--scale-factor, 1))}.modal-content__header button{margin-inline-start:auto;block-size:fit-content}.modal-content__heading{font-size:calc(1.5rem*var(--scale-factor, 1));line-height:calc(2rem*var(--scale-factor, 1));margin-block:calc(.5rem*var(--scale-factor, 1));margin-inline:calc(.5rem*var(--scale-factor, 1)) 0}.modal-content__body{padding:calc(1.5rem*var(--scale-factor, 1));display:flex;flex-direction:column;row-gap:calc(.5rem*var(--scale-factor, 1));overflow-y:auto}.modal-content__subheading{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));margin:0;font-weight:700}.modal-content__text{margin:0;line-height:1.4}.modal-content__help-text{margin:calc(.25rem*var(--scale-factor, 1)) 0;font-weight:400}.modal-content__inputs{display:flex;flex-direction:column;gap:calc(2rem*var(--scale-factor, 1))}.modal-content__input-section{display:flex;flex-direction:column;gap:calc(.5rem*var(--scale-factor, 1))}.modal-content__buttons{padding:calc(1rem*var(--scale-factor, 1));display:flex;flex-wrap:wrap;flex-direction:row-reverse;gap:calc(1rem*var(--scale-factor, 1));justify-content:flex-start}@media screen and (max-width: 480px){.modal-content__buttons{display:flex;flex-direction:column}}.modal-content__buttons button,.modal-content__buttons a{margin:0}.modal-content__buttons button span,.modal-content__buttons a span{inline-size:100%}@media screen and (max-width: 480px){.modal-content__buttons button,.modal-content__buttons a{inline-size:100%}}.modal-content__links{text-align:center;margin-block:calc(.5rem*var(--scale-factor, 1)) calc(.25rem*var(--scale-factor, 1));margin-inline:0}.modal-content__links button{text-decoration:underline}.--dark .modal-overlay{background-color:rgba(0,0,0,.5)}.--dark .modal-overlay input{border:2px solid #fff;background-color:#33353d;color:inherit}.--dark .modal-overlay input:focus-visible{border:2px solid var(--rpf-input-active-border);outline:none}.--dark .modal-content{background-color:#33353d}.--dark .modal-content__header{border-block-end:1px solid #636674}.--dark .modal-content__help-text{color:#ccc}.--dark .modal-content__buttons{border-block-start:1px solid #636674}.--light .modal-overlay{background-color:rgba(67,69,76,.5)}.--light .modal-overlay input{border:2px solid #e3e4e8}.--light .modal-overlay input:focus-visible{border:2px solid var(--rpf-input-active-border);outline:none}.--light .modal-content{background-color:#fff}.--light .modal-content__header{border-block-end:1px solid #d5d7dc}.--light .modal-content__help-text{color:#4d575b}.--light .modal-content__buttons{border-block-start:1px solid #d5d7dc}.editor-input{display:flex;flex-direction:column;block-size:100%;inline-size:100%}.editor-input__view-only-banner{font-weight:700;padding:var(--space-0-5) var(--space-1);border-bottom:1px solid var(--editor-color-outline)}.--light .editor-input__view-only-banner{background-color:#e3e4e8}.--dark .editor-input__view-only-banner{background-color:#babcc5;color:#000}.editor{display:flex;flex-flow:column;flex:1;overflow:hidden}.editor .cm-editor{flex:1;overflow:hidden}.editor .cm-editor:focus{outline:none}.editor .cm-editor .cm-scroller{overflow:auto;overscroll-behavior-x:none}.editor .cm-editor .cm-scroller .cm-content{flex:1;padding-block-start:calc(.5rem*var(--scale-factor, 1));margin-inline-end:calc(.5rem*var(--scale-factor, 1))}.editor--small{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1))}.editor--medium{font-size:calc(1.5rem*var(--scale-factor, 1));line-height:calc(2rem*var(--scale-factor, 1))}.editor--large{font-size:calc(2rem*var(--scale-factor, 1));line-height:calc(2.5rem*var(--scale-factor, 1))}.sidebar{display:flex;position:relative;scrollbar-width:none}.sidebar--mobile{inline-size:100%;overflow-y:hidden}.editor-logo{block-size:calc(2.5rem*var(--scale-factor, 1));inline-size:calc(2.5rem*var(--scale-factor, 1));padding:calc(.75rem*var(--scale-factor, 1))}.sidebar__bar{display:flex;flex-direction:column;justify-content:space-between;border-radius:8px;background-color:var(--sidebar-background)}.sidebar__bar--selected{border-radius:8px 0 0 8px;background-color:var(--sidebar-background-selected);border-inline-end:1px solid var(--sidebar-border)}.sidebar__bar-options--top,.sidebar__bar-options--bottom{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:calc(.5rem*var(--scale-factor, 1))}.sidebar__bar-option-wrapper{padding:calc(.75*.5rem*var(--scale-factor, 1));border:1px solid rgba(0,0,0,0)}.sidebar__bar-option-wrapper--selected{background-color:var(--sidebar-panel-background);border-radius:calc(.5rem*var(--scale-factor, 1)) 0 0 calc(.5rem*var(--scale-factor, 1));border-block:1px solid var(--sidebar-border);border-inline-start:1px solid var(--sidebar-border)}.sidebar__bar-option-wrapper--selected .sidebar__bar-option{border:2px solid var(--sidebar-option-selected-border)}.sidebar__bar-option{display:flex;align-items:center;justify-content:center;box-sizing:border-box;margin:0;border:2px solid rgba(0,0,0,0)}.sidebar__bar-option svg{margin:0}.sidebar__bar-option:hover{background-color:var(--sidebar-option-hover)}.sidebar__bar-option--selected{background-color:var(--sidebar-option-selected-background)}.sidebar__bar-option--selected svg{fill:var(--sidebar-option-selected-icon)}.sidebar__bar-option--selected:hover{background-color:var(--sidebar-option-selected-background-hover)}.sidebar__bar-close{border-block-start:1px solid var(--sidebar-border)}.sidebar__panel{display:flex;flex-direction:column;padding:calc(1rem*var(--scale-factor, 1));border-radius:0 8px 8px 0;inline-size:inherit;background:var(--sidebar-panel-background)}.sidebar__panel--with-footer{padding-block-end:calc(2rem*var(--scale-factor, 1))}.sidebar__panel-heading{margin:0;font-size:calc(1.5rem*var(--scale-factor, 1));line-height:calc(2rem*var(--scale-factor, 1))}.sidebar__panel-header{display:flex;flex-direction:column;gap:calc(1rem*var(--scale-factor, 1));padding-block-end:calc(1rem*var(--scale-factor, 1));border-block-end:1px solid var(--sidebar-border)}.sidebar__panel-content{flex:1;padding:calc(1rem*var(--scale-factor, 1)) 0;overflow-y:scroll;scrollbar-width:thin;overflow:auto}.sidebar__panel-footer{border-block-start:1px solid #d5d7dc;inset-block-end:0px;inline-size:100%;inline-size:-moz-available;inline-size:-webkit-stretch;inline-size:stretch;background-color:#fff;border-end-end-radius:8px}:root{--rpf-brand-black: hsla(60, 4%, 11%, 1);--rpf-brand-leaf: hsla(123, 43%, 48%, 1);--rpf-brand-raspberry: hsla(342, 71%, 47%, 1)}:root{--space-0-125: 0.0625rem;--space-0-25: 0.125rem;--space-0-5: 0.25rem;--space-1: 0.5rem;--space-1-5: 0.75rem;--space-2: 1rem;--space-3: 1.5rem;--space-4: 2rem;--space-5: 2.5rem;--space-6: 3rem;--space-7: 3.5rem;--space-8: 4rem;--space-9: 4.5rem;--space-10: 5rem}.rpf-squiggle,.rpf-squiggle-heading::after,.project-instructions .c-project-heading--task::after{--rpf-squiggle-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xml%3Aspace%3D%22preserve%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%3Bstroke-linecap%3Around%3Bstroke-miterlimit%3A10%22%20viewBox%3D%220%200%2029%2013%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M3%2011c7%200%207-8%2014-8%208%200%208%208%2015%208%22%20style%3D%22fill%3Anone%3Bfill-rule%3Anonzero%3Bstroke%3Awhite%3Bstroke-width%3A4px%22%20transform%3D%22translate%28-3%29%22%2F%3E%3C%2Fsvg%3E");--rpf-squiggle-end-cap-l-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xml%3Aspace%3D%22preserve%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%22%20viewBox%3D%220%200%202%2013%22%3E%3Ccircle%20cx%3D%220%22%20cy%3D%2211%22%20r%3D%222%22%20style%3D%22fill%3Awhite%22%2F%3E%3C%2Fsvg%3E");--rpf-squiggle-end-cap-r-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xml%3Aspace%3D%22preserve%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%22%20viewBox%3D%220%200%202%2013%22%3E%3Ccircle%20cx%3D%222%22%20cy%3D%2211%22%20r%3D%222%22%20style%3D%22fill%3Awhite%22%2F%3E%3C%2Fsvg%3E");background-color:var(--rpf-squiggle-color, var(--rpf-brand-raspberry));border:2px solid rgba(0,0,0,0);border-block:none;height:13px;mask-clip:content-box,border-box,border-box;mask-image:var(--rpf-squiggle-mask),var(--rpf-squiggle-end-cap-l-mask),var(--rpf-squiggle-end-cap-r-mask);mask-origin:content-box,border-box,border-box;mask-position:top left,top right,top left;mask-repeat:round,no-repeat,no-repeat;mask-size:29px 13px,2px 13px,2px 13px;-webkit-mask-clip:content-box,border-box,border-box;-webkit-mask-image:var(--rpf-squiggle-mask),var(--rpf-squiggle-end-cap-l-mask),var(--rpf-squiggle-end-cap-r-mask);-webkit-mask-origin:content-box,border-box,border-box;-webkit-mask-position:top left,top right,top left;-webkit-mask-repeat:round,no-repeat,no-repeat;-webkit-mask-size:29px 13px,2px 13px,2px 13px}.rpf-squiggle-heading,.project-instructions .c-project-heading--task{display:inline-block;position:relative;padding-bottom:calc(13px + var(--space-1))}.rpf-squiggle-heading::after,.project-instructions .c-project-heading--task::after{content:"";display:block;position:absolute;left:0;right:0;margin-top:var(--space-1)}.project-instructions h2{font-size:calc(1.25rem*var(--scale-factor, 1));margin:0}.project-instructions strong{font-weight:700}.project-instructions img{max-inline-size:100%}.project-instructions table{border-collapse:collapse;margin-block-end:calc(1.5rem*var(--scale-factor, 1));inline-size:100%}.project-instructions table tr{border-block-end:1px solid #000}.project-instructions table td{padding:calc(.5rem*var(--scale-factor, 1)) calc(1.5rem*var(--scale-factor, 1))}.project-instructions pre{background-color:#33353d;border-radius:8px;padding:calc(.5rem*var(--scale-factor, 1));overflow:auto;margin:calc(1rem*var(--scale-factor, 1)) 0}.project-instructions code{color:#fff;background-color:#33353d;border-radius:8px;padding:calc(.75*.125rem*var(--scale-factor, 1)) calc(.5rem*var(--scale-factor, 1))}.project-instructions .c-project-code{margin:calc(1rem*var(--scale-factor, 1)) 0 calc(1.5rem*var(--scale-factor, 1)) 0;border-radius:8px;background-color:#33353d}.project-instructions .c-project-code pre{margin:0}.project-instructions .c-project-code code{padding-inline-start:0}.project-instructions .c-code-filename{font-family:monospace;margin:0;padding:calc(.5rem*var(--scale-factor, 1)) calc(1rem*var(--scale-factor, 1));color:#fff;background-color:#2a2b32;border-start-start-radius:8px;border-start-end-radius:8px;border-block-end:1px solid #4a4d59}.project-instructions .line-numbers{padding-inline-start:calc(3rem*var(--scale-factor, 1));padding-inline-end:calc(1rem*var(--scale-factor, 1))}.project-instructions .line-numbers-rows{border-color:#ccc}.project-instructions .line-numbers-rows span::before{padding-inline-end:calc(.5rem*var(--scale-factor, 1));color:#ccc}.project-instructions .line-highlight{margin-block-start:.5rem;background-color:#fff;mix-blend-mode:difference;min-inline-size:100%}.project-instructions .language-python .number,.project-instructions .language-python .boolean,.project-instructions .language-python .function{color:#9ee8ff}.project-instructions .language-python .keyword{color:#ecf}.project-instructions .language-python .string,.project-instructions .language-python .char{color:#94f9af}.project-instructions .language-python .comment{color:#ffca99}.project-instructions .language-python .keyword-print{color:#fff}.project-instructions .language-css{color:#9ee8ff}.project-instructions .language-css .comment{color:#ffca99}.project-instructions .language-css .selector{color:#ecf}.project-instructions .language-css .function{color:#ecf}.project-instructions .language-css .property,.project-instructions .language-css .punctuation{color:#fff}.project-instructions .language-html .tag{color:#ecf}.project-instructions .language-html .tag .punctuation,.project-instructions .language-html .tag .attr-name{color:#fff}.project-instructions .language-html .tag .attr-value{color:#94f9af}.project-instructions .language-html .tag .attr-value .punctuation{color:inherit}.project-instructions .language-html .tag .attr-value .attr-equals{color:#fff}.project-instructions .language-html .comment{color:#ffca99}.project-instructions .c-project-heading--task{--rpf-squiggle-color: var(--rpf-blue-800);background-color:#e5f4fd;padding:calc(1rem*var(--scale-factor, 1));inline-size:100%;box-sizing:border-box;border-start-start-radius:8px;border-start-end-radius:8px}.project-instructions .c-project-heading--task::after{margin-inline:calc(1rem*var(--scale-factor, 1));margin-block-start:calc(.25rem*var(--scale-factor, 1))}.project-instructions .c-project-task{background-color:#e5f4fd;padding:calc(1rem*var(--scale-factor, 1));display:flex;flex-direction:column;gap:calc(1rem*var(--scale-factor, 1));border-end-start-radius:8px;border-end-end-radius:8px;margin-block-end:calc(1.5rem*var(--scale-factor, 1))}.project-instructions .c-project-task p{margin:0}.project-instructions .c-project-task__checkbox{display:none}.project-instructions .c-project-callout{background-color:#e5f4fd;border-inline-start:4px solid #0090f0;padding:calc(.5rem*var(--scale-factor, 1)) calc(1rem*var(--scale-factor, 1));display:flex;flex-direction:column;gap:calc(.5rem*var(--scale-factor, 1));margin:calc(1.5rem*var(--scale-factor, 1)) 0}.project-instructions .c-project-callout h3{margin:0;padding-inline-start:calc(2rem*var(--scale-factor, 1));font-size:calc(1rem*var(--scale-factor, 1));background-repeat:no-repeat;background-position:inline-start calc(.5rem*var(--scale-factor, 1)) center}.project-instructions .c-project-callout p{margin:0}.project-instructions .c-project-callout--tip{background-color:#ecf7ed;border-inline-start:4px solid #46af4b}.project-instructions .c-project-callout--tip h3{background-image:url('+u+")}.project-instructions .c-project-callout--debug{background-color:#feeeed;border-inline-start:4px solid #f3514f}.project-instructions .c-project-callout--debug h3{background-image:url("+d+")}.project-instructions .c-project-output{display:flex;align-items:flex-start;align-self:stretch;padding:calc(1rem*var(--scale-factor, 1));border-radius:8px;border:1px solid var(--rpf-grey-150);margin-block-end:calc(1.5rem*var(--scale-factor, 1))}.project-instructions .c-project-output pre{padding:0;margin:0;inline-size:100%;background-color:#fff}.project-instructions .c-project-output code{background-color:#fff;color:#212121;padding:0;white-space:pre-wrap}.projects-panel-wrapper .sidebar__panel-content{overflow:visible}.projects-panel-wrapper .projects-panel__your-projects-button{display:flex;align-items:center;justify-content:center;inline-size:100%;box-sizing:border-box;margin:0}.projects-panel-wrapper .projects-panel__your-projects-button a{color:#000;text-decoration:none}.projects-panel-wrapper .projects-panel__download-button{inline-size:100%;margin:0;justify-content:center}.projects-panel-wrapper .project-name{block-size:auto;padding-inline-start:0}.projects-panel-wrapper .project-name__label{padding-inline-start:0}.projects-panel-wrapper .project-name__input{padding:0 calc(1rem*var(--scale-factor, 1))}.projects-panel-wrapper .projects-panel__item{margin-block-end:calc(1rem*var(--scale-factor, 1))}.projects-panel-wrapper .projects-panel__save,.projects-panel-wrapper .projects-panel__button{border-block-start:1px solid var(--sidebar-border);padding:calc(1rem*var(--scale-factor, 1)) 0;display:flex}.projects-panel-wrapper .projects-panel__save-button{inline-size:100%;margin-block-end:calc(1rem*var(--scale-factor, 1));justify-content:center}.projects-panel-wrapper .projects-panel__save-button .icon{display:none}.projects-panel-wrapper .projects-panel__save-button .content{margin:auto}.projects-panel-wrapper .projects-panel__save-button span{font-weight:bold}.projects-panel-wrapper .projects-panel__save-status{margin:auto;inline-size:fit-content}.--dark .projects-panel__save-button .content{color:#fff}.project-name{align-items:center;display:flex;block-size:100%;padding-inline-start:calc(.5rem*var(--scale-factor, 1))}.project-name .btn--primary{margin:0 calc(.5rem*var(--scale-factor, 1))}.project-name__title{font-size:calc(1.25rem*var(--scale-factor, 1));font-weight:700;margin-block:calc(1rem*var(--scale-factor, 1));margin-inline-start:calc(.5rem*var(--scale-factor, 1));margin-inline-end:calc(1rem*var(--scale-factor, 1));overflow:hidden;text-overflow:ellipsis;text-wrap:nowrap}.project-name__label{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));font-weight:700;margin-block-end:calc(.5rem*var(--scale-factor, 1));display:block}.project-name__input{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));padding:0 calc(1.5rem*var(--scale-factor, 1));block-size:calc(3rem*var(--scale-factor, 1));border-radius:calc(.5rem*var(--scale-factor, 1));border:none;color:inherit;background-color:inherit;text-overflow:ellipsis;inline-size:100%}.project-name__button{margin:calc(.5rem*var(--scale-factor, 1));inline-size:48px;block-size:48px}.project-name__button svg{block-size:calc(1.5rem*var(--scale-factor, 1));inline-size:calc(1.5rem*var(--scale-factor, 1));margin:0}.--dark .project-name__input{background-color:#4a4d59}.--dark .project-name__input:focus-visible{background-color:inherit;outline:2px solid #fff}.--light .project-name__input{background-color:#f1f2f3}.--light .project-name__input:focus-visible{background-color:inherit;outline:2px solid #212121}.project-info{align-items:inline-start;display:flex;flex-direction:column;padding:calc(1rem*var(--scale-factor, 1));border-radius:calc(.5rem*var(--scale-factor, 1));border:none;background-color:inherit}.project-info .btn--primary{margin:0 calc(.5rem*var(--scale-factor, 1))}.project-type__label{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));font-weight:700;margin-block-end:calc(.5rem*var(--scale-factor, 1));display:block}.project-type__text{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));color:inherit;text-overflow:ellipsis}.--light .project-info{background-color:#f1f2f3}.--dark .project-info{background-color:#4a4d59}.download-panel__login-section{border-block-end:1px solid #d5d7dc;margin-block-end:calc(1.5rem*var(--scale-factor, 1));padding-block-end:calc(1.5rem*var(--scale-factor, 1))}.download-panel__subtitle{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));font-weight:700;margin-block-end:calc(.5rem*var(--scale-factor, 1))}.download-panel__hint{margin:0;margin-block-end:calc(1rem*var(--scale-factor, 1))}.download-panel__button-container{display:flex;flex-direction:column;justify-content:center;align-self:stretch;gap:calc(1rem*var(--scale-factor, 1));align-items:stretch}.download-panel__button{justify-content:center;inline-size:100%;box-sizing:border-box;margin:0}.download-panel__download-section{margin-block-end:calc(1rem*var(--scale-factor, 1))}.settings-panel{display:flex;flex-direction:column;gap:calc(1.25rem*var(--scale-factor, 1));padding:calc(.25rem*var(--scale-factor, 1))}.settings-panel .select-buttons__legend{font-size:calc(1.25rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));font-weight:700}.settings-panel .select-buttons__options{flex-direction:column}.select-buttons{border:none;margin:0;padding:0}.select-buttons__legend{padding:0;margin-block-end:calc(1rem*var(--scale-factor, 1))}.select-buttons__options{display:flex;inline-size:100%;gap:calc(1rem*var(--scale-factor, 1));flex-wrap:wrap}.select-buttons__option{flex:1}.select-buttons__button{opacity:0;position:absolute}.select-buttons__label{display:flex;align-items:center;padding:calc(.75rem*var(--scale-factor, 1));gap:calc(.75rem*var(--scale-factor, 1));border-radius:8px;position:relative;box-sizing:border-box;font-weight:700;cursor:pointer}.select-buttons__tick{display:flex;align-items:center;margin-inline-start:auto;visibility:hidden}.select-buttons__tick--selected{visibility:visible}.select-buttons__tick--selected svg rect{fill:var(--editor-color-theme)}.select-buttons__tick--selected svg path{fill:var(--rpf-select-buttons-tick-color)}.--light .select-buttons__label{border:2px solid #d5d7dc}.--light .select-buttons__label--selected{border:2px solid #212121}.--dark .select-buttons__label{border:2px solid #636674}.--dark .select-buttons__label--selected{border:2px solid #babcc5}.select-buttons__button:focus-visible+.select-buttons__label{outline:3px solid #cd2356}.info-panel{border-radius:calc(.5rem*var(--scale-factor, 1));padding:calc(1rem*var(--scale-factor, 1));margin-block-end:calc(.5rem*var(--scale-factor, 1))}.info-panel p{margin:0}.info-panel__links{display:flex;flex-direction:column}.info-panel__links a{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));font-weight:700;text-decoration:underline}.info-panel__link:last-of-type{margin-block-end:calc(1rem*var(--scale-factor, 1))}.--dark .info-panel{color:#fff;background-color:#4a4d59}.--dark .info-panel__links a{color:#fff}.--light .info-panel{color:#212121;background-color:#f1f2f3}.--light .info-panel__links a{color:#212121}.progress-bar{accent-color:var(--editor-color-theme);display:flex;align-items:center;justify-content:center;max-inline-size:300px;margin:auto}.progress-bar progress{flex:1;min-inline-size:0px}.progress-bar .btn-outer{padding:calc(.5rem*var(--scale-factor, 1))}.run-bar{display:flex;flex-direction:row;justify-content:flex-end;padding:calc(.5rem*var(--scale-factor, 1))}.--light .run-bar{border-block-start:1px solid #d5d7dc}.--dark .run-bar{border-block-start:1px solid #4a4d59}.runner-controls{display:flex;align-items:center;padding:0 calc(.5rem*var(--scale-factor, 1))}.pythonrunner-container{display:flex;flex-direction:column;flex:1;block-size:100%;inline-size:100%}.pythonrunner-console{padding:calc(.5rem*var(--scale-factor, 1)) calc(1.5rem*var(--scale-factor, 1));margin:0;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;width:100%;word-wrap:break-word;overflow-y:auto}.pythonrunner-console--medium{font-size:calc(1.5rem*var(--scale-factor, 1));line-height:calc(2rem*var(--scale-factor, 1))}.pythonrunner-console--large{font-size:calc(2rem*var(--scale-factor, 1));line-height:calc(2.5rem*var(--scale-factor, 1))}.pythonrunner-console-output-line{padding-inline-end:5px}.pythonrunner-console-output-line.stderr{color:red}.pythonrunner-input{caret-color:inherit;color:#2467ec;display:block;line-height:20px;padding:2px 1px 2px 0}.pythonrunner-input:focus{outline:0}.pythonrunner-graphic{overflow:auto;position:relative}.visual-output{flex:1;display:flex;min-block-size:100%;inline-size:100%}#p5Sketch{display:flex;flex:1;position:absolute}.--light .visual-output{background:url(\"data:image/svg+xml,%3Csvg width='525' height='686' viewBox='0 0 525 686' fill='none' xmlns='http:%2F%2Fwww.w3.org/2000/svg' xmlns:xlink='http:%2F%2Fwww.w3.org/1999/xlink'%3E%3Crect width='526' height='686' transform='translate(0.5)' fill='url(%23pattern0)' fill-opacity='0.1'/%3E%3Cdefs%3E%3Cpattern id='pattern0' patternContentUnits='objectBoundingBox' width='0.0152091' height='0.0116618'%3E%3Cuse xlink:href='%23image0_214_29626' transform='scale(0.00190114 0.00145773)'/%3E%3C/pattern%3E%3Cimage id='image0_214_29626' width='8' height='8' xlink:href='data:image/png%3Bbase64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAAXNSR0IArs4c6QAAABdJREFUGBljYGBg+A/FQAoTMGEKDUcRAATwAgFGIXEOAAAAAElFTkSuQmCC'/%3E%3C/defs%3E%3C/svg%3E\")}.--dark .visual-output{background:url(\"data:image/svg+xml,%3Csvg width='527' height='684' viewBox='0 0 527 684' fill='none' xmlns='http:%2F%2Fwww.w3.org/2000/svg' xmlns:xlink='http:%2F%2Fwww.w3.org/1999/xlink'%3E%3Crect width='526' height='686' transform='translate(0.388916)' fill='url(%23pattern0)'/%3E%3Cdefs%3E%3Cpattern id='pattern0' patternContentUnits='objectBoundingBox' width='0.0152091' height='0.0116618'%3E%3Cuse xlink:href='%23image0_214_22403' transform='scale(0.00190114 0.00145773)'/%3E%3C/pattern%3E%3Cimage id='image0_214_22403' width='8' height='8' xlink:href='data:image/png%3Bbase64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAAXNSR0IArs4c6QAAABdJREFUGBljYGBg+A/FQAoTMGEKDUcRAATwAgFGIXEOAAAAAElFTkSuQmCC'/%3E%3C/defs%3E%3C/svg%3E%0A\")}.output-panel{display:flex;overflow:hidden}.output-panel--text{flex:3}.output-panel--visual{flex:7}.--light .output-panel--visual{border-block-end:5px solid #e3e4e8}.--dark .output-panel--visual{border-block-end:5px solid #4a4d59}.--light .output-panel--single,.--dark .output-panel--single{border-block-end:none}.htmlrunner-container{container-type:inline-size;display:flex;block-size:100%;inline-size:100%}.htmlrunner-link{margin-inline-start:auto}@container (max-width: 480px){.htmlrunner-link__text{display:none}}.htmlrunner-iframe{border:none;background-color:#fff;block-size:100%;inline-size:100%}.error-message{color:#7e0305;background-color:#fde2e1;padding:calc(.75rem*var(--scale-factor, 1)) calc(1.25rem*var(--scale-factor, 1))}.error-message__content{padding:0;margin:0;white-space:pre-wrap;word-break:break-word}.error-message--medium{font-size:calc(1.5rem*var(--scale-factor, 1));line-height:calc(2rem*var(--scale-factor, 1))}.error-message--large{font-size:calc(2rem*var(--scale-factor, 1));line-height:calc(2.5rem*var(--scale-factor, 1))}.output-view-toggle__button{block-size:100%}.--light .output-view-toggle{border-inline-start:1px solid #d5d7dc}.--dark .output-view-toggle{border-inline-start:1px solid #4a4d59}.sense-hat{inline-size:100%;flex:1;display:flex;flex-flow:column}.sense-hat-model{display:flex;flex-flow:column;max-block-size:50%;min-block-size:200px;flex:1;padding-block-end:calc(.5rem*var(--scale-factor, 1))}.sense-hat-model canvas{cursor:grab}.sense-hat-model-orientation{display:flex;align-items:center;justify-content:center;margin:0 calc(.5rem*var(--scale-factor, 1))}.sense-hat-model-orientation__spacing{flex:1}.sense-hat-model-orientation__values{flex:10;display:flex;margin:0 calc(.5rem*var(--scale-factor, 1))}.sense-hat-model-orientation__reading{font-size:calc(.75rem*var(--scale-factor, 1));line-height:calc(1rem*var(--scale-factor, 1));flex:1;text-transform:uppercase;font-weight:700;margin:0 calc(.5rem*var(--scale-factor, 1))}.sense-hat-model-orientation__reset-btn{flex:1;display:flex;margin-inline-start:auto}.sense-hat-model-orientation__reset-btn svg{padding:calc(.5rem*var(--scale-factor, 1));border-radius:5px;fill:#000}.sense-hat-model-orientation__reset-btn button{cursor:pointer}.sense-hat-controls{padding:calc(.5rem*var(--scale-factor, 1));display:flex;flex-flow:column}.sense-hat-controls-heading{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));font-weight:400;margin-block:0 calc(.5rem*var(--scale-factor, 1));margin-inline:0}.sense-hat-controls-panel{flex:1;display:flex;flex-flow:column}.sense-hat-controls-panel__control{display:flex;flex-flow:column;align-items:center;text-align:center;padding-block:calc(.25rem*var(--scale-factor, 1)) calc(.5rem*var(--scale-factor, 1));padding-inline:calc(.5rem*var(--scale-factor, 1));box-sizing:border-box;border-radius:5px;inline-size:32%;justify-content:space-between}.sense-hat-controls-panel__control-reading{inline-size:100%;border-radius:5px;margin-block-start:calc(.25rem*var(--scale-factor, 1));padding:calc(.25rem*var(--scale-factor, 1));box-sizing:border-box;display:flex;align-items:center;justify-content:center;font-family:source-code-pro,Menlo,Monaco,Consolas,\"Courier New\",monospace}.sense-hat-controls-panel__control-reading-timer{margin-block-start:0;padding:calc(.5rem*var(--scale-factor, 1)) 0;inline-size:100%}.sense-hat-controls-panel__control-toggle{border-radius:5px;inline-size:100%;flex:1;box-sizing:border-box;display:flex;align-items:center;justify-content:center}.sense-hat-controls-panel__control-toggle label{flex:1}.sense-hat-controls-panel__control-input{cursor:pointer;inline-size:85px;transform:rotate(270deg)}.sense-hat-controls-panel__control input[type=color]{border-radius:5px;flex:1;inline-size:100%;padding:calc(.25rem*var(--scale-factor, 1)) calc(1.5rem*var(--scale-factor, 1))}.sense-hat-controls-panel__control-name{font-variant:small-caps;text-transform:lowercase;margin:calc(.25rem*var(--scale-factor, 1)) 0}.sense-hat-controls-panel__control-value{margin-inline-start:calc(.25rem*var(--scale-factor, 1))}.sense-hat-controls-panel__control-last{margin-block-start:calc(.5rem*var(--scale-factor, 1));flex-flow:row;inline-size:100%;align-items:inherit;justify-content:space-between}.sense-hat-controls-panel__sliders{display:flex;justify-content:space-between}.sense-hat-controls-panel__sliders .sense-hat-controls-panel__control{min-block-size:175px}.sense-hat-controls-panel__container{display:flex;flex-flow:column;align-items:center;inline-size:32%}.sense-hat-controls-panel__container .sense-hat-controls-panel__control-name,.sense-hat-controls-panel__container input{cursor:pointer}.sense-hat-controls-panel__container-timer .sense-hat-controls-panel__control-name{cursor:default}.--dark .sense-hat{background-color:#2a2b32}.--dark .sense-hat-controls{border-block-start:7px solid #17181c}.--dark .sense-hat-controls-panel__control{box-shadow:inset 0 0 calc(3rem*var(--scale-factor, 1)) #33353d;background-color:#33353d}.--dark .sense-hat-controls-panel__control-reading{background-color:#2a2b32;border:1px solid #636674}.--dark .sense-hat-controls-panel__control input[type=color]{background-color:#2a2b32;border:1px solid #636674}.--dark .sense-hat-controls-panel__control-toggle{background-color:#2a2b32;border:1px solid #636674}.--dark .sense-hat-controls-panel__control-toggle .react-toggle-thumb{border:1px solid #fff;background-color:#fff}.--dark .sense-hat-model{background-color:#002b3f}.--dark .sense-hat-model-orientation{background-color:#002b3f;color:#fff}.--dark .sense-hat-model-orientation__reset-btn svg{background-color:#fff}.--light .sense-hat{background-color:#fff}.--light .sense-hat-controls{border-block-start:5px solid #e3e4e8}.--light .sense-hat-controls-panel__control{box-shadow:inset 0 0 calc(3rem*var(--scale-factor, 1)) #e3e4e8;background-color:#f1f2f3}.--light .sense-hat-controls-panel__control-reading{background-color:#e3e4e8;border:2px solid #babcc5}.--light .sense-hat-controls-panel__control input[type=color]{background-color:#fff;border:2px solid #babcc5}.--light .sense-hat-controls-panel__control-toggle{background-color:#fff;border:2px solid #babcc5}.--light .sense-hat-controls-panel__control-toggle .react-toggle-thumb{border:1px solid #e3e4e8;background-color:#e3e4e8}.--light .sense-hat-model{background-color:#002b3f}.--light .sense-hat-model-orientation{background-color:#002b3f;color:#fff}.--light .sense-hat-model-orientation__reset-btn svg{background-color:#fff}.mobile-project-bar{background-color:#fff;border-block-start:1px solid #d5d7dc;display:flex;block-size:25px;justify-content:space-between;padding:0 calc(.5rem*var(--scale-factor, 1))}.mobile-project-bar__name{font-size:calc(.75rem*var(--scale-factor, 1));line-height:calc(1rem*var(--scale-factor, 1));font-weight:700;margin:auto 0}.--dark .mobile-project-bar{background-color:#2a2b32;border-block-start:1px solid #4a4d59}.--dark .mobile-project-bar__name{color:#fff}.--light .mobile-project-bar{background-color:#fff;border-block-start:1px solid #d5d7dc}.--light .mobile-project-bar__name{color:#4d575b}.btn{align-items:center;border-radius:calc(.5rem*var(--scale-factor, 1));border:3px solid rgba(0,0,0,0);box-sizing:border-box;color:inherit;cursor:pointer;display:inline-flex;font-family:sans-serif;font-size:inherit;font-weight:700;gap:calc(.5rem*var(--scale-factor, 1));justify-content:center;min-block-size:44px;min-inline-size:44px;padding:10px;position:relative;text-align:center;text-decoration:none}.btn:disabled{background-color:#4a4d59;color:#fff;cursor:default}.btn:focus-visible{border:3px solid #cd2356;outline:none}.btn--primary{background-color:var(--rpf-button-primary-background-color);border-radius:calc(.5rem*var(--scale-factor, 1));color:var(--rpf-button-primary-text-color)}.btn--primary svg{fill:var(--rpf-button-primary-text-color)}.btn--primary:active,.btn-outer:active .btn--primary{background-color:var(--rpf-button-primary-background-color-active)}.btn--primary:focus-visible,.btn-outer:focus-visible .btn--primary{background-color:var(--rpf-button-primary-background-color-focus)}.btn--primary:hover,.btn-outer:hover .btn--primary{background-color:var(--rpf-button-primary-background-color-hover);border-radius:calc(.5rem*var(--scale-factor, 1))}.btn--primary:disabled{background-color:var(--rpf-button-primary-background-color-disabled);color:var(--rpf-button-primary-color-disabled)}.btn--primary:disabled svg{fill:var(--rpf-button-primary-color-disabled)}.btn--primary:disabled:hover,.btn-outer:hover .btn--primary:disabled{background-color:var(--rpf-button-primary-background-color-disabled)}.btn--secondary{background-color:inherit;color:var(--rpf-button-secondary-text-color);border:2px solid var(--rpf-button-primary-background-color)}.btn--secondary svg{fill:var(--rpf-button-secondary-text-color)}.btn--secondary:active,.btn-outer:active .btn--secondary{background-color:inherit}.btn--secondary:focus-visible,.btn-outer:focus-visible .btn--secondary{background-color:inherit}.btn--secondary:hover,.btn-outer:hover .btn--secondary{background-color:inherit}.btn--secondary:disabled{background-color:var(--rpf-button-secondary-background-color-disabled);color:var(--rpf-button-secondary-background-color-active)}.btn--secondary:disabled svg{fill:var(--rpf-button-secondary-background-color-active)}.btn--secondary:disabled:hover,.btn-outer:hover .btn--secondary:disabled{background-color:var(--rpf-button-secondary-background-color-disabled)}.btn--secondary:active{border:2px solid var(--rpf-button-secondary-background-color-active)}.btn--secondary:hover{background-color:var(--rpf-button-secondary-background-color-hover);color:var(--rpf-button-secondary-text-color-hover);border-color:var(--rpf-button-secondary-border-color-hover) !important}.btn--secondary:hover svg{fill:var(--rpf-button-secondary-text-color-hover)}.btn--secondary:focus-visible{outline:3px solid var(--rpf-button-secondary-background-color-focus)}.btn--tertiary{background-color:inherit;color:inherit}.btn--tertiary:active,.btn-outer:active .btn--tertiary{background-color:inherit}.btn--tertiary:focus-visible,.btn-outer:focus-visible .btn--tertiary{background-color:inherit}.btn--tertiary:hover,.btn-outer:hover .btn--tertiary{background-color:inherit}.btn--tertiary:disabled{background-color:inherit;color:#4a4d59}.btn--tertiary:disabled svg{fill:#4a4d59}.btn--tertiary:disabled:hover,.btn-outer:hover .btn--tertiary:disabled{background-color:inherit}.btn--tertiary:active{color:#0e857a}.btn--tertiary:active svg{fill:#0e857a}.btn--tertiary:hover{color:var(--rpf-button-tertiary-text-color-hover)}.btn--tertiary:hover svg{fill:var(--rpf-button-tertiary-text-color-hover)}.btn--danger{background-color:#9e0a0a;color:#fff}.btn--danger svg{fill:#fff}.btn--danger:active,.btn-outer:active .btn--danger{background-color:#9e0a0a}.btn--danger:focus-visible,.btn-outer:focus-visible .btn--danger{background-color:#9e0a0a}.btn--danger:hover,.btn-outer:hover .btn--danger{background-color:#86151e}.btn--danger:disabled{background-color:#9e0a0a;color:#fff}.btn--danger:disabled svg{fill:#fff}.btn--danger:disabled:hover,.btn-outer:hover .btn--danger:disabled{background-color:#9e0a0a}.btn--danger:focus-visible{background-clip:padding-box;border:2px solid rgba(0,0,0,0);outline:3px solid #cd2356}.btn--small{min-block-size:unset;min-inline-size:unset;padding:calc(.25rem*var(--scale-factor, 1))}.btn--svg-only svg{margin:0}.btn-outer{background:rgba(0,0,0,0);border-radius:calc(.5rem*var(--scale-factor, 1));cursor:pointer;padding:calc(.5rem*var(--scale-factor, 1)) 0;display:flex;align-items:center;justify-content:center}.btn-outer:focus-visible{outline:none}.btn-outer:focus-visible .btn{border:3px solid #cd2356}.btn-outer:has(.btn:disabled){cursor:default}.rpf-button--primary * svg{fill:var(--rpf-button-primary-text-color)}.rpf-button--tertiary * svg{fill:var(--rpf-button-secondary-text-color) !important}.rpf-button{flex-direction:row-reverse}.rpf-button--fit{inline-size:fit-content}.rpf-button.rpf-button--fill{justify-content:center;inline-size:100%;box-sizing:border-box}.rpf-button--secondary{justify-content:center;align-items:center}.rpf-button--secondary * svg{fill:#4d575b}.--dark * .rpf-button--secondary{border-color:#89ddd5}.--dark * .rpf-button--secondary span{color:#fff}.--dark * .rpf-button--secondary svg{fill:#fff}.--dark * .rpf-button--secondary::before{background-color:#33353d}.--dark * .rpf-button--secondary:hover{border-color:#89ddd5}.--dark * .rpf-button--secondary:hover::before{background-color:rgba(255,255,255,.1)}.--dark * .rpf-button--secondary:active::before{background-color:rgba(255,255,255,.15)}.--dark * .rpf-button--secondary:disabled{border-color:#d5d7dc;background-color:inherit}.--dark * .rpf-button--secondary:disabled::before{background-color:inherit}.--dark * .rpf-button--secondary:disabled span{color:#d5d7dc}.--dark * .rpf-button--tertiary{color:#fff;border:none}.--dark * .rpf-button--tertiary:hover::before{background-color:rgba(255,255,255,.1)}.--dark * .rpf-button--tertiary:active::before{background-color:rgba(255,255,255,.15)}.--dark * .rpf-button--tertiary:disabled{background-color:inherit}.--dark * .rpf-button--tertiary:disabled::before{background-color:inherit}.--dark * .rpf-button--tertiary:disabled span{color:#d5d7dc}.--light * .rpf-button--secondary span{color:#212121}.--light * .rpf-button--secondary::before{background-color:#fff}.--light * .rpf-button--secondary:hover{border-color:#89ddd5}.--light * .rpf-button--secondary:hover::before{background-color:#e7f8f7}.--light * .rpf-button--secondary:active::before{background-color:#dcf5f3}.--light * .rpf-button--secondary:disabled{border-color:#d5d7dc;background-color:inherit}.--light * .rpf-button--secondary:disabled::before{background-color:inherit}.--light * .rpf-button--secondary:disabled span{color:#d5d7dc}.--light * .rpf-button--tertiary{color:#212121;border:none}.--light * .rpf-button--tertiary::before{background-color:#fff}.--light * .rpf-button--tertiary:hover::before{background-color:#e7f8f7}.--light * .rpf-button--tertiary:active::before{background-color:#dcf5f3}.--light * .rpf-button--tertiary:disabled{background-color:inherit}.--light * .rpf-button--tertiary:disabled::before{background-color:inherit}.--light * .rpf-button--tertiary:disabled span{color:#d5d7dc}.rpf-button__icon{display:flex}.save-status{align-items:center;display:flex;gap:calc(.25rem*var(--scale-factor, 1));justify-content:flex-end;margin-block:0;padding-inline:calc(1rem*var(--scale-factor, 1))}.save-status--mobile{margin:unset}.save-status--mobile .save-status__text{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1))}.save-status__icon{display:flex}.context-menu__drop{padding:calc(.5rem*var(--scale-factor, 1)) calc(1rem*var(--scale-factor, 1));margin:0}.context-menu__drop svg{margin:0}.context-menu__drop :focus-visible{border:none}.context-menu{list-style-type:none;padding:0;margin-inline:calc(.5rem*var(--scale-factor, 1)) 0;margin-block:0;border-radius:5px;display:flex;flex-direction:column}.context-menu .context-menu__item{margin:0;background-color:inherit;color:var(--rpf-button-secondary-color);padding:calc(.5rem*var(--scale-factor, 1));text-align:start;white-space:nowrap;overflow-x:visible;box-sizing:border-box;inline-size:100%;justify-content:start}.context-menu :focus-visible{border:none}.context-menu svg{inline-size:calc(1.5rem*var(--scale-factor, 1));block-size:auto}.context-menu--dark{background-color:#000;color:#fff;border:1px solid rgba(0,0,0,0)}.context-menu--dark svg{fill:#fff}.context-menu--dark .btn:hover{background-color:#33353d}.context-menu--dark .btn:disabled{color:#4a4d59}.context-menu--light{background-color:#fff;color:#212121;border:1px solid #d5d7dc}.context-menu--light svg{fill:#000}.context-menu--light .btn:hover{background-color:#e3e4e8}.context-menu--light .btn:disabled{color:#babcc5}.context-menu--dark .btn:disabled svg{fill:#4a4d59}.context-menu--light .btn:disabled svg{fill:#e3e4e8}.context-menu .btn:disabled:hover{background-color:inherit}.files-list-item-wrapper{display:flex;position:relative}.files-list-item{inline-size:100%;display:flex;flex-direction:row !important;justify-content:flex-start;position:relative;align-items:center;border-radius:8px;border:3px solid rgba(0,0,0,0);box-sizing:border-box;white-space:nowrap;font-weight:400;min-block-size:44px;padding:calc(.5rem*var(--scale-factor, 1)) calc(2.5rem*var(--scale-factor, 1)) calc(.5rem*var(--scale-factor, 1)) calc(.5rem*var(--scale-factor, 1));margin:0}.files-list-item span{font-weight:700;overflow-x:hidden;text-overflow:ellipsis}.files-list-item__menu{border-radius:8px;position:absolute;inset-inline-end:0}.files-list-item:hover,.files-list-item__menu:hover{background-color:var(--rpf-files-list-item-hover)}.files-list-item:hover::before,.files-list-item__menu:hover::before{background-color:rgba(0,0,0,0) !important}.files-list-item:active,.files-list-item__menu:active{background-color:var(--rpf-files-list-item-active)}.embedded-viewer{display:flex;flex:1 1 auto;block-size:auto;overflow:hidden}.embedded-viewer .proj-runner-container{display:flex;flex:1 1 auto;flex-direction:column;border-radius:10px;block-size:auto;inline-size:100%}.embedded-viewer .pythonrunner-container{border-radius:10px;flex:1;overflow:hidden;box-sizing:border-box}.embedded-viewer .visual-output{box-sizing:border-box;overflow:auto}#app.--light .embedded-viewer{background-color:#fff}:host{font-size:1.6rem}#wc{background:var(--editor-secondary-theme, transparent);font-family:\"Roboto\",-apple-system,BlinkMacSystemFont,\"Segoe UI\",\"Oxygen\",\"Ubuntu\",\"Cantarell\",\"Fira Sans\",\"Droid Sans\",\"Helvetica Neue\",sans-serif;font-size:16px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:flex;flex-flow:column;block-size:100%}#wc .proj{min-block-size:100%}code{font-family:source-code-pro,Menlo,Monaco,Consolas,\"Courier New\",monospace}button{all:initial;font-size:inherit}svg{min-inline-size:fit-content}button:focus-visible{outline:2px solid #000}.select-buttons__tick--selected svg path{fill:var(--editor-color-layer-2)}.--light{--editor-color-layer-1: #e7f8f7;--editor-color-layer-2: #ffffff;--editor-color-layer-3: #ffffff;--editor-color-outline: #d5d7dc;--editor-color-theme: #232d9a;--editor-color-theme-secondary: #0e857a;--editor-color-theme-tertiary: #e7f8f7;--editor-color-text: #212121;--editor-color-text-secondary: #4d575b}.--dark{--editor-color-layer-1: #23242a;--editor-color-layer-2: #ffffff;--editor-color-layer-3: #33353d;--editor-color-outline: #4a4d59;--editor-color-theme: #232d9a;--editor-color-theme-secondary: #89ddd5;--editor-color-theme-tertiary: #0e857a;--editor-color-text: #ffffff;--editor-color-text-secondary: #cccccc;--rpf-button-secondary-text-color: #ffffff}.--dark .rpf-button--secondary{border-color:#232d9a}",""]),t.a=c},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,'.react-tabs{-webkit-tap-highlight-color:transparent}.react-tabs__tab-list{border-bottom:1px solid #aaa;margin:0 0 10px;padding:0}.react-tabs__tab{display:inline-block;border:1px solid transparent;border-bottom:none;bottom:-1px;position:relative;list-style:none;padding:6px 12px;cursor:pointer}.react-tabs__tab--selected{background:#fff;border-color:#aaa;color:black;border-radius:5px 5px 0 0}.react-tabs__tab--disabled{color:GrayText;cursor:default}.react-tabs__tab:focus{box-shadow:0 0 5px hsl(208, 99%, 50%);border-color:hsl(208, 99%, 50%);outline:none}.react-tabs__tab:focus:after{content:"";position:absolute;height:5px;left:-4px;right:-4px;bottom:-5px;background:#fff}.react-tabs__tab-panel{display:none}.react-tabs__tab-panel--selected{display:block}.react-toggle{touch-action:pan-x;display:inline-block;position:relative;cursor:pointer;background-color:transparent;border:0;padding:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);-webkit-tap-highlight-color:transparent}.react-toggle-screenreader-only{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.react-toggle--disabled{cursor:not-allowed;opacity:.5;-webkit-transition:opacity .25s;transition:opacity .25s}.react-toggle-track{width:50px;height:24px;padding:0;border-radius:30px;background-color:#4d4d4d;-webkit-transition:all .2s ease;-moz-transition:all .2s ease;transition:all .2s ease}.react-toggle:hover:not(.react-toggle--disabled) .react-toggle-track{background-color:#000}.react-toggle--checked .react-toggle-track{background-color:#19ab27}.react-toggle--checked:hover:not(.react-toggle--disabled) .react-toggle-track{background-color:#128d15}.react-toggle-track-check{position:absolute;width:14px;height:10px;top:0px;bottom:0px;margin-top:auto;margin-bottom:auto;line-height:0;left:8px;opacity:0;-webkit-transition:opacity .25s ease;-moz-transition:opacity .25s ease;transition:opacity .25s ease}.react-toggle--checked .react-toggle-track-check{opacity:1;-webkit-transition:opacity .25s ease;-moz-transition:opacity .25s ease;transition:opacity .25s ease}.react-toggle-track-x{position:absolute;width:10px;height:10px;top:0px;bottom:0px;margin-top:auto;margin-bottom:auto;line-height:0;right:10px;opacity:1;-webkit-transition:opacity .25s ease;-moz-transition:opacity .25s ease;transition:opacity .25s ease}.react-toggle--checked .react-toggle-track-x{opacity:0}.react-toggle-thumb{transition:all .5s cubic-bezier(0.23, 1, 0.32, 1) 0ms;position:absolute;top:1px;left:1px;width:22px;height:22px;border:1px solid #4d4d4d;border-radius:50%;background-color:#fafafa;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:all .25s ease;-moz-transition:all .25s ease;transition:all .25s ease}.react-toggle--checked .react-toggle-thumb{left:27px;border-color:#19ab27}.react-toggle--focus .react-toggle-thumb{-webkit-box-shadow:0px 0px 3px 2px #0099e0;-moz-box-shadow:0px 0px 3px 2px #0099e0;box-shadow:0px 0px 2px 3px #0099e0}.react-toggle:active:not(.react-toggle--disabled) .react-toggle-thumb{-webkit-box-shadow:0px 0px 5px 5px #0099e0;-moz-box-shadow:0px 0px 5px 5px #0099e0;box-shadow:0px 0px 5px 5px #0099e0}pre[class*=language-].line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}pre[class*=language-].line-numbers>code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows>span{display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.8em;text-align:right}pre[data-line]{position:relative;padding:1em 0 1em 3em}.line-highlight{position:absolute;left:0;right:0;padding:inherit 0;margin-top:1em;background:hsla(24, 20%, 50%, 0.08);background:linear-gradient(to right, hsla(24, 20%, 50%, 0.1) 70%, hsla(24, 20%, 50%, 0));pointer-events:none;line-height:inherit;white-space:pre}@media print{.line-highlight{-webkit-print-color-adjust:exact;color-adjust:exact}}.line-highlight:before,.line-highlight[data-end]:after{content:attr(data-start);position:absolute;top:.4em;left:.6em;min-width:1em;padding:0 .5em;background-color:hsla(24, 20%, 50%, 0.4);color:hsl(24, 20%, 95%);font:bold 65%/1.5 sans-serif;text-align:center;vertical-align:.3em;border-radius:999px;text-shadow:none;box-shadow:0 1px white}.line-highlight[data-end]:after{content:attr(data-end);top:auto;bottom:.4em}.line-numbers .line-highlight:before,.line-numbers .line-highlight:after{content:none}pre[id].linkable-line-numbers span.line-numbers-rows{pointer-events:all}pre[id].linkable-line-numbers span.line-numbers-rows>span:before{cursor:pointer}pre[id].linkable-line-numbers span.line-numbers-rows>span:hover:before{background-color:rgba(128, 128, 128, 0.2)}',""]),t.a=i},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,':root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}html,body{margin:0}:host{font-size:16px}body{font-family:"Roboto",-apple-system,BlinkMacSystemFont,"Segoe UI","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,"Courier New",monospace}#app{min-block-size:100dvh}.--light,#wc.--light{--editor-color-layer-1: #e7f8f7;--editor-color-layer-2: #000000;--editor-color-layer-3: #ffffff;--editor-color-outline: #d5d7dc;--editor-color-theme: #14bdac;--editor-color-theme-secondary: #0e857a;--editor-color-theme-tertiary: #e7f8f7;--editor-color-text: #212121;--editor-color-text-secondary: #4d575b;--rpf-files-list-item-active: #dcf5f3;--rpf-files-list-item-hover: #e7f8f7;--rpf-tab-button-hover: var(--rpf-grey-100);--rpf-tab-button-background: inherit;--rpf-tab-border-bottom-selected: var(--rpf-teal-900);--sidebar-border: var(--rpf-grey-150);--sidebar-background: var(--rpf-white);--sidebar-background-selected: var(--rpf-off-white);--sidebar-panel-background: var(--rpf-white);--sidebar-option-hover: var(--rpf-grey-100);--sidebar-option-selected-icon: var(--rpf-black);--sidebar-option-selected-border: var(--editor-color-theme);--sidebar-option-selected-background: var(--editor-color-theme-tertiary);--sidebar-option-selected-background-hover: var(--rpf-teal-200)}.--dark,#wc.--dark{--editor-color-layer-1: #23242a;--editor-color-layer-2: #2a2b32;--editor-color-layer-3: #33353d;--editor-color-outline: #4a4d59;--editor-color-theme: #89ddd5;--editor-color-theme-secondary: #89ddd5;--editor-color-theme-tertiary: #0e857a;--editor-color-text: #ffffff;--editor-color-text-secondary: #cccccc;--rpf-files-list-item-active: hsla(0, 0%, 100%, 0.15);--rpf-files-list-item-hover: hsla(0, 0%, 100%, 0.1);--rpf-tab-button-hover: var(--rpf-grey-900);--rpf-tab-button-background: var(--rpf-grey-800);--rpf-tab-border-bottom-selected: var(--rpf-teal-800);--sidebar-border: var(--rpf-grey-600);--sidebar-background: var(--rpf-grey-800);--sidebar-background-selected: var(--rpf-grey-800);--sidebar-panel-background: var(--rpf-grey-700);--sidebar-option-hover: var(--rpf-grey-600);--sidebar-option-selected-icon: var(--rpf-white);--sidebar-option-selected-border: var(--editor-color-theme);--sidebar-option-selected-background: var(--editor-color-theme-tertiary);--sidebar-option-selected-background-hover: var(--rpf-teal-800)}.--dark .btn,.--dark .rpf-button,#wc.--dark .btn,#wc.--dark .rpf-button{--rpf-button-primary-background-color: var(--rpf-teal-400);--rpf-button-primary-background-color-focus: var(--rpf-teal-400);--rpf-button-primary-background-color-active: var(--rpf-teal-200);--rpf-button-primary-background-color-disabled: var(--rpf-grey-200);--rpf-button-primary-color-disabled: var(--rpf-grey-700);--rpf-button-primary-color-disabled-focus: var(--rpf-teal-400);--rpf-button-primary-background-color-hover: var(--rpf-teal-600);--rpf-button-secondary-background-color: var(--rpf-grey-800);--rpf-button-secondary-background-color-active: var(--rpf-teal-200);--rpf-button-secondary-color-disabled-background: var(--rpf-grey-700);--rpf-button-secondary-background-color-hover: var(--rpf-grey-600);--rpf-button-secondary-border-color-hover: var(--rpf-teal-400);--rpf-button-secondary-color-disabled: var(--rpf-grey-100);--rpf-button-secondary-color: var(--rpf-white);--rpf-button-secondary-text-color: var(--rpf-white);--rpf-button-tertiary-text-color-hover: var(--rpf-grey-200)}.--dark .rpf-button--secondary,#wc.--dark .rpf-button--secondary{border-color:var(--rpf-teal-400)}.btn,.rpf-button{--rpf-button-primary-background-color: var(--rpf-teal-800);--rpf-button-primary-background-color-focus: var(--rpf-teal-800);--rpf-button-primary-background-color-hover: var(--rpf-teal-900);--rpf-button-primary-background-color-active: var(--rpf-teal-600);--rpf-button-primary-background-color-disabled: var(--rpf-teal-200);--rpf-button-primary-color-disabled: var(--rpf-grey-600);--rpf-button-primary-text-color: var(--rpf-black);--rpf-button-secondary-background-color: var(--rpf-teal-800);--rpf-button-secondary-background-color-focus: $rpf-brand-raspberry;--rpf-button-secondary-background-color-hover: var(--rpf-teal-100);--rpf-button-secondary-border-color-hover: var(--rpf-teal-900);--rpf-button-secondary-background-color-active: var(--rpf-teal-900);--rpf-button-secondary-background-color-disabled: var(--rpf-grey-50);--rpf-button-secondary-text-color: var(--rpf-black);--rpf-button-tertiary-text-color-hover: var(--rpf-grey-600)}.btn .rpf-button--secondary,.rpf-button .rpf-button--secondary{border-color:var(--rpf-teal-800)}.select-buttons__tick--selected{--rpf-select-buttons-tick-color: var(--rpf-black)}.modal-overlay{--rpf-input-active-border: var(--editor-color-theme) }',""]),t.a=i},function(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(2),a=c(s),l=c(n(1));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.getStyleString=function(){if(n.props.children instanceof Array){var e=n.props.children.filter((function(e){return!(0,s.isValidElement)(e)&&"string"==typeof e}));if(e.length>1)throw new Error("Multiple style objects as direct descedents of a Style component are not supported ("+e.length+" style objects detected): \n\n"+e[0]);return e[0]}return"string"!=typeof n.props.children||(0,s.isValidElement)(n.props.children)?null:n.props.children},n.getRootElement=function(){if(n.props.children instanceof Array){var e=n.props.children.filter((function(e){return(0,s.isValidElement)(e)}));return e[0]}return(0,s.isValidElement)(n.props.children)?n.props.children:null},n.getRootSelectors=function(e){var t=[];return e.props.id&&t.push("#"+e.props.id),e.props.className&&e.props.className.trim().split(/\s+/g).forEach((function(e){return t.push(e)})),t.length||"function"==typeof e.type||t.push(e.type),t},n.processCSSText=function(e,t,r){return e.replace(/\s*\/\/(?![^(]*\)).*|\s*\/\*.*\*\//g,"").replace(/\s\s+/g," ").split("}").map((function(e){var i=/.*:.*;/g,o=/.*:.*(;|$|\s+)/g,s=/\s*@/g,a=/\s*(([0-9][0-9]?|100)\s*%)|\s*(to|from)\s*$/g;return e.split("{").map((function(e,l,c){if(!e.trim().length)return"";var u=c.length-1===l&&e.match(o);if(e.match(i)||u)return n.escapeTextContentForBrowser(e);var d=e;return t&&!/:target/gi.test(d)?d.match(s)||d.match(a)?d:n.scopeSelector(t,d,r):d})).join("{\n")})).join("}\n")},n.escaper=function(e){return{">":">","<":"<"}[e]},n.escapeTextContentForBrowser=function(e){return(""+e).replace(/[><]/g,n.escaper)},n.scopeSelector=function(e,t,n){for(var r=[],i=t.split(/,(?![^(|[]*\)|\])/g),o=0;o<i.length;o++){var s=void 0,a=void 0;if(n.length&&n.some((function(e){return t.match(e)}))){a=i[o];var l=n.map((function(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}));a=a.replace(new RegExp("("+l.join("|")+")"),"$1"+e),s=e+" "+i[o],r.push(a,s)}else s=e+" "+i[o],r.push(s)}return r.join(", ")},n.getScopeClassName=function(e,t){var r=e;return t&&(n.pepper="",n.traverseObjectToGeneratePepper(t),r+=n.pepper),"s"+(0,l.default)(r)},n.traverseObjectToGeneratePepper=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!(t>32||n.pepper.length>1e4))for(var r in e){var o=/^[_$]|type|ref|^value$/.test(r);e[r]&&"object"===i(e[r])&&!o?n.traverseObjectToGeneratePepper(e[r],t+1):e[r]&&!o&&"function"!=typeof e[r]&&(n.pepper+=e[r])}},n.isVoidElement=function(e){return["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"].some((function(t){return e===t}))},n.addCSSTextToHead=function(e){if(e.length){var t=(0,l.default)(e);window._reactiveStyle.cssTextHashesAddedToHead.some((function(e){return e===t}))||(window._reactiveStyle.el.innerHTML+=e,window._reactiveStyle.cssTextHashesAddedToHead.push(t))}},n.createStyleElement=function(e,t){return a.default.createElement("style",{type:"text/css",key:t,ref:function(e){return n._style=e},dangerouslySetInnerHTML:{__html:e||""}})},n.getNewChildrenForCloneElement=function(e,t,r){return[n.createStyleElement(e,r)].concat(t.props.children)},n.scopeClassNameCache={},n.scopedCSSTextCache={},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"render",value:function(){if(!this.props.children)return this.createStyleElement();var e=this.getStyleString(),t=this.getRootElement();if(!e&&t)return t.props.children;if(e&&!t)return this.createStyleElement(this.processCSSText(e),this.getScopeClassName(e,t));var n=t.props.className?t.props.className+" ":"",i=void 0,o=void 0,a=n+(t.props.id?t.props.id:"")+e;return this.scopeClassNameCache[a]?(i=this.scopeClassNameCache[a],o=this.scopedCSSTextCache[i]):(i=this.getScopeClassName(e,t),o=this.processCSSText(e,"."+i,this.getRootSelectors(t)),this.scopeClassNameCache[a]=i,this.scopedCSSTextCache[i]=o),(0,s.cloneElement)(t,r({},t.props,{className:""+n+i}),this.getNewChildrenForCloneElement(o,t,i))}}]),t}(s.Component);u.it=function(e,t){return a.default.createElement(u,null,e,t)},t.default=u},function(e,t){"use strict";e.exports=function(e){for(var t=1,n=0,r=0,i=e.length,o=-4&i;r<o;){for(var s=Math.min(r+4096,o);r<s;r+=4)n+=(t+=e.charCodeAt(r))+(t+=e.charCodeAt(r+1))+(t+=e.charCodeAt(r+2))+(t+=e.charCodeAt(r+3));t%=65521,n%=65521}for(;r<i;r++)n+=t+=e.charCodeAt(r);return(t%=65521)|(n%=65521)<<16}},function(t,n){t.exports=e}])},e.exports=r(n(0))},function(e,t,n){"use strict";const r=/[\p{Lu}]/u,i=/[\p{Ll}]/u,o=/^[\p{Lu}](?![\p{Lu}])/gu,s=/([\p{Alpha}\p{N}_]|$)/u,a=/[_.\- ]+/,l=new RegExp("^"+a.source),c=new RegExp(a.source+s.source,"gu"),u=new RegExp("\\d+"+s.source,"gu"),d=(e,t)=>{if("string"!=typeof e&&!Array.isArray(e))throw new TypeError("Expected the input to be `string | string[]`");if(t={pascalCase:!1,preserveConsecutiveUppercase:!1,...t},0===(e=Array.isArray(e)?e.map(e=>e.trim()).filter(e=>e.length).join("-"):e.trim()).length)return"";const n=!1===t.locale?e=>e.toLowerCase():e=>e.toLocaleLowerCase(t.locale),s=!1===t.locale?e=>e.toUpperCase():e=>e.toLocaleUpperCase(t.locale);if(1===e.length)return t.pascalCase?s(e):n(e);return e!==n(e)&&(e=((e,t,n)=>{let o=!1,s=!1,a=!1;for(let l=0;l<e.length;l++){const c=e[l];o&&r.test(c)?(e=e.slice(0,l)+"-"+e.slice(l),o=!1,a=s,s=!0,l++):s&&a&&i.test(c)?(e=e.slice(0,l-1)+"-"+e.slice(l-1),a=s,s=!1,o=!0):(o=t(c)===c&&n(c)!==c,a=s,s=n(c)===c&&t(c)!==c)}return e})(e,n,s)),e=e.replace(l,""),e=t.preserveConsecutiveUppercase?((e,t)=>(o.lastIndex=0,e.replace(o,e=>t(e))))(e,n):n(e),t.pascalCase&&(e=s(e.charAt(0))+e.slice(1)),((e,t)=>(c.lastIndex=0,u.lastIndex=0,e.replace(c,(e,n)=>t(n)).replace(u,e=>t(e))))(e,s)};e.exports=d,e.exports.default=d},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return c}));var r=n(8),i=n(113);const o={nowSeconds:()=>Date.now()/1e3};const s=Object(i.b)()?function(){try{return Object(i.a)(e,"perf_hooks").performance}catch(e){return}}():function(){const{performance:e}=r.a;if(!e||!e.now)return;return{now:()=>e.now(),timeOrigin:Date.now()-e.now()}}(),a=void 0===s?o:{nowSeconds:()=>(s.timeOrigin+s.now())/1e3},l=o.nowSeconds.bind(o),c=a.nowSeconds.bind(a);let u;(()=>{const{performance:e}=r.a;if(!e||!e.now)return void(u="none");const t=e.now(),n=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+t-n):36e5,o=i<36e5,s=e.timing&&e.timing.navigationStart,a="number"==typeof s?Math.abs(s+t-n):36e5;o||a<36e5?i<=a?(u="timeOrigin",e.timeOrigin):u="navigationStart":u="dateNow"})()}).call(this,n(64)(e))},function(e,t,n){"use strict";function r(){return"undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return l}));var r=n(18),i=n(192),o=n(26),s=n(86);function a(t,n=1/0,a=1/0){try{return function t(n,a,l=1/0,c=1/0,u=Object(i.a)()){const[d,h]=u;if(null===a||["number","boolean","string"].includes(typeof a)&&!Object(r.h)(a))return a;const p=function(t,n){try{return"domain"===t&&n&&"object"==typeof n&&n._events?"[Domain]":"domainEmitter"===t?"[DomainEmitter]":void 0!==e&&n===e?"[Global]":"undefined"!=typeof window&&n===window?"[Window]":"undefined"!=typeof document&&n===document?"[Document]":Object(r.m)(n)?"[SyntheticEvent]":"number"==typeof n&&n!=n?"[NaN]":void 0===n?"[undefined]":"function"==typeof n?`[Function: ${Object(s.b)(n)}]`:"symbol"==typeof n?`[${String(n)}]`:"bigint"==typeof n?`[BigInt: ${String(n)}]`:`[object ${Object.getPrototypeOf(n).constructor.name}]`}catch(e){return`**non-serializable** (${e})`}}(n,a);if(!p.startsWith("[object "))return p;if(a.__sentry_skip_normalization__)return a;if(0===l)return p.replace("object ","");if(d(a))return"[Circular ~]";const f=a;if(f&&"function"==typeof f.toJSON)try{const e=f.toJSON();return t("",e,l-1,c,u)}catch(e){}const m=Array.isArray(a)?[]:{};let g=0;const b=Object(o.b)(a);for(const e in b){if(!Object.prototype.hasOwnProperty.call(b,e))continue;if(g>=c){m[e]="[MaxProperties ~]";break}const n=b[e];m[e]=t(e,n,l-1,c,u),g+=1}return h(a),m}("",t,n,a)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function l(e,t=3,n=102400){const r=a(e,t);return i=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(i))>n?l(e,t-1,n):r;var i}}).call(this,n(28))},function(e,t,n){"use strict";function r(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++){if(t[e]===n)return!0}return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));n(22),n(50);var r=n(38);function i(){const e=r.a,t=e.crypto||e.msCrypto;if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");const n=t&&t.getRandomValues?()=>t.getRandomValues(new Uint8Array(1))[0]:()=>16*Math.random();return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,e=>(e^(15&n())>>e/4).toString(16))}function o(e){return Array.isArray(e)?e:[e]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(7),i=n(17),o=n(11),s=n(22);n(439);function a(e){try{return e&&"function"==typeof e&&e.name||"<anonymous>"}catch(e){return"<anonymous>"}}function l(){if(!("fetch"in r.a))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function c(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}const u={},d={};function h(e){if(!d[e])switch(d[e]=!0,e){case"console":!function(){if(!("console"in r.a))return;o.a.forEach((function(e){e in r.a.console&&Object(s.c)(r.a.console,e,(function(t){return function(...n){f("console",{args:n,level:e}),t&&t.apply(r.a.console,n)}}))}))}();break;case"dom":!function(){if(!("document"in r.a))return;const e=f.bind(null,"dom"),t=S(e,!0);r.a.document.addEventListener("click",t,!1),r.a.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=r.a[t]&&r.a[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(Object(s.c)(n,"addEventListener",(function(t){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this,o=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},s=o[n]=o[n]||{refCount:0};if(!s.handler){const r=S(e);s.handler=r,t.call(this,n,r,i)}s.refCount+=1}catch(e){}return t.call(this,n,r,i)}})),Object(s.c)(n,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this,i=n.__sentry_instrumentation_handlers__||{},o=i[t];o&&(o.refCount-=1,o.refCount<=0&&(e.call(this,t,o.handler,r),o.handler=void 0,delete i[t]),0===Object.keys(i).length&&delete n.__sentry_instrumentation_handlers__)}catch(e){}return e.call(this,t,n,r)}})))})}();break;case"xhr":!function(){if(!("XMLHttpRequest"in r.a))return;const e=XMLHttpRequest.prototype;Object(s.c)(e,"open",(function(e){return function(...t){const n=this,r=t[1],o=n.__sentry_xhr__={method:Object(i.i)(t[0])?t[0].toUpperCase():t[0],url:t[1]};Object(i.i)(r)&&"POST"===o.method&&r.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const a=function(){if(4===n.readyState){try{o.status_code=n.status}catch(e){}f("xhr",{args:t,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:n})}};return"onreadystatechange"in n&&"function"==typeof n.onreadystatechange?Object(s.c)(n,"onreadystatechange",(function(e){return function(...t){return a(),e.apply(n,t)}})):n.addEventListener("readystatechange",a),e.apply(n,t)}})),Object(s.c)(e,"send",(function(e){return function(...t){return this.__sentry_xhr__&&void 0!==t[0]&&(this.__sentry_xhr__.body=t[0]),f("xhr",{args:t,startTimestamp:Date.now(),xhr:this}),e.apply(this,t)}}))}();break;case"fetch":!function(){if(!function(){if(!l())return!1;if(c(r.a.fetch))return!0;let e=!1;const t=r.a.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=c(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&o.c.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}())return;Object(s.c)(r.a,"fetch",(function(e){return function(...t){const n={args:t,fetchData:{method:m(t),url:g(t)},startTimestamp:Date.now()};return f("fetch",{...n}),e.apply(r.a,t).then(e=>(f("fetch",{...n,endTimestamp:Date.now(),response:e}),e),e=>{throw f("fetch",{...n,endTimestamp:Date.now(),error:e}),e})}}))}();break;case"history":!function(){if(!function(){const e=r.a.chrome,t=e&&e.app&&e.app.runtime,n="history"in r.a&&!!r.a.history.pushState&&!!r.a.history.replaceState;return!t&&n}())return;const e=r.a.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=b,t=String(n);b=t,f("history",{from:e,to:t})}return e.apply(this,t)}}r.a.onpopstate=function(...t){const n=r.a.location.href,i=b;if(b=n,f("history",{from:i,to:n}),e)try{return e.apply(this,t)}catch(e){}},Object(s.c)(r.a.history,"pushState",t),Object(s.c)(r.a.history,"replaceState",t)}();break;case"error":_=r.a.onerror,r.a.onerror=function(e,t,n,r,i){return f("error",{column:r,error:i,line:n,msg:e,url:t}),!!_&&_.apply(this,arguments)};break;case"unhandledrejection":x=r.a.onunhandledrejection,r.a.onunhandledrejection=function(e){return f("unhandledrejection",e),!x||x.apply(this,arguments)};break;default:return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&o.c.warn("unknown instrumentation type:",e))}}function p(e,t){u[e]=u[e]||[],u[e].push(t),h(e)}function f(e,t){if(e&&u[e])for(const n of u[e]||[])try{n(t)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&o.c.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${a(n)}\nError:`,t)}}function m(e=[]){return"Request"in r.a&&Object(i.d)(e[0],Request)&&e[0].method?String(e[0].method).toUpperCase():e[1]&&e[1].method?String(e[1].method).toUpperCase():"GET"}function g(e=[]){return"string"==typeof e[0]?e[0]:"Request"in r.a&&Object(i.d)(e[0],Request)?e[0].url:String(e[0])}let b;let v,y;function S(e,t=!1){return n=>{if(!n||y===n)return;if(function(e){if("keypress"!==e.type)return!1;try{const t=e.target;if(!t||!t.tagName)return!0;if("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable)return!1}catch(e){}return!0}(n))return;const i="keypress"===n.type?"input":n.type;(void 0===v||function(e,t){if(!e)return!0;if(e.type!==t.type)return!0;try{if(e.target!==t.target)return!0}catch(e){}return!1}(y,n))&&(e({event:n,name:i,global:t}),y=n),clearTimeout(v),v=r.a.setTimeout(()=>{v=void 0},1e3)}}let _=null;let x=null},,,,,,,function(e,t,n){"use strict";
|
||
/**
|
||
* @license React
|
||
* react.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var r=Symbol.for("react.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.iterator;var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,b={};function v(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||m}function y(){}function S(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||m}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var _=S.prototype=new y;_.constructor=S,g(_,v.prototype),_.isPureReactComponent=!0;var x=Array.isArray,w=Object.prototype.hasOwnProperty,k={current:null},O={key:!0,ref:!0,__self:!0,__source:!0};function E(e,t,n){var i,o={},s=null,a=null;if(null!=t)for(i in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(s=""+t.key),t)w.call(t,i)&&!O.hasOwnProperty(i)&&(o[i]=t[i]);var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(i in l=e.defaultProps)void 0===o[i]&&(o[i]=l[i]);return{$$typeof:r,type:e,key:s,ref:a,props:o,_owner:k.current}}function A(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}var T=/\/+/g;function C(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function M(e,t,n,o,s){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var l=!1;if(null===e)l=!0;else switch(a){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case r:case i:l=!0}}if(l)return s=s(l=e),e=""===o?"."+C(l,0):o,x(s)?(n="",null!=e&&(n=e.replace(T,"$&/")+"/"),M(s,t,n,"",(function(e){return e}))):null!=s&&(A(s)&&(s=function(e,t){return{$$typeof:r,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(s,n+(!s.key||l&&l.key===s.key?"":(""+s.key).replace(T,"$&/")+"/")+e)),t.push(s)),1;if(l=0,o=""===o?".":o+":",x(e))for(var c=0;c<e.length;c++){var u=o+C(a=e[c],c);l+=M(a,t,n,u,s)}else if("function"==typeof(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=f&&e[f]||e["@@iterator"])?e:null}(e)))for(e=u.call(e),c=0;!(a=e.next()).done;)l+=M(a=a.value,t,n,u=o+C(a,c++),s);else if("object"===a)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function $(e,t,n){if(null==e)return e;var r=[],i=0;return M(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function P(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var R={current:null},j={transition:null},N={ReactCurrentDispatcher:R,ReactCurrentBatchConfig:j,ReactCurrentOwner:k};t.Children={map:$,forEach:function(e,t,n){$(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return $(e,(function(){t++})),t},toArray:function(e){return $(e,(function(e){return e}))||[]},only:function(e){if(!A(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=o,t.Profiler=a,t.PureComponent=S,t.StrictMode=s,t.Suspense=d,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=N,t.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=g({},e.props),o=e.key,s=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,a=k.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)w.call(t,c)&&!O.hasOwnProperty(c)&&(i[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)i.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];i.children=l}return{$$typeof:r,type:e.type,key:o,ref:s,props:i,_owner:a}},t.createContext=function(e){return(e={$$typeof:c,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:l,_context:e},e.Consumer=e},t.createElement=E,t.createFactory=function(e){var t=E.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=A,t.lazy=function(e){return{$$typeof:p,_payload:{_status:-1,_result:e},_init:P}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=j.transition;j.transition={};try{e()}finally{j.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return R.current.useCallback(e,t)},t.useContext=function(e){return R.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return R.current.useDeferredValue(e)},t.useEffect=function(e,t){return R.current.useEffect(e,t)},t.useId=function(){return R.current.useId()},t.useImperativeHandle=function(e,t,n){return R.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return R.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return R.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return R.current.useMemo(e,t)},t.useReducer=function(e,t,n){return R.current.useReducer(e,t,n)},t.useRef=function(e){return R.current.useRef(e)},t.useState=function(e){return R.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return R.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return R.current.useTransition()},t.version="18.2.0"},function(e,t,n){"use strict";
|
||
/**
|
||
* @license React
|
||
* react-dom.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var r=n(0),i=n(204);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,a={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(a[e]=t,e=0;e<t.length;e++)s.add(t[e])}var u=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),d=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},f={};function m(e,t,n,r,i,o,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){g[e]=new m(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];g[t]=new m(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){g[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){g[e]=new m(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){g[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){g[e]=new m(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){g[e]=new m(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){g[e]=new m(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){g[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)}));var b=/[\-:]([a-z])/g;function v(e){return e[1].toUpperCase()}function y(e,t,n,r){var i=g.hasOwnProperty(t)?g[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!d.call(f,e)||!d.call(p,e)&&(h.test(e)?f[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(b,v);g[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(b,v);g[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(b,v);g[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var S=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=Symbol.for("react.element"),x=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),E=Symbol.for("react.provider"),A=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),P=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var R=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var j=Symbol.iterator;function N(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=j&&e[j]||e["@@iterator"])?e:null}var D,I=Object.assign;function L(e){if(void 0===D)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);D=t&&t[1]||""}return"\n"+D+e}var B=!1;function z(e,t){if(!e||B)return"";B=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),o=r.stack.split("\n"),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(1!==s||1!==a)do{if(s--,0>--a||i[s]!==o[a]){var l="\n"+i[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=s&&0<=a);break}}}finally{B=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?L(e):""}function F(e){switch(e.tag){case 5:return L(e.type);case 16:return L("Lazy");case 13:return L("Suspense");case 19:return L("SuspenseList");case 0:case 2:case 15:return e=z(e.type,!1);case 11:return e=z(e.type.render,!1);case 1:return e=z(e.type,!0);default:return""}}function U(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return function e(t){if(null==t)return null;if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case w:return"Fragment";case x:return"Portal";case O:return"Profiler";case k:return"StrictMode";case C:return"Suspense";case M:return"SuspenseList"}if("object"==typeof t)switch(t.$$typeof){case A:return(t.displayName||"Context")+".Consumer";case E:return(t._context.displayName||"Context")+".Provider";case T:var n=t.render;return(t=t.displayName)||(t=""!==(t=n.displayName||n.name||"")?"ForwardRef("+t+")":"ForwardRef"),t;case $:return null!==(n=t.displayName||null)?n:e(t.type)||"Memo";case P:n=t._payload,t=t._init;try{return e(t(n))}catch(e){}}return null}(t);case 8:return t===k?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function Q(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function q(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function G(e){e._valueTracker||(e._valueTracker=function(e){var t=q(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function H(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=q(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function V(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function W(e,t){var n=t.checked;return I({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function X(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=Q(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Y(e,t){null!=(t=t.checked)&&y(e,"checked",t,!1)}function Z(e,t){Y(e,t);var n=Q(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?K(e,t.type,n):t.hasOwnProperty("defaultValue")&&K(e,t.type,Q(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function J(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function K(e,t,n){"number"===t&&V(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ee=Array.isArray;function te(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Q(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function ne(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return I({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function re(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(o(92));if(ee(n)){if(1<n.length)throw Error(o(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:Q(n)}}function ie(e,t){var n=Q(t.value),r=Q(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function oe(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ae(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var le,ce=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((le=le||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=le.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function ue(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var de={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},he=["Webkit","ms","Moz","O"];function pe(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||de.hasOwnProperty(e)&&de[e]?(""+t).trim():t+"px"}function fe(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=pe(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(de).forEach((function(e){he.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),de[t]=de[e]}))}));var me=I({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ge(e,t){if(t){if(me[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(o(62))}}function be(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ve=null;function ye(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Se=null,_e=null,xe=null;function we(e){if(e=hi(e)){if("function"!=typeof Se)throw Error(o(280));var t=e.stateNode;t&&(t=fi(t),Se(e.stateNode,e.type,t))}}function ke(e){_e?xe?xe.push(e):xe=[e]:_e=e}function Oe(){if(_e){var e=_e,t=xe;if(xe=_e=null,we(e),t)for(e=0;e<t.length;e++)we(t[e])}}function Ee(e,t){return e(t)}function Ae(){}var Te=!1;function Ce(e,t,n){if(Te)return e(t,n);Te=!0;try{return Ee(e,t,n)}finally{Te=!1,(null!==_e||null!==xe)&&(Ae(),Oe())}}function Me(e,t){var n=e.stateNode;if(null===n)return null;var r=fi(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(o(231,t,typeof n));return n}var $e=!1;if(u)try{var Pe={};Object.defineProperty(Pe,"passive",{get:function(){$e=!0}}),window.addEventListener("test",Pe,Pe),window.removeEventListener("test",Pe,Pe)}catch(e){$e=!1}function Re(e,t,n,r,i,o,s,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var je=!1,Ne=null,De=!1,Ie=null,Le={onError:function(e){je=!0,Ne=e}};function Be(e,t,n,r,i,o,s,a,l){je=!1,Ne=null,Re.apply(Le,arguments)}function ze(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Fe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Ue(e){if(ze(e)!==e)throw Error(o(188))}function Qe(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=ze(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var s=i.alternate;if(null===s){if(null!==(r=i.return)){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return Ue(i),e;if(s===r)return Ue(i),t;s=s.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=s;else{for(var a=!1,l=i.child;l;){if(l===n){a=!0,n=i,r=s;break}if(l===r){a=!0,r=i,n=s;break}l=l.sibling}if(!a){for(l=s.child;l;){if(l===n){a=!0,n=s,r=i;break}if(l===r){a=!0,r=s,n=i;break}l=l.sibling}if(!a)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(e))?function e(t){if(5===t.tag||6===t.tag)return t;for(t=t.child;null!==t;){var n=e(t);if(null!==n)return n;t=t.sibling}return null}(e):null}var qe=i.unstable_scheduleCallback,Ge=i.unstable_cancelCallback,He=i.unstable_shouldYield,Ve=i.unstable_requestPaint,We=i.unstable_now,Xe=i.unstable_getCurrentPriorityLevel,Ye=i.unstable_ImmediatePriority,Ze=i.unstable_UserBlockingPriority,Je=i.unstable_NormalPriority,Ke=i.unstable_LowPriority,et=i.unstable_IdlePriority,tt=null,nt=null;var rt=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(it(e)/ot|0)|0},it=Math.log,ot=Math.LN2;var st=64,at=4194304;function lt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ct(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=268435455&n;if(0!==s){var a=s&~i;0!==a?r=lt(a):0!==(o&=s)&&(r=lt(o))}else 0!==(s=n&~i)?r=lt(s):0!==o&&(r=lt(o));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&0!=(4194240&o)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-rt(t)),r|=e[n],t&=~i;return r}function ut(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:default:return-1}}function dt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function ht(){var e=st;return 0==(4194240&(st<<=1))&&(st=64),e}function pt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ft(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-rt(t)]=n}function mt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-rt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var gt=0;function bt(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var vt,yt,St,_t,xt,wt=!1,kt=[],Ot=null,Et=null,At=null,Tt=new Map,Ct=new Map,Mt=[],$t="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Pt(e,t){switch(e){case"focusin":case"focusout":Ot=null;break;case"dragenter":case"dragleave":Et=null;break;case"mouseover":case"mouseout":At=null;break;case"pointerover":case"pointerout":Tt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ct.delete(t.pointerId)}}function Rt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&(null!==(t=hi(t))&&yt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function jt(e){var t=di(e.target);if(null!==t){var n=ze(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Fe(n)))return e.blockedOn=t,void xt(e.priority,(function(){St(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Nt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ht(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=hi(n))&&yt(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);ve=r,n.target.dispatchEvent(r),ve=null,t.shift()}return!0}function Dt(e,t,n){Nt(e)&&n.delete(t)}function It(){wt=!1,null!==Ot&&Nt(Ot)&&(Ot=null),null!==Et&&Nt(Et)&&(Et=null),null!==At&&Nt(At)&&(At=null),Tt.forEach(Dt),Ct.forEach(Dt)}function Lt(e,t){e.blockedOn===t&&(e.blockedOn=null,wt||(wt=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,It)))}function Bt(e){function t(t){return Lt(t,e)}if(0<kt.length){Lt(kt[0],e);for(var n=1;n<kt.length;n++){var r=kt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Ot&&Lt(Ot,e),null!==Et&&Lt(Et,e),null!==At&&Lt(At,e),Tt.forEach(t),Ct.forEach(t),n=0;n<Mt.length;n++)(r=Mt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Mt.length&&null===(n=Mt[0]).blockedOn;)jt(n),null===n.blockedOn&&Mt.shift()}var zt=S.ReactCurrentBatchConfig,Ft=!0;function Ut(e,t,n,r){var i=gt,o=zt.transition;zt.transition=null;try{gt=1,qt(e,t,n,r)}finally{gt=i,zt.transition=o}}function Qt(e,t,n,r){var i=gt,o=zt.transition;zt.transition=null;try{gt=4,qt(e,t,n,r)}finally{gt=i,zt.transition=o}}function qt(e,t,n,r){if(Ft){var i=Ht(e,t,n,r);if(null===i)Ir(e,t,r,Gt,n),Pt(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Ot=Rt(Ot,e,t,n,r,i),!0;case"dragenter":return Et=Rt(Et,e,t,n,r,i),!0;case"mouseover":return At=Rt(At,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Tt.set(o,Rt(Tt.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Ct.set(o,Rt(Ct.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Pt(e,r),4&t&&-1<$t.indexOf(e)){for(;null!==i;){var o=hi(i);if(null!==o&&vt(o),null===(o=Ht(e,t,n,r))&&Ir(e,t,r,Gt,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else Ir(e,t,r,null,n)}}var Gt=null;function Ht(e,t,n,r){if(Gt=null,null!==(e=di(e=ye(r))))if(null===(t=ze(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Fe(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Gt=e,null}function Vt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Xe()){case Ye:return 1;case Ze:return 4;case Je:case Ke:return 16;case et:return 536870912;default:return 16}default:return 16}}var Wt=null,Xt=null,Yt=null;function Zt(){if(Yt)return Yt;var e,t,n=Xt,r=n.length,i="value"in Wt?Wt.value:Wt.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var s=r-e;for(t=1;t<=s&&n[r-t]===i[o-t];t++);return Yt=i.slice(e,1<t?1-t:void 0)}function Jt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Kt(){return!0}function en(){return!1}function tn(e){function t(t,n,r,i,o){for(var s in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(s)&&(t=e[s],this[s]=t?t(i):i[s]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?Kt:en,this.isPropagationStopped=en,this}return I(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Kt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Kt)},persist:function(){},isPersistent:Kt}),t}var nn,rn,on,sn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},an=tn(sn),ln=I({},sn,{view:0,detail:0}),cn=tn(ln),un=I({},ln,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_n,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==on&&(on&&"mousemove"===e.type?(nn=e.screenX-on.screenX,rn=e.screenY-on.screenY):rn=nn=0,on=e),nn)},movementY:function(e){return"movementY"in e?e.movementY:rn}}),dn=tn(un),hn=tn(I({},un,{dataTransfer:0})),pn=tn(I({},ln,{relatedTarget:0})),fn=tn(I({},sn,{animationName:0,elapsedTime:0,pseudoElement:0})),mn=tn(I({},sn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),gn=tn(I({},sn,{data:0})),bn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},vn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},yn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=yn[e])&&!!t[e]}function _n(){return Sn}var xn=tn(I({},ln,{key:function(e){if(e.key){var t=bn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Jt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?vn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_n,charCode:function(e){return"keypress"===e.type?Jt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Jt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),wn=tn(I({},un,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),kn=tn(I({},ln,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_n})),On=tn(I({},sn,{propertyName:0,elapsedTime:0,pseudoElement:0})),En=tn(I({},un,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),An=[9,13,27,32],Tn=u&&"CompositionEvent"in window,Cn=null;u&&"documentMode"in document&&(Cn=document.documentMode);var Mn=u&&"TextEvent"in window&&!Cn,$n=u&&(!Tn||Cn&&8<Cn&&11>=Cn),Pn=String.fromCharCode(32),Rn=!1;function jn(e,t){switch(e){case"keyup":return-1!==An.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Nn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Dn=!1;var In={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ln(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!In[e.type]:"textarea"===t}function Bn(e,t,n,r){ke(r),0<(t=Br(t,"onChange")).length&&(n=new an("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var zn=null,Fn=null;function Un(e){$r(e,0)}function Qn(e){if(H(pi(e)))return e}function qn(e,t){if("change"===e)return t}var Gn=!1;if(u){var Hn;if(u){var Vn="oninput"in document;if(!Vn){var Wn=document.createElement("div");Wn.setAttribute("oninput","return;"),Vn="function"==typeof Wn.oninput}Hn=Vn}else Hn=!1;Gn=Hn&&(!document.documentMode||9<document.documentMode)}function Xn(){zn&&(zn.detachEvent("onpropertychange",Yn),Fn=zn=null)}function Yn(e){if("value"===e.propertyName&&Qn(Fn)){var t=[];Bn(t,Fn,e,ye(e)),Ce(Un,t)}}function Zn(e,t,n){"focusin"===e?(Xn(),Fn=n,(zn=t).attachEvent("onpropertychange",Yn)):"focusout"===e&&Xn()}function Jn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Qn(Fn)}function Kn(e,t){if("click"===e)return Qn(t)}function er(e,t){if("input"===e||"change"===e)return Qn(t)}var tr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function nr(e,t){if(tr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!d.call(t,i)||!tr(e[i],t[i]))return!1}return!0}function rr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ir(e,t){var n,r=rr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=rr(r)}}function or(){for(var e=window,t=V();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=V((e=t.contentWindow).document)}return t}function sr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function ar(e){var t=or(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(n.ownerDocument.documentElement,n)){if(null!==r&&sr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=ir(n,o);var s=ir(n,r);i&&s&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var lr=u&&"documentMode"in document&&11>=document.documentMode,cr=null,ur=null,dr=null,hr=!1;function pr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;hr||null==cr||cr!==V(r)||("selectionStart"in(r=cr)&&sr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},dr&&nr(dr,r)||(dr=r,0<(r=Br(ur,"onSelect")).length&&(t=new an("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=cr)))}function fr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var mr={animationend:fr("Animation","AnimationEnd"),animationiteration:fr("Animation","AnimationIteration"),animationstart:fr("Animation","AnimationStart"),transitionend:fr("Transition","TransitionEnd")},gr={},br={};function vr(e){if(gr[e])return gr[e];if(!mr[e])return e;var t,n=mr[e];for(t in n)if(n.hasOwnProperty(t)&&t in br)return gr[e]=n[t];return e}u&&(br=document.createElement("div").style,"AnimationEvent"in window||(delete mr.animationend.animation,delete mr.animationiteration.animation,delete mr.animationstart.animation),"TransitionEvent"in window||delete mr.transitionend.transition);var yr=vr("animationend"),Sr=vr("animationiteration"),_r=vr("animationstart"),xr=vr("transitionend"),wr=new Map,kr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Or(e,t){wr.set(e,t),l(t,[e])}for(var Er=0;Er<kr.length;Er++){var Ar=kr[Er];Or(Ar.toLowerCase(),"on"+(Ar[0].toUpperCase()+Ar.slice(1)))}Or(yr,"onAnimationEnd"),Or(Sr,"onAnimationIteration"),Or(_r,"onAnimationStart"),Or("dblclick","onDoubleClick"),Or("focusin","onFocus"),Or("focusout","onBlur"),Or(xr,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Tr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Cr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Tr));function Mr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,s,a,l,c){if(Be.apply(this,arguments),je){if(!je)throw Error(o(198));var u=Ne;je=!1,Ne=null,De||(De=!0,Ie=u)}}(r,t,void 0,e),e.currentTarget=null}function $r(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==o&&i.isPropagationStopped())break e;Mr(i,a,c),o=l}else for(s=0;s<r.length;s++){if(l=(a=r[s]).instance,c=a.currentTarget,a=a.listener,l!==o&&i.isPropagationStopped())break e;Mr(i,a,c),o=l}}}if(De)throw e=Ie,De=!1,Ie=null,e}function Pr(e,t){var n=t[li];void 0===n&&(n=t[li]=new Set);var r=e+"__bubble";n.has(r)||(Dr(t,e,2,!1),n.add(r))}function Rr(e,t,n){var r=0;t&&(r|=4),Dr(n,e,r,t)}var jr="_reactListening"+Math.random().toString(36).slice(2);function Nr(e){if(!e[jr]){e[jr]=!0,s.forEach((function(t){"selectionchange"!==t&&(Cr.has(t)||Rr(t,!1,e),Rr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[jr]||(t[jr]=!0,Rr("selectionchange",!1,t))}}function Dr(e,t,n,r){switch(Vt(t)){case 1:var i=Ut;break;case 4:i=Qt;break;default:i=qt}n=i.bind(null,t,n,e),i=void 0,!$e||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Ir(e,t,n,r,i){var o=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var s=r.tag;if(3===s||4===s){var a=r.stateNode.containerInfo;if(a===i||8===a.nodeType&&a.parentNode===i)break;if(4===s)for(s=r.return;null!==s;){var l=s.tag;if((3===l||4===l)&&((l=s.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;s=s.return}for(;null!==a;){if(null===(s=di(a)))return;if(5===(l=s.tag)||6===l){r=o=s;continue e}a=a.parentNode}}r=r.return}Ce((function(){var r=o,i=ye(n),s=[];e:{var a=wr.get(e);if(void 0!==a){var l=an,c=e;switch(e){case"keypress":if(0===Jt(n))break e;case"keydown":case"keyup":l=xn;break;case"focusin":c="focus",l=pn;break;case"focusout":c="blur",l=pn;break;case"beforeblur":case"afterblur":l=pn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=dn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=hn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=kn;break;case yr:case Sr:case _r:l=fn;break;case xr:l=On;break;case"scroll":l=cn;break;case"wheel":l=En;break;case"copy":case"cut":case"paste":l=mn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=wn}var u=0!=(4&t),d=!u&&"scroll"===e,h=u?null!==a?a+"Capture":null:a;u=[];for(var p,f=r;null!==f;){var m=(p=f).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==h&&(null!=(m=Me(f,h))&&u.push(Lr(f,m,p)))),d)break;f=f.return}0<u.length&&(a=new l(a,c,null,n,i),s.push({event:a,listeners:u}))}}if(0==(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(a="mouseover"===e||"pointerover"===e)||n===ve||!(c=n.relatedTarget||n.fromElement)||!di(c)&&!c[ai])&&(l||a)&&(a=i.window===i?i:(a=i.ownerDocument)?a.defaultView||a.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?di(c):null)&&(c!==(d=ze(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=dn,m="onMouseLeave",h="onMouseEnter",f="mouse","pointerout"!==e&&"pointerover"!==e||(u=wn,m="onPointerLeave",h="onPointerEnter",f="pointer"),d=null==l?a:pi(l),p=null==c?a:pi(c),(a=new u(m,f+"leave",l,n,i)).target=d,a.relatedTarget=p,m=null,di(i)===r&&((u=new u(h,f+"enter",c,n,i)).target=p,u.relatedTarget=d,m=u),d=m,l&&c)e:{for(h=c,f=0,p=u=l;p;p=zr(p))f++;for(p=0,m=h;m;m=zr(m))p++;for(;0<f-p;)u=zr(u),f--;for(;0<p-f;)h=zr(h),p--;for(;f--;){if(u===h||null!==h&&u===h.alternate)break e;u=zr(u),h=zr(h)}u=null}else u=null;null!==l&&Fr(s,a,l,u,!1),null!==c&&null!==d&&Fr(s,d,c,u,!0)}if("select"===(l=(a=r?pi(r):window).nodeName&&a.nodeName.toLowerCase())||"input"===l&&"file"===a.type)var g=qn;else if(Ln(a))if(Gn)g=er;else{g=Jn;var b=Zn}else(l=a.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===a.type||"radio"===a.type)&&(g=Kn);switch(g&&(g=g(e,r))?Bn(s,g,n,i):(b&&b(e,a,r),"focusout"===e&&(b=a._wrapperState)&&b.controlled&&"number"===a.type&&K(a,"number",a.value)),b=r?pi(r):window,e){case"focusin":(Ln(b)||"true"===b.contentEditable)&&(cr=b,ur=r,dr=null);break;case"focusout":dr=ur=cr=null;break;case"mousedown":hr=!0;break;case"contextmenu":case"mouseup":case"dragend":hr=!1,pr(s,n,i);break;case"selectionchange":if(lr)break;case"keydown":case"keyup":pr(s,n,i)}var v;if(Tn)e:{switch(e){case"compositionstart":var y="onCompositionStart";break e;case"compositionend":y="onCompositionEnd";break e;case"compositionupdate":y="onCompositionUpdate";break e}y=void 0}else Dn?jn(e,n)&&(y="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(y="onCompositionStart");y&&($n&&"ko"!==n.locale&&(Dn||"onCompositionStart"!==y?"onCompositionEnd"===y&&Dn&&(v=Zt()):(Xt="value"in(Wt=i)?Wt.value:Wt.textContent,Dn=!0)),0<(b=Br(r,y)).length&&(y=new gn(y,e,null,n,i),s.push({event:y,listeners:b}),v?y.data=v:null!==(v=Nn(n))&&(y.data=v))),(v=Mn?function(e,t){switch(e){case"compositionend":return Nn(t);case"keypress":return 32!==t.which?null:(Rn=!0,Pn);case"textInput":return(e=t.data)===Pn&&Rn?null:e;default:return null}}(e,n):function(e,t){if(Dn)return"compositionend"===e||!Tn&&jn(e,t)?(e=Zt(),Yt=Xt=Wt=null,Dn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return $n&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))&&(0<(r=Br(r,"onBeforeInput")).length&&(i=new gn("onBeforeInput","beforeinput",null,n,i),s.push({event:i,listeners:r}),i.data=v))}$r(s,t)}))}function Lr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Br(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Me(e,n))&&r.unshift(Lr(e,o,i)),null!=(o=Me(e,t))&&r.push(Lr(e,o,i))),e=e.return}return r}function zr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Fr(e,t,n,r,i){for(var o=t._reactName,s=[];null!==n&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(null!==l&&l===r)break;5===a.tag&&null!==c&&(a=c,i?null!=(l=Me(n,o))&&s.unshift(Lr(n,l,a)):i||null!=(l=Me(n,o))&&s.push(Lr(n,l,a))),n=n.return}0!==s.length&&e.push({event:t,listeners:s})}var Ur=/\r\n?/g,Qr=/\u0000|\uFFFD/g;function qr(e){return("string"==typeof e?e:""+e).replace(Ur,"\n").replace(Qr,"")}function Gr(e,t,n){if(t=qr(t),qr(e)!==t&&n)throw Error(o(425))}function Hr(){}var Vr=null,Wr=null;function Xr(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Yr="function"==typeof setTimeout?setTimeout:void 0,Zr="function"==typeof clearTimeout?clearTimeout:void 0,Jr="function"==typeof Promise?Promise:void 0,Kr="function"==typeof queueMicrotask?queueMicrotask:void 0!==Jr?function(e){return Jr.resolve(null).then(e).catch(ei)}:Yr;function ei(e){setTimeout((function(){throw e}))}function ti(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void Bt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Bt(t)}function ni(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ri(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var ii=Math.random().toString(36).slice(2),oi="__reactFiber$"+ii,si="__reactProps$"+ii,ai="__reactContainer$"+ii,li="__reactEvents$"+ii,ci="__reactListeners$"+ii,ui="__reactHandles$"+ii;function di(e){var t=e[oi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ai]||n[oi]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ri(e);null!==e;){if(n=e[oi])return n;e=ri(e)}return t}n=(e=n).parentNode}return null}function hi(e){return!(e=e[oi]||e[ai])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function pi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function fi(e){return e[si]||null}var mi=[],gi=-1;function bi(e){return{current:e}}function vi(e){0>gi||(e.current=mi[gi],mi[gi]=null,gi--)}function yi(e,t){gi++,mi[gi]=e.current,e.current=t}var Si={},_i=bi(Si),xi=bi(!1),wi=Si;function ki(e,t){var n=e.type.contextTypes;if(!n)return Si;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Oi(e){return null!=(e=e.childContextTypes)}function Ei(){vi(xi),vi(_i)}function Ai(e,t,n){if(_i.current!==Si)throw Error(o(168));yi(_i,t),yi(xi,n)}function Ti(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(o(108,U(e)||"Unknown",i));return I({},n,r)}function Ci(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Si,wi=_i.current,yi(_i,e),yi(xi,xi.current),!0}function Mi(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=Ti(e,t,wi),r.__reactInternalMemoizedMergedChildContext=e,vi(xi),vi(_i),yi(_i,e)):vi(xi),yi(xi,n)}var $i=null,Pi=!1,Ri=!1;function ji(e){null===$i?$i=[e]:$i.push(e)}function Ni(){if(!Ri&&null!==$i){Ri=!0;var e=0,t=gt;try{var n=$i;for(gt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}$i=null,Pi=!1}catch(t){throw null!==$i&&($i=$i.slice(e+1)),qe(Ye,Ni),t}finally{gt=t,Ri=!1}}return null}var Di=[],Ii=0,Li=null,Bi=0,zi=[],Fi=0,Ui=null,Qi=1,qi="";function Gi(e,t){Di[Ii++]=Bi,Di[Ii++]=Li,Li=e,Bi=t}function Hi(e,t,n){zi[Fi++]=Qi,zi[Fi++]=qi,zi[Fi++]=Ui,Ui=e;var r=Qi;e=qi;var i=32-rt(r)-1;r&=~(1<<i),n+=1;var o=32-rt(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,Qi=1<<32-rt(t)+i|n<<i|r,qi=o+e}else Qi=1<<o|n<<i|r,qi=e}function Vi(e){null!==e.return&&(Gi(e,1),Hi(e,1,0))}function Wi(e){for(;e===Li;)Li=Di[--Ii],Di[Ii]=null,Bi=Di[--Ii],Di[Ii]=null;for(;e===Ui;)Ui=zi[--Fi],zi[Fi]=null,qi=zi[--Fi],zi[Fi]=null,Qi=zi[--Fi],zi[Fi]=null}var Xi=null,Yi=null,Zi=!1,Ji=null;function Ki(e,t){var n=_c(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function eo(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,Xi=e,Yi=ni(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,Xi=e,Yi=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Ui?{id:Qi,overflow:qi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=_c(18,null,null,0)).stateNode=t,n.return=e,e.child=n,Xi=e,Yi=null,!0);default:return!1}}function to(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function no(e){if(Zi){var t=Yi;if(t){var n=t;if(!eo(e,t)){if(to(e))throw Error(o(418));t=ni(n.nextSibling);var r=Xi;t&&eo(e,t)?Ki(r,n):(e.flags=-4097&e.flags|2,Zi=!1,Xi=e)}}else{if(to(e))throw Error(o(418));e.flags=-4097&e.flags|2,Zi=!1,Xi=e}}}function ro(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Xi=e}function io(e){if(e!==Xi)return!1;if(!Zi)return ro(e),Zi=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!Xr(e.type,e.memoizedProps)),t&&(t=Yi)){if(to(e))throw oo(),Error(o(418));for(;t;)Ki(e,t),t=ni(t.nextSibling)}if(ro(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Yi=ni(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Yi=null}}else Yi=Xi?ni(e.stateNode.nextSibling):null;return!0}function oo(){for(var e=Yi;e;)e=ni(e.nextSibling)}function so(){Yi=Xi=null,Zi=!1}function ao(e){null===Ji?Ji=[e]:Ji.push(e)}var lo=S.ReactCurrentBatchConfig;function co(e,t){if(e&&e.defaultProps){for(var n in t=I({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var uo=bi(null),ho=null,po=null,fo=null;function mo(){fo=po=ho=null}function go(e){var t=uo.current;vi(uo),e._currentValue=t}function bo(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function vo(e,t){ho=e,fo=po=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(pa=!0),e.firstContext=null)}function yo(e){var t=e._currentValue;if(fo!==e)if(e={context:e,memoizedValue:t,next:null},null===po){if(null===ho)throw Error(o(308));po=e,ho.dependencies={lanes:0,firstContext:e}}else po=po.next=e;return t}var So=null;function _o(e){null===So?So=[e]:So.push(e)}function xo(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,_o(t)):(n.next=i.next,i.next=n),t.interleaved=n,wo(e,r)}function wo(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var ko=!1;function Oo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Eo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ao(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function To(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&vl)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,wo(e,n)}return null===(i=r.interleaved)?(t.next=t,_o(r)):(t.next=i.next,i.next=t),r.interleaved=t,wo(e,n)}function Co(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,mt(e,n)}}function Mo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=s:o=o.next=s,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function $o(e,t,n,r){var i=e.updateQueue;ko=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(null!==a){i.shared.pending=null;var l=a,c=l.next;l.next=null,null===s?o=c:s.next=c,s=l;var u=e.alternate;null!==u&&((a=(u=u.updateQueue).lastBaseUpdate)!==s&&(null===a?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(null!==o){var d=i.baseState;for(s=0,u=c=l=null,a=o;;){var h=a.lane,p=a.eventTime;if((r&h)===h){null!==u&&(u=u.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var f=e,m=a;switch(h=t,p=n,m.tag){case 1:if("function"==typeof(f=m.payload)){d=f.call(p,d,h);break e}d=f;break e;case 3:f.flags=-65537&f.flags|128;case 0:if(null==(h="function"==typeof(f=m.payload)?f.call(p,d,h):f))break e;d=I({},d,h);break e;case 2:ko=!0}}null!==a.callback&&0!==a.lane&&(e.flags|=64,null===(h=i.effects)?i.effects=[a]:h.push(a))}else p={eventTime:p,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===u?(c=u=p,l=d):u=u.next=p,s|=h;if(null===(a=a.next)){if(null===(a=i.shared.pending))break;a=(h=a).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}if(null===u&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null!==(t=i.shared.interleaved)){i=t;do{s|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);El|=s,e.lanes=s,e.memoizedState=d}}function Po(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(o(191,i));i.call(r)}}}var Ro=(new r.Component).refs;function jo(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:I({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var No={isMounted:function(e){return!!(e=e._reactInternals)&&ze(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ql(),i=Gl(e),o=Ao(r,i);o.payload=t,null!=n&&(o.callback=n),null!==(t=To(e,o,i))&&(Hl(t,e,i,r),Co(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ql(),i=Gl(e),o=Ao(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=To(e,o,i))&&(Hl(t,e,i,r),Co(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ql(),r=Gl(e),i=Ao(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=To(e,i,r))&&(Hl(t,e,r,n),Co(t,e,r))}};function Do(e,t,n,r,i,o,s){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,s):!t.prototype||!t.prototype.isPureReactComponent||(!nr(n,r)||!nr(i,o))}function Io(e,t,n){var r=!1,i=Si,o=t.contextType;return"object"==typeof o&&null!==o?o=yo(o):(i=Oi(t)?wi:_i.current,o=(r=null!=(r=t.contextTypes))?ki(e,i):Si),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=No,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function Lo(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&No.enqueueReplaceState(t,t.state,null)}function Bo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Ro,Oo(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=yo(o):(o=Oi(t)?wi:_i.current,i.context=ki(e,o)),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(jo(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&No.enqueueReplaceState(i,i.state,null),$o(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function zo(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(o(309));var r=n.stateNode}if(!r)throw Error(o(147,e));var i=r,s=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===s?t.ref:((t=function(e){var t=i.refs;t===Ro&&(t=i.refs={}),null===e?delete t[s]:t[s]=e})._stringRef=s,t)}if("string"!=typeof e)throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function Fo(e,t){throw e=Object.prototype.toString.call(t),Error(o(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Uo(e){return(0,e._init)(e._payload)}function Qo(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=wc(e,t)).index=0,e.sibling=null,e}function s(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function a(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Ac(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){var o=n.type;return o===w?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===P&&Uo(o)===t.type)?((r=i(t,n.props)).ref=zo(e,t,n),r.return=e,r):((r=kc(n.type,n.key,n.props,null,e.mode,r)).ref=zo(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Tc(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function d(e,t,n,r,o){return null===t||7!==t.tag?((t=Oc(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Ac(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case _:return(n=kc(t.type,t.key,t.props,null,e.mode,n)).ref=zo(e,null,t),n.return=e,n;case x:return(t=Tc(t,e.mode,n)).return=e,t;case P:return h(e,(0,t._init)(t._payload),n)}if(ee(t)||N(t))return(t=Oc(t,e.mode,n,null)).return=e,t;Fo(e,t)}return null}function p(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case _:return n.key===i?c(e,t,n,r):null;case x:return n.key===i?u(e,t,n,r):null;case P:return p(e,t,(i=n._init)(n._payload),r)}if(ee(n)||N(n))return null!==i?null:d(e,t,n,r,null);Fo(e,n)}return null}function f(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case _:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case x:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case P:return f(e,t,n,(0,r._init)(r._payload),i)}if(ee(r)||N(r))return d(t,e=e.get(n)||null,r,i,null);Fo(t,r)}return null}function m(i,o,a,l){for(var c=null,u=null,d=o,m=o=0,g=null;null!==d&&m<a.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var b=p(i,d,a[m],l);if(null===b){null===d&&(d=g);break}e&&d&&null===b.alternate&&t(i,d),o=s(b,o,m),null===u?c=b:u.sibling=b,u=b,d=g}if(m===a.length)return n(i,d),Zi&&Gi(i,m),c;if(null===d){for(;m<a.length;m++)null!==(d=h(i,a[m],l))&&(o=s(d,o,m),null===u?c=d:u.sibling=d,u=d);return Zi&&Gi(i,m),c}for(d=r(i,d);m<a.length;m++)null!==(g=f(d,i,m,a[m],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),o=s(g,o,m),null===u?c=g:u.sibling=g,u=g);return e&&d.forEach((function(e){return t(i,e)})),Zi&&Gi(i,m),c}function g(i,a,l,c){var u=N(l);if("function"!=typeof u)throw Error(o(150));if(null==(l=u.call(l)))throw Error(o(151));for(var d=u=null,m=a,g=a=0,b=null,v=l.next();null!==m&&!v.done;g++,v=l.next()){m.index>g?(b=m,m=null):b=m.sibling;var y=p(i,m,v.value,c);if(null===y){null===m&&(m=b);break}e&&m&&null===y.alternate&&t(i,m),a=s(y,a,g),null===d?u=y:d.sibling=y,d=y,m=b}if(v.done)return n(i,m),Zi&&Gi(i,g),u;if(null===m){for(;!v.done;g++,v=l.next())null!==(v=h(i,v.value,c))&&(a=s(v,a,g),null===d?u=v:d.sibling=v,d=v);return Zi&&Gi(i,g),u}for(m=r(i,m);!v.done;g++,v=l.next())null!==(v=f(m,i,g,v.value,c))&&(e&&null!==v.alternate&&m.delete(null===v.key?g:v.key),a=s(v,a,g),null===d?u=v:d.sibling=v,d=v);return e&&m.forEach((function(e){return t(i,e)})),Zi&&Gi(i,g),u}return function e(r,o,s,l){if("object"==typeof s&&null!==s&&s.type===w&&null===s.key&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case _:e:{for(var c=s.key,u=o;null!==u;){if(u.key===c){if((c=s.type)===w){if(7===u.tag){n(r,u.sibling),(o=i(u,s.props.children)).return=r,r=o;break e}}else if(u.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===P&&Uo(c)===u.type){n(r,u.sibling),(o=i(u,s.props)).ref=zo(r,u,s),o.return=r,r=o;break e}n(r,u);break}t(r,u),u=u.sibling}s.type===w?((o=Oc(s.props.children,r.mode,l,s.key)).return=r,r=o):((l=kc(s.type,s.key,s.props,null,r.mode,l)).ref=zo(r,o,s),l.return=r,r=l)}return a(r);case x:e:{for(u=s.key;null!==o;){if(o.key===u){if(4===o.tag&&o.stateNode.containerInfo===s.containerInfo&&o.stateNode.implementation===s.implementation){n(r,o.sibling),(o=i(o,s.children||[])).return=r,r=o;break e}n(r,o);break}t(r,o),o=o.sibling}(o=Tc(s,r.mode,l)).return=r,r=o}return a(r);case P:return e(r,o,(u=s._init)(s._payload),l)}if(ee(s))return m(r,o,s,l);if(N(s))return g(r,o,s,l);Fo(r,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==o&&6===o.tag?(n(r,o.sibling),(o=i(o,s)).return=r,r=o):(n(r,o),(o=Ac(s,r.mode,l)).return=r,r=o),a(r)):n(r,o)}}var qo=Qo(!0),Go=Qo(!1),Ho={},Vo=bi(Ho),Wo=bi(Ho),Xo=bi(Ho);function Yo(e){if(e===Ho)throw Error(o(174));return e}function Zo(e,t){switch(yi(Xo,t),yi(Wo,e),yi(Vo,Ho),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ae(null,"");break;default:t=ae(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}vi(Vo),yi(Vo,t)}function Jo(){vi(Vo),vi(Wo),vi(Xo)}function Ko(e){Yo(Xo.current);var t=Yo(Vo.current),n=ae(t,e.type);t!==n&&(yi(Wo,e),yi(Vo,n))}function es(e){Wo.current===e&&(vi(Vo),vi(Wo))}var ts=bi(0);function ns(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var rs=[];function is(){for(var e=0;e<rs.length;e++)rs[e]._workInProgressVersionPrimary=null;rs.length=0}var os=S.ReactCurrentDispatcher,ss=S.ReactCurrentBatchConfig,as=0,ls=null,cs=null,us=null,ds=!1,hs=!1,ps=0,fs=0;function ms(){throw Error(o(321))}function gs(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!tr(e[n],t[n]))return!1;return!0}function bs(e,t,n,r,i,s){if(as=s,ls=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,os.current=null===e||null===e.memoizedState?ea:ta,e=n(r,i),hs){s=0;do{if(hs=!1,ps=0,25<=s)throw Error(o(301));s+=1,us=cs=null,t.updateQueue=null,os.current=na,e=n(r,i)}while(hs)}if(os.current=Ks,t=null!==cs&&null!==cs.next,as=0,us=cs=ls=null,ds=!1,t)throw Error(o(300));return e}function vs(){var e=0!==ps;return ps=0,e}function ys(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===us?ls.memoizedState=us=e:us=us.next=e,us}function Ss(){if(null===cs){var e=ls.alternate;e=null!==e?e.memoizedState:null}else e=cs.next;var t=null===us?ls.memoizedState:us.next;if(null!==t)us=t,cs=e;else{if(null===e)throw Error(o(310));e={memoizedState:(cs=e).memoizedState,baseState:cs.baseState,baseQueue:cs.baseQueue,queue:cs.queue,next:null},null===us?ls.memoizedState=us=e:us=us.next=e}return us}function _s(e,t){return"function"==typeof t?t(e):t}function xs(e){var t=Ss(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=cs,i=r.baseQueue,s=n.pending;if(null!==s){if(null!==i){var a=i.next;i.next=s.next,s.next=a}r.baseQueue=i=s,n.pending=null}if(null!==i){s=i.next,r=r.baseState;var l=a=null,c=null,u=s;do{var d=u.lane;if((as&d)===d)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=h,a=r):c=c.next=h,ls.lanes|=d,El|=d}u=u.next}while(null!==u&&u!==s);null===c?a=r:c.next=l,tr(r,t.memoizedState)||(pa=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{s=i.lane,ls.lanes|=s,El|=s,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ws(e){var t=Ss(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(null!==i){n.pending=null;var a=i=i.next;do{s=e(s,a.action),a=a.next}while(a!==i);tr(s,t.memoizedState)||(pa=!0),t.memoizedState=s,null===t.baseQueue&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function ks(){}function Os(e,t){var n=ls,r=Ss(),i=t(),s=!tr(r.memoizedState,i);if(s&&(r.memoizedState=i,pa=!0),r=r.queue,Is(Ts.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||null!==us&&1&us.memoizedState.tag){if(n.flags|=2048,Ps(9,As.bind(null,n,r,i,t),void 0,null),null===yl)throw Error(o(349));0!=(30&as)||Es(n,t,i)}return i}function Es(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=ls.updateQueue)?(t={lastEffect:null,stores:null},ls.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function As(e,t,n,r){t.value=n,t.getSnapshot=r,Cs(t)&&Ms(e)}function Ts(e,t,n){return n((function(){Cs(t)&&Ms(e)}))}function Cs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!tr(e,n)}catch(e){return!0}}function Ms(e){var t=wo(e,1);null!==t&&Hl(t,e,1,-1)}function $s(e){var t=ys();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_s,lastRenderedState:e},t.queue=e,e=e.dispatch=Xs.bind(null,ls,e),[t.memoizedState,e]}function Ps(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ls.updateQueue)?(t={lastEffect:null,stores:null},ls.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Rs(){return Ss().memoizedState}function js(e,t,n,r){var i=ys();ls.flags|=e,i.memoizedState=Ps(1|t,n,void 0,void 0===r?null:r)}function Ns(e,t,n,r){var i=Ss();r=void 0===r?null:r;var o=void 0;if(null!==cs){var s=cs.memoizedState;if(o=s.destroy,null!==r&&gs(r,s.deps))return void(i.memoizedState=Ps(t,n,o,r))}ls.flags|=e,i.memoizedState=Ps(1|t,n,o,r)}function Ds(e,t){return js(8390656,8,e,t)}function Is(e,t){return Ns(2048,8,e,t)}function Ls(e,t){return Ns(4,2,e,t)}function Bs(e,t){return Ns(4,4,e,t)}function zs(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Fs(e,t,n){return n=null!=n?n.concat([e]):null,Ns(4,4,zs.bind(null,t,e),n)}function Us(){}function Qs(e,t){var n=Ss();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&gs(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function qs(e,t){var n=Ss();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&gs(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Gs(e,t,n){return 0==(21&as)?(e.baseState&&(e.baseState=!1,pa=!0),e.memoizedState=n):(tr(n,t)||(n=ht(),ls.lanes|=n,El|=n,e.baseState=!0),t)}function Hs(e,t){var n=gt;gt=0!==n&&4>n?n:4,e(!0);var r=ss.transition;ss.transition={};try{e(!1),t()}finally{gt=n,ss.transition=r}}function Vs(){return Ss().memoizedState}function Ws(e,t,n){var r=Gl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ys(e))Zs(t,n);else if(null!==(n=xo(e,t,n,r))){Hl(n,e,r,ql()),Js(n,t,r)}}function Xs(e,t,n){var r=Gl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ys(e))Zs(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,tr(a,s)){var l=t.interleaved;return null===l?(i.next=i,_o(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=xo(e,t,i,r))&&(Hl(n,e,r,i=ql()),Js(n,t,r))}}function Ys(e){var t=e.alternate;return e===ls||null!==t&&t===ls}function Zs(e,t){hs=ds=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Js(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,mt(e,n)}}var Ks={readContext:yo,useCallback:ms,useContext:ms,useEffect:ms,useImperativeHandle:ms,useInsertionEffect:ms,useLayoutEffect:ms,useMemo:ms,useReducer:ms,useRef:ms,useState:ms,useDebugValue:ms,useDeferredValue:ms,useTransition:ms,useMutableSource:ms,useSyncExternalStore:ms,useId:ms,unstable_isNewReconciler:!1},ea={readContext:yo,useCallback:function(e,t){return ys().memoizedState=[e,void 0===t?null:t],e},useContext:yo,useEffect:Ds,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,js(4194308,4,zs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return js(4194308,4,e,t)},useInsertionEffect:function(e,t){return js(4,2,e,t)},useMemo:function(e,t){var n=ys();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ys();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ws.bind(null,ls,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ys().memoizedState=e},useState:$s,useDebugValue:Us,useDeferredValue:function(e){return ys().memoizedState=e},useTransition:function(){var e=$s(!1),t=e[0];return e=Hs.bind(null,e[1]),ys().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ls,i=ys();if(Zi){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===yl)throw Error(o(349));0!=(30&as)||Es(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Ds(Ts.bind(null,r,s,e),[e]),r.flags|=2048,Ps(9,As.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=ys(),t=yl.identifierPrefix;if(Zi){var n=qi;t=":"+t+"R"+(n=(Qi&~(1<<32-rt(Qi)-1)).toString(32)+n),0<(n=ps++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=fs++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ta={readContext:yo,useCallback:Qs,useContext:yo,useEffect:Is,useImperativeHandle:Fs,useInsertionEffect:Ls,useLayoutEffect:Bs,useMemo:qs,useReducer:xs,useRef:Rs,useState:function(){return xs(_s)},useDebugValue:Us,useDeferredValue:function(e){return Gs(Ss(),cs.memoizedState,e)},useTransition:function(){return[xs(_s)[0],Ss().memoizedState]},useMutableSource:ks,useSyncExternalStore:Os,useId:Vs,unstable_isNewReconciler:!1},na={readContext:yo,useCallback:Qs,useContext:yo,useEffect:Is,useImperativeHandle:Fs,useInsertionEffect:Ls,useLayoutEffect:Bs,useMemo:qs,useReducer:ws,useRef:Rs,useState:function(){return ws(_s)},useDebugValue:Us,useDeferredValue:function(e){var t=Ss();return null===cs?t.memoizedState=e:Gs(t,cs.memoizedState,e)},useTransition:function(){return[ws(_s)[0],Ss().memoizedState]},useMutableSource:ks,useSyncExternalStore:Os,useId:Vs,unstable_isNewReconciler:!1};function ra(e,t){try{var n="",r=t;do{n+=F(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function ia(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function oa(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var sa="function"==typeof WeakMap?WeakMap:Map;function aa(e,t,n){(n=Ao(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){jl||(jl=!0,Nl=r),oa(0,t)},n}function la(e,t,n){(n=Ao(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){oa(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){oa(0,t),"function"!=typeof r&&(null===Dl?Dl=new Set([this]):Dl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ca(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new sa;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=mc.bind(null,e,t,n),t.then(e,e))}function ua(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function da(e,t,n,r,i){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Ao(-1,1)).tag=2,To(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var ha=S.ReactCurrentOwner,pa=!1;function fa(e,t,n,r){t.child=null===e?Go(t,null,n,r):qo(t,e.child,n,r)}function ma(e,t,n,r,i){n=n.render;var o=t.ref;return vo(t,i),r=bs(e,t,n,r,o,i),n=vs(),null===e||pa?(Zi&&n&&Vi(t),t.flags|=1,fa(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ia(e,t,i))}function ga(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||xc(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=kc(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,ba(e,t,o,r,i))}if(o=e.child,0==(e.lanes&i)){var s=o.memoizedProps;if((n=null!==(n=n.compare)?n:nr)(s,r)&&e.ref===t.ref)return Ia(e,t,i)}return t.flags|=1,(e=wc(o,r)).ref=t.ref,e.return=t,t.child=e}function ba(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(nr(o,r)&&e.ref===t.ref){if(pa=!1,t.pendingProps=r=o,0==(e.lanes&i))return t.lanes=e.lanes,Ia(e,t,i);0!=(131072&e.flags)&&(pa=!0)}}return Sa(e,t,n,r,i)}function va(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},yi(wl,xl),xl|=n;else{if(0==(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,yi(wl,xl),xl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,yi(wl,xl),xl|=r}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,yi(wl,xl),xl|=r;return fa(e,t,i,n),t.child}function ya(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Sa(e,t,n,r,i){var o=Oi(n)?wi:_i.current;return o=ki(t,o),vo(t,i),n=bs(e,t,n,r,o,i),r=vs(),null===e||pa?(Zi&&r&&Vi(t),t.flags|=1,fa(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ia(e,t,i))}function _a(e,t,n,r,i){if(Oi(n)){var o=!0;Ci(t)}else o=!1;if(vo(t,i),null===t.stateNode)Da(e,t),Io(t,n,r),Bo(t,n,r,i),r=!0;else if(null===e){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,c=n.contextType;"object"==typeof c&&null!==c?c=yo(c):c=ki(t,c=Oi(n)?wi:_i.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof s.getSnapshotBeforeUpdate;d||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==r||l!==c)&&Lo(t,s,r,c),ko=!1;var h=t.memoizedState;s.state=h,$o(t,r,s,i),l=t.memoizedState,a!==r||h!==l||xi.current||ko?("function"==typeof u&&(jo(t,n,u,r),l=t.memoizedState),(a=ko||Do(t,n,a,r,h,l,c))?(d||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||("function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"==typeof s.componentDidMount&&(t.flags|=4194308)):("function"==typeof s.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=c,r=a):("function"==typeof s.componentDidMount&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Eo(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:co(t.type,a),s.props=c,d=t.pendingProps,h=s.context,"object"==typeof(l=n.contextType)&&null!==l?l=yo(l):l=ki(t,l=Oi(n)?wi:_i.current);var p=n.getDerivedStateFromProps;(u="function"==typeof p||"function"==typeof s.getSnapshotBeforeUpdate)||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==d||h!==l)&&Lo(t,s,r,l),ko=!1,h=t.memoizedState,s.state=h,$o(t,r,s,i);var f=t.memoizedState;a!==d||h!==f||xi.current||ko?("function"==typeof p&&(jo(t,n,p,r),f=t.memoizedState),(c=ko||Do(t,n,c,r,h,f,l)||!1)?(u||"function"!=typeof s.UNSAFE_componentWillUpdate&&"function"!=typeof s.componentWillUpdate||("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(r,f,l),"function"==typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(r,f,l)),"function"==typeof s.componentDidUpdate&&(t.flags|=4),"function"==typeof s.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof s.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=f),s.props=r,s.state=f,s.context=l,r=c):("function"!=typeof s.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return xa(e,t,n,r,o,i)}function xa(e,t,n,r,i,o){ya(e,t);var s=0!=(128&t.flags);if(!r&&!s)return i&&Mi(t,n,!1),Ia(e,t,o);r=t.stateNode,ha.current=t;var a=s&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&s?(t.child=qo(t,e.child,null,o),t.child=qo(t,null,a,o)):fa(e,t,a,o),t.memoizedState=r.state,i&&Mi(t,n,!0),t.child}function wa(e){var t=e.stateNode;t.pendingContext?Ai(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ai(0,t.context,!1),Zo(e,t.containerInfo)}function ka(e,t,n,r,i){return so(),ao(i),t.flags|=256,fa(e,t,n,r),t.child}var Oa,Ea,Aa,Ta={dehydrated:null,treeContext:null,retryLane:0};function Ca(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ma(e,t,n){var r,i=t.pendingProps,s=ts.current,a=!1,l=0!=(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!=(2&s)),r?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(s|=1),yi(ts,1&s),null===e)return no(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=i.children,e=i.fallback,a?(i=t.mode,a=t.child,l={mode:"hidden",children:l},0==(1&i)&&null!==a?(a.childLanes=0,a.pendingProps=l):a=Ec(l,i,0,null),e=Oc(e,i,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Ca(n),t.memoizedState=Ta,e):$a(t,l));if(null!==(s=e.memoizedState)&&null!==(r=s.dehydrated))return function(e,t,n,r,i,s,a){if(n)return 256&t.flags?(t.flags&=-257,r=ia(Error(o(422))),Pa(e,t,a,r)):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Ec({mode:"visible",children:r.children},i,0,null),(s=Oc(s,i,a,null)).flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,0!=(1&t.mode)&&qo(t,e.child,null,a),t.child.memoizedState=Ca(a),t.memoizedState=Ta,s);if(0==(1&t.mode))return Pa(e,t,a,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,s=Error(o(419)),r=ia(s,r,void 0),Pa(e,t,a,r)}if(l=0!=(a&e.childLanes),pa||l){if(null!==(r=yl)){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!=(i&(r.suspendedLanes|a))?0:i)&&i!==s.retryLane&&(s.retryLane=i,wo(e,i),Hl(r,e,i,-1))}return oc(),r=ia(Error(o(421))),Pa(e,t,a,r)}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=bc.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Yi=ni(i.nextSibling),Xi=t,Zi=!0,Ji=null,null!==e&&(zi[Fi++]=Qi,zi[Fi++]=qi,zi[Fi++]=Ui,Qi=e.id,qi=e.overflow,Ui=t),(t=$a(t,r.children)).flags|=4096,t)}(e,t,l,i,r,s,n);if(a){a=i.fallback,l=t.mode,r=(s=e.child).sibling;var c={mode:"hidden",children:i.children};return 0==(1&l)&&t.child!==s?((i=t.child).childLanes=0,i.pendingProps=c,t.deletions=null):(i=wc(s,c)).subtreeFlags=14680064&s.subtreeFlags,null!==r?a=wc(r,a):(a=Oc(a,l,n,null)).flags|=2,a.return=t,i.return=t,i.sibling=a,t.child=i,i=a,a=t.child,l=null===(l=e.child.memoizedState)?Ca(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},a.memoizedState=l,a.childLanes=e.childLanes&~n,t.memoizedState=Ta,i}return e=(a=e.child).sibling,i=wc(a,{mode:"visible",children:i.children}),0==(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function $a(e,t){return(t=Ec({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Pa(e,t,n,r){return null!==r&&ao(r),qo(t,e.child,null,n),(e=$a(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Ra(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),bo(e.return,t,n)}function ja(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Na(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(fa(e,t,r.children,n),0!=(2&(r=ts.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ra(e,n,t);else if(19===e.tag)Ra(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(yi(ts,r),0==(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===ns(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ja(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===ns(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ja(t,!0,n,null,o);break;case"together":ja(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Da(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ia(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),El|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=wc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=wc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function La(e,t){if(!Zi)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ba(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function za(e,t,n){var r=t.pendingProps;switch(Wi(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ba(t),null;case 1:return Oi(t.type)&&Ei(),Ba(t),null;case 3:return r=t.stateNode,Jo(),vi(xi),vi(_i),is(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(io(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==Ji&&(Yl(Ji),Ji=null))),Ba(t),null;case 5:es(t);var i=Yo(Xo.current);if(n=t.type,null!==e&&null!=t.stateNode)Ea(e,t,n,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(o(166));return Ba(t),null}if(e=Yo(Vo.current),io(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[oi]=t,r[si]=s,e=0!=(1&t.mode),n){case"dialog":Pr("cancel",r),Pr("close",r);break;case"iframe":case"object":case"embed":Pr("load",r);break;case"video":case"audio":for(i=0;i<Tr.length;i++)Pr(Tr[i],r);break;case"source":Pr("error",r);break;case"img":case"image":case"link":Pr("error",r),Pr("load",r);break;case"details":Pr("toggle",r);break;case"input":X(r,s),Pr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Pr("invalid",r);break;case"textarea":re(r,s),Pr("invalid",r)}for(var l in ge(n,s),i=null,s)if(s.hasOwnProperty(l)){var c=s[l];"children"===l?"string"==typeof c?r.textContent!==c&&(!0!==s.suppressHydrationWarning&&Gr(r.textContent,c,e),i=["children",c]):"number"==typeof c&&r.textContent!==""+c&&(!0!==s.suppressHydrationWarning&&Gr(r.textContent,c,e),i=["children",""+c]):a.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&Pr("scroll",r)}switch(n){case"input":G(r),J(r,s,!0);break;case"textarea":G(r),oe(r);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(r.onclick=Hr)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[oi]=t,e[si]=r,Oa(e,t),t.stateNode=e;e:{switch(l=be(n,r),n){case"dialog":Pr("cancel",e),Pr("close",e),i=r;break;case"iframe":case"object":case"embed":Pr("load",e),i=r;break;case"video":case"audio":for(i=0;i<Tr.length;i++)Pr(Tr[i],e);i=r;break;case"source":Pr("error",e),i=r;break;case"img":case"image":case"link":Pr("error",e),Pr("load",e),i=r;break;case"details":Pr("toggle",e),i=r;break;case"input":X(e,r),i=W(e,r),Pr("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=I({},r,{value:void 0}),Pr("invalid",e);break;case"textarea":re(e,r),i=ne(e,r),Pr("invalid",e);break;default:i=r}for(s in ge(n,i),c=i)if(c.hasOwnProperty(s)){var u=c[s];"style"===s?fe(e,u):"dangerouslySetInnerHTML"===s?null!=(u=u?u.__html:void 0)&&ce(e,u):"children"===s?"string"==typeof u?("textarea"!==n||""!==u)&&ue(e,u):"number"==typeof u&&ue(e,""+u):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(a.hasOwnProperty(s)?null!=u&&"onScroll"===s&&Pr("scroll",e):null!=u&&y(e,s,u,l))}switch(n){case"input":G(e),J(e,r,!1);break;case"textarea":G(e),oe(e);break;case"option":null!=r.value&&e.setAttribute("value",""+Q(r.value));break;case"select":e.multiple=!!r.multiple,null!=(s=r.value)?te(e,!!r.multiple,s,!1):null!=r.defaultValue&&te(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=Hr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Ba(t),null;case 6:if(e&&null!=t.stateNode)Aa(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(o(166));if(n=Yo(Xo.current),Yo(Vo.current),io(t)){if(r=t.stateNode,n=t.memoizedProps,r[oi]=t,(s=r.nodeValue!==n)&&null!==(e=Xi))switch(e.tag){case 3:Gr(r.nodeValue,n,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Gr(r.nodeValue,n,0!=(1&e.mode))}s&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[oi]=t,t.stateNode=r}return Ba(t),null;case 13:if(vi(ts),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(Zi&&null!==Yi&&0!=(1&t.mode)&&0==(128&t.flags))oo(),so(),t.flags|=98560,s=!1;else if(s=io(t),null!==r&&null!==r.dehydrated){if(null===e){if(!s)throw Error(o(318));if(!(s=null!==(s=t.memoizedState)?s.dehydrated:null))throw Error(o(317));s[oi]=t}else so(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Ba(t),s=!1}else null!==Ji&&(Yl(Ji),Ji=null),s=!0;if(!s)return 65536&t.flags?t:null}return 0!=(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&ts.current)?0===kl&&(kl=3):oc())),null!==t.updateQueue&&(t.flags|=4),Ba(t),null);case 4:return Jo(),null===e&&Nr(t.stateNode.containerInfo),Ba(t),null;case 10:return go(t.type._context),Ba(t),null;case 17:return Oi(t.type)&&Ei(),Ba(t),null;case 19:if(vi(ts),null===(s=t.memoizedState))return Ba(t),null;if(r=0!=(128&t.flags),null===(l=s.rendering))if(r)La(s,!1);else{if(0!==kl||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=ns(e))){for(t.flags|=128,La(s,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(s=n).flags&=14680066,null===(l=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,e=l.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return yi(ts,1&ts.current|2),t.child}e=e.sibling}null!==s.tail&&We()>Pl&&(t.flags|=128,r=!0,La(s,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ns(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),La(s,!0),null===s.tail&&"hidden"===s.tailMode&&!l.alternate&&!Zi)return Ba(t),null}else 2*We()-s.renderingStartTime>Pl&&1073741824!==n&&(t.flags|=128,r=!0,La(s,!1),t.lanes=4194304);s.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=s.last)?n.sibling=l:t.child=l,s.last=l)}return null!==s.tail?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=We(),t.sibling=null,n=ts.current,yi(ts,r?1&n|2:1&n),t):(Ba(t),null);case 22:case 23:return tc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&xl)&&(Ba(t),6&t.subtreeFlags&&(t.flags|=8192)):Ba(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}function Fa(e,t){switch(Wi(t),t.tag){case 1:return Oi(t.type)&&Ei(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Jo(),vi(xi),vi(_i),is(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return es(t),null;case 13:if(vi(ts),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));so()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return vi(ts),null;case 4:return Jo(),null;case 10:return go(t.type._context),null;case 22:case 23:return tc(),null;case 24:default:return null}}Oa=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ea=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Yo(Vo.current);var o,s=null;switch(n){case"input":i=W(e,i),r=W(e,r),s=[];break;case"select":i=I({},i,{value:void 0}),r=I({},r,{value:void 0}),s=[];break;case"textarea":i=ne(e,i),r=ne(e,r),s=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=Hr)}for(u in ge(n,r),n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&null!=i[u])if("style"===u){var l=i[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(a.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var c=r[u];if(l=null!=i?i[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(s||(s=[]),s.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(s=s||[]).push(u,c)):"children"===u?"string"!=typeof c&&"number"!=typeof c||(s=s||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(a.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&Pr("scroll",e),s||l===c||(s=[])):(s=s||[]).push(u,c))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}},Aa=function(e,t,n,r){n!==r&&(t.flags|=4)};var Ua=!1,Qa=!1,qa="function"==typeof WeakSet?WeakSet:Set,Ga=null;function Ha(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){fc(e,t,n)}else n.current=null}function Va(e,t,n){try{n()}catch(n){fc(e,t,n)}}var Wa=!1;function Xa(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&Va(t,n,o)}i=i.next}while(i!==r)}}function Ya(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Za(e){var t=e.ref;if(null!==t){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}"function"==typeof t?t(e):t.current=e}}function Ja(e){var t=e.alternate;null!==t&&(e.alternate=null,Ja(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[oi],delete t[si],delete t[li],delete t[ci],delete t[ui])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ka(e){return 5===e.tag||3===e.tag||4===e.tag}function el(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Ka(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}var tl=null,nl=!1;function rl(e,t,n){for(n=n.child;null!==n;)il(e,t,n),n=n.sibling}function il(e,t,n){if(nt&&"function"==typeof nt.onCommitFiberUnmount)try{nt.onCommitFiberUnmount(tt,n)}catch(e){}switch(n.tag){case 5:Qa||Ha(n,t);case 6:var r=tl,i=nl;tl=null,rl(e,t,n),nl=i,null!==(tl=r)&&(nl?(e=tl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):tl.removeChild(n.stateNode));break;case 18:null!==tl&&(nl?(e=tl,n=n.stateNode,8===e.nodeType?ti(e.parentNode,n):1===e.nodeType&&ti(e,n),Bt(e)):ti(tl,n.stateNode));break;case 4:r=tl,i=nl,tl=n.stateNode.containerInfo,nl=!0,rl(e,t,n),tl=r,nl=i;break;case 0:case 11:case 14:case 15:if(!Qa&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,void 0!==s&&(0!=(2&o)||0!=(4&o))&&Va(n,t,s),i=i.next}while(i!==r)}rl(e,t,n);break;case 1:if(!Qa&&(Ha(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){fc(n,t,e)}rl(e,t,n);break;case 21:rl(e,t,n);break;case 22:1&n.mode?(Qa=(r=Qa)||null!==n.memoizedState,rl(e,t,n),Qa=r):rl(e,t,n);break;default:rl(e,t,n)}}function ol(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new qa),t.forEach((function(t){var r=vc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function sl(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,a=t,l=a;e:for(;null!==l;){switch(l.tag){case 5:tl=l.stateNode,nl=!1;break e;case 3:case 4:tl=l.stateNode.containerInfo,nl=!0;break e}l=l.return}if(null===tl)throw Error(o(160));il(s,a,i),tl=null,nl=!1;var c=i.alternate;null!==c&&(c.return=null),i.return=null}catch(e){fc(i,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)al(t,e),t=t.sibling}function al(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(sl(t,e),ll(e),4&r){try{Xa(3,e,e.return),Ya(3,e)}catch(t){fc(e,e.return,t)}try{Xa(5,e,e.return)}catch(t){fc(e,e.return,t)}}break;case 1:sl(t,e),ll(e),512&r&&null!==n&&Ha(n,n.return);break;case 5:if(sl(t,e),ll(e),512&r&&null!==n&&Ha(n,n.return),32&e.flags){var i=e.stateNode;try{ue(i,"")}catch(t){fc(e,e.return,t)}}if(4&r&&null!=(i=e.stateNode)){var s=e.memoizedProps,a=null!==n?n.memoizedProps:s,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===s.type&&null!=s.name&&Y(i,s),be(l,a);var u=be(l,s);for(a=0;a<c.length;a+=2){var d=c[a],h=c[a+1];"style"===d?fe(i,h):"dangerouslySetInnerHTML"===d?ce(i,h):"children"===d?ue(i,h):y(i,d,h,u)}switch(l){case"input":Z(i,s);break;case"textarea":ie(i,s);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var f=s.value;null!=f?te(i,!!s.multiple,f,!1):p!==!!s.multiple&&(null!=s.defaultValue?te(i,!!s.multiple,s.defaultValue,!0):te(i,!!s.multiple,s.multiple?[]:"",!1))}i[si]=s}catch(t){fc(e,e.return,t)}}break;case 6:if(sl(t,e),ll(e),4&r){if(null===e.stateNode)throw Error(o(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(t){fc(e,e.return,t)}}break;case 3:if(sl(t,e),ll(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Bt(t.containerInfo)}catch(t){fc(e,e.return,t)}break;case 4:sl(t,e),ll(e);break;case 13:sl(t,e),ll(e),8192&(i=e.child).flags&&(s=null!==i.memoizedState,i.stateNode.isHidden=s,!s||null!==i.alternate&&null!==i.alternate.memoizedState||($l=We())),4&r&&ol(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(Qa=(u=Qa)||d,sl(t,e),Qa=u):sl(t,e),ll(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!d&&0!=(1&e.mode))for(Ga=e,d=e.child;null!==d;){for(h=Ga=d;null!==Ga;){switch(f=(p=Ga).child,p.tag){case 0:case 11:case 14:case 15:Xa(4,p,p.return);break;case 1:Ha(p,p.return);var m=p.stateNode;if("function"==typeof m.componentWillUnmount){r=p,n=p.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(e){fc(r,n,e)}}break;case 5:Ha(p,p.return);break;case 22:if(null!==p.memoizedState){dl(h);continue}}null!==f?(f.return=p,Ga=f):dl(h)}d=d.sibling}e:for(d=null,h=e;;){if(5===h.tag){if(null===d){d=h;try{i=h.stateNode,u?"function"==typeof(s=i.style).setProperty?s.setProperty("display","none","important"):s.display="none":(l=h.stateNode,a=null!=(c=h.memoizedProps.style)&&c.hasOwnProperty("display")?c.display:null,l.style.display=pe("display",a))}catch(t){fc(e,e.return,t)}}}else if(6===h.tag){if(null===d)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(t){fc(e,e.return,t)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:sl(t,e),ll(e),4&r&&ol(e);break;case 21:break;default:sl(t,e),ll(e)}}function ll(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(Ka(n)){var r=n;break e}n=n.return}throw Error(o(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(ue(i,""),r.flags&=-33),function e(t,n,r){var i=t.tag;if(5===i||6===i)t=t.stateNode,n?r.insertBefore(t,n):r.appendChild(t);else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,el(e),i);break;case 3:case 4:var s=r.stateNode.containerInfo;!function e(t,n,r){var i=t.tag;if(5===i||6===i)t=t.stateNode,n?8===r.nodeType?r.parentNode.insertBefore(t,n):r.insertBefore(t,n):(8===r.nodeType?(n=r.parentNode).insertBefore(t,r):(n=r).appendChild(t),null!=(r=r._reactRootContainer)||null!==n.onclick||(n.onclick=Hr));else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,el(e),s);break;default:throw Error(o(161))}}catch(t){fc(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function cl(e,t,n){Ga=e,function e(t,n,r){for(var i=0!=(1&t.mode);null!==Ga;){var o=Ga,s=o.child;if(22===o.tag&&i){var a=null!==o.memoizedState||Ua;if(!a){var l=o.alternate,c=null!==l&&null!==l.memoizedState||Qa;l=Ua;var u=Qa;if(Ua=a,(Qa=c)&&!u)for(Ga=o;null!==Ga;)c=(a=Ga).child,22===a.tag&&null!==a.memoizedState?hl(o):null!==c?(c.return=a,Ga=c):hl(o);for(;null!==s;)Ga=s,e(s,n,r),s=s.sibling;Ga=o,Ua=l,Qa=u}ul(t)}else 0!=(8772&o.subtreeFlags)&&null!==s?(s.return=o,Ga=s):ul(t)}}(e,t,n)}function ul(e){for(;null!==Ga;){var t=Ga;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Qa||Ya(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Qa)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:co(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;null!==s&&Po(t,s,r);break;case 3:var a=t.updateQueue;if(null!==a){if(n=null,null!==t.child)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Po(t,a,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:case 4:case 12:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var d=u.memoizedState;if(null!==d){var h=d.dehydrated;null!==h&&Bt(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(o(163))}Qa||512&t.flags&&Za(t)}catch(e){fc(t,t.return,e)}}if(t===e){Ga=null;break}if(null!==(n=t.sibling)){n.return=t.return,Ga=n;break}Ga=t.return}}function dl(e){for(;null!==Ga;){var t=Ga;if(t===e){Ga=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Ga=n;break}Ga=t.return}}function hl(e){for(;null!==Ga;){var t=Ga;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ya(4,t)}catch(e){fc(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){fc(t,i,e)}}var o=t.return;try{Za(t)}catch(e){fc(t,o,e)}break;case 5:var s=t.return;try{Za(t)}catch(e){fc(t,s,e)}}}catch(e){fc(t,t.return,e)}if(t===e){Ga=null;break}var a=t.sibling;if(null!==a){a.return=t.return,Ga=a;break}Ga=t.return}}var pl,fl=Math.ceil,ml=S.ReactCurrentDispatcher,gl=S.ReactCurrentOwner,bl=S.ReactCurrentBatchConfig,vl=0,yl=null,Sl=null,_l=0,xl=0,wl=bi(0),kl=0,Ol=null,El=0,Al=0,Tl=0,Cl=null,Ml=null,$l=0,Pl=1/0,Rl=null,jl=!1,Nl=null,Dl=null,Il=!1,Ll=null,Bl=0,zl=0,Fl=null,Ul=-1,Ql=0;function ql(){return 0!=(6&vl)?We():-1!==Ul?Ul:Ul=We()}function Gl(e){return 0==(1&e.mode)?1:0!=(2&vl)&&0!==_l?_l&-_l:null!==lo.transition?(0===Ql&&(Ql=ht()),Ql):0!==(e=gt)?e:e=void 0===(e=window.event)?16:Vt(e.type)}function Hl(e,t,n,r){if(50<zl)throw zl=0,Fl=null,Error(o(185));ft(e,n,r),0!=(2&vl)&&e===yl||(e===yl&&(0==(2&vl)&&(Al|=n),4===kl&&Zl(e,_l)),Vl(e,r),1===n&&0===vl&&0==(1&t.mode)&&(Pl=We()+500,Pi&&Ni()))}function Vl(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-rt(o),a=1<<s,l=i[s];-1===l?0!=(a&n)&&0==(a&r)||(i[s]=ut(a,t)):l<=t&&(e.expiredLanes|=a),o&=~a}}(e,t);var r=ct(e,e===yl?_l:0);if(0===r)null!==n&&Ge(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ge(n),1===t)0===e.tag?function(e){Pi=!0,ji(e)}(Jl.bind(null,e)):ji(Jl.bind(null,e)),Kr((function(){0==(6&vl)&&Ni()})),n=null;else{switch(bt(r)){case 1:n=Ye;break;case 4:n=Ze;break;case 16:n=Je;break;case 536870912:n=et;break;default:n=Je}n=yc(n,Wl.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Wl(e,t){if(Ul=-1,Ql=0,0!=(6&vl))throw Error(o(327));var n=e.callbackNode;if(hc()&&e.callbackNode!==n)return null;var r=ct(e,e===yl?_l:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=sc(e,r);else{t=r;var i=vl;vl|=2;var s=ic();for(yl===e&&_l===t||(Rl=null,Pl=We()+500,nc(e,t));;)try{lc();break}catch(t){rc(e,t)}mo(),ml.current=s,vl=i,null!==Sl?t=0:(yl=null,_l=0,t=kl)}if(0!==t){if(2===t&&(0!==(i=dt(e))&&(r=i,t=Xl(e,i))),1===t)throw n=Ol,nc(e,0),Zl(e,r),Vl(e,We()),n;if(6===t)Zl(e,r);else{if(i=e.current.alternate,0==(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!tr(o(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)&&(2===(t=sc(e,r))&&(0!==(s=dt(e))&&(r=s,t=Xl(e,s))),1===t))throw n=Ol,nc(e,0),Zl(e,r),Vl(e,We()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(o(345));case 2:dc(e,Ml,Rl);break;case 3:if(Zl(e,r),(130023424&r)===r&&10<(t=$l+500-We())){if(0!==ct(e,0))break;if(((i=e.suspendedLanes)&r)!==r){ql(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Yr(dc.bind(null,e,Ml,Rl),t);break}dc(e,Ml,Rl);break;case 4:if(Zl(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-rt(r);s=1<<a,(a=t[a])>i&&(i=a),r&=~s}if(r=i,10<(r=(120>(r=We()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*fl(r/1960))-r)){e.timeoutHandle=Yr(dc.bind(null,e,Ml,Rl),r);break}dc(e,Ml,Rl);break;case 5:dc(e,Ml,Rl);break;default:throw Error(o(329))}}}return Vl(e,We()),e.callbackNode===n?Wl.bind(null,e):null}function Xl(e,t){var n=Cl;return e.current.memoizedState.isDehydrated&&(nc(e,t).flags|=256),2!==(e=sc(e,t))&&(t=Ml,Ml=n,null!==t&&Yl(t)),e}function Yl(e){null===Ml?Ml=e:Ml.push.apply(Ml,e)}function Zl(e,t){for(t&=~Tl,t&=~Al,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-rt(t),r=1<<n;e[n]=-1,t&=~r}}function Jl(e){if(0!=(6&vl))throw Error(o(327));hc();var t=ct(e,0);if(0==(1&t))return Vl(e,We()),null;var n=sc(e,t);if(0!==e.tag&&2===n){var r=dt(e);0!==r&&(t=r,n=Xl(e,r))}if(1===n)throw n=Ol,nc(e,0),Zl(e,t),Vl(e,We()),n;if(6===n)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,dc(e,Ml,Rl),Vl(e,We()),null}function Kl(e,t){var n=vl;vl|=1;try{return e(t)}finally{0===(vl=n)&&(Pl=We()+500,Pi&&Ni())}}function ec(e){null!==Ll&&0===Ll.tag&&0==(6&vl)&&hc();var t=vl;vl|=1;var n=bl.transition,r=gt;try{if(bl.transition=null,gt=1,e)return e()}finally{gt=r,bl.transition=n,0==(6&(vl=t))&&Ni()}}function tc(){xl=wl.current,vi(wl)}function nc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Zr(n)),null!==Sl)for(n=Sl.return;null!==n;){var r=n;switch(Wi(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Ei();break;case 3:Jo(),vi(xi),vi(_i),is();break;case 5:es(r);break;case 4:Jo();break;case 13:case 19:vi(ts);break;case 10:go(r.type._context);break;case 22:case 23:tc()}n=n.return}if(yl=e,Sl=e=wc(e.current,null),_l=xl=t,kl=0,Ol=null,Tl=Al=El=0,Ml=Cl=null,null!==So){for(t=0;t<So.length;t++)if(null!==(r=(n=So[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var s=o.next;o.next=i,r.next=s}n.pending=r}So=null}return e}function rc(e,t){for(;;){var n=Sl;try{if(mo(),os.current=Ks,ds){for(var r=ls.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}ds=!1}if(as=0,us=cs=ls=null,hs=!1,ps=0,gl.current=null,null===n||null===n.return){kl=1,Ol=t,Sl=null;break}e:{var s=e,a=n.return,l=n,c=t;if(t=_l,l.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var u=c,d=l,h=d.tag;if(0==(1&d.mode)&&(0===h||11===h||15===h)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var f=ua(a);if(null!==f){f.flags&=-257,da(f,a,l,0,t),1&f.mode&&ca(s,u,t),c=u;var m=(t=f).updateQueue;if(null===m){var g=new Set;g.add(c),t.updateQueue=g}else m.add(c);break e}if(0==(1&t)){ca(s,u,t),oc();break e}c=Error(o(426))}else if(Zi&&1&l.mode){var b=ua(a);if(null!==b){0==(65536&b.flags)&&(b.flags|=256),da(b,a,l,0,t),ao(ra(c,l));break e}}s=c=ra(c,l),4!==kl&&(kl=2),null===Cl?Cl=[s]:Cl.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t,Mo(s,aa(0,c,t));break e;case 1:l=c;var v=s.type,y=s.stateNode;if(0==(128&s.flags)&&("function"==typeof v.getDerivedStateFromError||null!==y&&"function"==typeof y.componentDidCatch&&(null===Dl||!Dl.has(y)))){s.flags|=65536,t&=-t,s.lanes|=t,Mo(s,la(s,l,t));break e}}s=s.return}while(null!==s)}uc(n)}catch(e){t=e,Sl===n&&null!==n&&(Sl=n=n.return);continue}break}}function ic(){var e=ml.current;return ml.current=Ks,null===e?Ks:e}function oc(){0!==kl&&3!==kl&&2!==kl||(kl=4),null===yl||0==(268435455&El)&&0==(268435455&Al)||Zl(yl,_l)}function sc(e,t){var n=vl;vl|=2;var r=ic();for(yl===e&&_l===t||(Rl=null,nc(e,t));;)try{ac();break}catch(t){rc(e,t)}if(mo(),vl=n,ml.current=r,null!==Sl)throw Error(o(261));return yl=null,_l=0,kl}function ac(){for(;null!==Sl;)cc(Sl)}function lc(){for(;null!==Sl&&!He();)cc(Sl)}function cc(e){var t=pl(e.alternate,e,xl);e.memoizedProps=e.pendingProps,null===t?uc(e):Sl=t,gl.current=null}function uc(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=za(n,t,xl)))return void(Sl=n)}else{if(null!==(n=Fa(n,t)))return n.flags&=32767,void(Sl=n);if(null===e)return kl=6,void(Sl=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Sl=t);Sl=t=e}while(null!==t);0===kl&&(kl=5)}function dc(e,t,n){var r=gt,i=bl.transition;try{bl.transition=null,gt=1,function(e,t,n,r){do{hc()}while(null!==Ll);if(0!=(6&vl))throw Error(o(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-rt(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,s),e===yl&&(Sl=yl=null,_l=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||Il||(Il=!0,yc(Je,(function(){return hc(),null}))),s=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||s){s=bl.transition,bl.transition=null;var a=gt;gt=1;var l=vl;vl|=4,gl.current=null,function(e,t){if(Vr=Ft,sr(e=or())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch(e){n=null;break e}var a=0,l=-1,c=-1,u=0,d=0,h=e,p=null;t:for(;;){for(var f;h!==n||0!==i&&3!==h.nodeType||(l=a+i),h!==s||0!==r&&3!==h.nodeType||(c=a+r),3===h.nodeType&&(a+=h.nodeValue.length),null!==(f=h.firstChild);)p=h,h=f;for(;;){if(h===e)break t;if(p===n&&++u===i&&(l=a),p===s&&++d===r&&(c=a),null!==(f=h.nextSibling))break;p=(h=p).parentNode}h=f}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Wr={focusedElem:e,selectionRange:n},Ft=!1,Ga=t;null!==Ga;)if(e=(t=Ga).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,Ga=e;else for(;null!==Ga;){t=Ga;try{var m=t.alternate;if(0!=(1024&t.flags))switch(t.tag){case 0:case 11:case 15:break;case 1:if(null!==m){var g=m.memoizedProps,b=m.memoizedState,v=t.stateNode,y=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:co(t.type,g),b);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var S=t.stateNode.containerInfo;1===S.nodeType?S.textContent="":9===S.nodeType&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(e){fc(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Ga=e;break}Ga=t.return}m=Wa,Wa=!1}(e,n),al(n,e),ar(Wr),Ft=!!Vr,Wr=Vr=null,e.current=n,cl(n,e,i),Ve(),vl=l,gt=a,bl.transition=s}else e.current=n;if(Il&&(Il=!1,Ll=e,Bl=i),0===(s=e.pendingLanes)&&(Dl=null),function(e){if(nt&&"function"==typeof nt.onCommitFiberRoot)try{nt.onCommitFiberRoot(tt,e,void 0,128==(128&e.current.flags))}catch(e){}}(n.stateNode),Vl(e,We()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(jl)throw jl=!1,e=Nl,Nl=null,e;0!=(1&Bl)&&0!==e.tag&&hc(),0!=(1&(s=e.pendingLanes))?e===Fl?zl++:(zl=0,Fl=e):zl=0,Ni()}(e,t,n,r)}finally{bl.transition=i,gt=r}return null}function hc(){if(null!==Ll){var e=bt(Bl),t=bl.transition,n=gt;try{if(bl.transition=null,gt=16>e?16:e,null===Ll)var r=!1;else{if(e=Ll,Ll=null,Bl=0,0!=(6&vl))throw Error(o(331));var i=vl;for(vl|=4,Ga=e.current;null!==Ga;){var s=Ga,a=s.child;if(0!=(16&Ga.flags)){var l=s.deletions;if(null!==l){for(var c=0;c<l.length;c++){var u=l[c];for(Ga=u;null!==Ga;){var d=Ga;switch(d.tag){case 0:case 11:case 15:Xa(8,d,s)}var h=d.child;if(null!==h)h.return=d,Ga=h;else for(;null!==Ga;){var p=(d=Ga).sibling,f=d.return;if(Ja(d),d===u){Ga=null;break}if(null!==p){p.return=f,Ga=p;break}Ga=f}}}var m=s.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var b=g.sibling;g.sibling=null,g=b}while(null!==g)}}Ga=s}}if(0!=(2064&s.subtreeFlags)&&null!==a)a.return=s,Ga=a;else e:for(;null!==Ga;){if(0!=(2048&(s=Ga).flags))switch(s.tag){case 0:case 11:case 15:Xa(9,s,s.return)}var v=s.sibling;if(null!==v){v.return=s.return,Ga=v;break e}Ga=s.return}}var y=e.current;for(Ga=y;null!==Ga;){var S=(a=Ga).child;if(0!=(2064&a.subtreeFlags)&&null!==S)S.return=a,Ga=S;else e:for(a=y;null!==Ga;){if(0!=(2048&(l=Ga).flags))try{switch(l.tag){case 0:case 11:case 15:Ya(9,l)}}catch(e){fc(l,l.return,e)}if(l===a){Ga=null;break e}var _=l.sibling;if(null!==_){_.return=l.return,Ga=_;break e}Ga=l.return}}if(vl=i,Ni(),nt&&"function"==typeof nt.onPostCommitFiberRoot)try{nt.onPostCommitFiberRoot(tt,e)}catch(e){}r=!0}return r}finally{gt=n,bl.transition=t}}return!1}function pc(e,t,n){e=To(e,t=aa(0,t=ra(n,t),1),1),t=ql(),null!==e&&(ft(e,1,t),Vl(e,t))}function fc(e,t,n){if(3===e.tag)pc(e,e,n);else for(;null!==t;){if(3===t.tag){pc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Dl||!Dl.has(r))){t=To(t,e=la(t,e=ra(n,e),1),1),e=ql(),null!==t&&(ft(t,1,e),Vl(t,e));break}}t=t.return}}function mc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=ql(),e.pingedLanes|=e.suspendedLanes&n,yl===e&&(_l&n)===n&&(4===kl||3===kl&&(130023424&_l)===_l&&500>We()-$l?nc(e,0):Tl|=n),Vl(e,t)}function gc(e,t){0===t&&(0==(1&e.mode)?t=1:(t=at,0==(130023424&(at<<=1))&&(at=4194304)));var n=ql();null!==(e=wo(e,t))&&(ft(e,t,n),Vl(e,n))}function bc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),gc(e,n)}function vc(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(o(314))}null!==r&&r.delete(t),gc(e,n)}function yc(e,t){return qe(e,t)}function Sc(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _c(e,t,n,r){return new Sc(e,t,n,r)}function xc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function wc(e,t){var n=e.alternate;return null===n?((n=_c(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function kc(e,t,n,r,i,s){var a=2;if(r=e,"function"==typeof e)xc(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case w:return Oc(n.children,i,s,t);case k:a=8,i|=8;break;case O:return(e=_c(12,n,t,2|i)).elementType=O,e.lanes=s,e;case C:return(e=_c(13,n,t,i)).elementType=C,e.lanes=s,e;case M:return(e=_c(19,n,t,i)).elementType=M,e.lanes=s,e;case R:return Ec(n,i,s,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case E:a=10;break e;case A:a=9;break e;case T:a=11;break e;case $:a=14;break e;case P:a=16,r=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=_c(a,n,t,i)).elementType=e,t.type=r,t.lanes=s,t}function Oc(e,t,n,r){return(e=_c(7,e,r,t)).lanes=n,e}function Ec(e,t,n,r){return(e=_c(22,e,r,t)).elementType=R,e.lanes=n,e.stateNode={isHidden:!1},e}function Ac(e,t,n){return(e=_c(6,e,null,t)).lanes=n,e}function Tc(e,t,n){return(t=_c(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Cc(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=pt(0),this.expirationTimes=pt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Mc(e,t,n,r,i,o,s,a,l){return e=new Cc(e,t,n,a,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=_c(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Oo(o),e}function $c(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:x,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Pc(e){if(!e)return Si;e:{if(ze(e=e._reactInternals)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Oi(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var n=e.type;if(Oi(n))return Ti(e,n,t)}return t}function Rc(e,t,n,r,i,o,s,a,l){return(e=Mc(n,r,!0,e,0,o,0,a,l)).context=Pc(null),n=e.current,(o=Ao(r=ql(),i=Gl(n))).callback=null!=t?t:null,To(n,o,i),e.current.lanes=i,ft(e,i,r),Vl(e,r),e}function jc(e,t,n,r){var i=t.current,o=ql(),s=Gl(i);return n=Pc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Ao(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=To(i,t,s))&&(Hl(e,i,s,o),Co(e,i,s)),s}function Nc(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Dc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Ic(e,t){Dc(e,t),(e=e.alternate)&&Dc(e,t)}pl=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||xi.current)pa=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return pa=!1,function(e,t,n){switch(t.tag){case 3:wa(t),so();break;case 5:Ko(t);break;case 1:Oi(t.type)&&Ci(t);break;case 4:Zo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;yi(uo,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(yi(ts,1&ts.current),t.flags|=128,null):0!=(n&t.child.childLanes)?Ma(e,t,n):(yi(ts,1&ts.current),null!==(e=Ia(e,t,n))?e.sibling:null);yi(ts,1&ts.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return Na(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),yi(ts,ts.current),r)break;return null;case 22:case 23:return t.lanes=0,va(e,t,n)}return Ia(e,t,n)}(e,t,n);pa=0!=(131072&e.flags)}else pa=!1,Zi&&0!=(1048576&t.flags)&&Hi(t,Bi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Da(e,t),e=t.pendingProps;var i=ki(t,_i.current);vo(t,n),i=bs(null,t,r,e,i,n);var s=vs();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Oi(r)?(s=!0,Ci(t)):s=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Oo(t),i.updater=No,t.stateNode=i,i._reactInternals=t,Bo(t,r,e,n),t=xa(null,t,r,!0,s,n)):(t.tag=0,Zi&&s&&Vi(t),fa(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Da(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return xc(e)?1:0;if(null!=e){if((e=e.$$typeof)===T)return 11;if(e===$)return 14}return 2}(r),e=co(r,e),i){case 0:t=Sa(null,t,r,e,n);break e;case 1:t=_a(null,t,r,e,n);break e;case 11:t=ma(null,t,r,e,n);break e;case 14:t=ga(null,t,r,co(r.type,e),n);break e}throw Error(o(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,Sa(e,t,r,i=t.elementType===r?i:co(r,i),n);case 1:return r=t.type,i=t.pendingProps,_a(e,t,r,i=t.elementType===r?i:co(r,i),n);case 3:e:{if(wa(t),null===e)throw Error(o(387));r=t.pendingProps,i=(s=t.memoizedState).element,Eo(e,t),$o(t,r,null,n);var a=t.memoizedState;if(r=a.element,s.isDehydrated){if(s={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=s,t.memoizedState=s,256&t.flags){t=ka(e,t,r,n,i=ra(Error(o(423)),t));break e}if(r!==i){t=ka(e,t,r,n,i=ra(Error(o(424)),t));break e}for(Yi=ni(t.stateNode.containerInfo.firstChild),Xi=t,Zi=!0,Ji=null,n=Go(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(so(),r===i){t=Ia(e,t,n);break e}fa(e,t,r,n)}t=t.child}return t;case 5:return Ko(t),null===e&&no(t),r=t.type,i=t.pendingProps,s=null!==e?e.memoizedProps:null,a=i.children,Xr(r,i)?a=null:null!==s&&Xr(r,s)&&(t.flags|=32),ya(e,t),fa(e,t,a,n),t.child;case 6:return null===e&&no(t),null;case 13:return Ma(e,t,n);case 4:return Zo(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=qo(t,null,r,n):fa(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,ma(e,t,r,i=t.elementType===r?i:co(r,i),n);case 7:return fa(e,t,t.pendingProps,n),t.child;case 8:case 12:return fa(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,a=i.value,yi(uo,r._currentValue),r._currentValue=a,null!==s)if(tr(s.value,a)){if(s.children===i.children&&!xi.current){t=Ia(e,t,n);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){var l=s.dependencies;if(null!==l){a=s.child;for(var c=l.firstContext;null!==c;){if(c.context===r){if(1===s.tag){(c=Ao(-1,n&-n)).tag=2;var u=s.updateQueue;if(null!==u){var d=(u=u.shared).pending;null===d?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}s.lanes|=n,null!==(c=s.alternate)&&(c.lanes|=n),bo(s.return,n,t),l.lanes|=n;break}c=c.next}}else if(10===s.tag)a=s.type===t.type?null:s.child;else if(18===s.tag){if(null===(a=s.return))throw Error(o(341));a.lanes|=n,null!==(l=a.alternate)&&(l.lanes|=n),bo(a,n,t),a=s.sibling}else a=s.child;if(null!==a)a.return=s;else for(a=s;null!==a;){if(a===t){a=null;break}if(null!==(s=a.sibling)){s.return=a.return,a=s;break}a=a.return}s=a}fa(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,vo(t,n),r=r(i=yo(i)),t.flags|=1,fa(e,t,r,n),t.child;case 14:return i=co(r=t.type,t.pendingProps),ga(e,t,r,i=co(r.type,i),n);case 15:return ba(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:co(r,i),Da(e,t),t.tag=1,Oi(r)?(e=!0,Ci(t)):e=!1,vo(t,n),Io(t,r,i),Bo(t,r,i,n),xa(null,t,r,!0,e,n);case 19:return Na(e,t,n);case 22:return va(e,t,n)}throw Error(o(156,t.tag))};var Lc="function"==typeof reportError?reportError:function(e){console.error(e)};function Bc(e){this._internalRoot=e}function zc(e){this._internalRoot=e}function Fc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Uc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Qc(){}function qc(e,t,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if("function"==typeof i){var a=i;i=function(){var e=Nc(s);a.call(e)}}jc(t,s,e,i)}else s=function(e,t,n,r,i){if(i){if("function"==typeof r){var o=r;r=function(){var e=Nc(s);o.call(e)}}var s=Rc(t,r,e,0,null,!1,0,"",Qc);return e._reactRootContainer=s,e[ai]=s.current,Nr(8===e.nodeType?e.parentNode:e),ec(),s}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var a=r;r=function(){var e=Nc(l);a.call(e)}}var l=Mc(e,0,!1,null,0,!1,0,"",Qc);return e._reactRootContainer=l,e[ai]=l.current,Nr(8===e.nodeType?e.parentNode:e),ec((function(){jc(t,l,n,r)})),l}(n,t,e,i,r);return Nc(s)}zc.prototype.render=Bc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));jc(e,t,null,null)},zc.prototype.unmount=Bc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;ec((function(){jc(null,e,null,null)})),t[ai]=null}},zc.prototype.unstable_scheduleHydration=function(e){if(e){var t=_t();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Mt.length&&0!==t&&t<Mt[n].priority;n++);Mt.splice(n,0,e),0===n&&jt(e)}},vt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=lt(t.pendingLanes);0!==n&&(mt(t,1|n),Vl(t,We()),0==(6&vl)&&(Pl=We()+500,Ni()))}break;case 13:ec((function(){var t=wo(e,1);if(null!==t){var n=ql();Hl(t,e,1,n)}})),Ic(e,1)}},yt=function(e){if(13===e.tag){var t=wo(e,134217728);if(null!==t)Hl(t,e,134217728,ql());Ic(e,134217728)}},St=function(e){if(13===e.tag){var t=Gl(e),n=wo(e,t);if(null!==n)Hl(n,e,t,ql());Ic(e,t)}},_t=function(){return gt},xt=function(e,t){var n=gt;try{return gt=e,t()}finally{gt=n}},Se=function(e,t,n){switch(t){case"input":if(Z(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=fi(r);if(!i)throw Error(o(90));H(r),Z(r,i)}}}break;case"textarea":ie(e,n);break;case"select":null!=(t=n.value)&&te(e,!!n.multiple,t,!1)}},Ee=Kl,Ae=ec;var Gc={usingClientEntryPoint:!1,Events:[hi,pi,fi,ke,Oe,Kl]},Hc={findFiberByHostInstance:di,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},Vc={bundleType:Hc.bundleType,version:Hc.version,rendererPackageName:Hc.rendererPackageName,rendererConfig:Hc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:S.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Qe(e))?null:e.stateNode},findFiberByHostInstance:Hc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Wc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wc.isDisabled&&Wc.supportsFiber)try{tt=Wc.inject(Vc),nt=Wc}catch(e){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Gc,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Fc(t))throw Error(o(200));return $c(e,t,null,n)},t.createRoot=function(e,t){if(!Fc(e))throw Error(o(299));var n=!1,r="",i=Lc;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Mc(e,1,!1,null,0,n,0,r,i),e[ai]=t.current,Nr(8===e.nodeType?e.parentNode:e),new Bc(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(o(188));throw e=Object.keys(e).join(","),Error(o(268,e))}return e=null===(e=Qe(t))?null:e.stateNode},t.flushSync=function(e){return ec(e)},t.hydrate=function(e,t,n){if(!Uc(t))throw Error(o(200));return qc(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Fc(e))throw Error(o(405));var r=null!=n&&n.hydratedSources||null,i=!1,s="",a=Lc;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(s=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError)),t=Rc(t,null,e,1,null!=n?n:null,i,0,s,a),e[ai]=t.current,Nr(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new zc(t)},t.render=function(e,t,n){if(!Uc(t))throw Error(o(200));return qc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Uc(e))throw Error(o(40));return!!e._reactRootContainer&&(ec((function(){qc(null,null,e,!1,(function(){e._reactRootContainer=null,e[ai]=null}))})),!0)},t.unstable_batchedUpdates=Kl,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Uc(n))throw Error(o(200));if(null==e||void 0===e._reactInternals)throw Error(o(38));return qc(e,t,n,!1,r)},t.version="18.2.0-next-9e3b772b8-20220608"},function(e,t,n){"use strict";e.exports=n(205)},function(e,t,n){"use strict";(function(e){
|
||
/**
|
||
* @license React
|
||
* scheduler.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<o(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,s=i>>>1;r<s;){var a=2*(r+1)-1,l=e[a],c=a+1,u=e[c];if(0>o(l,n))c<i&&0>o(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[a]=n,r=a);else{if(!(c<i&&0>o(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var a=Date,l=a.now();t.unstable_now=function(){return a.now()-l}}var c=[],u=[],d=1,h=null,p=3,f=!1,m=!1,g=!1,b="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,y=void 0!==e?e:null;function S(e){for(var t=r(u);null!==t;){if(null===t.callback)i(u);else{if(!(t.startTime<=e))break;i(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function _(e){if(g=!1,S(e),!m)if(null!==r(c))m=!0,R(x);else{var t=r(u);null!==t&&j(_,t.startTime-e)}}function x(e,n){m=!1,g&&(g=!1,v(E),E=-1),f=!0;var o=p;try{for(S(n),h=r(c);null!==h&&(!(h.expirationTime>n)||e&&!C());){var s=h.callback;if("function"==typeof s){h.callback=null,p=h.priorityLevel;var a=s(h.expirationTime<=n);n=t.unstable_now(),"function"==typeof a?h.callback=a:h===r(c)&&i(c),S(n)}else i(c);h=r(c)}if(null!==h)var l=!0;else{var d=r(u);null!==d&&j(_,d.startTime-n),l=!1}return l}finally{h=null,p=o,f=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var w,k=!1,O=null,E=-1,A=5,T=-1;function C(){return!(t.unstable_now()-T<A)}function M(){if(null!==O){var e=t.unstable_now();T=e;var n=!0;try{n=O(!0,e)}finally{n?w():(k=!1,O=null)}}else k=!1}if("function"==typeof y)w=function(){y(M)};else if("undefined"!=typeof MessageChannel){var $=new MessageChannel,P=$.port2;$.port1.onmessage=M,w=function(){P.postMessage(null)}}else w=function(){b(M,0)};function R(e){O=e,k||(k=!0,w())}function j(e,n){E=b((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){m||f||(m=!0,R(x))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,i,o){var s=t.unstable_now();switch("object"==typeof o&&null!==o?o="number"==typeof(o=o.delay)&&0<o?s+o:s:o=s,e){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return e={id:d++,callback:i,priorityLevel:e,startTime:o,expirationTime:a=o+a,sortIndex:-1},o>s?(e.sortIndex=o,n(u,e),null===r(c)&&e===r(u)&&(g?(v(E),E=-1):g=!0,j(_,o-s))):(e.sortIndex=a,n(c,e),m||f||(m=!0,R(x))),e},t.unstable_shouldYield=C,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}}).call(this,n(89).setImmediate)},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,i,o,s,a,l=1,c={},u=!1,d=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){f(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){f(e.data)},r=function(e){o.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(i=d.documentElement,r=function(e){var t=d.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):r=function(e){setTimeout(f,0,e)}:(s="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&f(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),r=function(t){e.postMessage(s+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var i={callback:e,args:t};return c[l]=i,r(l),l++},h.clearImmediate=p}function p(e){delete c[e]}function f(e){if(u)setTimeout(f,0,e);else{var t=c[e];if(t){u=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{p(e),u=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(28),n(36))},function(e,t,n){"use strict";e.exports=n(208)},function(e,t,n){"use strict";
|
||
/** @license React v16.13.1
|
||
* react-is.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var r="function"==typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,s=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,d=r?Symbol.for("react.async_mode"):60111,h=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,f=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,b=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,S=r?Symbol.for("react.responder"):60118,_=r?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case d:case h:case s:case l:case a:case f:return e;default:switch(e=e&&e.$$typeof){case u:case p:case b:case g:case c:return e;default:return t}}case o:return t}}}function w(e){return x(e)===h}t.AsyncMode=d,t.ConcurrentMode=h,t.ContextConsumer=u,t.ContextProvider=c,t.Element=i,t.ForwardRef=p,t.Fragment=s,t.Lazy=b,t.Memo=g,t.Portal=o,t.Profiler=l,t.StrictMode=a,t.Suspense=f,t.isAsyncMode=function(e){return w(e)||x(e)===d},t.isConcurrentMode=w,t.isContextConsumer=function(e){return x(e)===u},t.isContextProvider=function(e){return x(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return x(e)===p},t.isFragment=function(e){return x(e)===s},t.isLazy=function(e){return x(e)===b},t.isMemo=function(e){return x(e)===g},t.isPortal=function(e){return x(e)===o},t.isProfiler=function(e){return x(e)===l},t.isStrictMode=function(e){return x(e)===a},t.isSuspense=function(e){return x(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===s||e===h||e===l||e===a||e===f||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===b||e.$$typeof===g||e.$$typeof===c||e.$$typeof===u||e.$$typeof===p||e.$$typeof===y||e.$$typeof===S||e.$$typeof===_||e.$$typeof===v)},t.typeOf=x},function(e,t,n){"use strict";
|
||
/** @license React v17.0.2
|
||
* react-is.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var r=60103,i=60106,o=60107,s=60108,a=60114,l=60109,c=60110,u=60112,d=60113,h=60120,p=60115,f=60116,m=60121,g=60122,b=60117,v=60129,y=60131;if("function"==typeof Symbol&&Symbol.for){var S=Symbol.for;r=S("react.element"),i=S("react.portal"),o=S("react.fragment"),s=S("react.strict_mode"),a=S("react.profiler"),l=S("react.provider"),c=S("react.context"),u=S("react.forward_ref"),d=S("react.suspense"),h=S("react.suspense_list"),p=S("react.memo"),f=S("react.lazy"),m=S("react.block"),g=S("react.server.block"),b=S("react.fundamental"),v=S("react.debug_trace_mode"),y=S("react.legacy_hidden")}function _(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case o:case a:case s:case d:case h:return e;default:switch(e=e&&e.$$typeof){case c:case u:case f:case p:case l:return e;default:return t}}case i:return t}}}var x=l,w=r,k=u,O=o,E=f,A=p,T=i,C=a,M=s,$=d;t.ContextConsumer=c,t.ContextProvider=x,t.Element=w,t.ForwardRef=k,t.Fragment=O,t.Lazy=E,t.Memo=A,t.Portal=T,t.Profiler=C,t.StrictMode=M,t.Suspense=$,t.isAsyncMode=function(){return!1},t.isConcurrentMode=function(){return!1},t.isContextConsumer=function(e){return _(e)===c},t.isContextProvider=function(e){return _(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return _(e)===u},t.isFragment=function(e){return _(e)===o},t.isLazy=function(e){return _(e)===f},t.isMemo=function(e){return _(e)===p},t.isPortal=function(e){return _(e)===i},t.isProfiler=function(e){return _(e)===a},t.isStrictMode=function(e){return _(e)===s},t.isSuspense=function(e){return _(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===a||e===v||e===s||e===d||e===h||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===l||e.$$typeof===c||e.$$typeof===u||e.$$typeof===b||e.$$typeof===m||e[0]===g)},t.typeOf=_},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,o){t=t||"&",n=n||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(t);var l=1e3;o&&"number"==typeof o.maxKeys&&(l=o.maxKeys);var c=e.length;l>0&&c>l&&(c=l);for(var u=0;u<c;++u){var d,h,p,f,m=e[u].replace(a,"%20"),g=m.indexOf(n);g>=0?(d=m.substr(0,g),h=m.substr(g+1)):(d=m,h=""),p=decodeURIComponent(d),f=decodeURIComponent(h),r(s,p)?i(s[p])?s[p].push(f):s[p]=[s[p],f]:s[p]=f}return s};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,a){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?o(s(e),(function(s){var a=encodeURIComponent(r(s))+n;return i(e[s])?o(e[s],(function(e){return a+encodeURIComponent(r(e))})).join(t):a+encodeURIComponent(r(e[s]))})).join(t):a?encodeURIComponent(r(a))+n+encodeURIComponent(r(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var s=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t,n){"use strict";var r=n(213),i=n(214);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=y,t.resolve=function(e,t){return y(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?y(e,!1,!0).resolveObject(t):t},t.format=function(e){i.isString(e)&&(e=y(e));return e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(c),d=["%","/","?",";","#"].concat(u),h=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=n(116);function y(e,t,n){if(e&&i.isObject(e)&&e instanceof o)return e;var r=new o;return r.parse(e,t,n),r}o.prototype.parse=function(e,t,n){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),a=-1!==o&&o<e.indexOf("#")?"?":"#",c=e.split(a);c[0]=c[0].replace(/\\/g,"/");var y=e=c.join(a);if(y=y.trim(),!n&&1===e.split("#").length){var S=l.exec(y);if(S)return this.path=y,this.href=y,this.pathname=S[1],S[2]?(this.search=S[2],this.query=t?v.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var _=s.exec(y);if(_){var x=(_=_[0]).toLowerCase();this.protocol=x,y=y.substr(_.length)}if(n||_||y.match(/^\/\/[^@\/]+@[^@\/]+/)){var w="//"===y.substr(0,2);!w||_&&g[_]||(y=y.substr(2),this.slashes=!0)}if(!g[_]&&(w||_&&!b[_])){for(var k,O,E=-1,A=0;A<h.length;A++){-1!==(T=y.indexOf(h[A]))&&(-1===E||T<E)&&(E=T)}-1!==(O=-1===E?y.lastIndexOf("@"):y.lastIndexOf("@",E))&&(k=y.slice(0,O),y=y.slice(O+1),this.auth=decodeURIComponent(k)),E=-1;for(A=0;A<d.length;A++){var T;-1!==(T=y.indexOf(d[A]))&&(-1===E||T<E)&&(E=T)}-1===E&&(E=y.length),this.host=y.slice(0,E),y=y.slice(E),this.parseHost(),this.hostname=this.hostname||"";var C="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!C)for(var M=this.hostname.split(/\./),$=(A=0,M.length);A<$;A++){var P=M[A];if(P&&!P.match(p)){for(var R="",j=0,N=P.length;j<N;j++)P.charCodeAt(j)>127?R+="x":R+=P[j];if(!R.match(p)){var D=M.slice(0,A),I=M.slice(A+1),L=P.match(f);L&&(D.push(L[1]),I.unshift(L[2])),I.length&&(y="/"+I.join(".")+y),this.hostname=D.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),C||(this.hostname=r.toASCII(this.hostname));var B=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+B,this.href+=this.host,C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==y[0]&&(y="/"+y))}if(!m[x])for(A=0,$=u.length;A<$;A++){var F=u[A];if(-1!==y.indexOf(F)){var U=encodeURIComponent(F);U===F&&(U=escape(F)),y=y.split(F).join(U)}}var Q=y.indexOf("#");-1!==Q&&(this.hash=y.substr(Q),y=y.slice(0,Q));var q=y.indexOf("?");if(-1!==q?(this.search=y.substr(q),this.query=y.substr(q+1),t&&(this.query=v.parse(this.query)),y=y.slice(0,q)):t&&(this.search="",this.query={}),y&&(this.pathname=y),b[x]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){B=this.pathname||"";var G=this.search||"";this.path=B+G}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,s="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(s=v.stringify(this.query));var a=this.search||s&&"?"+s||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||b[t])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),t+o+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(a=a.replace("#","%23"))+r},o.prototype.resolve=function(e){return this.resolveObject(y(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if(i.isString(e)){var t=new o;t.parse(e,!1,!0),e=t}for(var n=new o,r=Object.keys(this),s=0;s<r.length;s++){var a=r[s];n[a]=this[a]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var l=Object.keys(e),c=0;c<l.length;c++){var u=l[c];"protocol"!==u&&(n[u]=e[u])}return b[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!b[e.protocol]){for(var d=Object.keys(e),h=0;h<d.length;h++){var p=d[h];n[p]=e[p]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||g[e.protocol])n.pathname=e.pathname;else{for(var f=(e.pathname||"").split("/");f.length&&!(e.host=f.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==f[0]&&f.unshift(""),f.length<2&&f.unshift(""),n.pathname=f.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var m=n.pathname||"",v=n.search||"";n.path=m+v}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var y=n.pathname&&"/"===n.pathname.charAt(0),S=e.host||e.pathname&&"/"===e.pathname.charAt(0),_=S||y||n.host&&e.pathname,x=_,w=n.pathname&&n.pathname.split("/")||[],k=(f=e.pathname&&e.pathname.split("/")||[],n.protocol&&!b[n.protocol]);if(k&&(n.hostname="",n.port=null,n.host&&(""===w[0]?w[0]=n.host:w.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===f[0]?f[0]=e.host:f.unshift(e.host)),e.host=null),_=_&&(""===f[0]||""===w[0])),S)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,w=f;else if(f.length)w||(w=[]),w.pop(),w=w.concat(f),n.search=e.search,n.query=e.query;else if(!i.isNullOrUndefined(e.search)){if(k)n.hostname=n.host=w.shift(),(C=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=C.shift(),n.host=n.hostname=C.shift());return n.search=e.search,n.query=e.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!w.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var O=w.slice(-1)[0],E=(n.host||e.host||w.length>1)&&("."===O||".."===O)||""===O,A=0,T=w.length;T>=0;T--)"."===(O=w[T])?w.splice(T,1):".."===O?(w.splice(T,1),A++):A&&(w.splice(T,1),A--);if(!_&&!x)for(;A--;A)w.unshift("..");!_||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),E&&"/"!==w.join("/").substr(-1)&&w.push("");var C,M=""===w[0]||w[0]&&"/"===w[0].charAt(0);k&&(n.hostname=n.host=M?"":w.length?w.shift():"",(C=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=C.shift(),n.host=n.hostname=C.shift()));return(_=_||n.host&&w.length)&&!M&&w.unshift(""),w.length?n.pathname=w.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){(function(e,r){var i;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(o){t&&t.nodeType,e&&e.nodeType;var s="object"==typeof r&&r;s.global!==s&&s.window!==s&&s.self;var a,l=2147483647,c=/^xn--/,u=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,f=String.fromCharCode;function m(e){throw new RangeError(h[e])}function g(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function b(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+g((e=e.replace(d,".")).split("."),t).join(".")}function v(e){for(var t,n,r=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}function y(e){return g(e,(function(e){var t="";return e>65535&&(t+=f((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=f(e)})).join("")}function S(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function _(e,t,n){var r=0;for(e=n?p(e/700):e>>1,e+=p(e/t);e>455;r+=36)e=p(e/35);return p(r+36*e/(e+38))}function x(e){var t,n,r,i,o,s,a,c,u,d,h,f=[],g=e.length,b=0,v=128,S=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&m("not-basic"),f.push(e.charCodeAt(r));for(i=n>0?n+1:0;i<g;){for(o=b,s=1,a=36;i>=g&&m("invalid-input"),((c=(h=e.charCodeAt(i++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:36)>=36||c>p((l-b)/s))&&m("overflow"),b+=c*s,!(c<(u=a<=S?1:a>=S+26?26:a-S));a+=36)s>p(l/(d=36-u))&&m("overflow"),s*=d;S=_(b-o,t=f.length+1,0==o),p(b/t)>l-v&&m("overflow"),v+=p(b/t),b%=t,f.splice(b++,0,v)}return y(f)}function w(e){var t,n,r,i,o,s,a,c,u,d,h,g,b,y,x,w=[];for(g=(e=v(e)).length,t=128,n=0,o=72,s=0;s<g;++s)(h=e[s])<128&&w.push(f(h));for(r=i=w.length,i&&w.push("-");r<g;){for(a=l,s=0;s<g;++s)(h=e[s])>=t&&h<a&&(a=h);for(a-t>p((l-n)/(b=r+1))&&m("overflow"),n+=(a-t)*b,t=a,s=0;s<g;++s)if((h=e[s])<t&&++n>l&&m("overflow"),h==t){for(c=n,u=36;!(c<(d=u<=o?1:u>=o+26?26:u-o));u+=36)x=c-d,y=36-d,w.push(f(S(d+x%y,0))),c=p(x/y);w.push(f(S(c,0))),o=_(n,b,r==i),n=0,++r}++n,++t}return w.join("")}a={version:"1.4.1",ucs2:{decode:v,encode:y},decode:x,encode:w,toASCII:function(e){return b(e,(function(e){return u.test(e)?"xn--"+w(e):e}))},toUnicode:function(e){return b(e,(function(e){return c.test(e)?x(e.slice(4).toLowerCase()):e}))}},void 0===(i=function(){return a}.call(t,n,t,e))||(e.exports=i)}()}).call(this,n(65)(e),n(28))},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var i in r)n.call(r,i)&&(e[i]=r[i])}return e};var n=Object.prototype.hasOwnProperty},function(e,t,n){"use strict";var r=n(29),i=n(117),o=n(217),s=n(123);var a=function e(t){var n=new o(t),a=i(o.prototype.request,n);return r.extend(a,o.prototype,n),r.extend(a,n),a.create=function(n){return e(s(t,n))},a}(n(73));a.Axios=o,a.Cancel=n(74),a.CancelToken=n(230),a.isCancel=n(122),a.VERSION=n(124).version,a.all=function(e){return Promise.all(e)},a.spread=n(231),a.isAxiosError=n(232),e.exports=a,e.exports.default=a},function(e,t,n){"use strict";var r=n(29),i=n(118),o=n(218),s=n(219),a=n(123),l=n(229),c=l.validators;function u(e){this.defaults=e,this.interceptors={request:new o,response:new o}}u.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=a(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&l.assertOptions(t,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var i,o=[];if(this.interceptors.response.forEach((function(e){o.push(e.fulfilled,e.rejected)})),!r){var u=[s,void 0];for(Array.prototype.unshift.apply(u,n),u=u.concat(o),i=Promise.resolve(e);u.length;)i=i.then(u.shift(),u.shift());return i}for(var d=e;n.length;){var h=n.shift(),p=n.shift();try{d=h(d)}catch(e){p(e);break}}try{i=s(d)}catch(e){return Promise.reject(e)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},u.prototype.getUri=function(e){return e=a(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(a(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,n,r){return this.request(a(r||{},{method:e,url:t,data:n}))}})),e.exports=u},function(e,t,n){"use strict";var r=n(29);function i(){this.handlers=[]}i.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},function(e,t,n){"use strict";var r=n(29),i=n(220),o=n(122),s=n(73),a=n(74);function l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new a("canceled")}e.exports=function(e){return l(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return l(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(l(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,n){"use strict";var r=n(29),i=n(73);e.exports=function(e,t,n){var o=this||i;return r.forEach(n,(function(n){e=n.call(o,e,t)})),e}},function(e,t,n){"use strict";var r=n(29);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},function(e,t,n){"use strict";var r=n(121);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";var r=n(29);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,s){var a=[];a.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(i)&&a.push("path="+i),r.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var r=n(225),i=n(226);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(29),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,s={};return e?(r.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(s[t]&&i.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([n]):s[t]?s[t]+", "+n:n}})),s):s}},function(e,t,n){"use strict";var r=n(29);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(124).version,i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var o={};i.transitional=function(e,t,n){function i(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,s){if(!1===e)throw new Error(i(r," has been removed"+(t?" in "+t:"")));return t&&!o[r]&&(o[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,s)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),i=r.length;i-- >0;){var o=r[i],s=t[o];if(s){var a=e[o],l=void 0===a||s(a,o,e);if(!0!==l)throw new TypeError("option "+o+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+o)}},validators:i}},function(e,t,n){"use strict";var r=n(74);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t<r;t++)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},i.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},function(e,t,n){var r=n(234),i=n(263),o=n(131),s=n(264),a=n(273),l=n(276),c=n(277),u=n(278),d=n(280),h=n(281),p=n(143),f=n(99),m=n(286),g=n(287),b=n(293),v=n(47),y=n(136),S=n(295),_=n(67),x=n(297),w=n(91),k=n(95),O={};O["[object Arguments]"]=O["[object Array]"]=O["[object ArrayBuffer]"]=O["[object DataView]"]=O["[object Boolean]"]=O["[object Date]"]=O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Map]"]=O["[object Number]"]=O["[object Object]"]=O["[object RegExp]"]=O["[object Set]"]=O["[object String]"]=O["[object Symbol]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O["[object Error]"]=O["[object Function]"]=O["[object WeakMap]"]=!1,e.exports=function e(t,n,E,A,T,C){var M,$=1&n,P=2&n,R=4&n;if(E&&(M=T?E(t,A,T,C):E(t)),void 0!==M)return M;if(!_(t))return t;var j=v(t);if(j){if(M=m(t),!$)return c(t,M)}else{var N=f(t),D="[object Function]"==N||"[object GeneratorFunction]"==N;if(y(t))return l(t,$);if("[object Object]"==N||"[object Arguments]"==N||D&&!T){if(M=P||D?{}:b(t),!$)return P?d(t,a(M,t)):u(t,s(M,t))}else{if(!O[N])return T?t:{};M=g(t,N,$)}}C||(C=new r);var I=C.get(t);if(I)return I;C.set(t,M),x(t)?t.forEach((function(r){M.add(e(r,n,E,r,t,C))})):S(t)&&t.forEach((function(r,i){M.set(i,e(r,n,E,i,t,C))}));var L=j?void 0:(R?P?p:h:P?k:w)(t);return i(L||t,(function(r,i){L&&(r=t[i=r]),o(M,i,e(r,n,E,i,t,C))})),M}},function(e,t,n){var r=n(75),i=n(240),o=n(241),s=n(242),a=n(243),l=n(244);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=s,c.prototype.has=a,c.prototype.set=l,e.exports=c},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(76),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(76);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(76);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(76);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},function(e,t,n){var r=n(75);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(75),i=n(90),o=n(130);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!i||s.length<199)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(s)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(127),i=n(248),o=n(67),s=n(129),a=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,d=c.hasOwnProperty,h=RegExp("^"+u.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?h:a).test(s(e))}},function(e,t,n){var r=n(66),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(e){}var i=s.call(e);return r&&(t?e[a]=n:delete e[a]),i}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r,i=n(249),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},function(e,t,n){var r=n(32)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(252),i=n(75),o=n(90);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},function(e,t,n){var r=n(253),i=n(254),o=n(255),s=n(256),a=n(257);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},function(e,t,n){var r=n(77);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(77),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(77),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},function(e,t,n){var r=n(77);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,n){var r=n(78);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(78);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(78);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(78);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},function(e,t,n){var r=n(68),i=n(91);e.exports=function(e,t){return e&&r(t,i(t),e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t,n){var r=n(52),i=n(46);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},function(e,t){e.exports=function(){return!1}},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,n){var r=n(270),i=n(92),o=n(93),s=o&&o.isTypedArray,a=s?i(s):r;e.exports=a},function(e,t,n){var r=n(52),i=n(137),o=n(46),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!s[r(e)]}},function(e,t,n){var r=n(94),i=n(272),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t,n){var r=n(138)(Object.keys,Object);e.exports=r},function(e,t,n){var r=n(68),i=n(95);e.exports=function(e,t){return e&&r(t,i(t),e)}},function(e,t,n){var r=n(67),i=n(94),o=n(275),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=i(e),n=[];for(var a in e)("constructor"!=a||!t&&s.call(e,a))&&n.push(a);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(32),i=t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,s=o&&o.exports===i?r.Buffer:void 0,a=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=a?a(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(65)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},function(e,t,n){var r=n(68),i=n(96);e.exports=function(e,t){return r(e,i(e),t)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}},function(e,t,n){var r=n(68),i=n(141);e.exports=function(e,t){return r(e,i(e),t)}},function(e,t,n){var r=n(142),i=n(96),o=n(91);e.exports=function(e){return r(e,o,i)}},function(e,t,n){var r=n(45)(n(32),"DataView");e.exports=r},function(e,t,n){var r=n(45)(n(32),"Promise");e.exports=r},function(e,t,n){var r=n(45)(n(32),"Set");e.exports=r},function(e,t,n){var r=n(45)(n(32),"WeakMap");e.exports=r},function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},function(e,t,n){var r=n(100),i=n(289),o=n(290),s=n(291),a=n(292);e.exports=function(e,t,n){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return i(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(e,n);case"[object Map]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return o(e);case"[object Set]":return new l;case"[object Symbol]":return s(e)}}},function(e,t,n){var r=n(32).Uint8Array;e.exports=r},function(e,t,n){var r=n(100);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},function(e,t){var n=/\w*$/;e.exports=function(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}},function(e,t,n){var r=n(66),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},function(e,t,n){var r=n(100);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},function(e,t,n){var r=n(294),i=n(98),o=n(94);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:r(i(e))}},function(e,t,n){var r=n(67),i=Object.create,o=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},function(e,t,n){var r=n(296),i=n(92),o=n(93),s=o&&o.isMap,a=s?i(s):r;e.exports=a},function(e,t,n){var r=n(99),i=n(46);e.exports=function(e){return i(e)&&"[object Map]"==r(e)}},function(e,t,n){var r=n(298),i=n(92),o=n(93),s=o&&o.isSet,a=s?i(s):r;e.exports=a},function(e,t,n){var r=n(99),i=n(46);e.exports=function(e){return i(e)&&"[object Set]"==r(e)}},function(e,t,n){var r=n(101),i=n(306),o=n(307),s=n(144);e.exports=function(e,t){return t=r(t,e),null==(e=o(e,t))||delete e[s(i(t))]}},function(e,t,n){var r=n(47),i=n(102),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||(s.test(e)||!o.test(e)||null!=t&&e in Object(t))}},function(e,t,n){var r=n(302),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,s=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,n,r,i){t.push(r?i.replace(o,"$1"):n||e)})),t}));e.exports=s},function(e,t,n){var r=n(303);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},function(e,t,n){var r=n(130);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},function(e,t,n){var r=n(305);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){var r=n(66),i=n(125),o=n(47),s=n(102),a=r?r.prototype:void 0,l=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(s(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},function(e,t){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},function(e,t,n){var r=n(308),i=n(309);e.exports=function(e,t){return t.length<2?e:r(e,i(t,0,-1))}},function(e,t,n){var r=n(101),i=n(144);e.exports=function(e,t){for(var n=0,o=(t=r(t,e)).length;null!=e&&n<o;)e=e[i(t[n++])];return n&&n==o?e:void 0}},function(e,t){e.exports=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}},function(e,t,n){var r=n(311);e.exports=function(e){return r(e)?void 0:e}},function(e,t,n){var r=n(52),i=n(98),o=n(46),s=Function.prototype,a=Object.prototype,l=s.toString,c=a.hasOwnProperty,u=l.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=r(e))return!1;var t=i(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==u}},function(e,t,n){var r=n(313),i=n(316),o=n(318);e.exports=function(e){return o(i(e,void 0,r),e+"")}},function(e,t,n){var r=n(314);e.exports=function(e){return(null==e?0:e.length)?r(e,1):[]}},function(e,t,n){var r=n(97),i=n(315);e.exports=function e(t,n,o,s,a){var l=-1,c=t.length;for(o||(o=i),a||(a=[]);++l<c;){var u=t[l];n>0&&o(u)?n>1?e(u,n-1,o,s,a):r(a,u):s||(a[a.length]=u)}return a}},function(e,t,n){var r=n(66),i=n(135),o=n(47),s=r?r.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(s&&e&&e[s])}},function(e,t,n){var r=n(317),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=i(o.length-t,0),l=Array(a);++s<a;)l[s]=o[t+s];s=-1;for(var c=Array(t+1);++s<t;)c[s]=o[s];return c[t]=n(l),r(e,this,c)}}},function(e,t){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},function(e,t,n){var r=n(319),i=n(322)(r);e.exports=i},function(e,t,n){var r=n(320),i=n(133),o=n(321),s=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o;e.exports=s},function(e,t){e.exports=function(e){return function(){return e}}},function(e,t){e.exports=function(e){return e}},function(e,t){var n=Date.now;e.exports=function(e){var t=0,r=0;return function(){var i=n(),o=16-(i-r);if(r=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.embedded-viewer{display:flex;flex:1 1 auto;block-size:auto;overflow:hidden}.embedded-viewer .proj-runner-container{display:flex;flex:1 1 auto;flex-direction:column;border-radius:10px;block-size:auto;inline-size:100%}.embedded-viewer .pythonrunner-container{border-radius:10px;flex:1;overflow:hidden;box-sizing:border-box}.embedded-viewer .visual-output{box-sizing:border-box;overflow:auto}#app.--light .embedded-viewer{background-color:#fff}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,'.react-tabs {\n -webkit-tap-highlight-color: transparent;\n}\n\n.react-tabs__tab-list {\n border-bottom: 1px solid #aaa;\n margin: 0 0 10px;\n padding: 0;\n}\n\n.react-tabs__tab {\n display: inline-block;\n border: 1px solid transparent;\n border-bottom: none;\n bottom: -1px;\n position: relative;\n list-style: none;\n padding: 6px 12px;\n cursor: pointer;\n}\n\n.react-tabs__tab--selected {\n background: #fff;\n border-color: #aaa;\n color: black;\n border-radius: 5px 5px 0 0;\n}\n\n.react-tabs__tab--disabled {\n color: GrayText;\n cursor: default;\n}\n\n.react-tabs__tab:focus {\n box-shadow: 0 0 5px hsl(208, 99%, 50%);\n border-color: hsl(208, 99%, 50%);\n outline: none;\n}\n\n.react-tabs__tab:focus:after {\n content: "";\n position: absolute;\n height: 5px;\n left: -4px;\n right: -4px;\n bottom: -5px;\n background: #fff;\n}\n\n.react-tabs__tab-panel {\n display: none;\n}\n\n.react-tabs__tab-panel--selected {\n display: block;\n}\n',""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root {\n --toastify-color-light: #fff;\n --toastify-color-dark: #121212;\n --toastify-color-info: #3498db;\n --toastify-color-success: #07bc0c;\n --toastify-color-warning: #f1c40f;\n --toastify-color-error: #e74c3c;\n --toastify-color-transparent: rgba(255, 255, 255, 0.7);\n --toastify-icon-color-info: var(--toastify-color-info);\n --toastify-icon-color-success: var(--toastify-color-success);\n --toastify-icon-color-warning: var(--toastify-color-warning);\n --toastify-icon-color-error: var(--toastify-color-error);\n --toastify-toast-width: 320px;\n --toastify-toast-background: #fff;\n --toastify-toast-min-height: 64px;\n --toastify-toast-max-height: 800px;\n --toastify-font-family: sans-serif;\n --toastify-z-index: 9999;\n --toastify-text-color-light: #757575;\n --toastify-text-color-dark: #fff;\n --toastify-text-color-info: #fff;\n --toastify-text-color-success: #fff;\n --toastify-text-color-warning: #fff;\n --toastify-text-color-error: #fff;\n --toastify-spinner-color: #616161;\n --toastify-spinner-color-empty-area: #e0e0e0;\n --toastify-color-progress-light: linear-gradient(\n to right,\n #4cd964,\n #5ac8fa,\n #007aff,\n #34aadc,\n #5856d6,\n #ff2d55\n );\n --toastify-color-progress-dark: #bb86fc;\n --toastify-color-progress-info: var(--toastify-color-info);\n --toastify-color-progress-success: var(--toastify-color-success);\n --toastify-color-progress-warning: var(--toastify-color-warning);\n --toastify-color-progress-error: var(--toastify-color-error);\n}\n\n.Toastify__toast-container {\n z-index: var(--toastify-z-index);\n -webkit-transform: translate3d(0, 0, var(--toastify-z-index) px);\n position: fixed;\n padding: 4px;\n width: var(--toastify-toast-width);\n box-sizing: border-box;\n color: #fff;\n}\n.Toastify__toast-container--top-left {\n top: 1em;\n left: 1em;\n}\n.Toastify__toast-container--top-center {\n top: 1em;\n left: 50%;\n transform: translateX(-50%);\n}\n.Toastify__toast-container--top-right {\n top: 1em;\n right: 1em;\n}\n.Toastify__toast-container--bottom-left {\n bottom: 1em;\n left: 1em;\n}\n.Toastify__toast-container--bottom-center {\n bottom: 1em;\n left: 50%;\n transform: translateX(-50%);\n}\n.Toastify__toast-container--bottom-right {\n bottom: 1em;\n right: 1em;\n}\n\n@media only screen and (max-width : 480px) {\n .Toastify__toast-container {\n width: 100vw;\n padding: 0;\n left: 0;\n margin: 0;\n }\n .Toastify__toast-container--top-left, .Toastify__toast-container--top-center, .Toastify__toast-container--top-right {\n top: 0;\n transform: translateX(0);\n }\n .Toastify__toast-container--bottom-left, .Toastify__toast-container--bottom-center, .Toastify__toast-container--bottom-right {\n bottom: 0;\n transform: translateX(0);\n }\n .Toastify__toast-container--rtl {\n right: 0;\n left: initial;\n }\n}\n.Toastify__toast {\n position: relative;\n min-height: var(--toastify-toast-min-height);\n box-sizing: border-box;\n margin-bottom: 1rem;\n padding: 8px;\n border-radius: 4px;\n box-shadow: 0 1px 10px 0 rgba(0, 0, 0, 0.1), 0 2px 15px 0 rgba(0, 0, 0, 0.05);\n display: -ms-flexbox;\n display: flex;\n -ms-flex-pack: justify;\n justify-content: space-between;\n max-height: var(--toastify-toast-max-height);\n overflow: hidden;\n font-family: var(--toastify-font-family);\n cursor: pointer;\n direction: ltr;\n}\n.Toastify__toast--rtl {\n direction: rtl;\n}\n.Toastify__toast-body {\n margin: auto 0;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n padding: 6px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n}\n.Toastify__toast-body > div:last-child {\n -ms-flex: 1;\n flex: 1;\n}\n.Toastify__toast-icon {\n -webkit-margin-end: 10px;\n margin-inline-end: 10px;\n width: 20px;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n display: -ms-flexbox;\n display: flex;\n}\n\n.Toastify--animate {\n animation-fill-mode: both;\n animation-duration: 0.7s;\n}\n\n.Toastify--animate-icon {\n animation-fill-mode: both;\n animation-duration: 0.3s;\n}\n\n@media only screen and (max-width : 480px) {\n .Toastify__toast {\n margin-bottom: 0;\n border-radius: 0;\n }\n}\n.Toastify__toast-theme--dark {\n background: var(--toastify-color-dark);\n color: var(--toastify-text-color-dark);\n}\n.Toastify__toast-theme--light {\n background: var(--toastify-color-light);\n color: var(--toastify-text-color-light);\n}\n.Toastify__toast-theme--colored.Toastify__toast--default {\n background: var(--toastify-color-light);\n color: var(--toastify-text-color-light);\n}\n.Toastify__toast-theme--colored.Toastify__toast--info {\n color: var(--toastify-text-color-info);\n background: var(--toastify-color-info);\n}\n.Toastify__toast-theme--colored.Toastify__toast--success {\n color: var(--toastify-text-color-success);\n background: var(--toastify-color-success);\n}\n.Toastify__toast-theme--colored.Toastify__toast--warning {\n color: var(--toastify-text-color-warning);\n background: var(--toastify-color-warning);\n}\n.Toastify__toast-theme--colored.Toastify__toast--error {\n color: var(--toastify-text-color-error);\n background: var(--toastify-color-error);\n}\n\n.Toastify__progress-bar-theme--light {\n background: var(--toastify-color-progress-light);\n}\n.Toastify__progress-bar-theme--dark {\n background: var(--toastify-color-progress-dark);\n}\n.Toastify__progress-bar--info {\n background: var(--toastify-color-progress-info);\n}\n.Toastify__progress-bar--success {\n background: var(--toastify-color-progress-success);\n}\n.Toastify__progress-bar--warning {\n background: var(--toastify-color-progress-warning);\n}\n.Toastify__progress-bar--error {\n background: var(--toastify-color-progress-error);\n}\n.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info, .Toastify__progress-bar-theme--colored.Toastify__progress-bar--success, .Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning, .Toastify__progress-bar-theme--colored.Toastify__progress-bar--error {\n background: var(--toastify-color-transparent);\n}\n\n.Toastify__close-button {\n color: #fff;\n background: transparent;\n outline: none;\n border: none;\n padding: 0;\n cursor: pointer;\n opacity: 0.7;\n transition: 0.3s ease;\n -ms-flex-item-align: start;\n align-self: flex-start;\n}\n.Toastify__close-button--light {\n color: #000;\n opacity: 0.3;\n}\n.Toastify__close-button > svg {\n fill: currentColor;\n height: 16px;\n width: 14px;\n}\n.Toastify__close-button:hover, .Toastify__close-button:focus {\n opacity: 1;\n}\n\n@keyframes Toastify__trackProgress {\n 0% {\n transform: scaleX(1);\n }\n 100% {\n transform: scaleX(0);\n }\n}\n.Toastify__progress-bar {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 5px;\n z-index: var(--toastify-z-index);\n opacity: 0.7;\n transform-origin: left;\n}\n.Toastify__progress-bar--animated {\n animation: Toastify__trackProgress linear 1 forwards;\n}\n.Toastify__progress-bar--controlled {\n transition: transform 0.2s;\n}\n.Toastify__progress-bar--rtl {\n right: 0;\n left: initial;\n transform-origin: right;\n}\n\n.Toastify__spinner {\n width: 20px;\n height: 20px;\n box-sizing: border-box;\n border: 2px solid;\n border-radius: 100%;\n border-color: var(--toastify-spinner-color-empty-area);\n border-right-color: var(--toastify-spinner-color);\n animation: Toastify__spin 0.65s linear infinite;\n}\n\n@keyframes Toastify__bounceInRight {\n from, 60%, 75%, 90%, to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n from {\n opacity: 0;\n transform: translate3d(3000px, 0, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(-25px, 0, 0);\n }\n 75% {\n transform: translate3d(10px, 0, 0);\n }\n 90% {\n transform: translate3d(-5px, 0, 0);\n }\n to {\n transform: none;\n }\n}\n@keyframes Toastify__bounceOutRight {\n 20% {\n opacity: 1;\n transform: translate3d(-20px, 0, 0);\n }\n to {\n opacity: 0;\n transform: translate3d(2000px, 0, 0);\n }\n}\n@keyframes Toastify__bounceInLeft {\n from, 60%, 75%, 90%, to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n 0% {\n opacity: 0;\n transform: translate3d(-3000px, 0, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(25px, 0, 0);\n }\n 75% {\n transform: translate3d(-10px, 0, 0);\n }\n 90% {\n transform: translate3d(5px, 0, 0);\n }\n to {\n transform: none;\n }\n}\n@keyframes Toastify__bounceOutLeft {\n 20% {\n opacity: 1;\n transform: translate3d(20px, 0, 0);\n }\n to {\n opacity: 0;\n transform: translate3d(-2000px, 0, 0);\n }\n}\n@keyframes Toastify__bounceInUp {\n from, 60%, 75%, 90%, to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n from {\n opacity: 0;\n transform: translate3d(0, 3000px, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(0, -20px, 0);\n }\n 75% {\n transform: translate3d(0, 10px, 0);\n }\n 90% {\n transform: translate3d(0, -5px, 0);\n }\n to {\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes Toastify__bounceOutUp {\n 20% {\n transform: translate3d(0, -10px, 0);\n }\n 40%, 45% {\n opacity: 1;\n transform: translate3d(0, 20px, 0);\n }\n to {\n opacity: 0;\n transform: translate3d(0, -2000px, 0);\n }\n}\n@keyframes Toastify__bounceInDown {\n from, 60%, 75%, 90%, to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n 0% {\n opacity: 0;\n transform: translate3d(0, -3000px, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(0, 25px, 0);\n }\n 75% {\n transform: translate3d(0, -10px, 0);\n }\n 90% {\n transform: translate3d(0, 5px, 0);\n }\n to {\n transform: none;\n }\n}\n@keyframes Toastify__bounceOutDown {\n 20% {\n transform: translate3d(0, 10px, 0);\n }\n 40%, 45% {\n opacity: 1;\n transform: translate3d(0, -20px, 0);\n }\n to {\n opacity: 0;\n transform: translate3d(0, 2000px, 0);\n }\n}\n.Toastify__bounce-enter--top-left, .Toastify__bounce-enter--bottom-left {\n animation-name: Toastify__bounceInLeft;\n}\n.Toastify__bounce-enter--top-right, .Toastify__bounce-enter--bottom-right {\n animation-name: Toastify__bounceInRight;\n}\n.Toastify__bounce-enter--top-center {\n animation-name: Toastify__bounceInDown;\n}\n.Toastify__bounce-enter--bottom-center {\n animation-name: Toastify__bounceInUp;\n}\n\n.Toastify__bounce-exit--top-left, .Toastify__bounce-exit--bottom-left {\n animation-name: Toastify__bounceOutLeft;\n}\n.Toastify__bounce-exit--top-right, .Toastify__bounce-exit--bottom-right {\n animation-name: Toastify__bounceOutRight;\n}\n.Toastify__bounce-exit--top-center {\n animation-name: Toastify__bounceOutUp;\n}\n.Toastify__bounce-exit--bottom-center {\n animation-name: Toastify__bounceOutDown;\n}\n\n@keyframes Toastify__zoomIn {\n from {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n 50% {\n opacity: 1;\n }\n}\n@keyframes Toastify__zoomOut {\n from {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n to {\n opacity: 0;\n }\n}\n.Toastify__zoom-enter {\n animation-name: Toastify__zoomIn;\n}\n\n.Toastify__zoom-exit {\n animation-name: Toastify__zoomOut;\n}\n\n@keyframes Toastify__flipIn {\n from {\n transform: perspective(400px) rotate3d(1, 0, 0, 90deg);\n animation-timing-function: ease-in;\n opacity: 0;\n }\n 40% {\n transform: perspective(400px) rotate3d(1, 0, 0, -20deg);\n animation-timing-function: ease-in;\n }\n 60% {\n transform: perspective(400px) rotate3d(1, 0, 0, 10deg);\n opacity: 1;\n }\n 80% {\n transform: perspective(400px) rotate3d(1, 0, 0, -5deg);\n }\n to {\n transform: perspective(400px);\n }\n}\n@keyframes Toastify__flipOut {\n from {\n transform: perspective(400px);\n }\n 30% {\n transform: perspective(400px) rotate3d(1, 0, 0, -20deg);\n opacity: 1;\n }\n to {\n transform: perspective(400px) rotate3d(1, 0, 0, 90deg);\n opacity: 0;\n }\n}\n.Toastify__flip-enter {\n animation-name: Toastify__flipIn;\n}\n\n.Toastify__flip-exit {\n animation-name: Toastify__flipOut;\n}\n\n@keyframes Toastify__slideInRight {\n from {\n transform: translate3d(110%, 0, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes Toastify__slideInLeft {\n from {\n transform: translate3d(-110%, 0, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes Toastify__slideInUp {\n from {\n transform: translate3d(0, 110%, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes Toastify__slideInDown {\n from {\n transform: translate3d(0, -110%, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes Toastify__slideOutRight {\n from {\n transform: translate3d(0, 0, 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(110%, 0, 0);\n }\n}\n@keyframes Toastify__slideOutLeft {\n from {\n transform: translate3d(0, 0, 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(-110%, 0, 0);\n }\n}\n@keyframes Toastify__slideOutDown {\n from {\n transform: translate3d(0, 0, 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(0, 500px, 0);\n }\n}\n@keyframes Toastify__slideOutUp {\n from {\n transform: translate3d(0, 0, 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(0, -500px, 0);\n }\n}\n.Toastify__slide-enter--top-left, .Toastify__slide-enter--bottom-left {\n animation-name: Toastify__slideInLeft;\n}\n.Toastify__slide-enter--top-right, .Toastify__slide-enter--bottom-right {\n animation-name: Toastify__slideInRight;\n}\n.Toastify__slide-enter--top-center {\n animation-name: Toastify__slideInDown;\n}\n.Toastify__slide-enter--bottom-center {\n animation-name: Toastify__slideInUp;\n}\n\n.Toastify__slide-exit--top-left, .Toastify__slide-exit--bottom-left {\n animation-name: Toastify__slideOutLeft;\n}\n.Toastify__slide-exit--top-right, .Toastify__slide-exit--bottom-right {\n animation-name: Toastify__slideOutRight;\n}\n.Toastify__slide-exit--top-center {\n animation-name: Toastify__slideOutUp;\n}\n.Toastify__slide-exit--bottom-center {\n animation-name: Toastify__slideOutDown;\n}\n\n@keyframes Toastify__spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}",""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(327),i=n(146),o=n(149),s=function(){function e(e,t){var n=this;this.result={},this.animationFrameRequestId=null,this.rol=new r.default((function(r){n.animationFrameRequestId=window.requestAnimationFrame((function(){var s=i.default(e)(r);o.default(n.result,s)||(t(s),n.result=s)}))}))}return e.prototype.observe=function(e){this.rol.observe(e)},e.prototype.disconnect=function(){this.animationFrameRequestId&&window.cancelAnimationFrame(this.animationFrameRequestId),this.rol.disconnect()},e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(328),i=function(){function e(e){var t=this;this.handler=e,this.listenedElement=null,this.hasResizeObserver=void 0!==window.ResizeObserver,this.hasResizeObserver?this.rz=new ResizeObserver((function(e){t.handler(o(e[0].target))})):this.erd=r({strategy:"scroll"})}return e.prototype.observe=function(e){var t=this;this.listenedElement!==e&&(this.listenedElement&&this.disconnect(),e&&(this.hasResizeObserver?this.rz.observe(e):this.erd.listenTo(e,(function(e){t.handler(o(e))}))),this.listenedElement=e)},e.prototype.disconnect=function(){this.listenedElement&&(this.hasResizeObserver?this.rz.disconnect():this.erd.uninstall(this.listenedElement),this.listenedElement=null)},e}();function o(e){return{width:s(window.getComputedStyle(e).width),height:s(window.getComputedStyle(e).height)}}function s(e){var t=/^([0-9\.]+)px$/.exec(e);return t?parseFloat(t[1]):0}t.default=i},function(e,t,n){"use strict";var r=n(147).forEach,i=n(329),o=n(330),s=n(331),a=n(332),l=n(333),c=n(148),u=n(334),d=n(336),h=n(337),p=n(338);function f(e){return Array.isArray(e)||void 0!==e.length}function m(e){if(Array.isArray(e))return e;var t=[];return r(e,(function(e){t.push(e)})),t}function g(e){return e&&1===e.nodeType}function b(e,t,n){var r=e[t];return null==r&&void 0!==n?n:r}e.exports=function(e){var t;if((e=e||{}).idHandler)t={get:function(t){return e.idHandler.get(t,!0)},set:e.idHandler.set};else{var n=s(),v=a({idGenerator:n,stateHandler:d});t=v}var y=e.reporter;y||(y=l(!1===y));var S=b(e,"batchProcessor",u({reporter:y})),_={};_.callOnAdd=!!b(e,"callOnAdd",!0),_.debug=!!b(e,"debug",!1);var x,w=o(t),k=i({stateHandler:d}),O=b(e,"strategy","object"),E={reporter:y,batchProcessor:S,stateHandler:d,idHandler:t};if("scroll"===O&&(c.isLegacyOpera()?(y.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),O="object"):c.isIE(9)&&(y.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),O="object")),"scroll"===O)x=p(E);else{if("object"!==O)throw new Error("Invalid strategy name: "+O);x=h(E)}var A={};return{listenTo:function(e,n,i){function o(e){var t=w.get(e);r(t,(function(t){t(e)}))}function s(e,t,n){w.add(t,n),e&&n(t)}if(i||(i=n,n=e,e={}),!n)throw new Error("At least one element required.");if(!i)throw new Error("Listener required.");if(g(n))n=[n];else{if(!f(n))return y.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");n=m(n)}var a=0,l=b(e,"callOnAdd",_.callOnAdd),c=b(e,"onReady",(function(){})),u=b(e,"debug",_.debug);r(n,(function(e){d.getState(e)||(d.initState(e),t.set(e));var h=t.get(e);if(u&&y.log("Attaching listener to element",h,e),!k.isDetectable(e))return u&&y.log(h,"Not detectable."),k.isBusy(e)?(u&&y.log(h,"System busy making it detectable"),s(l,e,i),A[h]=A[h]||[],void A[h].push((function(){++a===n.length&&c()}))):(u&&y.log(h,"Making detectable..."),k.markBusy(e,!0),x.makeDetectable({debug:u},e,(function(e){if(u&&y.log(h,"onElementDetectable"),d.getState(e)){k.markAsDetectable(e),k.markBusy(e,!1),x.addListener(e,o),s(l,e,i);var t=d.getState(e);if(t&&t.startSize){var p=e.offsetWidth,f=e.offsetHeight;t.startSize.width===p&&t.startSize.height===f||o(e)}A[h]&&r(A[h],(function(e){e()}))}else u&&y.log(h,"Element uninstalled before being detectable.");delete A[h],++a===n.length&&c()})));u&&y.log(h,"Already detecable, adding listener."),s(l,e,i),a++})),a===n.length&&c()},removeListener:w.removeListener,removeAllListeners:w.removeAllListeners,uninstall:function(e){if(!e)return y.error("At least one element is required.");if(g(e))e=[e];else{if(!f(e))return y.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");e=m(e)}r(e,(function(e){w.removeAllListeners(e),x.uninstall(e),d.cleanState(e)}))}}}},function(e,t,n){"use strict";e.exports=function(e){var t=e.stateHandler.getState;return{isDetectable:function(e){var n=t(e);return n&&!!n.isDetectable},markAsDetectable:function(e){t(e).isDetectable=!0},isBusy:function(e){return!!t(e).busy},markBusy:function(e,n){t(e).busy=!!n}}}},function(e,t,n){"use strict";e.exports=function(e){var t={};function n(n){var r=e.get(n);return void 0===r?[]:t[r]||[]}return{get:n,add:function(n,r){var i=e.get(n);t[i]||(t[i]=[]),t[i].push(r)},removeListener:function(e,t){for(var r=n(e),i=0,o=r.length;i<o;++i)if(r[i]===t){r.splice(i,1);break}},removeAllListeners:function(e){var t=n(e);t&&(t.length=0)}}}},function(e,t,n){"use strict";e.exports=function(){var e=1;return{generate:function(){return e++}}}},function(e,t,n){"use strict";e.exports=function(e){var t=e.idGenerator,n=e.stateHandler.getState;return{get:function(e){var t=n(e);return t&&void 0!==t.id?t.id:null},set:function(e){var r=n(e);if(!r)throw new Error("setId required the element to have a resize detection state.");var i=t.generate();return r.id=i,i}}}},function(e,t,n){"use strict";e.exports=function(e){function t(){}var n={log:t,warn:t,error:t};if(!e&&window.console){var r=function(e,t){e[t]=function(){var e=console[t];if(e.apply)e.apply(console,arguments);else for(var n=0;n<arguments.length;n++)e(arguments[n])}};r(n,"log"),r(n,"warn"),r(n,"error")}return n}},function(e,t,n){"use strict";var r=n(335);function i(){var e={},t=0,n=0,r=0;return{add:function(i,o){o||(o=i,i=0),i>n?n=i:i<r&&(r=i),e[i]||(e[i]=[]),e[i].push(o),t++},process:function(){for(var t=r;t<=n;t++)for(var i=e[t],o=0;o<i.length;o++){(0,i[o])()}},size:function(){return t}}}e.exports=function(e){var t=(e=e||{}).reporter,n=r.getOption(e,"async",!0),o=r.getOption(e,"auto",!0);o&&!n&&(t&&t.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),n=!0);var s,a=i(),l=!1;function c(){for(l=!0;a.size();){var e=a;a=i(),e.process()}l=!1}function u(){var e;e=c,s=setTimeout(e,0)}return{add:function(e,t){!l&&o&&n&&0===a.size()&&u(),a.add(e,t)},force:function(e){l||(void 0===e&&(e=n),s&&(clearTimeout(s),s=null),e?u():c())}}}},function(e,t,n){"use strict";(e.exports={}).getOption=function(e,t,n){var r=e[t];if(null==r&&void 0!==n)return n;return r}},function(e,t,n){"use strict";function r(e){return e._erd}e.exports={initState:function(e){return e._erd={},r(e)},getState:r,cleanState:function(e){delete e._erd}}},function(e,t,n){"use strict";var r=n(148);e.exports=function(e){var t=(e=e||{}).reporter,n=e.batchProcessor,i=e.stateHandler.getState;if(!t)throw new Error("Missing required dependency: reporter.");function o(e){return i(e).object}return{makeDetectable:function(e,o,s){s||(s=o,o=e,e=null),(e=e||{}).debug,r.isIE(8)?s(o):function(e,o){var s=!1,a=window.getComputedStyle(e),l=e.offsetWidth,c=e.offsetHeight;function u(){function n(){if("static"===a.position){e.style.position="relative";var n=function(e,t,n,r){var i=n[r];"auto"!==i&&"0"!==function(e){return e.replace(/[^-\d\.]/g,"")}(i)&&(e.warn("An element that is positioned static has style."+r+"="+i+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+r+" will be set to 0. Element: ",t),t.style[r]=0)};n(t,e,a,"top"),n(t,e,a,"right"),n(t,e,a,"bottom"),n(t,e,a,"left")}}""!==a.position&&(n(),s=!0);var l=document.createElement("object");l.style.cssText="display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; padding: 0; margin: 0; opacity: 0; z-index: -1000; pointer-events: none;",l.tabIndex=-1,l.type="text/html",l.onload=function(){s||n(),function e(t,n){t.contentDocument?n(t.contentDocument):setTimeout((function(){e(t,n)}),100)}(this,(function(t){o(e)}))},r.isIE()||(l.data="about:blank"),e.appendChild(l),i(e).object=l,r.isIE()&&(l.data="about:blank")}i(e).startSize={width:l,height:c},n?n.add(u):u()}(o,s)},addListener:function(e,t){if(!o(e))throw new Error("Element is not detectable by this strategy.");function n(){t(e)}r.isIE(8)?(i(e).object={proxy:n},e.attachEvent("onresize",n)):o(e).contentDocument.defaultView.addEventListener("resize",n)},uninstall:function(e){r.isIE(8)?e.detachEvent("onresize",i(e).object.proxy):e.removeChild(o(e)),delete i(e).object}}}},function(e,t,n){"use strict";var r=n(147).forEach;e.exports=function(e){var t=(e=e||{}).reporter,n=e.batchProcessor,i=e.stateHandler.getState,o=(e.stateHandler.hasState,e.idHandler);if(!n)throw new Error("Missing required dependency: batchProcessor");if(!t)throw new Error("Missing required dependency: reporter.");var s=function(){var e=document.createElement("div");e.style.cssText="position: absolute; width: 1000px; height: 1000px; visibility: hidden; margin: 0; padding: 0;";var t=document.createElement("div");t.style.cssText="position: absolute; width: 500px; height: 500px; overflow: scroll; visibility: none; top: -1500px; left: -1500px; visibility: hidden; margin: 0; padding: 0;",t.appendChild(e),document.body.insertBefore(t,document.body.firstChild);var n=500-t.clientWidth,r=500-t.clientHeight;return document.body.removeChild(t),{width:n,height:r}}();function a(e,n,r){if(e.addEventListener)e.addEventListener(n,r);else{if(!e.attachEvent)return t.error("[scroll] Don't know how to add event listeners.");e.attachEvent("on"+n,r)}}function l(e,n,r){if(e.removeEventListener)e.removeEventListener(n,r);else{if(!e.detachEvent)return t.error("[scroll] Don't know how to remove event listeners.");e.detachEvent("on"+n,r)}}function c(e){return i(e).container.childNodes[0].childNodes[0].childNodes[0]}function u(e){return i(e).container.childNodes[0].childNodes[0].childNodes[1]}return function(e,t){if(!document.getElementById(e)){var n=t+"_animation",r="/* Created by the element-resize-detector library. */\n";r+="."+t+" > div::-webkit-scrollbar { display: none; }\n\n",r+="."+(t+"_animation_active")+" { -webkit-animation-duration: 0.1s; animation-duration: 0.1s; -webkit-animation-name: "+n+"; animation-name: "+n+"; }\n",r+="@-webkit-keyframes "+n+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n",function(t,n){n=n||function(e){document.head.appendChild(e)};var r=document.createElement("style");r.innerHTML=t,r.id=e,n(r)}(r+="@keyframes "+n+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }")}}("erd_scroll_detection_scrollbar_style","erd_scroll_detection_container"),{makeDetectable:function(e,l,d){function h(){if(e.debug){var n=Array.prototype.slice.call(arguments);if(n.unshift(o.get(l),"Scroll: "),t.log.apply)t.log.apply(null,n);else for(var r=0;r<n.length;r++)t.log(n[r])}}function p(e){var t=i(e).container.childNodes[0],n=getComputedStyle(t);return!n.width||-1===n.width.indexOf("px")}function f(){var e=getComputedStyle(l),t={};return t.position=e.position,t.width=l.offsetWidth,t.height=l.offsetHeight,t.top=e.top,t.right=e.right,t.bottom=e.bottom,t.left=e.left,t.widthCSS=e.width,t.heightCSS=e.height,t}function m(){if(h("storeStyle invoked."),i(l)){var e=f();i(l).style=e}else h("Aborting because element has been uninstalled")}function g(e,t,n){i(e).lastWidth=t,i(e).lastHeight=n}function b(){return 2*s.width+1}function v(){return 2*s.height+1}function y(e){return e+10+b()}function S(e){return e+10+v()}function _(e,t,n){var r=c(e),i=u(e),o=y(t),s=S(n),a=function(e){return 2*e+b()}(t),l=function(e){return 2*e+v()}(n);r.scrollLeft=o,r.scrollTop=s,i.scrollLeft=a,i.scrollTop=l}function x(){var e=i(l).container;if(!e){(e=document.createElement("div")).className="erd_scroll_detection_container",e.style.cssText="visibility: hidden; display: inline; width: 0px; height: 0px; z-index: -1; overflow: hidden; margin: 0; padding: 0;",i(l).container=e,function(e){e.className+=" erd_scroll_detection_container_animation_active"}(e),l.appendChild(e);var t=function(){i(l).onRendered&&i(l).onRendered()};a(e,"animationstart",t),i(l).onAnimationStart=t}return e}function w(){if(h("Injecting elements"),i(l)){!function(){var e=i(l).style;if("static"===e.position){l.style.position="relative";var n=function(e,t,n,r){var i=n[r];"auto"!==i&&"0"!==function(e){return e.replace(/[^-\d\.]/g,"")}(i)&&(e.warn("An element that is positioned static has style."+r+"="+i+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+r+" will be set to 0. Element: ",t),t.style[r]=0)};n(t,l,e,"top"),n(t,l,e,"right"),n(t,l,e,"bottom"),n(t,l,e,"left")}}();var e=i(l).container;e||(e=x());var n,r,o,c,u=s.width,d=s.height,p="position: absolute; flex: none; overflow: hidden; z-index: -1; visibility: hidden; "+("left: "+(n=(n=-(1+u))?n+"px":"0")+"; top: "+(r=(r=-(1+d))?r+"px":"0")+"; right: "+(c=(c=-u)?c+"px":"0")+"; bottom: "+(o=(o=-d)?o+"px":"0")+";"),f=document.createElement("div"),m=document.createElement("div"),g=document.createElement("div"),b=document.createElement("div"),v=document.createElement("div"),y=document.createElement("div");f.dir="ltr",f.style.cssText="position: absolute; flex: none; overflow: hidden; z-index: -1; visibility: hidden; width: 100%; height: 100%; left: 0px; top: 0px;",f.className="erd_scroll_detection_container",m.className="erd_scroll_detection_container",m.style.cssText=p,g.style.cssText="position: absolute; flex: none; overflow: scroll; z-index: -1; visibility: hidden; width: 100%; height: 100%;",b.style.cssText="position: absolute; left: 0; top: 0;",v.style.cssText="position: absolute; flex: none; overflow: scroll; z-index: -1; visibility: hidden; width: 100%; height: 100%;",y.style.cssText="position: absolute; width: 200%; height: 200%;",g.appendChild(b),v.appendChild(y),m.appendChild(g),m.appendChild(v),f.appendChild(m),e.appendChild(f),a(g,"scroll",S),a(v,"scroll",_),i(l).onExpandScroll=S,i(l).onShrinkScroll=_}else h("Aborting because element has been uninstalled");function S(){i(l).onExpand&&i(l).onExpand()}function _(){i(l).onShrink&&i(l).onShrink()}}function k(){function s(e,t,n){var r=function(e){return c(e).childNodes[0]}(e),i=y(t),o=S(n);r.style.width=i+"px",r.style.height=o+"px"}function a(r){var a=l.offsetWidth,c=l.offsetHeight;h("Storing current size",a,c),g(l,a,c),n.add(0,(function(){if(i(l))if(d()){if(e.debug){var n=l.offsetWidth,r=l.offsetHeight;n===a&&r===c||t.warn(o.get(l),"Scroll: Size changed before updating detector elements.")}s(l,a,c)}else h("Aborting because element container has not been initialized");else h("Aborting because element has been uninstalled")})),n.add(1,(function(){i(l)?d()?_(l,a,c):h("Aborting because element container has not been initialized"):h("Aborting because element has been uninstalled")})),r&&n.add(2,(function(){i(l)?d()?r():h("Aborting because element container has not been initialized"):h("Aborting because element has been uninstalled")}))}function d(){return!!i(l).container}function f(){h("notifyListenersIfNeeded invoked");var e=i(l);return void 0===i(l).lastNotifiedWidth&&e.lastWidth===e.startSize.width&&e.lastHeight===e.startSize.height?h("Not notifying: Size is the same as the start size, and there has been no notification yet."):e.lastWidth===e.lastNotifiedWidth&&e.lastHeight===e.lastNotifiedHeight?h("Not notifying: Size already notified"):(h("Current size not notified, notifying..."),e.lastNotifiedWidth=e.lastWidth,e.lastNotifiedHeight=e.lastHeight,void r(i(l).listeners,(function(e){e(l)})))}function m(){if(h("Scroll detected."),p(l))h("Scroll event fired while unrendered. Ignoring...");else{var e=l.offsetWidth,t=l.offsetHeight;e!==i(l).lastWidth||t!==i(l).lastHeight?(h("Element size changed."),a(f)):h("Element size has not changed ("+e+"x"+t+").")}}if(h("registerListenersAndPositionElements invoked."),i(l)){i(l).onRendered=function(){if(h("startanimation triggered."),p(l))h("Ignoring since element is still unrendered...");else{h("Element rendered.");var e=c(l),t=u(l);0!==e.scrollLeft&&0!==e.scrollTop&&0!==t.scrollLeft&&0!==t.scrollTop||(h("Scrollbars out of sync. Updating detector elements..."),a(f))}},i(l).onExpand=m,i(l).onShrink=m;var b=i(l).style;s(l,b.width,b.height)}else h("Aborting because element has been uninstalled")}function O(){if(h("finalizeDomMutation invoked."),i(l)){var e=i(l).style;g(l,e.width,e.height),_(l,e.width,e.height)}else h("Aborting because element has been uninstalled")}function E(){d(l)}function A(){var e;h("Installing..."),i(l).listeners=[],e=f(),i(l).startSize={width:e.width,height:e.height},h("Element start size",i(l).startSize),n.add(0,m),n.add(1,w),n.add(2,k),n.add(3,O),n.add(4,E)}d||(d=l,l=e,e=null),e=e||{},h("Making detectable..."),!function(e){return!function(e){return e===e.ownerDocument.body||e.ownerDocument.body.contains(e)}(e)||null===getComputedStyle(e)}(l)?A():(h("Element is detached"),x(),h("Waiting until element is attached..."),i(l).onRendered=function(){h("Element is now attached"),A()})},addListener:function(e,t){if(!i(e).listeners.push)throw new Error("Cannot add listener to an element that is not detectable.");i(e).listeners.push(t)},uninstall:function(e){var t=i(e);t&&(t.onExpandScroll&&l(c(e),"scroll",t.onExpandScroll),t.onShrinkScroll&&l(u(e),"scroll",t.onShrinkScroll),t.onAnimationStart&&l(t.container,"animationstart",t.onAnimationStart),t.container&&e.removeChild(t.container))}}}},function(e,t,n){var r=n(34).default;e.exports=function(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(344);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){(function(e){(function(){"use strict";var t,n=n||{};n.scope={},n.ASSUME_ES5=!1,n.ASSUME_NO_NATIVE_MAP=!1,n.ASSUME_NO_NATIVE_SET=!1,n.SIMPLE_FROUND_POLYFILL=!1,n.defineProperty=n.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){e!=Array.prototype&&e!=Object.prototype&&(e[t]=n.value)},n.getGlobal=function(t){return"undefined"!=typeof window&&window===t?t:void 0!==e&&null!=e?e:t},n.global=n.getGlobal(this),n.polyfill=function(e,t,r,i){if(t){for(r=n.global,e=e.split("."),i=0;i<e.length-1;i++){var o=e[i];o in r||(r[o]={}),r=r[o]}(t=t(i=r[e=e[e.length-1]]))!=i&&null!=t&&n.defineProperty(r,e,{configurable:!0,writable:!0,value:t})}},n.polyfill("Array.prototype.includes",(function(e){return e||function(e,t){var n=this;n instanceof String&&(n=String(n));var r=n.length;for(0>(t=t||0)&&(t=Math.max(t+r,0));t<r;t++){var i=n[t];if(i===e||Object.is(i,e))return!0}return!1}}),"es7","es3"),n.owns=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.polyfill("Object.entries",(function(e){return e||function(e){var t,r=[];for(t in e)n.owns(e,t)&&r.push([t,e[t]]);return r}}),"es8","es3"),n.checkStringArgs=function(e,t,n){if(null==e)throw new TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""},n.stringPadding=function(e,t){return e=void 0!==e?String(e):" ",0<t&&e?e.repeat(Math.ceil(t/e.length)).substring(0,t):""},n.polyfill("String.prototype.padStart",(function(e){return e||function(e,t){var r=n.checkStringArgs(this,null,"padStart");return n.stringPadding(t,e-r.length)+r}}),"es8","es3"),n.polyfill("Object.values",(function(e){return e||function(e){var t,r=[];for(t in e)n.owns(e,t)&&r.push(e[t]);return r}}),"es8","es3"),n.arrayIteratorImpl=function(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}},n.arrayIterator=function(e){return{next:n.arrayIteratorImpl(e)}},n.SYMBOL_PREFIX="jscomp_symbol_",n.initSymbol=function(){n.initSymbol=function(){},n.global.Symbol||(n.global.Symbol=n.Symbol)},n.SymbolClass=function(e,t){this.$jscomp$symbol$id_=e,n.defineProperty(this,"description",{configurable:!0,writable:!0,value:t})},n.SymbolClass.prototype.toString=function(){return this.$jscomp$symbol$id_},n.Symbol=(t=0,function e(r){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return new n.SymbolClass(n.SYMBOL_PREFIX+(r||"")+"_"+t++,r)}),n.initSymbolIterator=function(){n.initSymbol();var e=n.global.Symbol.iterator;e||(e=n.global.Symbol.iterator=n.global.Symbol("Symbol.iterator")),"function"!=typeof Array.prototype[e]&&n.defineProperty(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return n.iteratorPrototype(n.arrayIteratorImpl(this))}}),n.initSymbolIterator=function(){}},n.initSymbolAsyncIterator=function(){n.initSymbol();var e=n.global.Symbol.asyncIterator;e||(e=n.global.Symbol.asyncIterator=n.global.Symbol("Symbol.asyncIterator")),n.initSymbolAsyncIterator=function(){}},n.iteratorPrototype=function(e){return n.initSymbolIterator(),(e={next:e})[n.global.Symbol.iterator]=function(){return this},e},n.iteratorFromArray=function(e,t){n.initSymbolIterator(),e instanceof String&&(e+="");var r=0,i={next:function(){if(r<e.length){var n=r++;return{value:t(n,e[n]),done:!1}}return i.next=function(){return{done:!0,value:void 0}},i.next()}};return i[Symbol.iterator]=function(){return i},i},n.polyfill("Array.prototype.values",(function(e){return e||function(){return n.iteratorFromArray(this,(function(e,t){return t}))}}),"es8","es3"),function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n||4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)t.d(r,i,function(t){return e[t]}.bind(null,i));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=1)}([function(e,t){t=function(){return this}();try{t=t||new Function("return this")()}catch(e){"object"==typeof window&&(t=window)}e.exports=t},function(e,t,n){n(2),Sk.global.strftime=n(3),Sk.global.strptime=n(4),n(5),n(7),n(9),n(10),n(11),n(12),n(13),n(14),n(15),n(16),n(17),n(18),[Sk.builtin.object,Sk.builtin.type].forEach(e=>{Sk.abstr.setUpSlots(e),Sk.abstr.setUpMethods(e),Sk.abstr.setUpGetSets(e)}),n(19),n(20),n(21),[Sk.builtin.str,Sk.builtin.none,Sk.builtin.NotImplemented,Sk.builtin.object].forEach(e=>{(e=e.prototype).__doc__=e.hasOwnProperty("tp$doc")?new Sk.builtin.str(e.tp$doc):Sk.builtin.none.none$}),n(22),n(23),n(24),n(25),n(26),n(27),n(28),n(29),n(31),n(32),n(33),n(34),n(35),n(36),n(37),n(38),n(39),n(40),n(41),n(42),n(43),n(44),n(45),n(46),n(47),n(48),n(49),n(50),n(51),n(52),n(53),n(54),n(55),n(56),n(57),n(58),n(59),n(60),n(61),n(62),n(63),n(64),n(65)},function(e,t,n){(function(e){var t={build:{githash:"e3c1c1a4e081362d96ba8afc5997be516b437f30",date:"2021-03-25T11:36:32.075Z"}};t.global=void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t.exportSymbol=function(e,n){e=e.split(".");var r,i=t.global;for(r=0;r<e.length-1;r++){var o=e[r];i=i.hasOwnProperty(o)?i[o]:i[o]={}}void 0!==n&&(i[o=e[r]]=n)},t.isArrayLike=function(e){return!!(e instanceof Array||e&&e.length&&"number"==typeof e.length)},t.js_beautify=function(e){return e},t.exportSymbol("Sk",t),t.exportSymbol("Sk.global",t.global),t.exportSymbol("Sk.build",t.build),t.exportSymbol("Sk.exportSymbol",t.exportSymbol),t.exportSymbol("Sk.isArrayLike",t.isArrayLike),t.exportSymbol("Sk.js_beautify",t.js_beautify)}).call(this,n(0))},function(e,t){!function(){function t(e,t){return""===t||9<e?e:(null==t&&(t="0"),t+e)}function n(e){return 99<e?e:9<e?"0"+e:"00"+e}function r(e){return 0===e?12:12<e?e-12:e}function i(e,t){t=t||"sunday";var n=e.getDay();return"monday"===t&&(0===n?n=6:n--),t=Date.UTC(e.getFullYear(),0,1),e=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),Math.floor((Math.floor((e-t)/864e5)+7-n)/7)}function o(e){var t=e%10;if(11<=(e%=100)&&13>=e||0===t||4<=t)return"th";switch(t){case 1:return"st";case 2:return"nd";case 3:return"rd"}}function s(e){"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(e)}var a={de_DE:{days:"Sonntag Montag Dienstag Mittwoch Donnerstag Freitag Samstag".split(" "),shortDays:"So Mo Di Mi Do Fr Sa".split(" "),months:"Januar Februar März April Mai Juni Juli August September Oktober November Dezember".split(" "),shortMonths:"Jan Feb Mär Apr Mai Jun Jul Aug Sep Okt Nov Dez".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d.%m.%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},en_CA:{days:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),shortDays:"Sun Mon Tue Wed Thu Fri Sat".split(" "),months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),ordinalSuffixes:"st nd rd th th th th th th th th th th th th th th th th th st nd rd th th th th th th th st".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d/%m/%y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%r",x:"%D"}},en_US:{days:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),shortDays:"Sun Mon Tue Wed Thu Fri Sat".split(" "),months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),ordinalSuffixes:"st nd rd th th th th th th th th th th th th th th th th th st nd rd th th th th th th th st".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%m/%d/%y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%r",x:"%D"}},es_MX:{days:"domingo lunes martes miércoles jueves viernes sábado".split(" "),shortDays:"dom lun mar mié jue vie sáb".split(" "),months:"enero;febrero;marzo;abril;mayo;junio;julio;agosto;septiembre;octubre;noviembre; diciembre".split(";"),shortMonths:"ene feb mar abr may jun jul ago sep oct nov dic".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d/%m/%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},fr_FR:{days:"dimanche lundi mardi mercredi jeudi vendredi samedi".split(" "),shortDays:"dim. lun. mar. mer. jeu. ven. sam.".split(" "),months:"janvier février mars avril mai juin juillet août septembre octobre novembre décembre".split(" "),shortMonths:"janv. févr. mars avril mai juin juil. août sept. oct. nov. déc.".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d/%m/%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},it_IT:{days:"domenica lunedì martedì mercoledì giovedì venerdì sabato".split(" "),shortDays:"dom lun mar mer gio ven sab".split(" "),months:"gennaio febbraio marzo aprile maggio giugno luglio agosto settembre ottobre novembre dicembre".split(" "),shortMonths:"pr mag giu lug ago set ott nov dic".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d/%m/%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},nl_NL:{days:"zondag maandag dinsdag woensdag donderdag vrijdag zaterdag".split(" "),shortDays:"zo ma di wo do vr za".split(" "),months:"januari februari maart april mei juni juli augustus september oktober november december".split(" "),shortMonths:"jan feb mrt apr mei jun jul aug sep okt nov dec".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d-%m-%y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},pt_BR:{days:"domingo segunda terça quarta quinta sexta sábado".split(" "),shortDays:"Dom Seg Ter Qua Qui Sex Sáb".split(" "),months:"janeiro fevereiro março abril maio junho julho agosto setembro outubro novembro dezembro".split(" "),shortMonths:"Jan Fev Mar Abr Mai Jun Jul Ago Set Out Nov Dez".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d-%m-%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},ru_RU:{days:"Воскресенье Понедельник Вторник Среда Четверг Пятница Суббота".split(" "),shortDays:"Вс Пн Вт Ср Чт Пт Сб".split(" "),months:"Январь Февраль Март Апрель Май Июнь Июль Август Сентябрь Октябрь Ноябрь Декабрь".split(" "),shortMonths:"янв фев мар апр май июн июл авг сен окт ноя дек".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X",D:"%d.%m.%y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},tr_TR:{days:"Pazar Pazartesi Salı Çarşamba Perşembe Cuma Cumartesi".split(" "),shortDays:"Paz Pzt Sal Çrş Prş Cum Cts".split(" "),months:"Ocak Şubat Mart Nisan Mayıs Haziran Temmuz Ağustos Eylül Ekim Kasım Aralık".split(" "),shortMonths:"Oca Şub Mar Nis May Haz Tem Ağu Eyl Eki Kas Ara".split(" "),AM:"ÖÖ",PM:"ÖS",am:"ÖÖ",pm:"ÖS",formats:{c:"%a %d %b %Y %X %Z",D:"%d-%m-%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},zh_CN:{days:"星期日 星期一 星期二 星期三 星期四 星期五 星期六".split(" "),shortDays:"日一二三四五六".split(""),months:"一月份 二月份 三月份 四月份 五月份 六月份 七月份 八月份 九月份 十月份 十一月份 十二月份".split(" "),shortMonths:"一月 二月 三月 四月 五月 六月 七月 八月 九月 十月 十一月 十二月".split(" "),AM:"上午",PM:"下午",am:"上午",pm:"下午",formats:{c:"%a %d %b %Y %X %Z",D:"%d/%m/%y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%r",x:"%D"}}},l=a.en_US,c=new function e(c,u,d){function h(e,a,l,c){for(var u="",d=null,p=!1,f=e.length,b=!1,v=0;v<f;v++){var y=e.charCodeAt(v);if(!0===p)if(45===y)d="";else if(95===y)d=" ";else if(48===y)d="0";else if(58===y)b&&s("[WARNING] detected use of unsupported %:: or %::: modifiers to strftime"),b=!0;else{switch(y){case 37:u+="%";break;case 65:u+=l.days[a.getDay()];break;case 66:u+=l.months[a.getMonth()];break;case 67:u+=t(Math.floor(a.getFullYear()/100),d);break;case 68:u+=h(l.formats.D,a,l,c);break;case 70:u+=h(l.formats.F,a,l,c);break;case 72:u+=t(a.getHours(),d);break;case 73:u+=t(r(a.getHours()),d);break;case 76:u+=n(Math.floor(c%1e3));break;case 77:u+=t(a.getMinutes(),d);break;case 80:u+=12>a.getHours()?l.am:l.pm;break;case 82:u+=h(l.formats.R,a,l,c);break;case 83:u+=t(a.getSeconds(),d);break;case 84:u+=h(l.formats.T,a,l,c);break;case 85:u+=t(i(a,"sunday"),d);break;case 87:u+=t(i(a,"monday"),d);break;case 88:u+=h(l.formats.X,a,l,c);break;case 89:u+=a.getFullYear();break;case 90:g&&0===m?u+="GMT":u+=(d=a.toString().match(/\(([\w\s]+)\)/))&&d[1]||"";break;case 97:u+=l.shortDays[a.getDay()];break;case 98:u+=l.shortMonths[a.getMonth()];break;case 99:u+=h(l.formats.c,a,l,c);break;case 100:u+=t(a.getDate(),d);break;case 101:u+=t(a.getDate(),null==d?" ":d);break;case 104:u+=l.shortMonths[a.getMonth()];break;case 106:d=new Date(a.getFullYear(),0,1),u+=n(d=Math.ceil((a.getTime()-d.getTime())/864e5));break;case 107:u+=t(a.getHours(),null==d?" ":d);break;case 108:u+=t(r(a.getHours()),null==d?" ":d);break;case 109:u+=t(a.getMonth()+1,d);break;case 110:u+="\n";break;case 111:d=a.getDate(),u=l.ordinalSuffixes?u+(String(d)+(l.ordinalSuffixes[d-1]||o(d))):u+(String(d)+o(d));break;case 112:u+=12>a.getHours()?l.AM:l.PM;break;case 114:u+=h(l.formats.r,a,l,c);break;case 115:u+=Math.floor(c/1e3);break;case 116:u+="\t";break;case 117:u+=0===(d=a.getDay())?7:d;break;case 118:u+=h(l.formats.v,a,l,c);break;case 119:u+=a.getDay();break;case 120:u+=h(l.formats.x,a,l,c);break;case 121:u+=(""+a.getFullYear()).slice(2);break;case 122:g&&0===m?u+=b?"+00:00":"+0000":(d=0!==m?m/6e4:-a.getTimezoneOffset(),p=b?":":"",y=Math.abs(d%60),u+=(0>d?"-":"+")+t(Math.floor(Math.abs(d/60)))+p+t(y));break;default:p&&(u+="%"),u+=e[v]}d=null,p=!1}else 37===y?p=!0:u+=e[v]}return u}var p,f=c||l,m=u||0,g=d||!1,b=0,v=function(e,t){if(t){var n=t.getTime();if(g){var r=6e4*(t.getTimezoneOffset()||0);6e4*((t=new Date(n+r+m)).getTimezoneOffset()||0)!==r&&(t=6e4*(t.getTimezoneOffset()||0),t=new Date(n+t+m))}}else(n=Date.now())>b?(b=n,p=new Date(b),n=b,g&&(p=new Date(b+6e4*(p.getTimezoneOffset()||0)+m))):n=b,t=p;return h(e,t,f,n)};return v.localize=function(t){return new e(t||f,m,g)},v.localizeByIdentifier=function(e){var t=a[e];return t?v.localize(t):(s('[WARNING] No locale found with identifier "'+e+'".'),v)},v.timezone=function(t){var n=m,r=g,i=typeof t;return"number"!==i&&"string"!==i||(r=!0,"string"===i?n=(n="-"===t[0]?-1:1)*(60*(i=parseInt(t.slice(1,3),10))+(t=parseInt(t.slice(3,5),10)))*6e4:"number"===i&&(n=6e4*t)),new e(f,n,r)},v.utc=function(){return new e(f,m,!0)},v}(l,0,!1);if(void 0!==e)e.exports=c;else(function(){return this||(0,eval)("this")}()).strftime=c;"function"!=typeof Date.now&&(Date.now=function(){return+new Date})}()},function(e,t,n){!function(){var t=function(e,n,r){return t.parse(e,n,r)};t.version="0.0.1",(e.exports=t).strptime=t,t.locale={a:"Sun Mon Tue Wed Thu Fri Sat".split(" "),A:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),b:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),B:"January February March April May June July August September October November December".split(" "),f:"Jan. Feb. Mar. Apr. May Jun. Jul. Aug. Sep. Oct. Nov. Dec.".split(" "),c:"%Y-%m-%d %H:%M:%S",P:["am","pm"],r:"%I:%M:%S %p",x:"%m/%d/%y",X:"%H:%M:%S",day:["Yesterday","Today","Tomorrow"],bg:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),Bg:"January February March April May June July August September October November December".split(" "),fg:"Jan. Feb. Mar. Apr. May Jun. Jul. Aug. Sep. Oct. Nov. Dec.".split(" "),Date_dBY_year_in_HM:"%#B %-d, %Y at %-H:%M",Date_dBY_year:"%#B %-d, %Y",Date_dBY:"%#B %-d, %Y",Date_AdBY:"%A, %#B %-d, %Y",Date_dBA:"%#B %-d, %A",Date_df_in_HM:"%#f, %-d at %-H:%M",Date_dfY:"%-d %#f %Y",Date_dB_in_HM:"%#B %-d at %-H:%M",Date_df:"%-d %#f"},function(e){function t(e,n,r,i,s,a){if(n=String(n),r=String(r),n=n.replace(/^[#_0\^\-!~]+/,""),!(i=o[n]))return e;var l=!1;if(-1===r.indexOf("!")&&1===n.length&&(-1<r.indexOf("~")||-1<"bBf".indexOf(n)&&/%[0\-_]?d[\s]+$/.test(a.substr(0,s)))&&(l=!0),("I"===n||"l"===n)&&!/%[pP]/.test(a))throw Error("Undefined AM/PM");switch(typeof i){case"function":return i();case"string":return i;case"object":return t.make.push([i.make,r,l]),"("+i.reg+")";default:return e}}function n(e,t){return e=String(e),-1!==(t=String(t)).indexOf("#")?e.substr(0,1).toUpperCase()+e.substr(1):-1!==t.indexOf("^")?e.substr(0,1)+e.substr(1).toLowerCase():e}var r=Array.prototype.indexOf||function(e){for(var t=this.length,n=0;n<t;){if(e==this[n])return n;n++}return-1},i=e.locale,o={"%":"\\%",a:"\\S+",A:"\\S+",b:{reg:"\\S+",make:function(e,t,o,s){return-1!==(t=r.call(s?i.bg:i.b,n(t,o)))&&(e.setUTCMonth(t),!0)}},h:{reg:"\\S+",make:function(e,t,o,s){return-1!==(t=r.call(s?i.bg:i.b,n(t,o)))&&(e.setUTCMonth(t),!0)}},B:{reg:"\\S+",make:function(e,t,o,s){return-1!==(t=r.call(s?i.Bg:i.B,n(t,o)))&&(e.setUTCMonth(t),!0)}},f:{reg:"\\S+",make:function(e,t,o,s){return-1!==(t=r.call(s?i.fg:i.f,n(t,o)))&&(e.setUTCMonth(t),!0)}},g:{reg:"[\\d\\s]?\\d",make:function(e,t){return!(0>(t=parseInt(t,10))||99<t)&&(t+=100*parseInt((new Date).getUTCFullYear()/100,10),e.setUTCFullYear(t),!0)}},G:{reg:"\\d{4}",make:function(e,t){return t=parseInt(t,10),e.setUTCFullYear(t),!0}},d:{reg:"[\\d\\s]?\\d",make:function(e,t){return!(1>(t=parseInt(t,10))||31<t)&&(e.setUTCDate(t),!0)}},e:{reg:"[\\d\\s]?\\d",make:function(e,t){return!(1>(t=parseInt(t,10))||31<t)&&(e.setUTCDate(t),!0)}},H:{reg:"[\\d\\s]?\\d",make:function(e,t){return!(0>(t=parseInt(t,10))||23<t)&&(e.setUTCHours(t),!0)}},I:{reg:"[\\d\\s]?\\d",make:function(e,t){return!(1>(t=parseInt(t,10))||12<t)&&(e.setUTCHours(e.getUTCHours()+t),!0)}},m:{reg:"[\\d\\s]?\\d",make:function(e,t){return!(1>(t=parseInt(t,10))||12<t)&&(e.setUTCMonth(t-1),!0)}},M:{reg:"[\\d\\s]?\\d",make:function(e,t){return!(0>(t=parseInt(t,10))||59<t)&&(e.setUTCMinutes(t),!0)}},n:"\\n",p:{reg:"\\S+",make:function(e,t){return-1!==(t=r.call(i.P,t.toLowerCase()))&&(1===t&&e.setUTCHours(e.getUTCHours()+12),!0)}},P:{reg:"\\S+",make:function(e,t){return-1!==(t=r.call(i.P,t.toLowerCase()))&&(1===t&&e.setUTCHours(e.getUTCHours()+12),!0)}},S:{reg:"[\\d\\s]?\\d",make:function(e,t){return!(0>(t=parseInt(t,10))||60<t)&&(e.setUTCSeconds(t),!0)}},t:"\\t",u:"\\d",U:"[\\d\\s]?\\d",w:"\\d",W:"[\\d\\s]?\\d",y:{reg:"[\\d\\s]?\\d",make:function(e,t){return!(0>(t=parseInt(t,10))||99<t)&&(t+=100*parseInt((new Date).getUTCFullYear()/100,10),e.setUTCFullYear(t),!0)}},Y:{reg:"\\d{4}",make:function(e,t){return t=parseInt(t,10),e.setUTCFullYear(t),!0}},z:{reg:"[+\\-]\\d{4}",make:function(e,t){if(!(t=t.match(/^([+\-])(\d{2})(\d{2})$/)))return!1;var n=6e4*(60*parseInt(t[2],10)+parseInt(t[3],10));return"+"===t[1]&&(n=-n),e.setTime(e.getTime()+n),!0}},l:{reg:"[\\d\\s]?\\d",make:function(e,t){return!(1>(t=parseInt(t,10))||12<t)&&(e.setUTCHours(e.getUTCHours()+t),!0)}},s:{reg:"\\d+",make:function(e,t){return t=parseInt(t,10),e.setTime(1e3*t),!0}},c:i.c,r:i.r,R:"%H:%M",T:"%H:%M:%S",x:i.x,X:i.X,D:"%m/%d/%y",F:"%Y-%m-%d",Date_iso:"%Y-%m-%dT%H:%M:%S",Date_dBY_year_in_HM:i.Date_dBY_year_in_HM,Date_dBY_year:i.Date_dBY_year,Date_dBY:i.Date_dBY,Date_dBA:i.Date_dBA,Date_AdBY:i.Date_AdBY,Date_df_in_HM:i.Date_df_in_HM,Date_dfY:i.Date_dfY,Date_dB_in_HM:i.Date_dB_in_HM,Date_dmY__dot:"%d.%m.%Y",Date_df:i.Date_df,Date_FT:"%F %T",Date_dmY__minus:"%d-%m-%Y"};e.parse=function(e,n,r){e=String(e),n=String(n);for(var i=5;/%(Date_[a-zA-Z0-9_]+|[cDFrRTxX])/g.test(n)&&i;)n=n.replace(/%(Date_[a-zA-Z0-9_]+|[cDFrRTxX])/,t),i--;if(t.make=[],n=n.replace(/%(([#\^!~]{0,2})[aAbBfh]|([0\-_]?)[degHImMSVWyl]|[GnpPtuUwYzZs%])/g,t),!(e=e.match(new RegExp(n)))||!t.make.length)return null;n=new Date(Date.UTC(0,0)),i=0;for(var o=t.make.length;i<o;i++){var s=t.make[i];if(!s[0](n,e[i+1],s[1],s[2]))return null}return r&&n.setTime(n.getTime()+6e4*n.getTimezoneOffset()),n}}(t)}()},function(e,t,n){e=n(6);const r=Sk.global.JSBI=void 0!==Sk.global.BigInt?{}:e;if(void 0===Sk.global.BigInt){const e=r.__isBigInt;r.__isBigInt=e?t=>null!==t&&e(t):e=>e instanceof r,r.powermod=(e,t,n)=>{const i=r.BigInt(1);let o=i;for(t=r.greaterThan(t,r.__ZERO)?t:r.unaryMinus(t);r.greaterThan(t,r.__ZERO);)r.bitwiseAnd(t,i)&&(o=r.remainder(r.multiply(o,e),n)),t=r.signedRightShift(t,i),e=r.remainder(r.multiply(e,e),n);return o}}else Object.assign(r,{BigInt:Sk.global.BigInt,toNumber:e=>Number(e),toString:e=>e.toString(),__isBigInt:e=>"bigint"==typeof e,unaryMinus:e=>-e,bitwiseNot:e=>~e,bitwiseAnd:(e,t)=>e&t,bitwiseOr:(e,t)=>e|t,bitwiseXor:(e,t)=>e^t,exponentiate:(e,t)=>{const n=r.BigInt(1);let i=n;for(t=t>r.__ZERO?t:-t;t>r.__ZERO;)t&n&&(i*=e),t>>=n,e*=e;return i},powermod:(e,t,n)=>{const i=r.BigInt(1);let o=i;for(t=t>r.__ZERO?t:-t;t>r.__ZERO;)t&i&&(o=o*e%n),t>>=i,e=e*e%n;return o},multiply:(e,t)=>e*t,divide:(e,t)=>e/t,remainder:(e,t)=>e%t,add:(e,t)=>e+t,subtract:(e,t)=>e-t,leftShift:(e,t)=>e<<t,signedRightShift:(e,t)=>e>>t,unsignedRightShift:(e,t)=>e>>>t,lessThan:(e,t)=>e<t,lessThanOrEqual:(e,t)=>e<=t,greaterThan:(e,t)=>e>t,greaterThanOrEqual:(e,t)=>e>=t,equal:(e,t)=>e===t,notEqual:(e,t)=>e!==t});r.__ZERO=r.BigInt(0),r.__MAX_SAFE=r.BigInt(Number.MAX_SAFE_INTEGER),r.__MIN_SAFE=r.BigInt(-Number.MAX_SAFE_INTEGER),r.numberIfSafe=e=>r.lessThan(e,r.__MAX_SAFE)&&r.greaterThan(e,r.__MIN_SAFE)?r.toNumber(e):e},function(e,t,n){e.exports=function(){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){for(var n,r=0;r<t.length;r++)(n=t[r]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}function n(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function a(){return(a=s()?Reflect.construct:function(e,t,n){var r=[null];return r.push.apply(r,t),e=new(Function.bind.apply(e,r)),n&&o(e,n.prototype),e}).apply(null,arguments)}function l(e){var t="function"==typeof Map?new Map:void 0;return(l=function(e){function n(){return a(e,arguments,i(this).constructor)}if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),o(n,e)})(e)}function c(e){var t=s();return function(){var n=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(n,arguments,r)}else n=n.apply(this,arguments);if(!n||"object"!=typeof n&&"function"!=typeof n){if(void 0===this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");n=this}return n}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return{s:t=function(){},n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}var h=Math.imul,p=Math.clz32,f=function(t){function i(e,t){var n;if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");if(e>i.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded");return(n=a.call(this,e)).sign=t,n}var o=Math.abs,s=Math.max;r(i,t);var a=c(i);return n(i,[{key:"toDebugString",value:function(){var e,t=["BigInt["],n=d(this);try{for(n.s();!(e=n.n()).done;){var r=e.value;t.push((r?(r>>>0).toString(16):r)+", ")}}catch(e){n.e(e)}finally{n.f()}return t.push("]"),t.join("")}},{key:"toString",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:10;if(2>e||36<e)throw new RangeError("toString() radix argument must be between 2 and 36");return 0===this.length?"0":0==(e&e-1)?i.__toStringBasePowerOfTwo(this,e):i.__toStringGeneric(this,e,!1)}},{key:"__copy",value:function(){for(var e=new i(this.length,this.sign),t=0;t<this.length;t++)e[t]=this[t];return e}},{key:"__trim",value:function(){for(var e=this.length,t=this[e-1];0===t;)t=this[--e-1],this.pop();return 0===e&&(this.sign=!1),this}},{key:"__initializeDigits",value:function(){for(var e=0;e<this.length;e++)this[e]=0}},{key:"__clzmsd",value:function(){return i.__clz32(this[this.length-1])}},{key:"__inplaceMultiplyAdd",value:function(e,t,n){n>this.length&&(n=this.length);var r=65535&e;e>>>=16;var o=0,s=65535&t;t>>>=16;for(var a=0;a<n;a++){var l=this.__digit(a),c=65535&l,u=l>>>16;l=i.__imul(c,r),c=i.__imul(c,e);var d=i.__imul(u,r),h=s+(65535&l);o=(s=(c>>>16)+(d>>>16)+(65535&(u=i.__imul(u,e)))+((l=t+o+(h>>>16)+(l>>>16)+(65535&c)+(65535&d))>>>16))>>>16,s&=65535,t=u>>>16,this.__setDigit(a,65535&h|l<<16)}if(0!==o||0!==s||0!==t)throw Error("implementation bug")}},{key:"__inplaceAdd",value:function(e,t,n){for(var r,i=0,o=0;o<n;o++)i=(r=this.__halfDigit(t+o)+e.__halfDigit(o)+i)>>>16,this.__setHalfDigit(t+o,r);return i}},{key:"__inplaceSub",value:function(e,t,n){var r=0;if(1&t){t>>=1;for(var i=this.__digit(t),o=65535&i,s=0;s<n-1>>>1;s++){var a=e.__digit(s);r=1&(i=(i>>>16)-(65535&a)-r)>>>16,this.__setDigit(t+s,i<<16|65535&o),r=1&(o=(65535&(i=this.__digit(t+s+1)))-(a>>>16)-r)>>>16}var l=(i>>>16)-(65535&(a=e.__digit(s)))-r;if(r=1&l>>>16,this.__setDigit(t+s,l<<16|65535&o),t+s+1>=this.length)throw new RangeError("out of bounds");0==(1&n)&&(r=1&(o=(65535&(i=this.__digit(t+s+1)))-(a>>>16)-r)>>>16,this.__setDigit(t+e.length,4294901760&i|65535&o))}else{for(t>>=1,o=0;o<e.length-1;o++)r=1&(i=((i=this.__digit(t+o))>>>16)-((a=e.__digit(o))>>>16)-(r=1&(s=(65535&i)-(65535&a)-r)>>>16))>>>16,this.__setDigit(t+o,i<<16|65535&s);r=1&(i=(65535&(s=this.__digit(t+o)))-(65535&(e=e.__digit(o)))-r)>>>16,a=0,0==(1&n)&&(r=1&(a=(s>>>16)-(e>>>16)-r)>>>16),this.__setDigit(t+o,a<<16|65535&i)}return r}},{key:"__inplaceRightShift",value:function(e){if(0!==e){for(var t,n=this.__digit(0)>>>e,r=this.length-1,i=0;i<r;i++)t=this.__digit(i+1),this.__setDigit(i,t<<32-e|n),n=t>>>e;this.__setDigit(r,n)}}},{key:"__digit",value:function(e){return this[e]}},{key:"__unsignedDigit",value:function(e){return this[e]>>>0}},{key:"__setDigit",value:function(e,t){this[e]=0|t}},{key:"__setDigitGrow",value:function(e,t){this[e]=0|t}},{key:"__halfDigitLength",value:function(){var e=this.length;return 65535>=this.__unsignedDigit(e-1)?2*e-1:2*e}},{key:"__halfDigit",value:function(e){return 65535&this[e>>>1]>>>((1&e)<<4)}},{key:"__setHalfDigit",value:function(e,t){var n=e>>>1,r=this.__digit(n);this.__setDigit(n,1&e?65535&r|t<<16:4294901760&r|65535&t)}}],[{key:"BigInt",value:function(t){var n=Math.floor,r=Number.isFinite;if("number"==typeof t){if(0===t)return i.__zero();if((0|t)===t)return 0>t?i.__oneDigit(-t,!0):i.__oneDigit(t,!1);if(!r(t)||n(t)!==t)throw new RangeError("The number "+t+" cannot be converted to BigInt because it is not an integer");return i.__fromDouble(t)}if("string"==typeof t){if(null===(n=i.__fromString(t)))throw new SyntaxError("Cannot convert "+t+" to a BigInt");return n}if("boolean"==typeof t)return!0===t?i.__oneDigit(1,!1):i.__zero();if("object"===e(t))return t.constructor===i?t:(t=i.__toPrimitive(t),i.BigInt(t));throw new TypeError("Cannot convert "+t+" to a BigInt")}},{key:"toNumber",value:function(e){var t=e.length;if(0===t)return 0;if(1===t){var n=e.__unsignedDigit(0);return e.sign?-n:n}var r=e.__digit(t-1),o=i.__clz32(r);if(1024<(n=32*t-o))return e.sign?-1/0:1/0;--n;var s=t-1,a=o+1;o=(32===a?0:r<<a)>>>12;var l=a-12;return t=12<=a?0:r<<20+a,a=20+a,0<l&&0<s&&(s--,o|=(r=e.__digit(s))>>>32-l,t=r<<l,a=l),0<a&&0<s&&(s--,t|=(r=e.__digit(s))>>>32-a,a-=32),(1===(r=i.__decideRounding(e,a,s,r))||0===r&&1==(1&t))&&0==(t=t+1>>>0)&&0!=++o>>>20&&(o=0,1023<++n)?e.sign?-1/0:1/0:(e=e.sign?-2147483648:0,n=n+1023<<20,i.__kBitConversionInts[1]=e|n|o,i.__kBitConversionInts[0]=t,i.__kBitConversionDouble[0])}},{key:"unaryMinus",value:function(e){if(0===e.length)return e;var t=e.__copy();return t.sign=!e.sign,t}},{key:"bitwiseNot",value:function(e){return e.sign?i.__absoluteSubOne(e).__trim():i.__absoluteAddOne(e,!0)}},{key:"exponentiate",value:function(e,t){if(t.sign)throw new RangeError("Exponent must be positive");if(0===t.length)return i.__oneDigit(1,!1);if(0===e.length)return e;if(1===e.length&&1===e.__digit(0))return e.sign&&0==(1&t.__digit(0))?i.unaryMinus(e):e;if(1<t.length)throw new RangeError("BigInt too big");if(1===(t=t.__unsignedDigit(0)))return e;if(t>=i.__kMaxLengthBits)throw new RangeError("BigInt too big");if(1===e.length&&2===e.__digit(0)){var n=1+(t>>>5);return(e=new i(n,e.sign&&0!=(1&t))).__initializeDigits(),e.__setDigit(n-1,1<<(31&t)),e}n=null;var r=e;for(0!=(1&t)&&(n=e),t>>=1;0!==t;t>>=1)r=i.multiply(r,r),0!=(1&t)&&(n=null===n?r:i.multiply(n,r));return n}},{key:"multiply",value:function(e,t){if(0===e.length)return e;if(0===t.length)return t;var n=e.length+t.length;32<=e.__clzmsd()+t.__clzmsd()&&n--,(n=new i(n,e.sign!==t.sign)).__initializeDigits();for(var r=0;r<e.length;r++)i.__multiplyAccumulate(t,e.__digit(r),n,r);return n.__trim()}},{key:"divide",value:function(e,t){if(0===t.length)throw new RangeError("Division by zero");if(0>i.__absoluteCompare(e,t))return i.__zero();var n=e.sign!==t.sign,r=t.__unsignedDigit(0);if(1===t.length&&65535>=r){if(1===r)return n===e.sign?e:i.unaryMinus(e);e=i.__absoluteDivSmall(e,r,null)}else e=i.__absoluteDivLarge(e,t,!0,!1);return e.sign=n,e.__trim()}},{key:"remainder",value:function(e,t){if(0===t.length)throw new RangeError("Division by zero");if(0>i.__absoluteCompare(e,t))return e;var n=t.__unsignedDigit(0);return 1===t.length&&65535>=n?1===n||0===(t=i.__absoluteModSmall(e,n))?i.__zero():i.__oneDigit(t,e.sign):((t=i.__absoluteDivLarge(e,t,!1,!0)).sign=e.sign,t.__trim())}},{key:"add",value:function(e,t){var n=e.sign;return n===t.sign?i.__absoluteAdd(e,t,n):0<=i.__absoluteCompare(e,t)?i.__absoluteSub(e,t,n):i.__absoluteSub(t,e,!n)}},{key:"subtract",value:function(e,t){var n=e.sign;return n===t.sign?0<=i.__absoluteCompare(e,t)?i.__absoluteSub(e,t,n):i.__absoluteSub(t,e,!n):i.__absoluteAdd(e,t,n)}},{key:"leftShift",value:function(e,t){return 0===t.length||0===e.length?e:t.sign?i.__rightShiftByAbsolute(e,t):i.__leftShiftByAbsolute(e,t)}},{key:"signedRightShift",value:function(e,t){return 0===t.length||0===e.length?e:t.sign?i.__leftShiftByAbsolute(e,t):i.__rightShiftByAbsolute(e,t)}},{key:"unsignedRightShift",value:function(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}},{key:"lessThan",value:function(e,t){return 0>i.__compareToBigInt(e,t)}},{key:"lessThanOrEqual",value:function(e,t){return 0>=i.__compareToBigInt(e,t)}},{key:"greaterThan",value:function(e,t){return 0<i.__compareToBigInt(e,t)}},{key:"greaterThanOrEqual",value:function(e,t){return 0<=i.__compareToBigInt(e,t)}},{key:"equal",value:function(e,t){if(e.sign!==t.sign||e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e.__digit(n)!==t.__digit(n))return!1;return!0}},{key:"notEqual",value:function(e,t){return!i.equal(e,t)}},{key:"bitwiseAnd",value:function(e,t){if(!e.sign&&!t.sign)return i.__absoluteAnd(e,t).__trim();if(e.sign&&t.sign){var n=s(e.length,t.length)+1;return e=i.__absoluteSubOne(e,n),t=i.__absoluteSubOne(t),e=i.__absoluteOr(e,t,e),i.__absoluteAddOne(e,!0,e).__trim()}return e.sign&&(e=(t=[t,e])[0],t=t[1]),i.__absoluteAndNot(e,i.__absoluteSubOne(t)).__trim()}},{key:"bitwiseXor",value:function(e,t){if(!e.sign&&!t.sign)return i.__absoluteXor(e,t).__trim();if(e.sign&&t.sign){var n=s(e.length,t.length);return e=i.__absoluteSubOne(e,n),t=i.__absoluteSubOne(t),i.__absoluteXor(e,t,e).__trim()}return n=s(e.length,t.length)+1,e.sign&&(e=(t=[t,e])[0],t=t[1]),t=i.__absoluteSubOne(t,n),t=i.__absoluteXor(t,e,t),i.__absoluteAddOne(t,!0,t).__trim()}},{key:"bitwiseOr",value:function(e,t){var n=s(e.length,t.length);return e.sign||t.sign?e.sign&&t.sign?(e=i.__absoluteSubOne(e,n),t=i.__absoluteSubOne(t),e=i.__absoluteAnd(e,t,e),i.__absoluteAddOne(e,!0,e).__trim()):(e.sign&&(e=(t=[t,e])[0],t=t[1]),t=i.__absoluteSubOne(t,n),t=i.__absoluteAndNot(t,e,t),i.__absoluteAddOne(t,!0,t).__trim()):i.__absoluteOr(e,t).__trim()}},{key:"asIntN",value:function(e,t){if(0===t.length)return t;if(0===e)return i.__zero();if(e>=i.__kMaxLengthBits)return t;var n=e+31>>>5;if(t.length<n)return t;var r=t.__unsignedDigit(n-1),o=1<<(31&e-1);if(t.length===n&&r<o)return t;if((r&o)!==o)return i.__truncateToNBits(e,t);if(!t.sign)return i.__truncateAndSubFromPowerOfTwo(e,t,!0);if(0==(r&o-1)){for(var s=n-2;0<=s;s--)if(0!==t.__digit(s))return i.__truncateAndSubFromPowerOfTwo(e,t,!1);return t.length===n&&r===o?t:i.__truncateToNBits(e,t)}return i.__truncateAndSubFromPowerOfTwo(e,t,!1)}},{key:"asUintN",value:function(e,t){if(0===t.length)return t;if(0===e)return i.__zero();if(t.sign){if(e>i.__kMaxLengthBits)throw new RangeError("BigInt too big");return i.__truncateAndSubFromPowerOfTwo(e,t,!1)}if(e>=i.__kMaxLengthBits)return t;var n=e+31>>>5;if(t.length<n)return t;var r=31&e;return t.length!=n||0!==r&&0!=t.__digit(n-1)>>>r?i.__truncateToNBits(e,t):t}},{key:"ADD",value:function(e,t){if(e=i.__toPrimitive(e),t=i.__toPrimitive(t),"string"==typeof e)return"string"!=typeof t&&(t=t.toString()),e+t;if("string"==typeof t)return e.toString()+t;if(e=i.__toNumeric(e),t=i.__toNumeric(t),i.__isBigInt(e)&&i.__isBigInt(t))return i.add(e,t);if("number"==typeof e&&"number"==typeof t)return e+t;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}},{key:"LT",value:function(e,t){return i.__compare(e,t,0)}},{key:"LE",value:function(e,t){return i.__compare(e,t,1)}},{key:"GT",value:function(e,t){return i.__compare(e,t,2)}},{key:"GE",value:function(e,t){return i.__compare(e,t,3)}},{key:"EQ",value:function(t,n){for(;;){if(i.__isBigInt(t))return i.__isBigInt(n)?i.equal(t,n):i.EQ(n,t);if("number"==typeof t){if(i.__isBigInt(n))return i.__equalToNumber(n,t);if("object"!==e(n))return t==n;n=i.__toPrimitive(n)}else if("string"==typeof t){if(i.__isBigInt(n))return null!==(t=i.__fromString(t))&&i.equal(t,n);if("object"!==e(n))return t==n;n=i.__toPrimitive(n)}else if("boolean"==typeof t){if(i.__isBigInt(n))return i.__equalToNumber(n,+t);if("object"!==e(n))return t==n;n=i.__toPrimitive(n)}else if("symbol"===e(t)){if(i.__isBigInt(n))return!1;if("object"!==e(n))return t==n;n=i.__toPrimitive(n)}else{if("object"!==e(t))return t==n;if("object"===e(n)&&n.constructor!==i)return t==n;t=i.__toPrimitive(t)}}}},{key:"NE",value:function(e,t){return!i.EQ(e,t)}},{key:"__zero",value:function(){return new i(0,!1)}},{key:"__oneDigit",value:function(e,t){return(t=new i(1,t)).__setDigit(0,e),t}},{key:"__decideRounding",value:function(e,t,n,r){if(0<t)return-1;if(0>t)t=-t-1;else{if(0===n)return-1;n--,r=e.__digit(n),t=31}if(0==(r&(t=1<<t)))return-1;if(0!=(r&--t))return 1;for(;0<n;)if(n--,0!==e.__digit(n))return 1;return 0}},{key:"__fromDouble",value:function(e){i.__kBitConversionDouble[0]=e;var t=(2047&i.__kBitConversionInts[1]>>>20)-1023,n=1+(t>>>5);e=new i(n,0>e);var r=1048575&i.__kBitConversionInts[1]|1048576,o=i.__kBitConversionInts[0];if(20>(t&=31)){var s=20-t,a=s+32;t=r>>>s,r=r<<32-s|o>>>s,o<<=32-s}else 20===t?(a=32,t=r,r=o):(a=32-(s=t-20),t=r<<s|o>>>32-s,r=o<<s);for(e.__setDigit(n-1,t),n-=2;0<=n;n--)0<a?(a-=32,t=r,r=o):t=0,e.__setDigit(n,t);return e.__trim()}},{key:"__isWhitespace",value:function(e){return!!(13>=e&&9<=e)||(159>=e?32==e:131071>=e?160==e||5760==e:196607>=e?10>=(e&=131071)||40==e||41==e||47==e||95==e||4096==e:65279==e)}},{key:"__fromString",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=0,r=e.length,o=0;if(o===r)return i.__zero();for(var s=e.charCodeAt(o);i.__isWhitespace(s);){if(++o===r)return i.__zero();s=e.charCodeAt(o)}if(43===s){if(++o===r)return null;s=e.charCodeAt(o),n=1}else if(45===s){if(++o===r)return null;s=e.charCodeAt(o),n=-1}if(0===t){if(t=10,48===s){if(++o===r)return i.__zero();if(88===(s=e.charCodeAt(o))||120===s){if(t=16,++o===r)return null;s=e.charCodeAt(o)}else if(79===s||111===s){if(t=8,++o===r)return null;s=e.charCodeAt(o)}else if(66===s||98===s){if(t=2,++o===r)return null;s=e.charCodeAt(o)}}}else if(16===t&&48===s){if(++o===r)return i.__zero();if(88===(s=e.charCodeAt(o))||120===s){if(++o===r)return null;s=e.charCodeAt(o)}}for(;48===s;){if(++o===r)return i.__zero();s=e.charCodeAt(o)}var a=r-o,l=i.__kMaxBitsPerChar[t],c=i.__kBitsPerCharTableMultiplier-1;if(a>1073741824/l)return null;a=new i(31+(l*a+c>>>i.__kBitsPerCharTableShift)>>>5,!1);var u=10>t?t:10,d=10<t?t-10:0;if(0==(t&t-1)){l>>=i.__kBitsPerCharTableShift;var h=[],p=[],f=!1;do{for(var m,g=c=0;;){if(s-48>>>0<u)m=s-48;else{if(!((32|s)-97>>>0<d)){f=!0;break}m=(32|s)-87}if(g+=l,c=c<<l|m,++o===r){f=!0;break}if(s=e.charCodeAt(o),32<g+l)break}h.push(c),p.push(g)}while(!f);i.__fillFromParts(a,h,p)}else{a.__initializeDigits(),h=!1,p=0;do{for(f=0,m=1;;){if(s-48>>>0<u)c=s-48;else{if(!((32|s)-97>>>0<d)){h=!0;break}c=(32|s)-87}if(4294967295<(g=m*t))break;if(m=g,f=f*t+c,p++,++o===r){h=!0;break}s=e.charCodeAt(o)}c=32*i.__kBitsPerCharTableMultiplier-1,a.__inplaceMultiplyAdd(m,f,l*p+c>>>i.__kBitsPerCharTableShift+5)}while(!h)}if(o!==r){if(!i.__isWhitespace(s))return null;for(o++;o<r;o++)if(s=e.charCodeAt(o),!i.__isWhitespace(s))return null}return 0!==n&&10!==t?null:(a.sign=-1===n,a.__trim())}},{key:"__fillFromParts",value:function(e,t,n){for(var r=0,i=0,o=0,s=t.length-1;0<=s;s--){var a=t[s],l=n[s];i|=a<<o,32===(o+=l)?(e.__setDigit(r++,i),o=0,i=0):32<o&&(e.__setDigit(r++,i),i=a>>>l-(o-=32))}if(0!==i){if(r>=e.length)throw Error("implementation bug");e.__setDigit(r++,i)}for(;r<e.length;r++)e.__setDigit(r,0)}},{key:"__toStringBasePowerOfTwo",value:function(e,t){var n=e.length,r=t-1;r=(15&(r=(51&(r=(85&r>>>1)+(85&r))>>>2)+(51&r))>>>4)+(15&r),--t;var o=e.__digit(n-1),s=i.__clz32(o),a=0|(32*n-s+r-1)/r;if(e.sign&&a++,268435456<a)throw Error("string too long");s=Array(a),--a;for(var l=0,c=0,u=0;u<n-1;u++){var d=e.__digit(u);for(l=(l|d<<c)&t,s[a--]=i.__kConversionChars[l],l=d>>>(c=r-c),c=32-c;c>=r;)s[a--]=i.__kConversionChars[l&t],l>>>=r,c-=r}for(s[a--]=i.__kConversionChars[(l|o<<c)&t],l=o>>>r-c;0!==l;)s[a--]=i.__kConversionChars[l&t],l>>>=r;if(e.sign&&(s[a--]="-"),-1!==a)throw Error("implementation bug");return s.join("")}},{key:"__toStringGeneric",value:function(e,t,n){var r=e.length;if(0===r)return"";if(1===r)return t=e.__unsignedDigit(0).toString(t),!1===n&&e.sign&&(t="-"+t),t;var o=32*r-i.__clz32(e.__digit(r-1));r=i.__kMaxBitsPerChar[t]-1,r=1+(0|((o*=i.__kBitsPerCharTableMultiplier)+(r-1))/r)>>1;var s=(o=i.exponentiate(i.__oneDigit(t,!1),i.__oneDigit(r,!1))).__unsignedDigit(0);if(1===o.length&&65535>=s){(o=new i(e.length,!1)).__initializeDigits();for(var a=0,l=2*e.length-1;0<=l;l--)a=a<<16|e.__halfDigit(l),o.__setHalfDigit(l,0|a/s),a=0|a%s;s=a.toString(t)}else o=(s=i.__absoluteDivLarge(e,o,!0,!0)).quotient,s=s.remainder.__trim(),s=i.__toStringGeneric(s,t,!0);for(o.__trim(),t=i.__toStringGeneric(o,t,!0);s.length<r;)s="0"+s;return!1===n&&e.sign&&(t="-"+t),t+s}},{key:"__unequalSign",value:function(e){return e?-1:1}},{key:"__absoluteGreater",value:function(e){return e?-1:1}},{key:"__absoluteLess",value:function(e){return e?1:-1}},{key:"__compareToBigInt",value:function(e,t){var n=e.sign;return n!==t.sign?i.__unequalSign(n):0<(e=i.__absoluteCompare(e,t))?i.__absoluteGreater(n):0>e?i.__absoluteLess(n):0}},{key:"__compareToNumber",value:function(e,t){if(1|t){var n=e.sign,r=0>t;if(n!==r)return i.__unequalSign(n);if(0===e.length){if(r)throw Error("implementation bug");return 0===t?0:-1}return 1<e.length?i.__absoluteGreater(n):(t=o(t),(e=e.__unsignedDigit(0))>t?i.__absoluteGreater(n):e<t?i.__absoluteLess(n):0)}return i.__compareToDouble(e,t)}},{key:"__compareToDouble",value:function(e,t){if(t!=t)return t;if(t===1/0)return-1;if(-1/0===t)return 1;var n=e.sign;if(n!==0>t)return i.__unequalSign(n);if(0===t)throw Error("implementation bug: should be handled elsewhere");if(0===e.length)return-1;if(i.__kBitConversionDouble[0]=t,2047==(t=2047&i.__kBitConversionInts[1]>>>20))throw Error("implementation bug: handled elsewhere");var r=t-1023;if(0>r)return i.__absoluteGreater(n);t=e.length;var o=e.__digit(t-1),s=i.__clz32(o),a=32*t-s;if(a<(r+=1))return i.__absoluteLess(n);if(a>r)return i.__absoluteGreater(n);r=1048576|1048575&i.__kBitConversionInts[1];var l=i.__kBitConversionInts[0];if((s=31-s)!=(a-1)%31)throw Error("implementation bug");if(20>s){var c=20-s;s=c+32,a=r>>>c,r=r<<32-c|l>>>c,l<<=32-c}else 20===s?(s=32,a=r,r=l):(s=32-(c=s-20),a=r<<c|l>>>32-c,r=l<<c);if((o>>>=0)>(a>>>=0))return i.__absoluteGreater(n);if(o<a)return i.__absoluteLess(n);for(t-=2;0<=t;t--){if(0<s?(s-=32,a=r>>>0,r=l,l=0):a=0,(o=e.__unsignedDigit(t))>a)return i.__absoluteGreater(n);if(o<a)return i.__absoluteLess(n)}if(0!==r||0!==l){if(0===s)throw Error("implementation bug");return i.__absoluteLess(n)}return 0}},{key:"__equalToNumber",value:function(e,t){return t|0===t?0===t?0===e.length:1===e.length&&e.sign===0>t&&e.__unsignedDigit(0)===o(t):0===i.__compareToDouble(e,t)}},{key:"__comparisonResultToBool",value:function(e,t){switch(t){case 0:return 0>e;case 1:return 0>=e;case 2:return 0<e;case 3:return 0<=e}throw Error("unreachable")}},{key:"__compare",value:function(e,t,n){if(e=i.__toPrimitive(e),t=i.__toPrimitive(t),"string"==typeof e&&"string"==typeof t)switch(n){case 0:return e<t;case 1:return e<=t;case 2:return e>t;case 3:return e>=t}if(i.__isBigInt(e)&&"string"==typeof t)return null!==(t=i.__fromString(t))&&i.__comparisonResultToBool(i.__compareToBigInt(e,t),n);if("string"==typeof e&&i.__isBigInt(t))return null!==(e=i.__fromString(e))&&i.__comparisonResultToBool(i.__compareToBigInt(e,t),n);if(e=i.__toNumeric(e),t=i.__toNumeric(t),i.__isBigInt(e)){if(i.__isBigInt(t))return i.__comparisonResultToBool(i.__compareToBigInt(e,t),n);if("number"!=typeof t)throw Error("implementation bug");return i.__comparisonResultToBool(i.__compareToNumber(e,t),n)}if("number"!=typeof e)throw Error("implementation bug");if(i.__isBigInt(t))return i.__comparisonResultToBool(i.__compareToNumber(t,e),2^n);if("number"!=typeof t)throw Error("implementation bug");return 0===n?e<t:1===n?e<=t:2===n?e>t:3===n?e>=t:void 0}},{key:"__absoluteAdd",value:function(e,t,n){if(e.length<t.length)return i.__absoluteAdd(t,e,n);if(0===e.length)return e;if(0===t.length)return e.sign===n?e:i.unaryMinus(e);var r=e.length;(0===e.__clzmsd()||t.length===e.length&&0===t.__clzmsd())&&r++,n=new i(r,n);for(var o=r=0;o<t.length;o++){var s=t.__digit(o),a=e.__digit(o),l=(65535&a)+(65535&s)+r;r=(s=(a>>>16)+(s>>>16)+(l>>>16))>>>16,n.__setDigit(o,65535&l|s<<16)}for(;o<e.length;o++)r=(l=((l=e.__digit(o))>>>16)+((t=(65535&l)+r)>>>16))>>>16,n.__setDigit(o,65535&t|l<<16);return o<n.length&&n.__setDigit(o,r),n.__trim()}},{key:"__absoluteSub",value:function(e,t,n){if(0===e.length)return e;if(0===t.length)return e.sign===n?e:i.unaryMinus(e);n=new i(e.length,n);for(var r=0,o=0;o<t.length;o++){var s=e.__digit(o),a=t.__digit(o),l=(65535&s)-(65535&a)-r;r=1&(s=(s>>>16)-(a>>>16)-(r=1&l>>>16))>>>16,n.__setDigit(o,65535&l|s<<16)}for(;o<e.length;o++)r=1&(l=((l=e.__digit(o))>>>16)-(r=1&(t=(65535&l)-r)>>>16))>>>16,n.__setDigit(o,65535&t|l<<16);return n.__trim()}},{key:"__absoluteAddOne",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,r=e.length;null===n?n=new i(r,t):n.sign=t;for(var o,s=!0,a=0;a<r;a++)o=e.__digit(a),s&&(s=-1===o,o=0|o+1),n.__setDigit(a,o);return s&&n.__setDigitGrow(r,1),n}},{key:"__absoluteSubOne",value:function(e,t){for(var n,r=e.length,o=new i(t=t||r,!1),s=!0,a=0;a<r;a++)n=e.__digit(a),s&&(s=0===n,n=0|n-1),o.__setDigit(a,n);if(s)throw Error("implementation bug");for(e=r;e<t;e++)o.__setDigit(e,0);return o}},{key:"__absoluteAnd",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,r=e.length,o=t.length,s=o;for(r<o&&(s=r,r=e,e=t,t=r),r=s,null===n?n=new i(r,!1):r=n.length,o=0;o<s;o++)n.__setDigit(o,e.__digit(o)&t.__digit(o));for(;o<r;o++)n.__setDigit(o,0);return n}},{key:"__absoluteAndNot",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,r=e.length,o=t.length,s=o;r<o&&(s=r),o=r,null===n?n=new i(o,!1):o=n.length;for(var a=0;a<s;a++)n.__setDigit(a,e.__digit(a)&~t.__digit(a));for(;a<r;a++)n.__setDigit(a,e.__digit(a));for(;a<o;a++)n.__setDigit(a,0);return n}},{key:"__absoluteOr",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,r=e.length,o=t.length,s=o;if(r<o){s=r;var a=e;e=t,r=o,t=a}for(o=r,null===n?n=new i(o,!1):o=n.length,a=0;a<s;a++)n.__setDigit(a,e.__digit(a)|t.__digit(a));for(;a<r;a++)n.__setDigit(a,e.__digit(a));for(;a<o;a++)n.__setDigit(a,0);return n}},{key:"__absoluteXor",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,r=e.length,o=t.length,s=o;if(r<o){s=r;var a=e;e=t,r=o,t=a}for(o=r,null===n?n=new i(o,!1):o=n.length,a=0;a<s;a++)n.__setDigit(a,e.__digit(a)^t.__digit(a));for(;a<r;a++)n.__setDigit(a,e.__digit(a));for(;a<o;a++)n.__setDigit(a,0);return n}},{key:"__absoluteCompare",value:function(e,t){var n=e.length-t.length;if(0!=n)return n;for(n=e.length-1;0<=n&&e.__digit(n)===t.__digit(n);)n--;return 0>n?0:e.__unsignedDigit(n)>t.__unsignedDigit(n)?1:-1}},{key:"__multiplyAccumulate",value:function(e,t,n,r){if(0!==t){for(var o=65535&t,s=t>>>16,a=t=0,l=0,c=0;c<e.length;c++,r++){var u=n.__digit(r),d=65535&u;u>>>=16;var h=e.__digit(c),p=65535&h,f=h>>>16;h=i.__imul(p,o),p=i.__imul(p,s);var m=i.__imul(f,o);t=(a=(p>>>16)+(m>>>16)+(65535&(f=i.__imul(f,s)))+(t=(u+=l+t+((d+=a+(65535&h))>>>16)+(h>>>16)+(65535&p)+(65535&m))>>>16))>>>16,a&=65535,l=f>>>16,u=65535&d|u<<16,n.__setDigit(r,u)}for(;0!==t||0!==a||0!==l;r++)o=((o=n.__digit(r))>>>16)+((e=(65535&o)+a)>>>16)+l+t,l=a=0,t=o>>>16,o=65535&e|o<<16,n.__setDigit(r,o)}}},{key:"__internalMultiplyAdd",value:function(e,t,n,r,o){for(var s=0,a=0;a<r;a++){var l=e.__digit(a),c=i.__imul(65535&l,t),u=(65535&c)+s+n;n=u>>>16,n=(c=(65535&(s=i.__imul(l>>>16,t)))+(c>>>16)+n)>>>16,s>>>=16,o.__setDigit(a,c<<16|65535&u)}if(o.length>r)for(o.__setDigit(r++,n+s);r<o.length;)o.__setDigit(r++,0);else if(0!==n+s)throw Error("implementation bug")}},{key:"__absoluteDivSmall",value:function(e,t,n){null===n&&(n=new i(e.length,!1));for(var r=0,o=2*e.length-1;0<=o;o-=2){var s=0|(r=(r<<16|e.__halfDigit(o))>>>0)/t,a=0|(r=((r=0|r%t)<<16|e.__halfDigit(o-1))>>>0)/t;r=0|r%t,n.__setDigit(o>>>1,s<<16|a)}return n}},{key:"__absoluteModSmall",value:function(e,t){for(var n=0,r=2*e.length-1;0<=r;r--)n=0|(n=(n<<16|e.__halfDigit(r))>>>0)%t;return n}},{key:"__absoluteDivLarge",value:function(e,t,n,r){var o=t.__halfDigitLength(),s=t.length,a=e.__halfDigitLength()-o,l=null;n&&(l=new i(a+2>>>1,!1)).__initializeDigits();var c=new i(o+2>>>1,!1);c.__initializeDigits();var u=i.__clz16(t.__halfDigit(o-1));0<u&&(t=i.__specialLeftShift(t,u,0)),e=i.__specialLeftShift(e,u,1);for(var d=t.__halfDigit(o-1),h=0;0<=a;a--){var p=65535,f=e.__halfDigit(a+o);if(f!==d){p=0|(f=(f<<16|e.__halfDigit(a+o-1))>>>0)/d,f=0|f%d;for(var m=t.__halfDigit(o-2),g=e.__halfDigit(a+o-2);i.__imul(p,m)>>>0>(f<<16|g)>>>0&&(p--,!(65535<(f+=d))););}i.__internalMultiplyAdd(t,p,0,s,c),0!==(f=e.__inplaceSub(c,a,o+1))&&(f=e.__inplaceAdd(t,a,o),e.__setHalfDigit(a+o,e.__halfDigit(a+o)+f),p--),n&&(1&a?h=p<<16:l.__setDigit(a>>>1,h|p))}return r?(e.__inplaceRightShift(u),n?{quotient:l,remainder:e}:e):n?l:void 0}},{key:"__clz16",value:function(e){return i.__clz32(e)-16}},{key:"__specialLeftShift",value:function(e,t,n){var r=e.length,o=new i(r+n,!1);if(0===t){for(t=0;t<r;t++)o.__setDigit(t,e.__digit(t));return 0<n&&o.__setDigit(r,0),o}for(var s,a=0,l=0;l<r;l++)s=e.__digit(l),o.__setDigit(l,s<<t|a),a=s>>>32-t;return 0<n&&o.__setDigit(r,a),o}},{key:"__leftShiftByAbsolute",value:function(e,t){var n=i.__toShiftAmount(t);if(0>n)throw new RangeError("BigInt too big");t=n>>>5;var r=31&n,o=e.length,s=0!==r&&0!=e.__digit(o-1)>>>32-r,a=o+t+(s?1:0);if(n=new i(a,e.sign),0===r){for(r=0;r<t;r++)n.__setDigit(r,0);for(;r<a;r++)n.__setDigit(r,e.__digit(r-t))}else{for(var l=a=0;l<t;l++)n.__setDigit(l,0);for(var c=0;c<o;c++)l=e.__digit(c),n.__setDigit(c+t,l<<r|a),a=l>>>32-r;if(s)n.__setDigit(o+t,a);else if(0!==a)throw Error("implementation bug")}return n.__trim()}},{key:"__rightShiftByAbsolute",value:function(e,t){var n=e.length,r=e.sign,o=i.__toShiftAmount(t);if(0>o)return i.__rightShiftByMaximum(r);var s=31&o,a=n-(t=o>>>5);if(0>=a)return i.__rightShiftByMaximum(r);if(o=!1,r)if(0!=(e.__digit(t)&(1<<s)-1))o=!0;else for(var l=0;l<t;l++)if(0!==e.__digit(l)){o=!0;break}if(o&&0===s&&0==~e.__digit(n-1)&&a++,r=new i(a,r),0===s)for(s=t;s<n;s++)r.__setDigit(s-t,e.__digit(s));else{a=e.__digit(t)>>>s,l=n-t-1;for(var c=0;c<l;c++)n=e.__digit(c+t+1),r.__setDigit(c,n<<32-s|a),a=n>>>s;r.__setDigit(l,a)}return o&&(r=i.__absoluteAddOne(r,!0,r)),r.__trim()}},{key:"__rightShiftByMaximum",value:function(e){return e?i.__oneDigit(1,!0):i.__zero()}},{key:"__toShiftAmount",value:function(e){return 1<e.length||(e=e.__unsignedDigit(0))>i.__kMaxLengthBits?-1:e}},{key:"__toPrimitive",value:function(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"default";if("object"!==e(t)||t.constructor===i)return t;var r=t[Symbol.toPrimitive];if(r){if("object"!==e(n=r(n)))return n;throw new TypeError("Cannot convert object to primitive value")}if((n=t.valueOf)&&"object"!==e(n=n.call(t)))return n;if((n=t.toString)&&"object"!==e(n=n.call(t)))return n;throw new TypeError("Cannot convert object to primitive value")}},{key:"__toNumeric",value:function(e){return i.__isBigInt(e)?e:+e}},{key:"__isBigInt",value:function(t){return"object"===e(t)&&t.constructor===i}},{key:"__truncateToNBits",value:function(e,t){var n=e+31>>>5,r=new i(n,t.sign);--n;for(var o=0;o<n;o++)r.__setDigit(o,t.__digit(o));return t=t.__digit(n),0!=(31&e)&&(t=t<<(e=32-(31&e))>>>e),r.__setDigit(n,t),r.__trim()}},{key:"__truncateAndSubFromPowerOfTwo",value:function(e,t,n){var r=Math.min,o=e+31>>>5;n=new i(o,n);var s=0,a=0;for(r=r(--o,t.length);s<r;s++){var l=t.__digit(s),c=-(65535&l)-a;a=1&(l=-(l>>>16)-(a=1&c>>>16))>>>16,n.__setDigit(s,65535&c|l<<16)}for(;s<o;s++)n.__setDigit(s,0|-a);return t=o<t.length?t.__digit(o):0,0==(e&=31)?a=65535&(a=-(65535&t)-a)|-(t>>>16)-(1&a>>>16)<<16:(t=t<<(e=32-e)>>>e,a=(65535&(a=(65535&(e=1<<32-e))-(65535&t)-a)|(e>>>16)-(t>>>16)-(1&a>>>16)<<16)&e-1),n.__setDigit(o,a),n.__trim()}},{key:"__digitPow",value:function(e,t){for(var n=1;0<t;)1&t&&(n*=e),t>>>=1,e*=e;return n}}]),i}(l(Array));return f.__kMaxLength=33554432,f.__kMaxLengthBits=f.__kMaxLength<<5,f.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],f.__kBitsPerCharTableShift=5,f.__kBitsPerCharTableMultiplier=1<<f.__kBitsPerCharTableShift,f.__kConversionChars="0123456789abcdefghijklmnopqrstuvwxyz".split(""),f.__kBitConversionBuffer=new ArrayBuffer(8),f.__kBitConversionDouble=new Float64Array(f.__kBitConversionBuffer),f.__kBitConversionInts=new Int32Array(f.__kBitConversionBuffer),f.__clz32=p||function(e){var t=Math.LN2,n=Math.log;return 0===e?32:0|31-(0|n(e>>>0)/t)},f.__imul=h||function(e,t){return 0|e*t},f}()},function(e,t,n){(function(e,t){!function(e,n){function r(e){delete a[e]}function i(e){if(l)setTimeout(i,0,e);else{var t=a[e];if(t){l=!0;try{var n=t.callback,o=t.args;switch(o.length){case 0:n();break;case 1:n(o[0]);break;case 2:n(o[0],o[1]);break;case 3:n(o[0],o[1],o[2]);break;default:n.apply(void 0,o)}}finally{r(e),l=!1}}}}if(!e.setImmediate){var o,s=1,a={},l=!1,c=e.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(e);u=u&&u.setTimeout?u:e,"[object process]"==={}.toString.call(e.process)?o=function(e){t.nextTick((function(){i(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?function(){var t="setImmediate$"+Math.random()+"$",n=function(n){n.source===e&&"string"==typeof n.data&&0===n.data.indexOf(t)&&i(+n.data.slice(t.length))};e.addEventListener?e.addEventListener("message",n,!1):e.attachEvent("onmessage",n),o=function(n){e.postMessage(t+n,"*")}}():e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){i(e.data)},o=function(t){e.port2.postMessage(t)}}():c&&"onreadystatechange"in c.createElement("script")?function(){var e=c.documentElement;o=function(t){var n=c.createElement("script");n.onreadystatechange=function(){i(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():o=function(e){setTimeout(i,0,e)},u.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];return a[s]={callback:e,args:t},o(s),s++},u.clearImmediate=r}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(0),n(8))},function(e,t){function n(){throw Error("setTimeout has not been defined")}function r(){throw Error("clearTimeout has not been defined")}function i(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function o(){p&&d&&(p=!1,d.length?h=d.concat(h):f=-1,h.length&&s())}function s(){if(!p){var e=i(o);p=!0;for(var t=h.length;t;){for(d=h,h=[];++f<t;)d&&d[f].run();f=-1,t=h.length}d=null,p=!1,function(e){if(u===clearTimeout)return clearTimeout(e);if((u===r||!u)&&clearTimeout)return u=clearTimeout,clearTimeout(e);try{u(e)}catch(t){try{return u.call(null,e)}catch(t){return u.call(this,e)}}}(e)}}function a(e,t){this.fun=e,this.array=t}function l(){}e=e.exports={};try{var c="function"==typeof setTimeout?setTimeout:n}catch(e){c=n}try{var u="function"==typeof clearTimeout?clearTimeout:r}catch(e){u=r}var d,h=[],p=!1,f=-1;e.nextTick=function(e){var t=Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.push(new a(e,t)),1!==h.length||p||i(s)},a.prototype.run=function(){this.fun.apply(null,this.array)},e.title="browser",e.browser=!0,e.env={},e.argv=[],e.version="",e.versions={},e.on=l,e.addListener=l,e.once=l,e.off=l,e.removeListener=l,e.removeAllListeners=l,e.emit=l,e.prependListener=l,e.prependOnceListener=l,e.listeners=function(e){return[]},e.binding=function(e){throw Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(e){throw Error("process.chdir is not supported")},e.umask=function(){return 0}},function(e,t){Sk.asserts={},Sk.asserts.assert=function(e,t){return e},Sk.exportSymbol("Sk.asserts.assert",Sk.asserts.assert),Sk.asserts.fail=function(e){},Sk.exportSymbol("Sk.asserts.fail",Sk.asserts.fail)},function(e,t){Sk.bool_check=function(e,t){if(null==e||"boolean"!=typeof e)throw Error("must specify "+t+" and it must be a boolean")},Sk.python2={print_function:!1,division:!1,absolute_import:null,unicode_literals:!1,python3:!1,class_repr:!1,inherit_from_object:!1,super_args:!1,octal_number_literal:!1,bankers_rounding:!1,python_version:!1,dunder_round:!1,exceptions:!1,no_long_type:!1,ceil_floor_int:!1,silent_octal_literal:!0},Sk.python3={print_function:!0,division:!0,absolute_import:null,unicode_literals:!0,python3:!0,class_repr:!0,inherit_from_object:!0,super_args:!0,octal_number_literal:!0,bankers_rounding:!0,python_version:!0,dunder_round:!0,exceptions:!0,no_long_type:!0,ceil_floor_int:!0,silent_octal_literal:!1},Sk.configure=function(e){Sk.output=e.output||Sk.output,Sk.asserts.assert("function"==typeof Sk.output),Sk.debugout=e.debugout||Sk.debugout,Sk.asserts.assert("function"==typeof Sk.debugout),Sk.uncaughtException=e.uncaughtException||Sk.uncaughtException,Sk.asserts.assert("function"==typeof Sk.uncaughtException),Sk.read=e.read||Sk.read,Sk.asserts.assert("function"==typeof Sk.read),Sk.nonreadopen=e.nonreadopen||!1,Sk.asserts.assert("boolean"==typeof Sk.nonreadopen),Sk.fileopen=e.fileopen||void 0,Sk.asserts.assert("function"==typeof Sk.fileopen||void 0===Sk.fileopen),Sk.filewrite=e.filewrite||void 0,Sk.asserts.assert("function"==typeof Sk.filewrite||void 0===Sk.filewrite),Sk.timeoutMsg=e.timeoutMsg||Sk.timeoutMsg,Sk.asserts.assert("function"==typeof Sk.timeoutMsg),Sk.exportSymbol("Sk.timeoutMsg",Sk.timeoutMsg),Sk.sysargv=e.sysargv||Sk.sysargv,Sk.asserts.assert(Sk.isArrayLike(Sk.sysargv)),Sk.__future__=e.__future__||Sk.python3,Sk.bool_check(Sk.__future__.print_function,"Sk.__future__.print_function"),Sk.bool_check(Sk.__future__.division,"Sk.__future__.division"),Sk.bool_check(Sk.__future__.unicode_literals,"Sk.__future__.unicode_literals"),Sk.bool_check(Sk.__future__.class_repr,"Sk.__future__.class_repr"),Sk.bool_check(Sk.__future__.inherit_from_object,"Sk.__future__.inherit_from_object"),Sk.bool_check(Sk.__future__.super_args,"Sk.__future__.super_args"),Sk.bool_check(Sk.__future__.octal_number_literal,"Sk.__future__.octal_number_literal"),Sk.bool_check(Sk.__future__.bankers_rounding,"Sk.__future__.bankers_rounding"),Sk.bool_check(Sk.__future__.python_version,"Sk.__future__.python_version"),Sk.bool_check(Sk.__future__.dunder_round,"Sk.__future__.dunder_round"),Sk.bool_check(Sk.__future__.exceptions,"Sk.__future__.exceptions"),Sk.bool_check(Sk.__future__.no_long_type,"Sk.__future__.no_long_type"),Sk.bool_check(Sk.__future__.ceil_floor_int,"Sk.__future__.ceil_floor_int"),Sk.bool_check(Sk.__future__.silent_octal_literal,"Sk.__future__.silent_octal_literal"),Sk.imageProxy=e.imageProxy||"http://localhost:8080/320x",Sk.asserts.assert("string"==typeof Sk.imageProxy||"function"==typeof Sk.imageProxy),Sk.inputfun=e.inputfun||Sk.inputfun,Sk.asserts.assert("function"==typeof Sk.inputfun),Sk.inputfunTakesPrompt=e.inputfunTakesPrompt||!1,Sk.asserts.assert("boolean"==typeof Sk.inputfunTakesPrompt),Sk.retainGlobals=e.retainglobals||e.retainGlobals||!1,Sk.asserts.assert("boolean"==typeof Sk.retainGlobals),Sk.debugging=e.debugging||!1,Sk.asserts.assert("boolean"==typeof Sk.debugging),Sk.killableWhile=e.killableWhile||!1,Sk.asserts.assert("boolean"==typeof Sk.killableWhile),Sk.killableFor=e.killableFor||!1,Sk.asserts.assert("boolean"==typeof Sk.killableFor),Sk.signals=e.signals,Sk.signals=!0===Sk.signals?{listeners:[],addEventListener(e){Sk.signals.listeners.push(e)},removeEventListener(e){0<=(e=Sk.signals.listeners.indexOf(e))&&Sk.signals.listeners.splice(e,1)},signal(e,t){for(var n=0;n<Sk.signals.listeners.length;n++)Sk.signals.listeners[n].call(null,e,t)}}:null,Sk.asserts.assert("object"==typeof Sk.signals),Sk.breakpoints=e.breakpoints||function(){return!0},Sk.asserts.assert("function"==typeof Sk.breakpoints),Sk.setTimeout=e.setTimeout,void 0===Sk.setTimeout&&(Sk.setTimeout="function"==typeof setTimeout?function(e,t){setTimeout(e,t)}:function(e,t){e()}),Sk.asserts.assert("function"==typeof Sk.setTimeout),"execLimit"in e&&(Sk.execLimit=e.execLimit),"yieldLimit"in e&&(Sk.yieldLimit=e.yieldLimit),e.syspath&&(Sk.syspath=e.syspath,Sk.asserts.assert(Sk.isArrayLike(Sk.syspath)),Sk.realsyspath=void 0,Sk.sysmodules=new Sk.builtin.dict([])),Sk.misceval.softspace_=!1,Sk.switch_version(Sk.__future__.python3),Sk.builtin.str.$next=Sk.__future__.python3?new Sk.builtin.str("__next__"):new Sk.builtin.str("next"),Sk.setupOperators(Sk.__future__.python3),Sk.setupDunderMethods(Sk.__future__.python3),Sk.setupObjects(Sk.__future__.python3),Sk.token.setupTokens(Sk.__future__.python3)},Sk.exportSymbol("Sk.configure",Sk.configure),Sk.uncaughtException=function(e){throw e},Sk.uncaughtException=function(e){throw e},Sk.exportSymbol("Sk.uncaughtException",Sk.uncaughtException),Sk.timeoutMsg=function(){return"Program exceeded run time limit."},Sk.exportSymbol("Sk.timeoutMsg",Sk.timeoutMsg),Sk.execLimit=Number.POSITIVE_INFINITY,Sk.yieldLimit=Number.POSITIVE_INFINITY,Sk.output=function(e){},Sk.read=function(e){if(void 0===Sk.builtinFiles)throw"skulpt-stdlib.js has not been loaded";if(void 0===Sk.builtinFiles.files[e])throw"File not found: '"+e+"'";return Sk.builtinFiles.files[e]},Sk.sysargv=[],Sk.getSysArgv=function(){return Sk.sysargv},Sk.exportSymbol("Sk.getSysArgv",Sk.getSysArgv),Sk.syspath=[],Sk.inBrowser=void 0!==Sk.global.document,Sk.debugout=function(e){},void 0!==Sk.global.write?Sk.output=Sk.global.write:void 0!==Sk.global.console&&void 0!==Sk.global.console.log?Sk.output=function(e){Sk.global.console.log(e)}:void 0!==Sk.global.print&&(Sk.output=Sk.global.print),void 0!==Sk.global.console&&void 0!==Sk.global.console.log?Sk.debugout=function(e){Sk.global.console.log(e)}:void 0!==Sk.global.print&&(Sk.debugout=Sk.global.print),Sk.inputfun=function(e){return window.prompt(e)},Sk.setup_method_mappings=function(){},Sk.setupDictIterators=function(e){},Sk.switch_version=function(e){const t={float_:{method_names:["__round__"],2:[!1],3:[!0]},int_:{method_names:["__round__"],2:[!1],3:[!0]},list:{method_names:["clear","copy","sort"],2:[!1,!1,!0],3:[!0,!0,!0]},dict:{method_names:["has_key","keys","items","values"],2:[!0,!0,!0,!0],3:[!1,!0,!0,!0]}};for(let o in t){const s=Sk.builtin[o],a=t[o].method_names;var n=t[o][3];if(e&&void 0===s.py3$methods)break;if(void 0===s.py3$methods){s.py3$methods={};for(var r=0;r<a.length;r++){var i=a[r];n[r]&&(s.py3$methods[i]=s.prototype[i].d$def)}}for(e?r=s.py3$methods:(n=t[o][2],r=s.py2$methods),i=0;i<a.length;i++){const e=a[i];delete s.prototype[e],n[i]&&(s.prototype[e]=new Sk.builtin.method_descriptor(s,r[e]))}}},Sk.exportSymbol("Sk.__future__",Sk.__future__),Sk.exportSymbol("Sk.inputfun",Sk.inputfun)},function(e,t){function n(e){return this.prototype[e.$mangled]}function r(e){e=e.$mangled;const t=this.prototype.tp$mro;for(let n=0;n<t.length;++n){const r=t[n].prototype;if(r.hasOwnProperty(e))return r[e]}}function i(e,t,i,o){const s=function(e){function t(e){return void 0===e.sk$klass?e:t(e.prototype.tp$base)}let n,r,i,o;0===e.length&&e.push(Sk.builtin.object);for(let s=0;s<e.length;s++){if(o=e[s],!Sk.builtin.checkClass(o))throw new Sk.builtin.TypeError("bases must be 'type' objects");if(!1===o.sk$acceptable_as_base_class)throw new Sk.builtin.TypeError("type '"+o.prototype.tp$name+"' is not an acceptable base type");if(i=t(o),void 0===r)r=i,n=o;else if(!r.$isSubType(i)){if(!i.$isSubType(r))throw new Sk.builtin.TypeError("multiple bases have instance layout conflicts");r=i,n=o}}return n}(i),a=t.prototype;Sk.abstr.setUpInheritance(e,t,s,o),Object.defineProperties(a,{sk$prototypical:{value:!0,writable:!0},tp$bases:{value:i,writable:!0},tp$mro:{value:null,writable:!0},hp$type:{value:!0,writable:!0}}),a.tp$mro=t.$buildMRO(),Object.defineProperties(t,{$typeLookup:{value:a.sk$prototypical?n:r,writable:!0},sk$klass:{value:!0,writable:!0}})}function o(e){for(;null!==e.prototype.tp$base;){if(void 0===e.sk$klass&&e.prototype.hasOwnProperty("__dict__"))return e=e.prototype.__dict__,Sk.builtin.checkDataDescr(e)?e:void 0;e=e.prototype.tp$base}}function s(e,t,n){if(void 0===e.sk$klass)throw new Sk.builtin.TypeError("can't set "+e.prototype.tp$name+"."+n.$jsstr());if(void 0===t)throw new Sk.builtin.TypeError("can't delete "+e.prototype.tp$name+"."+n.$jsstr())}void 0===Sk.builtin&&(Sk.builtin={}),Sk.builtin.type=function(e){return this instanceof Sk.builtin.type&&Sk.asserts.fail("calling new Sk.builtin.type is not safe"),e.ob$type},Object.defineProperties(Sk.builtin.type.prototype,{call:{value:Function.prototype.call},apply:{value:Function.prototype.apply},tp$slots:{value:{tp$doc:"type(object_or_name, bases, dict)\ntype(object) -> the object's type\ntype(name, bases, dict) -> a new type",tp$call:function(e,t){if(this===Sk.builtin.type){if(1===e.length&&(void 0===t||!t.length))return e[0].ob$type;if(3!==e.length)throw new Sk.builtin.TypeError("type() takes 1 or 3 arguments")}let n=this.prototype.tp$new(e,t);if(n.$isSuspension)return Sk.misceval.chain(n,r=>{if(n=r,n.ob$type.$isSubType(this))return n.tp$init(e,t)},()=>n);if(n.ob$type.$isSubType(this)){const r=n.tp$init(e,t);return void 0!==r&&r.$isSuspension?Sk.misceval.chain(r,()=>n):n}return n},tp$new:function(e,t){if(3!==e.length){if(1===e.length&&(void 0===t||!t.length))return e[0].ob$type;throw new Sk.builtin.TypeError("type() takes 1 or 3 arguments")}let n;if(t=e[0],n=e[1],"dict"!==(e=e[2]).tp$name)throw new Sk.builtin.TypeError("type() argument 3 must be dict, not "+Sk.abstr.typeName(e));if(!Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("type() argument 1 must be str, not "+Sk.abstr.typeName(t));if(t=t.$jsstr(),"tuple"!==n.tp$name)throw new Sk.builtin.TypeError("type() argument 2 must be tuple, not "+Sk.abstr.typeName(n));n=n.sk$asarray();const r=function(){this.$d=new Sk.builtin.dict};return i(t,r,n,this.constructor),Sk.globals&&(r.prototype.__module__=Sk.globals.__name__),r.prototype.__doc__=Sk.builtin.none.none$,void 0===r.$typeLookup(Sk.builtin.str.$dict)&&(r.prototype.__dict__=new Sk.builtin.getset_descriptor(r,a)),e.$items().forEach(([e,t])=>{r.prototype[e.$mangled]=t}),r.prototype.hasOwnProperty("__new__")&&((e=r.prototype.__new__)instanceof Sk.builtin.func&&(r.prototype.__new__=new Sk.builtin.staticmethod(e))),r.$allocateSlots(),r},tp$getattr:function(e,t){var n=this.ob$type;const r=n.$typeLookup(e);let i;return void 0!==r&&(i=r.tp$descr_get,void 0!==i&&void 0!==r.tp$descr_set)?i.call(r,this,n,t):void 0!==(e=this.$typeLookup(e))?void 0!==(n=e.tp$descr_get)?t=n.call(e,null,this,t):e:void 0!==i?i.call(r,this,n,t):void 0!==r?r:void 0},tp$setattr:function(e,t,n){if(!this.sk$klass){if(void 0!==t)throw new Sk.builtin.TypeError("can't set attributes of built-in/extension type '"+this.prototype.tp$name+"'");throw new Sk.builtin.TypeError("can't delete attributes on type object '"+this.prototype.tp$name+"'")}const r=this.ob$type.$typeLookup(e);if(void 0!==r){const e=r.tp$descr_set;if(e)return e.call(r,this,t,n)}if(n=e.$mangled,void 0===t){if(!(t=this.prototype).hasOwnProperty(n))throw new Sk.builtin.AttributeError("type object '"+this.prototype.tp$name+"' has no attribute '"+e.$jsstr()+"'");delete t[n],void 0!==(e=Sk.dunderToSkulpt[n])&&(delete this.prototype[e],t.sk$prototypical||this.$allocateGetterSlot(n))}else this.prototype[n]=t,n in Sk.dunderToSkulpt&&this.$allocateSlot(n,t)},$r:function(){let e=this.prototype.__module__,t="",n="class";return e&&Sk.builtin.checkString(e)?t=e.v+".":e=null,e||this.sk$klass||Sk.__future__.class_repr||(n="type"),new Sk.builtin.str("<"+n+" '"+t+this.prototype.tp$name+"'>")}},writable:!0},tp$methods:{value:null,writable:!0},tp$getsets:{value:null,writable:!0},sk$type:{value:!0},$isSubType:{value:function(e){return this===e||this.prototype instanceof e||!this.prototype.sk$prototypical&&this.prototype.tp$mro.includes(e)}},$allocateSlot:{value:function(e,t){const n=(e=Sk.slots[e]).$slot_name,r=this.prototype;r.hasOwnProperty(n)&&delete r[n],r[n]=e.$slot_func(t)}},$allocateSlots:{value:function(){const e=this.prototype;this.prototype.sk$prototypical?Object.keys(e).forEach(t=>{t in Sk.slots&&this.$allocateSlot(t,e[t])}):Object.keys(Sk.slots).forEach(t=>{e.hasOwnProperty(t)?this.$allocateSlot(t,e[t]):this.$allocateGetterSlot(t)})}},$allocateGetterSlot:{value:function(e){const t=Sk.slots[e].$slot_name,n=this.prototype;n.hasOwnProperty(t)||Object.defineProperty(n,t,{configurable:!0,get(){const e=n.tp$mro;for(let n=1;n<e.length;n++){const r=Object.getOwnPropertyDescriptor(e[n].prototype,t);if(void 0!==r&&r.value)return r.value}}})}},$typeLookup:{value:function(e){return this.prototype.sk$prototypical?this.prototype[e.$mangled]:r.call(this,e)},writable:!0},$mroMerge:{value:function(e){let t;this.prototype.sk$prototypical=!0;const n=[];for(;;){for(t=0;t<e.length;++t){var r=e[t];if(0!==r.length)break}if(t===e.length)return n;var i=[];for(t=0;t<e.length;++t)if(0!==(r=e[t]).length){const t=r[0];r=0;e:for(;r<e.length;++r){const n=e[r];for(let e=1;e<n.length;++e)if(n[e]===t)break e}r===e.length&&i.push(t)}if(0===i.length)throw new Sk.builtin.TypeError("Inconsistent precedences in type hierarchy");for(i=i[0],n.length&&this.prototype.sk$prototypical&&Object.getPrototypeOf(n[n.length-1].prototype)!==i.prototype&&(this.prototype.sk$prototypical=!1),n.push(i),t=0;t<e.length;++t)0<(r=e[t]).length&&r[0]===i&&r.splice(0,1)}}},$buildMRO:{value:function(){const e=[[this]],t=this.prototype.tp$bases;for(var n=0;n<t.length;++n)e.push([...t[n].prototype.tp$mro]);n=[];for(let e=0;e<t.length;++e)n.push(t[e]);return e.push(n),this.$mroMerge(e)}},sk$attrError:{value(){return"type object '"+this.prototype.tp$name+"'"},writable:!0}}),Sk.builtin.type.prototype.tp$getsets={__base__:{$get(){return this.prototype.tp$base||Sk.builtin.none.none$}},__bases__:{$get(){return void 0===this.sk$tuple_bases&&(this.sk$tuple_bases=new Sk.builtin.tuple(this.prototype.tp$bases)),this.sk$tuple_bases}},__mro__:{$get(){return void 0===this.sk$tuple_mro&&(this.sk$tuple_mro=new Sk.builtin.tuple(this.prototype.tp$mro)),this.sk$tuple_mro}},__dict__:{$get(){return new Sk.builtin.mappingproxy(this.prototype)}},__doc__:{$get(){const e=this.$typeLookup(Sk.builtin.str.$doc);return e?void 0!==e.tp$descr_get?this===Sk.builtin.type?new Sk.builtin.str(this.prototype.tp$doc):e.tp$descr_get(null,this):this.prototype.__doc__:Sk.builtin.none.none$},$set(e){s(this,e,Sk.builtin.str.$doc),this.prototype.__doc__=e}},__name__:{$get(){return new Sk.builtin.str(this.prototype.tp$name)},$set(e){if(s(this,e,Sk.builtin.str.$name),!Sk.builtin.checkString(e))throw new Sk.builtin.TypeError("can only assign string to "+this.prototype.tp$name+".__name__, not '"+Sk.abstr.typeName(e)+"'");this.prototype.tp$name=e.$jsstr()}},__module__:{$get(){let e=this.prototype.__module__;return e&&e.ob$type!==Sk.builtin.getset_descriptor?e:new Sk.builtin.str("builtins")},$set(e){s(this,e,Sk.builtin.str.$module),this.prototype.__module__=e}}},Sk.builtin.type.prototype.tp$methods={mro:{$meth(){return new Sk.builtin.list(this.$buildMRO())},$flags:{NoArgs:!0}},__dir__:{$meth:function(){function e(e){e in Sk.reservedWords_||(-1!==(e=Sk.unfixReserved(e)).indexOf("$")||t.has(e)||(t.add(e),n.push(new Sk.builtin.str(e))))}const t=new Set,n=[];if(this.prototype.sk$prototypical)for(var r in this.prototype)e(r);else{r=this.prototype.tp$mro;for(let t=0;t<r.length;t++){const n=Object.getOwnPropertyNames(r[t].prototype);for(let t=0;t<n.length;t++)e(n[t])}}return new Sk.builtin.list(n)},$flags:{NoArgs:!0},$doc:"Specialized __dir__ implementation for types."}};const a={$get(){const e=o(this.ob$type);return void 0!==e?e.tp$descr_get(this,this.ob$type):Sk.generic.getSetDict.$get.call(this)},$set(e){const t=o(this.ob$type);return void 0!==t?t.tp$descr_set(this,e):Sk.generic.getSetDict.$set.call(this,e)},$doc:"dictionary for instance variables (if defined)",$name:"__dict__"}},function(e,t){Sk.generic={},Sk.generic.getAttr=function(e,t){let n;const r=this.ob$type,i=r.$typeLookup(e);if(void 0!==i&&(n=i.tp$descr_get,void 0!==n&&void 0!==i.tp$descr_set))return n.call(i,this,r,t);const o=this.$d;return void 0!==o&&void 0!==(e=o.quick$lookup(e))?e:void 0!==n?n.call(i,this,r,t):void 0!==i?i:void 0},Sk.exportSymbol("Sk.generic.getAttr",Sk.generic.getAttr),Sk.generic.setAttr=function(e,t,n){var r=this.ob$type.$typeLookup(e);if(null!=r){const e=r.tp$descr_set;if(e)return e.call(r,this,t,n)}if(void 0!==(n=this.$d))if(n.mp$ass_subscript){if(void 0!==t)return n.mp$ass_subscript(e,t);try{return n.mp$ass_subscript(e)}catch(t){if(t instanceof Sk.builtin.KeyError)throw new Sk.builtin.AttributeError("'"+Sk.abstr.typeName(this)+"' object has no attribute '"+e.$jsstr()+"'");throw t}}else if("object"==typeof n){if(r=e.$mangled,void 0!==t)return void(n[r]=t);if(void 0!==n[r])return void delete n[r]}throw new Sk.builtin.AttributeError(this.sk$attrError()+" has no attribute '"+e.$jsstr()+"'")},Sk.exportSymbol("Sk.generic.setAttr",Sk.generic.setAttr),Sk.generic.new=function(e){return function(t,n){return this.constructor===e?new this.constructor:(t=new this.constructor,e.call(t),t)}},Sk.generic.newMethodDef={$meth(e,t){const n=this.prototype;if(1>e.length)throw e=n.tp$name,new Sk.builtin.TypeError(e+".__new__(): not enough arguments");var r=e.shift();if(void 0===r.sk$type)throw e=n.tp$name,new Sk.builtin.TypeError(e+"__new__(X): X is not a type object ("+Sk.abstr.typeName(r)+")");if(!r.$isSubType(this))throw e=n.tp$name,r=r.prototype.tp$name,new Sk.builtin.TypeError(e+".__new__("+r+"): "+r+" is not a subtype of "+e);const i=r.prototype.sk$staticNew.prototype;if(i.tp$new!==n.tp$new)throw e=n.tp$name,r=r.prototype.tp$name,new Sk.builtin.TypeError(e+".__new__("+r+") is not safe, use "+i.tp$name+".__new__()");return n.tp$new.call(r.prototype,e,t)},$flags:{FastCall:!0},$textsig:"($type, *args, **kwargs)",$name:"__new__"},Sk.generic.selfIter=function(){return this},Sk.generic.iterNextWithArrayCheckSize=function(){if(this.$seq.length!==this.$orig.get$size()){const e=this.tp$name.split("_")[0];throw new Sk.builtin.RuntimeError(e+" changed size during iteration")}if(!(this.$index>=this.$seq.length))return this.$seq[this.$index++]},Sk.generic.iterNextWithArray=function(){const e=this.$seq[this.$index++];return void 0===e&&(this.tp$iternext=()=>{}),e},Sk.generic.iterLengthHintWithArrayMethodDef={$meth:function(){return new Sk.builtin.int_(this.$seq.length-this.$index)},$flags:{NoArgs:!0}},Sk.generic.iterReverseLengthHintMethodDef={$meth:function(){return new Sk.builtin.int_(this.$index)},$flags:{NoArgs:!0}},Sk.generic.getSetDict={$get(){return this.$d},$set(e){if(void 0===e)this.$d=new Sk.builtin.dict;else{if(!(e instanceof Sk.builtin.dict))throw new Sk.builtin.TypeError("__dict__ must be set to a dictionary, not a '"+Sk.abstr.typeName(e)+"'");this.$d=e}},$doc:"dictionary for instance variables (if defined)",$name:"__dict__"},Sk.generic.seqCompare=function(e,t){if(this===e&&Sk.misceval.opAllowsEquality(t))return!0;if(!(e instanceof this.sk$builtinBase))return Sk.builtin.NotImplemented.NotImplemented$;const n=this.v;let r;if(e=e.v,n.length!==e.length&&("Eq"===t||"NotEq"===t))return"Eq"!==t;for(r=0;r<n.length&&r<e.length&&(n[r]===e[r]||Sk.misceval.richCompareBool(n[r],e[r],"Eq"));++r);const i=n.length,o=e.length;if(r>=i||r>=o)switch(t){case"Lt":return i<o;case"LtE":return i<=o;case"Eq":return i===o;case"NotEq":return i!==o;case"Gt":return i>o;case"GtE":return i>=o;default:Sk.asserts.fail()}return"Eq"!==t&&("NotEq"===t||Sk.misceval.richCompareBool(n[r],e[r],t))}},function(e,t){Sk.builtin.pyCheckArgs=function(e,t,n,r,i,o){if(t=t.length,void 0===r&&(r=1/0),i&&--t,o&&--t,t<n||t>r)throw new Sk.builtin.TypeError((n===r?e+"() takes exactly "+n+" arguments":t<n?e+"() takes at least "+n+" arguments":0<n?e+"() takes at most "+r+" arguments":e+"() takes no arguments")+" ("+t+" given)")},Sk.exportSymbol("Sk.builtin.pyCheckArgs",Sk.builtin.pyCheckArgs),Sk.builtin.pyCheckArgsLen=function(e,t,n,r,i,o){if(void 0===r&&(r=1/0),i&&--t,o&&--t,t<n||t>r)throw new Sk.builtin.TypeError((n===r?e+"() takes exactly "+n+" arguments":t<n?e+"() takes at least "+n+" arguments":e+"() takes at most "+r+" arguments")+" ("+t+" given)")},Sk.builtin.pyCheckType=function(e,t,n){if(!n)throw new Sk.builtin.TypeError(e+" must be a "+t)},Sk.exportSymbol("Sk.builtin.pyCheckType",Sk.builtin.pyCheckType),Sk.builtin.checkSequence=function(e){return null!=e&&void 0!==e.mp$subscript},Sk.exportSymbol("Sk.builtin.checkSequence",Sk.builtin.checkSequence),Sk.builtin.checkIterable=function(e){return void 0!==e&&(e.tp$iter?void 0!==e.tp$iter().tp$iternext:void 0!==e.mp$subscript)},Sk.exportSymbol("Sk.builtin.checkIterable",Sk.builtin.checkIterable),Sk.builtin.checkCallable=function(e){return null!=e&&void 0!==e.tp$call},Sk.builtin.checkNumber=function(e){return"number"==typeof e||e instanceof Sk.builtin.int_||e instanceof Sk.builtin.float_||e instanceof Sk.builtin.lng},Sk.exportSymbol("Sk.builtin.checkNumber",Sk.builtin.checkNumber),Sk.builtin.checkComplex=function(e){return e instanceof Sk.builtin.complex},Sk.exportSymbol("Sk.builtin.checkComplex",Sk.builtin.checkComplex),Sk.builtin.checkInt=function(e){return e instanceof Sk.builtin.int_||"number"==typeof e&&Number.isInteger(e)},Sk.exportSymbol("Sk.builtin.checkInt",Sk.builtin.checkInt),Sk.builtin.checkFloat=function(e){return e instanceof Sk.builtin.float_},Sk.exportSymbol("Sk.builtin.checkFloat",Sk.builtin.checkFloat),Sk.builtin.checkString=function(e){return e instanceof Sk.builtin.str},Sk.exportSymbol("Sk.builtin.checkString",Sk.builtin.checkString),Sk.builtin.checkBytes=function(e){return e instanceof Sk.builtin.bytes},Sk.builtin.checkClass=function(e){return e instanceof Sk.builtin.type},Sk.exportSymbol("Sk.builtin.checkClass",Sk.builtin.checkClass),Sk.builtin.checkBool=function(e){return e instanceof Sk.builtin.bool},Sk.exportSymbol("Sk.builtin.checkBool",Sk.builtin.checkBool),Sk.builtin.checkNone=function(e){return e===Sk.builtin.none.none$},Sk.exportSymbol("Sk.builtin.checkNone",Sk.builtin.checkNone),Sk.builtin.checkFunction=function(e){return null!=e&&void 0!==e.tp$call},Sk.exportSymbol("Sk.builtin.checkFunction",Sk.builtin.checkFunction),Sk.builtin.checkDataDescr=function(e){return e&&void 0!==e.tp$descr_set},Sk.exportSymbol("Sk.builtin.checkDataDescr",Sk.builtin.checkDataDescr),Sk.builtin.checkAnySet=function(e){return e instanceof Sk.builtin.set||e instanceof Sk.builtin.frozenset},Sk.builtin.checkMapping=function(e){return e instanceof Sk.builtin.dict||e instanceof Sk.builtin.mappingproxy||null!=e&&void 0!==e.mp$subscript&&void 0!==Sk.abstr.lookupSpecial(e,Sk.builtin.str.$keys)}},function(e,t){function n(e,t){switch(t){case"Add":return e.nb$reflected_add;case"Sub":return e.nb$reflected_subtract;case"Mult":return e.nb$reflected_multiply;case"MatMult":if(Sk.__future__.python3)return e.nb$reflected_matrix_multiply;case"Div":return e.nb$reflected_divide;case"FloorDiv":return e.nb$reflected_floor_divide;case"Mod":return e.nb$reflected_remainder;case"DivMod":return e.nb$reflected_divmod;case"Pow":return e.nb$reflected_power;case"LShift":return e.nb$reflected_lshift;case"RShift":return e.nb$reflected_rshift;case"BitAnd":return e.nb$reflected_and;case"BitXor":return e.nb$reflected_xor;case"BitOr":return e.nb$reflected_or}}function r(e,t,r){var i=t.constructor,o=e.constructor;return(i=i!==o&&void 0===i.sk$baseClass&&t instanceof o)&&(void 0!==(o=n(t,r))&&o!==n(e,r)&&(o=o.call(t,e))!==Sk.builtin.NotImplemented.NotImplemented$)||void 0!==(o=function(e,t){switch(t){case"Add":return e.nb$add;case"Sub":return e.nb$subtract;case"Mult":return e.nb$multiply;case"MatMult":if(Sk.__future__.python3)return e.nb$matrix_multiply;case"Div":return e.nb$divide;case"FloorDiv":return e.nb$floor_divide;case"Mod":return e.nb$remainder;case"DivMod":return e.nb$divmod;case"Pow":return e.nb$power;case"LShift":return e.nb$lshift;case"RShift":return e.nb$rshift;case"BitAnd":return e.nb$and;case"BitXor":return e.nb$xor;case"BitOr":return e.nb$or}}(e,r))&&(o=o.call(e,t))!==Sk.builtin.NotImplemented.NotImplemented$||!i&&(void 0!==(o=n(t,r))&&(o=o.call(t,e))!==Sk.builtin.NotImplemented.NotImplemented$)?o:void 0}Sk.abstr={},Sk.abstr.typeName=function(e){return null!=e&&void 0!==e.tp$name?e.tp$name:"<invalid type>"};const i={Add:"+",Sub:"-",Mult:"*",MatMult:"@",Div:"/",FloorDiv:"//",Mod:"%",DivMod:"divmod()",Pow:"** or pow()",LShift:"<<",RShift:">>",BitAnd:"&",BitXor:"^",BitOr:"|"},o={UAdd:"+",USub:"-",Invert:"~"};Sk.abstr.numberBinOp=function(e,t,n){var o;if(!(o=r(e,t,n)))throw e=Sk.abstr.typeName(e),t=Sk.abstr.typeName(t),new Sk.builtin.TypeError("unsupported operand type(s) for "+i[n]+": '"+e+"' and '"+t+"'");return o},Sk.exportSymbol("Sk.abstr.numberBinOp",Sk.abstr.numberBinOp),Sk.abstr.numberInplaceBinOp=function(e,t,n){var o=function(e,t){switch(t){case"Add":return e.nb$inplace_add;case"Sub":return e.nb$inplace_subtract;case"Mult":return e.nb$inplace_multiply;case"MatMult":if(Sk.__future__.python3)return e.nb$inplace_matrix_multiply;case"Div":return e.nb$inplace_divide;case"FloorDiv":return e.nb$inplace_floor_divide;case"Mod":return e.nb$inplace_remainder;case"Pow":return e.nb$inplace_power;case"LShift":return e.nb$inplace_lshift;case"RShift":return e.nb$inplace_rshift;case"BitAnd":return e.nb$inplace_and;case"BitOr":return e.nb$inplace_or;case"BitXor":return e.nb$inplace_xor}}(e,n);if(void 0!==o&&(o=o.call(e,t))!==Sk.builtin.NotImplemented.NotImplemented$||(o=r(e,t,n)),!o)throw e=Sk.abstr.typeName(e),t=Sk.abstr.typeName(t),new Sk.builtin.TypeError("unsupported operand type(s) for "+i[n]+"=: '"+e+"' and '"+t+"'");return o},Sk.exportSymbol("Sk.abstr.numberInplaceBinOp",Sk.abstr.numberInplaceBinOp),Sk.abstr.numberUnaryOp=function(e,t){if("Not"===t)return Sk.misceval.isTrue(e)?Sk.builtin.bool.false$:Sk.builtin.bool.true$;e:{switch(t){case"USub":var n=e.nb$negative;break e;case"UAdd":n=e.nb$positive;break e;case"Invert":n=e.nb$invert;break e}n=void 0}if(!(n=void 0!==n?n.call(e):void 0))throw e=Sk.abstr.typeName(e),new Sk.builtin.TypeError("bad operand type for unary "+o[t]+": '"+e+"'");return n},Sk.exportSymbol("Sk.abstr.numberUnaryOp",Sk.abstr.numberUnaryOp),Sk.abstr.fixSeqIndex_=function(e,t){return 0>(t=Sk.builtin.asnum$(t))&&e.sq$length&&(t+=e.sq$length()),t},Sk.abstr.sequenceContains=function(e,t,n){return e.sq$contains?e.sq$contains(t,n):(e=Sk.misceval.iterFor(Sk.abstr.iter(e),(function(e){return!(e!==t&&!Sk.misceval.richCompareBool(e,t,"Eq"))&&new Sk.misceval.Break(!0)}),!1),n?e:Sk.misceval.retryOptionalSuspensionOrThrow(e))},Sk.abstr.sequenceConcat=function(e,t){if(e.sq$concat)return e.sq$concat(t);throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(e)+"' object can't be concatenated")},Sk.abstr.sequenceGetIndexOf=function(e,t){if(e.index)return Sk.misceval.callsimArray(e.index,[e,t]);let n=0;for(let r=Sk.abstr.iter(e),i=r.tp$iternext();void 0!==i;i=r.tp$iternext()){if(Sk.misceval.richCompareBool(t,i,"Eq"))return new Sk.builtin.int_(n);n+=1}throw new Sk.builtin.ValueError("sequence.index(x): x not in sequence")},Sk.abstr.sequenceGetCountOf=function(e,t){if(e.count)return Sk.misceval.callsimArray(e.count,[e,t]);let n=0;for(let r=Sk.abstr.iter(e),i=r.tp$iternext();void 0!==i;i=r.tp$iternext())Sk.misceval.richCompareBool(t,i,"Eq")&&(n+=1);return new Sk.builtin.int_(n)},Sk.abstr.sequenceGetItem=function(e,t,n){return"number"==typeof t&&(t=new Sk.builtin.int_(t)),Sk.abstr.objectGetItem(e,t,n)},Sk.abstr.sequenceSetItem=function(e,t,n,r){return"number"==typeof t&&(t=new Sk.builtin.int_(t)),Sk.abstr.objectSetItem(e,t,n,r)},Sk.abstr.sequenceDelItem=function(e,t,n){return Sk.abstr.objectDelItem(e,t,n)},Sk.abstr.sequenceGetSlice=function(e,t,n){return Sk.abstr.objectGetItem(e,new Sk.builtin.slice(t,n))},Sk.abstr.sequenceDelSlice=function(e,t,n){return Sk.abstr.objectDelItem(e,new Sk.builtin.slice(t,n))},Sk.abstr.sequenceSetSlice=function(e,t,n,r){return Sk.abstr.objectSetItem(e,new Sk.builtin.slice(t,n))},Sk.abstr.sequenceUnpack=function(e,t,n,r){if(!Sk.builtin.checkIterable(e))throw new Sk.builtin.TypeError("cannot unpack non-iterable "+Sk.abstr.typeName(e)+" object");const i=Sk.abstr.iter(e),o=[];let s,a=0;return 0<t&&(s=Sk.misceval.iterFor(i,e=>{if(o.push(e),++a===t)return new Sk.misceval.Break})),Sk.misceval.chain(s,()=>{if(o.length<t)throw new Sk.builtin.ValueError("not enough values to unpack (expected at least "+n+", got "+o.length+")");if(!r)return Sk.misceval.chain(i.tp$iternext(!0),e=>{if(void 0!==e)throw new Sk.builtin.ValueError("too many values to unpack (expected "+t+")");return o});const e=[];return Sk.misceval.chain(Sk.misceval.iterFor(i,t=>{e.push(t)}),()=>{const r=e.length+t-n;if(0>r)throw new Sk.builtin.ValueError("not enough values to unpack (expected at least "+n+", got "+(n+r)+")");return o.push(new Sk.builtin.list(e.slice(0,r))),o.push(...e.slice(r)),o})})},Sk.abstr.mappingUnpackIntoKeywordArray=function(e,t,n){if(!(t instanceof Sk.builtin.dict)){var r=Sk.abstr.lookupSpecial(t,Sk.builtin.str.$keys);if(void 0===r)throw new Sk.builtin.TypeError("Object is not a mapping");return Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(r),r=>Sk.misceval.iterFor(Sk.abstr.iter(r),r=>{if(!Sk.builtin.checkString(r))throw new Sk.builtin.TypeError((n.$qualname?n.$qualname+"() ":"")+"keywords must be strings");return Sk.misceval.chain(t.mp$subscript(r,!0),t=>{e.push(r.v),e.push(t)})}))}t.$items().forEach(([t,r])=>{if(!Sk.builtin.checkString(t))throw new Sk.builtin.TypeError((n.$qualname?n.$qualname+"() ":"")+"keywords must be strings");e.push(t.v),e.push(r)})},Sk.abstr.copyKeywordsToNamedArgs=function(e,t,n,r,i){r=r||[];var o=n.length+r.length/2;if(o>t.length)throw new Sk.builtin.TypeError(e+"() expected at most "+t.length+" arguments ("+o+" given)");if(!r.length&&void 0===i)return n;if(o===t.length&&!r.length)return n;if(0===o&&t.length===(i&&i.length))return i;for(n=n.slice(0),o=0;o<r.length;o+=2){const i=r[o],s=r[o+1],a=t.indexOf(i);if(!(0<=a))throw new Sk.builtin.TypeError(e+"() got an unexpected keyword argument '"+i+"'");if(void 0!==n[a])throw new Sk.builtin.TypeError(e+"() got multiple values for argument '"+i+"'");n[a]=s}if(i){for(o=(r=t.length)-1;0<=o;o--)void 0===n[o]&&(n[o]=i[i.length-1-(r-1-o)]);if((t=t.filter((e,t)=>void 0===n[t])).length)throw new Sk.builtin.TypeError(e+"() missing "+t.length+" required positional arguments: "+t.join(", "))}return n},Sk.exportSymbol("Sk.abstr.copyKeywordsToNamedArgs",Sk.abstr.copyKeywordsToNamedArgs),Sk.abstr.checkNoKwargs=function(e,t){if(t&&t.length)throw new Sk.builtin.TypeError(e+"() takes no keyword arguments")},Sk.exportSymbol("Sk.abstr.checkNoKwargs",Sk.abstr.checkNoKwargs),Sk.abstr.checkNoArgs=function(e,t,n){if(t=t.length+(n?n.length:0))throw new Sk.builtin.TypeError(e+"() takes no arguments ("+t+" given)")},Sk.exportSymbol("Sk.abstr.checkNoArgs",Sk.abstr.checkNoArgs),Sk.abstr.checkOneArg=function(e,t,n){if(Sk.abstr.checkNoKwargs(e,n),1!==t.length)throw new Sk.builtin.TypeError(e+"() takes exactly one argument ("+t.length+" given)")},Sk.exportSymbol("Sk.abstr.checkOneArg",Sk.abstr.checkOneArg),Sk.abstr.checkArgsLen=function(e,t,n,r){if(void 0===r&&(r=1/0),(t=t.length)<n||t>r)throw new Sk.builtin.TypeError((n===r?e+"() takes exactly "+n+" arguments":t<n?e+"() takes at least "+n+" arguments":e+"() takes at most "+r+" arguments")+" ("+t+" given)")},Sk.exportSymbol("Sk.abstr.checkArgsLen",Sk.abstr.checkArgsLen),Sk.abstr.objectFormat=function(e,t){if(e=Sk.abstr.lookupSpecial(e,Sk.builtin.str.$format),t=Sk.misceval.callsimArray(e,[t]),!Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("__format__ must return a str, not "+Sk.abstr.typeName(t));return t},Sk.abstr.objectHash=function(e){const t=e.tp$hash;if(void 0!==t){if(Sk.builtin.checkNone(t))throw new Sk.builtin.TypeError("unhashable type: '"+Sk.abstr.typeName(e)+"'");return e.tp$hash()}throw new Sk.builtin.TypeError("unsupported Javascript type")},Sk.abstr.objectAdd=function(e,t){if(e.nb$add)return e.nb$add(t);throw e=Sk.abstr.typeName(e),t=Sk.abstr.typeName(t),new Sk.builtin.TypeError("unsupported operand type(s) for +: '"+e+"' and '"+t+"'")},Sk.abstr.objectNegative=function(e){if(e.nb$negative)return e.nb$negative();throw new Sk.builtin.TypeError("bad operand type for unary -: '"+Sk.abstr.typeName(e)+"'")},Sk.abstr.objectPositive=function(e){if(e.nb$positive)return e.nb$positive();throw new Sk.builtin.TypeError("bad operand type for unary +: '"+Sk.abstr.typeName(e)+"'")},Sk.abstr.objectDelItem=function(e,t,n){if(e.mp$ass_subscript)return e.mp$ass_subscript(t,void 0,n);throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(e)+"' object does not support item deletion")},Sk.exportSymbol("Sk.abstr.objectDelItem",Sk.abstr.objectDelItem),Sk.abstr.objectGetItem=function(e,t,n){if(e.mp$subscript)return e.mp$subscript(t,n);throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(e)+"' does not support indexing")},Sk.exportSymbol("Sk.abstr.objectGetItem",Sk.abstr.objectGetItem),Sk.abstr.objectSetItem=function(e,t,n,r){if(e.mp$ass_subscript)return e.mp$ass_subscript(t,n,r);throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(e)+"' does not support item assignment")},Sk.exportSymbol("Sk.abstr.objectSetItem",Sk.abstr.objectSetItem),Sk.abstr.gattr=function(e,t,n){if(void 0===(n=e.tp$getattr(t,n)))throw new Sk.builtin.AttributeError(e.sk$attrError()+" has no attribute '"+t.$jsstr()+"'");return n.$isSuspension?Sk.misceval.chain(n,(function(n){if(void 0===n)throw new Sk.builtin.AttributeError(e.sk$attrError()+" has no attribute '"+t.$jsstr()+"'");return n})):n},Sk.exportSymbol("Sk.abstr.gattr",Sk.abstr.gattr),Sk.abstr.sattr=function(e,t,n,r){return e.tp$setattr(t,n,r)},Sk.exportSymbol("Sk.abstr.sattr",Sk.abstr.sattr),Sk.abstr.iternext=function(e,t){return e.tp$iternext(t)},Sk.exportSymbol("Sk.abstr.iternext",Sk.abstr.iternext),Sk.abstr.iter=function(e){if(e.tp$iter){if((e=e.tp$iter()).tp$iternext)return e;throw new Sk.builtin.TypeError("iter() returned non-iterator of type '"+Sk.abstr.typeName(e)+"'")}if(e.mp$subscript)return new Sk.builtin.seq_iter_(e);throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(e)+"' object is not iterable")},Sk.exportSymbol("Sk.abstr.iter",Sk.abstr.iter),Sk.abstr.lookupSpecial=function(e,t){var n=e.ob$type;if(void 0===n)Sk.asserts.fail("javascript object sent to lookupSpecial");else if(void 0!==(t=n.$typeLookup(t)))return void 0!==t.tp$descr_get&&(t=t.tp$descr_get(e,n)),t},Sk.exportSymbol("Sk.abstr.lookupSpecial",Sk.abstr.lookupSpecial),Sk.abstr.typeLookup=function(e,t){return void 0!==(t=e.$typeLookup(t))&&t.tp$descr_get?t.tp$descr_get(null,e):t},Sk.abstr.markUnhashable=function(e){(e=e.prototype).__hash__=Sk.builtin.none.none$,e.tp$hash=Sk.builtin.none.none$},Sk.abstr.setUpInheritance=function(e,t,n,r){r=r||Sk.builtin.type;const i=null!==(n=void 0===n?Sk.builtin.object:n)?n.prototype:null;Object.setPrototypeOf(t,r.prototype),Object.setPrototypeOf(t.prototype,i),Object.defineProperties(t.prototype,{sk$object:{value:t,writable:!0},ob$type:{value:t,writable:!0},tp$name:{value:e,writable:!0},tp$base:{value:n,writable:!0}})},Sk.abstr.setUpBuiltinMro=function(e){let t=e.prototype.tp$base;const n=null===t?[]:[t];t!==Sk.builtin.object&&null!==t||(Object.defineProperty(e,"sk$baseClass",{value:!0,writable:!0}),Object.defineProperty(e.prototype,"sk$builtinBase",{value:e,writable:!0}));const r=[e];for(;null!==t;)r.push(t),t=t.prototype.tp$base;Object.defineProperties(e.prototype,{sk$prototypical:{value:!0,writable:!0},tp$bases:{value:n,writable:!0},tp$mro:{value:r,writable:!0}}),Object.defineProperty(e,"$typeLookup",{value:function(e){return this.prototype[e.$mangled]},writable:!0})},Sk.abstr.setUpGetSets=function(e,t){if(void 0!==Sk.builtin.getset_descriptor){var n=e.prototype;t=t||n.tp$getsets||{},Object.entries(t).forEach(([t,r])=>{r.$name=t,n[t]=new Sk.builtin.getset_descriptor(e,r)}),Object.defineProperty(n,"tp$getsets",{value:null,writable:!0})}},Sk.abstr.setUpMethods=function(e,t){if(void 0!==Sk.builtin.method_descriptor){var n=e.prototype;t=t||n.tp$methods||{},Object.entries(t).forEach(([t,r])=>{r.$name=t,n[t]=new Sk.builtin.method_descriptor(e,r)}),Object.defineProperty(n,"tp$methods",{value:null,writable:!0})}},Sk.abstr.setUpClassMethods=function(e,t){if(void 0!==Sk.builtin.classmethod_descriptor){var n=e.prototype;t=t||n.tp$classmethods||{},Object.entries(t).forEach(([t,r])=>{r.$name=t,n[t]=new Sk.builtin.classmethod_descriptor(e,r)}),Object.defineProperty(n,"tp$classmethods",{value:null,writable:!0})}};const s=Object.entries({Eq:"ob$eq",NotEq:"ob$ne",Gt:"ob$gt",GtE:"ob$ge",Lt:"ob$lt",LtE:"ob$le"});Sk.abstr.setUpSlots=function(e,t){function n(t,n){i[t]=new Sk.builtin.wrapper_descriptor(e,Sk.slots[t],n)}function r(e,t){"string"==typeof e?n(e,t):e.forEach(e=>{n(e,t)})}if(void 0!==Sk.builtin.wrapper_descriptor){var i=e.prototype;(t=t||i.tp$slots||{}).tp$new===Sk.generic.new&&(t.tp$new=Sk.generic.new(e)),t.tp$richcompare&&function(e){s.forEach(([t,n])=>{e[n]=function(e){return this.tp$richcompare(e,t)}})}(t),t.tp$as_number&&function(e){const t=Sk.reflectedNumberSlots;Object.keys(t).forEach(n=>{if(void 0!==e[n]){const r=t[n],i=r.reflected,o=e[i];void 0!==o?null===o&&delete e[i]:e[i]=r.slot||e[n]}})}(t),t.tp$as_sequence_or_mapping&&function(e){const t=Sk.sequenceAndMappingSlots;Object.keys(t).forEach(n=>{void 0!==e[n]&&t[n].forEach(t=>{e[t]=e[n]})})}(t),Object.entries(t).forEach(([e,t])=>{Object.defineProperty(i,e,{value:t,writable:!0})}),t.tp$new&&(i.__new__=new Sk.builtin.sk_method(Sk.generic.newMethodDef,e),Object.defineProperty(i,"sk$staticNew",{value:e,writable:!0})),Sk.subSlots.main_slots.forEach(([e,n])=>{void 0!==(e=t[e])&&r(n,e)});var o=t.tp$hash;void 0!==o&&("function"==typeof o?n("__hash__",o):o===Sk.builtin.none.none$?i.__hash__=o:Sk.asserts.fail("invalid tp$hash")),t.tp$as_number&&Sk.subSlots.number_slots.forEach(([e,n])=>{void 0!==(e=t[e])&&r(n,e)}),t.tp$as_sequence_or_mapping&&Sk.subSlots.sequence_and_mapping_slots.forEach(([e,n])=>{void 0!==(e=t[e])&&r(n,e)}),Object.defineProperty(i,"tp$slots",{value:null,writable:!0})}},Sk.abstr.buildNativeClass=function(e,t){t=t||{},Sk.asserts.assert(t.hasOwnProperty("constructor"),"A constructor is required to build a native class");let n=t.constructor;if(e.includes(".")){var r=e.split(".");e=r.pop(),r=r.join(".")}Sk.abstr.setUpInheritance(e,n,t.base,t.meta),Sk.abstr.setUpBuiltinMro(n);const i=n.prototype;return Object.defineProperties(i,{tp$slots:{value:t.slots,writable:!0},tp$getsets:{value:t.getsets,writable:!0},tp$methods:{value:t.methods,writable:!0},tp$classmethods:{value:t.classmethods,writable:!0}}),Sk.abstr.setUpSlots(n,t.slots||{}),Sk.abstr.setUpMethods(n,t.methods),Sk.abstr.setUpGetSets(n,t.getsets),Sk.abstr.setUpClassMethods(n,t.classmethods),void 0!==r&&(i.__module__=new Sk.builtin.str(r)),Object.entries(t.proto||{}).forEach(([e,t])=>{Object.defineProperty(i,e,{value:t,writable:!0,enumerable:!(e.includes("$")||e in Object.prototype)})}),Object.entries(t.flags||{}).forEach(([e,t])=>{Object.defineProperty(n,e,{value:t,writable:!0})}),void 0!==Sk.builtin.str&&i.hasOwnProperty("tp$doc")&&!i.hasOwnProperty("__doc__")&&(e=i.tp$doc||null,i.__doc__="string"==typeof e?new Sk.builtin.str(e):Sk.builtin.none.none$),n},Sk.abstr.buildIteratorClass=function(e,t){return Sk.asserts.assert(t.hasOwnProperty("constructor"),"must provide a constructor"),t.slots=t.slots||{},t.slots.tp$iter=Sk.generic.selfIter,t.slots.tp$iternext=t.slots.tp$iternext||t.iternext,t.slots.tp$getattr=t.slots.tp$getattr||Sk.generic.getAttr,e=Sk.abstr.buildNativeClass(e,t),Sk.abstr.built$iterators.push(e),e},Sk.abstr.built$iterators=[],Sk.abstr.setUpModuleMethods=function(e,t,n){Object.entries(n).forEach(([n,r])=>{r.$name=r.$name||n,t[n]=new Sk.builtin.sk_method(r,null,e)})},Sk.abstr.superConstructor=function(e,t,n){var r=Array.prototype.slice.call(arguments,2);e.prototype.tp$base.apply(t,r)}},function(e,t){const n=new Map;Sk.builtin.object=Sk.abstr.buildNativeClass("object",{constructor:function(){Sk.asserts.assert(this instanceof Sk.builtin.object,"bad call to object, use 'new'")},base:null,slots:{tp$new(e,t){if(e.length||t&&t.length){if(this.tp$new!==Sk.builtin.object.prototype.tp$new)throw new Sk.builtin.TypeError("object.__new__() takes exactly one argument (the type to instantiate)");if(this.tp$init===Sk.builtin.object.prototype.tp$init)throw new Sk.builtin.TypeError(Sk.abstr.typeName(this)+"() takes no arguments")}return new this.constructor},tp$init(e,t){if(e.length||t&&t.length){if(this.tp$init!==Sk.builtin.object.prototype.tp$init)throw new Sk.builtin.TypeError("object.__init__() takes exactly one argument (the instance to initialize)");if(this.tp$new===Sk.builtin.object.prototype.tp$new)throw new Sk.builtin.TypeError(Sk.abstr.typeName(this)+".__init__() takes exactly one argument (the instance to initialize)")}},tp$getattr:Sk.generic.getAttr,tp$setattr:Sk.generic.setAttr,$r(){const e=Sk.abstr.lookupSpecial(this,Sk.builtin.str.$module);let t="";return e&&Sk.builtin.checkString(e)&&(t=e.v+"."),new Sk.builtin.str("<"+t+Sk.abstr.typeName(this)+" object>")},tp$str(){return this.$r()},tp$hash(){let e=n.get(this);return void 0!==e||(e=Math.floor(Math.random()*Number.MAX_SAFE_INTEGER-Number.MAX_SAFE_INTEGER/2),n.set(this,e)),e},tp$richcompare(e,t){switch(t){case"Eq":e=this===e||Sk.builtin.NotImplemented.NotImplemented$;break;case"NotEq":(e=this.tp$richcompare(e,"Eq"))!==Sk.builtin.NotImplemented.NotImplemented$&&(e=!Sk.misceval.isTrue(e));break;default:e=Sk.builtin.NotImplemented.NotImplemented$}return e},tp$doc:"The most base type"},getsets:{__class__:{$get(){return this.ob$type},$set(e){if(void 0===e)throw new Sk.builtin.TypeError("can't delete __class__ attribute");if(!Sk.builtin.checkClass(e))throw new Sk.builtin.TypeError("__class__ must be set to a class, not '"+Sk.abstr.typeName(e)+"' object");const t=this.ob$type;if(!(t.$isSubType(Sk.builtin.module)&&e.$isSubType(Sk.builtin.module)||void 0!==t.sk$klass&&void 0!==e.sk$klass))throw new Sk.builtin.TypeError(" __class__ assignment only supported for heap types or ModuleType subclasses");if(e.prototype.sk$builtinBase!==this.sk$builtinBase)throw new Sk.builtin.TypeError("__class__ assignment: '"+Sk.abstr.typeName(this)+"' object layout differs from '"+e.prototype.tp$name+"'");Object.setPrototypeOf(this,e.prototype)},$doc:"the object's class"}},methods:{__dir__:{$meth:function(){let e=[];if(this.$d)if(this.$d instanceof Sk.builtin.dict)e=this.$d.sk$asarray();else for(var t in this.$d)e.push(new Sk.builtin.str(t));return t=Sk.misceval.callsimArray(Sk.builtin.type.prototype.__dir__,[this.ob$type]),e.push(...t.v),t.v=e,t},$flags:{NoArgs:!0},$doc:"Default dir() implementation."},__format__:{$meth(e){if(!Sk.builtin.checkString(e)){if(Sk.__future__.exceptions)throw new Sk.builtin.TypeError("format() argument 2 must be str, not "+Sk.abstr.typeName(e));throw new Sk.builtin.TypeError("format expects arg 2 to be string or unicode, not "+Sk.abstr.typeName(e))}if(""!==(e=Sk.ffi.remapToJs(e)))throw new Sk.builtin.NotImplementedError("format spec is not yet implemented");return this.tp$str()},$flags:{OneArg:!0},$doc:"Default object formatter."}},proto:{valueOf:Object.prototype.valueOf,toString:function(){return this.tp$str().v},hasOwnProperty:Object.prototype.hasOwnProperty,hp$type:void 0,sk$attrError(){return"'"+this.tp$name+"' object"}}}),Sk.abstr.setUpInheritance("type",Sk.builtin.type,Sk.builtin.object),Sk.abstr.setUpBuiltinMro(Sk.builtin.type)},function(e,t){function n(e,t,n){return Sk.abstr.checkNoArgs(this.$name,t,n),void 0===(e=this.call(e))?Sk.builtin.none.none$:e}function r(e,t,n){return Sk.abstr.checkOneArg(this.$name,t,n),void 0===(e=this.call(e,t[0]))?Sk.builtin.none.none$:e}function i(e,t,n){return Sk.abstr.checkNoKwargs(this.$name,n),Sk.abstr.checkArgsLen(this.$name,t,1,2),void 0===(e=this.call(e,...t))?Sk.builtin.none.none$:e}function o(e,t,n){return Sk.abstr.checkNoKwargs(this.$name,n),Sk.abstr.checkArgsLen(this.$name,t,2,2),this.call(e,t[0],t[1]),Sk.builtin.none.none$}function s(e,t,n){return(e=r.call(this,e,t,n))===Sk.builtin.NotImplemented.NotImplemented$?e:new Sk.builtin.bool(e)}function a(e,t){return function(n,r,i){return n=e.call(this,n,r,i),t(n)}}function l(e){return function(){const t=e.tp$descr_get?e.tp$descr_get(this):e;return Sk.misceval.callsimArray(t,[])}}function c(e,t,n,r){return function(i){return function(){var o=i.tp$descr_get?i.tp$descr_get(this):i;if(o=Sk.misceval.callsimArray(o,[]),!t(o))throw new Sk.builtin.TypeError(e+" should return "+n+" (returned "+Sk.abstr.typeName(o)+")");return void 0!==r?r(o):o}}}function u(e){return function(t){const n=e.tp$descr_get?e.tp$descr_get(this):e;return Sk.misceval.callsimArray(n,[t])}}function d(e,t){let n=this.ob$type.$typeLookup(Sk.builtin.str.$getattribute);if(n instanceof Sk.builtin.wrapper_descriptor)return n.d$wrapped.call(this,e,t);n.tp$descr_get&&(n=n.tp$descr_get(this));const r=Sk.misceval.tryCatch(()=>Sk.misceval.callsimOrSuspendArray(n,[e]),e=>{if(!(e instanceof Sk.builtin.AttributeError))throw e});return t?r:Sk.misceval.retryOptionalSuspensionOrThrow(r)}function h(e,t,n){return function(r){return function(r,i,o){let s;void 0===i?(s=t,n=null):s=e;let a=this.ob$type.$typeLookup(new Sk.builtin.str(s));if(a instanceof Sk.builtin.wrapper_descriptor)return a.d$wrapped.call(this,r,i);if(a.tp$descr_get&&(a=a.tp$descr_get(this)),void 0===a){if(n)throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(this)+"' object "+n);throw new Sk.builtin.AttributeError(s)}return r=Sk.misceval.callsimOrSuspendArray(a,void 0===i?[r]:[r,i]),o?r:Sk.misceval.retryOptionalSuspensionOrThrow(r)}}}function p(e,t){let n=e.ob$type;for(;n&&void 0!==n.sk$klass;)n=n.prototype.tp$base;if(n&&n.prototype.tp$setattr!==t)throw new Sk.builtin.TypeError("can't apply this "+t.$name+" to "+Sk.abstr.typeName(e)+" object")}Sk.slots=Object.create(null),e=Sk.slots,Sk.slots.__init__={$name:"__init__",$slot_name:"tp$init",$slot_func:function(e){return function(t,n){const r=e.tp$descr_get?e.tp$descr_get(this):e;return t=Sk.misceval.callsimOrSuspendArray(r,t,n),Sk.misceval.chain(t,e=>{if(!Sk.builtin.checkNone(e)&&void 0!==e)throw new Sk.builtin.TypeError("__init__() should return None, not "+Sk.abstr.typeName(e))})}},$wrapper:function(e,t,n){return this.call(e,t,n),Sk.builtin.none.none$},$textsig:"($self, /, *args, **kwargs)",$flags:{FastCall:!0},$doc:"Initialize self. See help(type(self)) for accurate signature."},e.__new__={$name:"__new__",$slot_name:"tp$new",$slot_func:function(e){const t=function(t,n){let r=e;return e.tp$descr_get&&(r=e.tp$descr_get(null,this.constructor)),Sk.misceval.callsimOrSuspendArray(r,[this.constructor,...t],n)};return t.sk$static_new=!1,t},$wrapper:null,$textsig:"($self, /, *args, **kwargs)",$flags:{FastCall:!0},$doc:"Create and return a new object."},e.__call__={$name:"__call__",$slot_name:"tp$call",$slot_func:function(e){return function(t,n){const r=e.tp$descr_get?e.tp$descr_get(this):e;return Sk.misceval.callsimOrSuspendArray(r,t,n)}},$wrapper:function(e,t,n){return void 0===(e=e.tp$call(t,n))?Sk.builtin.none.none$:e},$textsig:"($self, /, *args, **kwargs)",$flags:{FastCall:!0},$doc:"Call self as a function."},e.__repr__={$name:"__repr__",$slot_name:"$r",$slot_func:c("__repr__",Sk.builtin.checkString,"str"),$wrapper:n,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Return repr(self)."},e.__str__={$name:"__str__",$slot_name:"tp$str",$slot_func:c("__str__",Sk.builtin.checkString,"str"),$wrapper:n,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Return str(self)."};var f=c("__hash__",Sk.builtin.checkInt,"int",e=>"number"==typeof e.v?e.v:e.tp$hash());e.__hash__={$name:"__hash__",$slot_name:"tp$hash",$slot_func:function(e){return e===Sk.builtin.none.none$?Sk.builtin.none.none$:f(e)},$wrapper:a(n,e=>new Sk.builtin.int_(e)),$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Return hash(self)."},e.__getattribute__={$name:"__getattribute__",$slot_name:"tp$getattr",$slot_func:function(e){return function(e,t){let n=this.ob$type.$typeLookup(Sk.builtin.str.$getattr);if(void 0===n)return d.call(this,e,t);const r=Sk.misceval.chain(d.call(this,e,t),t=>Sk.misceval.tryCatch(()=>void 0!==t?t:(n.tp$descr_get&&(n=n.tp$descr_get(this)),Sk.misceval.callsimOrSuspendArray(n,[e])),(function(e){if(!(e instanceof Sk.builtin.AttributeError))throw e})));return t?r:Sk.misceval.retryOptionalSuspensionOrThrow(r)}},$wrapper:function(e,t,n){if(Sk.abstr.checkOneArg(this.$name,t,n),t=t[0],!Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("attribute name must be string, not '"+Sk.abstr.typeName(t)+"'");if(void 0===(n=this.call(e,t)))throw new Sk.builtin.AttributeError(Sk.abstr.typeName(e)+" has no attribute "+t.$jsstr());return n},$textsig:"($self, name, /)",$flags:{OneArg:!0},$doc:"Return getattr(self, name)."},e.__getattr__={$name:"__getattr__",$slot_name:"tp$getattr",$slot_func:e.__getattribute__.$slot_func,$wrapper:null,$textsig:"($self, name, /)",$flags:{OneArg:!0},$doc:"Return getattr(self, name)."},e.__setattr__={$name:"__setattr__",$slot_name:"tp$setattr",$slot_func:h("__setattr__","__delattr__"),$wrapper:function(e,t,n){return Sk.abstr.checkNoKwargs(this.$name,n),Sk.abstr.checkArgsLen(this.$name,t,2,2),p(e,this),this.call(e,t[0],t[1]),Sk.builtin.none.none$},$textsig:"($self, name, value, /)",$flags:{MinArgs:2,MaxArgs:2},$doc:"Implement setattr(self, name, value)."},e.__delattr__={$name:"__delattr__",$slot_name:"tp$setattr",$slot_func:e.__setattr__.$slot_func,$wrapper:function(e,t,n){return Sk.abstr.checkOneArg(this.$name,t,n),p(e,this),this.call(e,t[0]),Sk.builtin.none.none$},$textsig:"($self, name, /)",$flags:{OneArg:!0},$doc:"Implement delattr(self, name)."},e.__get__={$name:"__get__",$slot_name:"tp$descr_get",$slot_func:function(e){return function(t,n,r){null===t&&(t=Sk.builtin.none.none$),null==n&&(n=Sk.builtin.none.none$);const i=e.tp$descr_get?e.tp$descr_get(this):e;return t=Sk.misceval.callsimOrSuspendArray(i,[t,n]),r?t:Sk.misceval.retryOptionalSuspensionOrThrow(t)}},$wrapper:function(e,t,n){if(Sk.abstr.checkNoKwargs(this.$name,n),Sk.abstr.checkArgsLen(this.$name,t,1,2),n=t[0],t=t[1],n===Sk.builtin.none.none$&&(n=null),t===Sk.builtin.none.none$&&(t=null),null===t&&null===n)throw new Sk.builtin.TypeError("__get__(None, None) is invalid");return this.call(e,n,t)},$textsig:"($self, instance, owner, /)",$flags:{MinArgs:2,MaxArgs:2},$doc:"Return an attribute of instance, which is of type owner."},e.__set__={$name:"__set__",$slot_name:"tp$descr_set",$slot_func:h("__set__","__delete__"),$wrapper:o,$textsig:"($self, instance, value, /)",$flags:{MinArgs:2,MaxArgs:2},$doc:"Set an attribute of instance to value."},e.__delete__={$name:"__delete__",$slot_name:"tp$descr_set",$slot_func:e.__set__.$slot_func,$wrapper:r,$textsig:"($self, instance, /)",$flags:{OneArg:!0},$doc:"Delete an attribute of instance."},e.__eq__={$name:"__eq__",$slot_name:"ob$eq",$slot_func:u,$wrapper:s,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self==value."},e.__ge__={$name:"__ge__",$slot_name:"ob$ge",$slot_func:u,$wrapper:s,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self>=value."},e.__gt__={$name:"__gt__",$slot_name:"ob$gt",$slot_func:u,$wrapper:s,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self>value."},e.__le__={$name:"__le__",$slot_name:"ob$le",$slot_func:u,$wrapper:s,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self<=value."},e.__lt__={$name:"__lt__",$slot_name:"ob$lt",$slot_func:u,$wrapper:s,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self<value."},e.__ne__={$name:"__ne__",$slot_name:"ob$ne",$slot_func:u,$wrapper:s,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self!=value."},e.__iter__={$name:"__iter__",$slot_name:"tp$iter",$slot_func:l,$wrapper:n,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Implement iter(self)."},e.__next__={$name:"__next__",$slot_name:"tp$iternext",$slot_func:function(e){return function(t){const n=e.tp$descr_get?e.tp$descr_get(this):e,r=Sk.misceval.tryCatch(()=>Sk.misceval.callsimOrSuspendArray(n,[]),e=>{if(!(e instanceof Sk.builtin.StopIteration))throw e});return t?r:Sk.misceval.retryOptionalSuspensionOrThrow(r)}},$wrapper:function(e,t,n){return Sk.abstr.checkNoArgs(this.$name,t,n),Sk.misceval.chain(e.tp$iternext(!0),e=>{if(void 0===e)throw new Sk.builtin.StopIteration;return e})},$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Implement next(self)."},e.__len__={$name:"__len__",$slot_name:"sq$length",$slot_func:function(e){return function(t){const n=e.tp$descr_get?e.tp$descr_get(this):e;return t?(t=Sk.misceval.callsimOrSuspendArray(n,[]),Sk.misceval.chain(t,e=>Sk.misceval.asIndexOrThrow(e))):(t=Sk.misceval.callsimArray(n,[]),Sk.misceval.asIndexOrThrow(t))}},$wrapper:a(n,e=>new Sk.builtin.int_(e)),$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return len(self)."},e.__contains__={$name:"__contains__",$slot_name:"sq$contains",$slot_func:function(e){return function(t,n){const r=e.tp$descr_get?e.tp$descr_get(this):e;return t=Sk.misceval.callsimOrSuspendArray(r,[t]),(t=Sk.misceval.chain(t,e=>Sk.misceval.isTrue(e))).$isSuspension?n?t:Sk.misceval.retryOptionalSuspensionOrThrow(t):t}},$wrapper:a(r,e=>new Sk.builtin.bool(e)),$textsig:"($self, key, /)",$flags:{OneArg:!0},$doc:"Return key in self."},e.__getitem__={$name:"__getitem__",$slot_name:"mp$subscript",$slot_func:function(e){return function(t,n){const r=e.tp$descr_get?e.tp$descr_get(this):e;return t=Sk.misceval.callsimOrSuspendArray(r,[t]),n?t:Sk.misceval.retryOptionalSuspensionOrThrow(t)}},$wrapper:r,$textsig:"($self, key, /)",$flags:{OneArg:!0},$doc:"Return self[key]."},e.__setitem__={$name:"__setitem__",$slot_name:"mp$ass_subscript",$slot_func:h("__setitem__","__delitem__","does not support item assignment"),$wrapper:o,$textsig:"($self, key, value, /)",$flags:{MinArgs:2,MaxArgs:2},$doc:"Set self[key] to value."},e.__delitem__={$name:"__delitem__",$slot_name:"mp$ass_subscript",$slot_func:e.__setitem__.$slot_func,$wrapper:r,$textsig:"($self, key, /)",$flags:{OneArg:!0},$doc:"Delete self[key]."},e.__add__={$name:"__add__",$slot_name:"nb$add",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self+value."},e.__radd__={$name:"__radd__",$slot_name:"nb$reflected_add",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value+self."},e.__iadd__={$name:"__iadd__",$slot_name:"nb$inplace_add",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self+=value."},e.__sub__={$name:"__sub__",$slot_name:"nb$subtract",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self-value."},e.__rsub__={$name:"__rsub__",$slot_name:"nb$reflected_subtract",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value-self."},e.__imul__={$name:"__imul__",$slot_name:"nb$inplace_multiply",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self*=value."},e.__mul__={$name:"__mul__",$slot_name:"nb$multiply",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self*value."},e.__rmul__={$name:"__rmul__",$slot_name:"nb$reflected_multiply",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value*self."},e.__isub__={$name:"__isub__",$slot_name:"nb$inplace_subtract",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self-=value."},e.__mod__={$name:"__mod__",$slot_name:"nb$remainder",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self%value."},e.__rmod__={$name:"__rmod__",$slot_name:"nb$reflected_remainder",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value%self."},e.__imod__={$name:"__imod__",$slot_name:"nb$inplace_remainder",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement value%=self."},e.__divmod__={$name:"__divmod__",$slot_name:"nb$divmod",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return divmod(self, value)."},e.__rdivmod__={$name:"__rdivmod__",$slot_name:"nb$reflected_divmod",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return divmod(value, self)"},e.__pos__={$name:"__pos__",$slot_name:"nb$positive",$slot_func:l,$wrapper:n,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"+self"},e.__neg__={$name:"__neg__",$slot_name:"nb$negative",$slot_func:l,$wrapper:n,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"-self"},e.__abs__={$name:"__abs__",$slot_name:"nb$abs",$slot_func:l,$wrapper:n,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"abs(self)"},e.__bool__={$name:"__bool__",$slot_name:"nb$bool",$slot_func:c("__bool__",Sk.builtin.checkBool,"bool",e=>0!==e.v),$wrapper:a(n,e=>new Sk.builtin.bool(e)),$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"self != 0"},e.__invert__={$name:"__invert__",$slot_name:"nb$invert",$slot_func:l,$wrapper:n,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"~self"},e.__lshift__={$name:"__lshift__",$slot_name:"nb$lshift",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self<<value."},e.__rlshift__={$name:"__rlshift__",$slot_name:"nb$reflected_lshift",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value<<self."},e.__rshift__={$name:"__rshift__",$slot_name:"nb$rshift",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self>>value."},e.__rrshift__={$name:"__rrshift__",$slot_name:"nb$reflected_rshift",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value>>self."},e.__ilshift__={$name:"__ilshift__",$slot_name:"nb$inplace_lshift",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self<<=value."},e.__irshift__={$name:"__irshift__",$slot_name:"nb$inplace_rshift",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self=>>value."},e.__and__={$name:"__and__",$slot_name:"nb$and",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self&value."},e.__rand__={$name:"__rand__",$slot_name:"nb$refelcted_and",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value&self."},e.__iand__={$name:"__iand__",$slot_name:"nb$and",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self&=value."},e.__xor__={$name:"__xor__",$slot_name:"nb$xor",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self^value."},e.__rxor__={$name:"__rxor__",$slot_name:"nb$reflected_xor",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value^self."},e.__ixor__={$name:"__ixor__",$slot_name:"nb$inplace_xor",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self^=value."},e.__or__={$name:"__or__",$slot_name:"nb$or",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self|value."},e.__ror__={$name:"__ror__",$slot_name:"nb$reflected_or",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value|self."},e.__ior__={$name:"__ior__",$slot_name:"nb$inplace_or",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self|=value."},e.__int__={$name:"__int__",$slot_name:"nb$int",$slot_func:c("__int__",Sk.builtin.checkInt,"int"),$wrapper:n,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"int(self)"},e.__float__={$name:"__float__",$slot_name:"nb$float",$slot_func:c("__float__",Sk.builtin.checkFloat,"float"),$wrapper:n,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"float(self)"},e.__floordiv__={$name:"__floordiv__",$slot_name:"nb$floor_divide",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self//value."},e.__rfloordiv__={$name:"__rfloordiv__",$slot_name:"nb$reflected_floor_divide",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value//self."},e.__ifloordiv__={$name:"__ifloordiv__",$slot_name:"nb$inplace_floor_divide",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self//=value."},e.__truediv__={$name:"__truediv__",$slot_name:"nb$divide",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self/value."},e.__rtruediv__={$name:"__rtruediv__",$slot_name:"nb$reflected_divide",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value/self."},e.__itruediv__={$name:"__itruediv__",$slot_name:"nb$inplace_divide",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self/=value."},e.__index__={$name:"__index__",$slot_name:"nb$index",$slot_func:c("__index__",Sk.builtin.checkInt,"int",e=>e.v),$wrapper:a(n,e=>new Sk.builtin.int_(e)),$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Return self converted to an integer, if self is suitable for use as an index into a list."},e.__pow__={$name:"__pow__",$slot_name:"nb$power",$slot_func:function(e){return function(t,n){const r=e.tp$descr_get?e.tp$descr_get(this):e;return null==n?Sk.misceval.callsimArray(r,[t]):Sk.misceval.callsimArray(r,[t,n])}},$wrapper:i,$textsig:"($self, value, mod=None, /)",$flags:{MinArgs:1,MaxArgs:2},$doc:"Return pow(self, value, mod)."},e.__rpow__={$name:"__rpow__",$slot_name:"nb$reflected_power",$slot_func:e.__pow__.$slot_func,$wrapper:i,$textsig:"($self, value, mod=None, /)",$flags:{MinArgs:1,MaxArgs:2},$doc:"Return pow(value, self, mod)."},e.__ipow__={$name:"__ipow__",$slot_name:"nb$inplace_power",$slot_func:e.__pow__.$slot_func,$wrapper:i,$textsig:"($self, value, mod=None, /)",$flags:{MinArgs:1,MaxArgs:2},$doc:"Implement **="},e.__matmul__={$name:"__matmul__",$slot_name:"nb$matrix_multiply",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self@value."},e.__rmatmul__={$name:"__rmatmul__",$slot_name:"nb$reflected_matrix_multiply",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value@self."},e.__imatmul__={$name:"__imatmul__",$slot_name:"nb$inplace_matrix_multiply",$slot_func:u,$wrapper:r,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self@=value."},e.__long__={$name:"__long__",$slot_name:"nb$long",$slot_func:c("__long__",Sk.builtin.checkInt,"int"),$wrapper:n,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"int(self)"};var m,g={next:{$name:"next",$slot_name:"tp$iternext",$slot_func:e.__next__.$slot_func,$wrapper:e.__next__.$wrapper,$textsig:e.__next__.$textsig,$flags:e.__next__.$flags},__nonzero__:{$name:"__nonzero__",$slot_name:"nb$bool",$slot_func:c("__nonzero__",Sk.builtin.checkInt,"int",e=>0!==e.v),$wrapper:a(n,e=>new Sk.builtin.bool(e)),$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"x.__nonzero__() <==> x != 0"},__div__:{$name:"__div__",$slot_name:"nb$divide",$slot_func:u,$wrapper:r,$textsig:"($self, other/)",$flags:{OneArg:!0},$doc:"x.__div__(y) <==> x/y"},__rdiv__:{$name:"__rdiv__",$slot_name:"nb$reflected_divide",$slot_func:u,$wrapper:r,$textsig:"($self, other/)",$flags:{OneArg:!0},$doc:"x.__rdiv__(y) <==> x/y"},__idiv__:{$name:"__idiv__",$slot_name:"nb$inplace_divide",$slot_func:u,$wrapper:r,$textsig:"($self, other/)",$flags:{OneArg:!0},$doc:"implement self /= other"}};Sk.subSlots={main_slots:Object.entries({tp$init:"__init__",tp$call:"__call__",$r:"__repr__",tp$str:"__str__",tp$getattr:"__getattribute__",tp$setattr:["__setattr__","__delattr__"],ob$eq:"__eq__",ob$ne:"__ne__",ob$lt:"__lt__",ob$le:"__le__",ob$gt:"__gt__",ob$ge:"__ge__",tp$descr_get:"__get__",tp$descr_set:["__set__","__delete__"],tp$iter:"__iter__",tp$iternext:"__next__"}),number_slots:Object.entries({nb$abs:"__abs__",nb$negative:"__neg__",nb$positive:"__pos__",nb$int:"__int__",nb$long:"__long__",nb$float:"__float__",nb$add:"__add__",nb$reflected_add:"__radd__",nb$inplace_add:"__iadd__",nb$subtract:"__sub__",nb$reflected_subtract:"__rsub__",nb$inplace_subtract:"__isub__",nb$multiply:"__mul__",nb$reflected_multiply:"__rmul__",nb$inplace_multiply:"__imul__",nb$floor_divide:"__floordiv__",nb$reflected_floor_divide:"__rfloordiv__",nb$inplace_floor_divide:"__ifloordiv__",nb$invert:"__invert__",nb$remainder:"__mod__",nb$reflected_remainder:"__rmod__",nb$inplace_remainder:"__imod__",nb$divmod:"__divmod__",nb$reflected_divmod:"__rdivmod__",nb$power:"__pow__",nb$reflected_power:"__rpow__",nb$inplace_power:"__ipow__",nb$divide:"__truediv__",nb$reflected_divide:"__rtruediv__",nb$inplace_divide:"__itruediv__",nb$bool:"__bool__",nb$and:"__and__",nb$reflected_and:"__rand__",nb$inplace_and:"__iand__",nb$or:"__or__",nb$reflected_or:"__ror__",nb$inplace_or:"__ior__",nb$xor:"__xor__",nb$reflected_xor:"__rxor__",nb$inplace_xor:"__ixor__",nb$lshift:"__lshift__",nb$reflected_lshift:"__rlshift__",nb$rshift:"__rshift__",nb$reflected_rshift:"__rrshift__",nb$inplace_lshift:"__ilshift__",nb$inplace_rshift:"__irshift__",nb$matrix_multiply:"__matmul__",nb$reflected_matrix_multiply:"__rmatmul__",nb$inplace_matrix_multiply:"__imatmul__"}),sequence_and_mapping_slots:Object.entries({sq$length:"__len__",sq$contains:"__contains__",mp$subscript:"__getitem__",mp$ass_subscript:["__setitem__","__delitem__"],nb$add:"__add__",nb$multiply:"__mul__",nb$reflected_multiply:"__rmul__",nb$inplace_add:"__iadd__",nb$inplace_multiply:"__imul__"})},Sk.reflectedNumberSlots={nb$add:{reflected:"nb$reflected_add"},nb$subtract:{reflected:"nb$reflected_subtract",slot:function(e){return e instanceof this.constructor?e.nb$subtract(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$multiply:{reflected:"nb$reflected_multiply"},nb$divide:{reflected:"nb$reflected_divide",slot:function(e){return e instanceof this.constructor?e.nb$divide(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$floor_divide:{reflected:"nb$reflected_floor_divide",slot:function(e){return e instanceof this.constructor?e.nb$floor_divide(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$remainder:{reflected:"nb$reflected_remainder",slot:function(e){return e instanceof this.constructor?e.nb$remainder(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$divmod:{reflected:"nb$reflected_divmod",slot:function(e){return e instanceof this.constructor?e.nb$divmod(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$power:{reflected:"nb$reflected_power",slot:function(e,t){return e instanceof this.constructor?e.nb$power(this,t):Sk.builtin.NotImplemented.NotImplemented$}},nb$and:{reflected:"nb$reflected_and"},nb$or:{reflected:"nb$reflected_or"},nb$xor:{reflected:"nb$reflected_xor"},nb$lshift:{reflected:"nb$reflected_lshift",slot:function(e){return e instanceof this.constructor?e.nb$lshift(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$rshift:{reflected:"nb$reflected_rshift",slot:function(e){return e instanceof this.constructor?e.nb$rshift(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$matrix_multiply:{reflected:"nb$reflexted_matrix_multiply",slot:function(e){return e instanceof this.constructor?e.nb$matrix_multiply(this):Sk.builtin.NotImplemented.NotImplemented$}}},Sk.sequenceAndMappingSlots={sq$concat:["nb$add"],sq$repeat:["nb$multiply","nb$reflected_multiply"],mp$length:["sq$length"],sq$inplace_repeat:["nb$inplace_multiply"],sq$inplace_concat:["nb$inplace_add"]},Sk.dunderToSkulpt={__repr__:"$r",__str__:"tp$str",__init__:"tp$init",__new__:"tp$new",__hash__:"tp$hash",__call__:"tp$call",__iter__:"tp$iter",__next__:"tp$iternext",__eq__:"ob$eq",__ne__:"ob$ne",__lt__:"ob$lt",__le__:"ob$le",__gt__:"ob$gt",__ge__:"ob$ge",__abs__:"nb$abs",__neg__:"nb$negative",__pos__:"nb$positive",__int__:"nb$int",__float__:"nb$float",__add__:"nb$add",__radd__:"nb$reflected_add",__iadd__:"nb$inplace_add",__sub__:"nb$subtract",__rsub__:"nb$reflected_subtract",__isub__:"nb$inplace_subtract",__mul__:"nb$multiply",__rmul__:"nb$reflected_multiply",__imul__:"nb$inplace_multiply",__truediv__:"nb$divide",__rtruediv__:"nb$reflected_divide",__itruediv__:"nb$inplace_divide",__floordiv__:"nb$floor_divide",__rfloordiv__:"nb$reflected_floor_divide",__ifloordiv__:"nb$inplace_floor_divide",__invert__:"nb$invert",__mod__:"nb$remainder",__rmod__:"nb$reflected_remainder",__imod__:"nb$inplace_remainder",__divmod__:"nb$divmod",__rdivmod__:"nb$reflected_divmod",__pow__:"nb$power",__rpow__:"nb$reflected_power",__ipow__:"nb$inplace_power",__bool__:"nb$bool",__long__:"nb$long",__lshift__:"nb$lshift",__rlshift__:"nb$reflected_lshift",__ilshift__:"nb$inplace_lshift",__rshift__:"nb$rshift",__rrshift__:"nb$reflected_rshift",__irshift__:"nb$inplace_rshift",__and__:"nb$and",__rand__:"nb$reflected_and",__iand__:"nb$inplace_and",__or__:"nb$or",__ror__:"nb$reflected_or",__ior__:"nb$inplace_or",__xor__:"nb$xor",__rxor__:"nb$reflected_xor",__ixor__:"nb$inplace_xor",__matmul__:"nb$matrix_multiply",__rmatmul__:"nb$reflected_matrix_multiply",__imatmul__:"nb$inplace_matrix_multiply",__get__:"tp$descr_get",__set__:"tp$descr_set",__delete__:"tp$descr_set",__getattribute__:"tp$getattr",__getattr__:"tp$getattr",__setattr__:"tp$setattr",__delattr__:"tp$setattr",__len__:"sq$length",__contains__:"sq$contains",__getitem__:"mp$subscript",__setitem__:"mp$ass_subscript",__delitem__:"mp$ass_subscript"},Sk.exportSymbol("Sk.setupDunderMethods",Sk.setupDunderMethods),Sk.setupDunderMethods=function(e){function t(e,t,n){for(let r=0;r<e.length;r++){const i=e[r].prototype;i.hasOwnProperty(n)||(i[n]=i[t],delete i[t])}}var n=Sk.slots;if(!e||void 0!==m){var r=Sk.abstr.built$iterators,i=[Sk.builtin.int_,Sk.builtin.lng,Sk.builtin.float_,Sk.builtin.complex],o=Sk.subSlots.number_slots,s=Sk.subSlots.main_slots,a=s.findIndex(e=>"tp$iternext"===e[0]),l=o.findIndex(e=>"nb$bool"===e[0]),c=Sk.dunderToSkulpt;if(e){c.__bool__="nb$bool",c.__next__="tp$iternext",delete c.__nonzero__,delete c.__div__,delete c.__rdiv__,delete c.__idiv__,delete c.next;for(let e in m)n[e]=m[e];for(let e in g)delete n[e];for(e=0;e<i.length;e++)delete(n=i[e].prototype).__div__,delete n.__rdiv__;s[a][1]="__next__",o[l][1]="__bool__",t(r,"next","__next__"),t(i,"__bool__","__nonzero__")}else{void 0===m&&(n.py3$slots={__next__:n.__next__},m=n.py3$slots),c.next="tp$iternext",c.__nonzero__="nb$bool",c.__div__="nb$divide",c.__rdiv__="nb$reflected_divide",c.__idiv__="nb$inplace_divide",delete c.__bool__,delete c.__next__;for(let e in g)n[e]=g[e];for(let e in m)delete n[e];for(s[a][1]="next",o[l][1]="__nonzero__",t(r,"__next__","next"),t(i,"__nonzero__","__bool__"),r=0;r<i.length;r++)(s=(o=i[r]).prototype).hasOwnProperty("__div__")||(s.__div__=new Sk.builtin.wrapper_descriptor(o,g.__div__,s.nb$divide),s.__rdiv__=new Sk.builtin.wrapper_descriptor(o,g.__rdiv__,Sk.reflectedNumberSlots.nb$divide.slot))}}}},function(e,t){function n(e,t,n){return Sk.abstr.buildNativeClass(e,{constructor:n.constructor,slots:Object.assign({tp$getattr:Sk.generic.getAttr,$r:o},n.slots),getsets:Object.assign(n.getsets||{},s),proto:Object.assign(n.proto||{},{d$repr_name:t||e,d$check:r,d$set_check:i}),flags:{sk$acceptable_as_base_class:!1}})}function r(e){if(null==e)return this;if(!e.ob$type.$isSubType(this.d$type))throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' requires a '"+this.d$type.prototype.tp$name+"' object but received a '"+Sk.abstr.typeName(e)+"' object")}function i(e){if(!e.ob$type.$isSubType(this.d$type))throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' requires a '"+this.d$type.prototype.tp$name+"' object but received a '"+Sk.abstr.typeName(e)+"' object")}function o(){return new Sk.builtin.str("<"+this.d$repr_name+" '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' objects>")}const s={__doc__:{$get(){return this.d$def.$doc?new Sk.builtin.str(this.d$def.$doc):Sk.builtin.none.none$}},__objclass__:{$get(){return this.d$type}},__name__:{$get(){return new Sk.builtin.str(this.d$name)}}};e={__text_signature__:{$get(){return this.d$def.$textsig?new Sk.builtin.str(this.d$def.$textsig):Sk.builtin.none.none$}}},Sk.builtin.getset_descriptor=n("getset_descriptor",void 0,{constructor:function(e,t){this.d$def=t,this.$get=t.$get,this.$set=t.$set,this.d$type=e,this.d$name=t.$name},slots:{tp$descr_get(e,t){if(t=this.d$check(e))return t;if(void 0!==this.$get)return this.$get.call(e);throw new Sk.builtin.AttributeError("getset_descriptor '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' objects is not readable")},tp$descr_set(e,t){if(this.d$set_check(e),void 0!==this.$set)return this.$set.call(e,t);throw new Sk.builtin.AttributeError("attribute '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' objects is readonly")}}}),Sk.builtin.method_descriptor=n("method_descriptor","method",{constructor:function(e,t){this.d$def=t,this.$meth=t.$meth,this.d$type=e,this.d$name=t.$name||"<native JS>",this.$flags=e=t.$flags||{},e.FastCall&&e.NoKwargs?this.tp$call=this.$methodFastCallNoKwargs:e.FastCall?this.tp$call=this.$methodFastCall:e.NoArgs?this.tp$call=this.$methodCallNoArgs:e.OneArg?this.tp$call=this.$methodCallOneArg:e.NamedArgs?this.tp$call=this.$methodCallNamedArgs:void 0!==e.MinArgs?this.tp$call=this.$methodCallMinArgs:(this.func_code=t.$meth,this.tp$call=this.$defaultCall,this.$memoiseFlags=Sk.builtin.func.prototype.$memoiseFlags,this.$resolveArgs=Sk.builtin.func.prototype.$resolveArgs)},slots:{tp$call(e,t){return this.tp$call(e,t)},tp$descr_get(e,t){let n;return(n=this.d$check(e))?n:new Sk.builtin.sk_method(this.d$def,e)}},getsets:e,proto:{$methodFastCall(e,t){const n=e.shift();return this.m$checkself(n),this.$meth.call(n,e,t)},$methodFastCallNoKwargs(e,t){const n=e.shift();return this.m$checkself(n),Sk.abstr.checkNoKwargs(this.d$name,t),this.$meth.call(n,e)},$methodCallNoArgs(e,t){const n=e.shift();return this.m$checkself(n),Sk.abstr.checkNoArgs(this.d$name,e,t),this.$meth.call(n)},$methodCallOneArg(e,t){const n=e.shift();return this.m$checkself(n),Sk.abstr.checkOneArg(this.d$name,e,t),this.$meth.call(n,e[0])},$methodCallNamedArgs(e,t){const n=e.shift();return this.m$checkself(n),e=Sk.abstr.copyKeywordsToNamedArgs(this.d$name,this.$flags.NamedArgs,e,t,this.$flags.Defaults),this.$meth.call(n,...e)},$methodCallMinArgs(e,t){const n=e.shift();return this.m$checkself(n),Sk.abstr.checkNoKwargs(this.d$name,t),Sk.abstr.checkArgsLen(this.d$name,e,this.$flags.MinArgs,this.$flags.MaxArgs),this.$meth.call(n,...e)},$defaultCall(e,t){return this.m$checkself(e[0]),Sk.builtin.func.prototype.tp$call.call(this,e,t)},m$checkself(e){if(void 0===e)throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' object needs an argument");this.d$check(e)}}}),Sk.builtin.wrapper_descriptor=n("wrapper_descriptor","slot wrapper",{constructor:function(e,t,n){this.d$def=t,this.d$type=e,this.d$name=n.$name=t.$name,this.d$wrapped=n},slots:{tp$descr_get(e,t){let n;return(n=this.d$check(e))?n:new Sk.builtin.method_wrapper(this,e)},tp$call(e,t){if(1>e.length)throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' object needs an argument");const n=e.shift();if(!n.ob$type.$isSubType(this.d$type))throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' requires a '"+this.d$type.prototype.tp$name+"' object but received a '"+Sk.abstr.typeName(n)+"'");return this.raw$call(n,e,t)}},proto:{raw$call(e,t,n){return this.d$wrapped.$name=this.d$name,this.d$def.$wrapper.call(this.d$wrapped,e,t,n)}}}),Sk.builtin.method_wrapper=n("method_wrapper",void 0,{constructor:function(e,t){this.m$descr=e,this.m$self=t,this.d$def=e.d$def,this.d$name=e.d$name,this.d$type=e.d$type},slots:{tp$call(e,t){return this.m$descr.raw$call(this.m$self,e,t)},tp$richcompare(e,t){return("Eq"===t||"NotEq"===t)&&e instanceof Sk.builtin.method_wrapper?(e=this.m$self===e.m$self&&this.m$descr===e.m$descr,"Eq"===t?e:!e):Sk.builtin.NotImplemented.NotImplemented$},$r(){return new Sk.builtin.str("<method-wrapper '"+this.d$name+"' of "+Sk.abstr.typeName(this.m$self)+" object>")}},getsets:{__self__:{$get(){return this.m$self}}}}),Sk.builtin.classmethod_descriptor=n("classmethod_descriptor","method",{constructor:function(e,t){this.d$def=t,this.$meth=t.$meth,this.d$type=e,this.d$name=t.$name||"<native JS>"},slots:{tp$call(e,t){if(1>e.length)throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' object needs an argument");const n=e.shift();return this.tp$descr_get(null,n).tp$call(e,t)},tp$descr_get(e,t,n){if(void 0===t){if(null===e)throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' for type '"+this.d$type.prototype.tp$name+"' needs an object or a type");t=t||e.ob$type}if(t.ob$type!==Sk.builtin.type)throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' for type '"+this.d$type.prototype.tp$name+"' needs a type not a '"+Sk.abstr.typeName(t)+"' as arg 2");if(!t.$isSubType(this.d$type))throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' requires a '"+this.d$type.prototype.tp$name+"' object but received a '"+Sk.abstr.typeName(t)+"' object");return new Sk.builtin.sk_method(this.d$def,t)}},getsets:e}),[Sk.builtin.method_descriptor,Sk.builtin.getset_descriptor,Sk.builtin.wrapper_descriptor,Sk.builtin.method_wrapper,Sk.builtin.classmethod_descriptor].forEach(e=>{Sk.abstr.setUpSlots(e),Sk.abstr.setUpMethods(e),Sk.abstr.setUpGetSets(e)})},function(e,t){Sk.builtin.sk_method=Sk.abstr.buildNativeClass("builtin_function_or_method",{constructor:function(e,t,n){this.$meth=e.$meth.bind(t),this.$doc=e.$doc,this.$self=t||null,this.$module=n?new Sk.builtin.str(n):null,this.$name=e.$name||e.$meth.name||"<native JS>",this.m$def=e,this.$textsig=e.$textsig,this.$flags=e=e.$flags||{},e.FastCall&&e.NoKwargs?this.tp$call=this.$fastCallNoKwargs:e.FastCall?this.tp$call=this.$meth:e.NoArgs?this.tp$call=this.$callNoArgs:e.OneArg?this.tp$call=this.$callOneArg:e.NamedArgs?this.tp$call=this.$callNamedArgs:void 0!==e.MinArgs?this.tp$call=this.$callMinArgs:(this.func_code=this.$meth,this.tp$call=this.$defaultCallMethod)},proto:{$fastCallNoKwargs(e,t){return Sk.abstr.checkNoKwargs(this.$name,t),this.$meth(e)},$callNoArgs(e,t){return Sk.abstr.checkNoArgs(this.$name,e,t),this.$meth()},$callOneArg(e,t){return Sk.abstr.checkOneArg(this.$name,e,t),this.$meth(e[0])},$callNamedArgs(e,t){return e=Sk.abstr.copyKeywordsToNamedArgs(this.$name,this.$flags.NamedArgs,e,t,this.$flags.Defaults),this.$meth(...e)},$callMinArgs(e,t){return Sk.abstr.checkNoKwargs(this.$name,t),Sk.abstr.checkArgsLen(this.$name,e,this.$flags.MinArgs,this.$flags.MaxArgs),this.$meth(...e)},$defaultCallMethod(e,t){return null!==this.$self?Sk.builtin.func.prototype.tp$call.call(this,[this.$self,...e],t):Sk.builtin.func.prototype.tp$call.call(this,e,t)},$memoiseFlags(){return Sk.builtin.func.prototype.$memoiseFlags.call(this)},$resolveArgs(){return Sk.builtin.func.prototype.$resolveArgs.call(this)}},flags:{sk$acceptable_as_base_class:!1},slots:{tp$getattr:Sk.generic.getAttr,$r(){return null===this.$self?new Sk.builtin.str("<built-in function "+this.$name+">"):new Sk.builtin.str("<built-in method "+this.$name+" of "+Sk.abstr.typeName(this.$self)+" object>")},tp$call(e,t){return this.tp$call(e,t)},tp$richcompare(e,t){return("Eq"===t||"NotEq"===t)&&e instanceof Sk.builtin.sk_method?(e=this.$self===e.$self&&this.m$def.$meth===e.m$def.$meth,"Eq"===t?e:!e):Sk.builtin.NotImplemented.NotImplemented$}},getsets:{__module__:{$get(){return this.$module||Sk.builtin.none.none$},$set(e){this.$module=e=e||Sk.builtin.none.none$}},__doc__:{$get(){return this.$doc?new Sk.builtin.str(this.$doc):Sk.builtin.none.none$}},__name__:{$get(){return new Sk.builtin.str(this.$name)}},__text_signature__:{$get(){return new Sk.builtin.str(this.$textsig)}},__self__:{$get(){return this.$self||Sk.sysModules.mp$lookup(this.$module)||Sk.builtin.none.none$}}}})},function(e,t){Sk.builtin.none=Sk.abstr.buildNativeClass("NoneType",{constructor:function(){return Sk.builtin.none.none$},slots:{tp$new:(e,t)=>(Sk.abstr.checkNoArgs("NoneType",e,t),Sk.builtin.none.none$),$r:()=>new Sk.builtin.str("None"),tp$as_number:!0,nb$bool:()=>!1},flags:{sk$acceptable_as_base_class:!1}}),Sk.builtin.none.none$=Object.create(Sk.builtin.none.prototype,{v:{value:null,enumerable:!0}}),Sk.builtin.NotImplemented=Sk.abstr.buildNativeClass("NotImplementedType",{constructor:function(){return Sk.builtin.NotImplemented.NotImplemented$},slots:{$r:()=>new Sk.builtin.str("NotImplemented"),tp$new:(e,t)=>(Sk.abstr.checkNoArgs("NotImplementedType",e,t),Sk.builtin.NotImplemented.NotImplemented$)},flags:{sk$acceptable_as_base_class:!1}}),Sk.builtin.NotImplemented.NotImplemented$=Object.create(Sk.builtin.NotImplemented.prototype,{v:{value:null,enumerable:!0}})},function(e,t){const n=/^(?:(.)?([<>=\^]))?([\+\-\s])?(#)?(0)?(\d+)?(,)?(?:\.(\d+))?([bcdeEfFgGnosxX%])?$/;Sk.formatting={};let r=function(e,t,n,r){if(Sk.asserts.assert("string"==typeof t),e[6]){var i=parseInt(e[6],10);r=e[2]||(e[5]?"=":r?">":"<");let o=i-(t.length+(n?n.length:0));if(0>=o)return t;switch(i=(e[1]||(e[5]?"0":" ")).repeat(o),r){case"=":if("s"===e[9])throw new Sk.builtin.ValueError("'=' alignment not allowed in string format specifier");return n+i+t;case">":return i+n+t;case"<":return n+t+i;case"^":return e=Math.floor(o/2),i.substring(0,e)+n+t+i.substring(e)}}return n+t},i=function(e,t){return t?"-":"+"===e[3]?"+":" "===e[3]?" ":""},o=function(e,t,n){if(Sk.asserts.assert(t instanceof Sk.builtin.int_||t instanceof Sk.builtin.lng),e[8])throw new Sk.builtin.ValueError("Precision not allowed in integer format");let o=t.str$(n,!1);return t=t.nb$isnegative(),t=i(e,t),e[4]&&(16===n?t+="0x":8===n?t+="0o":2===n&&(t+="0b")),"X"===e[9]&&(o=o.toUpperCase()),"n"===e[9]?o=(+o).toLocaleString():e[7]&&((n=o.toString().split("."))[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),o=n.join(".")),r(e,o,t,!0)},s=function(e,t,s){if(!t)return e.str$(10,!0);if(!(t=t.match(n)))throw new Sk.builtin.ValueError("Invalid format specifier");var a=t[9];if(a||(a=s?"g":"d"),-1==(s?"fFeEgG%":"bcdoxXnfFeEgG%").indexOf(a))throw new Sk.builtin.ValueError("Unknown format code '"+t[9]+"' for object of type '"+Sk.abstr.typeName(e)+"'");switch(a){case"d":case"n":return o(t,e,10);case"x":case"X":return o(t,e,16);case"o":return o(t,e,8);case"b":return o(t,e,2);case"c":if(t[3])throw new Sk.builtin.ValueError("Sign not allowed with integer format specifier 'c'");if(t[4])throw new Sk.builtin.ValueError("Alternate form not allowed with integer format specifier 'c'");if(t[7])throw new Sk.builtin.ValueError("Cannot specify ',' with 'c'");if(t[8])throw new Sk.builtin.ValueError("Cannot specify ',' with 'c'");return r(t,String.fromCodePoint(Sk.builtin.asnum$(e)),"",!0);case"f":case"F":case"e":case"E":case"g":case"G":{if(t[4])throw new Sk.builtin.ValueError("Alternate form (#) not allowed in float format specifier");if("string"==typeof(s=Sk.builtin.asnum$(e))&&(s=Number(s)),1/0===s)return r(t,"inf","",!0);if(-1/0===s)return r(t,"inf","-",!0);if(isNaN(s))return r(t,"nan","",!0);e=!1,0>s&&(s=-s,e=!0);var l=["toExponential","toFixed","toPrecision"]["efg".indexOf(a.toLowerCase())];let n=t[8]?parseInt(t[8],10):6;if(s=s[l](n),-1!=="EFG".indexOf(a)&&(s=s.toUpperCase()),"g"===a.toLowerCase()||!t[9]){if(l=s.match(/\.(\d*[1-9])?(0+)$/)){let[,e,t]=l;s=s.slice(0,e?-t.length:-(t.length+1))}-1!=s.indexOf(".")||t[9]||(s+=".0")}return"e"===a.toLowerCase()&&(s=s.replace(/^([-+]?[0-9]*\.?[0-9]+[eE][-+]?)([0-9])?$/,"$10$2")),t[7]&&((a=s.toString().split("."))[0]=a[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),s=a.join(".")),r(t,s,i(t,e),!0)}case"%":if(t[4])throw new Sk.builtin.ValueError("Alternate form (#) not allowed with format specifier '%'");return"string"==typeof(e=Sk.builtin.asnum$(e))&&(e=Number(e)),1/0===e?r(t,"inf%","",!0):-1/0===e?r(t,"inf%","-",!0):isNaN(e)?r(t,"nan%","",!0):(a=!1,0>e&&(e=-e,a=!0),s=t[8]?parseInt(t[8],10):6,e=(100*e).toFixed(s)+"%",r(t,e,i(t,a),!0));default:throw new Sk.builtin.ValueError("Unknown format code '"+t[9]+"'")}};Sk.formatting.mkNumber__format__=e=>function(t){if(!Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("format() argument 2 must be str, not "+Sk.abstr.typeName(t));return new Sk.builtin.str(s(this,t.$jsstr(),e))},Sk.formatting.format=function(e,t){t=t||[];const n={};for(let e=0;e<t.length;e+=2)n[t[e]]=t[e+1];for(let t in e)n[t]=e[t];let r=0;return e=this.v.replace(/{(((?:\d+)|(?:\w+))?((?:\.(\w+))|(?:\[((?:\d+)|(?:\w+))\])?))?(?:!([rs]))?(?::([^}]*))?}/g,(function(e,t,i,o,s,a,l,c,u,d){let h;if(void 0!==a&&""!==a?(h=(e=n[i]).constructor===Array?e[a]:/^\d+$/.test(a)?Sk.abstr.objectGetItem(e,new Sk.builtin.int_(parseInt(a,10)),!1):Sk.abstr.objectGetItem(e,new Sk.builtin.str(a),!1),r++):void 0!==s&&""!==s?h=Sk.abstr.gattr(n[i||r++],new Sk.builtin.str(s)):void 0!==i&&""!==i?h=n[i]:void 0===t||""===t?(h=n[r],r++):(t instanceof Sk.builtin.int_||t instanceof Sk.builtin.float_||t instanceof Sk.builtin.lng||/^\d+$/.test(t))&&(h=n[t],r++),"s"===l)h=new Sk.builtin.str(h);else if("r"===l)h=Sk.builtin.repr(h);else if(""!==l&&void 0!==l)throw new Sk.builtin.ValueError("Unknown conversion specifier "+l);return Sk.abstr.objectFormat(h,new Sk.builtin.str(c)).$jsstr()})),new Sk.builtin.str(e)},Sk.formatting.formatString=function(e){if(!Sk.builtin.checkString(e))throw new Sk.builtin.TypeError("format() argument 2 must be str, not "+Sk.abstr.typeName(e));if((e=e.$jsstr().match(n))[9]&&"s"!==e[9])throw new Sk.builtin.ValueError("Unknown format code '"+e[9]+"' for object of type 'str'");if(e[3])throw new Sk.builtin.ValueError("Sign not allowed in string format specifier");if(e[4])throw new Sk.builtin.ValueError("Alternate form (#) not allowed with string format specifier");if(e[7])throw new Sk.builtin.ValueError("Cannot specify ',' with 's'");let t=this.v;return e[8]&&(t=t.substring(0,e[8])),new Sk.builtin.str(r(e,t,"",!1))}},function(e,t){function n(e){let t;const n=[];for(let r=0;r<e.length;r++)t=e.charAt(r),h.test(t)?n.push(t):"\\000"===t?n.push("\\000"):n.push("\\"+t);return n.join("")}function r(e,t,n){if(null!==(t=Sk.builtin.checkNone(t)?null:e.get$tgt(t))&&!t.length)throw new Sk.builtin.ValueError("empty separator");e=e.v;var r=0;if(null===t){var i=/[\s\xa0]+/g;r=e.length,r-=(e=e.replace(f,"")).length}else i=t.replace(p,"\\$1"),i=new RegExp(i,"g");const o=[];let s,a=0,l=0;for(n=0>n?1/0:n;null!=(s=i.exec(e))&&l<n&&s.index!==i.lastIndex;)o.push(a+r),o.push(s.index+r),a=i.lastIndex,l+=1;return(null!==t||e.length-a)&&(o.push(a+r),o.push(e.length+r)),o}function i(e,t){return function(r){if(void 0===r||Sk.builtin.checkNone(r))r=e;else{if(!(r instanceof Sk.builtin.str))throw new Sk.builtin.TypeError("strip arg must be None or str");r=n(r.v),r=new RegExp(t(r),"g")}return new Sk.builtin.str(this.v.replace(r,""))}}function o(e){return function(t){t=this.get$tgt(t);const n=this.v;let r;if(e){if(r=n.lastIndexOf(t),0>r)return new Sk.builtin.tuple([new Sk.builtin.str(""),new Sk.builtin.str(""),new Sk.builtin.str(n)])}else if(r=n.indexOf(t),0>r)return new Sk.builtin.tuple([new Sk.builtin.str(n),new Sk.builtin.str(""),new Sk.builtin.str("")]);return new Sk.builtin.tuple([new Sk.builtin.str(n.substring(0,r)),new Sk.builtin.str(t),new Sk.builtin.str(n.substring(r+t.length))])}}function s(e,t){return function(n,r){if(n=Sk.misceval.asIndexSized(n,Sk.builtin.OverflowError),void 0===r)r=" ";else{if(!(r instanceof Sk.builtin.str&&1===r.sq$length()))throw new Sk.builtin.TypeError("the fill character must be a str of length 1");r=r.v}const i=this.sq$length();let o;return i>=n?new Sk.builtin.str(this.v):t?(o=r.repeat(Math.floor((n-i)/2)),o=o+this.v+o,(n-i)%2&&(o+=r),new Sk.builtin.str(o)):(o=r.repeat(n-i),new Sk.builtin.str(e?o+this.v:this.v+o))}}function a(e,t,n){if(({start:t,end:n}=Sk.builtin.slice.startEnd$wrt(e,t,n)),e.$hasAstralCodePoints()){const r=e.codepoints[t];t=void 0===r?t+e.v.length-e.codepoints.length:r,n=void 0===(n=e.codepoints[n])?e.v.length:n}return{start:t,end:n}}function l(e){return function(t,n,r){if(t=this.get$tgt(t),({start:n,end:r}=a(this,n,r)),r<n)return-1;if(r-=t.length,t=(t=e?this.v.lastIndexOf(t,r):this.v.indexOf(t,n))>=n&&t<=r?t:-1,this.codepoints){r=this.sq$length(),n=-1;for(let e=0;e<r;e++)t==this.codepoints[e]&&(n=e)}else n=t;return n}}function c(e,t){return function(n,r,i){if(!(n instanceof Sk.builtin.str||n instanceof Sk.builtin.tuple))throw new Sk.builtin.TypeError(e+" first arg must be str or a tuple of str, not "+Sk.abstr.typeName(n));if(({start:r,end:i}=a(this,r,i)),r>i)return Sk.builtin.bool.false$;if(r=this.v.slice(r,i),n instanceof Sk.builtin.tuple){for(let i=Sk.abstr.iter(n),o=i.tp$iternext();void 0!==o;o=i.tp$iternext()){if(!(o instanceof Sk.builtin.str))throw new Sk.builtin.TypeError("tuple for "+e+" must only contain str, not "+Sk.abstr.typeName(o));if(t(r,o.v))return Sk.builtin.bool.true$}return Sk.builtin.bool.false$}return new Sk.builtin.bool(t(r,n.v))}}var u=/^[0-9!#_]/,d=Object.create(null);Sk.builtin.str=Sk.abstr.buildNativeClass("str",{constructor:function(e){if(Sk.asserts.assert(this instanceof Sk.builtin.str,"bad call to str - use 'new'"),"string"!=typeof e)if(void 0===e)e="";else if(null===e)e="None";else{if(void 0!==e.tp$str)return e.tp$str();if("number"!=typeof e)throw new Sk.builtin.TypeError("could not convert object of type '"+Sk.abstr.typeName(e)+"' to str");e=Number.isFinite(e)?String(e):String(e).replace("Infinity","inf").replace("NaN","nan")}var t=d[e];if(void 0!==t)return t;d[e]=this,t=void 0===g[e]?e:e+"_$rw$",this.$mangled=t,this.$savedKeyHash=e.replace(u,"!$&"),this.v=e},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,tp$doc:"str(object='') -> str\nstr(bytes_or_buffer[, encoding[, errors]]) -> str\n\nCreate a new string object from the given object. If encoding or\nerrors is specified, then the object must expose a data buffer\nthat will be decoded using the given encoding and error handler.\nOtherwise, returns the result of object.__str__() (if defined)\nor repr(object).\nencoding defaults to sys.getdefaultencoding().\nerrors defaults to 'strict'.",tp$new(e,t){if(t=t||[],this!==Sk.builtin.str.prototype)return this.$subtype_new(e,t);if(1>=e.length&&!t.length)return new Sk.builtin.str(e[0]);if(Sk.__future__.python3){const[n,r,i]=Sk.abstr.copyKeywordsToNamedArgs("str",["object","encoding","errors"],e,t);if(void 0===n||void 0===r&&void 0===i)return new Sk.builtin.str(n);if(Sk.builtin.bytes.check$encodeArgs("str",r,i),!Sk.builtin.checkBytes(n))throw new Sk.builtin.TypeError("decoding to str: need a bytes-like object, "+Sk.abstr.typeName(n)+" found");return Sk.builtin.bytes.$decode.call(n,r,i)}throw new Sk.builtin.TypeError("str takes at most one argument ("+(e.length+t.length)+" given)")},$r(){let e="'";-1!==this.v.indexOf("'")&&-1===this.v.indexOf('"')&&(e='"');const t=this.v.length;let n=e;for(let o=0;o<t;o++){var r=this.v.charAt(o),i=this.v.charCodeAt(o);r===e||"\\"===r?n+="\\"+r:"\t"===r?n+="\\t":"\n"===r?n+="\\n":"\r"===r?n+="\\r":(255<i&&55296>i||57344<=i)&&!Sk.__future__.python3?n+="\\u"+("000"+i.toString(16)).slice(-4):55296<=i&&!Sk.__future__.python3?(r=this.v.codePointAt(o),o++,i="0000000"+(r=r.toString(16)).toString(16),n=4<r.length?n+"\\U"+i.slice(-8):n+"\\u"+i.slice(-4)):255<i&&!Sk.__future__.python3?n+="\\ufffd":" ">r||127<=i&&!Sk.__future__.python3?(2>(r=r.charCodeAt(0).toString(16)).length&&(r="0"+r),n+="\\x"+r):n+=r}return new Sk.builtin.str(n+e)},tp$str(){return this.constructor===Sk.builtin.str?this:new Sk.builtin.str(this.v)},tp$iter(){return new m(this)},tp$richcompare(e,t){if(!(e instanceof Sk.builtin.str))return Sk.builtin.NotImplemented.NotImplemented$;switch(t){case"Lt":return this.v<e.v;case"LtE":return this.v<=e.v;case"Eq":return this.v===e.v;case"NotEq":return this.v!==e.v;case"Gt":return this.v>e.v;case"GtE":return this.v>=e.v}},mp$subscript(e){let t;if(Sk.misceval.isIndex(e)){if(e=Sk.misceval.asIndexSized(e,Sk.builtin.OverflowError),t=this.sq$length(),0>e&&(e+=t),0>e||e>=t)throw new Sk.builtin.IndexError("string index out of range");return this.codepoints?new Sk.builtin.str(this.v.substring(this.codepoints[e],this.codepoints[e+1])):new Sk.builtin.str(this.v.charAt(e))}if(e instanceof Sk.builtin.slice){let n="";return t=this.sq$length(),this.codepoints?e.sssiter$(t,e=>{n+=this.v.substring(this.codepoints[e],this.codepoints[e+1])}):e.sssiter$(t,e=>{n+=this.v.charAt(e)}),new Sk.builtin.str(n)}throw new Sk.builtin.TypeError("string indices must be integers, not "+Sk.abstr.typeName(e))},sq$length(){return this.$hasAstralCodePoints()?this.codepoints.length:this.v.length},sq$concat(e){if(!(e instanceof Sk.builtin.str))throw new Sk.builtin.TypeError("cannot concatenate 'str' and '"+Sk.abstr.typeName(e)+"' objects");return new Sk.builtin.str(this.v+e.v)},sq$repeat(e){if(!Sk.misceval.isIndex(e))throw new Sk.builtin.TypeError("can't multiply sequence by non-int of type '"+Sk.abstr.typeName(e)+"'");if((e=Sk.misceval.asIndexSized(e,Sk.builtin.OverflowError))*this.v.length>Number.MAX_SAFE_INTEGER)throw new Sk.builtin.OverflowError;let t="";for(let n=0;n<e;n++)t+=this.v;return new Sk.builtin.str(t)},sq$contains(e){if(!(e instanceof Sk.builtin.str))throw new Sk.builtin.TypeError("'in <string>' requires string as left operand not "+Sk.abstr.typeName(e));return-1!==this.v.indexOf(e.v)},tp$as_number:!0,nb$remainder:function(e){const t=this.sk$builtinBase;e.constructor===Sk.builtin.tuple||e instanceof Sk.builtin.dict||e instanceof Sk.builtin.mappingproxy||(e=new Sk.builtin.tuple([e]));var n=0,r=this.$jsstr().replace(/%(\([a-zA-Z0-9]+\))?([#0 +\-]+)?(\*|[0-9]+)?(\.(\*|[0-9]+))?[hlL]?([diouxXeEfFgGcrsb%])/g,(function(r,i,o,s,a,l,c){var u,d,h,p,f;s=Sk.builtin.asnum$(s),a=Sk.builtin.asnum$(a),void 0!==i&&""!==i||"%"==c||(u=n++),""===a&&(a=void 0);var m=d=h=p=f=!1;if(o&&(-1!==o.indexOf("-")?p=!0:-1!==o.indexOf("0")&&(f=!0),-1!==o.indexOf("+")?d=!0:-1!==o.indexOf(" ")&&(h=!0),m=-1!==o.indexOf("#")),a&&(a=parseInt(a.substr(1),10)),o=function(e,t){var n;t=Sk.builtin.asnum$(t);var r=!1;if("number"==typeof e){0>e&&(e=-e,r=!0);var i=e.toString(t)}else e instanceof Sk.builtin.float_?(2<(i=e.str$(t,!1)).length&&".0"===i.substr(-2)&&(i=i.substr(0,i.length-2)),r=e.nb$isnegative()):(e instanceof Sk.builtin.int_||e instanceof Sk.builtin.lng)&&(i=e.str$(t,!1),r=e.nb$isnegative());if(Sk.asserts.assert(void 0!==i,"unhandled number format"),e=!1,a)for(n=i.length;n<a;++n)i="0"+i,e=!0;return n="",r?n="-":d?n="+"+n:h&&(n=" "+n),m&&(16===t?n+="0x":8!==t||e||"0"===i||(n+="0")),[n,i]},r=function(e){var t=e[0];if(e=e[1],s){s=parseInt(s,10);var n=e.length+t.length;if(f)for(;n<s;++n)e="0"+e;else if(p){for(;n<s;++n)e+=" ";Sk.__future__.python3&&(e+=t,t="")}else for(;n<s;++n)t=" "+t}return t+e},e.constructor===Sk.builtin.tuple)i=e.v[u];else if(void 0!==e.mp$subscript&&void 0!==i)i=i.substring(1,i.length-1),i=e.mp$subscript(new t(i));else{if(e.constructor!==Sk.builtin.dict&&e.constructor!==Sk.builtin.list)throw new Sk.builtin.AttributeError(e.tp$name+" instance has no attribute 'mp$subscript'");i=e}if("d"===c||"i"===c){var g=o(i,10);if(void 0===g[1])throw new Sk.builtin.TypeError("%"+c+" format: a number is required, not "+Sk.abstr.typeName(i));return c=g[1],g[1]=-1!==c.indexOf(".")?parseInt(c,10).toString():c,r(g)}if("o"===c)return r(o(i,8));if("x"===c)return r(o(i,16));if("X"===c)return r(o(i,16)).toUpperCase();if("f"===c||"F"===c||"e"===c||"E"===c||"g"===c||"G"===c)return"string"==typeof(g=Sk.builtin.asnum$(i))&&(g=Number(g)),1/0===g?"inf":-1/0===g?"-inf":isNaN(g)?"nan":(u=["toExponential","toFixed","toPrecision"]["efg".indexOf(c.toLowerCase())],void 0!==a&&""!==a||("e"===c||"E"===c?a=6:"f"!==c&&"F"!==c||(a=Sk.__future__.python3?6:7)),u=g[u](a),Sk.builtin.checkFloat(i)&&0===g&&-1/0==1/g&&(u="-"+u),Sk.__future__.python3&&(7<=u.length&&"0.0000"==u.slice(0,6)&&(u=parseFloat(u).toExponential()),"-"==u.charAt(u.length-2)&&(u=u.slice(0,u.length-1)+"0"+u.charAt(u.length-1))),-1!=="EFG".indexOf(c)&&(u=u.toUpperCase()),r(["",u]));if("c"===c){if("number"==typeof i)return String.fromCharCode(i);if(i instanceof Sk.builtin.int_||i instanceof Sk.builtin.float_)return String.fromCharCode(i.v);if(i instanceof Sk.builtin.lng)return String.fromCharCode(i.str$(10,!1)[0]);if(i.constructor===Sk.builtin.str)return i.v.substr(0,1);throw new Sk.builtin.TypeError("an integer is required")}if("r"===c)return c=Sk.builtin.repr(i),a?c.v.substr(0,a):c.v;if("s"===c&&t===Sk.builtin.str)return c=(c=new Sk.builtin.str(i)).$jsstr(),a?c.substr(0,a):(s&&(c=r([" ",c])),c);if("b"===c||"s"===c){if(t===Sk.builtin.str)throw new Sk.builtin.ValueError("unsupported format character 'b'");if(!(i instanceof Sk.builtin.bytes)&&void 0===(g=Sk.abstr.lookupSpecial(i,Sk.builtin.str.$bytes)))throw new Sk.builtin.TypeError("%b requires a bytes-like object, or an object that implements __bytes__, not '"+Sk.abstr.typeName(i)+"'");return void 0!==g&&(i=new Sk.builtin.bytes(i)),c=i.$jsstr(),a?c.substr(0,a):(s&&(c=r([" ",c])),c)}return"%"===c?"%":void 0}));return new t(r)}},proto:{toString(){return this.v},$subtype_new(e,t){const n=new this.constructor;return e=Sk.builtin.str.prototype.tp$new(e,t),n.$mangled=e.$mangled,n.$savedKeyHash=e.$savedKeyHash,n.v=e.v,n},$jsstr(){return this.v},$hasAstralCodePoints(){if(null===this.codepoints)return!1;if(void 0!==this.codepoints)return!0;for(var e=0;e<this.v.length;e++){let t=this.v.charCodeAt(e);if(55296<=t&&57344>t){for(this.codepoints=[],e=0;e<this.v.length;e++)this.codepoints.push(e),t=this.v.charCodeAt(e),55296<=t&&56320>t&&e++;return!0}}return this.codepoints=null,!1},sk$asarray(){const e=[];if(this.$hasAstralCodePoints()){var t=this.codepoints;for(let n=0;n<t.length;n++)e.push(new Sk.builtin.str(this.v.substring(t[n],t[n+1])))}else for(t=0;t<this.v.length;t++)e.push(new Sk.builtin.str(this.v[t]));return e},find$left:l(!1),find$right:l(!0),get$tgt(e){if(e instanceof Sk.builtin.str)return e.v;throw new Sk.builtin.TypeError("a str instance is required not '"+Sk.abstr.typeName(e)+"'")}},methods:{encode:{$meth:function(e,t){return({encoding:e,errors:t}=Sk.builtin.bytes.check$encodeArgs("encode",e,t)),e=Sk.builtin.bytes.str$encode(this,e,t),Sk.__future__.python3?e:new Sk.builtin.str(e.$jsstr())},$flags:{NamedArgs:["encoding","errors"]},$textsig:"($self, /, encoding='utf-8', errors='strict')",$doc:"Encode the string using the codec registered for encoding.\n\n encoding\n The encoding in which to encode the string.\n errors\n The error handling scheme to use for encoding errors.\n The default is 'strict' meaning that encoding errors raise a\n UnicodeEncodeError. Other possible values are 'ignore', 'replace' and\n 'xmlcharrefreplace' as well as any other name registered with\n codecs.register_error that can handle UnicodeEncodeErrors."},replace:{$meth(e,t,r){if(e=this.get$tgt(e),t=this.get$tgt(t),r=void 0===r?-1:Sk.misceval.asIndexSized(r,Sk.builtin.OverflowError),e=new RegExp(n(e),"g"),0>r)return new Sk.builtin.str(this.v.replace(e,t));let i=0;return e=this.v.replace(e,e=>i++<r?t:e),new Sk.builtin.str(e)},$flags:{MinArgs:2,MaxArgs:3},$textsig:"($self, old, new, count=-1, /)",$doc:"Return a copy with all occurrences of substring old replaced by new.\n\n count\n Maximum number of occurrences to replace.\n -1 (the default value) means replace all occurrences.\n\nIf the optional argument count is given, only the first count occurrences are\nreplaced."},split:{$meth:function(e,t){e=r(this,e,t=Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError)),t=[];for(let n=0;n<e.length;n++)t.push(new Sk.builtin.str(this.v.substring(e[n],e[++n])));return new Sk.builtin.list(t)},$flags:{NamedArgs:["sep","maxsplit"],Defaults:[Sk.builtin.none.none$,-1]},$textsig:"($self, /, sep=None, maxsplit=-1)",$doc:"Return a list of the words in the string, using sep as the delimiter string.\n\n sep\n The delimiter according which to split the string.\n None (the default value) means split according to any whitespace,\n and discard empty strings from the result.\n maxsplit\n Maximum number of splits to do.\n -1 (the default value) means no limit."},rsplit:{$meth:function(e,t){t=Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError),e=r(this,e,-1);var n=0>t?0:2*(e.length/2-t);for(t=[],0>=n?n=0:t.push(new Sk.builtin.str(this.v.slice(0,e[n-1])));n<e.length;n++)t.push(new Sk.builtin.str(this.v.substring(e[n],e[++n])));return new Sk.builtin.list(t)},$flags:{NamedArgs:["sep","maxsplit"],Defaults:[Sk.builtin.none.none$,-1]},$textsig:"($self, /, sep=None, maxsplit=-1)",$doc:"Return a list of the words in the string, using sep as the delimiter string.\n\n sep\n The delimiter according which to split the string.\n None (the default value) means split according to any whitespace,\n and discard empty strings from the result.\n maxsplit\n Maximum number of splits to do.\n -1 (the default value) means no limit.\n\nSplits are done starting at the end of the string and working to the front."},join:{$meth(e){const t=[];return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(e),e=>{if(!(e instanceof Sk.builtin.str))throw new Sk.builtin.TypeError("sequence item "+t.length+": expected str, "+Sk.abstr.typeName(e)+" found");t.push(e.v)}),()=>new Sk.builtin.str(t.join(this.v)))},$flags:{OneArg:!0},$textsig:"($self, iterable, /)",$doc:"Concatenate any number of strings.\n\nThe string whose method is called is inserted in between each given string.\nThe result is returned as a new string.\n\nExample: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs'"},capitalize:{$meth:function(){return new Sk.builtin.str(this.v.charAt(0).toUpperCase()+this.v.slice(1).toLowerCase())},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return a capitalized version of the string.\n\nMore specifically, make the first character have upper case and the rest lower\ncase."},title:{$meth:function(){const e=this.v.replace(/[a-z][a-z]*/gi,e=>e[0].toUpperCase()+e.substr(1).toLowerCase());return new Sk.builtin.str(e)},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return a version of the string where each word is titlecased.\n\nMore specifically, words start with uppercased characters and all remaining\ncased characters have lower case."},center:{$meth:s(!1,!0),$flags:{MinArgs:1,MaxArgs:2},$textsig:"($self, width, fillchar=' ', /)",$doc:"Return a centered string of length width.\n\nPadding is done using the specified fill character (default is a space)."},count:{$meth:function(e,t,n){return e=this.get$tgt(e),({start:t,end:n}=a(this,t,n)),n<t?new Sk.builtin.int_(0):(e=e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),e=new RegExp(e,"g"),(t=this.v.slice(t,n).match(e))?new Sk.builtin.int_(t.length):new Sk.builtin.int_(0))},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"S.count(sub[, start[, end]]) -> int\n\nReturn the number of non-overlapping occurrences of substring sub in\nstring S[start:end]. Optional arguments start and end are\ninterpreted as in slice notation."},expandtabs:{$meth:function(e){if(!Sk.builtin.checkInt(e))throw new Sk.builtin.TypeError("an integer is required, got type"+Sk.abstr.typeName(e));e=Sk.builtin.asnum$(e);const t=Array(e+1).join(" "),n=this.v.replace(/([^\r\n\t]*)\t/g,(n,r)=>r+t.slice(r.length%e));return new Sk.builtin.str(n)},$flags:{NamedArgs:["tabsize"],Defaults:[8]},$textsig:"($self, /, tabsize=8)",$doc:"Return a copy where all tab characters are expanded using spaces.\n\nIf tabsize is not given, a tab size of 8 characters is assumed."},find:{$meth:function(e,t,n){return new Sk.builtin.int_(this.find$left(e,t,n))},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"S.find(sub[, start[, end]]) -> int\n\nReturn the lowest index in S where substring sub is found,\nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\n\nReturn -1 on failure."},partition:{$meth:o(!1),$flags:{OneArg:!0},$textsig:"($self, sep, /)",$doc:"Partition the string into three parts using the given separator.\n\nThis will search for the separator in the string. If the separator is found,\nreturns a 3-tuple containing the part before the separator, the separator\nitself, and the part after it.\n\nIf the separator is not found, returns a 3-tuple containing the original string\nand two empty strings."},index:{$meth:function(e,t,n){if(-1===(e=this.find$left(e,t,n)))throw new Sk.builtin.ValueError("substring not found");return new Sk.builtin.int_(e)},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"S.index(sub[, start[, end]]) -> int\n\nReturn the lowest index in S where substring sub is found, \nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\n\nRaises ValueError when the substring is not found."},ljust:{$meth:s(!1,!1),$flags:{MinArgs:1,MaxArgs:2},$textsig:"($self, width, fillchar=' ', /)",$doc:"Return a left-justified string of length width.\n\nPadding is done using the specified fill character (default is a space)."},lower:{$meth(){return new Sk.builtin.str(this.v.toLowerCase())},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return a copy of the string converted to lowercase."},lstrip:{$meth:i(/^\s+/g,e=>"^["+e+"]+"),$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, chars=None, /)",$doc:"Return a copy of the string with leading whitespace removed.\n\nIf chars is given and not None, remove characters in chars instead."},rfind:{$meth(e,t,n){return new Sk.builtin.int_(this.find$right(e,t,n))},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"S.rfind(sub[, start[, end]]) -> int\n\nReturn the highest index in S where substring sub is found,\nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\n\nReturn -1 on failure."},rindex:{$meth:function(e,t,n){if(-1===(e=this.find$right(e,t,n)))throw new Sk.builtin.ValueError("substring not found");return new Sk.builtin.int_(e)},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"S.rindex(sub[, start[, end]]) -> int\n\nReturn the highest index in S where substring sub is found,\nsuch that sub is contained within S[start:end]. Optional\narguments start and end are interpreted as in slice notation.\n\nRaises ValueError when the substring is not found."},rjust:{$meth:s(!0,!1),$flags:{MinArgs:1,MaxArgs:2},$textsig:"($self, width, fillchar=' ', /)",$doc:"Return a right-justified string of length width.\n\nPadding is done using the specified fill character (default is a space)."},rstrip:{$meth:i(/\s+$/g,e=>"["+e+"]+$"),$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, chars=None, /)",$doc:"Return a copy of the string with trailing whitespace removed.\n\nIf chars is given and not None, remove characters in chars instead."},rpartition:{$meth:o(!0),$flags:{OneArg:!0},$textsig:"($self, sep, /)",$doc:"Partition the string into three parts using the given separator.\n\nThis will search for the separator in the string, starting at the end. If\nthe separator is found, returns a 3-tuple containing the part before the\nseparator, the separator itself, and the part after it.\n\nIf the separator is not found, returns a 3-tuple containing two empty strings\nand the original string."},splitlines:{$meth:function(e){e=Sk.misceval.isTrue(e);const t=this.v,n=[],r=t.length;var i=0;for(let s=0;s<r;s++){var o=t.charAt(s);"\n"===t.charAt(s+1)&&"\r"===o?(o=s+2,i=t.slice(i,o),e||(i=i.replace(/(\r|\n)/g,"")),n.push(new Sk.builtin.str(i)),i=o):("\n"===o&&"\r"!==t.charAt(s-1)||"\r"===o)&&(o=s+1,i=t.slice(i,o),e||(i=i.replace(/(\r|\n)/g,"")),n.push(new Sk.builtin.str(i)),i=o)}return i<r&&(i=t.slice(i,r),e||(i=i.replace(/(\r|\n)/g,"")),n.push(new Sk.builtin.str(i))),new Sk.builtin.list(n)},$flags:{NamedArgs:["keepends"],Defaults:[!1]},$textsig:"($self, /, keepends=False)",$doc:"Return a list of the lines in the string, breaking at line boundaries.\n\nLine breaks are not included in the resulting list unless keepends is given and\ntrue."},strip:{$meth:i(/^\s+|\s+$/g,e=>"^["+e+"]+|["+e+"]+$"),$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, chars=None, /)",$doc:"Return a copy of the string with leading and trailing whitespace remove.\n\nIf chars is given and not None, remove characters in chars instead."},swapcase:{$meth(){const e=this.v.replace(/[a-z]/gi,e=>{const t=e.toLowerCase();return t===e?e.toUpperCase():t});return new Sk.builtin.str(e)},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Convert uppercase characters to lowercase and lowercase characters to uppercase."},upper:{$meth(){return new Sk.builtin.str(this.v.toUpperCase())},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return a copy of the string converted to uppercase."},startswith:{$meth:c("startswith",(e,t)=>0===e.indexOf(t)),$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"S.startswith(prefix[, start[, end]]) -> bool\n\nReturn True if S starts with the specified prefix, False otherwise.\nWith optional start, test S beginning at that position.\nWith optional end, stop comparing S at that position.\nprefix can also be a tuple of strings to try."},endswith:{$meth:c("endswith",(e,t)=>-1!==e.indexOf(t,e.length-t.length)),$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"S.endswith(suffix[, start[, end]]) -> bool\n\nReturn True if S ends with the specified suffix, False otherwise.\nWith optional start, test S beginning at that position.\nWith optional end, stop comparing S at that position.\nsuffix can also be a tuple of strings to try."},isascii:{$meth(){return new Sk.builtin.bool(/^[\x00-\x7F]*$/.test(this.v))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if all characters in the string are ASCII, False otherwise.\n\nASCII characters have code points in the range U+0000-U+007F.\nEmpty string is ASCII too."},islower:{$meth:function(){return new Sk.builtin.bool(this.v.length&&/[a-z]/.test(this.v)&&!/[A-Z]/.test(this.v))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if the string is a lowercase string, False otherwise.\n\nA string is lowercase if all cased characters in the string are lowercase and\nthere is at least one cased character in the string."},isupper:{$meth:function(){return new Sk.builtin.bool(this.v.length&&!/[a-z]/.test(this.v)&&/[A-Z]/.test(this.v))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if the string is an uppercase string, False otherwise.\n\nA string is uppercase if all cased characters in the string are uppercase and\nthere is at least one cased character in the string."},istitle:{$meth:function(){const e=this.v;let t,n=!1,r=!1;for(let i=0;i<e.length;i++)if(t=e.charAt(i),!/[a-z]/.test(t)&&/[A-Z]/.test(t)){if(r)return Sk.builtin.bool.false$;n=r=!0}else if(/[a-z]/.test(t)&&!/[A-Z]/.test(t)){if(!r)return Sk.builtin.bool.false$;n=!0}else r=!1;return new Sk.builtin.bool(n)},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if the string is a title-cased string, False otherwise.\n\nIn a title-cased string, upper- and title-case characters may only\nfollow uncased characters and lowercase characters only cased ones."},isspace:{$meth:function(){return new Sk.builtin.bool(/^\s+$/.test(this.v))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if the string is a whitespace string, False otherwise.\n\nA string is whitespace if all characters in the string are whitespace and there\nis at least one character in the string."},isdigit:{$meth:function(){return new Sk.builtin.bool(/^\d+$/.test(this.v))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if the string is a digit string, False otherwise.\n\nA string is a digit string if all characters in the string are digits and there\nis at least one character in the string."},isnumeric:{$meth:function(){return new Sk.builtin.bool(this.v.length&&!/[^0-9]/.test(this.v))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if the string is a numeric string, False otherwise.\n\nA string is numeric if all characters in the string are numeric and there is at\nleast one character in the string."},isalpha:{$meth:function(){return new Sk.builtin.bool(this.v.length&&!/[^a-zA-Z]/.test(this.v))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if the string is an alphabetic string, False otherwise.\n\nA string is alphabetic if all characters in the string are alphabetic and there\nis at least one character in the string."},isalnum:{$meth:function(){return new Sk.builtin.bool(this.v.length&&!/[^a-zA-Z0-9]/.test(this.v))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if the string is an alpha-numeric string, False otherwise.\n\nA string is alpha-numeric if all characters in the string are alpha-numeric and\nthere is at least one character in the string."},zfill:{$meth:function(e){e=Sk.misceval.asIndexSized(e,Sk.builtin.OverflowError);let t="";e-=this.v.length;const n="+"===this.v[0]||"-"===this.v[0]?1:0;for(let n=0;n<e;n++)t+="0";return new Sk.builtin.str(this.v.substr(0,n)+t+this.v.substr(n))},$flags:{OneArg:!0},$textsig:"($self, width, /)",$doc:"Pad a numeric string with zeros on the left, to fill a field of the given width.\n\nThe string is never truncated."},format:{$meth:Sk.formatting.format,$flags:{FastCall:!0},$textsig:null,$doc:"S.format(*args, **kwargs) -> str\n\nReturn a formatted version of S, using substitutions from args and kwargs.\nThe substitutions are identified by braces ('{' and '}')."},__format__:{$meth:Sk.formatting.formatString,$flags:{OneArg:!0},$textsig:"($self, format_spec, /)",$doc:"Return a formatted version of the string as described by format_spec."},__getnewargs__:{$meth(){return new Sk.builtin.tuple(new Sk.builtin.str(this.v))},$flags:{NoArgs:!0},$textsig:null,$doc:null}}}),Sk.exportSymbol("Sk.builtin.str",Sk.builtin.str);var h=/^[A-Za-z0-9]+$/,p=/([.*+?=|\\\/()\[\]\{\}^$])/g,f=/^[\s\xa0]+/;Sk.builtin.str.$py2decode=new Sk.builtin.method_descriptor(Sk.builtin.str,{$name:"decode",$meth(e,t){const n=new Sk.builtin.bytes(this.v);return Sk.builtin.bytes.$decode.call(n,e,t)},$flags:{NamedArgs:["encoding","errors"]}});var m=Sk.abstr.buildIteratorClass("str_iterator",{constructor:function(e){this.$index=0,e.$hasAstralCodePoints()?(this.$seq=e.codepoints,this.tp$iternext=()=>{const t=this.$seq[this.$index];if(void 0!==t)return new Sk.builtin.str(e.v.substring(t,this.$seq[++this.$index]))}):(this.$seq=e.v,this.tp$iternext=()=>{const e=this.$seq[this.$index++];if(void 0!==e)return new Sk.builtin.str(e)})},iternext(){return this.tp$iternext()},methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$acceptable_as_base_class:!1}}),g={abstract:!0,as:!0,boolean:!0,break:!0,byte:!0,case:!0,catch:!0,char:!0,class:!0,continue:!0,const:!0,debugger:!0,default:!0,delete:!0,do:!0,double:!0,else:!0,enum:!0,export:!0,extends:!0,false:!0,final:!0,finally:!0,float:!0,for:!0,function:!0,goto:!0,if:!0,implements:!0,import:!0,in:!0,instanceof:!0,int:!0,interface:!0,is:!0,long:!0,namespace:!0,native:!0,new:!0,null:!0,package:!0,private:!0,protected:!0,public:!0,return:!0,short:!0,static:!0,super:!0,switch:!0,synchronized:!0,this:!0,throw:!0,throws:!0,transient:!0,true:!0,try:!0,typeof:!0,use:!0,var:!0,void:!0,volatile:!0,while:!0,with:!0,constructor:!0,__defineGetter__:!0,__defineSetter__:!0,apply:!0,arguments:!0,call:!0,caller:!0,eval:!0,hasOwnProperty:!0,isPrototypeOf:!0,__lookupGetter__:!0,__lookupSetter__:!0,__noSuchMethod__:!0,propertyIsEnumerable:!0,prototype:!0,toSource:!0,toLocaleString:!0,toString:!0,unwatch:!0,valueOf:!0,watch:!0,length:!0,name:!0};Sk.builtin.str.reservedWords_=g},function(e,t){Sk.builtin.func=Sk.abstr.buildNativeClass("function",{constructor:function(e,t,n,r){if(Sk.asserts.assert(this instanceof Sk.builtin.func,"builtin func should be called as a class with `new`"),this.func_code=e,this.func_globals=t||null,this.$name=e.co_name&&e.co_name.v||e.name||"<native JS>",this.$d=Sk.builtin.dict?new Sk.builtin.dict:void 0,this.$doc=e.co_docstring||Sk.builtin.none.none$,this.$module=Sk.globals&&Sk.globals.__name__||Sk.builtin.none.none$,this.$qualname=e.co_qualname&&e.co_qualname.v||this.$name,void 0!==r)for(let e in r)n[e]=r[e];this.func_closure=n,this.$memoiseFlags(),this.memoised=e.co_fastcall||null,this.tp$call=e.co_fastcall?e.bind(this):Sk.builtin.func.prototype.tp$call.bind(this)},slots:{tp$getattr:Sk.generic.getAttr,tp$descr_get(e,t){return null===e?this:new Sk.builtin.method(this,e)},$r(){return new Sk.builtin.str("<function "+this.$qualname+">")},tp$call(e,t){if(this.memoised||(this.$memoiseFlags(),this.memoised=!0),void 0===this.co_argcount&&void 0===this.co_varnames&&!this.co_kwargs&&!this.func_closure){if(t&&0!==t.length)throw new Sk.builtin.TypeError(this.$name+"() takes no keyword arguments");return this.func_code.apply(this.func_globals,e)}return e=this.$resolveArgs(e,t),this.func_closure&&e.push(this.func_closure),this.func_code.apply(this.func_globals,e)}},getsets:{__name__:{$get(){return new Sk.builtin.str(this.$name)},$set(e){if(!Sk.builtin.checkString(e))throw new Sk.builtin.TypeError("__name__ must be set to a string object");this.$name=e.$jsstr()}},__qualname__:{$get(){return new Sk.builtin.str(this.$qualname)},$set(e){if(!Sk.builtin.checkString(e))throw new Sk.builtin.TypeError("__qualname__ must be set to a string object");this.$qualname=e.$jsstr()}},__dict__:Sk.generic.getSetDict,__defaults__:{$get(){return new Sk.builtin.tuple(this.$defaults)}},__doc__:{$get(){return this.$doc},$set(e){this.$doc=e||Sk.builtin.none.none$}}},proto:{$memoiseFlags(){this.co_varnames=this.func_code.co_varnames,this.co_argcount=this.func_code.co_argcount,void 0===this.co_argcount&&this.co_varnames&&(this.co_argcount=this.co_argcount=this.co_varnames.length),this.co_kwonlyargcount=this.func_code.co_kwonlyargcount||0,this.co_varargs=this.func_code.co_varargs,this.co_kwargs=this.func_code.co_kwargs,this.$defaults=this.func_code.$defaults||[],this.$kwdefs=this.func_code.$kwdefs||[]},$resolveArgs:function(e,t){var n=this.co_argcount;void 0===n&&(n=this.co_varnames?this.co_varnames.length:e.length);var r=this.co_varnames||[],i=this.co_kwonlyargcount||0;let o,s=n+i;if(!(0!==i||this.co_kwargs||t&&0!==t.length||this.co_varargs)){if(e.length==n)return e;if(0===e.length&&this.$defaults&&this.$defaults.length===n){for(r=0;r!=this.$defaults.length;r++)e[r]=this.$defaults[r];return e}}this.co_kwargs&&(o=[]);var a=e.length;let l=e.length<=n?e:e.slice(0,n);if(this.co_varargs)e=e.length>l.length?e.slice(l.length):[],l[s]=new Sk.builtin.tuple(e);else if(a>n)throw new Sk.builtin.TypeError(this.$name+"() takes "+n+" positional argument"+(1==n?"":"s")+" but "+a+(1==a?" was ":" were ")+" given");if(t){if(this.func_code.no_kw)throw new Sk.builtin.TypeError(this.$name+"() takes no keyword arguments");for(e=0;e<t.length;e+=2){a=t[e];var c=t[e+1],u=r.indexOf(a);if(0<=u){if(void 0!==l[u])throw new Sk.builtin.TypeError(this.$name+"() got multiple values for argument '"+a+"'");l[u]=c}else{if(!o)throw new Sk.builtin.TypeError(this.$name+"() got an unexpected keyword argument '"+a+"'");o.push(new Sk.builtin.str(a),c)}}}for(e=0,a=[],c=!1,u=n-(t=this.$defaults||[]).length;e<u;e++)void 0===l[e]&&(a.push(r[e]),void 0===r[e]&&(c=!0));if(0!=a.length&&(this.co_argcount||this.co_varnames))throw new Sk.builtin.TypeError(this.$name+"() missing "+a.length+" required argument"+(1==a.length?"":"s")+(c?"":": "+a.join(", ")));for(;e<n;e++)void 0===l[e]&&(l[e]=t[e-u]);if(0<i){for(i=[],t=this.$kwdefs,e=n;e<s;e++)void 0===l[e]&&(void 0!==t[e-n]?l[e]=t[e-n]:i.push(r[e]));if(0!==i.length)throw new Sk.builtin.TypeError(this.$name+"() missing "+i.length+" required keyword argument"+(1==i.length?"":"s")+": "+i.join(", "))}if(this.func_closure&&r)for(n=l.length;n<r.length;n++)l.push(void 0);return o&&l.unshift(o),l}}})},function(e,t){Sk.builtin.asnum$=function(e){return null==e||"number"==typeof e?e:e instanceof Sk.builtin.int_?"number"==typeof e.v?e.v:e.v.toString():e instanceof Sk.builtin.float_?e.v:e===Sk.builtin.none.none$?null:e},Sk.exportSymbol("Sk.builtin.asnum$",Sk.builtin.asnum$),Sk.builtin.assk$=function(e){return 0==e%1?new Sk.builtin.int_(e):new Sk.builtin.float_(e)},Sk.exportSymbol("Sk.builtin.assk$",Sk.builtin.assk$),Sk.builtin.asnum$nofloat=function(e){if(null==e)return e;if("number"==typeof e)e=e.toString();else if(e instanceof Sk.builtin.int_)e=e.v.toString();else{if(!(e instanceof Sk.builtin.float_))return e===Sk.builtin.none.none$?null:void 0;e=e.v.toString()}if(0>e.indexOf(".")&&0>e.indexOf("e")&&0>e.indexOf("E"))return e;var t=0;if(0<=e.indexOf("e")){var n=e.substr(0,e.indexOf("e"));t=e.substr(e.indexOf("e")+1)}else 0<=e.indexOf("E")?(n=e.substr(0,e.indexOf("e")),t=e.substr(e.indexOf("E")+1)):n=e;if(t=parseInt(t,10),0>(e=n.indexOf("."))){if(0<=t){for(;0<t--;)n+="0";return n}return n.length>-t?n.substr(0,n.length+t):0}for(n=0===e?n.substr(1):e<n.length?n.substr(0,e)+n.substr(e+1):n.substr(0,e),e+=t;e>n.length;)n+="0";return 0>=e?0:n.substr(0,e)},Sk.exportSymbol("Sk.builtin.asnum$nofloat",Sk.builtin.asnum$nofloat),Sk.builtin.round=function(e,t){if(void 0===e)throw new Sk.builtin.TypeError("a float is required");if(!Sk.__future__.dunder_round){if(!Sk.builtin.checkNumber(e))throw new Sk.builtin.TypeError("a float is required");if(e.round$)return e.round$(t);throw new Sk.builtin.AttributeError(Sk.abstr.typeName(e)+" instance has no attribute '__float__'")}if(void 0!==t&&!Sk.builtin.checkNone(t)&&!Sk.misceval.isIndex(t))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(t)+"' object cannot be interpreted as an index");if(void 0!==(e=Sk.abstr.lookupSpecial(e,Sk.builtin.str.$round)))return void 0!==t?Sk.misceval.callsimArray(e,[t]):Sk.misceval.callsimArray(e,[]);throw new Sk.builtin.TypeError("a float is required")},Sk.builtin.len=function(e){if(!e.sq$length)throw new Sk.builtin.TypeError("object of type '"+Sk.abstr.typeName(e)+"' has no len()");return e=e.sq$length(!0),Sk.misceval.chain(e,e=>new Sk.builtin.int_(e))},Sk.builtin.min=function(e,t){let n;const r=e.length;if(!r)throw new Sk.builtin.TypeError("min expected 1 argument, got 0");const[i,o]=Sk.abstr.copyKeywordsToNamedArgs("min",["default","key"],[],t,[null,Sk.builtin.none.none$]);if(1<r&&null!==i)throw new Sk.builtin.TypeError("Cannot specify a default for min() with multiple positional arguments");if(n=1==r?Sk.abstr.iter(e[0]):Sk.abstr.iter(new Sk.builtin.tuple(e)),!Sk.builtin.checkNone(o)&&!Sk.builtin.checkCallable(o))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(o)+"' object is not callable");let s;return Sk.misceval.chain(n.tp$iternext(!0),e=>{if(s=e,void 0!==s)return Sk.builtin.checkNone(o)?Sk.misceval.iterFor(n,e=>{Sk.misceval.richCompareBool(e,s,"Lt")&&(s=e)}):Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(o,[s]),e=>Sk.misceval.iterFor(n,t=>Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(o,[t]),n=>{Sk.misceval.richCompareBool(n,e,"Lt")&&(s=t,e=n)})))},()=>{if(void 0===s){if(null===i)throw new Sk.builtin.ValueError("min() arg is an empty sequence");s=i}return s})},Sk.builtin.max=function(e,t){let n;const r=e.length;if(!r)throw new Sk.builtin.TypeError("max expected 1 argument, got 0");const[i,o]=Sk.abstr.copyKeywordsToNamedArgs("min",["default","key"],[],t,[null,Sk.builtin.none.none$]);if(1<r&&null!==i)throw new Sk.builtin.TypeError("Cannot specify a default for max() with multiple positional arguments");if(n=1===r?Sk.abstr.iter(e[0]):Sk.abstr.iter(new Sk.builtin.tuple(e)),!Sk.builtin.checkNone(o)&&!Sk.builtin.checkCallable(o))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(o)+"' object is not callable");let s;return Sk.misceval.chain(n.tp$iternext(!0),e=>{if(s=e,void 0!==s)return Sk.builtin.checkNone(o)?Sk.misceval.iterFor(n,e=>{Sk.misceval.richCompareBool(e,s,"Gt")&&(s=e)}):Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(o,[s]),e=>Sk.misceval.iterFor(n,t=>Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(o,[t]),n=>{Sk.misceval.richCompareBool(n,e,"Gt")&&(s=t,e=n)})))},()=>{if(void 0===s){if(null===i)throw new Sk.builtin.ValueError("min() arg is an empty sequence");s=i}return s})},Sk.builtin.min.co_fastcall=Sk.builtin.max.co_fastcall=1,Sk.builtin.any=function(e){return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(e),(function(e){if(Sk.misceval.isTrue(e))return new Sk.misceval.Break(Sk.builtin.bool.true$)})),e=>e||Sk.builtin.bool.false$)},Sk.builtin.all=function(e){return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(e),(function(e){if(!Sk.misceval.isTrue(e))return new Sk.misceval.Break(Sk.builtin.bool.false$)})),e=>e||Sk.builtin.bool.true$)},Sk.builtin.sum=function(e,t){const n=Sk.abstr.iter(e);if(void 0===t)var r=new Sk.builtin.int_(0);else{if(Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("sum() can't sum strings [use ''.join(seq) instead]");r=t}return e=void 0===t||t.constructor===Sk.builtin.int_?Sk.misceval.iterFor(n,e=>{if(e.constructor!==Sk.builtin.int_)return e.constructor===Sk.builtin.float_?(r=r.nb$float().nb$add(e),new Sk.misceval.Break("float")):(r=Sk.abstr.numberBinOp(r,e,"Add"),new Sk.misceval.Break("slow"));r=r.nb$add(e)}):t.constructor===Sk.builtin.float_?"float":"slow",Sk.misceval.chain(e,e=>"float"===e?Sk.misceval.iterFor(n,e=>{if(e.constructor!==Sk.builtin.float_&&e.constructor!==Sk.builtin.int_)return r=Sk.abstr.numberBinOp(r,e,"Add"),new Sk.misceval.Break("slow");r=r.nb$add(e)}):e,e=>{if("slow"===e)return Sk.misceval.iterFor(n,e=>{r=Sk.abstr.numberBinOp(r,e,"Add")})},()=>r)},Sk.builtin.zip=function(){var e,t;if(0===arguments.length)return new Sk.builtin.list([]);var n=[];for(t=0;t<arguments.length;t++){if(!Sk.builtin.checkIterable(arguments[t]))throw new Sk.builtin.TypeError("argument "+t+" must support iteration");n.push(Sk.abstr.iter(arguments[t]))}var r=[];for(e=!1;!e;){var i=[];for(t=0;t<arguments.length;t++){var o=n[t].tp$iternext();if(void 0===o){e=!0;break}i.push(o)}e||r.push(new Sk.builtin.tuple(i))}return new Sk.builtin.list(r)},Sk.builtin.abs=function(e){if(e.nb$abs)return e.nb$abs();throw new TypeError("bad operand type for abs(): '"+Sk.abstr.typeName(e)+"'")},Sk.builtin.fabs=function(e){return Sk.builtin.abs(e)},Sk.builtin.ord=function(e){if(Sk.builtin.checkString(e)){if(1!==e.v.length&&1!==e.sq$length())throw new Sk.builtin.TypeError("ord() expected a character, but string of length "+e.v.length+" found");return new Sk.builtin.int_(e.v.codePointAt(0))}if(Sk.builtin.checkBytes(e)){if(1!==e.sq$length())throw new Sk.builtin.TypeError("ord() expected a character, but string of length "+e.v.length+" found");return new Sk.builtin.int_(e.v[0])}throw new Sk.builtin.TypeError("ord() expected a string of length 1, but "+Sk.abstr.typeName(e)+" found")},Sk.builtin.chr=function(e){if(!Sk.builtin.checkInt(e))throw new Sk.builtin.TypeError("an integer is required");if(e=Sk.builtin.asnum$(e),Sk.__future__.python3){if(0>e||1114112<=e)throw new Sk.builtin.ValueError("chr() arg not in range(0x110000)")}else if(0>e||256<=e)throw new Sk.builtin.ValueError("chr() arg not in range(256)");return new Sk.builtin.str(String.fromCodePoint(e))},Sk.builtin.unichr=function(e){if(!Sk.builtin.checkInt(e))throw new Sk.builtin.TypeError("an integer is required");e=Sk.builtin.asnum$(e);try{return new Sk.builtin.str(String.fromCodePoint(e))}catch(e){if(e instanceof RangeError)throw new Sk.builtin.ValueError(e.message);throw e}},Sk.builtin.int2str_=function(e,t,n){let r;e.constructor===Sk.builtin.int_||e instanceof Sk.builtin.int_||(e=e.nb$index()),r=e.v;let i=r.toString(t);return i=e.nb$isnegative()?"-"+n+i.slice(1):n+i,2!==t&&!Sk.__future__.python3&&(e instanceof Sk.builtin.lng||JSBI.__isBigInt(r))&&(i+="L"),new Sk.builtin.str(i)},Sk.builtin.hex=function(e){if(!Sk.misceval.isIndex(e))throw new Sk.builtin.TypeError("hex() argument can't be converted to hex");return Sk.builtin.int2str_(e,16,"0x")},Sk.builtin.oct=function(e){if(!Sk.misceval.isIndex(e))throw new Sk.builtin.TypeError("oct() argument can't be converted to hex");return Sk.__future__.octal_number_literal?Sk.builtin.int2str_(e,8,"0o"):Sk.builtin.int2str_(e,8,"0")},Sk.builtin.bin=function(e){if(!Sk.misceval.isIndex(e))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(e)+"' object can't be interpreted as an index");return Sk.builtin.int2str_(e,2,"0b")},Sk.builtin.dir=function(e){if(void 0!==e)return e=Sk.abstr.lookupSpecial(e,Sk.builtin.str.$dir),Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(e,[]),e=>Sk.builtin.sorted(e));throw new Sk.builtin.NotImplementedError("skulpt does not yet support dir with no args")},Sk.builtin.repr=function(e){return e.$r()},Sk.builtin.ascii=function(e){return Sk.misceval.chain(e.$r(),e=>{let t,n;for(n=0;n<e.v.length;n++)if(127<=e.v.charCodeAt(n)){t=e.v.substr(0,n);break}if(!t)return e;for(;n<e.v.length;n++){var r=e.v.charAt(n),i=e.v.charCodeAt(n);127<i&&255>=i?(2>(r=i.toString(16)).length&&(r="0"+r),t+="\\x"+r):127<i&&55296>i||57344<=i?t+="\\u"+("000"+i.toString(16)).slice(-4):55296<=i?(r=e.v.codePointAt(n),n++,i="0000000"+(r=r.toString(16)).toString(16),t=4<r.length?t+"\\U"+i.slice(-8):t+"\\u"+i.slice(-4)):t+=r}return new Sk.builtin.str(t)})},Sk.builtin.open=function(e,t,n){if(void 0===t&&(t=new Sk.builtin.str("r")),/\+/.test(t.v))throw"todo; haven't implemented read/write mode";if(("w"===t.v||"wb"===t.v||"a"===t.v||"ab"===t.v)&&!Sk.nonreadopen)throw"todo; haven't implemented non-read opens";return new Sk.builtin.file(e,t,n)},Sk.builtin.isinstance=function(e,t){if(!(Sk.builtin.checkClass(t)||t instanceof Sk.builtin.tuple))throw new Sk.builtin.TypeError("isinstance() arg 2 must be a class, type, or tuple of classes and types");var n=e.ob$type;if(n===t)return Sk.builtin.bool.true$;if(!(t instanceof Sk.builtin.tuple))return n.$isSubType(t)||(e=e.tp$getattr(Sk.builtin.str.$class))!=n&&Sk.builtin.checkClass(e)&&e.$isSubType(t)?Sk.builtin.bool.true$:Sk.builtin.bool.false$;for(n=0;n<t.v.length;++n)if(Sk.misceval.isTrue(Sk.builtin.isinstance(e,t.v[n])))return Sk.builtin.bool.true$;return Sk.builtin.bool.false$},Sk.builtin.hash=function(e){return new Sk.builtin.int_(Sk.abstr.objectHash(e))},Sk.builtin.getattr=function(e,t,n){if(!Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("attribute name must be string");const r=Sk.misceval.tryCatch(()=>e.tp$getattr(t,!0),e=>{if(!(e instanceof Sk.builtin.AttributeError))throw e});return Sk.misceval.chain(r,r=>{if(void 0===r){if(void 0!==n)return n;throw new Sk.builtin.AttributeError(e.sk$attrError()+" has no attribute "+Sk.misceval.objectRepr(t))}return r})},Sk.builtin.setattr=function(e,t,n){if(!Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("attribute name must be string");return Sk.misceval.chain(e.tp$setattr(t,n,!0),()=>Sk.builtin.none.none$)},Sk.builtin.raw_input=function(e){var t=e||"";return Sk.misceval.chain(Sk.importModule("sys",!1,!0),(function(e){return Sk.inputfunTakesPrompt?Sk.builtin.file.$readline(e.$d.stdin,null,t):Sk.misceval.chain(void 0,(function(){return Sk.misceval.callsimOrSuspendArray(e.$d.stdout.write,[e.$d.stdout,new Sk.builtin.str(t)])}),(function(){return Sk.misceval.callsimOrSuspendArray(e.$d.stdin.readline,[e.$d.stdin])}))}))},Sk.builtin.input=Sk.builtin.raw_input,Sk.builtin.jseval=function(e){return e=Sk.global.eval(Sk.ffi.remapToJs(e)),Sk.ffi.remapToPy(e)},Sk.builtin.jsmillis=function(){return console.warn("jsmillis is deprecated"),(new Date).valueOf()},Sk.builtin.eval_=function(){throw new Sk.builtin.NotImplementedError("eval is not yet implemented")},Sk.builtin.map=function(e,t){var n,r,i=[];if(Sk.builtin.pyCheckArgsLen("map",arguments.length,2),2<arguments.length){var o=[],s=Array.prototype.slice.apply(arguments).slice(1);for(r=0;r<s.length;r++){if(!Sk.builtin.checkIterable(s[r])){var a=parseInt(r,10)+2;throw new Sk.builtin.TypeError("argument "+a+" to map() must support iteration")}s[r]=Sk.abstr.iter(s[r])}for(;;){var l=[];for(r=n=0;r<s.length;r++)void 0===(a=s[r].tp$iternext())?(l.push(Sk.builtin.none.none$),n++):l.push(a);if(n===s.length)break;o.push(l)}t=new Sk.builtin.list(o)}if(!Sk.builtin.checkIterable(t))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(t)+"' object is not iterable");return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(t),(function(t){if(e!==Sk.builtin.none.none$)return t instanceof Array||(t=[t]),Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(e,t),(function(e){i.push(e)}));t instanceof Array&&(t=new Sk.builtin.tuple(t)),i.push(t)})),(function(){return new Sk.builtin.list(i)}))},Sk.builtin.reduce=function(e,t,n){if(!Sk.builtin.checkIterable(t))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(t)+"' object is not iterable");if(t=Sk.abstr.iter(t),void 0===n&&void 0===(n=t.tp$iternext()))throw new Sk.builtin.TypeError("reduce() of empty sequence with no initial value");var r=n;for(n=t.tp$iternext();void 0!==n;n=t.tp$iternext())r=Sk.misceval.callsimArray(e,[r,n]);return r},Sk.builtin.sorted=function(e,t,n,r){return e=Sk.misceval.arrayFromIterable(e,!0),Sk.misceval.chain(e,e=>((e=new Sk.builtin.list(e)).list$sort(t,n,r),e))},Sk.builtin.filter=function(e,t){var n;if(Sk.builtin.pyCheckArgsLen("filter",arguments.length,2,2),!Sk.builtin.checkIterable(t))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(t)+"' object is not iterable");var r=function(){return[]},i=function(e,t){return e.push(t),e},o=function(e){return new Sk.builtin.list(e)};t.ob$type===Sk.builtin.str?(r=function(){return new Sk.builtin.str("")},i=function(e,t){return e.sq$concat(t)},o=function(e){return e}):t.ob$type===Sk.builtin.tuple&&(o=function(e){return new Sk.builtin.tuple(e)});var s=r(),a=Sk.abstr.iter(t);for(n=a.tp$iternext();void 0!==n;n=a.tp$iternext())r=e===Sk.builtin.none.none$?new Sk.builtin.bool(n):Sk.misceval.callsimArray(e,[n]),Sk.misceval.isTrue(r)&&(s=i(s,n));return o(s)},Sk.builtin.hasattr=function(e,t){if(!Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("hasattr(): attribute name must be string");const n=Sk.misceval.tryCatch(()=>e.tp$getattr(t,!0),e=>{if(!(e instanceof Sk.builtin.AttributeError))throw e});return Sk.misceval.chain(n,e=>void 0===e?Sk.builtin.bool.false$:Sk.builtin.bool.true$)},Sk.builtin.pow=function(e,t,n){if(void 0===n||Sk.builtin.checkNone(n))return Sk.abstr.numberBinOp(e,t,"Pow");if(!(Sk.builtin.checkInt(e)&&Sk.builtin.checkInt(t)&&Sk.builtin.checkInt(n))){if(Sk.builtin.checkFloat(e)||Sk.builtin.checkComplex(e))return e.nb$power(t,n);throw new Sk.builtin.TypeError("unsupported operand type(s) for ** or pow(): '"+Sk.abstr.typeName(e)+"', '"+Sk.abstr.typeName(t)+"', '"+Sk.abstr.typeName(n)+"'")}return e.nb$power(t,n)},Sk.builtin.quit=function(e){throw e=new Sk.builtin.str(e).v,new Sk.builtin.SystemExit(e)},Sk.builtin.issubclass=function(e,t){if(!Sk.builtin.checkClass(e))throw new Sk.builtin.TypeError("issubclass() arg 1 must be a class");var n=Sk.builtin.checkClass(t);if(!(n||t instanceof Sk.builtin.tuple))throw new Sk.builtin.TypeError("issubclass() arg 2 must be a class or tuple of classes");if(n)return e.$isSubType(t)?Sk.builtin.bool.true$:Sk.builtin.bool.false$;for(n=0;n<t.v.length;++n)if(Sk.misceval.isTrue(Sk.builtin.issubclass(e,t.v[n])))return Sk.builtin.bool.true$;return Sk.builtin.bool.false$},Sk.builtin.globals=function(){var e,t=new Sk.builtin.dict([]);for(e in Sk.globals){var n=Sk.unfixReserved(e);t.mp$ass_subscript(new Sk.builtin.str(n),Sk.globals[e])}return t},Sk.builtin.divmod=function(e,t){return Sk.abstr.numberBinOp(e,t,"DivMod")},Sk.builtin.format=function(e,t){return void 0===t&&(t=Sk.builtin.str.$emptystr),Sk.abstr.objectFormat(e,t)};const n=new Map;let r=0;Sk.builtin.id=function(e){const t=n.get(e);return void 0!==t?new Sk.builtin.int_(t):(n.set(e,r),new Sk.builtin.int_(r++))},Sk.builtin.bytearray=function(){throw new Sk.builtin.NotImplementedError("bytearray is not yet implemented")},Sk.builtin.callable=function(e){return Sk.builtin.checkCallable(e)?Sk.builtin.bool.true$:Sk.builtin.bool.false$},Sk.builtin.delattr=function(e,t){return Sk.builtin.setattr(e,t,void 0)},Sk.builtin.execfile=function(){throw new Sk.builtin.NotImplementedError("execfile is not yet implemented")},Sk.builtin.help=function(){throw new Sk.builtin.NotImplementedError("help is not yet implemented")},Sk.builtin.iter=function(e,t){return 1===arguments.length?Sk.abstr.iter(e):Sk.abstr.iter(new Sk.builtin.callable_iter_(e,t))},Sk.builtin.locals=function(){throw new Sk.builtin.NotImplementedError("locals is not yet implemented")},Sk.builtin.memoryview=function(){throw new Sk.builtin.NotImplementedError("memoryview is not yet implemented")},Sk.builtin.next_=function(e,t){if(!e.tp$iternext)throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(e)+"' object is not an iterator");if(void 0===(e=e.tp$iternext())){if(t)return t;throw new Sk.builtin.StopIteration}return e},Sk.builtin.reload=function(){throw new Sk.builtin.NotImplementedError("reload is not yet implemented")},Sk.builtin.vars=function(){throw new Sk.builtin.NotImplementedError("vars is not yet implemented")},Sk.builtin.apply_=function(){throw new Sk.builtin.NotImplementedError("apply is not yet implemented")},Sk.builtin.buffer=function(){throw new Sk.builtin.NotImplementedError("buffer is not yet implemented")},Sk.builtin.coerce=function(){throw new Sk.builtin.NotImplementedError("coerce is not yet implemented")},Sk.builtin.intern=function(){throw new Sk.builtin.NotImplementedError("intern is not yet implemented")}},function(e,t){Sk.builtin.BaseException=Sk.abstr.buildNativeClass("BaseException",{constructor:function(...e){Sk.asserts.assert(this instanceof Sk.builtin.BaseException,"bad call to exception constructor, use 'new'");let t=e[0];"string"==typeof t&&(t=new Sk.builtin.str(t)),this.args=new Sk.builtin.tuple(t?[t]:[]),this.traceback=[],this.$d=new Sk.builtin.dict,3<=e.length&&this.traceback.push({lineno:e[2],filename:e[1]||"<unknown>"})},slots:{tp$getattr:Sk.generic.getAttr,tp$doc:"Common base class for all exceptions",tp$new(e,t){return this.hp$type?(t=new this.constructor,Sk.builtin.BaseException.call(t)):t=new this.constructor,t.args=new Sk.builtin.tuple(e.slice()),t},tp$init(e,t){Sk.abstr.checkNoKwargs(Sk.abstr.typeName(this),t)},$r(){let e=this.tp$name;return e+="("+this.args.v.map(e=>Sk.misceval.objectRepr(e)).join(", ")+")",new Sk.builtin.str(e)},tp$str(){return 1>=this.args.v.length?new Sk.builtin.str(this.args.v[0]):this.args.$r()}},getsets:{args:{$get(){return this.args}},__dict__:Sk.generic.getSetDict},proto:{toString(){let e=this.tp$name;return e+=": "+this.tp$str().v,0!==this.traceback.length?e+" on line "+this.traceback[0].lineno:e+" at <unknown>"}}}),Sk.exportSymbol("Sk.builtin.BaseException",Sk.builtin.BaseException),Sk.builtin.Exception=Sk.abstr.buildNativeClass("Exception",{constructor:function(...e){Sk.builtin.BaseException.apply(this,e)},base:Sk.builtin.BaseException}),Sk.exportSymbol("Sk.builtin.Exception",Sk.builtin.Exception),Sk.builtin.AssertionError=Sk.abstr.buildNativeClass("AssertionError",{constructor:function(...e){Sk.builtin.Exception.apply(this,e)},base:Sk.builtin.Exception}),Sk.exportSymbol("Sk.builtin.AssertionError",Sk.builtin.AssertionError),Sk.builtin.AttributeError=Sk.abstr.buildNativeClass("AttributeError",{constructor:function(...e){Sk.builtin.Exception.apply(this,e)},base:Sk.builtin.Exception}),Sk.builtin.ImportError=Sk.abstr.buildNativeClass("ImportError",{constructor:function(...e){Sk.builtin.Exception.apply(this,e)},base:Sk.builtin.Exception}),Sk.builtin.IndentationError=Sk.abstr.buildNativeClass("IndentationError",{constructor:function(...e){Sk.builtin.Exception.apply(this,e)},base:Sk.builtin.Exception}),Sk.builtin.IndexError=Sk.abstr.buildNativeClass("IndexError",{constructor:function(...e){Sk.builtin.Exception.apply(this,e)},base:Sk.builtin.Exception}),Sk.builtin.LookupError=Sk.abstr.buildNativeClass("LookupError",{constructor:function(...e){Sk.builtin.Exception.apply(this,e)},base:Sk.builtin.Exception}),Sk.builtin.KeyError=Sk.abstr.buildNativeClass("KeyError",{constructor:function(...e){Sk.builtin.LookupError.apply(this,e)},base:Sk.builtin.LookupError}),Sk.builtin.NameError=Sk.abstr.buildNativeClass("NameError",{constructor:function(...e){Sk.builtin.Exception.apply(this,e)},base:Sk.builtin.Exception}),Sk.builtin.UnboundLocalError=Sk.abstr.buildNativeClass("UnboundLocalError",{constructor:function(...e){Sk.builtin.Exception.apply(this,e)},base:Sk.builtin.Exception}),Sk.builtin.OverflowError=Sk.abstr.buildNativeClass("OverflowError",{constructor:function(...e){Sk.builtin.Exception.apply(this,e)},base:Sk.builtin.Exception}),Sk.builtin.SyntaxError=Sk.abstr.buildNativeClass("SyntaxError",{constructor:function(...e){Sk.builtin.Exception.apply(this,e)},base:Sk.builtin.Exception}),Sk.builtin.RuntimeError=Sk.abstr.buildNativeClass("RuntimeError",{constructor:function(...e){Sk.builtin.Exception.apply(this,e)},base:Sk.builtin.Exception}),Sk.exportSymbol("Sk.builtin.RuntimeError",Sk.builtin.RuntimeError),Sk.builtin.SuspensionError=Sk.abstr.buildNativeClass("SuspensionError",{constructor:function(...e){Sk.builtin.Exception.apply(this,e)},base:Sk.builtin.Exception}),Sk.exportSymbol("Sk.builtin.SuspensionError",Sk.builtin.SuspensionError),Sk.builtin.SystemExit=Sk.abstr.buildNativeClass("SystemExit",{constructor:function(...e){Sk.builtin.BaseException.apply(this,e)},base:Sk.builtin.BaseException}),Sk.exportSymbol("Sk.builtin.SystemExit",Sk.builtin.SystemExit),Sk.builtin.TypeError=Sk.abstr.buildNativeClass("TypeError",{constructor:function(...e){Sk.builtin.Exception.apply(this,e)},base:Sk.builtin.Exception}),Sk.exportSymbol("Sk.builtin.TypeError",Sk.builtin.TypeError),Sk.builtin.ValueError=Sk.abstr.buildNativeClass("ValueError",{constructor:function(...e){Sk.builtin.Exception.apply(this,e)},base:Sk.builtin.Exception}),Sk.exportSymbol("Sk.builtin.ValueError",Sk.builtin.ValueError),Sk.builtin.ZeroDivisionError=Sk.abstr.buildNativeClass("ZeroDivisionError",{constructor:function(...e){Sk.builtin.Exception.apply(this,e)},base:Sk.builtin.Exception}),Sk.builtin.TimeLimitError=Sk.abstr.buildNativeClass("TimeLimitError",{constructor:function(...e){Sk.builtin.Exception.apply(this,e)},base:Sk.builtin.Exception}),Sk.exportSymbol("Sk.builtin.TimeLimitError",Sk.builtin.TimeLimitError),Sk.builtin.IOError=Sk.abstr.buildNativeClass("IOError",{constructor:function(...e){Sk.builtin.Exception.apply(this,e)},base:Sk.builtin.Exception}),Sk.exportSymbol("Sk.builtin.IOError",Sk.builtin.IOError),Sk.builtin.NotImplementedError=Sk.abstr.buildNativeClass("NotImplementedError",{constructor:function(...e){Sk.builtin.Exception.apply(this,e)},base:Sk.builtin.Exception}),Sk.exportSymbol("Sk.builtin.NotImplementedError",Sk.builtin.NotImplementedError),Sk.builtin.NegativePowerError=Sk.abstr.buildNativeClass("NegativePowerError",{constructor:function(...e){Sk.builtin.Exception.apply(this,e)},base:Sk.builtin.Exception}),Sk.exportSymbol("Sk.builtin.NegativePowerError",Sk.builtin.NegativePowerError),Sk.builtin.ExternalError=Sk.abstr.buildNativeClass("ExternalError",{constructor:function(...e){if(this.nativeError=e[0],!Sk.builtin.checkString(this.nativeError)&&(e[0]=this.nativeError.toString(),e[0].startsWith("RangeError: Maximum call")))return e[0]="Maximum call stack size exceeded",new Sk.builtin.RecursionError(...e);Sk.builtin.Exception.apply(this,e)},base:Sk.builtin.Exception}),Sk.exportSymbol("Sk.builtin.ExternalError",Sk.builtin.ExternalError),Sk.builtin.RecursionError=Sk.abstr.buildNativeClass("RecursionError",{constructor:function(...e){Sk.builtin.RuntimeError.apply(this,e)},base:Sk.builtin.Exception}),Sk.exportSymbol("Sk.builtin.RecursionError",Sk.builtin.RecursionError),Sk.builtin.OperationError=Sk.abstr.buildNativeClass("OperationError",{constructor:function(...e){Sk.builtin.Exception.apply(this,e)},base:Sk.builtin.Exception}),Sk.exportSymbol("Sk.builtin.OperationError",Sk.builtin.OperationError),Sk.builtin.SystemError=Sk.abstr.buildNativeClass("SystemError",{constructor:function(...e){Sk.builtin.Exception.apply(this,e)},base:Sk.builtin.Exception}),Sk.exportSymbol("Sk.builtin.SystemError",Sk.builtin.SystemError),Sk.builtin.UnicodeDecodeError=Sk.abstr.buildNativeClass("UnicodeDecodeError",{constructor:function(...e){Sk.builtin.Exception.apply(this,e)},base:Sk.builtin.Exception}),Sk.exportSymbol("Sk.builtin.UnicodeDecodeError",Sk.builtin.UnicodeDecodeError),Sk.builtin.UnicodeEncodeError=Sk.abstr.buildNativeClass("UnicodeEncodeError",{constructor:function(...e){Sk.builtin.Exception.apply(this,e)},base:Sk.builtin.Exception}),Sk.exportSymbol("Sk.builtin.UnicodeEncodeError",Sk.builtin.UnicodeEncodeError),Sk.builtin.StopIteration=Sk.abstr.buildNativeClass("StopIteration",{constructor:function(...e){Sk.builtin.Exception.apply(this,e)},base:Sk.builtin.Exception}),Sk.exportSymbol("Sk.builtin.StopIteration",Sk.builtin.StopIteration),Sk.builtin.getExcInfo=function(e){return new Sk.builtin.tuple([e.ob$type||Sk.builtin.none.none$,e,Sk.builtin.none.none$])}},function(e,t){Sk.builtin.method=Sk.abstr.buildNativeClass("method",{constructor:function(e,t){Sk.asserts.assert(this instanceof Sk.builtin.method,"bad call to method constructor, use 'new'"),this.im_func=e,this.im_self=t,this.im_call=e.tp$call},slots:{$r(){let e=this.im_func.tp$getattr(Sk.builtin.str.$qualname)||this.im_func.tp$getattr(Sk.builtin.str.$name);return e=e&&e.v||"?",new Sk.builtin.str("<bound method "+e+" of "+Sk.misceval.objectRepr(this.im_self)+">")},tp$hash(){return Sk.abstr.objectHash(this.im_self)+Sk.abstr.objectHash(this.im_func)},tp$call(e,t){var n=this.im_call;if(void 0===n)throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(this.im_func)+"' object is not callable");return e=[this.im_self,...e],n.call(this.im_func,e,t)},tp$new(e,t){if(Sk.abstr.checkNoKwargs("method",t),Sk.abstr.checkArgsLen("method",e,2,2),t=e[0],e=e[1],!Sk.builtin.checkCallable(t))throw new Sk.builtin.TypeError("first argument must be callable");if(Sk.builtin.checkNone(e))throw new Sk.builtin.TypeError("self must not be None");return new Sk.builtin.method(t,e)},tp$richcompare(e,t){if("Eq"!=t&&"NotEq"!=t||!(e instanceof Sk.builtin.method))return Sk.builtin.NotImplemented.NotImplemented$;let n;try{n=Sk.misceval.richCompareBool(this.im_self,e.im_self,"Eq",!1)&&this.im_func==e.im_func}catch(e){n=!1}return"Eq"==t?n:!n},tp$descr_get(e,t){return this},tp$getattr(e,t){const n=Sk.abstr.lookupSpecial(this,e);return void 0!==n?n:this.im_func.tp$getattr(e,t)}},getsets:{__func__:{$get(){return this.im_func}},__self__:{$get(){return this.im_self}},__doc__:{$get(){return this.im_func.tp$getattr(Sk.builtin.str.$doc)}}},flags:{sk$suitable_as_base_class:!1}})},function(e,t){function n(e){if(null!=e){if(e.nb$index)return e.nb$index();if("number"==typeof e&&Number.isInteger(e))return e}}function r(e,t){const r=n(e);if(void 0!==r)return r;throw t=(t||"'{tp$name}' object cannot be interpreted as an integer").replace("{tp$name}",Sk.abstr.typeName(e)),new Sk.builtin.TypeError(t)}Sk.misceval={},Sk.misceval.Suspension=function(e,t,n){this.$isSuspension=!0,void 0!==e&&void 0!==t&&(this.resume=function(){return e(t.resume())}),this.child=t,this.optional=void 0!==t&&t.optional,this.data=void 0===n&&void 0!==t?t.data:n},Sk.exportSymbol("Sk.misceval.Suspension",Sk.misceval.Suspension),Sk.misceval.retryOptionalSuspensionOrThrow=function(e,t){for(;e instanceof Sk.misceval.Suspension;){if(!e.optional)throw new Sk.builtin.SuspensionError(t||"Cannot call a function that blocks or suspends here");e=e.resume()}return e},Sk.exportSymbol("Sk.misceval.retryOptionalSuspensionOrThrow",Sk.misceval.retryOptionalSuspensionOrThrow),Sk.misceval.isIndex=function(e){return null!=e&&(void 0!==e.nb$index||"number"==typeof e&&Number.isInteger(e))},Sk.exportSymbol("Sk.misceval.isIndex",Sk.misceval.isIndex),Sk.misceval.asIndex=n,Sk.misceval.asIndexSized=function(e,t,n){if("number"==typeof(n=r(e,n)))return n;if(null==t)return JSBI.lessThan(n,JSBI.__ZERO)?-Number.MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER;throw new t("cannot fit '"+Sk.abstr.typeName(e)+"' into an index-sized integer")},Sk.misceval.asIndexOrThrow=r,Sk.misceval.applySlice=function(e,t,n,r){return Sk.abstr.objectGetItem(e,new Sk.builtin.slice(t,n,null),r)},Sk.exportSymbol("Sk.misceval.applySlice",Sk.misceval.applySlice),Sk.misceval.assignSlice=function(e,t,n,r,i){return t=new Sk.builtin.slice(t,n),null===r?Sk.abstr.objectDelItem(e,t):Sk.abstr.objectSetItem(e,t,r,i)},Sk.exportSymbol("Sk.misceval.assignSlice",Sk.misceval.assignSlice),Sk.misceval.arrayFromArguments=function(e){var t;if(1!=e.length)return e;var n=e[0];if(n instanceof Sk.builtin.set?n=n.tp$iter().$obj:n instanceof Sk.builtin.dict&&(n=Sk.builtin.dict.prototype.keys.func_code(n)),n instanceof Sk.builtin.list||n instanceof Sk.builtin.tuple)return n.v;if(Sk.builtin.checkIterable(n)){for(e=[],t=(n=Sk.abstr.iter(n)).tp$iternext();void 0!==t;t=n.tp$iternext())e.push(t);return e}throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(n)+"' object is not iterable")},Sk.exportSymbol("Sk.misceval.arrayFromArguments",Sk.misceval.arrayFromArguments),Sk.misceval.iterator=Sk.abstr.buildIteratorClass("iterator",{constructor:function(e,t){this.tp$iternext=t?e:function(t){let n=e();return t||!n.$isSuspension?n:Sk.misceval.retryOptionalSuspensionOrThrow(n)}},iternext:function(e){return this.tp$iternext(e)},flags:{sk$acceptable_as_base_class:!1}}),Sk.misceval.swappedOp_={Eq:"Eq",NotEq:"NotEq",Lt:"Gt",LtE:"GtE",Gt:"Lt",GtE:"LtE"},Sk.misceval.opSymbols={Eq:"==",NotEq:"!=",Lt:"<",LtE:"<=",Gt:">",GtE:">=",Is:"is",IsNot:"is not",In_:"in",NotIn:"not in"},Sk.misceval.richCompareBool=function(e,t,n,r){var i;Sk.asserts.assert(e.sk$object&&t.sk$object,"JS object passed to richCompareBool");var o=e.ob$type,s=t.ob$type,a=s!==o&&void 0===s.sk$baseClass&&s.$isSubType(o);if(!Sk.__future__.python3&&o!==s&&("GtE"===n||"Gt"===n||"LtE"===n||"Lt"===n)){var l=[Sk.builtin.float_,Sk.builtin.int_,Sk.builtin.lng,Sk.builtin.bool],c=[Sk.builtin.dict,Sk.builtin.enumerate,Sk.builtin.filter_,Sk.builtin.list,Sk.builtin.map_,Sk.builtin.str,Sk.builtin.tuple,Sk.builtin.zip_];const r=l.indexOf(o),i=c.indexOf(o);if(l=l.indexOf(s),c=c.indexOf(s),e===Sk.builtin.none.none$)switch(n){case"Lt":case"LtE":return!0;case"Gt":case"GtE":return!1}if(t===Sk.builtin.none.none$)switch(n){case"Lt":case"LtE":return!1;case"Gt":case"GtE":return!0}if(-1!==r&&-1!==c)switch(n){case"Lt":case"LtE":return!0;case"Gt":case"GtE":return!1}if(-1!==i&&-1!==l)switch(n){case"Lt":case"LtE":return!1;case"Gt":case"GtE":return!0}if(-1!==i&&-1!==c)switch(n){case"Lt":return i<c;case"LtE":return i<=c;case"Gt":return i>c;case"GtE":return i>=c}}if("Is"===n){if(o===s){if(e===t)return!0;if(o===Sk.builtin.float_)return e.v===t.v;if(o===Sk.builtin.int_)return"number"==typeof e.v&&"number"==typeof e.v?e.v===t.v:JSBI.equal(JSBI.BigInt(e.v),JSBI.BigInt(t.v))}return!1}if("IsNot"===n)return o!==s||(o===Sk.builtin.float_?e.v!==t.v:o===Sk.builtin.int_?"number"==typeof e.v&&"number"==typeof e.v?e.v!==t.v:JSBI.notEqual(JSBI.BigInt(e.v),JSBI.BigInt(t.v)):e!==t);if("In"===n)return Sk.misceval.chain(Sk.abstr.sequenceContains(t,e,r),Sk.misceval.isTrue);if("NotIn"===n)return Sk.misceval.chain(Sk.abstr.sequenceContains(t,e,r),(function(e){return!Sk.misceval.isTrue(e)}));if(o=(s={Eq:"ob$eq",NotEq:"ob$ne",Gt:"ob$gt",GtE:"ob$ge",Lt:"ob$lt",LtE:"ob$le"})[n],a&&(t[r=s[Sk.misceval.swappedOp_[n]]]!==e[r]&&(i=t[r](e))!==Sk.builtin.NotImplemented.NotImplemented$)||(i=e[o](t))!==Sk.builtin.NotImplemented.NotImplemented$||!a&&(i=t[r=s[Sk.misceval.swappedOp_[n]]](e))!==Sk.builtin.NotImplemented.NotImplemented$)return Sk.misceval.isTrue(i);if(!Sk.__future__.python3){if(a=Sk.abstr.lookupSpecial(e,Sk.builtin.str.$cmp))try{if(i=Sk.misceval.callsimArray(a,[t]),Sk.builtin.checkNumber(i)){if(i=Sk.builtin.asnum$(i),"Eq"===n)return 0===i;if("NotEq"===n)return 0!==i;if("Lt"===n)return 0>i;if("Gt"===n)return 0<i;if("LtE"===n)return 0>=i;if("GtE"===n)return 0<=i}if(i!==Sk.builtin.NotImplemented.NotImplemented$)throw new Sk.builtin.TypeError("comparison did not return an int")}catch(e){throw new Sk.builtin.TypeError("comparison did not return an int")}if(a=Sk.abstr.lookupSpecial(t,Sk.builtin.str.$cmp))try{if(i=Sk.misceval.callsimArray(a,[e]),Sk.builtin.checkNumber(i)){if(i=Sk.builtin.asnum$(i),"Eq"===n)return 0===i;if("NotEq"===n)return 0!==i;if("Lt"===n)return 0<i;if("Gt"===n)return 0>i;if("LtE"===n)return 0<=i;if("GtE"===n)return 0>=i}if(i!==Sk.builtin.NotImplemented.NotImplemented$)throw new Sk.builtin.TypeError("comparison did not return an int")}catch(e){throw new Sk.builtin.TypeError("comparison did not return an int")}if(e===Sk.builtin.none.none$&&t===Sk.builtin.none.none$){if("Eq"===n)return e.v===t.v;if("NotEq"===n)return e.v!==t.v;if("Gt"===n)return e.v>t.v;if("GtE"===n)return e.v>=t.v;if("Lt"===n)return e.v<t.v;if("LtE"===n)return e.v<=t.v}}if("Eq"===n)return e===t;if("NotEq"===n)return e!==t;throw e=Sk.abstr.typeName(e),t=Sk.abstr.typeName(t),new Sk.builtin.TypeError("'"+Sk.misceval.opSymbols[n]+"' not supported between instances of '"+e+"' and '"+t+"'")},Sk.exportSymbol("Sk.misceval.richCompareBool",Sk.misceval.richCompareBool),Sk.misceval.objectRepr=function(e){if(Sk.asserts.assert(void 0!==e,"trying to repr undefined"),null!==e&&e.$r)return e.$r().v;try{return new Sk.builtin.str(e).v}catch(e){if(e instanceof Sk.builtin.TypeError)return"<unknown>";throw e}},Sk.exportSymbol("Sk.misceval.objectRepr",Sk.misceval.objectRepr),Sk.misceval.opAllowsEquality=function(e){switch(e){case"LtE":case"Eq":case"GtE":return!0}return!1},Sk.exportSymbol("Sk.misceval.opAllowsEquality",Sk.misceval.opAllowsEquality),Sk.misceval.isTrue=function(e){return!0===e||e===Sk.builtin.bool.true$||!1!==e&&e!==Sk.builtin.bool.false$&&null!=e&&(e.nb$bool?e.nb$bool():e.sq$length?0!==e.sq$length():!!e)},Sk.exportSymbol("Sk.misceval.isTrue",Sk.misceval.isTrue),Sk.misceval.softspace_=!1,Sk.misceval.print_=function(e){Sk.misceval.softspace_&&("\n"!==e&&Sk.output(" "),Sk.misceval.softspace_=!1);var t=new Sk.builtin.str(e);return Sk.misceval.chain(Sk.importModule("sys",!1,!0),(function(e){return Sk.misceval.apply(e.$d.stdout.write,void 0,void 0,void 0,[e.$d.stdout,t])}),(function(){var e;(e=0===t.v.length)||(e=!("\n"===(e=t.v[t.v.length-1])||"\t"===e||"\r"===e)),(e||" "===t.v[t.v.length-1])&&(Sk.misceval.softspace_=!0)}))},Sk.exportSymbol("Sk.misceval.print_",Sk.misceval.print_),Sk.misceval.loadname=function(e,t){if(void 0!==(t=t[e]))return t;if(void 0!==(t=Sk.builtins[e]))return t;throw new Sk.builtin.NameError("name '"+Sk.unfixReserved(e)+"' is not defined")},Sk.exportSymbol("Sk.misceval.loadname",Sk.misceval.loadname),Sk.misceval.call=function(e,t,n,r,i){return i=Array.prototype.slice.call(arguments,4),Sk.misceval.apply(e,t,n,r,i)},Sk.exportSymbol("Sk.misceval.call",Sk.misceval.call),Sk.misceval.callAsync=function(e,t,n,r,i,o){return o=Array.prototype.slice.call(arguments,5),Sk.misceval.applyAsync(e,t,n,r,i,o)},Sk.exportSymbol("Sk.misceval.callAsync",Sk.misceval.callAsync),Sk.misceval.callOrSuspend=function(e,t,n,r,i){return i=Array.prototype.slice.call(arguments,4),Sk.misceval.applyOrSuspend(e,t,n,r,i)},Sk.exportSymbol("Sk.misceval.callOrSuspend",Sk.misceval.callOrSuspend),Sk.misceval.callsim=function(e,t){return t=Array.prototype.slice.call(arguments,1),Sk.misceval.apply(e,void 0,void 0,void 0,t)},Sk.exportSymbol("Sk.misceval.callsim",Sk.misceval.callsim),Sk.misceval.callsimArray=function(e,t,n){return t=t||[],Sk.misceval.retryOptionalSuspensionOrThrow(Sk.misceval.callsimOrSuspendArray(e,t,n))},Sk.exportSymbol("Sk.misceval.callsimArray",Sk.misceval.callsimArray),Sk.misceval.callsimAsync=function(e,t,n){return n=Array.prototype.slice.call(arguments,2),Sk.misceval.applyAsync(e,t,void 0,void 0,void 0,n)},Sk.exportSymbol("Sk.misceval.callsimAsync",Sk.misceval.callsimAsync),Sk.misceval.callsimOrSuspend=function(e,t){return t=Array.prototype.slice.call(arguments,1),Sk.misceval.applyOrSuspend(e,void 0,void 0,void 0,t)},Sk.exportSymbol("Sk.misceval.callsimOrSuspend",Sk.misceval.callsimOrSuspend),Sk.misceval.callsimOrSuspendArray=function(e,t,n){return t=t||[],void 0!==e&&e.tp$call?e.tp$call(t,n):Sk.misceval.applyOrSuspend(e,void 0,void 0,n,t)},Sk.exportSymbol("Sk.misceval.callsimOrSuspendArray",Sk.misceval.callsimOrSuspendArray),Sk.misceval.apply=function(e,t,n,r,i){return(e=Sk.misceval.applyOrSuspend(e,t,n,r,i))instanceof Sk.misceval.Suspension?Sk.misceval.retryOptionalSuspensionOrThrow(e):e},Sk.exportSymbol("Sk.misceval.apply",Sk.misceval.apply),Sk.misceval.asyncToPromise=function(e,t){return new Promise((function(n,r){try{!function e(i){try{for(var o=function(){try{e(i.resume())}catch(e){r(e)}},s=function(e){try{i.data.result=e,o()}catch(e){r(e)}},a=function(e){try{i.data.error=e,o()}catch(e){r(e)}};i instanceof Sk.misceval.Suspension;){var l=t&&(t[i.data.type]||t["*"]);if(l){var c=l(i);if(c)return void c.then(e,r)}if("Sk.promise"==i.data.type)return void i.data.promise.then(s,a);if("Sk.yield"==i.data.type)return void Sk.global.setImmediate(o);if("Sk.delay"==i.data.type)return void Sk.global.setImmediate(o);if(!i.optional)throw new Sk.builtin.SuspensionError("Unhandled non-optional suspension of type '"+i.data.type+"'");i=i.resume()}n(i)}catch(e){r(e)}}(e())}catch(e){r(e)}}))},Sk.exportSymbol("Sk.misceval.asyncToPromise",Sk.misceval.asyncToPromise),Sk.misceval.applyAsync=function(e,t,n,r,i,o){return Sk.misceval.asyncToPromise((function(){return Sk.misceval.applyOrSuspend(t,n,r,i,o)}),e)},Sk.exportSymbol("Sk.misceval.applyAsync",Sk.misceval.applyAsync),Sk.misceval.chain=function(e,t){for(var n,r,i=1,o=e;;){if(i==arguments.length)return o;if(o&&o.$isSuspension)break;o=arguments[i](o),i++}for(r=Array(arguments.length-i),n=0;n<arguments.length-i;n++)r[n]=arguments[i+n];return n=0,function e(t){for(;n<r.length;){if(t instanceof Sk.misceval.Suspension)return new Sk.misceval.Suspension(e,t);t=r[n](t),n++}return t}(o)},Sk.exportSymbol("Sk.misceval.chain",Sk.misceval.chain),Sk.misceval.tryCatch=function(e,t){try{var n=e()}catch(e){return t(e)}return n instanceof Sk.misceval.Suspension?((e=new Sk.misceval.Suspension(void 0,n)).resume=function(){return Sk.misceval.tryCatch(n.resume,t)},e):n},Sk.exportSymbol("Sk.misceval.tryCatch",Sk.misceval.tryCatch),Sk.misceval.iterFor=function(e,t,n){var r=n,i=function(t){return r=t,t instanceof Sk.misceval.Break?t:e.tp$iternext(!0)};return function e(n){for(;void 0!==n;){if(n instanceof Sk.misceval.Suspension)return new Sk.misceval.Suspension(e,n);if(n===Sk.misceval.Break||n instanceof Sk.misceval.Break)return n.brValue;n=Sk.misceval.chain(t(n,r),i)}return r}(e.tp$iternext(!0))},Sk.exportSymbol("Sk.misceval.iterFor",Sk.misceval.iterFor),Sk.misceval.iterArray=function(e,t,n){Sk.asserts.assert(Array.isArray(e),"iterArgs requires an array");let r=0;return Sk.misceval.iterFor({tp$iternext:()=>e[r++]},t,n)},Sk.misceval.arrayFromIterable=function(e,t){if(void 0===e)return[];if(void 0===e.hp$type&&void 0!==e.sk$asarray)return e.sk$asarray();const n=[];return e=Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(e),e=>{n.push(e)}),()=>n),t?e:Sk.misceval.retryOptionalSuspensionOrThrow(e)},Sk.misceval.Break=function(e){if(!(this instanceof Sk.misceval.Break))return new Sk.misceval.Break(e);this.brValue=e},Sk.exportSymbol("Sk.misceval.Break",Sk.misceval.Break),Sk.misceval.applyOrSuspend=function(e,t,n,r,i){var o;if(null==e||e===Sk.builtin.none.none$)throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(e)+"' object is not callable");"function"==typeof e&&void 0===e.tp$call&&(e=new Sk.builtin.func(e));var s=e.tp$call;if(void 0!==s){if(n)for(o=(n=n.tp$iter()).tp$iternext();void 0!==o;o=n.tp$iternext())i.push(o);if(t)for(o=(n=Sk.abstr.iter(t)).tp$iternext();void 0!==o;o=n.tp$iternext()){if(!Sk.builtin.checkString(o))throw new Sk.builtin.TypeError("Function keywords must be strings");r.push(o.v),r.push(Sk.abstr.objectGetItem(t,o,!1))}return s.call(e,i,r,t)}if(void 0!==(s=e.__call__))return i.unshift(e),Sk.misceval.apply(s,t,n,r,i);throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(e)+"' object is not callable")},Sk.exportSymbol("Sk.misceval.applyOrSuspend",Sk.misceval.applyOrSuspend),Sk.misceval.promiseToSuspension=function(e){var t=new Sk.misceval.Suspension;return t.resume=function(){if(t.data.error)throw t.data.error;return t.data.result},t.data={type:"Sk.promise",promise:e},t},Sk.exportSymbol("Sk.misceval.promiseToSuspension",Sk.misceval.promiseToSuspension),Sk.misceval.buildClass=function(e,t,n,r,i){var o=Sk.builtin.type,s={};for(var a in t(e,s,void 0===i?{}:i),e.__name__&&(s.__module__=e.__name__),e=new Sk.builtin.str(n),r=new Sk.builtin.tuple(r),t=[],s)s.hasOwnProperty(a)&&(t.push(new Sk.builtin.str(a)),t.push(s[a]));return t=new Sk.builtin.dict(t),Sk.misceval.callsimArray(o,[e,r,t])},Sk.exportSymbol("Sk.misceval.buildClass",Sk.misceval.buildClass)},function(e,t){Sk.builtin.callable_iter_=Sk.abstr.buildIteratorClass("callable_iterator",{constructor:function(e,t){if(!Sk.builtin.checkCallable(e))throw new Sk.builtin.TypeError("iter(v, w): v must be callable");this.$callable=e,this.$sentinel=t,this.$flag=!1},iternext(e){if(!0!==this.$flag){if(e)return e=Sk.misceval.callsimOrSuspendArray(this.$callable,[]),Sk.misceval.chain(e,e=>{if(!Sk.misceval.richCompareBool(e,this.$sentinel,"Eq",!0))return e;this.$flag=!0});if(e=Sk.misceval.callsimArray(this.$callable,[]),!Sk.misceval.richCompareBool(e,this.$sentinel,"Eq",!1))return e;this.$flag=!0}},flags:{sk$acceptable_as_base_class:!1}}),Sk.builtin.seq_iter_=Sk.abstr.buildIteratorClass("iterator",{constructor:function(e){this.$index=0,this.$seq=e},iternext(e){let t;return t=Sk.misceval.tryCatch(()=>this.$seq.mp$subscript(new Sk.builtin.int_(this.$index++),e),e=>{if(!(e instanceof Sk.builtin.IndexError||e instanceof Sk.builtin.StopIteration))throw e}),e?t:Sk.misceval.retryOptionalSuspensionOrThrow(t)},methods:{__length_hint__:{$flags:{NoArgs:!0},$meth(){if(this.$seq.sq$length)return this.$seq.sq$length()-this.$index;throw new Sk.builtin.NotImplementedError("len is not implemented for "+Sk.abstr.typeName(this.$seq))}}},flags:{sk$acceptable_as_base_class:!1}}),Sk.exportSymbol("Sk.builtin.callable_iter_",Sk.builtin.callable_iter_)},function(e,t){Sk.builtin.list=Sk.abstr.buildNativeClass("list",{constructor:function(e){void 0===e?e=[]:Array.isArray(e)||(e=Sk.misceval.arrayFromIterable(e)),Sk.asserts.assert(this instanceof Sk.builtin.list,"bad call to list, use 'new' with an Array of python objects"),this.v=e,this.in$repr=!1},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,tp$hash:Sk.builtin.none.none$,tp$doc:"Built-in mutable sequence.\n\nIf no argument is given, the constructor creates a new empty list.\nThe argument must be an iterable if specified.",tp$new:Sk.generic.new,tp$init(e,t){return Sk.abstr.checkNoKwargs("list",t),Sk.abstr.checkArgsLen("list",e,0,1),Sk.misceval.chain(Sk.misceval.arrayFromIterable(e[0],!0),e=>{this.v=e})},$r(){if(this.in$repr)return new Sk.builtin.str("[...]");this.in$repr=!0;const e=this.v.map(e=>Sk.misceval.objectRepr(e));return this.in$repr=!1,new Sk.builtin.str("["+e.join(", ")+"]")},tp$richcompare:Sk.generic.seqCompare,tp$iter(){return new n(this)},sq$length(){return this.v.length},sq$concat(e){if(!(e instanceof Sk.builtin.list))throw new Sk.builtin.TypeError("can only concatenate list to list");return new Sk.builtin.list(this.v.concat(e.v))},sq$contains(e){for(let t=this.tp$iter(),n=t.tp$iternext();void 0!==n;n=t.tp$iternext())if(n===e||Sk.misceval.richCompareBool(n,e,"Eq"))return!0;return!1},sq$repeat(e){if(!Sk.misceval.isIndex(e))throw new Sk.builtin.TypeError("can't multiply sequence by non-int of type '"+Sk.abstr.typeName(e)+"'");if((e=Sk.misceval.asIndexSized(e,Sk.builtin.OverflowError))*this.v.length>Number.MAX_SAFE_INTEGER)throw new Sk.builtin.OverflowError;const t=[];for(let n=0;n<e;n++)for(let e=0;e<this.v.length;e++)t.push(this.v[e]);return new Sk.builtin.list(t)},mp$subscript(e){if(Sk.misceval.isIndex(e))return e=Sk.misceval.asIndexSized(e,Sk.builtin.IndexError),e=this.list$inRange(e,"list index out of range"),this.v[e];if(e instanceof Sk.builtin.slice){const t=[];return e.sssiter$(this.v.length,e=>{t.push(this.v[e])}),new Sk.builtin.list(t)}throw new Sk.builtin.TypeError("list indices must be integers or slices, not "+Sk.abstr.typeName(e))},mp$ass_subscript(e,t){void 0===t?this.del$subscript(e):this.ass$subscript(e,t)},sq$inplace_concat(e){return e===this?(this.v.push(...this.v),this):Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(e),e=>{this.v.push(e)}),()=>this)},sq$inplace_repeat(e){if(!Sk.misceval.isIndex(e))throw new Sk.builtin.TypeError("can't multiply sequence by non-int of type '"+Sk.abstr.typeName(e)+"'");e=Sk.misceval.asIndexSized(e,Sk.builtin.OverflowError);const t=this.v.length;if(0>=e)this.v.length=0;else if(e*t>Number.MAX_SAFE_INTEGER)throw new Sk.builtin.OverflowError;for(let n=1;n<e;n++)for(let e=0;e<t;e++)this.v.push(this.v[e]);return this}},methods:{__reversed__:{$meth(){return new r(this)},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return a reverse iterator over the list."},clear:{$meth(){return this.v.length=0,Sk.builtin.none.none$},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Remove all items from list."},copy:{$meth(){return new Sk.builtin.list(this.v.slice(0))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return a shallow copy of the list."},append:{$meth(e){return this.v.push(e),Sk.builtin.none.none$},$flags:{OneArg:!0},$textsig:"($self, object, /)",$doc:"Append object to the end of the list."},insert:{$meth(e,t){return e=Sk.misceval.asIndexSized(e,Sk.builtin.OverflowError),({start:e}=Sk.builtin.slice.startEnd$wrt(this,e)),this.v.splice(e,0,t),Sk.builtin.none.none$},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($self, index, object, /)",$doc:"Insert object before index."},extend:{$meth(e){return e===this?(this.v.push(...this.v),Sk.builtin.none.none$):Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(e),e=>{this.v.push(e)}),()=>Sk.builtin.none.none$)},$flags:{OneArg:!0},$textsig:"($self, iterable, /)",$doc:"Extend list by appending elements from the iterable."},pop:{$meth(e){e=void 0===e?this.v.length-1:Sk.misceval.asIndexSized(e,Sk.builtin.OverflowError),e=this.list$inRange(e,"pop index out of range");const t=this.v[e];return this.v.splice(e,1),t},$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, index=-1, /)",$doc:"Remove and return item at index (default last).\n\nRaises IndexError if list is empty or index is out of range."},remove:{$meth(e){if(-1===(e=this.list$indexOf(e)))throw new Sk.builtin.ValueError("list.remove(x): x not in list");return this.v.splice(e,1),Sk.builtin.none.none$},$flags:{OneArg:!0},$textsig:"($self, value, /)",$doc:"Remove first occurrence of value.\n\nRaises ValueError if the value is not present."},sort:{$meth(e,t){if(e.length)throw new Sk.builtin.TypeError("sort() takes no positional arguments");const[n,r]=Sk.abstr.copyKeywordsToNamedArgs("sort",["key","reverse"],e,t,[Sk.builtin.none.none$,Sk.builtin.bool.false$]);return this.list$sort(void 0,n,r)},$flags:{FastCall:!0},$textsig:"($self, /, *, key=None, reverse=False)",$doc:"Stable sort *IN PLACE*."},index:{$meth(e,t,n){if(void 0!==t&&!Sk.misceval.isIndex(t)||void 0!==n&&!Sk.misceval.isIndex(n))throw new Sk.builtin.TypeError("slice indices must be integers or have an __index__ method");if(-1===(t=this.list$indexOf(e,t,n)))throw new Sk.builtin.ValueError(Sk.misceval.objectRepr(e)+" is not in list");return new Sk.builtin.int_(t)},$flags:{MinArgs:1,MaxArgs:3},$textsig:"($self, value, start=0, stop=sys.maxsize, /)",$doc:"Return first index of value.\n\nRaises ValueError if the value is not present."},count:{$meth(e){let t=0;const n=this.v.length;for(let r=0;r<n;r++)(this.v[r]===e||Sk.misceval.richCompareBool(this.v[r],e,"Eq"))&&(t+=1);return new Sk.builtin.int_(t)},$flags:{OneArg:!0},$textsig:"($self, value, /)",$doc:"Return number of occurrences of value."},reverse:{$meth(){return this.list$reverse(),Sk.builtin.none.none$},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Reverse *IN PLACE*."}},proto:{sk$asarray(){return this.v.slice(0)},list$sort:function(e,t,n){const r=null!=t&&t!==Sk.builtin.none.none$;var i=null!=e&&e!==Sk.builtin.none.none$;let o;if(void 0===n)o=!1;else{if(!Sk.builtin.checkInt(n))throw new Sk.builtin.TypeError("an integer is required");o=Sk.misceval.isTrue(n)}n=new Sk.builtin.timSort(this),this.v=[];const s=new Sk.builtin.int_(0);if(r){n.lt=i?function(t,n){return t=Sk.misceval.callsimArray(e,[t[0],n[0]]),Sk.misceval.richCompareBool(t,s,"Lt")}:function(e,t){return Sk.misceval.richCompareBool(e[0],t[0],"Lt")};for(let e=0;e<n.listlength;e++){i=n.list.v[e];const r=Sk.misceval.callsimArray(t,[i]);n.list.v[e]=[r,i]}}else i&&(n.lt=function(t,n){return t=Sk.misceval.callsimArray(e,[t,n]),Sk.misceval.richCompareBool(t,s,"Lt")});if(o&&n.list.list$reverse(),n.sort(),o&&n.list.list$reverse(),r)for(t=0;t<n.listlength;t++)i=n.list.v[t][1],n.list.v[t]=i;if(t=0<this.sq$length(),this.v=n.list.v,t)throw new Sk.builtin.ValueError("list modified during sort");return Sk.builtin.none.none$},list$inRange(e,t){if(0>e&&(e+=this.v.length),0<=e&&e<this.v.length)return e;throw new Sk.builtin.IndexError(t)},list$indexOf(e,t,n){for(({start:t,end:n}=Sk.builtin.slice.startEnd$wrt(this,t,n));t<n&&t<this.v.length;t++)if(this.v[t]===e||Sk.misceval.richCompareBool(this.v[t],e,"Eq"))return t;return-1},list$reverse(){this.v.reverse()},ass$subscript(e,t){if(Sk.misceval.isIndex(e))this.ass$index(e,t);else{if(!(e instanceof Sk.builtin.slice))throw new Sk.builtin.TypeError("list indices must be integers or slices, not "+Sk.abstr.typeName(e));{const{start:n,stop:r,step:i}=e.slice$indices(this.v.length);1===i?this.ass$slice(n,r,t):this.ass$ext_slice(e,t)}}},ass$index(e,t){e=Sk.misceval.asIndexSized(e,Sk.builtin.IndexError),e=this.list$inRange(e,"list assignment index out of range"),this.v[e]=t},ass$slice(e,t,n){if(!Sk.builtin.checkIterable(n))throw new Sk.builtin.TypeError("can only assign an iterable");n=Sk.misceval.arrayFromIterable(n),this.v.splice(e,t-e,...n)},ass$ext_slice(e,t){const n=[];if(e.sssiter$(this.v.length,e=>{n.push(e)}),!Sk.builtin.checkIterable(t))throw new Sk.builtin.TypeError("must assign iterable to extended slice");if(e=Sk.misceval.arrayFromIterable(t),n.length!==e.length)throw new Sk.builtin.ValueError("attempt to assign sequence of size "+e.length+" to extended slice of size "+n.length);for(t=0;t<n.length;t++)this.v.splice(n[t],1,e[t])},del$subscript(e){if(Sk.misceval.isIndex(e))this.del$index(e);else{if(!(e instanceof Sk.builtin.slice))throw new Sk.builtin.TypeError("list indices must be integers, not "+Sk.abstr.typeName(e));{const{start:t,stop:n,step:r}=e.slice$indices(this.v.length);1===r?this.del$slice(t,n):this.del$ext_slice(e,0<r?1:0)}}},del$index(e){e=Sk.misceval.asIndexSized(e,Sk.builtin.IndexError),e=this.list$inRange(e,"list assignment index out of range"),this.v.splice(e,1)},del$slice(e,t){this.v.splice(e,t-e)},del$ext_slice(e,t){let n=0;e.sssiter$(this.v.length,e=>{this.v.splice(e-n,1),n+=t})}}}),Sk.exportSymbol("Sk.builtin.list",Sk.builtin.list),Sk.builtin.list.py2$methods={sort:{$name:"sort",$meth(e,t){const[n,r,i]=Sk.abstr.copyKeywordsToNamedArgs("sort",["cmp","key","reverse"],e,t,[Sk.builtin.none.none$,Sk.builtin.none.none$,Sk.builtin.bool.false$]);return this.list$sort(n,r,i)},$flags:{FastCall:!0},$textsig:"($self, cmp=None, key=None, reverse=False)",$doc:"Stable sort *IN PLACE*."}};var n=Sk.abstr.buildIteratorClass("list_iterator",{constructor:function(e){this.$index=0,this.$seq=e.v},iternext:Sk.generic.iterNextWithArray,methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$acceptable_as_base_class:!1}}),r=Sk.abstr.buildIteratorClass("list_reverseiterator",{constructor:function(e){this.$index=e.v.length-1,this.$seq=e.v},iternext(){const e=this.$seq[this.$index--];if(void 0!==e)return e;this.tp$iternext=()=>{}},methods:{__length_hint__:Sk.generic.iterReverseLengthHintMethodDef},flags:{sk$acceptable_as_base_class:!1}})},function(e,t,n){function r(e){var t=e.replace(_,"").replace(x,"_").toLowerCase();return void 0===(t=S[t])?e:t}function i(e,t,n){if(void 0===t)t="utf-8";else{if(!Sk.builtin.checkString(t))throw new Sk.builtin.TypeError(e+"() argument "+("bytesstr".includes(e)?2:1)+" must be str not "+Sk.abstr.typeName(t));t=t.$jsstr()}if(void 0===n)n="strict";else{if(!Sk.builtin.checkString(n))throw new Sk.builtin.TypeError(e+"() argument "+("bytesstr".includes(e)?3:2)+" must be str not "+Sk.abstr.typeName(n));n=n.$jsstr()}return{encoding:t,errors:n}}function o(e,t,n){if(e=e.$jsstr(),t=r(t),"strict"!==n&&"ignore"!==n&&"replace"!==n)throw new Sk.builtin.NotImplementedError("'"+n+"' error handling not implemented in Skulpt");if("ascii"===t){for(i in t=[],e){const r=e.charCodeAt(i);if(127<r){if("strict"===n)throw n=s(r),new Sk.builtin.UnicodeEncodeError("'ascii' codec can't encode character '"+n+"' in position "+i+": ordinal not in range(128)");"replace"===n&&t.push(63)}else t.push(r)}var i=new Uint8Array(t)}else{if("utf-8"!==t)throw new Sk.builtin.LookupError("unknown encoding: "+t);i=w.encode(e)}return new Sk.builtin.bytes(i)}function s(e){var t=265>=e?"\\x":"\\u";return 3===(e=e.toString(16)).length&&(e=e.slice(1,3)),1===e.length?t+"0"+e:t+e}function a(e,t){if(({encoding:e,errors:t}=i("decode",e,t)),e=r(e),"strict"!==t&&"ignore"!==t&&"replace"!==t)throw new Sk.builtin.NotImplementedError("'"+t+"' error handling not implemented in Skulpt");if("ascii"===e){e=this.v;var n="";for(let r=0;r<e.length;r++){const i=e[r];if(127<i){if("strict"===t)throw new Sk.builtin.UnicodeDecodeError("'ascii' codec can't decode byte 0x"+i.toString(16)+" in position "+r+": ordinal not in range(128)");"replace"===t&&(n+=String.fromCharCode(65533))}else n+=String.fromCharCode(i)}e=n}else{if("utf-8"!==e)throw new Sk.builtin.LookupError("unknown encoding: "+e);e:if(e=this.v,n=t,t=k.decode(e),"replace"===n)e=t;else{if("strict"===n){if(-1===(n=t.indexOf("<22>"))){e=t;break e}throw new Sk.builtin.UnicodeDecodeError("'utf-8' codec can't decode byte 0x"+e[n].toString(16)+" in position "+n+": invalid start byte")}e=t.replace(/\ufffd/g,"")}}return new Sk.builtin.str(e)}function l(e,t){return function(n,r,i){if(!(n instanceof Sk.builtin.bytes||n instanceof Sk.builtin.tuple))throw new Sk.builtin.TypeError(e+" first arg must be bytes or a tuple of bytes, not "+Sk.abstr.typeName(n));if(({start:r,end:i}=Sk.builtin.slice.startEnd$wrt(this,r,i)),i<r)return Sk.builtin.bool.false$;if(r=this.v.subarray(r,i),n instanceof Sk.builtin.tuple){for(let e=Sk.abstr.iter(n),i=e.tp$iternext();void 0!==i;i=e.tp$iternext())if(i=this.get$raw(i),t(r,i))return Sk.builtin.bool.true$;return Sk.builtin.bool.false$}return t(r,n.v)?Sk.builtin.bool.true$:Sk.builtin.bool.false$}}function c(e){return function(t,n,r){return t=this.get$tgt(t),({start:n,end:r}=Sk.builtin.slice.startEnd$wrt(this,n,r)),r<n?-1:"number"==typeof t?(t=e?this.v.lastIndexOf(t,r-1):this.v.indexOf(t,n))>=n&&t<r?t:-1:e?this.find$subright(t,n,r):this.find$subleft(t,n,r)}}function u(e){return function(t){let n;if(t=this.get$raw(t),e){if(n=this.find$subright(t,0,this.v.length),0>n)return new Sk.builtin.tuple([new Sk.builtin.bytes,new Sk.builtin.bytes,this])}else if(n=this.find$subleft(t,0,this.v.length),0>n)return new Sk.builtin.tuple([this,new Sk.builtin.bytes,new Sk.builtin.bytes]);return new Sk.builtin.tuple([new Sk.builtin.bytes(this.v.subarray(0,n)),new Sk.builtin.bytes(t),new Sk.builtin.bytes(this.v.subarray(n+t.length))])}}function d(e,t){return function(n){var r=void 0===n||n===Sk.builtin.none.none$?new Uint8Array([9,10,11,12,13,32,133]):this.get$raw(n);n=0;var i=this.v.length;if(e)for(;n<i&&r.includes(this.v[n]);)n++;if(t)for(;i>n&&r.includes(this.v[i-1]);)i--;for(r=new Uint8Array(i-n),i=0;i<r.length;i++)r[i]=this.v[i+n];return new Sk.builtin.bytes(r)}}function h(e,t,n){return function(r,i){if(void 0===i)i=32;else{if(!(i instanceof Sk.builtin.bytes&&1==i.v.length))throw new Sk.builtin.TypeError(e+"() argument 2 must be a byte string of length 1, not "+Sk.abstr.typeName(i));i=i.v[0]}const o=this.v.length;if((r=Sk.misceval.asIndexSized(r,Sk.builtin.OverflowError))<=o)return new Sk.builtin.bytes(this.v);const s=new Uint8Array(r);let a,l;n?(a=Math.floor((r-o)/2),l=(r-o)%2?a+1:a):t?(a=r-o,l=0):(a=0,l=r-o),s.fill(i,0,a);for(let e=0;e<o;e++)s[e+a]=this.v[e];return s.fill(i,r-l),new Sk.builtin.bytes(s)}}function p(e){return 9<=e&&13>=e||32===e}function f(e){return 97<=e&&122>=e}function m(e){return 65<=e&&90>=e}function g(e){return 48<=e&&57>=e}function b(e,t){return function(){return 0===this.v.length?t?Sk.builtin.bool.true$:Sk.builtin.bool.false$:this.v.every(t=>e(t))?Sk.builtin.bool.true$:Sk.builtin.bool.false$}}function v(e,t){return function(){let n=!1;for(let r=0;r<this.v.length;r++){if(t(this.v[r]))return Sk.builtin.bool.false$;!n&&e(this.v[r])&&(n=!0)}return n?Sk.builtin.bool.true$:Sk.builtin.bool.false$}}function y(e){return function(){const t=new Uint8Array(this.v.length);for(let n=0;n<this.v.length;n++)t[n]=e(this.v[n]);return new Sk.builtin.bytes(t)}}n(30);const S={utf:"utf-8",utf8:"utf-8",utf_8:"utf-8",ascii:"ascii"};var _=/\s+/g,x=/[_-]+/g;const w=new TextEncoder,k=new TextDecoder;Sk.builtin.bytes=Sk.abstr.buildNativeClass("bytes",{constructor:function(e){if(!(this instanceof Sk.builtin.bytes))throw new TypeError("bytes is a constructor use 'new'");if(void 0===e)this.v=new Uint8Array;else if(e instanceof Uint8Array)this.v=e;else if(Array.isArray(e))Sk.asserts.assert(e.every(e=>0<=e&&255>=e),"bad internal call to bytes with array"),this.v=new Uint8Array(e);else if("string"==typeof e){let t;const n=new Uint8Array(e.length),r=e.length;for(let i=0;i<r;i++){if(t=e.charCodeAt(i),255<t)throw new Sk.builtin.UnicodeDecodeError("invalid string at index "+i+" (possibly contains a unicode character)");n[i]=t}this.v=n}else{if("number"!=typeof e)throw new Sk.builtin.TypeError("bad argument to bytes constructor");this.v=new Uint8Array(e)}},slots:{tp$getattr:Sk.generic.getAttr,tp$doc:"bytes(iterable_of_ints) -> bytes\nbytes(string, encoding[, errors]) -> bytes\nbytes(bytes_or_buffer) -> immutable copy of bytes_or_buffer\nbytes(int) -> bytes object of size given by the parameter initialized with null bytes\nbytes() -> empty bytes object\n\nConstruct an immutable array of bytes from:\n - an iterable yielding integers in range(256)\n - a text string encoded using the specified encoding\n - any object implementing the buffer API.\n - an integer",tp$new(e,t){if(this!==Sk.builtin.bytes.prototype)return this.$subtype_new(e,t);if(t=t||[],!(1>=e.length&&0==+t.length)){if([e,n,t]=Sk.abstr.copyKeywordsToNamedArgs("bytes",[null,"pySource","errors"],e,t),({encoding:n,errors:t}=i("bytes",n,t)),!Sk.builtin.checkString(e))throw new Sk.builtin.TypeError("encoding or errors without a string argument");return o(e,n,t)}if(void 0===(e=e[0]))return new Sk.builtin.bytes;if(void 0!==(t=Sk.abstr.lookupSpecial(e,Sk.builtin.str.$bytes))){var n=Sk.misceval.callsimOrSuspendArray(t,[]);return Sk.misceval.chain(n,e=>{if(!Sk.builtin.checkBytes(e))throw new Sk.builtin.TypeError("__bytes__ returned non-bytes (type "+Sk.abstr.typeName(e)+")");return e})}if(Sk.misceval.isIndex(e)){if(0>(n=Sk.misceval.asIndexSized(e,Sk.builtin.OverflowError)))throw new Sk.builtin.ValueError("negative count");return new Sk.builtin.bytes(n)}if(Sk.builtin.checkBytes(e))return new Sk.builtin.bytes(e.v);if(Sk.builtin.checkString(e))throw new Sk.builtin.TypeError("string argument without an encoding");if(Sk.builtin.checkIterable(e)){let t=[];return n=Sk.misceval.iterFor(Sk.abstr.iter(e),e=>{if(0>(e=Sk.misceval.asIndexSized(e))||255<e)throw new Sk.builtin.ValueError("bytes must be in range(0, 256)");t.push(e)}),Sk.misceval.chain(n,()=>new Sk.builtin.bytes(t))}throw new Sk.builtin.TypeError("cannot convert '"+Sk.abstr.typeName(n)+"' object into bytes")},$r(){let e,t="'";const n=-1!==this.v.indexOf(34);let r="";for(let i=0;i<this.v.length;i++)if(e=this.v[i],9>e||10<e&&13>e||13<e&&32>e||126<e)r+=s(e);else if(9===e||10===e||13===e||39===e||92===e)switch(e){case 9:r+="\\t";break;case 10:r+="\\n";break;case 13:r+="\\r";break;case 39:n?r+="\\'":(r+="'",t='"');break;case 92:r+="\\\\"}else r+=String.fromCharCode(e);return new Sk.builtin.str("b"+t+r+t)},tp$str(){return this.$r()},tp$iter(){return new O(this)},tp$richcompare(e,t){if(this===e&&Sk.misceval.opAllowsEquality(t))return!0;if(!(e instanceof Sk.builtin.bytes))return Sk.builtin.NotImplemented.NotImplemented$;const n=this.v;if(e=e.v,n.length!==e.length&&("Eq"===t||"NotEq"===t))return"Eq"!==t;let r;const i=Math.min(n.length,e.length);for(r=0;r<i&&n[r]===e[r];r++);switch(t){case"Lt":return r===i&&n.length<e.length||n[r]<e[r];case"LtE":return r===i&&n.length<=e.length||n[r]<=e[r];case"Eq":return r===i;case"NotEq":return r<i;case"Gt":return r===i&&n.length>e.length||n[r]>e[r];case"GtE":return r===i&&n.length>=e.length||n[r]>=e[r]}},tp$hash(){return new Sk.builtin.str(this.$jsstr()).tp$hash()},tp$as_sequence_or_mapping:!0,mp$subscript(e){if(Sk.misceval.isIndex(e)){let t=Sk.misceval.asIndexSized(e,Sk.builtin.IndexError);if(void 0!==t){if(0>t&&(t=this.v.length+t),0>t||t>=this.v.length)throw new Sk.builtin.IndexError("index out of range");return new Sk.builtin.int_(this.v[t])}}else if(e instanceof Sk.builtin.slice){const t=[];return e.sssiter$(this.v.length,e=>{t.push(this.v[e])}),new Sk.builtin.bytes(new Uint8Array(t))}throw new Sk.builtin.TypeError("byte indices must be integers or slices, not "+Sk.abstr.typeName(e))},sq$length(){return this.v.length},sq$concat(e){if(!(e instanceof Sk.builtin.bytes))throw new Sk.builtin.TypeError("can't concat "+Sk.abstr.typeName(e)+" to bytes");const t=new Uint8Array(this.v.length+e.v.length);let n;for(n=0;n<this.v.length;n++)t[n]=this.v[n];for(let r=0;r<e.v.length;r++,n++)t[n]=e.v[r];return new Sk.builtin.bytes(t)},sq$repeat(e){if(!Sk.misceval.isIndex(e))throw new Sk.builtin.TypeError("can't multiply sequence by non-int of type '"+Sk.abstr.typeName(e)+"'");const t=(e=Sk.misceval.asIndexSized(e,Sk.builtin.OverflowError))*this.v.length;if(t>Number.MAX_SAFE_INTEGER)throw new Sk.builtin.OverflowError;if(0>=e)return new Sk.builtin.bytes;e=new Uint8Array(t);let n=0;for(;n<t;)for(let t=0;t<this.v.length;t++)e[n++]=this.v[t];return new Sk.builtin.bytes(e)},sq$contains(e){return-1!==this.find$left(e)},tp$as_number:!0,nb$remainder:Sk.builtin.str.prototype.nb$remainder},proto:{$jsstr(){let e="";for(let t=0;t<this.v.length;t++)e+=String.fromCharCode(this.v[t]);return e},get$tgt(e){if(e instanceof Sk.builtin.bytes)return e.v;if(0>(e=Sk.misceval.asIndexOrThrow(e,"argument should be integer or bytes-like object, not {tp$name}"))||255<e)throw new Sk.builtin.ValueError("bytes must be in range(0, 256)");return e},get$raw(e){if(e instanceof Sk.builtin.bytes)return e.v;throw new Sk.builtin.TypeError("a bytes-like object is required, not '"+Sk.abstr.typeName(e)+"'")},get$splitArgs:function(e,t){if(t=0>(t=Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError))?1/0:t,null!==(e=Sk.builtin.checkNone(e)?null:this.get$raw(e))&&!e.length)throw new Sk.builtin.ValueError("empty separator");return{sep:e,maxsplit:t}},find$left:c(!1),find$right:c(!0),find$subleft:function(e,t,n){n=n-e.length+1;let r=t;for(;r<n;){if(e.every((e,t)=>e===this.v[r+t]))return r;r++}return-1},find$subright(e,t,n){let r=n-e.length;for(;r>=t;){if(e.every((e,t)=>e===this.v[r+t]))return r;r--}return-1},$subtype_new(e,t){const n=new this.constructor;return e=Sk.builtin.bytes.prototype.tp$new(e,t),n.v=e.v,n},sk$asarray(){const e=[];return this.v.forEach(t=>{e.push(new Sk.builtin.int_(t))}),e}},flags:{str$encode:o,$decode:a,check$encodeArgs:i},methods:{__getnewargs__:{$meth(){return new Sk.builtin.tuple(new Sk.builtin.bytes(this.v))},$flags:{NoArgs:!0},$textsig:null,$doc:null},capitalize:{$meth(){const e=this.v.length;if(0===e)return new Sk.builtin.bytes(this.v);const t=new Uint8Array(e);let n=this.v[0];t[0]=f(n)?n-32:n;for(let r=1;r<e;r++)n=this.v[r],t[r]=m(n)?n+32:n;return new Sk.builtin.bytes(t)},$flags:{NoArgs:!0},$textsig:null,$doc:"B.capitalize() -> copy of B\n\nReturn a copy of B with only its first character capitalized (ASCII)\nand the rest lower-cased."},center:{$meth:h("center",!1,!0),$flags:{MinArgs:1,MaxArgs:2},$textsig:null,$doc:"B.center(width[, fillchar]) -> copy of B\n\nReturn B centered in a string of length width. Padding is\ndone using the specified fill character (default is a space)."},count:{$meth(e,t,n){e=this.get$tgt(e),({start:t,end:n}=Sk.builtin.slice.startEnd$wrt(this,t,n));let r=0;if("number"==typeof e)for(;t<n;t++)this.v[t]===e&&r++;else{n=n-e.length+1;for(let i=t;i<n;i++)e.every((e,t)=>e===this.v[i+t])&&(r++,i+=e.length-1)}return new Sk.builtin.int_(r)},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"B.count(sub[, start[, end]]) -> int\n\nReturn the number of non-overlapping occurrences of subsection sub in\nbytes B[start:end]. Optional arguments start and end are interpreted\nas in slice notation."},decode:{$meth:a,$flags:{NamedArgs:["encoding","errors"]},$textsig:"($self, /, encoding='utf-8', errors='strict')",$doc:"Decode the bytes using the codec registered for encoding.\n\n encoding\n The encoding with which to decode the bytes.\n errors\n The error handling scheme to use for the handling of decoding errors.\n The default is 'strict' meaning that decoding errors raise a\n UnicodeDecodeError. Other possible values are 'ignore' and 'replace'\n as well as any other name registered with codecs.register_error that\n can handle UnicodeDecodeErrors."},endswith:{$meth:l("endswith",(e,t)=>{const n=e.length-t.length;return 0<=n&&t.every((t,r)=>t===e[n+r])}),$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"B.endswith(suffix[, start[, end]]) -> bool\n\nReturn True if B ends with the specified suffix, False otherwise.\nWith optional start, test B beginning at that position.\nWith optional end, stop comparing B at that position.\nsuffix can also be a tuple of bytes to try."},expandtabs:{$meth(e){e=Sk.misceval.asIndexSized(e,Sk.builtin.OverflowError,"an integer is required (got type {tp$nam})");const t=[];let n=0;for(let i=0;i<this.v.length;i++){var r=this.v[i];9===r?(r=e-n%e,t.push(...Array(r).fill(32)),n+=r):10===r||13===r?(t.push(r),n=0):(t.push(r),n++)}return new Sk.builtin.bytes(new Uint8Array(t))},$flags:{NamedArgs:["tabsize"],Defaults:[8]},$textsig:null,$doc:"B.expandtabs(tabsize=8) -> copy of B\n\nReturn a copy of B where all tab characters are expanded using spaces.\nIf tabsize is not given, a tab size of 8 characters is assumed."},find:{$meth:function(e,t,n){return new Sk.builtin.int_(this.find$left(e,t,n))},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"B.find(sub[, start[, end]]) -> int\n\nReturn the lowest index in B where subsection sub is found,\nsuch that sub is contained within B[start,end]. Optional\narguments start and end are interpreted as in slice notation.\n\nReturn -1 on failure."},hex:{$meth(){let e="";for(let t=0;t<this.v.length;t++)e+=this.v[t].toString(16).padStart(2,"0");return new Sk.builtin.str(e)},$flags:{NoArgs:!0},$textsig:null,$doc:"B.hex() -> string\n\nCreate a string of hexadecimal numbers from a bytes object.\nExample: b'\\xb9\\x01\\xef'.hex() -> 'b901ef'."},index:{$meth:function(e,t,n){if(-1===(e=this.find$left(e,t,n)))throw new Sk.builtin.ValueError("subsection not found");return new Sk.builtin.int_(e)},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"B.index(sub[, start[, end]]) -> int\n\nReturn the lowest index in B where subsection sub is found,\nsuch that sub is contained within B[start,end]. Optional\narguments start and end are interpreted as in slice notation.\n\nRaises ValueError when the subsection is not found."},isalnum:{$meth:b(e=>g(e)||f(e)||m(e)),$flags:{NoArgs:!0},$textsig:null,$doc:"B.isalnum() -> bool\n\nReturn True if all characters in B are alphanumeric\nand there is at least one character in B, False otherwise."},isalpha:{$meth:b(e=>65<=e&&90>=e||97<=e&&122>=e),$flags:{NoArgs:!0},$textsig:null,$doc:"B.isalpha() -> bool\n\nReturn True if all characters in B are alphabetic\nand there is at least one character in B, False otherwise."},isascii:{$meth:b(e=>0<=e&&127>=e,!0),$flags:{NoArgs:!0},$textsig:null,$doc:"B.isascii() -> bool\n\nReturn True if B is empty or all characters in B are ASCII,\nFalse otherwise."},isdigit:{$meth:b(g),$flags:{NoArgs:!0},$textsig:null,$doc:"B.isdigit() -> bool\n\nReturn True if all characters in B are digits\nand there is at least one character in B, False otherwise."},islower:{$meth:v(f,m),$flags:{NoArgs:!0},$textsig:null,$doc:"B.islower() -> bool\n\nReturn True if all cased characters in B are lowercase and there is\nat least one cased character in B, False otherwise."},isspace:{$meth:b(p),$flags:{NoArgs:!0},$textsig:null,$doc:"B.isspace() -> bool\n\nReturn True if all characters in B are whitespace\nand there is at least one character in B, False otherwise."},istitle:{$meth:function(){let e=!1,t=!1;for(let n=0;n<this.v.length;n++){const r=this.v[n];if(m(r)){if(e)return Sk.builtin.bool.false$;t=e=!0}else if(f(r)){if(!e)return Sk.builtin.bool.false$;t=!0}else e=!1}return t?Sk.builtin.bool.true$:Sk.builtin.bool.false$},$flags:{NoArgs:!0},$textsig:null,$doc:"B.istitle() -> bool\n\nReturn True if B is a titlecased string and there is at least one\ncharacter in B, i.e. uppercase characters may only follow uncased\ncharacters and lowercase characters only cased ones. Return False\notherwise."},isupper:{$meth:v(m,f),$flags:{NoArgs:!0},$textsig:null,$doc:"B.isupper() -> bool\n\nReturn True if all cased characters in B are uppercase and there is\nat least one cased character in B, False otherwise."},join:{$meth(e){const t=[];let n=0;return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(e),e=>{if(!(e instanceof Sk.builtin.bytes))throw new Sk.builtin.TypeError("sequence item "+n+": expected a bytes-like object, "+Sk.abstr.typeName(e)+" found");n++,t.length&&t.push(...this.v),t.push(...e.v)}),()=>new Sk.builtin.bytes(new Uint8Array(t)))},$flags:{OneArg:!0},$textsig:"($self, iterable_of_bytes, /)",$doc:"Concatenate any number of bytes objects.\n\nThe bytes whose method is called is inserted in between each pair.\n\nThe result is returned as a new bytes object.\n\nExample: b'.'.join([b'ab', b'pq', b'rs']) -> b'ab.pq.rs'."},ljust:{$meth:h("ljust",!1,!1),$flags:{MinArgs:1,MaxArgs:2},$textsig:null,$doc:"B.ljust(width[, fillchar]) -> copy of B\n\nReturn B left justified in a string of length width. Padding is\ndone using the specified fill character (default is a space)."},lower:{$meth:y(e=>m(e)?e+32:e),$flags:{NoArgs:!0},$textsig:null,$doc:"B.lower() -> copy of B\n\nReturn a copy of B with all ASCII characters converted to lowercase."},lstrip:{$meth:d(!0,!1),$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, bytes=None, /)",$doc:"Strip leading bytes contained in the argument.\n\nIf the argument is omitted or None, strip leading ASCII whitespace."},partition:{$meth:u(!1),$flags:{OneArg:!0},$textsig:"($self, sep, /)",$doc:"Partition the bytes into three parts using the given separator.\n\nThis will search for the separator sep in the bytes. If the separator is found,\nreturns a 3-tuple containing the part before the separator, the separator\nitself, and the part after it.\n\nIf the separator is not found, returns a 3-tuple containing the original bytes\nobject and two empty bytes objects."},replace:{$meth(e,t,n){e=this.get$raw(e),t=this.get$raw(t),n=0>(n=void 0===n?-1:Sk.misceval.asIndexSized(n,Sk.builtin.OverflowError))?1/0:n;const r=[];let i=0;for(var o=0;o<this.v.length&&i<n;){const n=this.find$subleft(e,o,this.v.length);if(-1===n)break;for(;o<n;o++)r.push(this.v[o]);r.push(...t),o=n+e.length,i++}for(;o<this.v.length;o++)r.push(this.v[o]);return new Sk.builtin.bytes(new Uint8Array(r))},$flags:{MinArgs:2,MaxArgs:3},$textsig:"($self, old, new, count=-1, /)",$doc:"Return a copy with all occurrences of substring old replaced by new.\n\n count\n Maximum number of occurrences to replace.\n -1 (the default value) means replace all occurrences.\n\nIf the optional argument count is given, only the first count occurrences are\nreplaced."},rfind:{$meth(e,t,n){return new Sk.builtin.int_(this.find$right(e,t,n))},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"B.rfind(sub[, start[, end]]) -> int\n\nReturn the highest index in B where subsection sub is found,\nsuch that sub is contained within B[start,end]. Optional\narguments start and end are interpreted as in slice notation.\n\nReturn -1 on failure."},rindex:{$meth:function(e,t,n){if(-1===(e=this.find$right(e,t,n)))throw new Sk.builtin.ValueError("subsection not found");return new Sk.builtin.int_(e)},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"B.rindex(sub[, start[, end]]) -> int\n\nReturn the highest index in B where subsection sub is found,\nsuch that sub is contained within B[start,end]. Optional\narguments start and end are interpreted as in slice notation.\n\nRaise ValueError when the subsection is not found."},rjust:{$meth:h("rjust",!0,!1),$flags:{MinArgs:1,MaxArgs:2},$textsig:null,$doc:"B.rjust(width[, fillchar]) -> copy of B\n\nReturn B right justified in a string of length width. Padding is\ndone using the specified fill character (default is a space)"},rpartition:{$meth:u(!0),$flags:{OneArg:!0},$textsig:"($self, sep, /)",$doc:"Partition the bytes into three parts using the given separator.\n\nThis will search for the separator sep in the bytes, starting at the end. If\nthe separator is found, returns a 3-tuple containing the part before the\nseparator, the separator itself, and the part after it.\n\nIf the separator is not found, returns a 3-tuple containing two empty bytes\nobjects and the original bytes object."},rsplit:{$meth:function(e,t){({sep:e,maxsplit:t}=this.get$splitArgs(e,t));const n=[];let r=0,i=this.v.length;if(null!==e){for(;0<=i&&r<t;){const t=this.find$subright(e,0,i);if(-1===t)break;n.push(new Sk.builtin.bytes(this.v.subarray(t+e.length,i))),i=t,r++}n.push(new Sk.builtin.bytes(this.v.subarray(0,i)))}else{for(i--;r<t;){for(;p(this.v[i]);)i--;if(0>i)break;for(e=i+1,i--;0<=i&&!p(this.v[i]);)i--;n.push(new Sk.builtin.bytes(this.v.subarray(i+1,e))),r++}if(0<=i){for(;p(this.v[i]);)i--;0<=i&&n.push(new Sk.builtin.bytes(this.v.subarray(0,i+1)))}}return new Sk.builtin.list(n.reverse())},$flags:{NamedArgs:["sep","maxsplit"],Defaults:[Sk.builtin.none.none$,-1]},$textsig:"($self, /, sep=None, maxsplit=-1)",$doc:"Return a list of the sections in the bytes, using sep as the delimiter.\n\n sep\n The delimiter according which to split the bytes.\n None (the default value) means split on ASCII whitespace characters\n (space, tab, return, newline, formfeed, vertical tab).\n maxsplit\n Maximum number of splits to do.\n -1 (the default value) means no limit.\n\nSplitting is done starting at the end of the bytes and working to the front."},rstrip:{$meth:d(!1,!0),$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, bytes=None, /)",$doc:"Strip trailing bytes contained in the argument.\n\nIf the argument is omitted or None, strip trailing ASCII whitespace."},split:{$meth:function(e,t){({sep:e,maxsplit:t}=this.get$splitArgs(e,t));const n=[],r=this.v.length;let i=0,o=0;if(null!==e){for(;o<r&&i<t;){const t=this.find$subleft(e,o,r);if(-1===t)break;n.push(new Sk.builtin.bytes(this.v.subarray(o,t))),o=t+e.length,i++}n.push(new Sk.builtin.bytes(this.v.subarray(o,r)))}else{for(;i<t;){for(;p(this.v[o]);)o++;if(o===r)break;for(e=o,o++;o<r&&!p(this.v[o]);)o++;n.push(new Sk.builtin.bytes(this.v.subarray(e,o))),i++}if(o<r){for(;p(this.v[o]);)o++;o<r&&n.push(new Sk.builtin.bytes(this.v.subarray(o,r)))}}return new Sk.builtin.list(n)},$flags:{NamedArgs:["sep","maxsplit"],Defaults:[Sk.builtin.none.none$,-1]},$textsig:"($self, /, sep=None, maxsplit=-1)",$doc:"Return a list of the sections in the bytes, using sep as the delimiter.\n\n sep\n The delimiter according which to split the bytes.\n None (the default value) means split on ASCII whitespace characters\n (space, tab, return, newline, formfeed, vertical tab).\n maxsplit\n Maximum number of splits to do.\n -1 (the default value) means no limit."},splitlines:{$meth(e){e=Sk.misceval.isTrue(e);const t=[];let n=0,r=0;const i=this.v.length;for(;r<i;){var o=this.v[r];if(13===o){const i=10===this.v[r+1];o=e?i?r+2:r+1:r,t.push(new Sk.builtin.bytes(this.v.subarray(n,o))),r=n=i?r+2:r+1}else 10===o?(o=e?r+1:r,t.push(new Sk.builtin.bytes(this.v.subarray(n,o))),r=n=r+1):r++}return n<i&&t.push(new Sk.builtin.bytes(this.v.subarray(n,i))),new Sk.builtin.list(t)},$flags:{NamedArgs:["keepends"],Defaults:[!1]},$textsig:"($self, /, keepends=False)",$doc:"Return a list of the lines in the bytes, breaking at line boundaries.\n\nLine breaks are not included in the resulting list unless keepends is given and\ntrue."},startswith:{$meth:l("startswith",(e,t)=>t.length<=e.length&&t.every((t,n)=>t===e[n])),$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"B.startswith(prefix[, start[, end]]) -> bool\n\nReturn True if B starts with the specified prefix, False otherwise.\nWith optional start, test B beginning at that position.\nWith optional end, stop comparing B at that position.\nprefix can also be a tuple of bytes to try."},strip:{$meth:d(!0,!0),$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, bytes=None, /)",$doc:"Strip leading and trailing bytes contained in the argument.\n\nIf the argument is omitted or None, strip leading and trailing ASCII whitespace."},swapcase:{$meth:y(e=>m(e)?e+32:f(e)?e-32:e),$flags:{NoArgs:!0},$textsig:null,$doc:"B.swapcase() -> copy of B\n\nReturn a copy of B with uppercase ASCII characters converted\nto lowercase ASCII and vice versa."},title:{$meth(){const e=this.v.length,t=new Uint8Array(e);let n=!1;for(let r=0;r<e;r++){const e=this.v[r];m(e)?(t[r]=n?e+32:e,n=!0):f(e)?(t[r]=n?e:e-32,n=!0):(t[r]=e,n=!1)}return new Sk.builtin.bytes(t)},$flags:{NoArgs:!0},$textsig:null,$doc:"B.title() -> copy of B\n\nReturn a titlecased version of B, i.e. ASCII words start with uppercase\ncharacters, all remaining cased characters have lowercase."},upper:{$meth:y(e=>f(e)?e-32:e),$flags:{NoArgs:!0},$textsig:null,$doc:"B.upper() -> copy of B\n\nReturn a copy of B with all ASCII characters converted to uppercase."},zfill:{$meth(e){const t=(e=Sk.misceval.asIndexSized(e,Sk.builtin.IndexError))-this.v.length;if(0>=t)return new Sk.builtin.bytes(this.v);const n=new Uint8Array(e);let r,i=0;for(43!==this.v[0]&&45!==this.v[0]||(n[0]=this.v[0],i++),n.fill(48,i,i+t),r=i,i+=t;i<e;i++,r++)n[i]=this.v[r];return new Sk.builtin.bytes(n)},$flags:{OneArg:!0},$textsig:null,$doc:"B.zfill(width) -> copy of B\n\nPad a numeric string B with zeros on the left, to fill a field\nof the specified width. B is never truncated."}},classmethods:{fromhex:{$meth:function(e){function t(t){for(let n=s;n<t;n+=2){let t=e.substr(n,2);if(!r.test(t))throw new Sk.builtin.ValueError("non-hexadecimal number found in fromhex() arg at position "+(n+1));i.push(parseInt(t,16))}}if(!Sk.builtin.checkString(e))throw new Sk.builtin.TypeError("fromhex() argument must be str, not "+Sk.abstr.typeName(e));e=e.$jsstr();const n=/\s+/g,r=/^[abcdefABCDEF0123456789]{2}$/,i=[];let o,s=0;for(;null!==(o=n.exec(e));)t(o.index),s=n.lastIndex;return t(e.length),new this(i)},$flags:{OneArg:!0},$textsig:"($type, string, /)",$doc:"Create a bytes object from a string of hexadecimal numbers.\n\nSpaces between two numbers are accepted.\nExample: bytes.fromhex('B9 01EF') -> b'\\\\xb9\\\\x01\\\\xef'."}}});var O=Sk.abstr.buildIteratorClass("bytes_iterator",{constructor:function(e){this.$index=0,this.$seq=e.v},iternext(){const e=this.$seq[this.$index++];if(void 0!==e)return new Sk.builtin.int_(e)},methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$acceptable_as_base_class:!1}});Sk.exportSymbol("Sk.builtin.bytes",Sk.builtin.bytes)},function(e,t,n){(function(e){!function(e){function t(){}function n(){}var r=String.fromCharCode,i={}.toString,o=i.call(e.SharedArrayBuffer),s=i(),a=e.Uint8Array,l=a||Array,c=a?ArrayBuffer:l,u=c.isView||function(e){return e&&"length"in e},d=i.call(c.prototype);c=n.prototype;var h=e.TextEncoder,p=new(a?Uint16Array:l)(32);t.prototype.decode=function(e){if(!u(e)){var t=i.call(e);if(t!==d&&t!==o&&t!==s)throw TypeError("Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");e=a?new l(e):e||[]}for(var n,c,h,f=t="",m=0,g=0|e.length,b=g-32|0,v=0,y=0,S=0,_=-1;m<g;){for(n=m<=b?32:g-m|0;S<n;m=m+1|0,S=S+1|0){switch((c=255&e[m])>>4){case 15:if(2!=(h=255&e[m=m+1|0])>>6||247<c){m=m-1|0;break}v=(7&c)<<6|63&h,y=5,c=256;case 14:v<<=6,v|=(15&c)<<6|63&(h=255&e[m=m+1|0]),y=2==h>>6?y+4|0:24,c=c+256&768;case 13:case 12:v<<=6,v|=(31&c)<<6|63&(h=255&e[m=m+1|0]),y=y+7|0,m<g&&2==h>>6&&v>>y&&1114112>v?(c=v,0<=(v=v-65536|0)&&(_=55296+(v>>10)|0,c=56320+(1023&v)|0,31>S?(p[S]=_,S=S+1|0,_=-1):(h=_,_=c,c=h))):(m=m-(c>>=8)-1|0,c=65533),v=y=0,n=m<=b?32:g-m|0;default:p[S]=c;continue;case 11:case 10:case 9:case 8:}p[S]=65533}if(f+=r(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],p[9],p[10],p[11],p[12],p[13],p[14],p[15],p[16],p[17],p[18],p[19],p[20],p[21],p[22],p[23],p[24],p[25],p[26],p[27],p[28],p[29],p[30],p[31]),32>S&&(f=f.slice(0,S-32|0)),m<g){if(p[0]=_,S=~_>>>31,_=-1,f.length<t.length)continue}else-1!==_&&(f+=r(_));t+=f,f=""}return t},c.encode=function(e){var t,n=0|(e=void 0===e?"":""+e).length,r=new l(8+(n<<1)|0),i=0,o=!a;for(t=0;t<n;t=t+1|0,i=i+1|0){var s=0|e.charCodeAt(t);if(127>=s)r[i]=s;else{if(2047>=s)r[i]=192|s>>6;else{e:{if(55296<=s)if(56319>=s){var c=0|e.charCodeAt(t=t+1|0);if(56320<=c&&57343>=c){if(65535<(s=(s<<10)+c-56613888|0)){r[i]=240|s>>18,r[i=i+1|0]=128|s>>12&63,r[i=i+1|0]=128|s>>6&63,r[i=i+1|0]=128|63&s;continue}break e}s=65533}else 57343>=s&&(s=65533);!o&&t<<1<i&&t<<1<(i-7|0)&&(o=!0,(c=new l(3*n)).set(r),r=c)}r[i]=224|s>>12,r[i=i+1|0]=128|s>>6&63}r[i=i+1|0]=128|63&s}}return a?r.subarray(0,i):r.slice(0,i)},h||(e.TextDecoder=t,e.TextEncoder=n)}(void 0===e?"undefined"==typeof self?this:self:e)}).call(this,n(0))},function(e,t){Sk.builtin.tuple=Sk.abstr.buildNativeClass("tuple",{constructor:function(e){void 0===e?e=[]:Array.isArray(e)||(e=Sk.misceval.arrayFromIterable(e)),Sk.asserts.assert(this instanceof Sk.builtin.tuple,"bad call to tuple, use 'new' with an Array of python objects"),this.v=e,this.in$repr=!1},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,tp$doc:"Built-in immutable sequence.\n\nIf no argument is given, the constructor returns an empty tuple.\nIf iterable is specified the tuple is initialized from iterable's items.\n\nIf the argument is a tuple, the return value is the same object.",$r(){if(this.in$repr)return new Sk.builtin.str("(...)");this.in$repr=!0;let e=this.v.map(e=>Sk.misceval.objectRepr(e));return this.in$repr=!1,e=e.join(", "),1===this.v.length&&(e+=","),new Sk.builtin.str("("+e+")")},tp$new(e,t){return this!==Sk.builtin.tuple.prototype?this.$subtype_new(e,t):(Sk.abstr.checkNoKwargs("tuple",t),Sk.abstr.checkArgsLen("tuple",e,0,1),void 0===(e=e[0])?new Sk.builtin.tuple([]):e.constructor===Sk.builtin.tuple?e:Sk.misceval.chain(Sk.misceval.arrayFromIterable(e,!0),e=>new Sk.builtin.tuple(e)))},tp$hash(){let e,t=3430008,n=1000003;const r=this.v.length;for(let i=0;i<r;++i){if(e=Sk.abstr.objectHash(this.v[i]),-1===e)return-1;t=(t^e)*n,n+=82520+r+r}return t+=97531,-1===t&&(t=-2),0|t},tp$richcompare:Sk.generic.seqCompare,tp$iter(){return new n(this)},mp$subscript(e){if(Sk.misceval.isIndex(e)){if(0>(e=Sk.misceval.asIndexSized(e))&&(e=this.v.length+e),0>e||e>=this.v.length)throw new Sk.builtin.IndexError("tuple index out of range");return this.v[e]}if(e instanceof Sk.builtin.slice){const t=[];return e.sssiter$(this.v.length,e=>{t.push(this.v[e])}),new Sk.builtin.tuple(t)}throw new Sk.builtin.TypeError("tuple indices must be integers or slices, not "+Sk.abstr.typeName(e))},sq$length(){return this.v.length},sq$repeat(e){if(1===(e=Sk.misceval.asIndexSized(e,Sk.builtin.OverflowError))&&this.constructor===Sk.builtin.tuple)return this;const t=[];for(let n=0;n<e;n++)for(let e=0;e<this.v.length;e++)t.push(this.v[e]);return new Sk.builtin.tuple(t)},sq$concat(e){if(!(e instanceof Sk.builtin.tuple))throw new Sk.builtin.TypeError("can only concatenate tuple (not '"+Sk.abstr.typeName(e)+"') to tuple");return new Sk.builtin.tuple(this.v.concat(e.v))},sq$contains(e){for(let t=this.tp$iter(),n=t.tp$iternext();void 0!==n;n=t.tp$iternext())if(n===e||Sk.misceval.richCompareBool(n,e,"Eq"))return!0;return!1}},proto:{$subtype_new(e,t){return t=new this.constructor,e=Sk.builtin.tuple.prototype.tp$new(e),t.v=e.v,t},sk$asarray(){return this.v.slice(0)}},methods:{__getnewargs__:{$meth(){return new Sk.builtin.tuple(this.v.slice(0))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:null},index:{$meth(e,t,n){if(void 0!==t&&!Sk.misceval.isIndex(t)||void 0!==n&&!Sk.misceval.isIndex(n))throw new Sk.builtin.TypeError("slice indices must be integers or have an __index__ method");({start:t,end:n}=Sk.builtin.slice.startEnd$wrt(this,t,n));const r=this.v;for(;t<n;t++)if(r[t]===e||Sk.misceval.richCompareBool(r[t],e,"Eq"))return new Sk.builtin.int_(t);throw new Sk.builtin.ValueError("tuple.index(x): x not in tuple")},$flags:{MinArgs:1,MaxArgs:3},$textsig:"($self, value, start=0, stop=sys.maxsize, /)",$doc:"Return first index of value.\n\nRaises ValueError if the value is not present."},count:{$meth(e){const t=this.v.length,n=this.v;let r=0;for(let i=0;i<t;++i)(n[i]===e||Sk.misceval.richCompareBool(n[i],e,"Eq"))&&(r+=1);return new Sk.builtin.int_(r)},$flags:{OneArg:!0},$textsig:"($self, value, /)",$doc:"Return number of occurrences of value."}}}),Sk.exportSymbol("Sk.builtin.tuple",Sk.builtin.tuple);var n=Sk.abstr.buildIteratorClass("tuple_iterator",{constructor:function(e){this.$index=0,this.$seq=e.sk$asarray()},iternext:Sk.generic.iterNextWithArray,methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$acceptable_as_base_class:!1}})},function(e,t){function n(e){let t=e.$savedKeyHash;return void 0!==t?t:t=Sk.abstr.objectHash(e)}function r(e){return new Sk.builtin.set(Sk.misceval.arrayFromIterable(e))}function i(e,t){for(let n=Sk.abstr.iter(e),r=n.tp$iternext();void 0!==r;r=n.tp$iternext())if(!Sk.abstr.sequenceContains(t,r))return!1;return!0}function o(e,t,n){const i={constructor:function(e){if(1!==arguments.length)throw new Sk.builtin.TypeError("cannot create '"+Sk.abstr.typeName(this)+"' instances");this.dict=e,this.in$repr=!1}};return i.slots=Object.assign(t,l),i.methods={isdisjoint:{$meth(e){const t=r(this);return t.isdisjoint.$meth.call(t,e)},$flags:{OneArg:!0},$textsig:null,$doc:"Return True if the view and the given iterable have a null intersection."},__reversed__:{$meth:n,$flags:{NoArgs:!0},$textsig:null,$doc:"Return a reverse iterator over the dict keys."}},i.flags={sk$acceptable_as_base:!1},"dict_values"===e&&(delete i.slots.tp$as_number,delete i.slots.tp$richcompare),Sk.abstr.buildNativeClass(e,i)}function s(e,t,n){return Sk.abstr.buildIteratorClass(e,{constructor:function(e){this.$index=0,this.$orig=e,this.tp$iternext=()=>(this.$seq=e.$items(),this.$version=e.$version,n&&(this.$seq=this.$seq.reverse()),this.tp$iternext=this.constructor.prototype.tp$iternext,this.tp$iternext())},iternext:t,methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$acceptable_as_base_class:!1},proto:{next$item:a}})}function a(){if(this.$version!==this.$orig.$version){if(this.$len!==this.$orig.get$size())throw new Sk.builtin.RuntimeError("dict changed size during iteration");throw new Sk.builtin.RuntimeError("dictionary keys changed during iteration")}return this.$seq[this.$index++]}Sk.builtin.dict=Sk.abstr.buildNativeClass("dict",{constructor:function(e){void 0===e&&(e=[]),Sk.asserts.assert(Array.isArray(e)&&0==e.length%2&&this instanceof Sk.builtin.dict,"bad call to dict constructor"),this.size=0,this.entries=Object.create(null),this.buckets={};for(let t=0;t<e.length;t+=2)this.set$item(e[t],e[t+1]);this.in$repr=!1,this.$version=0},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,tp$as_number:!0,tp$hash:Sk.builtin.none.none$,tp$doc:"dict() -> new empty dictionary\ndict(mapping) -> new dictionary initialized from a mapping object's\n (key, value) pairs\ndict(iterable) -> new dictionary initialized as if via:\n d = {}\n for k, v in iterable:\n d[k] = v\ndict(**kwargs) -> new dictionary initialized with the name=value pairs\n in the keyword argument list. For example: dict(one=1, two=2)",$r(){if(this.in$repr)return new Sk.builtin.str("{...}");this.in$repr=!0;const e=this.$items().map(([e,t])=>Sk.misceval.objectRepr(e)+": "+Sk.misceval.objectRepr(t));return this.in$repr=!1,new Sk.builtin.str("{"+e.join(", ")+"}")},tp$new:Sk.generic.new,tp$init(e,t){return this.update$common(e,t,"dict")},tp$iter(){return new h(this)},tp$richcompare(e,t){let n;if(!(e instanceof Sk.builtin.dict)||"Eq"!==t&&"NotEq"!==t)return Sk.builtin.NotImplemented.NotImplemented$;if(e===this)n=!0;else if(this.size!==e.size)n=!1;else{let t;n=this.$items().every(([n,r])=>(t=e.mp$lookup(n),void 0!==t&&(t===r||Sk.misceval.richCompareBool(r,t,"Eq"))))}return"Eq"===t?n:!n},nb$or(e){if(!(e instanceof Sk.builtin.dict))return Sk.builtin.NotImplemented.NotImplemented$;const t=this.dict$copy();return t.dict$merge(e),t},nb$reflected_or(e){return e instanceof Sk.builtin.dict?((e=e.dict$copy()).dict$merge(this),e):Sk.builtin.NotImplemented.NotImplemented$},nb$inplace_or(e){return Sk.misceval.chain(this.update$onearg(e),()=>this)},sq$length(){return this.get$size()},sq$contains(e){return void 0!==this.mp$lookup(e)},mp$subscript(e,t){var n=this.mp$lookup(e);if(void 0!==n)return n;if(void 0!==(n=Sk.abstr.lookupSpecial(this,Sk.builtin.str.$missing)))return e=Sk.misceval.callsimOrSuspendArray(n,[e]),t?e:Sk.misceval.retryOptionalSuspensionOrThrow(e);throw new Sk.builtin.KeyError(e)},mp$ass_subscript(e,t){if(void 0===t){if(void 0===this.pop$item(e))throw new Sk.builtin.KeyError(e)}else this.set$item(e,t)}},methods:{__reversed__:{$meth(){return new m(this)},$flags:{NoArgs:!0},$textsig:null,$doc:"Return a reverse iterator over the dict keys."},get:{$meth(e,t){return this.mp$lookup(e)||t||Sk.builtin.none.none$},$flags:{MinArgs:1,MaxArgs:2},$textsig:"($self, key, default=None, /)",$doc:"Return the value for key if key is in the dictionary, else default."},setdefault:{$meth(e,t){let r;const i=n(e);return r="string"==typeof i?this.entries[i]:this.get$bucket_item(e,i),void 0!==r?r[1]:(t=t||Sk.builtin.none.none$,"string"==typeof i?this.entries[i]=[e,t]:this.set$bucket_item(e,t,i),this.size++,this.$version++,t)},$flags:{MinArgs:1,MaxArgs:2},$textsig:"($self, key, default=None, /)",$doc:"Insert key with a value of default if key is not in the dictionary.\n\nReturn the value for key if key is in the dictionary, else default."},pop:{$meth(e,t){const n=this.pop$item(e);if(void 0!==n)return n[1];if(void 0!==t)return t;throw new Sk.builtin.KeyError(e)},$flags:{MinArgs:1,MaxArgs:2},$textsig:null,$doc:"D.pop(k[,d]) -> v, remove specified key and return the corresponding value.\nIf key is not found, d is returned if given, otherwise KeyError is raised"},popitem:{$meth(){const e=this.get$size();if(0===e)throw new Sk.builtin.KeyError("popitem(): dictionary is empty");const[t,n]=this.$items()[e-1];return this.pop$item(t),new Sk.builtin.tuple([t,n])},$flags:{NoArgs:!0},$textsig:null,$doc:"D.popitem() -> (k, v), remove and return some (key, value) pair as a\n2-tuple; but raise KeyError if D is empty."},keys:{$meth(){return new c(this)},$flags:{NoArgs:!0},$textsig:null,$doc:"D.keys() -> a set-like object providing a view on D's keys"},items:{$meth(){return new d(this)},$flags:{NoArgs:!0},$textsig:null,$doc:"D.items() -> a set-like object providing a view on D's items"},values:{$meth(){return new u(this)},$flags:{NoArgs:!0},$textsig:null,$doc:"D.values() -> an object providing a view on D's values"},update:{$meth(e,t){return Sk.misceval.chain(this.update$common(e,t,"update"),()=>Sk.builtin.none.none$)},$flags:{FastCall:!0},$textsig:null,$doc:"D.update([E, ]**F) -> None. Update D from dict/iterable E and F.\nIf E is present and has a .keys() method, then does: for k in E: D[k] = E[k]\nIf E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v\nIn either case, this is followed by: for k in F: D[k] = F[k]"},clear:{$meth(){this.size=0,this.$version++,this.entries=Object.create(null),this.buckets={}},$flags:{NoArgs:!0},$textsig:null,$doc:"D.clear() -> None. Remove all items from D."},copy:{$meth(){return this.dict$copy()},$flags:{NoArgs:!0},$textsig:null,$doc:"D.copy() -> a shallow copy of D"}},classmethods:{fromkeys:{$meth:function(e,t){t=t||Sk.builtin.none.none$;let n=this===Sk.builtin.dict?new this:this.tp$call([],[]);return Sk.misceval.chain(n,r=>(n=r,Sk.misceval.iterFor(Sk.abstr.iter(e),e=>n.mp$ass_subscript(e,t,!0))),()=>n)},$flags:{MinArgs:1,MaxArgs:2},$textsig:"($type, iterable, value=None, /)",$doc:"Create a new dictionary with keys from iterable and values set to value."}},proto:{quick$lookup:function(e){if(void 0!==(e=this.entries[e.$savedKeyHash]))return e[1]},mp$lookup:function(e){const t=n(e);if(void 0!==(e="string"==typeof t?this.entries[t]:this.get$bucket_item(e,t)))return e[1]},get$size(){return this.size},sk$asarray(){return Object.values(this.entries).map(e=>e[0])},update$common:function(e,t,n){let r;return Sk.abstr.checkArgsLen(n,e,0,1),void 0!==(e=e[0])&&(r=this.update$onearg(e)),Sk.misceval.chain(r,()=>{if(t)for(let e=0;e<t.length;e+=2)this.set$item(new Sk.builtin.str(t[e]),t[e+1])})},update$onearg(e){return e instanceof Sk.builtin.dict||void 0!==Sk.abstr.lookupSpecial(e,Sk.builtin.str.$keys)?this.dict$merge(e):this.dict$merge_seq(e)},dict$copy(){const e=new Sk.builtin.dict([]);e.size=this.size;var t=Object.entries(this.entries);for(var n in t){var r=t[n][1];e.entries[t[n][0]]=[r[0],r[1]]}for(let i in this.buckets)for(n=this.buckets[i],e.buckets[i]=t=[],r=0;r<n.length;r++)t.push(e.entries["#"+i+"_"+r]);return e},$items(){return Object.values(this.entries)},set$item:function(e,t){const r=n(e);let i;"string"==typeof r?(i=this.entries[r],void 0===i?(this.entries[r]=[e,t],this.size++,this.$version++):i[1]=t):(i=this.get$bucket_item(e,r),void 0===i?(this.set$bucket_item(e,t,r),this.size++,this.$version++):i[1]=t)},get$bucket_item:function(e,t){if(void 0!==(t=this.buckets[t]))for(let r=0;r<t.length;r++){var n=t[r];if(void 0!==n&&(n[0]===e||Sk.misceval.richCompareBool(e,n[0],"Eq")))return n}},pop$bucket_item:function(e,t){const n=this.buckets[t];let r;if(void 0!==n)for(let i=0;i<n.length;i++)if(r=n[i],void 0!==r&&(r[0]===e||Sk.misceval.richCompareBool(e,r[0],"Eq")))return delete this.entries["#"+t+"_"+i],n[i]=void 0,n.every(e=>void 0===e)&&delete this.buckets[t],r},set$bucket_item:function(e,t,n){let r=this.buckets[n];e=[e,t],void 0===r?(this.buckets[n]=[e],n="#"+n+"_0"):-1!==(t=r.indexOf(void 0))?(n="#"+n+"_"+t,r[t]=e):(n="#"+n+"_"+r.length,r.push(e)),this.entries[n]=e},pop$item:function(e){const t=n(e);if("string"==typeof t?(e=this.entries[t],delete this.entries[t]):e=this.pop$bucket_item(e,t),void 0!==e)return this.size--,this.$version++,e},dict$merge:function(e){if(e.tp$iter!==Sk.builtin.dict.prototype.tp$iter)return t=Sk.abstr.lookupSpecial(e,Sk.builtin.str.$keys),Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(t,[]),t=>Sk.misceval.iterFor(Sk.abstr.iter(t),t=>Sk.misceval.chain(e.mp$subscript(t,!0),e=>{this.set$item(t,e)})));var t=e.tp$iter();for(let n=t.tp$iternext();void 0!==n;n=t.tp$iternext()){const t=e.mp$subscript(n);this.set$item(n,t)}},dict$merge_seq:function(e){let t=0;return Sk.misceval.iterFor(Sk.abstr.iter(e),e=>{if(!Sk.builtin.checkIterable(e))throw new Sk.builtin.TypeError("cannot convert dictionary update sequence element #"+t+" to a sequence");if(2!==(e=Sk.misceval.arrayFromIterable(e)).length)throw new Sk.builtin.ValueError("dictionary update sequence element #"+t+" has length "+e.length+"; 2 is required");this.set$item(e[0],e[1]),t++})}}});const l={tp$getattr:Sk.generic.getAttr,tp$as_number:!0,tp$as_sequence_or_mapping:!0,tp$hash:Sk.builtin.none.none$,$r(){if(this.in$repr)return new Sk.builtin.str("...");this.in$repr=!0;let e=Sk.misceval.arrayFromIterable(this);return e=e.map(e=>Sk.misceval.objectRepr(e)),this.in$repr=!1,new Sk.builtin.str(Sk.abstr.typeName(this)+"(["+e.join(", ")+"])")},tp$richcompare(e,t){if(!(Sk.builtin.checkAnySet(e)||e instanceof c||e instanceof d))return Sk.builtin.NotImplemented.NotImplemented$;const n=this.sq$length(),r=e.sq$length();switch(t){case"NotEq":case"Eq":let o;return this===e?o=!0:n===r&&(o=i(this,e)),"NotEq"===t?!o:o;case"Lt":return n<r&&i(this,e);case"LtE":return n<=r&&i(this,e);case"Gt":return n>r&&i(e,this);case"GtE":return n>=r&&i(e,this)}},nb$subtract(e){const t=r(this);return t.difference.$meth.call(t,e)},nb$and(e){const t=r(this);return t.intersection.$meth.call(t,e)},nb$or(e){const t=r(this);return t.union.$meth.call(t,e)},nb$xor(e){const t=r(this);return t.symmetric_difference.$meth.call(t,e)},sq$length(){return this.dict.get$size()}};var c=o("dict_keys",{sq$contains(e){return void 0!==this.dict.mp$lookup(e)},tp$iter(){return new h(this.dict)}},(function(){return new m(this.dict)})),u=o("dict_values",{tp$iter(){return new f(this.dict)}},(function(){return new b(this.dict)})),d=o("dict_items",{sq$contains(e){if(!(e instanceof Sk.builtin.tuple&&2===e.sq$length()))return!1;var t=e.mp$subscript(new Sk.builtin.int_(0));return e=e.mp$subscript(new Sk.builtin.int_(1)),void 0!==(t=this.dict.mp$lookup(t))&&(t===e||Sk.misceval.richCompareBool(t,e,"Eq"))},tp$iter(){return new p(this.dict)}},(function(){return new g(this.dict)})),h=s("dict_keyiterator",(function(){const e=this.next$item();return e&&e[0]})),p=s("dict_itemiterator",(function(){const e=this.next$item();return e&&new Sk.builtin.tuple([e[0],e[1]])})),f=s("dict_valueiterator",(function(){const e=this.next$item();return e&&e[1]})),m=s("dict_reversekeyiterator",h.prototype.tp$iternext,!0),g=s("dict_reverseitemiterator",p.prototype.tp$iternext,!0),b=s("dict_reversevalueiterator",f.prototype.tp$iternext,!0);Sk.builtin.dict.py2$methods={has_key:{$name:"has_key",$flags:{OneArg:!0},$meth(e){return new Sk.builtin.bool(this.sq$contains(e))},$doc:"D.has_key(k) -> True if D has a key k, else False"},keys:{$name:"keys",$meth(){return new Sk.builtin.list(this.sk$asarray())},$flags:{NoArgs:!0},$textsig:null,$doc:"D.keys() -> a set-like object providing a view on D's keys"},items:{$name:"items",$meth(){return new Sk.builtin.list(this.$items().map(([e,t])=>new Sk.builtin.tuple([e,t])))},$flags:{NoArgs:!0},$textsig:null,$doc:"D.items() -> a set-like object providing a view on D's items"},values:{$name:"values",$meth(){return new Sk.builtin.list(this.$items().map(([,e])=>e))},$flags:{NoArgs:!0},$textsig:null,$doc:"D.values() -> an object providing a view on D's values"}}},function(e,t){Sk.builtin.mappingproxy=Sk.abstr.buildNativeClass("mappingproxy",{constructor:function(e){Sk.asserts.assert(this instanceof Sk.builtin.mappingproxy,"bad call to mapping proxy, use 'new'"),this.mapping=new Sk.builtin.dict([]),void 0!==e&&function(e,t){Object.defineProperties(e,{entries:{get:()=>{const e=Object.create(null);return Object.entries(t).forEach(([t,n])=>{(t=Sk.unfixReserved(t)).includes("$")||(t=new Sk.builtin.str(t),e[t.$savedKeyHash]=[t,n])}),e},configurable:!0},size:{get:()=>Object.keys(t).map(e=>Sk.unfixReserved(e)).filter(e=>!e.includes("$")).length,configurable:!0}})}(this.mapping,e)},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,tp$hash:Sk.builtin.none.none$,tp$new(e,t){if(Sk.abstr.checkNoKwargs("mappingproxy",t),Sk.abstr.checkOneArg("mappingproxy",e,t),e=e[0],!Sk.builtin.checkMapping(e))throw new Sk.builtin.TypeError("mappingproxy() argument must be a mapping, not "+Sk.abstr.typeName(e));return(t=new Sk.builtin.mappingproxy).mapping=e,t},tp$richcompare(e,t){return Sk.misceval.richCompareBool(this.mapping,e,t)},tp$str(){return this.mapping.tp$str()},$r(){return new Sk.builtin.str("mappingproxy("+Sk.misceval.objectRepr(this.mapping)+")")},mp$subscript(e,t){return this.mapping.mp$subscript(e,t)},sq$contains(e){return this.mapping.sq$contains(e)},sq$length(){return this.mapping.sq$length()},tp$iter(){return this.mapping.tp$iter()},tp$as_number:!0,nb$or(e){return e instanceof Sk.builtin.mappingproxy&&(e=e.mapping),Sk.abstr.numberBinOp(this.mapping,e,"BitOr")},nb$reflected_or(e){return e instanceof Sk.builtin.mappingproxy&&(e=e.mapping),Sk.abstr.numberBinOp(e,this.mapping,"BitOr")},nb$inplace_or(e){throw new Sk.builtin.TypeError("'|=' is not supported by "+Sk.abstr.typeName(this)+"; use '|' instead")}},methods:{get:{$meth(e,t){return Sk.misceval.callsimArray(this.mapping.tp$getattr(this.str$get),e,t)},$flags:{FastCall:!0},$textsig:null,$doc:"D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."},keys:{$meth(){return Sk.misceval.callsimArray(this.mapping.tp$getattr(this.str$keys),[])},$flags:{NoArgs:!0},$textsig:null,$doc:"D.keys() -> a set-like object providing a view on D's keys"},items:{$meth(){return Sk.misceval.callsimArray(this.mapping.tp$getattr(this.str$items),[])},$flags:{NoArgs:!0},$textsig:null,$doc:"D.items() -> a set-like object providing a view on D's items"},values:{$meth(){return Sk.misceval.callsimArray(this.mapping.tp$getattr(this.str$values),[])},$flags:{NoArgs:!0},$textsig:null,$doc:"D.values() -> a set-like object providing a view on D's values"},copy:{$meth(){return Sk.misceval.callsimArray(this.mapping.tp$getattr(this.str$copy),[])},$flags:{NoArgs:!0},$textsig:null,$doc:"D.copy() -> a shallow copy of D"}},proto:{str$get:new Sk.builtin.str("get"),str$copy:new Sk.builtin.str("copy"),str$keys:new Sk.builtin.str("keys"),str$items:new Sk.builtin.str("items"),str$values:new Sk.builtin.str("values"),mp$lookup(e){return this.mapping.mp$lookup(e)}},flags:{sk$acceptable_as_base_class:!1}})},function(e,t){Sk.builtin.property=Sk.abstr.buildNativeClass("property",{constructor:function(e,t,n,r){this.prop$get=e||Sk.builtin.none.none$,this.prop$set=t||Sk.builtin.none.none$,this.prop$del=n||Sk.builtin.none.none$,this.prop$doc=r||e&&e.$doc||Sk.builtin.none.none$},slots:{tp$getattr:Sk.generic.getAttr,tp$new:Sk.generic.new,tp$init(e,t){e=Sk.abstr.copyKeywordsToNamedArgs("property",["fget","fset","fdel","doc"],e,t,Array(4).fill(Sk.builtin.none.none$)),this.prop$get=e[0],this.prop$set=e[1],this.prop$del=e[2],Sk.builtin.checkNone(e[3])?Sk.builtin.checkNone(e[0])||(this.prop$doc=e[0].$doc||e[3]):this.prop$doc=e[3]},tp$doc:"Property attribute.\n\n fget\n function to be used for getting an attribute value\n fset\n function to be used for setting an attribute value\n fdel\n function to be used for del'ing an attribute\n doc\n docstring\n\nTypical use is to define a managed attribute x:\n\nclass C(object):\n def getx(self): return self._x\n def setx(self, value): self._x = value\n def delx(self): del self._x\n x = property(getx, setx, delx, 'I'm the 'x' property.')\n\nDecorators make defining new properties or modifying existing ones easy:\n\nclass C(object):\n @property\n def x(self):\n 'I am the 'x' property.'\n return self._x\n @x.setter\n def x(self, value):\n self._x = value\n @x.deleter\n def x(self):\n del self._x",tp$descr_get(e,t){if(null===e)return this;if(void 0===this.prop$get)throw new Sk.builtin.AttributeError("unreadable attribute");return Sk.misceval.callsimOrSuspendArray(this.prop$get,[e])},tp$descr_set(e,t){let n;if(n=null==t?this.prop$del:this.prop$set,Sk.builtin.checkNone(n))throw new Sk.builtin.AttributeError("can't "+(null==t?"delete":"set")+" attribute");if(!n.tp$call)throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(n)+"' is not callable");return null==t?n.tp$call([e]):n.tp$call([e,t])}},methods:{getter:{$meth(e){return new Sk.builtin.property(e,this.prop$set,this.prop$del,this.prop$doc)},$flags:{OneArg:!0}},setter:{$meth(e){return new Sk.builtin.property(this.prop$get,e,this.prop$del,this.prop$doc)},$flags:{OneArg:!0}},deleter:{$meth(e){return new Sk.builtin.property(this.prop$get,this.prop$set,e,this.prop$doc)},$flags:{OneArg:!0}}},getsets:{fget:{$get(){return this.prop$get}},fset:{$get(){return this.prop$set}},fdel:{$get(){return this.prop$del}},__doc__:{$get(){return this.prop$doc},$set(e){this.prop$doc=e=e||Sk.builtin.none.none$}}}}),Sk.builtin.classmethod=Sk.abstr.buildNativeClass("classmethod",{constructor:function(e){this.cm$callable=e,this.$d=new Sk.builtin.dict},slots:{tp$getattr:Sk.generic.getAttr,tp$new:Sk.generic.new,tp$init(e,t){Sk.abstr.checkNoKwargs("classmethod",t),Sk.abstr.checkArgsLen("classmethod",e,1,1),this.cm$callable=e[0]},tp$doc:"classmethod(function) -> method\n\nConvert a function to be a class method.\n\nA class method receives the class as implicit first argument,\njust like an instance method receives the instance.\nTo declare a class method, use this idiom:\n\n class C:\n @classmethod\n def f(cls, arg1, arg2, ...):\n ...\n\nIt can be called either on the class (e.g. C.f()) or on an instance\n(e.g. C().f()). The instance is ignored except for its class.\nIf a class method is called for a derived class, the derived class\nobject is passed as the implied first argument.\n\nClass methods are different than C++ or Java static methods.\nIf you want those, see the staticmethod builtin.",tp$descr_get(e,t){const n=this.cm$callable;if(void 0===n)throw new Sk.builtin.RuntimeError("uninitialized classmethod object");return void 0===t&&(t=e.ob$type),(e=n.tp$descr_get)?e.call(n,t):new Sk.builtin.method(n,t)}},getsets:{__func__:{$get(){return this.cm$callable}},__dict__:Sk.generic.getSetDict}}),Sk.builtin.staticmethod=Sk.abstr.buildNativeClass("staticmethod",{constructor:function(e){this.sm$callable=e,this.$d=new Sk.builtin.dict},slots:{tp$getattr:Sk.generic.getAttr,tp$new:Sk.generic.new,tp$init(e,t){Sk.abstr.checkNoKwargs("staticmethod",t),Sk.abstr.checkArgsLen("staticmethod",e,1,1),this.sm$callable=e[0]},tp$doc:"staticmethod(function) -> method\n\nConvert a function to be a static method.\n\nA static method does not receive an implicit first argument.\nTo declare a static method, use this idiom:\n\n class C:\n @staticmethod\n def f(arg1, arg2, ...):\n ...\n\nIt can be called either on the class (e.g. C.f()) or on an instance\n(e.g. C().f()). The instance is ignored except for its class.\n\nStatic methods in Python are similar to those found in Java or C++.\nFor a more advanced concept, see the classmethod builtin.",tp$descr_get(e,t){if(void 0===this.sm$callable)throw new Sk.builtin.RuntimeError("uninitialized staticmethod object");return this.sm$callable}},getsets:{__func__:{$get(){return this.sm$callable}},__dict__:Sk.generic.getSetDict}})},function(e,t){function n(e,t){return function(n){if(n instanceof Sk.builtin.int_){let r=this.v;if(n=n.v,"number"==typeof r&&"number"==typeof n){const t=e(r,n);if(c(t))return new Sk.builtin.int_(t)}return r=d(r),n=d(n),new Sk.builtin.int_(t(r,n))}return Sk.builtin.NotImplemented.NotImplemented$}}function r(e,t){return function(n){if(n instanceof Sk.builtin.int_){let r=this.v;return n=n.v,"number"==typeof r&&"number"==typeof n?e(r,n):(r=d(r),n=d(n),t(r,n))}return Sk.builtin.NotImplemented.NotImplemented$}}function i(e,t){return function(){const n=this.v;return"number"==typeof n?new Sk.builtin.int_(e(n)):new Sk.builtin.int_(t(n))}}function o(){return new Sk.builtin.int_(this.v)}function s(e,t){return function(n){if(n instanceof Sk.builtin.int_){let r=this.v;if(0===(n=n.v))throw new Sk.builtin.ZeroDivisionError("integer division or modulo by zero");return"number"==typeof r&&"number"==typeof n?new Sk.builtin.int_(e(r,n)):(r=d(r),n=d(n),new Sk.builtin.int_(JSBI.numberIfSafe(t(r,n))))}return Sk.builtin.NotImplemented.NotImplemented$}}function a(e,t){return function(n){if(n instanceof Sk.builtin.int_){let r=this.v;if(n=n.v,0===r)return new Sk.builtin.int_(this.v);if("number"==typeof n){if(0>n)throw new Sk.builtin.ValueError("negative shift count");if("number"==typeof r){const t=e(r,n);if(void 0!==t)return new Sk.builtin.int_(t)}n=JSBI.BigInt(n)}else if(JSBI.lessThan(JSBI.BigInt(0)))throw new Sk.builtin.ValueError("negative shift count");return r=d(r),new Sk.builtin.int_(t(r,n))}return Sk.builtin.NotImplemented.NotImplemented$}}function l(e,t){return function(n){if(n instanceof Sk.builtin.int_){var r=this.v;return n=n.v,"number"==typeof r&&"number"==typeof n?(0>(r=e(r,n))&&(r+=4294967296),new Sk.builtin.int_(r)):(r=d(r),n=d(n),new Sk.builtin.int_(JSBI.numberIfSafe(t(r,n))))}return Sk.builtin.NotImplemented.NotImplemented$}}function c(e){return e<=Number.MAX_SAFE_INTEGER&&e>=-Number.MAX_SAFE_INTEGER}function u(e){return e<=Number.MAX_SAFE_INTEGER&&e>=-Number.MAX_SAFE_INTEGER?+e:JSBI.BigInt(e)}function d(e){return"number"==typeof e?JSBI.BigInt(e):e}Sk.builtin.int_=Sk.abstr.buildNativeClass("int",{constructor:function(e){let t;if(Sk.asserts.assert(this instanceof Sk.builtin.int_,"bad call to int use 'new'"),"number"==typeof e||JSBI.__isBigInt(e))t=e;else if(void 0===e)t=0;else if("string"==typeof e)t=u(e);else{if(e.nb$int)return e.nb$int();Sk.asserts.fail("bad argument to int constructor")}this.v=t},slots:{tp$as_number:!0,tp$doc:"int(x=0) -> integer\nint(x, base=10) -> integer\n\nConvert a number or string to an integer, or return 0 if no arguments\nare given. If x is a number, return x.__int__(). For floating point\nnumbers, this truncates towards zero.\n\nIf x is not a number or if base is given, then x must be a string,\nbytes, or bytearray instance representing an integer literal in the\ngiven base. The literal can be preceded by '+' or '-' and be surrounded\nby whitespace. The base defaults to 10. Valid bases are 0 and 2-36.\nBase 0 means to interpret the base from the string as an integer literal.\n>>> int('0b100', base=0)\n4",$r(){return new Sk.builtin.str(this.v.toString())},tp$hash(){const e=this.v;return"number"==typeof e?e:JSBI.toNumber(JSBI.remainder(e,JSBI.__MAX_SAFE))},tp$new(e,t){if(1===e.length+(t?t.length:0)?(t=e[0],e=Sk.builtin.none.none$):(t=(e=Sk.abstr.copyKeywordsToNamedArgs("int",[null,"base"],e,t,[new Sk.builtin.int_(0),Sk.builtin.none.none$]))[0],e=e[1]),e=e!==Sk.builtin.none.none$?Sk.misceval.asIndexOrThrow(e):null,t instanceof Sk.builtin.str)null===e&&(e=10),t=new Sk.builtin.int_(Sk.str2number(t.v,e));else{if(null!==e)throw new Sk.builtin.TypeError("int() can't convert non-string with explicit base");if(t.nb$int)t=t.nb$int();else{if(!(e=Sk.abstr.lookupSpecial(t,Sk.builtin.str.$trunc)))throw new Sk.builtin.TypeError("int() argument must be a string, a bytes-like object or a number, not '"+Sk.abstr.typeName(t)+"'");if(e=Sk.misceval.callsimArray(e,[]),!Sk.builtin.checkInt(e))throw new Sk.builtin.TypeError(Sk.builtin.str.$trunc.$jsstr()+" returned non-Integral (type "+Sk.abstr.typeName(t)+")");t=new Sk.builtin.int_(e.v)}}return this===Sk.builtin.int_.prototype?t:((e=new this.constructor).v=t.v,e)},tp$getattr:Sk.generic.getAttr,ob$eq:r((e,t)=>e==t,JSBI.equal),ob$ne:r((e,t)=>e!=t,JSBI.notEqual),ob$gt:r((e,t)=>e>t,JSBI.greaterThan),ob$ge:r((e,t)=>e>=t,JSBI.greaterThanOrEqual),ob$lt:r((e,t)=>e<t,JSBI.lessThan),ob$le:r((e,t)=>e<=t,JSBI.lessThanOrEqual),nb$int:o,nb$index(){return this.v},nb$float(){var e=this.v;if("number"==typeof e)return new Sk.builtin.float_(e);if(1/0===(e=parseFloat(JSBI.toNumber(e)))||-1/0===e)throw new Sk.builtin.OverflowError("int too large to convert to float");return new Sk.builtin.float_(e)},nb$isnegative(){const e=this.v;return"number"==typeof e?0>e:JSBI.lessThan(e,JSBI.__ZERO)},nb$ispositive(){const e=this.v;return"number"==typeof e?0>e:JSBI.greaterThanOrEqual(e,JSBI.__ZERO)},nb$bool(){return 0!==this.v},nb$positive:o,nb$negative:i(e=>-e,JSBI.unaryMinus),nb$add:n((e,t)=>e+t,(e,t)=>JSBI.numberIfSafe(JSBI.add(e,t))),nb$subtract:n((e,t)=>e-t,(e,t)=>JSBI.numberIfSafe(JSBI.subtract(e,t))),nb$multiply:n((e,t)=>e*t,JSBI.multiply),nb$divide(e){return Sk.__future__.division?this.nb$float().nb$divide(e):this.nb$floor_divide(e)},nb$floor_divide:s((e,t)=>Math.floor(e/t),JSBI.divide),nb$remainder:s((e,t)=>e-Math.floor(e/t)*t,JSBI.remainder),nb$divmod(e){const t=this.nb$floor_divide(e);return e=this.nb$remainder(e),t===Sk.builtin.NotImplemented.NotImplemented$||e===Sk.builtin.NotImplemented.NotImplemented$?Sk.builtin.NotImplemented.NotImplemented$:new Sk.builtin.tuple([t,e])},nb$and:l((e,t)=>e&t,JSBI.bitwiseAnd),nb$or:l((e,t)=>e|t,JSBI.bitwiseOr),nb$xor:l((e,t)=>e^t,JSBI.bitwiseXor),nb$abs:i(Math.abs,e=>JSBI.lessThan(e,JSBI.__ZERO)?JSBI.unaryMinus(e):e),nb$lshift:a((e,t)=>{if(53>t&&c(e=2*e*p[t]))return e},JSBI.leftShift),nb$rshift:a((e,t)=>{const n=e>>t;return 0<e&&0>n?n&Math.pow(2,32-t)-1:n},(e,t)=>JSBI.numberIfSafe(JSBI.signedRightShift(e,t))),nb$invert:i(e=>~e,JSBI.bitwiseNot),nb$power(e,t){let n;if(void 0!==t&&Sk.builtin.checkNone(t)&&(t=void 0),e instanceof Sk.builtin.int_&&(void 0===t||t instanceof Sk.builtin.int_)){let r=this.v,i=e.v;if("number"==typeof r&&"number"==typeof i){const e=Math.pow(r,i);if(c(e)&&(n=0>i?new Sk.builtin.float_(e):new Sk.builtin.int_(e),void 0===t))return n}if(void 0!==t){if(e.nb$isnegative())throw new Sk.builtin.ValueError("pow() 2nd argument cannot be negative when 3rd argument specified");if(0===t.v)throw new Sk.builtin.ValueError("pow() 3rd argument cannot be 0");return void 0!==n?n.nb$remainder(t):new Sk.builtin.int_(JSBI.powermod(d(r),d(i),d(t.v)))}return new Sk.builtin.int_(JSBI.exponentiate(d(r),d(i)))}return Sk.builtin.NotImplemented.NotImplemented$},nb$long(){return new Sk.builtin.lng(this.v)}},getsets:{real:{$get:o,$doc:"the real part of a complex number"},imag:{$get:()=>new Sk.builtin.int_(0),$doc:"the imaginary part of a complex number"}},methods:{conjugate:{$meth:o,$flags:{NoArgs:!0},$textsig:null,$doc:"Returns self, the complex conjugate of any int."},bit_length:{$meth(){return new Sk.builtin.int_(Sk.builtin.bin(this).sq$length()-2)},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Number of bits necessary to represent self in binary.\n\n>>> bin(37)\n'0b100101'\n>>> (37).bit_length()\n6"},to_bytes:{$meth(){throw new Sk.builtin.NotImplementedError("Not yet implemented in Skulpt")},$flags:{FastCall:!0},$textsig:"($self, /, length, byteorder, *, signed=False)",$doc:"Return an array of bytes representing an integer.\n\n length\n Length of bytes object to use. An OverflowError is raised if the\n integer is not representable with the given number of bytes.\n byteorder\n The byte order used to represent the integer. If byteorder is 'big',\n the most significant byte is at the beginning of the byte array. If\n byteorder is 'little', the most significant byte is at the end of the\n byte array. To request the native byte order of the host system, use\n `sys.byteorder' as the byte order value.\n signed\n Determines whether two's complement is used to represent the integer.\n If signed is False and a negative integer is given, an OverflowError\n is raised."},__trunc__:{$meth:o,$flags:{NoArgs:!0},$textsig:null,$doc:"Truncating an Integral returns itself."},__floor__:{$meth:o,$flags:{NoArgs:!0},$textsig:null,$doc:"Flooring an Integral returns itself."},__ceil__:{$meth:o,$flags:{NoArgs:!0},$textsig:null,$doc:"Ceiling of an Integral returns itself."},__round__:{$meth(e){return this.round$(e)},$flags:{MinArgs:0,MaxArgs:1},$textsig:null,$doc:"Rounding an Integral returns itself.\nRounding with an ndigits argument also returns an integer."},__getnewargs__:{$meth(){return new Sk.builtin.tuple([new Sk.builtin.int_(this.v)])},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:Sk.builtin.none.none$},__format__:{$meth:Sk.formatting.mkNumber__format__(!1),$flags:{OneArg:!0},$textsig:"($self, format_spec, /)",$doc:Sk.builtin.none.none$}},proto:{str$(e,t){return e=void 0===e||10===e?this.v.toString():this.v.toString(e),t||void 0===t||"-"===e[0]&&(e=e.substring(1)),e},round$(e){e=void 0===e?0:Sk.misceval.asIndexSized(e);var t=this.v,n=Math.pow(10,-e);if(0<e)return new Sk.builtin.int_(t);if("number"==typeof t&&Sk.__future__.bankers_rounding)return e=t/n,t=Math.round(e),new Sk.builtin.int_((.5==(0<e?e:-e)%1?0==t%2?t:t-1:t)*n);if("number"==typeof t)return new Sk.builtin.int_(Math.round(t/n)*n);{n=JSBI.BigInt(10*n),e=JSBI.BigInt(10),t=JSBI.divide(t,n);const r=JSBI.divide(t,e),i=JSBI.subtract(t,JSBI.multiply(e,r));return 5>JSBI.toNumber(i)?t=JSBI.multiply(JSBI.multiply(r,e),n):JSBI.multiply(JSBI.multiply(JSBI.add(r,JSBI.BigInt(1),e),n)),new Sk.builtin.int_(t)}}}}),Sk.exportSymbol("Sk.builtin.int_",Sk.builtin.int_);const h=/_(?=[^_])/g;Sk.str2number=function(e,t){var n,r=e,i=!1;if("-"===(e=e.replace(/^\s+|\s+$/g,"")).charAt(0)&&(i=!0,e=e.substring(1)),"+"===e.charAt(0)&&(e=e.substring(1)),null==t&&(t=10),(2>t||36<t)&&0!==t)throw new Sk.builtin.ValueError("int() base must be >= 2 and <= 36");if("string"==typeof t&&(t=Number(t)),"0x"===e.substring(0,2).toLowerCase()){if(16===t||0===t)e=e.substring(2),t=16;else if(34>t)throw new Sk.builtin.ValueError("invalid literal for int() with base "+t+": '"+r+"'")}else if("0b"===e.substring(0,2).toLowerCase()){if(2===t||0===t)e=e.substring(2),t=2;else if(12>t)throw new Sk.builtin.ValueError("invalid literal for int() with base "+t+": '"+r+"'")}else if("0o"===e.substring(0,2).toLowerCase()){if(8===t||0===t)e=e.substring(2),t=8;else if(25>t)throw new Sk.builtin.ValueError("invalid literal for int() with base "+t+": '"+r+"'")}else if("0"===e.charAt(0)){if("0"===e)return 0;8!==t&&0!==t||(t=8)}if(0===t&&(t=10),-1!==e.indexOf("_")){if(-1!==e.indexOf("__"))throw new Sk.builtin.ValueError("invalid literal for int() with base "+t+": '"+r+"'");e=10!==t?e.replace(h,""):e.charAt(0)+e.substring(1).replace(h,"")}if(0===e.length)throw new Sk.builtin.ValueError("invalid literal for int() with base "+t+": '"+r+"'");for(n=0;n<e.length;n+=1){var o=e.charCodeAt(n),s=t;if(48<=o&&57>=o?s=o-48:65<=o&&90>=o?s=o-65+10:97<=o&&122>=o&&(s=o-97+10),s>=t)throw new Sk.builtin.ValueError("invalid literal for int() with base "+t+": '"+r+"'")}if(i&&(e="-"+e),c(s=parseInt(e,t)))return s;for(r=!1,"-"===e[0]&&(r=!0,e=e.substring(1)),t=JSBI.BigInt(t),i=JSBI.BigInt(1),n=JSBI.BigInt(0),o=e.length-1;0<=o;o--)48<=(s=e.charCodeAt(o))&&57>=s?s-=48:65<=s&&90>=s?s=s-65+10:97<=s&&122>=s&&(s=s-97+10),s=JSBI.multiply(JSBI.BigInt(s),i),n=JSBI.add(n,s),i=JSBI.multiply(i,t);return r&&(n=JSBI.multiply(n,JSBI.BigInt(-1))),n},Sk.builtin.int_.py2$methods={},Sk.longFromStr=function(e,t){return Sk.__future__.python3?new Sk.builtin.int_(u(e)):(e=Sk.str2number(e,t),new Sk.builtin.lng(e))},Sk.exportSymbol("Sk.longFromStr",Sk.longFromStr),Sk.builtin.int_.withinThreshold=c,Sk.builtin.int_.stringToNumberOrBig=u;const p=[.5,1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536,131072,262144,524288,1048576,2097152,4194304,8388608,16777216,33554432,67108864,134217728,268435456,536870912,1073741824,2147483648,4294967296,8589934592,17179869184,34359738368,68719476736,137438953472,274877906944,549755813888,1099511627776,2199023255552,4398046511104,8796093022208,17592186044416,35184372088832,70368744177664,0x800000000000,281474976710656,562949953421312,0x4000000000000,0x8000000000000,4503599627370496,9007199254740992];Sk.builtin.lng=Sk.abstr.buildNativeClass("long",{base:Sk.builtin.int_,constructor:function(e){Sk.builtin.int_.call(this,e)},slots:{$r(){return new Sk.builtin.str(this.v.toString()+"L")},tp$as_number:!0,nb$negative(){return new Sk.builtin.lng(f.nb$negative.call(this).v)},nb$positive(){return new Sk.builtin.lng(f.nb$positive.call(this).v)}}});const f=Sk.builtin.int_.prototype},function(e,t){const n=Sk.builtin.int_.prototype;Sk.builtin.bool=Sk.abstr.buildNativeClass("bool",{constructor:function(e){return Sk.misceval.isTrue(e)?Sk.builtin.bool.true$:Sk.builtin.bool.false$},base:Sk.builtin.int_,slots:{tp$doc:"bool(x) -> bool\n\nReturns True when the argument x is true, False otherwise.\nThe builtins True and False are the only two instances of the class bool.\nThe class bool is a subclass of the class int, and cannot be subclassed.",tp$new:(e,t)=>(Sk.abstr.checkNoKwargs("bool",t),Sk.abstr.checkArgsLen("bool",e,0,1),new Sk.builtin.bool(e[0])),$r(){return this.v?this.str$True:this.str$False},tp$as_number:!0,nb$and(e){return e.ob$type===Sk.builtin.bool?new Sk.builtin.bool(this.v&e.v):n.nb$and.call(this,e)},nb$or(e){return e.ob$type===Sk.builtin.bool?new Sk.builtin.bool(this.v|e.v):n.nb$or.call(this,e)},nb$xor(e){return e.ob$type===Sk.builtin.bool?new Sk.builtin.bool(this.v^e.v):n.nb$xor.call(this,e)}},flags:{sk$acceptable_as_base_class:!1},methods:{__format__:{$meth(){return this.$r()},$flags:{OneArg:!0}}},proto:{str$False:new Sk.builtin.str("False"),str$True:new Sk.builtin.str("True")}}),Sk.exportSymbol("Sk.builtin.bool",Sk.builtin.bool),Sk.builtin.bool.true$=Object.create(Sk.builtin.bool.prototype,{v:{value:1,enumerable:!0}}),Sk.builtin.bool.false$=Object.create(Sk.builtin.bool.prototype,{v:{value:0,enumerable:!0}})},function(e,t){function n(){return new Sk.builtin.float_(this.v)}function r(e){return function(t){const n=this.v;if("number"!=typeof(t=t.v)){if(!JSBI.__isBigInt(t))return Sk.builtin.NotImplemented.NotImplemented$;if(1/0==(t=parseFloat(JSBI.toNumber(t)))||-1/0==t)throw new Sk.builtin.OverflowError("int too large to convert to float")}return e(n,t)}}function i(e){const t=r(e);return function(e,n){if(void 0!==n&&!Sk.builtin.checkNone(n))throw new Sk.builtin.TypeError("pow() 3rd argument not allowed unless all arguments are integers");return t.call(this,e)}}function o(e,t){if(0===t)throw new Sk.builtin.ZeroDivisionError("integer division or modulo by zero");return 1/0===e?1/0===t||-1/0===e?new Sk.builtin.float_(NaN):0>t?new Sk.builtin.float_(-1/0):new Sk.builtin.float_(1/0):-1/0===e?1/0===t||-1/0===e?new Sk.builtin.float_(NaN):0>t?new Sk.builtin.float_(1/0):new Sk.builtin.float_(-1/0):new Sk.builtin.float_(e/t)}function s(e,t){if(1/0===e||-1/0===e)return new Sk.builtin.float_(NaN);if(0===t)throw new Sk.builtin.ZeroDivisionError("integer division or modulo by zero");return 1/0===t?0>e?new Sk.builtin.float_(-1):new Sk.builtin.float_(0):-1/0===t?0>e||0!==e?new Sk.builtin.float_(0):new Sk.builtin.float_(-1):new Sk.builtin.float_(Math.floor(e/t))}function a(e,t){if(0===t)throw new Sk.builtin.ZeroDivisionError("integer division or modulo by zero");if(0===e)return new Sk.builtin.float_(0);if(1/0===t)return 1/0===e||-1/0===this.v?new Sk.builtin.float_(NaN):0<e?new Sk.builtin.float_(e):new Sk.builtin.float_(1/0);let n=e%t;return 0>e?0<t&&0>n&&(n+=t):0>t&&0!==n&&(n+=t),0===n&&(0>t?n=-0:-1/0==1/0/n&&(n=0)),new Sk.builtin.float_(n)}function l(e,t){if(0>e&&0!=t%1)throw new Sk.builtin.ValueError("negative number cannot be raised to a fractional power");if(0===e&&0>t)throw new Sk.builtin.ZeroDivisionError("0.0 cannot be raised to a negative power");const n=Math.pow(e,t);if(1/0===Math.abs(n)&&1/0!==Math.abs(e)&&1/0!==Math.abs(t))throw new Sk.builtin.OverflowError("Numerical result out of range");return new Sk.builtin.float_(n)}const c=Object.create(null,{Infinity:{value:314159},"-Infinity":{value:-314159},NaN:{value:0}});Sk.builtin.float_=Sk.abstr.buildNativeClass("float",{constructor:function(e){if(Sk.asserts.assert(this instanceof Sk.builtin.float_,"bad call to float use 'new'"),"number"==typeof e)this.v=e;else if(void 0===e)this.v=0;else if("string"==typeof e)this.v=parseFloat(e);else{if(e.nb$float)return e.nb$float();Sk.asserts.fail("bad argument to float constructor")}},slots:{tp$gettattr:Sk.generic.getAttr,tp$as_number:!0,tp$doc:"Convert a string or number to a floating point number, if possible.",tp$hash(){const e=this.v;let t=c[e];return void 0!==t?t:(t=Number.isInteger(e)?this.nb$int().tp$hash():Math.floor(Math.random()*Number.MAX_SAFE_INTEGER-Number.MAX_SAFE_INTEGER/2),c[this.v]=t)},$r(){return new Sk.builtin.str(this.str$(10,!0))},tp$new(e,t){if(t&&t.length)throw new Sk.builtin.TypeError("float() takes no keyword arguments");if(e&&1<e.length)throw new Sk.builtin.TypeError("float expected at most 1 arguments, got "+e.length);if(void 0===(e=e[0]))var n=new Sk.builtin.float_(0);else if(e.nb$float)n=e.nb$float();else if(Sk.builtin.checkString(e)){if(e=n=e.v,-1!==n.indexOf("_")){if(u.test(n))throw new Sk.builtin.ValueError("could not convert string to float: '"+n+"'");e=n.charAt(0)+n.substring(1).replace(d,"")}if(n.match(/^-inf$/i))var r=-1/0;else n.match(/^[+]?inf$/i)?r=1/0:n.match(/^[-+]?nan$/i)?r=NaN:isNaN(e)||(r=parseFloat(e),Number.isNaN(r)&&(r=void 0));if(void 0===r)throw new Sk.builtin.ValueError("could not convert string to float: "+Sk.misceval.objectRepr(new Sk.builtin.str(n)));n=new Sk.builtin.float_(r)}if(void 0===n)throw new Sk.builtin.TypeError("float() argument must be a string or a number");return this===Sk.builtin.float_.prototype?n:((r=new this.constructor).v=n.v,r)},nb$int(){let e=this.v;if(e=0>e?Math.ceil(e):Math.floor(e),!Number.isInteger(e))throw new Sk.builtin.ValueError("cannot convert float "+Sk.misceval.objectRepr(this)+" to integer");return Sk.builtin.int_.withinThreshold(e)?new Sk.builtin.int_(e):new Sk.builtin.int_(JSBI.BigInt(e))},nb$float:n,nb$long(){return new Sk.builtin.lng(this.nb$int().v)},nb$add:r((e,t)=>new Sk.builtin.float_(e+t)),nb$subtract:r((e,t)=>new Sk.builtin.float_(e-t)),nb$reflected_subtract:r((e,t)=>new Sk.builtin.float_(t-e)),nb$multiply:r((e,t)=>new Sk.builtin.float_(e*t)),nb$divide:r(o),nb$reflected_divide:r((e,t)=>o(t,e)),nb$floor_divide:r(s),nb$reflected_floor_divide:r((e,t)=>s(t,e)),nb$remainder:r(a),nb$reflected_remainder:r((e,t)=>a(t,e)),nb$divmod:r((e,t)=>new Sk.builtin.tuple([s(e,t),a(e,t)])),nb$reflected_divmod:r((e,t)=>new Sk.builtin.tuple([s(t,e),a(t,e)])),nb$power:i(l),nb$reflected_power:i((e,t)=>l(t,e)),nb$abs(){return new Sk.builtin.float_(Math.abs(this.v))},nb$negative(){return new Sk.builtin.float_(-this.v)},nb$positive(){return new Sk.builtin.float_(this.v)},nb$bool(){return 0!==this.v},nb$isnegative(){return 0>this.v},nb$ispositive(){return 0<=this.v},ob$eq:r((e,t)=>e==t),ob$ne:r((e,t)=>e!=t),ob$gt:r((e,t)=>e>t),ob$ge:r((e,t)=>e>=t),ob$lt:r((e,t)=>e<t),ob$le:r((e,t)=>e<=t)},getsets:{real:{$get:n,$doc:"the real part of a complex number"},imag:{$get:()=>new Sk.builtin.float_(0),$doc:"the imaginary part of a complex number"}},methods:{conjugate:{$meth:n,$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return self, the complex conjugate of any float."},__trunc__:{$meth(){return this.nb$int()},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return the Integral closest to x between 0 and x."},__round__:{$meth(e){return this.round$(e)},$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, ndigits=None, /)",$doc:"Return the Integral closest to x, rounding half toward even.\n\nWhen an argument is passed, work like built-in round(x, ndigits)."},is_integer:{$meth(){return new Sk.builtin.bool(Number.isInteger(this.v))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if the float is an integer."},__getnewargs__:{$meth(){return new Sk.builtin.tuple([this])},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:Sk.builtin.none.none$},__format__:{$meth:Sk.formatting.mkNumber__format__(!0),$flags:{OneArg:!0},$textsig:"($self, format_spec, /)",$doc:Sk.builtin.none.none$}}});const u=/_[eE]|[eE]_|\._|_\.|[+-]_|__/,d=/_(?=[^_])/g;Sk.builtin.float_.PyFloat_Check=function(e){return void 0!==e&&!!(Sk.builtin.checkNumber(e)||Sk.builtin.checkFloat(e)||e.ob$type.$isSubType(Sk.builtin.float_))},Sk.builtin.float_.prototype.toFixed=function(e){return e=Sk.builtin.asnum$(e),this.v.toFixed(e)},Sk.builtin.float_.prototype.round$=function(e){var t=Sk.builtin.asnum$(this),n=void 0===e?0:Sk.misceval.asIndexSized(e);if(Sk.__future__.bankers_rounding){t*=Math.pow(10,n);var r=Math.round(t);return n=(.5==(0<t?t:-t)%1?0==r%2?r:r-1:r)/Math.pow(10,n),void 0===e?new Sk.builtin.int_(n):new Sk.builtin.float_(n)}return e=Math.pow(10,n),n=Math.round(t*e)/e,new Sk.builtin.float_(n)},Sk.builtin.float_.prototype.str$=function(e,t){if(isNaN(this.v))return"nan";if(void 0===t&&(t=!0),1/0==this.v)return"inf";if(-1/0==this.v&&t)return"-inf";if(-1/0==this.v&&!t)return"inf";if(t=t?this.v:Math.abs(this.v),void 0===e||10===e){var n=Sk.__future__.python3?t.toPrecision(16):t.toPrecision(12),r=n.indexOf(".");if(e=t.toString().slice(0,r),r=t.toString().slice(r),e.match(/^-?0$/)&&r.slice(1).match(/^0{4,}/)&&(n=12>n.length?t.toExponential():t.toExponential(11)),0>n.indexOf("e")&&0<=n.indexOf(".")){for(;"0"==n.charAt(n.length-1);)n=n.substring(0,n.length-1);"."==n.charAt(n.length-1)&&(n+="0")}n=(n=(n=n.replace(/\.0+e/,"e","i")).replace(/(e[-+])([1-9])$/,"$10$2")).replace(/0+(e.*)/,"$1")}else n=t.toString(e);return 0===this.v&&-1/0==1/this.v&&(n="-"+n),0>n.indexOf(".")&&0>n.indexOf("E")&&0>n.indexOf("e")&&(n+=".0"),n},Sk.builtin.float_.py2$methods={}},function(e,t){function n(e){let t=e.v;if("number"==typeof t)return t;if(e.nb$float&&(t=e.nb$float()),void 0===t)throw new Sk.builtin.TypeError("a float is required");return t.v}function r(e,t,n){return n===Sk.builtin.complex.prototype?new Sk.builtin.complex(e,t):(n=new n.constructor,Sk.builtin.complex.call(n,e,t),n)}function i(e,t){return function(n){const r=this.real,i=this.imag;var o=n.real;const s=n.v;if("number"==typeof o)n=n.imag;else if("number"==typeof s)o=s,n=0;else{if(!JSBI.__isBigInt(s))return Sk.builtin.NotImplemented.NotImplemented$;if(void 0===t){if(1/0==(o=parseFloat(JSBI.toNumber(s)))||-1/0==o)throw new Sk.builtin.OverflowError("int too large to convert to float")}else o=s.toString();n=0}return e(r,i,o,n)}}function o(e,t,n,r){var i=Math.abs(n);const o=Math.abs(r);if(i>=o){if(0===i)throw new Sk.builtin.ZeroDivisionError("complex division by zero");r=(e+t*(i=r/n))/(n+=r*i),e=(t-e*i)/n}else o>=i?(n=n*(i=n/r)+r,Sk.asserts.assert(0!==r),r=(e*i+t)/n,e=(t*i-e)/n):e=r=NaN;return new Sk.builtin.complex(r,e)}function s(e,t,n,r){if(0===n&&0===r){r=1;var i=0}else if(0===e&&0===t){if(0!==r||0>n)throw new Sk.builtin.ZeroDivisionError("complex division by zero");i=r=0}else{const o=Math.hypot(e,t);i=Math.pow(o,n),n*=e=Math.atan2(t,e),0!==r&&(i/=Math.exp(e*r),n+=r*Math.log(o)),r=i*Math.cos(n),i*=Math.sin(n)}return new Sk.builtin.complex(r,i)}function a(e,t,n){let r=1;var i=new Sk.builtin.complex(1,0);for(e=new Sk.builtin.complex(e,t);0<r&&n>=r;)n&r&&(i=new Sk.builtin.complex(i.real*e.real-i.imag*e.imag,i.real*e.imag+e.real*i.imag)),r<<=1,e=new Sk.builtin.complex(e.real*e.real-e.imag*e.imag,2*e.real*e.imag);return i}function l(e,t,n,r,i){switch(i=!1,t){case"e":case"f":case"g":break;case"E":i=!0,t="e";break;case"F":i=!0,t="f";break;case"r":if(0!==n)throw Error("Bad internall call");n=17,t="g";break;default:throw Error("Bad internall call")}if(isNaN(e))e="nan";else if(1/0===e)e="inf";else if(-1/0===e)e="-inf";else{r&l.Py_DTSF_ADD_DOT_0&&(t="g");var o="%"+(r&l.Py_DTSF_ALT?"#":"");null!=n&&(o=o+"."+n),e=(e=(o=new Sk.builtin.str(o+t)).nb$remainder(new Sk.builtin.float_(e))).v}return r&l.Py_DTSF_SIGN&&"-"!==e[0]&&(e="+"+e),i&&(e=e.toUpperCase()),e}Sk.builtin.complex=Sk.abstr.buildNativeClass("complex",{constructor:function(e,t){Sk.asserts.assert(this instanceof Sk.builtin.complex,"bad call to complex constructor, use 'new'"),this.real=e,this.imag=t},slots:{tp$as_number:!0,tp$doc:"Create a complex number from a real part and an optional imaginary part.\n\nThis is equivalent to (real + imag*1j) where imag defaults to 0.",tp$hash(){var e=new Sk.builtin.float_(this.real).tp$hash();return e=1003*new Sk.builtin.float_(this.imag).tp$hash()+e,Sk.builtin.int_.withinThreshold(e)?e:new Sk.builtin.int_(JSBI.BigInt(e)).tp$hash()},tp$getattr:Sk.generic.getAttr,tp$new(e,t){{var i,o=(e=Sk.abstr.copyKeywordsToNamedArgs("complex",["real","imag"],e,t,[null,null]))[1];let a=t=!1;var s=e[0];if(null!=s&&s.constructor===Sk.builtin.complex&&null==o)t=s;else if(Sk.builtin.checkString(s)){if(null!=o)throw new Sk.builtin.TypeError("complex() can't take second arg if first is a string");t=Sk.builtin.complex.complex_subtype_from_string(s,this)}else{if(null!=o&&Sk.builtin.checkString(o))throw new Sk.builtin.TypeError("complex() second arg can't be a string");if(null==s?e=null:e=void 0!==(e=Sk.abstr.lookupSpecial(s,Sk.builtin.str.$complex))?Sk.misceval.callsimArray(e,[]):null,null!=e&&e!==Sk.builtin.NotImplemented.NotImplemented$){if(!c(e))throw new Sk.builtin.TypeError("__complex__ should return a complex object");s=e}if(null!=s&&void 0===s.nb$float)throw new Sk.builtin.TypeError("complex() first argument must be a string or a number, not '"+Sk.abstr.typeName(s)+"'");if(null!=o&&void 0===o.nb$float)throw new Sk.builtin.TypeError("complex() second argument must be a number, not '"+Sk.abstr.typeName(s)+"'");null==s?s=e=0:c(s)?(e=s.real,s=s.imag,t=!0):(e=n(s),s=0),null==o?o=i=0:c(o)?(i=o.real,o=o.imag,a=!0):(i=n(o),o=0),!0===a&&(e-=o),!0===t&&(i+=s),t=r(e,i,this)}}return t},tp$richcompare(e,t){if("Eq"!==t&&"NotEq"!==t){if(Sk.builtin.checkNumber(e)||c(e))throw new Sk.builtin.TypeError("no ordering relation is defined for complex numbers");return Sk.builtin.NotImplemented.NotImplemented$}return i((function(e,n,r,i){return e=e==r&&n==i,"Eq"===t?e:!e}),!0).call(this,e)},$r(){{var e,t;let i=e="";var n=this.real,r=this.imag;(t=0===n)&&(t=1==(n?0>n?-1:1:0>1/n?-1:1)),t?(n="",t=l(r,"g",null,0,null)):(n=e=l(n,"g",null,0,null),t=l(r,"g",null,l.Py_DTSF_SIGN,null),0===r&&-1/0==1/r&&t&&"-"!==t[0]&&(t="-"+t),e="(",i=")"),r=new Sk.builtin.str(""+e+n+t+"j"+i)}return r},nb$int(){throw new Sk.builtin.TypeError("can't convert complex to int")},nb$long(){throw new Sk.builtin.TypeError("can't convert complex to long")},nb$float(){throw new Sk.builtin.TypeError("can't convert complex to float")},nb$positive(){return new Sk.builtin.complex(this.real,this.imag)},nb$negative(){return new Sk.builtin.complex(-this.real,-this.imag)},nb$bool(){return this.real||this.imag},nb$add:i((e,t,n,r)=>new Sk.builtin.complex(e+n,t+r)),nb$subtract:i((e,t,n,r)=>new Sk.builtin.complex(e-n,t-r)),nb$reflected_subtract:i((e,t,n,r)=>new Sk.builtin.complex(n-e,r-t)),nb$multiply:i((e,t,n,r)=>new Sk.builtin.complex(n*e-r*t,e*r+t*n)),nb$divide:i(o),nb$reflected_divide:i((e,t,n,r)=>o(n,r,e,t)),nb$floor_divide(e){throw new Sk.builtin.TypeError("can't take floor of complex number.")},nb$reflected_floor_divide(e){throw new Sk.builtin.TypeError("can't take floor of complex number.")},nb$remainder(e){throw new Sk.builtin.TypeError("can't mod complex numbers.")},nb$reflected_remainder(e){throw new Sk.builtin.TypeError("can't mod complex numbers.")},nb$divmod(e){throw new Sk.builtin.TypeError("can't take floor or mod of complex number.")},nb$power(e,t){if(null!=t&&!Sk.builtin.checkNone(t))throw new Sk.builtin.ValueError("complex modulo");return h.call(this,e)},nb$abs(){var e=this.real;const t=this.imag;if(!Number.isFinite(e)||!Number.isFinite(t))return 1/0===e||-1/0===e?new Sk.builtin.float_(Math.abs(e)):1/0===t||-1/0===t?new Sk.builtin.float_(Math.abs(t)):new Sk.builtin.float_(NaN);if(e=Math.hypot(e,t),!Number.isFinite(e))throw new Sk.builtin.OverflowError("absolute value too large");return new Sk.builtin.float_(e)}},getsets:{real:{$get(){return new Sk.builtin.float_(this.real)},$doc:"the real part of a complex number"},imag:{$get(){return new Sk.builtin.float_(this.imag)},$doc:"the imaginary part of a complex number"}},methods:{conjugate:{$meth(){return new Sk.builtin.complex(this.real,-this.imag)},$flags:{NoArgs:!0},$textsig:null,$doc:"complex.conjugate() -> complex\n\nReturn the complex conjugate of its argument. (3-4j).conjugate() == 3+4j."},__getnewargs__:{$meth(){return new Sk.builtin.tuple([new Sk.builtin.float_(this.real),new Sk.builtin.float_(this.imag)])},$flags:{NoArgs:!0},$textsig:null,$doc:Sk.builtin.none.none$},__format__:{$meth(e){if(Sk.builtin.checkString(e))throw new Sk.builtin.NotImplementedError("__format__ is not implemented for complex type.");throw new Sk.builtin.TypeError("__format__ requires str")},$flags:{OneArg:!0},$textsig:null,$doc:"complex.__format__() -> str\n\nConvert to a string according to format_spec."}}}),Sk.exportSymbol("Sk.builtin.complex",Sk.builtin.complex);const c=Sk.builtin.checkComplex,u=/_[eE]|[eE]_|\._|_\.|[+-]_|_j|j_/,d=/_(?=[^_])/g;Sk.builtin.complex.complex_subtype_from_string=function(e,t){t=t||Sk.builtin.complex.prototype;var n=0,i=0,o=!1;if(Sk.builtin.checkString(e))e=Sk.ffi.remapToJs(e);else if("string"!=typeof e)throw new TypeError("provided unsupported string-alike argument");if(-1!==e.indexOf("\0")||0===e.length||""===e)throw new Sk.builtin.ValueError("complex() arg is a malformed string");var s=0;for(e=(e=e.replace(/inf|infinity/gi,"Infinity")).replace(/nan/gi,"NaN");" "===e[s];)s++;if("("===e[s])for(o=!0,s++;" "===e[s];)s++;if(-1!==e.indexOf("_")){if(u.test(e))throw new Sk.builtin.ValueError("could not convert string to complex: '"+e+"'");e=e.charAt(0)+e.substring(1).replace(d,"")}var a=/^(?:[+-]?(?:(?:(?:\d*\.\d+)|(?:\d+\.?))(?:[eE][+-]?\d+)?|NaN|Infinity))/,l=e.substr(s),c=l.match(a);if(null!==c)if("j"===e[s+=c[0].length]||"J"===e[s])i=parseFloat(c[0]),s++;else if("+"===e[s]||"-"===e[s]){if(n=parseFloat(c[0]),null!==(c=e.substr(s).match(a))?(i=parseFloat(c[0]),s+=c[0].length):(i="+"===e[s]?1:-1,s++),"j"!==e[s]&&"J"!==e[s])throw new Sk.builtin.ValueError("complex() arg is malformed string");s++}else n=parseFloat(c[0]);else null!==(c=c=l.match(/^([+-]?[jJ])/))&&(i=1===c[0].length||"+"===c[0][0]?1:-1,s+=c[0].length);for(;" "===e[s];)s++;if(o){if(")"!==e[s])throw new Sk.builtin.ValueError("complex() arg is malformed string");for(s++;" "===e[s];)s++}if(e.length!==s)throw new Sk.builtin.ValueError("complex() arg is malformed string");return r(n,i,t)};const h=i((e,t,n,r)=>{const i=0|n;return 0===r&&n===i?(100<i||-100>i?e=s(e,t,i,0):0<i?e=a(e,t,i):e=o(1,0,(e=a(e,t,-i)).real,e.imag),e):s(e,t,n,r)});l.Py_DTSF_SIGN=1,l.Py_DTSF_ADD_DOT_0=2,l.Py_DTSF_ALT=4,l.Py_DTST_FINITE=0,l.Py_DTST_INFINITE=1,l.Py_DTST_NAN=2},function(e,t){Sk.builtin.slice=Sk.abstr.buildNativeClass("slice",{constructor:function(e,t,n){void 0===t&&void 0===n&&(t=e,e=Sk.builtin.none.none$),void 0===t&&(t=Sk.builtin.none.none$),void 0===n&&(n=Sk.builtin.none.none$),this.start=e,this.stop=t,this.step=n},slots:{tp$getattr:Sk.generic.getAttr,tp$doc:"slice(stop)\nslice(start, stop[, step])\n\nCreate a slice object. This is used for extended slicing (e.g. a[0:10:2]).",tp$hash:Sk.builtin.none.none$,tp$new:(e,t)=>(Sk.abstr.checkNoKwargs("slice",t),Sk.abstr.checkArgsLen("slice",e,1,3),new Sk.builtin.slice(...e)),$r(){const e=Sk.misceval.objectRepr(this.start),t=Sk.misceval.objectRepr(this.stop),n=Sk.misceval.objectRepr(this.step);return new Sk.builtin.str("slice("+e+", "+t+", "+n+")")},tp$richcompare(e,t){if(e.ob$type!==Sk.builtin.slice)return Sk.builtin.NotImplemented.NotImplemented$;const n=new Sk.builtin.tuple([this.start,this.stop,this.step]);return e=new Sk.builtin.tuple([e.start,e.stop,e.step]),n.tp$richcompare(e,t)}},getsets:{start:{$get(){return this.start}},step:{$get(){return this.step}},stop:{$get(){return this.stop}}},methods:{indices:{$meth:function(e){if(0>(e=Sk.misceval.asIndexSized(e,Sk.builtin.OverflowError)))throw new Sk.builtin.TypeError("length should not be negative");const{start:t,stop:n,step:r}=this.slice$indices(e);return new Sk.builtin.tuple([new Sk.builtin.int_(t),new Sk.builtin.int_(n),new Sk.builtin.int_(r)])},$doc:"S.indices(len) -> (start, stop, stride)\n\nAssuming a sequence of length len, calculate the start and stop\nindices, and the stride length of the extended slice described by\nS. Out of bounds indices are clipped in a manner consistent with the\nhandling of normal slices.",$textsig:null,$flags:{OneArg:!0}}},proto:{slice$as_indices(e){let t;var n=e?e=>Sk.misceval.asIndexSized(e,null,"slice indices must be integers or None or have an __index__ method"):e=>Sk.misceval.asIndexOrThrow(e,"slice indices must be integers or None or have an __index__ method");if(Sk.builtin.checkNone(this.step))t=1;else if(t=n(this.step),0===t)throw new Sk.builtin.ValueError("slice step cannot be zero");return{start:e=Sk.builtin.checkNone(this.start)?null:n(this.start),stop:n=Sk.builtin.checkNone(this.stop)?null:n(this.stop),step:t}},$wrt:(e,t,n,r,i)=>(i=i?t=>JSBI.__isBigInt(t)?JSBI.add(t,JSBI.BigInt(e)):t+e:t=>t+e,0<r?(null===t?t=0:0>t&&(0>(t=i(t))&&(t=0)),null===n||n>e?n=e:0>n&&(n=i(n))):(null===t||t>=e?t=e-1:0>t&&(t=i(t)),null===n?n=-1:0>n&&(0>(n=i(n))&&(n=-1))),{start:t,stop:n,step:r}),slice$indices(e,t){let{start:n,stop:r,step:i}=this.slice$as_indices(!0,t);return this.$wrt(e,n,r,i,t)},sssiter$(e,t){let{start:n,stop:r,step:i}=this.slice$indices(e,!0);if(0<i)for(e=n;e<r;e+=i)t(e);else for(e=n;e>r;e+=i)t(e)}},flags:{sk$acceptable_as_base_class:!1}}),Sk.builtin.slice.startEnd$wrt=function(e,t,n){return e=e.sq$length(),void 0===t||Sk.builtin.checkNone(t)?t=0:0>(t=Sk.misceval.asIndexSized(t,null,"slice indices must be integers or have an __index__ method"))&&(0>(t+=e)&&(t=0)),void 0===n||Sk.builtin.checkNone(n)?n=e:0>(n=Sk.misceval.asIndexSized(n,null,"slice indices must be integers or have an __index__ method"))?0>(n+=e)&&(n=0):n>e&&(n=e),{start:t,end:n}}},function(e,t){function n(e){return function(t){return Sk.builtin.checkAnySet(t)?e.call(this,t):Sk.builtin.NotImplemented.NotImplemented$}}function r(e){return e instanceof Sk.builtin.set&&e.tp$hash===Sk.builtin.none.none$&&(e=new Sk.builtin.frozenset(Sk.misceval.arrayFromIterable(e))),e}e={},Sk.builtin.set=Sk.abstr.buildNativeClass("set",{constructor:function(e){void 0===e?e=[]:Array.isArray(e)||(e=Sk.misceval.arrayFromIterable(e)),Sk.asserts.assert(this instanceof Sk.builtin.set,"Bad call to set - must be called with an Array and 'new'");const t=[];for(let n=0;n<e.length;n++)t.push(e[n]),t.push(!0);this.v=new Sk.builtin.dict(t),this.in$repr=!1},slots:{tp$getattr:Sk.generic.getAttr,tp$as_number:!0,tp$as_sequence_or_mapping:!0,tp$hash:Sk.builtin.none.none$,tp$doc:"set() -> new empty set object\nset(iterable) -> new set object\n\nBuild an unordered collection of unique elements.",tp$init(e,t){return Sk.abstr.checkNoKwargs("set",t),Sk.abstr.checkArgsLen("set",e,0,1),this.set$clear(),(e=e[0])&&this.set$update(e)},tp$new:Sk.generic.new,$r(){if(this.in$repr)return new Sk.builtin.str(Sk.abstr.typeName(this)+"(...)");this.in$repr=!0;const e=this.sk$asarray().map(e=>Sk.misceval.objectRepr(e));return this.in$repr=!1,Sk.__future__.python3?0===e.length?new Sk.builtin.str(Sk.abstr.typeName(this)+"()"):this.ob$type!==Sk.builtin.set?new Sk.builtin.str(Sk.abstr.typeName(this)+"({"+e.join(", ")+"})"):new Sk.builtin.str("{"+e.join(", ")+"}"):new Sk.builtin.str(Sk.abstr.typeName(this)+"(["+e.join(", ")+"])")},tp$iter(){return new i(this)},tp$richcompare(e,t){if(!Sk.builtin.checkAnySet(e))return Sk.builtin.NotImplemented.NotImplemented$;switch(t){case"NotEq":case"Eq":return e=this===e||this.get$size()===e.get$size()&&Sk.misceval.isTrue(this.set$issubset(e)),"Eq"===t?e:!e;case"LtE":return this===e||Sk.misceval.isTrue(this.set$issubset(e));case"GtE":return this===e||Sk.misceval.isTrue(e.set$issubset(this));case"Lt":return this.get$size()<e.get$size()&&Sk.misceval.isTrue(this.set$issubset(e));case"Gt":return this.get$size()>e.get$size()&&Sk.misceval.isTrue(e.set$issubset(this))}},nb$subtract:n((function(e){return this.difference.$meth.call(this,e)})),nb$and:n((function(e){return this.intersection.$meth.call(this,e)})),nb$or:n((function(e){return this.union.$meth.call(this,e)})),nb$xor:n((function(e){return this.symmetric_difference.$meth.call(this,e)})),nb$inplace_subtract:n((function(e){return e===this&&(e=e.set$copy()),Sk.misceval.chain(this.difference_update.$meth.call(this,e),()=>this)})),nb$inplace_and:n((function(e){return Sk.misceval.chain(this.intersection_update.$meth.call(this,e),()=>this)})),nb$inplace_or:n((function(e){return Sk.misceval.chain(this.update.$meth.call(this,e),()=>this)})),nb$inplace_xor:n((function(e){return e===this&&(e=e.set$copy()),Sk.misceval.chain(this.symmetric_difference_update.$meth.call(this,e),()=>this)})),sq$length(){return this.get$size()},sq$contains(e){return e=r(e),this.v.sq$contains(e)}},methods:{add:{$meth(e){return this.set$add(e),Sk.builtin.none.none$},$flags:{OneArg:!0},$textsig:null,$doc:"Add an element to a set.\n\nThis has no effect if the element is already present."},clear:{$meth(){return this.set$clear(),Sk.builtin.none.none$},$flags:{NoArgs:!0},$textsig:null,$doc:"Remove all elements from this set."},copy:{$meth(){return this.set$copy()},$flags:{NoArgs:!0},$textsig:null,$doc:"Return a shallow copy of a set."},discard:{$meth(e){return e=r(e),this.set$discard(e),Sk.builtin.none.none$},$flags:{OneArg:!0},$textsig:null,$doc:"Remove an element from a set if it is a member.\n\nIf the element is not a member, do nothing."},difference:{$meth(...e){const t=this.set$copy();return Sk.misceval.chain(Sk.misceval.iterArray(e,e=>t.set$difference_update(e)),()=>t)},$flags:{MinArgs:0},$textsig:null,$doc:"Return the difference of two or more sets as a new set.\n\n(i.e. all elements that are in this set but not the others.)"},difference_update:{$meth(...e){return Sk.misceval.chain(Sk.misceval.iterArray(e,e=>this.set$difference_update(e)),()=>Sk.builtin.none.none$)},$flags:{MinArgs:0},$textsig:null,$doc:"Remove all elements of another set from this set."},intersection:{$meth(...e){return this.set$intersection_multi(...e)},$flags:{MinArgs:0},$textsig:null,$doc:"Return the intersection of two sets as a new set.\n\n(i.e. all elements that are in both sets.)"},intersection_update:{$meth(...e){return Sk.misceval.chain(this.set$intersection_multi(...e),e=>(this.swap$bodies(e),Sk.builtin.none.none$))},$flags:{MinArgs:0},$textsig:null,$doc:"Update a set with the intersection of itself and another."},isdisjoint:{$meth(e){return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(e),e=>{if(this.sq$contains(e))return new Sk.misceval.Break(Sk.builtin.bool.false$)}),e=>e||Sk.builtin.bool.true$)},$flags:{OneArg:!0},$textsig:null,$doc:"Return True if two sets have a null intersection."},issubset:{$meth(e){return Sk.builtin.checkAnySet(e)||(e=this.set$make_basetype(e)),Sk.misceval.chain(e,e=>this.set$issubset(e))},$flags:{OneArg:!0},$textsig:null,$doc:"Report whether another set contains this set."},issuperset:{$meth(e){return Sk.builtin.checkAnySet(e)||(e=this.set$make_basetype(e)),Sk.misceval.chain(e,e=>e.set$issubset(this))},$flags:{OneArg:!0},$textsig:null,$doc:"Report whether this set contains another set."},pop:{$meth(){if(0===this.get$size())throw new Sk.builtin.KeyError("pop from an empty set");return Sk.misceval.callsimArray(this.v.popitem,[this.v]).v[0]},$flags:{NoArgs:!0},$textsig:null,$doc:"Remove and return an arbitrary set element.\nRaises KeyError if the set is empty."},remove:{$meth(e){const t=r(e);if(this.v.mp$lookup(t))return this.v.mp$ass_subscript(t),Sk.builtin.none.none$;throw new Sk.builtin.KeyError(e)},$flags:{OneArg:!0},$textsig:null,$doc:"Remove an element from a set; it must be a member.\n\nIf the element is not a member, raise a KeyError."},symmetric_difference:{$meth(e){let t;return Sk.misceval.chain(this.set$make_basetype(e),e=>(t=e,t.set$symmetric_diff_update(this)),()=>t)},$flags:{OneArg:!0},$textsig:null,$doc:"Return the symmetric difference of two sets as a new set.\n\n(i.e. all elements that are in exactly one of the sets.)"},symmetric_difference_update:{$meth(e){return Sk.builtin.checkAnySet(e)||(e=this.set$make_basetype(e)),Sk.misceval.chain(e,e=>this.set$symmetric_diff_update(e),()=>Sk.builtin.none.none$)},$flags:{OneArg:!0},$textsig:null,$doc:"Update a set with the symmetric difference of itself and another."},union:{$meth(...e){const t=this.set$copy();return Sk.misceval.chain(Sk.misceval.iterArray(e,e=>t.set$update(e)),()=>t)},$flags:{MinArgs:0},$textsig:null,$doc:"Return the union of sets as a new set.\n\n(i.e. all elements that are in either set.)"},update:{$meth(...e){return Sk.misceval.chain(Sk.misceval.iterArray(e,e=>this.set$update(e)),()=>Sk.builtin.none.none$)},$flags:{MinArgs:0},$textsig:null,$doc:"Update a set with the union of itself and others."}},proto:Object.assign(e,{sk$asarray(){return this.v.sk$asarray()},get$size(){return this.v.sq$length()},set$add(e){this.v.mp$ass_subscript(e,!0)},set$make_basetype(e){return Sk.misceval.chain(Sk.misceval.arrayFromIterable(e,!0),e=>new this.sk$builtinBase(e))},set$discard(e){return this.v.pop$item(e)},set$clear(){this.v=new Sk.builtin.dict([])},set$copy(){const e=new this.sk$builtinBase;return e.v=this.v.dict$copy(),e},set$difference_update(e){return Sk.misceval.iterFor(Sk.abstr.iter(e),e=>{this.set$discard(e)})},set$intersection(e){const t=new this.sk$builtinBase;return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(e),e=>{this.sq$contains(e)&&t.set$add(e)}),()=>t)},set$intersection_multi(...e){if(!e.length)return this.set$copy();let t=this;return Sk.misceval.chain(Sk.misceval.iterArray(e,e=>Sk.misceval.chain(t.set$intersection(e),e=>{t=e})),()=>t)},set$issubset(e){if(this.get$size()>e.get$size())return Sk.builtin.bool.false$;for(let t=this.tp$iter(),n=t.tp$iternext();void 0!==n;n=t.tp$iternext())if(!e.sq$contains(n))return Sk.builtin.bool.false$;return Sk.builtin.bool.true$},set$symmetric_diff_update(e){return Sk.misceval.iterFor(Sk.abstr.iter(e),e=>{void 0===this.set$discard(e)&&this.set$add(e)})},set$update(e){return Sk.misceval.iterFor(Sk.abstr.iter(e),e=>{this.set$add(e)})},swap$bodies(e){this.v=e.v}})}),Sk.exportSymbol("Sk.builtin.set",Sk.builtin.set),t=Sk.builtin.set.prototype,Sk.builtin.frozenset=Sk.abstr.buildNativeClass("frozenset",{constructor:function(e){void 0===e&&(e=[]),Sk.asserts.assert(Array.isArray(e)&&this instanceof Sk.builtin.frozenset,"bad call to frozen set - must be called with an Array and 'new'");const t=[];for(let n=0;n<e.length;n++)t.push(e[n]),t.push(!0);this.v=new Sk.builtin.dict(t),this.in$repr=!1},slots:{tp$getattr:Sk.generic.getAttr,tp$as_number:!0,tp$as_sequence_or_mapping:!0,tp$doc:"frozenset() -> empty frozenset object\nfrozenset(iterable) -> frozenset object\n\nBuild an immutable unordered collection of unique elements.",tp$hash(){let e=1927868237;const t=this.sk$asarray();e*=t.length+1;for(let n=0;n<t.length;n++){const r=Sk.abstr.objectHash(t[n]);e^=3644798167*(r^r<<16^89869747)}return 69069*e+907133923},tp$new(e,t){return this!==Sk.builtin.frozenset.prototype?this.$subtype_new(e,t):(Sk.abstr.checkNoKwargs("frozenset",t),Sk.abstr.checkArgsLen("frozenset",e,0,1),void 0!==(e=e[0])&&e.ob$type===Sk.builtin.frozenset?e:Sk.misceval.chain(Sk.misceval.arrayFromIterable(e,!0),e=>e.length?new Sk.builtin.frozenset(e):Sk.builtin.frozenset.$emptyset))},$r:t.$r,tp$iter:t.tp$iter,tp$richcompare:t.tp$richcompare,nb$subtract:t.nb$subtract,nb$and:t.nb$and,nb$or:t.nb$or,nb$xor:t.nb$xor,sq$length:t.sq$length,sq$contains:t.sq$contains},methods:{copy:Object.assign({},t.copy.d$def,{$meth(){return this.constructor===this.sk$builtinBase?this:new Sk.builtin.frozenset(this.sk$asarray())}}),difference:t.difference.d$def,intersection:t.intersection.d$def,isdisjoint:t.isdisjoint.d$def,issubset:t.issubset.d$def,issuperset:t.issuperset.d$def,symmetric_difference:t.symmetric_difference.d$def,union:t.union.d$def},proto:Object.assign({$subtype_new(e,t){const n=new this.constructor;return Sk.misceval.chain(Sk.builtin.frozenset.prototype.tp$new(e),e=>(n.v=e.v,n))}},e)}),Sk.builtin.frozenset.$emptyset=Object.create(Sk.builtin.frozenset.prototype,{v:{value:new Sk.builtin.dict([]),enumerable:!0},in$repr:{value:!1,enumerable:!0}}),Sk.exportSymbol("Sk.builtin.frozenset",Sk.builtin.frozenset);var i=Sk.abstr.buildIteratorClass("set_iterator",{constructor:function(e){this.$index=0,this.$seq=e.sk$asarray(),this.$orig=e},iternext:Sk.generic.iterNextWithArrayCheckSize,methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$acceptable_as_base_class:!1}})},function(e,t){Sk.builtin.print=function(e,t){let n,[r,i,o]=Sk.abstr.copyKeywordsToNamedArgs("print",["sep","end","file","flush"],[],t);if(void 0===r||Sk.builtin.checkNone(r))r=" ";else{if(!Sk.builtin.checkString(r))throw new Sk.builtin.TypeError("sep must be None or a string, not "+Sk.abstr.typeName(r));r=r.$jsstr()}if(void 0===i||Sk.builtin.checkNone(i))i="\n";else{if(!Sk.builtin.checkString(i))throw new Sk.builtin.TypeError("end must be None or a string, not "+Sk.abstr.typeName(i));i=i.$jsstr()}if(void 0!==o&&!Sk.builtin.checkNone(o)&&(n=Sk.abstr.lookupSpecial(o,Sk.builtin.str.$write),void 0===n))throw new Sk.builtin.AttributeError("'"+Sk.abstr.typeName(o)+"' object has no attribute 'write'");const s=new Sk.builtin.str(e.map(e=>new Sk.builtin.str(e).toString()).join(r)+i);if(void 0===n)return Sk.misceval.chain(Sk.importModule("sys",!1,!0),e=>(n=Sk.abstr.lookupSpecial(e.$d.stdout,Sk.builtin.str.$write))&&Sk.misceval.callsimOrSuspendArray(n,[s]));Sk.misceval.callsimArray(n,[s])},Sk.builtin.print.co_fastcall=1},function(e,t){Sk.builtin.module=Sk.abstr.buildNativeClass("module",{constructor:function(){this.$d={}},slots:{tp$doc:"Create a module object.\n\nThe name must be a string; the optional doc argument can have any type.",tp$getattr(e,t){var n=this.$d[e.$mangled];if(void 0!==n)return n;if(void 0!==(n=this.ob$type.$typeLookup(e))){const e=n.tp$descr_get;return e?e.call(n,this,this.ob$type,t):n}const r=this.$d.__getattr__;return void 0!==r?(n=Sk.misceval.tryCatch(()=>Sk.misceval.callsimOrSuspendArray(r,[e]),e=>{if(!(e instanceof Sk.builtin.AttributeError))throw e}),t?n:Sk.misceval.retryOptionalSuspensionOrThrow(n)):void 0},tp$setattr:Sk.generic.setAttr,tp$new:Sk.generic.new,tp$init(e,t){const[n,r]=Sk.abstr.copyKeywordsToNamedArgs("module",["name","doc"],e,t,[Sk.builtin.none.none$]);Sk.builtin.pyCheckType("module","string",n),this.init$dict(n,r)},$r(){let e=this.get$name();if(void 0!==e){var t=this.get$mod_reprf();if(void 0!==t)return Sk.misceval.callsimOrSuspendArray(t,[this])}return e=void 0===e?"'?'":e,t=void 0===(t=this.from$file())?this.empty_or$loader():t,new Sk.builtin.str("<module "+e+t+">")}},getsets:{__dict__:{$get(){return new Sk.builtin.mappingproxy(this.$d)}}},methods:{__dir__:{$meth(){const e=this.tp$getattr(Sk.builtin.str.$dict);if(!Sk.builtin.checkMapping(e))throw new Sk.builtin.TypeError("__dict__ is not a dictionary");const t=e.mp$lookup(Sk.builtin.str.$dir);return void 0!==t?Sk.misceval.callsimOrSuspendArray(t,[]):new Sk.builtin.list(Sk.misceval.arrayFromIterable(e))},$flags:{NoArgs:!0},$doc:"__dir__() -> list\nspecialized dir() implementation"}},proto:{init$dict(e,t){this.$d.__name__=e,this.$d.__doc__=t,this.$d.__package__=Sk.builtin.none.none$,this.$d.__spec__=Sk.builtin.none.none$,this.$d.__loader__=Sk.builtin.none.none$},sk$attrError(){const e=this.get$name();return void 0===e?"module":"module "+e},get$name(){const e=this.tp$getattr(Sk.builtin.str.$name);return e&&Sk.misceval.objectRepr(e)},from$file(){const e=this.tp$getattr(Sk.builtin.str.$file);return e&&" from "+Sk.misceval.objectRepr(e)},empty_or$loader(){if(this.$js&&this.$js.includes("$builtinmodule"))return" (built-in)";const e=this.tp$getattr(Sk.builtin.str.$loader);return void 0===e||Sk.builtin.checkNone(e)?"":" ("+Sk.misceval.objectRepr(e)+")"},get$mod_reprf(){const e=this.tp$getattr(Sk.builtin.str.$loader);return e&&e.tp$getattr(this.str$mod_repr)},str$mod_repr:new Sk.builtin.str("module_repr")}}),Sk.exportSymbol("Sk.builtin.module",Sk.builtin.module)},function(e,t){Sk.builtin.structseq_types={},Sk.builtin.make_structseq=function(e,t,n,r){const i=e+"."+t,o=[];e=[];for(let t in n)o.push(t),e.push(n[t]);n={};for(let t=0;t<o.length;t++)n[o[t]]={$get(){return this.v[t]},$doc:e[t]};var s=Sk.abstr.buildNativeClass(i,{constructor:function(e){Sk.asserts.assert((Array.isArray(e)||void 0===e)&&this instanceof s),Sk.builtin.tuple.call(this,e)},base:Sk.builtin.tuple,slots:{tp$new(e,t){Sk.abstr.checkOneArg(i,e,t),t=[],e=e[0];for(let n=Sk.abstr.iter(e),r=n.tp$iternext();void 0!==r;r=n.tp$iternext())t.push(r);if(t.length!=o.length)throw new Sk.builtin.TypeError(i+"() takes a "+o.length+"-sequence ("+t.length+"-sequence given)");return new s(t)},tp$doc:r||Sk.builtin.none.none$,$r(){var e;if(0===this.v.length)return new Sk.builtin.str(i+"()");var t=[];for(e=0;e<this.v.length;++e)t[e]=o[e]+"="+Sk.misceval.objectRepr(this.v[e]);return e=t.join(", "),1===this.v.length&&(e+=","),new Sk.builtin.str(i+"("+e+")")}},methods:{__reduce__:{$meth(){throw new Sk.builtin.NotImplementedError("__reduce__ is not implemented")},$flags:{NoArgs:!0}}},getsets:n,proto:{num_sequence_fields:new Sk.builtin.int_(o.length)}});return s},Sk.exportSymbol("Sk.builtin.make_structseq",Sk.builtin.make_structseq)},function(e,t){Sk.builtin.generator=Sk.abstr.buildIteratorClass("generator",{constructor:function(e,t,n,r,i){var o;if(e){if(!(this instanceof Sk.builtin.generator))throw new TypeError("bad internal call to generator, use 'new'");if(this.func_code=e,this.func_globals=t||null,this.gi$running=!1,this.gi$resumeat=0,this.gi$sentvalue=void 0,this.gi$locals={},this.gi$cells={},0<n.length)for(t=0;t<e.co_varnames.length;++t)this.gi$locals[e.co_varnames[t]]=n[t];if(void 0!==i)for(o in i)r[o]=i[o];this.func_closure=r}},slots:{$r(){return new Sk.builtin.str("<generator object "+this.func_code.co_name.v+">")}},iternext(e,t){var n=this;return this.gi$running=!0,void 0===t&&(t=Sk.builtin.none.none$),this.gi$sentvalue=t,t=[this],this.func_closure&&t.push(this.func_closure),function t(r){if(r instanceof Sk.misceval.Suspension){if(e)return new Sk.misceval.Suspension(t,r);r=Sk.misceval.retryOptionalSuspensionOrThrow(r)}if(n.gi$running=!1,Sk.asserts.assert(void 0!==r),r!==Sk.builtin.none.none$)return n.gi$resumeat=r[0],r[1]}(this.func_code.apply(this.func_globals,t))},methods:{send:{$meth(e){return this.tp$iternext(!0,e)},$flags:{OneArg:!0},$doc:"send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration."}}}),Sk.exportSymbol("Sk.builtin.generator",Sk.builtin.generator),Sk.builtin.makeGenerator=function(e,t){var n,r=new Sk.builtin.generator(null,null,null);for(n in r.tp$iternext=e,t)t.hasOwnProperty(n)&&(r[n]=t[n]);return r},Sk.exportSymbol("Sk.builtin.makeGenerator",Sk.builtin.makeGenerator)},function(e,t){Sk.builtin.file=function(e,t,n){var r;if(!(this instanceof Sk.builtin.file))return new Sk.builtin.file(e,t,n);if(this.mode=t,this.name=Sk.ffi.remapToJs(e),this.closed=!1,"/dev/stdout"===this.name)this.data$=Sk.builtin.none.none$,this.fileno=1;else if("/dev/stdin"===this.name)this.fileno=0;else if("/dev/stderr"===this.name)this.fileno=2;else{if(Sk.inBrowser)if(this.fileno=10,null==(n=document.getElementById(e.v))){if("w"!=t.v&&"a"!=t.v)throw new Sk.builtin.IOError("[Errno 2] No such file or directory: '"+e.v+"'");this.data$=""}else"textarea"==n.nodeName.toLowerCase()?this.data$=n.value:this.data$=n.textContent;else this.fileno=11,this.data$=Sk.read(e.v);for(r in this.lineList=this.data$.split("\n"),this.lineList=this.lineList.slice(0,-1),this.lineList)this.lineList[r]+="\n";this.currentLine=0}return this.pos$=0,Sk.fileopen&&10<=this.fileno&&Sk.fileopen(this),this},Sk.abstr.setUpInheritance("file",Sk.builtin.file,Sk.builtin.object),Sk.abstr.setUpBuiltinMro(Sk.builtin.file),Sk.builtin.file.prototype.$r=function(){return new Sk.builtin.str("<"+(this.closed?"closed":"open")+"file '"+this.name+"', mode '"+Sk.ffi.remapToJs(this.mode)+"'>")},Sk.builtin.file.prototype.tp$iter=function(){var e={tp$iter:function(){return e},$obj:this,$index:this.currentLine,$lines:this.lineList,tp$iternext:function(){if(!(e.$index>=e.$lines.length))return new Sk.builtin.str(e.$lines[e.$index++])}};return e},Sk.abstr.setUpSlots(Sk.builtin.file),Sk.builtin.file.prototype.__enter__=new Sk.builtin.func((function(e){return e})),Sk.builtin.file.prototype.__exit__=new Sk.builtin.func((function(e){return Sk.misceval.callsimArray(Sk.builtin.file.prototype.close,[e])})),Sk.builtin.file.prototype.close=new Sk.builtin.func((function(e){return e.closed=!0,Sk.builtin.none.none$})),Sk.builtin.file.prototype.flush=new Sk.builtin.func((function(e){})),Sk.builtin.file.prototype.fileno=new Sk.builtin.func((function(e){return this.fileno})),Sk.builtin.file.prototype.isatty=new Sk.builtin.func((function(e){return!1})),Sk.builtin.file.prototype.read=new Sk.builtin.func((function(e,t){var n=e.data$.length;if(e.closed)throw new Sk.builtin.ValueError("I/O operation on closed file");var r=void 0===t?n:Sk.ffi.remapToJs(t);return r=new Sk.builtin.str(e.data$.substr(e.pos$,r)),e.pos$=void 0===t?n:e.pos$+Sk.ffi.remapToJs(t),e.pos$>=n&&(e.pos$=n),r})),Sk.builtin.file.$readline=function(e,t,n){if(0===e.fileno){if(e=Sk.ffi.remapToJs(n),(e=Sk.inputfun(e||""))instanceof Promise||e&&"function"==typeof e.then){var r=new Sk.misceval.Suspension;return r.resume=function(){if(r.data.error)throw r.data.error;return new Sk.builtin.str(r.data.result)},r.data={type:"Sk.promise",promise:e},r}return new Sk.builtin.str(e)}return t="",e.currentLine<e.lineList.length&&(t=e.lineList[e.currentLine],e.currentLine++),new Sk.builtin.str(t)},Sk.builtin.file.prototype.readline=new Sk.builtin.func((function(e,t){return Sk.builtin.file.$readline(e,t,void 0)})),Sk.builtin.file.prototype.readlines=new Sk.builtin.func((function(e,t){if(0===e.fileno)return new Sk.builtin.NotImplementedError("readlines ins't implemented because the web doesn't support Ctrl+D");var n=[];for(t=e.currentLine;t<e.lineList.length;t++)n.push(new Sk.builtin.str(e.lineList[t]));return new Sk.builtin.list(n)})),Sk.builtin.file.prototype.seek=new Sk.builtin.func((function(e,t,n){return t=Sk.ffi.remapToJs(t),void 0===n&&(n=0),0===n?e.pos$=t:(1==n||2==n)&&(e.pos$=e.data$.length+t),Sk.builtin.none.none$})),Sk.builtin.file.prototype.tell=new Sk.builtin.func((function(e){return Sk.ffi.remapToPy(e.pos$)})),Sk.builtin.file.prototype.truncate=new Sk.builtin.func((function(e,t){Sk.asserts.fail()})),Sk.builtin.file.prototype.write=new Sk.builtin.func((function(e,t){var n=Sk.ffi.remapToJs(e.mode);if("w"!==n&&"wb"!==n&&"a"!==n&&"ab"!==n)throw new Sk.builtin.IOError("File not open for writing");if(Sk.filewrite){if(e.closed)throw new Sk.builtin.ValueError("I/O operation on closed file");1===e.fileno?Sk.output(Sk.ffi.remapToJs(t)):Sk.filewrite(e,t)}else 1===e.fileno?Sk.output(Sk.ffi.remapToJs(t)):Sk.asserts.fail();return Sk.builtin.none.none$})),Sk.exportSymbol("Sk.builtin.file",Sk.builtin.file)},function(e,t){Sk.ffi=Sk.ffi||{},Sk.ffi.remapToPy=function(e){var t;if(null==e)return Sk.builtin.none.none$;if(e.ob$type||e instanceof Sk.misceval.Suspension)return e;if("[object Array]"===Object.prototype.toString.call(e)){var n=[];for(t=0;t<e.length;++t)n.push(Sk.ffi.remapToPy(e[t]));return new Sk.builtin.list(n)}if("object"==typeof e){for(t in n=[],e)n.push(Sk.ffi.remapToPy(t)),n.push(Sk.ffi.remapToPy(e[t]));return new Sk.builtin.dict(n)}return"string"==typeof e?new Sk.builtin.str(e):"number"==typeof e?Sk.builtin.assk$(e):"boolean"==typeof e?new Sk.builtin.bool(e):void 0===e?Sk.builtin.none.none$:"function"==typeof e?new Sk.builtin.func(e):void Sk.asserts.fail("unhandled remap type "+typeof e)},Sk.exportSymbol("Sk.ffi.remapToPy",Sk.ffi.remapToPy),Sk.ffi.remapToJs=function(e){var t,n;if(e instanceof Sk.builtin.dict){var r={};return e.$items().forEach(([e,t])=>{n=Sk.ffi.remapToJs(e),r[n]=Sk.ffi.remapToJs(t)}),r}if(e instanceof Sk.builtin.list||e instanceof Sk.builtin.tuple){for(r=[],t=0;t<e.v.length;++t)r.push(Sk.ffi.remapToJs(e.v[t]));return r}return e instanceof Sk.builtin.bool?!!e.v:e instanceof Sk.builtin.int_||e instanceof Sk.builtin.float_||e instanceof Sk.builtin.lng?Sk.builtin.asnum$(e):"number"==typeof e||"boolean"==typeof e||"string"==typeof e?e:void 0!==e?e.v:void 0},Sk.exportSymbol("Sk.ffi.remapToJs",Sk.ffi.remapToJs),Sk.ffi.callback=function(e){return void 0===e?e:function(){return Sk.misceval.apply(e,void 0,void 0,void 0,Array.prototype.slice.call(arguments,0))}},Sk.exportSymbol("Sk.ffi.callback",Sk.ffi.callback),Sk.ffi.stdwrap=function(e,t){return(e=new e).v=t,e},Sk.exportSymbol("Sk.ffi.stdwrap",Sk.ffi.stdwrap),Sk.ffi.basicwrap=function(e){return e instanceof Sk.builtin.int_||e instanceof Sk.builtin.float_||e instanceof Sk.builtin.lng?Sk.builtin.asnum$(e):"number"==typeof e||"boolean"==typeof e?e:"string"==typeof e?new Sk.builtin.str(e):void Sk.asserts.fail("unexpected type for basicwrap")},Sk.exportSymbol("Sk.ffi.basicwrap",Sk.ffi.basicwrap),Sk.ffi.unwrapo=function(e){if(void 0!==e)return e.v},Sk.exportSymbol("Sk.ffi.unwrapo",Sk.ffi.unwrapo),Sk.ffi.unwrapn=function(e){return null===e?null:e.v},Sk.exportSymbol("Sk.ffi.unwrapn",Sk.ffi.unwrapn)},function(e,t){function n(e,t,n){if(e=void 0===e?e:Sk.misceval.asIndexOrThrow(e),t=void 0===t?t:Sk.misceval.asIndexOrThrow(t),n=void 0===n?n:Sk.misceval.asIndexOrThrow(n),void 0===t&&void 0===n)t=e,e=0,n=1;else if(void 0===n)n=1;else if(0===n)throw new Sk.builtin.ValueError("range() step argument must not be zero");const i=[];if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)if(0<n)for(var o=e;o<t;o+=n)i.push(new Sk.builtin.int_(o));else for(o=e;o>t;o+=n)i.push(new Sk.builtin.int_(o));else{if(e=o=JSBI.BigInt(e),n=JSBI.BigInt(n),t=JSBI.BigInt(t),JSBI.greaterThan(n,JSBI.__ZERO))for(;JSBI.lessThan(o,t);)i.push(new Sk.builtin.int_(r(o))),o=JSBI.add(o,n);else for(;JSBI.greaterThan(o,t);)i.push(new Sk.builtin.int_(r(o))),o=JSBI.add(o,n);e=r(e),n=r(n),t=r(t)}return new Sk.builtin.range_(e,t,n,i)}function r(e){return JSBI.lessThan(e,JSBI.__MAX_SAFE)&&JSBI.greaterThan(e,JSBI.__MIN_SAFE)?JSBI.toNumber(e):e}Sk.builtin.range_=Sk.abstr.buildNativeClass("range",{constructor:function(e,t,n,r){this.start=e,this.stop=t,this.step=n,this.v=r},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,tp$doc:"range(stop) -> range object\nrange(start, stop[, step]) -> range object\n\nReturn an object that produces a sequence of integers from start (inclusive)\nto stop (exclusive) by step. range(i, j) produces i, i+1, i+2, ..., j-1.\nstart defaults to 0, and stop is omitted! range(4) produces 0, 1, 2, 3.\nThese are exactly the valid indices for a list of 4 elements.\nWhen step is given, it specifies the increment (or decrement).",tp$new:(e,t)=>(Sk.abstr.checkNoKwargs("range",t),Sk.abstr.checkArgsLen("range",e,1,3),n(e[0],e[1],e[2])),$r(){let e="range("+this.start+", "+this.stop;return 1!=this.step&&(e+=", "+this.step),new Sk.builtin.str(e+")")},tp$richcompare(e,t){return"Eq"!==t&&"NotEq"!==t||e.ob$type!==Sk.builtin.range_?Sk.builtin.NotImplemented.NotImplemented$:(e=new Sk.builtin.list(e.v),new Sk.builtin.list(this.v).tp$richcompare(e,t))},tp$iter(){return new i(this)},nb$bool(){return 0!==this.v.length},sq$contains(e){const t=this.v;for(let n=0;n<t.length;n++)if(Sk.misceval.richCompareBool(e,t[n],"Eq"))return!0;return!1},sq$length(){return this.v.length},mp$subscript(e){if(Sk.misceval.isIndex(e)){if(0>(e=Sk.misceval.asIndexSized(e))&&(e=this.v.length+e),0>e||e>=this.v.length)throw new Sk.builtin.IndexError("range object index out of range");return this.v[e]}if(e.constructor===Sk.builtin.slice){const t=[],n=this.v;e.sssiter$(n.length,e=>{t.push(n[e])});let{start:r,stop:i,step:o}=e.slice$indices(n.length);return r=Sk.misceval.asIndex(n[r])||this.start,i=Sk.misceval.asIndex(n[i])||this.stop,o="number"==typeof this.step?o*this.step:JSBI.multiply(this.step,JSBI.BigInt(o)),new Sk.builtin.range_(r,i,o,t)}throw new Sk.builtin.TypeError("range indices must be integers or slices, not "+Sk.abstr.typeName(e))}},getsets:{start:{$get(){return new Sk.builtin.int_(this.start)}},step:{$get(){return new Sk.builtin.int_(this.step)}},stop:{$get(){return new Sk.builtin.int_(this.stop)}}},methods:{__reversed__:{$meth(){return new o(this)},$flags:{NoArgs:!0},$textsig:null,$doc:"Return a reverse iterator."},count:{$meth(e){let t=0;for(let n=0;n<this.v.length;n++)Sk.misceval.richCompareBool(e,this.v[n],"Eq")&&t++;return new Sk.builtin.int_(t)},$flags:{OneArg:!0},$textsig:null,$doc:"rangeobject.count(value) -> integer -- return number of occurrences of value"},index:{$meth(e){for(let t=0;t<this.v.length;t++)if(Sk.misceval.richCompareBool(e,this.v[t],"Eq"))return new Sk.builtin.int_(t);throw new Sk.builtin.ValueError(Sk.misceval.objectRepr(e)+"is not in range")},$flags:{OneArg:!0},$textsig:null,$doc:"rangeobject.index(value, [start, [stop]]) -> integer -- return index of value.\nRaise ValueError if the value is not present."}},proto:{sk$asarray(){return this.v.slice(0)}},flags:{sk$acceptable_as_base_class:!1}});var i=Sk.abstr.buildIteratorClass("range_iterator",{constructor:function(e){this.$index=0,this.$seq=e.v},iternext(){return this.$seq[this.$index++]},methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$acceptable_as_base_class:!1}}),o=Sk.abstr.buildIteratorClass("range_reverseiterator",{constructor:function(e){this.$seq=e.v,this.$index=this.$seq.length-1},iternext(){return this.$seq[this.$index--]},methods:{__length_hint__:Sk.generic.iterReverseLengthHintMethodDef},flags:{sk$acceptable_as_base_class:!1}});Sk.builtin.range=Sk.builtin.xrange=function(e,t,r){return e=n(e,t,r),new Sk.builtin.list(e.v)}},function(e,t){Sk.builtin.enumerate=Sk.abstr.buildIteratorClass("enumerate",{constructor:function(e,t){if(!(this instanceof Sk.builtin.enumerate))throw TypeError("Failed to construct 'enumerate': Please use the 'new' operator");return this.$iterable=e,this.$index=t,this},iternext(e){const t=Sk.misceval.chain(this.$iterable.tp$iternext(e),e=>{if(void 0!==e)return new Sk.builtin.tuple([new Sk.builtin.int_(this.$index++),e])});return e?t:Sk.misceval.retryOptionalSuspensionOrThrow(t)},slots:{tp$doc:"Return an enumerate object.\n\n iterable\n an object supporting iteration\n\nThe enumerate object yields pairs containing a count (from start, which\ndefaults to zero) and a value yielded by the iterable argument.\n\nenumerate is useful for obtaining an indexed list:\n (0, seq[0]), (1, seq[1]), (2, seq[2]), ...",tp$new(e,t){let[n,r]=Sk.abstr.copyKeywordsToNamedArgs("enumerate",["iterable","start"],e,t,[new Sk.builtin.int_(0)]);return n=Sk.abstr.iter(n),r=Sk.misceval.asIndexOrThrow(r),this===Sk.builtin.enumerate.prototype?new Sk.builtin.enumerate(n,r):(e=new this.constructor,Sk.builtin.enumerate.call(e,n,r),e)}}}),Sk.exportSymbol("Sk.builtin.enumerate",Sk.builtin.enumerate)},function(e,t){Sk.builtin.filter_=Sk.abstr.buildIteratorClass("filter",{constructor:function(e,t){this.$func=e,this.$iterable=t},iternext(e){const t=Sk.misceval.iterFor(this.$iterable,e=>Sk.misceval.chain(this.check$filter(e),e=>e?new Sk.misceval.Break(e):void 0));return e?t:Sk.misceval.retryOptionalSuspensionOrThrow(t)},slots:{tp$doc:"Return an iterator yielding those items of iterable for which function(item)\nis true. If function is None, return the items that are true.",tp$new(e,t){let[n,r]=Sk.abstr.copyKeywordsToNamedArgs("filter",["predicate","iterable"],e,t,[]);return n=Sk.builtin.checkNone(n)?null:n,r=Sk.abstr.iter(r),this===Sk.builtin.filter_.prototype?new Sk.builtin.filter_(n,r):(e=new this.constructor,Sk.builtin.filter_.call(e,n,r),e)}},proto:{check$filter(e){let t;return t=null===this.$func?e:Sk.misceval.callsimOrSuspendArray(this.$func,[e]),Sk.misceval.chain(t,t=>Sk.misceval.isTrue(t)?e:void 0)}}}),Sk.exportSymbol("Sk.builtin.filter_",Sk.builtin.filter_)},function(e,t){Sk.builtin.map_=Sk.abstr.buildIteratorClass("map",{constructor:function(e,t){this.$func=e,this.$iters=t},iternext(e){const t=[],n=Sk.misceval.chain(Sk.misceval.iterArray(this.$iters,n=>Sk.misceval.chain(n.tp$iternext(e),e=>{if(void 0===e)return new Sk.misceval.Break(!0);t.push(e)})),e=>e?void 0:Sk.misceval.callsimOrSuspendArray(this.$func,t));return e?n:Sk.misceval.retryOptionalSuspensionOrThrow(n)},slots:{tp$doc:"map(func, *iterables) --\x3e map object\n\nMake an iterator that computes the function using arguments from\neach of the iterables. Stops when the shortest iterable is exhausted.",tp$new(e,t){this===Sk.builtin.map_.prototype&&Sk.abstr.checkNoKwargs("map",t),Sk.abstr.checkArgsLen("map",e,2),t=e[0];const n=[];for(let t=1;t<e.length;t++)n.push(Sk.abstr.iter(e[t]));return this===Sk.builtin.map_.prototype?new Sk.builtin.map_(t,n):(e=new this.constructor,Sk.builtin.map_.call(e,t,n),e)}}}),Sk.exportSymbol("Sk.builtin.map_",Sk.builtin.map_)},function(e,t){Sk.builtin.reversed=Sk.abstr.buildIteratorClass("reversed",{constructor:function(e){return this.$idx=e.sq$length()-1,this.$seq=e,this},iternext(e){if(!(0>this.$idx)){var t=Sk.misceval.tryCatch(()=>Sk.abstr.objectGetItem(this.$seq,new Sk.builtin.int_(this.$idx--),e),e=>{if(!(e instanceof Sk.builtin.IndexError))throw e;this.$idx=-1});return e?t:Sk.misceval.retryOptionalSuspensionOrThrow(t)}},slots:{tp$doc:"Return a reverse iterator over the values of the given sequence.",tp$new(e,t){if(this===Sk.builtin.reversed.prototype&&Sk.abstr.checkNoKwargs("reversed",t),Sk.abstr.checkArgsLen("reversed",e,1,1),e=e[0],void 0!==(t=Sk.abstr.lookupSpecial(e,Sk.builtin.str.$reversed)))return Sk.misceval.callsimArray(t,[]);if(!Sk.builtin.checkSequence(e)||void 0===Sk.abstr.lookupSpecial(e,Sk.builtin.str.$len))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(e)+"' object is not a sequence");return this===Sk.builtin.reversed.prototype?new Sk.builtin.reversed(e):(t=new this.constructor,Sk.builtin.reversed.call(t,e),t)}},methods:{__length_hint__:{$meth:function(){return 0<=this.$idx?new Sk.builtin.int_(this.$idx):new Sk.builtin.int_(0)},$flags:{NoArgs:!0}}}})},function(e,t){Sk.builtin.zip_=Sk.abstr.buildIteratorClass("zip",{constructor:function(e){this.$iters=e,0===e.length&&(this.tp$iternext=()=>{})},iternext(e){const t=[],n=Sk.misceval.chain(Sk.misceval.iterArray(this.$iters,n=>Sk.misceval.chain(n.tp$iternext(e),e=>{if(void 0===e)return new Sk.misceval.Break(!0);t.push(e)})),e=>e?void 0:new Sk.builtin.tuple(t));return e?n:Sk.misceval.retryOptionalSuspensionOrThrow(n)},slots:{tp$doc:"zip(iter1 [,iter2 [...]]) --\x3e zip object\n\nReturn a zip object whose .__next__() method returns a tuple where\nthe i-th element comes from the i-th iterable argument. The .__next__()\nmethod continues until the shortest iterable in the argument sequence\nis exhausted and then it raises StopIteration.",tp$new(e,t){this===Sk.builtin.zip_.prototype&&Sk.abstr.checkNoKwargs("zip",t),t=[];for(let n=0;n<e.length;n++)try{t.push(Sk.abstr.iter(e[n]))}catch(e){if(e instanceof Sk.builtin.TypeError)throw new Sk.builtin.TypeError("zip argument #"+(n+1)+" must support iteration");throw e}return this===Sk.builtin.zip_.prototype?new Sk.builtin.zip_(t):(e=new this.constructor,Sk.builtin.zip_.call(e,t),e)}}}),Sk.exportSymbol("Sk.builtin.zip_",Sk.builtin.zip_)},function(e,t){var n={T_ENDMARKER:0,T_NAME:1,T_NUMBER:2,T_STRING:3,T_NEWLINE:4,T_INDENT:5,T_DEDENT:6,T_LPAR:7,T_RPAR:8,T_LSQB:9,T_RSQB:10,T_COLON:11,T_COMMA:12,T_SEMI:13,T_PLUS:14,T_MINUS:15,T_STAR:16,T_SLASH:17,T_VBAR:18,T_AMPER:19,T_LESS:20,T_GREATER:21,T_EQUAL:22,T_DOT:23,T_PERCENT:24,T_LBRACE:25,T_RBRACE:26,T_EQEQUAL:27,T_NOTEQUAL:28,T_LESSEQUAL:29,T_GREATEREQUAL:30,T_TILDE:31,T_CIRCUMFLEX:32,T_LEFTSHIFT:33,T_RIGHTSHIFT:34,T_DOUBLESTAR:35,T_PLUSEQUAL:36,T_MINEQUAL:37,T_STAREQUAL:38,T_SLASHEQUAL:39,T_PERCENTEQUAL:40,T_AMPEREQUAL:41,T_VBAREQUAL:42,T_CIRCUMFLEXEQUAL:43,T_LEFTSHIFTEQUAL:44,T_RIGHTSHIFTEQUAL:45,T_DOUBLESTAREQUAL:46,T_DOUBLESLASH:47,T_DOUBLESLASHEQUAL:48,T_AT:49,T_ATEQUAL:50,T_RARROW:51,T_ELLIPSIS:52,T_OP:53,T_AWAIT:54,T_ASYNC:55,T_ERRORTOKEN:56,T_NT_OFFSET:256,T_N_TOKENS:60,T_COMMENT:57,T_NL:58,T_ENCODING:59};e={"!=":n.T_NOTEQUAL,"%":n.T_PERCENT,"%=":n.T_PERCENTEQUAL,"&":n.T_AMPER,"&=":n.T_AMPEREQUAL,"(":n.T_LPAR,")":n.T_RPAR,"*":n.T_STAR,"**":n.T_DOUBLESTAR,"**=":n.T_DOUBLESTAREQUAL,"*=":n.T_STAREQUAL,"+":n.T_PLUS,"+=":n.T_PLUSEQUAL,",":n.T_COMMA,"-":n.T_MINUS,"-=":n.T_MINEQUAL,"->":n.T_RARROW,".":n.T_DOT,"...":n.T_ELLIPSIS,"/":n.T_SLASH,"//":n.T_DOUBLESLASH,"//=":n.T_DOUBLESLASHEQUAL,"/=":n.T_SLASHEQUAL,":":n.T_COLON,";":n.T_SEMI,"<":n.T_LESS,"<<":n.T_LEFTSHIFT,"<<=":n.T_LEFTSHIFTEQUAL,"<=":n.T_LESSEQUAL,"=":n.T_EQUAL,"==":n.T_EQEQUAL,">":n.T_GREATER,">=":n.T_GREATEREQUAL,">>":n.T_RIGHTSHIFT,">>=":n.T_RIGHTSHIFTEQUAL,"@":n.T_AT,"@=":n.T_ATEQUAL,"[":n.T_LSQB,"]":n.T_RSQB,"^":n.T_CIRCUMFLEX,"^=":n.T_CIRCUMFLEXEQUAL,"{":n.T_LBRACE,"|":n.T_VBAR,"|=":n.T_VBAREQUAL,"}":n.T_RBRACE,"~":n.T_TILDE};var r={};!function(){for(var e in n)r[n[e]]=e}(),["tok_name","ISTERMINAL","ISNONTERMINAL","ISEOF"].concat(Object.keys(r).map((function(e){return r[e]}))),Sk.token={},Sk.token.tokens=n,Sk.token.tok_name=r,Sk.token.EXACT_TOKEN_TYPES=e,Sk.token.ISTERMINAL=function(e){return e<n.T_NT_OFFSET},Sk.token.ISNONTERMINAL=function(e){return e>=n.T_NT_OFFSET},Sk.token.ISEOF=function(e){return e==n.T_ENDMARKER},Sk.exportSymbol("Sk.token",Sk.token),Sk.exportSymbol("Sk.token.tokens",Sk.token.tokens),Sk.exportSymbol("Sk.token.tok_name",Sk.token.tok_name),Sk.exportSymbol("Sk.token.EXACT_TOKEN_TYPES"),Sk.exportSymbol("Sk.token.ISTERMINAL",Sk.token.ISTERMINAL),Sk.exportSymbol("Sk.token.ISNONTERMINAL",Sk.token.ISNONTERMINAL),Sk.exportSymbol("Sk.token.ISEOF",Sk.token.ISEOF)},function(e,t){function n(e,t,n,r,i){this.type=e,this.string=t,this.start=n,this.end=r,this.line=i}function r(e){return"("+Array.prototype.slice.call(arguments).join("|")+")"}function i(e){return r.apply(null,arguments)+"?"}function o(e,t){for(var n=e.length;n--;)if(e[n]===t)return!0;return!1}function s(){return" FR RF Br BR Fr r B R b bR f rb rB F Rf U rF u RB br fR fr rf Rb".split(" ")}function a(e){e?delete Sk.token.EXACT_TOKEN_TYPES["<>"]:Sk.token.EXACT_TOKEN_TYPES["<>"]=Sk.token.tokens.T_NOTEQUAL,f=Object.keys(Sk.token.EXACT_TOKEN_TYPES).sort(),m=r.apply(this,f.reverse().map((function(e){return e&&h.test(e)?e.replace(d,"\\$&"):e}))),g=r("\\r?\\n",m)}var l=Sk.token.tokens;const c=Sk.builtin.SyntaxError,u=Sk.builtin.SyntaxError;n.prototype.exact_type=function(){return this.type==l.T_OP&&this.string in Sk.token.EXACT_TOKEN_TYPES?Sk.token.EXACT_TOKEN_TYPES[this.string]:this.type};var d=/[\\^$.*+?()[\]{}|]/g,h=RegExp(d.source);const p=function(){var e=r("[A-Z]","[a-z]","[\\u{10B99}-\\u{10B9C}\\u{112A9}\\u{115DC}-\\u{115DD}\\u034F\\u115F-\\u1160\\u17B4-\\u17B5\\u2065\\u3164\\uFFA0\\uFFF0-\\uFFF8\\u{E0000}\\u{E0002}-\\u{E001F}\\u{E0080}-\\u{E00FF}\\u{E01F0}-\\u{E0FFF}\\u{112A9}\\u00D7]","[\\u02B0-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0374\\u037A\\u0559\\u06E5-\\u06E6\\u07F4-\\u07F5\\u0971\\u1C78-\\u1C7D\\u1D2C-\\u1D6A\\u1DFD-\\u1DFF\\u2E2F\\u30FC\\uA67F\\uA69C-\\uA69D\\uA717-\\uA71F\\uA788\\uA7F8-\\uA7F9\\uAB5C-\\uAB5F\\uFF70\\uFF9E-\\uFF9F\\u{16F93}-\\u{16F9F}\\u02D0-\\u02D1\\u0640\\u07FA\\u0E46\\u0EC6\\u1843\\u1AA7\\u1C7B\\u3005\\u3031-\\u3035\\u309D-\\u309E\\u30FC-\\u30FE\\uA015\\uA60C\\uA9CF\\uA9E6\\uAA70\\uAADD\\uAAF3-\\uAAF4\\uFF70\\u{16B42}-\\u{16B43}\\u{16FE0}-\\u{16FE1}\\u02B0-\\u02B8\\u02C0-\\u02C1\\u02E0-\\u02E4\\u037A\\u1D2C-\\u1D6A\\u1D78\\u1D9B-\\u1DBF\\u2071\\u207F\\u2090-\\u209C\\u2C7C-\\u2C7D\\uA69C-\\uA69D\\uA770\\uA7F8-\\uA7F9\\uAB5C-\\uAB5F\\uFF9E-\\uFF9F\\u02B2\\u1D62\\u1DA4\\u1DA8\\u2071\\u2C7C\\u2E18-\\u2E19\\u2E2F]","[\\u2135-\\u2138\\u{1EE00}-\\u{1EE03}\\u{1EE05}-\\u{1EE1F}\\u{1EE21}-\\u{1EE22}\\u{1EE24}\\u{1EE27}\\u{1EE29}-\\u{1EE32}\\u{1EE34}-\\u{1EE37}\\u{1EE39}\\u{1EE3B}\\u{1EE42}\\u{1EE47}\\u{1EE49}\\u{1EE4B}\\u{1EE4D}-\\u{1EE4F}\\u{1EE51}-\\u{1EE52}\\u{1EE54}\\u{1EE57}\\u{1EE59}\\u{1EE5B}\\u{1EE5D}\\u{1EE5F}\\u{1EE61}-\\u{1EE62}\\u{1EE64}\\u{1EE67}-\\u{1EE6A}\\u{1EE6C}-\\u{1EE72}\\u{1EE74}-\\u{1EE77}\\u{1EE79}-\\u{1EE7C}\\u{1EE7E}\\u{1EE80}-\\u{1EE89}\\u{1EE8B}-\\u{1EE9B}\\u{1EEA1}-\\u{1EEA3}\\u{1EEA5}-\\u{1EEA9}\\u{1EEAB}-\\u{1EEBB}\\u3006\\u3400-\\u4DB5\\u4E00-\\u9FEF\\uF900-\\uFA6D\\uFA70-\\uFAD9\\u{17000}-\\u{187F1}\\u{18800}-\\u{18AF2}\\u{1B170}-\\u{1B2FB}\\u{20000}-\\u{2A6D6}\\u{2A700}-\\u{2B734}\\u{2B740}-\\u{2B81D}\\u{2B820}-\\u{2CEA1}\\u{2CEB0}-\\u{2EBE0}\\u{2F800}-\\u{2FA1D}\\uAAC0\\uAAC2\\uFE20-\\uFE2F\\u{10D22}-\\u{10D23}\\u{1135D}\\u00AA\\u00BA\\u3400-\\u4DB5\\u4E00-\\u9FEF\\uFA0E-\\uFA0F\\uFA11\\uFA13-\\uFA14\\uFA1F\\uFA21\\uFA23-\\uFA24\\uFA27-\\uFA29\\u{20000}-\\u{2A6D6}\\u{2A700}-\\u{2B734}\\u{2B740}-\\u{2B81D}\\u{2B820}-\\u{2CEA1}\\u{2CEB0}-\\u{2EBE0}\\u115F-\\u1160\\u3164\\uFFA0\\u0673\\u17A3-\\u17A4\\u0E40-\\u0E44\\u0EC0-\\u0EC4\\u19B5-\\u19B7\\u19BA\\uAAB5-\\uAAB6\\uAAB9\\uAABB-\\uAABC]","[\\u3007\\u3021-\\u3029\\u3038-\\u303A\\u2170-\\u217F\\u2160-\\u216F]","_","[\\u1885-\\u1886\\u2118\\u212E\\u309B-\\u309C]"),t=r(e,"[\\u104A-\\u104B\\u102B-\\u102C\\u102D-\\u1030\\u1031\\u1032-\\u1036\\u1038\\u103B-\\u103C\\u103D-\\u103E\\u1056-\\u1057\\u1058-\\u1059\\u105E-\\u1060\\u1062\\u1067-\\u1068\\u1071-\\u1074\\u1082\\u1083-\\u1084\\u1085-\\u1086\\u109C\\u109D\\u1037\\u1039-\\u103A\\u1087-\\u108C\\u108D\\u108F\\u109A-\\u109B\\uA9E5\\uAA7B\\uAA7C\\uAA7D\\uA9E6\\uAA70\\u104A-\\u104B]","[\\u0903\\u093B\\u093E-\\u0940\\u0949-\\u094C\\u094E-\\u094F\\u0982-\\u0983\\u09BE-\\u09C0\\u09C7-\\u09C8\\u09CB-\\u09CC\\u09D7\\u0A03\\u0A3E-\\u0A40\\u0A83\\u0ABE-\\u0AC0\\u0AC9\\u0ACB-\\u0ACC\\u0B02-\\u0B03\\u0B3E\\u0B40\\u0B47-\\u0B48\\u0B4B-\\u0B4C\\u0B57\\u0BBE-\\u0BBF\\u0BC1-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCC\\u0BD7\\u0C01-\\u0C03\\u0C41-\\u0C44\\u0C82-\\u0C83\\u0CBE\\u0CC0-\\u0CC4\\u0CC7-\\u0CC8\\u0CCA-\\u0CCB\\u0CD5-\\u0CD6\\u0D02-\\u0D03\\u0D3E-\\u0D40\\u0D46-\\u0D48\\u0D4A-\\u0D4C\\u0D57\\u0D82-\\u0D83\\u0DCF-\\u0DD1\\u0DD8-\\u0DDF\\u0DF2-\\u0DF3\\u0F7F\\u102B-\\u102C\\u1031\\u1038\\u103B-\\u103C\\u1056-\\u1057\\u1062\\u1067-\\u1068\\u1083-\\u1084\\u109C\\u17B6\\u17BE-\\u17C5\\u17C7-\\u17C8\\u1923-\\u1926\\u1929-\\u192B\\u1930-\\u1931\\u1933-\\u1938\\u1A19-\\u1A1A\\u1A55\\u1A57\\u1A61\\u1A63-\\u1A64\\u1A6D-\\u1A72\\u1B04\\u1B35\\u1B3B\\u1B3D-\\u1B41\\u1B43\\u1B82\\u1BA1\\u1BA6-\\u1BA7\\u1BE7\\u1BEA-\\u1BEC\\u1BEE\\u1C24-\\u1C2B\\u1C34-\\u1C35\\u1CF2-\\u1CF3\\uA823-\\uA824\\uA827\\uA880-\\uA881\\uA8B4-\\uA8C3\\uA952\\uA983\\uA9B4-\\uA9B5\\uA9BA-\\uA9BB\\uA9BD-\\uA9BF\\uAA2F-\\uAA30\\uAA33-\\uAA34\\uAA4D\\uAAEB\\uAAEE-\\uAAEF\\uAAF5\\uABE3-\\uABE4\\uABE6-\\uABE7\\uABE9-\\uABEA\\u{11000}\\u{11002}\\u{11082}\\u{110B0}-\\u{110B2}\\u{110B7}-\\u{110B8}\\u{1112C}\\u{11145}-\\u{11146}\\u{11182}\\u{111B3}-\\u{111B5}\\u{111BF}\\u{1122C}-\\u{1122E}\\u{11232}-\\u{11233}\\u{112E0}-\\u{112E2}\\u{11302}-\\u{11303}\\u{1133E}-\\u{1133F}\\u{11341}-\\u{11344}\\u{11347}-\\u{11348}\\u{1134B}-\\u{1134C}\\u{11357}\\u{11362}-\\u{11363}\\u{11435}-\\u{11437}\\u{11440}-\\u{11441}\\u{11445}\\u{114B0}-\\u{114B2}\\u{114B9}\\u{114BB}-\\u{114BE}\\u{114C1}\\u{115AF}-\\u{115B1}\\u{115B8}-\\u{115BB}\\u{115BE}\\u{11630}-\\u{11632}\\u{1163B}-\\u{1163C}\\u{1163E}\\u{116AC}\\u{116AE}-\\u{116AF}\\u{11720}-\\u{11721}\\u{11726}\\u{1182C}-\\u{1182E}\\u{11838}\\u{11A39}\\u{11A57}-\\u{11A58}\\u{11A97}\\u{11C2F}\\u{11C3E}\\u{11CA9}\\u{11CB1}\\u{11CB4}\\u{11D8A}-\\u{11D8E}\\u{11D93}-\\u{11D94}\\u{11D96}\\u{11EF5}-\\u{11EF6}\\u{16F51}-\\u{16F7E}\\u0F3E-\\u0F3F\\u1087-\\u108C\\u108F\\u109A-\\u109B\\u1B44\\u1BAA\\u1CE1\\u1CF7\\u302E-\\u302F\\uA953\\uA9C0\\uAA7B\\uAA7D\\uABEC\\u{111C0}\\u{11235}\\u{1134D}\\u{116B6}\\u{1D16D}-\\u{1D172}\\u09BE\\u09D7\\u0B3E\\u0B57\\u0BBE\\u0BD7\\u0CC2\\u0CD5-\\u0CD6\\u0D3E\\u0D57\\u0DCF\\u0DDF\\u302E-\\u302F\\u{1133E}\\u{11357}\\u{114B0}\\u{114BD}\\u{115AF}\\u{1D165}\\u{1D16E}-\\u{1D172}]","[\\u{1D7CE}-\\u{1D7FF}\\uFF10-\\uFF19]","\\u2040","[\\u00B7\\u0387\\u1369-\\u1371\\u19DA]");return!1===RegExp().unicode?new RegExp("^"+e+"+"+t+"*$","u"):(e=r("[A-Z]","[a-z]","_"),t=r(e,"[0-9]"),new RegExp("^"+e+"+"+t+"*$"))}();!function(e){r.apply(null,arguments)}("\\\\\\r?\\n[ \\f\\t]*"),i("#[^\\r\\n]*"),e=r("[0-9](?:_?[0-9])*\\.(?:[0-9](?:_?[0-9])*)?","\\.[0-9](?:_?[0-9])*")+i("[eE][-+]?[0-9](?:_?[0-9])*");var f,m,g,b=r(e,"[0-9](?:_?[0-9])*[eE][-+]?[0-9](?:_?[0-9])*"),v=r("[0-9](?:_?[0-9])*[jJ]",b+"[jJ]");e=r.apply(null,s()),t=r(e+"'''",e+'"""'),r(e+"'[^\\n'\\\\]*(?:\\\\.[^\\n'\\\\]*)*'",e+'"[^\\n"\\\\]*(?:\\\\.[^\\n"\\\\]*)*"'),a(!0),Sk.token.setupTokens=a;var y=r(e+"'[^\\n'\\\\]*(?:\\\\.[^\\n'\\\\]*)*"+r("'","\\\\\\r?\\n"),e+'"[^\\n"\\\\]*(?:\\\\.[^\\n"\\\\]*)*'+r('"',"\\\\\\r?\\n")),S=r("\\\\\\r?\\n|$","#[^\\r\\n]*",t),_={};e=s();for(let t of e)_[t+"'"]="^[^'\\\\]*(?:\\\\.[^'\\\\]*)*'",_[t+'"']='^[^"\\\\]*(?:\\\\.[^"\\\\]*)*"',_[t+"'''"]="^[^'\\\\]*(?:(?:\\\\.|'(?!''))[^'\\\\]*)*'''",_[t+'"""']='^[^"\\\\]*(?:(?:\\\\.|"(?!""))[^"\\\\]*)*"""';let x=[],w=[];for(let t of e)x.push(t+'"'),x.push(t+"'"),w.push(t+'"""'),w.push(t+"'''");Sk._tokenize=function(e,t,i,s){var a=Sk.__future__.python3?"":"(?:L?)";a=r("0[xX](?:_?[0-9a-fA-F])+"+a,"0[bB](?:_?[01])+"+a,Sk.__future__.silent_octal_literal?"0([oO]?)(?:_?[0-7])+"+a:"0([oO])(?:_?[0-7])+"+a,"(?:0(?:_?0)*|[1-9](?:_?[0-9])*)"+a),a=r(v,b,a),a="[ \\f\\t]*"+r(S,a,g,y,"\\w+"),a=new RegExp(a);var d,h,f,m=0,k=0,O=0,E="",A=0,T=null,C=[0],M=void 0,$=void 0;void 0!==i&&("utf-8-sig"==i&&(i="utf-8"),s(new n(l.T_ENCODING,i,[0,0],[0,0],"")));for(var P=i="";;){try{i=P,P=t()}catch(e){P=""}m+=1;var R=0,j=P.length;if(E){if(!P)throw new c("EOF in multi-line string",e,$[0],$[1]);M.lastIndex=0;var N=M.exec(P);if(!N){A&&"\\\n"!==P.substring(P.length-2)&&"\\\r\n"!==P.substring(P.length-3)?(s(new n(l.T_ERRORTOKEN,E+P,$,[m,P.length],T)),E="",T=null):(E+=P,T+=P);continue}R=h=N[0].length,s(new n(l.T_STRING,E+P.substring(0,h),$,[m,h],T+P)),E="",A=0,T=null}else if(0!=k||O){if(!P)throw new c("EOF in multi-line statement",e,m,0);O=0}else{if(!P)break;for(d=0;R<j;){if(" "==P[R])d+=1;else if("\t"==P[R])d=8*Math.floor(d/8+1);else{if("\f"!=P[R])break;d=0}R+=1}if(R==j)break;if(o("#\r\n",P[R])){if("#"==P[R]){for(j=(d=P.substring(R)).length;0<j&&-1!=="\r\n".indexOf(d.charAt(j-1));--j);j=d.substring(0,j),s(new n(l.T_COMMENT,j,[m,R],[m,R+j.length],P)),R+=j.length}s(new n(l.T_NL,P.substring(R),[m,R],[m,P.length],P));continue}for(d>C[C.length-1]&&(C.push(d),s(new n(l.T_INDENT,P.substring(R),[m,0],[m,R],P)));d<C[C.length-1];){if(!o(C,d))throw new u("unindent does not match any outer indentation level",e,m,R);C=C.slice(0,-1),s(new n(l.T_DEDENT,"",[m,R],[m,R],P))}}for(;R<j;){for(d=P.charAt(R);" "===d||"\f"===d||"\t"===d;)R+=1,d=P.charAt(R);if(f=a.exec(P.substring(R))){if(h=(d=R)+f[1].length,f=[m,d],N=[m,h],R=h,d!=h){h=P.substring(d,h);var D=P[d];if(o("0123456789",D)||"."==D&&"."!=h&&"..."!=h)s(new n(l.T_NUMBER,h,f,N,P));else if(o("\r\n",D))s(new n(0<k?l.T_NL:l.T_NEWLINE,h,f,N,P));else if("#"==D)s(new n(l.T_COMMENT,h,f,N,P));else if(o(w,h)){if(!(N=(M=RegExp(_[h])).exec(P.substring(R)))){$=[m,d],E=P.substring(d),T=P;break}R=N[0].length+R,h=P.substring(d,R),s(new n(l.T_STRING,h,f,[m,R],P))}else if(o(x,D)||o(x,h.substring(0,2))||o(x,h.substring(0,3))){if("\n"==h[h.length-1]){$=[m,d],M=RegExp(_[D]||_[h[1]]||_[h[2]]),E=P.substring(d),A=1,T=P;break}s(new n(l.T_STRING,h,f,N,P))}else d=D.normalize("NFKC"),p.test(d)?s(new n(l.T_NAME,h,f,N,P)):"\\"==D?O=1:(o("([{",D)?k+=1:o(")]}",D)&&--k,s(new n(l.T_OP,h,f,N,P)))}}else s(new n(l.T_ERRORTOKEN,P[R],[m,R],[m,R+1],P)),R+=1}}for(var I in i&&!o("\r\n",i[i.length-1])&&s(new n(l.T_NEWLINE,"",[m-1,i.length],[m-1,i.length+1],"")),C.slice(1))s(new n(l.T_DEDENT,"",[m,0],[m,0],""));s(new n(l.T_ENDMARKER,"",[m,0],[m,0],""))},Sk.exportSymbol("Sk._tokenize",Sk._tokenize)},function(e,t){Sk.OpMap={"(":Sk.token.tokens.T_LPAR,")":Sk.token.tokens.T_RPAR,"[":Sk.token.tokens.T_LSQB,"]":Sk.token.tokens.T_RSQB,":":Sk.token.tokens.T_COLON,",":Sk.token.tokens.T_COMMA,";":Sk.token.tokens.T_SEMI,"+":Sk.token.tokens.T_PLUS,"-":Sk.token.tokens.T_MINUS,"*":Sk.token.tokens.T_STAR,"/":Sk.token.tokens.T_SLASH,"|":Sk.token.tokens.T_VBAR,"&":Sk.token.tokens.T_AMPER,"<":Sk.token.tokens.T_LESS,">":Sk.token.tokens.T_GREATER,"=":Sk.token.tokens.T_EQUAL,".":Sk.token.tokens.T_DOT,"%":Sk.token.tokens.T_PERCENT,"`":Sk.token.tokens.T_BACKQUOTE,"{":Sk.token.tokens.T_LBRACE,"}":Sk.token.tokens.T_RBRACE,"@":Sk.token.tokens.T_AT,"@=":Sk.token.tokens.T_ATEQUAL,"==":Sk.token.tokens.T_EQEQUAL,"!=":Sk.token.tokens.T_NOTEQUAL,"<>":Sk.token.tokens.T_NOTEQUAL,"<=":Sk.token.tokens.T_LESSEQUAL,">=":Sk.token.tokens.T_GREATEREQUAL,"~":Sk.token.tokens.T_TILDE,"^":Sk.token.tokens.T_CIRCUMFLEX,"<<":Sk.token.tokens.T_LEFTSHIFT,">>":Sk.token.tokens.T_RIGHTSHIFT,"**":Sk.token.tokens.T_DOUBLESTAR,"+=":Sk.token.tokens.T_PLUSEQUAL,"-=":Sk.token.tokens.T_MINEQUAL,"*=":Sk.token.tokens.T_STAREQUAL,"/=":Sk.token.tokens.T_SLASHEQUAL,"%=":Sk.token.tokens.T_PERCENTEQUAL,"&=":Sk.token.tokens.T_AMPEREQUAL,"|=":Sk.token.tokens.T_VBAREQUAL,"^=":Sk.token.tokens.T_CIRCUMFLEXEQUAL,"<<=":Sk.token.tokens.T_LEFTSHIFTEQUAL,">>=":Sk.token.tokens.T_RIGHTSHIFTEQUAL,"**=":Sk.token.tokens.T_DOUBLESTAREQUAL,"//":Sk.token.tokens.T_DOUBLESLASH,"//=":Sk.token.tokens.T_DOUBLESLASHEQUAL,"->":Sk.token.tokens.T_RARROW,"...":Sk.token.tokens.T_ELLIPSIS},Sk.ParseTables={sym:{and_expr:257,and_test:258,annassign:259,arglist:260,argument:261,arith_expr:262,assert_stmt:263,async_funcdef:264,async_stmt:265,atom:266,atom_expr:267,augassign:268,break_stmt:269,classdef:270,comp_for:271,comp_if:272,comp_iter:273,comp_op:274,comparison:275,compound_stmt:276,continue_stmt:277,debugger_stmt:278,decorated:279,decorator:280,decorators:281,del_stmt:282,dictorsetmaker:283,dotted_as_name:284,dotted_as_names:285,dotted_name:286,encoding_decl:287,eval_input:288,except_clause:289,expr:290,expr_stmt:291,exprlist:292,factor:293,file_input:294,flow_stmt:295,for_stmt:296,funcdef:297,global_stmt:298,if_stmt:299,import_as_name:300,import_as_names:301,import_from:302,import_name:303,import_stmt:304,lambdef:305,lambdef_nocond:306,nonlocal_stmt:307,not_test:308,or_test:309,parameters:310,pass_stmt:311,power:312,print_stmt:313,raise_stmt:314,return_stmt:315,shift_expr:316,simple_stmt:317,single_input:256,sliceop:318,small_stmt:319,star_expr:320,stmt:321,subscript:322,subscriptlist:323,suite:324,term:325,test:326,test_nocond:327,testlist:328,testlist_comp:329,testlist_star_expr:330,tfpdef:331,trailer:332,try_stmt:333,typedargslist:334,varargslist:335,vfpdef:336,while_stmt:337,with_item:338,with_stmt:339,xor_expr:340,yield_arg:341,yield_expr:342,yield_stmt:343},number2symbol:{256:"single_input",257:"and_expr",258:"and_test",259:"annassign",260:"arglist",261:"argument",262:"arith_expr",263:"assert_stmt",264:"async_funcdef",265:"async_stmt",266:"atom",267:"atom_expr",268:"augassign",269:"break_stmt",270:"classdef",271:"comp_for",272:"comp_if",273:"comp_iter",274:"comp_op",275:"comparison",276:"compound_stmt",277:"continue_stmt",278:"debugger_stmt",279:"decorated",280:"decorator",281:"decorators",282:"del_stmt",283:"dictorsetmaker",284:"dotted_as_name",285:"dotted_as_names",286:"dotted_name",287:"encoding_decl",288:"eval_input",289:"except_clause",290:"expr",291:"expr_stmt",292:"exprlist",293:"factor",294:"file_input",295:"flow_stmt",296:"for_stmt",297:"funcdef",298:"global_stmt",299:"if_stmt",300:"import_as_name",301:"import_as_names",302:"import_from",303:"import_name",304:"import_stmt",305:"lambdef",306:"lambdef_nocond",307:"nonlocal_stmt",308:"not_test",309:"or_test",310:"parameters",311:"pass_stmt",312:"power",313:"print_stmt",314:"raise_stmt",315:"return_stmt",316:"shift_expr",317:"simple_stmt",318:"sliceop",319:"small_stmt",320:"star_expr",321:"stmt",322:"subscript",323:"subscriptlist",324:"suite",325:"term",326:"test",327:"test_nocond",328:"testlist",329:"testlist_comp",330:"testlist_star_expr",331:"tfpdef",332:"trailer",333:"try_stmt",334:"typedargslist",335:"varargslist",336:"vfpdef",337:"while_stmt",338:"with_item",339:"with_stmt",340:"xor_expr",341:"yield_arg",342:"yield_expr",343:"yield_stmt"},dfas:{256:[[[[1,1],[2,1],[3,2]],[[0,1]],[[2,1]]],{2:1,4:1,5:1,6:1,7:1,8:1,9:1,10:1,11:1,12:1,13:1,14:1,15:1,16:1,17:1,18:1,19:1,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,34:1,35:1,36:1,37:1,38:1,39:1,40:1,41:1,42:1,43:1}],257:[[[[44,1]],[[45,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],258:[[[[46,1]],[[47,0],[0,1]]],{6:1,7:1,8:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],259:[[[[48,1]],[[49,2]],[[50,3],[0,2]],[[49,4]],[[0,4]]],{48:1}],260:[[[[51,1]],[[52,2],[0,1]],[[51,1],[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1,53:1}],261:[[[[49,1],[15,2],[53,2]],[[50,2],[54,3],[0,1]],[[49,3]],[[0,3]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1,53:1}],262:[[[[55,1]],[[30,0],[43,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],263:[[[[24,1]],[[49,2]],[[52,3],[0,2]],[[49,4]],[[0,4]]],{24:1}],264:[[[[10,1]],[[56,2]],[[0,2]]],{10:1}],265:[[[[10,1]],[[57,2],[56,2],[58,2]],[[0,2]]],{10:1}],266:[[[[6,1],[25,1],[33,1],[9,1],[11,1],[12,2],[35,3],[38,4],[19,1],[7,5]],[[0,1]],[[59,1],[60,6]],[[61,1],[62,7],[63,7]],[[64,1],[63,8]],[[7,5],[0,5]],[[59,1]],[[61,1]],[[64,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,25:1,33:1,35:1,38:1}],267:[[[[29,1],[65,2]],[[65,2]],[[66,2],[0,2]]],{6:1,7:1,9:1,11:1,12:1,19:1,25:1,29:1,33:1,35:1,38:1}],268:[[[[67,1],[68,1],[69,1],[70,1],[71,1],[72,1],[73,1],[74,1],[75,1],[76,1],[77,1],[78,1],[79,1]],[[0,1]]],{67:1,68:1,69:1,70:1,71:1,72:1,73:1,74:1,75:1,76:1,77:1,78:1,79:1}],269:[[[[39,1]],[[0,1]]],{39:1}],270:[[[[13,1]],[[25,2]],[[48,3],[35,4]],[[80,5]],[[61,6],[81,7]],[[0,5]],[[48,3]],[[61,6]]],{13:1}],271:[[[[10,1],[34,2]],[[34,2]],[[82,3]],[[83,4]],[[84,5]],[[85,6],[0,5]],[[0,6]]],{10:1,34:1}],272:[[[[37,1]],[[86,2]],[[85,3],[0,2]],[[0,3]]],{37:1}],273:[[[[87,1],[54,1]],[[0,1]]],{10:1,34:1,37:1}],274:[[[[88,1],[89,1],[8,2],[90,1],[88,1],[83,1],[91,1],[92,3],[93,1],[94,1]],[[0,1]],[[83,1]],[[8,1],[0,3]]],{8:1,83:1,88:1,89:1,90:1,91:1,92:1,93:1,94:1}],275:[[[[95,1]],[[96,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],276:[[[[97,1],[98,1],[58,1],[99,1],[57,1],[100,1],[56,1],[101,1],[102,1]],[[0,1]]],{4:1,10:1,13:1,20:1,21:1,34:1,37:1,41:1,42:1}],277:[[[[40,1]],[[0,1]]],{40:1}],278:[[[[17,1]],[[0,1]]],{17:1}],279:[[[[103,1]],[[56,2],[104,2],[99,2]],[[0,2]]],{41:1}],280:[[[[41,1]],[[105,2]],[[2,4],[35,3]],[[61,5],[81,6]],[[0,4]],[[2,4]],[[61,5]]],{41:1}],281:[[[[106,1]],[[106,1],[0,1]]],{41:1}],282:[[[[27,1]],[[82,2]],[[0,2]]],{27:1}],283:[[[[49,1],[107,2],[53,3]],[[48,4],[54,5],[52,6],[0,1]],[[54,5],[52,6],[0,2]],[[95,7]],[[49,7]],[[0,5]],[[49,8],[107,8],[0,6]],[[54,5],[52,9],[0,7]],[[52,6],[0,8]],[[49,10],[53,11],[0,9]],[[48,12]],[[95,13]],[[49,13]],[[52,9],[0,13]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1,53:1}],284:[[[[105,1]],[[108,2],[0,1]],[[25,3]],[[0,3]]],{25:1}],285:[[[[109,1]],[[52,0],[0,1]]],{25:1}],286:[[[[25,1]],[[110,0],[0,1]]],{25:1}],287:[[[[25,1]],[[0,1]]],{25:1}],288:[[[[111,1]],[[2,1],[112,2]],[[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],289:[[[[113,1]],[[49,2],[0,1]],[[108,3],[52,3],[0,2]],[[49,4]],[[0,4]]],{113:1}],290:[[[[114,1]],[[115,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],291:[[[[116,1]],[[117,2],[50,3],[118,4],[0,1]],[[111,4],[62,4]],[[116,5],[62,5]],[[0,4]],[[50,3],[0,5]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],292:[[[[95,1],[107,1]],[[52,2],[0,1]],[[95,1],[107,1],[0,2]]],{6:1,7:1,9:1,11:1,12:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],293:[[[[119,2],[30,1],[22,1],[43,1]],[[120,2]],[[0,2]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],294:[[[[2,0],[112,1],[121,0]],[[0,1]]],{2:1,4:1,5:1,6:1,7:1,8:1,9:1,10:1,11:1,12:1,13:1,14:1,15:1,16:1,17:1,18:1,19:1,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,34:1,35:1,36:1,37:1,38:1,39:1,40:1,41:1,42:1,43:1,112:1}],295:[[[[122,1],[123,1],[124,1],[125,1],[126,1]],[[0,1]]],{5:1,23:1,31:1,39:1,40:1}],296:[[[[34,1]],[[82,2]],[[83,3]],[[111,4]],[[48,5]],[[80,6]],[[127,7],[0,6]],[[48,8]],[[80,9]],[[0,9]]],{34:1}],297:[[[[4,1]],[[25,2]],[[128,3]],[[48,4],[129,5]],[[80,6]],[[49,7]],[[0,6]],[[48,4]]],{4:1}],298:[[[[26,1]],[[25,2]],[[52,1],[0,2]]],{26:1}],299:[[[[37,1]],[[49,2]],[[48,3]],[[80,4]],[[127,5],[130,1],[0,4]],[[48,6]],[[80,7]],[[0,7]]],{37:1}],300:[[[[25,1]],[[108,2],[0,1]],[[25,3]],[[0,3]]],{25:1}],301:[[[[131,1]],[[52,2],[0,1]],[[131,1],[0,2]]],{25:1}],302:[[[[36,1]],[[105,2],[19,3],[110,3]],[[32,4]],[[105,2],[19,3],[32,4],[110,3]],[[132,5],[15,5],[35,6]],[[0,5]],[[132,7]],[[61,5]]],{36:1}],303:[[[[32,1]],[[133,2]],[[0,2]]],{32:1}],304:[[[[134,1],[135,1]],[[0,1]]],{32:1,36:1}],305:[[[[14,1]],[[48,2],[136,3]],[[49,4]],[[48,2]],[[0,4]]],{14:1}],306:[[[[14,1]],[[48,2],[136,3]],[[86,4]],[[48,2]],[[0,4]]],{14:1}],307:[[[[18,1]],[[25,2]],[[52,1],[0,2]]],{18:1}],308:[[[[8,1],[137,2]],[[46,2]],[[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],309:[[[[138,1]],[[139,0],[0,1]]],{6:1,7:1,8:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],310:[[[[35,1]],[[61,2],[140,3]],[[0,2]],[[61,2]]],{35:1}],311:[[[[28,1]],[[0,1]]],{28:1}],312:[[[[141,1]],[[53,2],[0,1]],[[120,3]],[[0,3]]],{6:1,7:1,9:1,11:1,12:1,19:1,25:1,29:1,33:1,35:1,38:1}],313:[[[[16,1]],[[49,2],[142,3],[0,1]],[[52,4],[0,2]],[[49,5]],[[49,2],[0,4]],[[52,6],[0,5]],[[49,7]],[[52,8],[0,7]],[[49,7],[0,8]]],{16:1}],314:[[[[5,1]],[[49,2],[0,1]],[[36,3],[52,3],[0,2]],[[49,4]],[[52,5],[0,4]],[[49,6]],[[0,6]]],{5:1}],315:[[[[23,1]],[[111,2],[0,1]],[[0,2]]],{23:1}],316:[[[[143,1]],[[144,0],[142,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],317:[[[[145,1]],[[2,2],[146,3]],[[0,2]],[[145,1],[2,2]]],{5:1,6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,16:1,17:1,18:1,19:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,35:1,36:1,38:1,39:1,40:1,43:1}],318:[[[[48,1]],[[49,2],[0,1]],[[0,2]]],{48:1}],319:[[[[147,1],[148,1],[149,1],[150,1],[151,1],[152,1],[153,1],[154,1],[155,1],[156,1]],[[0,1]]],{5:1,6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,16:1,17:1,18:1,19:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,35:1,36:1,38:1,39:1,40:1,43:1}],320:[[[[15,1]],[[95,2]],[[0,2]]],{15:1}],321:[[[[1,1],[3,1]],[[0,1]]],{4:1,5:1,6:1,7:1,8:1,9:1,10:1,11:1,12:1,13:1,14:1,15:1,16:1,17:1,18:1,19:1,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,34:1,35:1,36:1,37:1,38:1,39:1,40:1,41:1,42:1,43:1}],322:[[[[49,1],[48,2]],[[48,2],[0,1]],[[49,3],[157,4],[0,2]],[[157,4],[0,3]],[[0,4]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1,48:1}],323:[[[[158,1]],[[52,2],[0,1]],[[158,1],[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1,48:1}],324:[[[[1,1],[2,2]],[[0,1]],[[159,3]],[[121,4]],[[160,1],[121,4]]],{2:1,5:1,6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,16:1,17:1,18:1,19:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,35:1,36:1,38:1,39:1,40:1,43:1}],325:[[[[120,1]],[[161,0],[15,0],[162,0],[41,0],[163,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],326:[[[[84,1],[164,2]],[[37,3],[0,1]],[[0,2]],[[84,4]],[[127,5]],[[49,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],327:[[[[165,1],[84,1]],[[0,1]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],328:[[[[49,1]],[[52,2],[0,1]],[[49,1],[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],329:[[[[49,1],[107,1]],[[54,2],[52,3],[0,1]],[[0,2]],[[49,4],[107,4],[0,3]],[[52,3],[0,4]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],330:[[[[49,1],[107,1]],[[52,2],[0,1]],[[49,1],[107,1],[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],331:[[[[25,1]],[[48,2],[0,1]],[[49,3]],[[0,3]]],{25:1}],332:[[[[35,1],[110,2],[38,3]],[[61,4],[81,5]],[[25,4]],[[166,6]],[[0,4]],[[61,4]],[[64,4]]],{35:1,38:1,110:1}],333:[[[[20,1]],[[48,2]],[[80,3]],[[167,4],[168,5]],[[48,6]],[[48,7]],[[80,8]],[[80,9]],[[167,4],[127,10],[168,5],[0,8]],[[0,9]],[[48,11]],[[80,12]],[[168,5],[0,12]]],{20:1}],334:[[[[15,1],[169,2],[53,3]],[[169,4],[52,5],[0,1]],[[50,6],[52,7],[0,2]],[[169,8]],[[52,5],[0,4]],[[169,9],[53,3],[0,5]],[[49,10]],[[15,11],[169,2],[53,3],[0,7]],[[52,12],[0,8]],[[50,13],[52,5],[0,9]],[[52,7],[0,10]],[[169,14],[52,15],[0,11]],[[0,12]],[[49,4]],[[52,15],[0,14]],[[169,16],[53,3],[0,15]],[[50,17],[52,15],[0,16]],[[49,14]]],{15:1,25:1,53:1}],335:[[[[15,1],[53,2],[170,3]],[[170,5],[52,4],[0,1]],[[170,6]],[[50,7],[52,8],[0,3]],[[53,2],[170,9],[0,4]],[[52,4],[0,5]],[[52,10],[0,6]],[[49,11]],[[15,12],[53,2],[170,3],[0,8]],[[50,13],[52,4],[0,9]],[[0,10]],[[52,8],[0,11]],[[52,15],[170,14],[0,12]],[[49,5]],[[52,15],[0,14]],[[53,2],[170,16],[0,15]],[[50,17],[52,15],[0,16]],[[49,14]]],{15:1,25:1,53:1}],336:[[[[25,1]],[[0,1]]],{25:1}],337:[[[[21,1]],[[49,2]],[[48,3]],[[80,4]],[[127,5],[0,4]],[[48,6]],[[80,7]],[[0,7]]],{21:1}],338:[[[[49,1]],[[108,2],[0,1]],[[95,3]],[[0,3]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],339:[[[[42,1]],[[171,2]],[[48,3],[52,1]],[[80,4]],[[0,4]]],{42:1}],340:[[[[172,1]],[[173,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],341:[[[[111,2],[36,1]],[[49,2]],[[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,36:1,38:1,43:1}],342:[[[[31,1]],[[174,2],[0,1]],[[0,2]]],{31:1}],343:[[[[62,1]],[[0,1]]],{31:1}]},states:[[[[1,1],[2,1],[3,2]],[[0,1]],[[2,1]]],[[[44,1]],[[45,0],[0,1]]],[[[46,1]],[[47,0],[0,1]]],[[[48,1]],[[49,2]],[[50,3],[0,2]],[[49,4]],[[0,4]]],[[[51,1]],[[52,2],[0,1]],[[51,1],[0,2]]],[[[49,1],[15,2],[53,2]],[[50,2],[54,3],[0,1]],[[49,3]],[[0,3]]],[[[55,1]],[[30,0],[43,0],[0,1]]],[[[24,1]],[[49,2]],[[52,3],[0,2]],[[49,4]],[[0,4]]],[[[10,1]],[[56,2]],[[0,2]]],[[[10,1]],[[57,2],[56,2],[58,2]],[[0,2]]],[[[6,1],[25,1],[33,1],[9,1],[11,1],[12,2],[35,3],[38,4],[19,1],[7,5]],[[0,1]],[[59,1],[60,6]],[[61,1],[62,7],[63,7]],[[64,1],[63,8]],[[7,5],[0,5]],[[59,1]],[[61,1]],[[64,1]]],[[[29,1],[65,2]],[[65,2]],[[66,2],[0,2]]],[[[67,1],[68,1],[69,1],[70,1],[71,1],[72,1],[73,1],[74,1],[75,1],[76,1],[77,1],[78,1],[79,1]],[[0,1]]],[[[39,1]],[[0,1]]],[[[13,1]],[[25,2]],[[48,3],[35,4]],[[80,5]],[[61,6],[81,7]],[[0,5]],[[48,3]],[[61,6]]],[[[10,1],[34,2]],[[34,2]],[[82,3]],[[83,4]],[[84,5]],[[85,6],[0,5]],[[0,6]]],[[[37,1]],[[86,2]],[[85,3],[0,2]],[[0,3]]],[[[87,1],[54,1]],[[0,1]]],[[[88,1],[89,1],[8,2],[90,1],[88,1],[83,1],[91,1],[92,3],[93,1],[94,1]],[[0,1]],[[83,1]],[[8,1],[0,3]]],[[[95,1]],[[96,0],[0,1]]],[[[97,1],[98,1],[58,1],[99,1],[57,1],[100,1],[56,1],[101,1],[102,1]],[[0,1]]],[[[40,1]],[[0,1]]],[[[17,1]],[[0,1]]],[[[103,1]],[[56,2],[104,2],[99,2]],[[0,2]]],[[[41,1]],[[105,2]],[[2,4],[35,3]],[[61,5],[81,6]],[[0,4]],[[2,4]],[[61,5]]],[[[106,1]],[[106,1],[0,1]]],[[[27,1]],[[82,2]],[[0,2]]],[[[49,1],[107,2],[53,3]],[[48,4],[54,5],[52,6],[0,1]],[[54,5],[52,6],[0,2]],[[95,7]],[[49,7]],[[0,5]],[[49,8],[107,8],[0,6]],[[54,5],[52,9],[0,7]],[[52,6],[0,8]],[[49,10],[53,11],[0,9]],[[48,12]],[[95,13]],[[49,13]],[[52,9],[0,13]]],[[[105,1]],[[108,2],[0,1]],[[25,3]],[[0,3]]],[[[109,1]],[[52,0],[0,1]]],[[[25,1]],[[110,0],[0,1]]],[[[25,1]],[[0,1]]],[[[111,1]],[[2,1],[112,2]],[[0,2]]],[[[113,1]],[[49,2],[0,1]],[[108,3],[52,3],[0,2]],[[49,4]],[[0,4]]],[[[114,1]],[[115,0],[0,1]]],[[[116,1]],[[117,2],[50,3],[118,4],[0,1]],[[111,4],[62,4]],[[116,5],[62,5]],[[0,4]],[[50,3],[0,5]]],[[[95,1],[107,1]],[[52,2],[0,1]],[[95,1],[107,1],[0,2]]],[[[119,2],[30,1],[22,1],[43,1]],[[120,2]],[[0,2]]],[[[2,0],[112,1],[121,0]],[[0,1]]],[[[122,1],[123,1],[124,1],[125,1],[126,1]],[[0,1]]],[[[34,1]],[[82,2]],[[83,3]],[[111,4]],[[48,5]],[[80,6]],[[127,7],[0,6]],[[48,8]],[[80,9]],[[0,9]]],[[[4,1]],[[25,2]],[[128,3]],[[48,4],[129,5]],[[80,6]],[[49,7]],[[0,6]],[[48,4]]],[[[26,1]],[[25,2]],[[52,1],[0,2]]],[[[37,1]],[[49,2]],[[48,3]],[[80,4]],[[127,5],[130,1],[0,4]],[[48,6]],[[80,7]],[[0,7]]],[[[25,1]],[[108,2],[0,1]],[[25,3]],[[0,3]]],[[[131,1]],[[52,2],[0,1]],[[131,1],[0,2]]],[[[36,1]],[[105,2],[19,3],[110,3]],[[32,4]],[[105,2],[19,3],[32,4],[110,3]],[[132,5],[15,5],[35,6]],[[0,5]],[[132,7]],[[61,5]]],[[[32,1]],[[133,2]],[[0,2]]],[[[134,1],[135,1]],[[0,1]]],[[[14,1]],[[48,2],[136,3]],[[49,4]],[[48,2]],[[0,4]]],[[[14,1]],[[48,2],[136,3]],[[86,4]],[[48,2]],[[0,4]]],[[[18,1]],[[25,2]],[[52,1],[0,2]]],[[[8,1],[137,2]],[[46,2]],[[0,2]]],[[[138,1]],[[139,0],[0,1]]],[[[35,1]],[[61,2],[140,3]],[[0,2]],[[61,2]]],[[[28,1]],[[0,1]]],[[[141,1]],[[53,2],[0,1]],[[120,3]],[[0,3]]],[[[16,1]],[[49,2],[142,3],[0,1]],[[52,4],[0,2]],[[49,5]],[[49,2],[0,4]],[[52,6],[0,5]],[[49,7]],[[52,8],[0,7]],[[49,7],[0,8]]],[[[5,1]],[[49,2],[0,1]],[[36,3],[52,3],[0,2]],[[49,4]],[[52,5],[0,4]],[[49,6]],[[0,6]]],[[[23,1]],[[111,2],[0,1]],[[0,2]]],[[[143,1]],[[144,0],[142,0],[0,1]]],[[[145,1]],[[2,2],[146,3]],[[0,2]],[[145,1],[2,2]]],[[[48,1]],[[49,2],[0,1]],[[0,2]]],[[[147,1],[148,1],[149,1],[150,1],[151,1],[152,1],[153,1],[154,1],[155,1],[156,1]],[[0,1]]],[[[15,1]],[[95,2]],[[0,2]]],[[[1,1],[3,1]],[[0,1]]],[[[49,1],[48,2]],[[48,2],[0,1]],[[49,3],[157,4],[0,2]],[[157,4],[0,3]],[[0,4]]],[[[158,1]],[[52,2],[0,1]],[[158,1],[0,2]]],[[[1,1],[2,2]],[[0,1]],[[159,3]],[[121,4]],[[160,1],[121,4]]],[[[120,1]],[[161,0],[15,0],[162,0],[41,0],[163,0],[0,1]]],[[[84,1],[164,2]],[[37,3],[0,1]],[[0,2]],[[84,4]],[[127,5]],[[49,2]]],[[[165,1],[84,1]],[[0,1]]],[[[49,1]],[[52,2],[0,1]],[[49,1],[0,2]]],[[[49,1],[107,1]],[[54,2],[52,3],[0,1]],[[0,2]],[[49,4],[107,4],[0,3]],[[52,3],[0,4]]],[[[49,1],[107,1]],[[52,2],[0,1]],[[49,1],[107,1],[0,2]]],[[[25,1]],[[48,2],[0,1]],[[49,3]],[[0,3]]],[[[35,1],[110,2],[38,3]],[[61,4],[81,5]],[[25,4]],[[166,6]],[[0,4]],[[61,4]],[[64,4]]],[[[20,1]],[[48,2]],[[80,3]],[[167,4],[168,5]],[[48,6]],[[48,7]],[[80,8]],[[80,9]],[[167,4],[127,10],[168,5],[0,8]],[[0,9]],[[48,11]],[[80,12]],[[168,5],[0,12]]],[[[15,1],[169,2],[53,3]],[[169,4],[52,5],[0,1]],[[50,6],[52,7],[0,2]],[[169,8]],[[52,5],[0,4]],[[169,9],[53,3],[0,5]],[[49,10]],[[15,11],[169,2],[53,3],[0,7]],[[52,12],[0,8]],[[50,13],[52,5],[0,9]],[[52,7],[0,10]],[[169,14],[52,15],[0,11]],[[0,12]],[[49,4]],[[52,15],[0,14]],[[169,16],[53,3],[0,15]],[[50,17],[52,15],[0,16]],[[49,14]]],[[[15,1],[53,2],[170,3]],[[170,5],[52,4],[0,1]],[[170,6]],[[50,7],[52,8],[0,3]],[[53,2],[170,9],[0,4]],[[52,4],[0,5]],[[52,10],[0,6]],[[49,11]],[[15,12],[53,2],[170,3],[0,8]],[[50,13],[52,4],[0,9]],[[0,10]],[[52,8],[0,11]],[[52,15],[170,14],[0,12]],[[49,5]],[[52,15],[0,14]],[[53,2],[170,16],[0,15]],[[50,17],[52,15],[0,16]],[[49,14]]],[[[25,1]],[[0,1]]],[[[21,1]],[[49,2]],[[48,3]],[[80,4]],[[127,5],[0,4]],[[48,6]],[[80,7]],[[0,7]]],[[[49,1]],[[108,2],[0,1]],[[95,3]],[[0,3]]],[[[42,1]],[[171,2]],[[48,3],[52,1]],[[80,4]],[[0,4]]],[[[172,1]],[[173,0],[0,1]]],[[[111,2],[36,1]],[[49,2]],[[0,2]]],[[[31,1]],[[174,2],[0,1]],[[0,2]]],[[[62,1]],[[0,1]]]],labels:[[0,"EMPTY"],[317,null],[4,null],[276,null],[1,"def"],[1,"raise"],[1,"True"],[3,null],[1,"not"],[1,"null"],[55,null],[2,null],[25,null],[1,"class"],[1,"lambda"],[16,null],[1,"print"],[1,"debugger"],[1,"nonlocal"],[52,null],[1,"try"],[1,"while"],[31,null],[1,"return"],[1,"assert"],[1,null],[1,"global"],[1,"del"],[1,"pass"],[54,null],[15,null],[1,"yield"],[1,"import"],[1,"False"],[1,"for"],[7,null],[1,"from"],[1,"if"],[9,null],[1,"break"],[1,"continue"],[49,null],[1,"with"],[14,null],[316,null],[19,null],[308,null],[1,"and"],[11,null],[326,null],[22,null],[261,null],[12,null],[35,null],[271,null],[325,null],[297,null],[339,null],[296,null],[26,null],[283,null],[8,null],[342,null],[329,null],[10,null],[266,null],[332,null],[45,null],[38,null],[40,null],[50,null],[46,null],[41,null],[42,null],[36,null],[43,null],[48,null],[44,null],[37,null],[39,null],[324,null],[260,null],[292,null],[1,"in"],[309,null],[273,null],[327,null],[272,null],[28,null],[21,null],[27,null],[29,null],[1,"is"],[30,null],[20,null],[290,null],[274,null],[333,null],[299,null],[270,null],[337,null],[279,null],[265,null],[281,null],[264,null],[286,null],[280,null],[320,null],[1,"as"],[284,null],[23,null],[328,null],[0,null],[1,"except"],[340,null],[18,null],[330,null],[268,null],[259,null],[312,null],[293,null],[321,null],[269,null],[277,null],[314,null],[315,null],[343,null],[1,"else"],[310,null],[51,null],[1,"elif"],[300,null],[301,null],[285,null],[303,null],[302,null],[335,null],[275,null],[258,null],[1,"or"],[334,null],[267,null],[34,null],[262,null],[33,null],[319,null],[13,null],[295,null],[263,null],[291,null],[311,null],[307,null],[313,null],[282,null],[298,null],[304,null],[278,null],[318,null],[322,null],[5,null],[6,null],[47,null],[17,null],[24,null],[305,null],[306,null],[323,null],[289,null],[1,"finally"],[331,null],[336,null],[338,null],[257,null],[32,null],[341,null]],keywords:{False:33,null:9,True:6,and:47,as:108,assert:24,break:39,class:13,continue:40,debugger:17,def:4,del:27,elif:130,else:127,except:113,finally:168,for:34,from:36,global:26,if:37,import:32,in:83,is:92,lambda:14,nonlocal:18,not:8,or:139,pass:28,print:16,raise:5,return:23,try:20,while:21,with:42,yield:31},tokens:{0:112,1:25,2:11,3:7,4:2,5:159,6:160,7:35,8:61,9:38,10:64,11:48,12:52,13:146,14:43,15:30,16:15,17:162,18:115,19:45,20:94,21:89,22:50,23:110,24:163,25:12,26:59,27:90,28:88,29:91,30:93,31:22,32:173,33:144,34:142,35:53,36:74,37:78,38:68,39:79,40:69,41:72,42:73,43:75,44:77,45:67,46:71,47:161,48:76,49:41,50:70,51:129,52:19,54:29,55:10},start:256}},function(e,t){function n(e,t){return this.filename=e,this.grammar=t,this.p_flags=0,this}function r(e,t){return void 0===t&&(t="file_input"),e=new n(e,Sk.ParseTables),"file_input"===t?e.setup(Sk.ParseTables.sym.file_input):Sk.asserts.fail("todo;"),e}n.FUTURE_PRINT_FUNCTION="print_function",n.FUTURE_UNICODE_LITERALS="unicode_literals",n.FUTURE_DIVISION="division",n.FUTURE_ABSOLUTE_IMPORT="absolute_import",n.FUTURE_WITH_STATEMENT="with_statement",n.FUTURE_NESTED_SCOPES="nested_scopes",n.FUTURE_GENERATORS="generators",n.CO_FUTURE_PRINT_FUNCTION=65536,n.CO_FUTURE_UNICODE_LITERALS=131072,n.CO_FUTURE_DIVISON=8192,n.CO_FUTURE_ABSOLUTE_IMPORT=16384,n.CO_FUTURE_WITH_STATEMENT=32768,n.prototype.setup=function(e){e=e||this.grammar.start,this.stack=[{dfa:this.grammar.dfas[e],state:0,node:{type:e,value:null,context:null,children:[]}}],this.used_names={}},n.prototype.addtoken=function(e,t,n){var r,i=this.classify(e,t,n);e:for(;;){var o=this.stack[this.stack.length-1],s=o.dfa[0],a=s[o.state];for(r=0;r<a.length;++r){var l=a[r][0],c=a[r][1],u=this.grammar.labels[l][0];if(i===l){for(Sk.asserts.assert(256>u),this.shift(e,t,c,n),n=c;1===s[n].length&&0===s[n][0][0]&&s[n][0][1]===n;){if(this.pop(),0===this.stack.length)return!0;n=(o=this.stack[this.stack.length-1]).state,s=o.dfa[0]}return!1}if(256<=u&&(l=(l=this.grammar.dfas[u])[1]).hasOwnProperty(i)){this.push(u,this.grammar.dfas[u],c,n);continue e}}t:{for(s=[0,o.state],o=a.length;o--;)if(a[o][0]===s[0]&&a[o][1]===s[1]){a=!0;break t}a=!1}if(!a)throw e=n[0][0],new Sk.builtin.SyntaxError("bad input",this.filename,e,n);if(this.pop(),0===this.stack.length)throw new Sk.builtin.SyntaxError("too much input",this.filename)}},n.prototype.classify=function(e,t,r){if(e===Sk.token.tokens.T_NAME){this.used_names[t]=!0;var i=this.grammar.keywords.hasOwnProperty(t)&&this.grammar.keywords[t];if("print"===t&&(this.p_flags&n.CO_FUTURE_PRINT_FUNCTION||!0===Sk.__future__.print_function)&&(i=!1),i)return i}if(!(i=this.grammar.tokens.hasOwnProperty(e)&&this.grammar.tokens[e])){t="#"+e;for(let n in Sk.token.tokens)if(Sk.token.tokens[n]==e){t=n;break}throw new Sk.builtin.SyntaxError("bad token "+t,this.filename,r[0][0],r)}return i},n.prototype.shift=function(e,t,n,r){var i=this.stack[this.stack.length-1].dfa,o=this.stack[this.stack.length-1].node;o.children.push({type:e,value:t,lineno:r[0][0],col_offset:r[0][1],children:null}),this.stack[this.stack.length-1]={dfa:i,state:n,node:o}},n.prototype.push=function(e,t,n,r){e={type:e,value:null,lineno:r[0][0],col_offset:r[0][1],children:[]},this.stack[this.stack.length-1]={dfa:this.stack[this.stack.length-1].dfa,state:n,node:this.stack[this.stack.length-1].node},this.stack.push({dfa:t,state:0,node:e})},n.prototype.pop=function(){var e=this.stack.pop().node;if(e)if(0!==this.stack.length){this.stack[this.stack.length-1].node.children.push(e)}else this.rootnode=e,this.rootnode.used_names=this.used_names},Sk.parse=function(e,t){var n=Sk.token.tokens.T_COMMENT,i=Sk.token.tokens.T_NL,o=Sk.token.tokens.T_OP,s=Sk.token.tokens.T_ENDMARKER,a=Sk.token.tokens.T_ENCODING,l=!1,c=r(e);if(Sk._tokenize(e,function(e){var t=e.split("\n").reverse().map((function(e){return e+"\n"}));return function(){if(0===t.length)throw new Sk.builtin.Exception("EOF");return t.pop()}}(t),"utf-8",(function(e){var t=null;e.type!==n&&e.type!==i&&e.type!==a&&(e.type===o&&(t=Sk.OpMap[e.string]),c.addtoken(t||e.type,e.string,[e.start,e.end,e.line]),e.type===s&&(l=!0))})),!l)throw new Sk.builtin.SyntaxError("incomplete input",this.filename);return{cst:c.rootnode,flags:c.p_flags}},Sk.parseTreeDump=function(e,t){var n,r=""+(t=t||"");if(256<=e.type)for(r+=Sk.ParseTables.number2symbol[e.type]+"\n",n=0;n<e.children.length;++n)r+=Sk.parseTreeDump(e.children[n],t+" ");else r+=Sk.token.tok_name[e.type]+": "+new Sk.builtin.str(e.value).$r().v+"\n";return r},Sk.exportSymbol("Sk.Parser",n),Sk.exportSymbol("Sk.parse",Sk.parse),Sk.exportSymbol("Sk.parseTreeDump",Sk.parseTreeDump)},function(e,t){Sk.astnodes={},Sk.astnodes.Load=function(){},Sk.astnodes.Store=function(){},Sk.astnodes.Del=function(){},Sk.astnodes.AugLoad=function(){},Sk.astnodes.AugStore=function(){},Sk.astnodes.Param=function(){},Sk.astnodes.And=function(){},Sk.astnodes.Or=function(){},Sk.astnodes.Add=function(){},Sk.astnodes.Sub=function(){},Sk.astnodes.Mult=function(){},Sk.astnodes.MatMult=function(){},Sk.astnodes.Div=function(){},Sk.astnodes.Mod=function(){},Sk.astnodes.Pow=function(){},Sk.astnodes.LShift=function(){},Sk.astnodes.RShift=function(){},Sk.astnodes.BitOr=function(){},Sk.astnodes.BitXor=function(){},Sk.astnodes.BitAnd=function(){},Sk.astnodes.FloorDiv=function(){},Sk.astnodes.Invert=function(){},Sk.astnodes.Not=function(){},Sk.astnodes.UAdd=function(){},Sk.astnodes.USub=function(){},Sk.astnodes.Eq=function(){},Sk.astnodes.NotEq=function(){},Sk.astnodes.Lt=function(){},Sk.astnodes.LtE=function(){},Sk.astnodes.Gt=function(){},Sk.astnodes.GtE=function(){},Sk.astnodes.Is=function(){},Sk.astnodes.IsNot=function(){},Sk.astnodes.In=function(){},Sk.astnodes.NotIn=function(){},Sk.astnodes.Module=function(e,t){return this.body=e,this.docstring=t,this},Sk.astnodes.Interactive=function(e){return this.body=e,this},Sk.astnodes.Expression=function(e){return this.body=e,this},Sk.astnodes.Suite=function(e){return this.body=e,this},Sk.astnodes.FunctionDef=function(e,t,n,r,i,o,s,a){return Sk.asserts.assert(null!=s),Sk.asserts.assert(null!=a),this.name=e,this.args=t,this.body=n,this.decorator_list=r,this.returns=i,this.docstring=o,this.lineno=s,this.col_offset=a,this},Sk.astnodes.AsyncFunctionDef=function(e,t,n,r,i,o,s,a){return Sk.asserts.assert(null!=s),Sk.asserts.assert(null!=a),this.name=e,this.args=t,this.body=n,this.decorator_list=r,this.returns=i,this.docstring=o,this.lineno=s,this.col_offset=a,this},Sk.astnodes.ClassDef=function(e,t,n,r,i,o,s,a){return Sk.asserts.assert(null!=s),Sk.asserts.assert(null!=a),this.name=e,this.bases=t,this.keywords=n,this.body=r,this.decorator_list=i,this.docstring=o,this.lineno=s,this.col_offset=a,this},Sk.astnodes.Return=function(e,t,n){return Sk.asserts.assert(null!=t),Sk.asserts.assert(null!=n),this.value=e,this.lineno=t,this.col_offset=n,this},Sk.astnodes.Delete=function(e,t,n){return Sk.asserts.assert(null!=t),Sk.asserts.assert(null!=n),this.targets=e,this.lineno=t,this.col_offset=n,this},Sk.astnodes.Assign=function(e,t,n,r){return Sk.asserts.assert(null!=n),Sk.asserts.assert(null!=r),this.targets=e,this.value=t,this.lineno=n,this.col_offset=r,this},Sk.astnodes.AugAssign=function(e,t,n,r,i){return Sk.asserts.assert(null!=r),Sk.asserts.assert(null!=i),this.target=e,this.op=t,this.value=n,this.lineno=r,this.col_offset=i,this},Sk.astnodes.AnnAssign=function(e,t,n,r,i,o){return Sk.asserts.assert(null!=i),Sk.asserts.assert(null!=o),this.target=e,this.annotation=t,this.value=n,this.simple=r,this.lineno=i,this.col_offset=o,this},Sk.astnodes.For=function(e,t,n,r,i,o){return Sk.asserts.assert(null!=i),Sk.asserts.assert(null!=o),this.target=e,this.iter=t,this.body=n,this.orelse=r,this.lineno=i,this.col_offset=o,this},Sk.astnodes.AsyncFor=function(e,t,n,r,i,o){return Sk.asserts.assert(null!=i),Sk.asserts.assert(null!=o),this.target=e,this.iter=t,this.body=n,this.orelse=r,this.lineno=i,this.col_offset=o,this},Sk.astnodes.While=function(e,t,n,r,i){return Sk.asserts.assert(null!=r),Sk.asserts.assert(null!=i),this.test=e,this.body=t,this.orelse=n,this.lineno=r,this.col_offset=i,this},Sk.astnodes.If=function(e,t,n,r,i){return Sk.asserts.assert(null!=r),Sk.asserts.assert(null!=i),this.test=e,this.body=t,this.orelse=n,this.lineno=r,this.col_offset=i,this},Sk.astnodes.With=function(e,t,n,r){return Sk.asserts.assert(null!=n),Sk.asserts.assert(null!=r),this.items=e,this.body=t,this.lineno=n,this.col_offset=r,this},Sk.astnodes.AsyncWith=function(e,t,n,r){return Sk.asserts.assert(null!=n),Sk.asserts.assert(null!=r),this.items=e,this.body=t,this.lineno=n,this.col_offset=r,this},Sk.astnodes.Raise=function(e,t,n,r,i,o){return Sk.asserts.assert(null!=i),Sk.asserts.assert(null!=o),this.exc=e,this.cause=t,this.inst=n,this.tback=r,this.lineno=i,this.col_offset=o,this},Sk.astnodes.Try=function(e,t,n,r,i,o){return Sk.asserts.assert(null!=i),Sk.asserts.assert(null!=o),this.body=e,this.handlers=t,this.orelse=n,this.finalbody=r,this.lineno=i,this.col_offset=o,this},Sk.astnodes.Assert=function(e,t,n,r){return Sk.asserts.assert(null!=n),Sk.asserts.assert(null!=r),this.test=e,this.msg=t,this.lineno=n,this.col_offset=r,this},Sk.astnodes.Import=function(e,t,n){return Sk.asserts.assert(null!=t),Sk.asserts.assert(null!=n),this.names=e,this.lineno=t,this.col_offset=n,this},Sk.astnodes.ImportFrom=function(e,t,n,r,i){return Sk.asserts.assert(null!=r),Sk.asserts.assert(null!=i),this.module=e,this.names=t,this.level=n,this.lineno=r,this.col_offset=i,this},Sk.astnodes.Global=function(e,t,n){return Sk.asserts.assert(null!=t),Sk.asserts.assert(null!=n),this.names=e,this.lineno=t,this.col_offset=n,this},Sk.astnodes.Nonlocal=function(e,t,n){return Sk.asserts.assert(null!=t),Sk.asserts.assert(null!=n),this.names=e,this.lineno=t,this.col_offset=n,this},Sk.astnodes.Expr=function(e,t,n){return Sk.asserts.assert(null!=t),Sk.asserts.assert(null!=n),this.value=e,this.lineno=t,this.col_offset=n,this},Sk.astnodes.Pass=function(e,t){return Sk.asserts.assert(null!=e),Sk.asserts.assert(null!=t),this.lineno=e,this.col_offset=t,this},Sk.astnodes.Break=function(e,t){return Sk.asserts.assert(null!=e),Sk.asserts.assert(null!=t),this.lineno=e,this.col_offset=t,this},Sk.astnodes.Continue=function(e,t){return Sk.asserts.assert(null!=e),Sk.asserts.assert(null!=t),this.lineno=e,this.col_offset=t,this},Sk.astnodes.Print=function(e,t,n,r,i){return Sk.asserts.assert(null!=r),Sk.asserts.assert(null!=i),this.dest=e,this.values=t,this.nl=n,this.lineno=r,this.col_offset=i,this},Sk.astnodes.Debugger=function(e,t){return Sk.asserts.assert(null!=e),Sk.asserts.assert(null!=t),this.lineno=e,this.col_offset=t,this},Sk.astnodes.BoolOp=function(e,t,n,r){return Sk.asserts.assert(null!=n),Sk.asserts.assert(null!=r),this.op=e,this.values=t,this.lineno=n,this.col_offset=r,this},Sk.astnodes.BinOp=function(e,t,n,r,i){return Sk.asserts.assert(null!=r),Sk.asserts.assert(null!=i),this.left=e,this.op=t,this.right=n,this.lineno=r,this.col_offset=i,this},Sk.astnodes.UnaryOp=function(e,t,n,r){return Sk.asserts.assert(null!=n),Sk.asserts.assert(null!=r),this.op=e,this.operand=t,this.lineno=n,this.col_offset=r,this},Sk.astnodes.Lambda=function(e,t,n,r){return Sk.asserts.assert(null!=n),Sk.asserts.assert(null!=r),this.args=e,this.body=t,this.lineno=n,this.col_offset=r,this},Sk.astnodes.IfExp=function(e,t,n,r,i){return Sk.asserts.assert(null!=r),Sk.asserts.assert(null!=i),this.test=e,this.body=t,this.orelse=n,this.lineno=r,this.col_offset=i,this},Sk.astnodes.Dict=function(e,t,n,r){return Sk.asserts.assert(null!=n),Sk.asserts.assert(null!=r),this.keys=e,this.values=t,this.lineno=n,this.col_offset=r,this},Sk.astnodes.Set=function(e,t,n){return Sk.asserts.assert(null!=t),Sk.asserts.assert(null!=n),this.elts=e,this.lineno=t,this.col_offset=n,this},Sk.astnodes.ListComp=function(e,t,n,r){return Sk.asserts.assert(null!=n),Sk.asserts.assert(null!=r),this.elt=e,this.generators=t,this.lineno=n,this.col_offset=r,this},Sk.astnodes.SetComp=function(e,t,n,r){return Sk.asserts.assert(null!=n),Sk.asserts.assert(null!=r),this.elt=e,this.generators=t,this.lineno=n,this.col_offset=r,this},Sk.astnodes.DictComp=function(e,t,n,r,i){return Sk.asserts.assert(null!=r),Sk.asserts.assert(null!=i),this.key=e,this.value=t,this.generators=n,this.lineno=r,this.col_offset=i,this},Sk.astnodes.GeneratorExp=function(e,t,n,r){return Sk.asserts.assert(null!=n),Sk.asserts.assert(null!=r),this.elt=e,this.generators=t,this.lineno=n,this.col_offset=r,this},Sk.astnodes.Await=function(e,t,n){return Sk.asserts.assert(null!=t),Sk.asserts.assert(null!=n),this.value=e,this.lineno=t,this.col_offset=n,this},Sk.astnodes.Yield=function(e,t,n){return Sk.asserts.assert(null!=t),Sk.asserts.assert(null!=n),this.value=e,this.lineno=t,this.col_offset=n,this},Sk.astnodes.YieldFrom=function(e,t,n){return Sk.asserts.assert(null!=t),Sk.asserts.assert(null!=n),this.value=e,this.lineno=t,this.col_offset=n,this},Sk.astnodes.Compare=function(e,t,n,r,i){return Sk.asserts.assert(null!=r),Sk.asserts.assert(null!=i),this.left=e,this.ops=t,this.comparators=n,this.lineno=r,this.col_offset=i,this},Sk.astnodes.Call=function(e,t,n,r,i){return Sk.asserts.assert(null!=r),Sk.asserts.assert(null!=i),this.func=e,this.args=t,this.keywords=n,this.lineno=r,this.col_offset=i,this},Sk.astnodes.Num=function(e,t,n){return Sk.asserts.assert(null!=t),Sk.asserts.assert(null!=n),this.n=e,this.lineno=t,this.col_offset=n,this},Sk.astnodes.Str=function(e,t,n){return Sk.asserts.assert(null!=t),Sk.asserts.assert(null!=n),this.s=e,this.lineno=t,this.col_offset=n,this},Sk.astnodes.FormattedValue=function(e,t,n,r,i){return Sk.asserts.assert(null!=r),Sk.asserts.assert(null!=i),this.value=e,this.conversion=t,this.format_spec=n,this.lineno=r,this.col_offset=i,this},Sk.astnodes.JoinedStr=function(e,t,n){return Sk.asserts.assert(null!=t),Sk.asserts.assert(null!=n),this.values=e,this.lineno=t,this.col_offset=n,this},Sk.astnodes.Bytes=function(e,t,n){return Sk.asserts.assert(null!=t),Sk.asserts.assert(null!=n),this.s=e,this.lineno=t,this.col_offset=n,this},Sk.astnodes.NameConstant=function(e,t,n){return Sk.asserts.assert(null!=t),Sk.asserts.assert(null!=n),this.value=e,this.lineno=t,this.col_offset=n,this},Sk.astnodes.Ellipsis=function(e,t){return Sk.asserts.assert(null!=e),Sk.asserts.assert(null!=t),this.lineno=e,this.col_offset=t,this},Sk.astnodes.Constant=function(e,t,n){return Sk.asserts.assert(null!=t),Sk.asserts.assert(null!=n),this.value=e,this.lineno=t,this.col_offset=n,this},Sk.astnodes.Attribute=function(e,t,n,r,i){return Sk.asserts.assert(null!=r),Sk.asserts.assert(null!=i),this.value=e,this.attr=t,this.ctx=n,this.lineno=r,this.col_offset=i,this},Sk.astnodes.Subscript=function(e,t,n,r,i){return Sk.asserts.assert(null!=r),Sk.asserts.assert(null!=i),this.value=e,this.slice=t,this.ctx=n,this.lineno=r,this.col_offset=i,this},Sk.astnodes.Starred=function(e,t,n,r){return Sk.asserts.assert(null!=n),Sk.asserts.assert(null!=r),this.value=e,this.ctx=t,this.lineno=n,this.col_offset=r,this},Sk.astnodes.Name=function(e,t,n,r){return Sk.asserts.assert(null!=n),Sk.asserts.assert(null!=r),this.id=e,this.ctx=t,this.lineno=n,this.col_offset=r,this},Sk.astnodes.List=function(e,t,n,r){return Sk.asserts.assert(null!=n),Sk.asserts.assert(null!=r),this.elts=e,this.ctx=t,this.lineno=n,this.col_offset=r,this},Sk.astnodes.Tuple=function(e,t,n,r){return Sk.asserts.assert(null!=n),Sk.asserts.assert(null!=r),this.elts=e,this.ctx=t,this.lineno=n,this.col_offset=r,this},Sk.astnodes.Slice=function(e,t,n){return this.lower=e,this.upper=t,this.step=n,this},Sk.astnodes.ExtSlice=function(e){return this.dims=e,this},Sk.astnodes.Index=function(e){return this.value=e,this},Sk.astnodes.comprehension=function(e,t,n,r){return this.target=e,this.iter=t,this.ifs=n,this.is_async=r,this},Sk.astnodes.ExceptHandler=function(e,t,n,r,i){return Sk.asserts.assert(null!=r),Sk.asserts.assert(null!=i),this.type=e,this.name=t,this.body=n,this.lineno=r,this.col_offset=i,this},Sk.astnodes.arguments_=function(e,t,n,r,i,o){return this.args=e,this.vararg=t,this.kwonlyargs=n,this.kw_defaults=r,this.kwarg=i,this.defaults=o,this},Sk.astnodes.arg=function(e,t){return this.arg=e,this.annotation=t,this},Sk.astnodes.keyword=function(e,t){return this.arg=e,this.value=t,this},Sk.astnodes.alias=function(e,t){return this.name=e,this.asname=t,this},Sk.astnodes.withitem=function(e,t){return this.context_expr=e,this.optional_vars=t,this},Sk.astnodes.Module.prototype._astname="Module",Sk.astnodes.Module.prototype._fields=["body",function(e){return e.body},"docstring",function(e){return e.docstring}],Sk.astnodes.Interactive.prototype._astname="Interactive",Sk.astnodes.Interactive.prototype._fields=["body",function(e){return e.body}],Sk.astnodes.Expression.prototype._astname="Expression",Sk.astnodes.Expression.prototype._fields=["body",function(e){return e.body}],Sk.astnodes.Suite.prototype._astname="Suite",Sk.astnodes.Suite.prototype._fields=["body",function(e){return e.body}],Sk.astnodes.FunctionDef.prototype._astname="FunctionDef",Sk.astnodes.FunctionDef.prototype._fields=["name",function(e){return e.name},"args",function(e){return e.args},"body",function(e){return e.body},"decorator_list",function(e){return e.decorator_list},"returns",function(e){return e.returns},"docstring",function(e){return e.docstring}],Sk.astnodes.AsyncFunctionDef.prototype._astname="AsyncFunctionDef",Sk.astnodes.AsyncFunctionDef.prototype._fields=["name",function(e){return e.name},"args",function(e){return e.args},"body",function(e){return e.body},"decorator_list",function(e){return e.decorator_list},"returns",function(e){return e.returns},"docstring",function(e){return e.docstring}],Sk.astnodes.ClassDef.prototype._astname="ClassDef",Sk.astnodes.ClassDef.prototype._fields=["name",function(e){return e.name},"bases",function(e){return e.bases},"keywords",function(e){return e.keywords},"body",function(e){return e.body},"decorator_list",function(e){return e.decorator_list},"docstring",function(e){return e.docstring}],Sk.astnodes.Return.prototype._astname="Return",Sk.astnodes.Return.prototype._fields=["value",function(e){return e.value}],Sk.astnodes.Delete.prototype._astname="Delete",Sk.astnodes.Delete.prototype._fields=["targets",function(e){return e.targets}],Sk.astnodes.Assign.prototype._astname="Assign",Sk.astnodes.Assign.prototype._fields=["targets",function(e){return e.targets},"value",function(e){return e.value}],Sk.astnodes.AugAssign.prototype._astname="AugAssign",Sk.astnodes.AugAssign.prototype._fields=["target",function(e){return e.target},"op",function(e){return e.op},"value",function(e){return e.value}],Sk.astnodes.AnnAssign.prototype._astname="AnnAssign",Sk.astnodes.AnnAssign.prototype._fields=["target",function(e){return e.target},"annotation",function(e){return e.annotation},"value",function(e){return e.value},"simple",function(e){return e.simple}],Sk.astnodes.For.prototype._astname="For",Sk.astnodes.For.prototype._fields=["target",function(e){return e.target},"iter",function(e){return e.iter},"body",function(e){return e.body},"orelse",function(e){return e.orelse}],Sk.astnodes.AsyncFor.prototype._astname="AsyncFor",Sk.astnodes.AsyncFor.prototype._fields=["target",function(e){return e.target},"iter",function(e){return e.iter},"body",function(e){return e.body},"orelse",function(e){return e.orelse}],Sk.astnodes.While.prototype._astname="While",Sk.astnodes.While.prototype._fields=["test",function(e){return e.test},"body",function(e){return e.body},"orelse",function(e){return e.orelse}],Sk.astnodes.If.prototype._astname="If",Sk.astnodes.If.prototype._fields=["test",function(e){return e.test},"body",function(e){return e.body},"orelse",function(e){return e.orelse}],Sk.astnodes.With.prototype._astname="With",Sk.astnodes.With.prototype._fields=["items",function(e){return e.items},"body",function(e){return e.body}],Sk.astnodes.AsyncWith.prototype._astname="AsyncWith",Sk.astnodes.AsyncWith.prototype._fields=["items",function(e){return e.items},"body",function(e){return e.body}],Sk.astnodes.Raise.prototype._astname="Raise",Sk.astnodes.Raise.prototype._fields=["exc",function(e){return e.exc},"cause",function(e){return e.cause},"inst",function(e){return e.inst},"tback",function(e){return e.tback}],Sk.astnodes.Try.prototype._astname="Try",Sk.astnodes.Try.prototype._fields=["body",function(e){return e.body},"handlers",function(e){return e.handlers},"orelse",function(e){return e.orelse},"finalbody",function(e){return e.finalbody}],Sk.astnodes.Assert.prototype._astname="Assert",Sk.astnodes.Assert.prototype._fields=["test",function(e){return e.test},"msg",function(e){return e.msg}],Sk.astnodes.Import.prototype._astname="Import",Sk.astnodes.Import.prototype._fields=["names",function(e){return e.names}],Sk.astnodes.ImportFrom.prototype._astname="ImportFrom",Sk.astnodes.ImportFrom.prototype._fields=["module",function(e){return e.module},"names",function(e){return e.names},"level",function(e){return e.level}],Sk.astnodes.Global.prototype._astname="Global",Sk.astnodes.Global.prototype._fields=["names",function(e){return e.names}],Sk.astnodes.Nonlocal.prototype._astname="Nonlocal",Sk.astnodes.Nonlocal.prototype._fields=["names",function(e){return e.names}],Sk.astnodes.Expr.prototype._astname="Expr",Sk.astnodes.Expr.prototype._fields=["value",function(e){return e.value}],Sk.astnodes.Pass.prototype._astname="Pass",Sk.astnodes.Pass.prototype._fields=[],Sk.astnodes.Break.prototype._astname="Break",Sk.astnodes.Break.prototype._fields=[],Sk.astnodes.Continue.prototype._astname="Continue",Sk.astnodes.Continue.prototype._fields=[],Sk.astnodes.Print.prototype._astname="Print",Sk.astnodes.Print.prototype._fields=["dest",function(e){return e.dest},"values",function(e){return e.values},"nl",function(e){return e.nl}],Sk.astnodes.Debugger.prototype._astname="Debugger",Sk.astnodes.Debugger.prototype._fields=[],Sk.astnodes.BoolOp.prototype._astname="BoolOp",Sk.astnodes.BoolOp.prototype._fields=["op",function(e){return e.op},"values",function(e){return e.values}],Sk.astnodes.BinOp.prototype._astname="BinOp",Sk.astnodes.BinOp.prototype._fields=["left",function(e){return e.left},"op",function(e){return e.op},"right",function(e){return e.right}],Sk.astnodes.UnaryOp.prototype._astname="UnaryOp",Sk.astnodes.UnaryOp.prototype._fields=["op",function(e){return e.op},"operand",function(e){return e.operand}],Sk.astnodes.Lambda.prototype._astname="Lambda",Sk.astnodes.Lambda.prototype._fields=["args",function(e){return e.args},"body",function(e){return e.body}],Sk.astnodes.IfExp.prototype._astname="IfExp",Sk.astnodes.IfExp.prototype._fields=["test",function(e){return e.test},"body",function(e){return e.body},"orelse",function(e){return e.orelse}],Sk.astnodes.Dict.prototype._astname="Dict",Sk.astnodes.Dict.prototype._fields=["keys",function(e){return e.keys},"values",function(e){return e.values}],Sk.astnodes.Set.prototype._astname="Set",Sk.astnodes.Set.prototype._fields=["elts",function(e){return e.elts}],Sk.astnodes.ListComp.prototype._astname="ListComp",Sk.astnodes.ListComp.prototype._fields=["elt",function(e){return e.elt},"generators",function(e){return e.generators}],Sk.astnodes.SetComp.prototype._astname="SetComp",Sk.astnodes.SetComp.prototype._fields=["elt",function(e){return e.elt},"generators",function(e){return e.generators}],Sk.astnodes.DictComp.prototype._astname="DictComp",Sk.astnodes.DictComp.prototype._fields=["key",function(e){return e.key},"value",function(e){return e.value},"generators",function(e){return e.generators}],Sk.astnodes.GeneratorExp.prototype._astname="GeneratorExp",Sk.astnodes.GeneratorExp.prototype._fields=["elt",function(e){return e.elt},"generators",function(e){return e.generators}],Sk.astnodes.Await.prototype._astname="Await",Sk.astnodes.Await.prototype._fields=["value",function(e){return e.value}],Sk.astnodes.Yield.prototype._astname="Yield",Sk.astnodes.Yield.prototype._fields=["value",function(e){return e.value}],Sk.astnodes.YieldFrom.prototype._astname="YieldFrom",Sk.astnodes.YieldFrom.prototype._fields=["value",function(e){return e.value}],Sk.astnodes.Compare.prototype._astname="Compare",Sk.astnodes.Compare.prototype._fields=["left",function(e){return e.left},"ops",function(e){return e.ops},"comparators",function(e){return e.comparators}],Sk.astnodes.Call.prototype._astname="Call",Sk.astnodes.Call.prototype._fields=["func",function(e){return e.func},"args",function(e){return e.args},"keywords",function(e){return e.keywords}],Sk.astnodes.Num.prototype._astname="Num",Sk.astnodes.Num.prototype._fields=["n",function(e){return e.n}],Sk.astnodes.Str.prototype._astname="Str",Sk.astnodes.Str.prototype._fields=["s",function(e){return e.s}],Sk.astnodes.FormattedValue.prototype._astname="FormattedValue",Sk.astnodes.FormattedValue.prototype._fields=["value",function(e){return e.value},"conversion",function(e){return e.conversion},"format_spec",function(e){return e.format_spec}],Sk.astnodes.JoinedStr.prototype._astname="JoinedStr",Sk.astnodes.JoinedStr.prototype._fields=["values",function(e){return e.values}],Sk.astnodes.Bytes.prototype._astname="Bytes",Sk.astnodes.Bytes.prototype._fields=["s",function(e){return e.s}],Sk.astnodes.NameConstant.prototype._astname="NameConstant",Sk.astnodes.NameConstant.prototype._fields=["value",function(e){return e.value}],Sk.astnodes.Ellipsis.prototype._astname="Ellipsis",Sk.astnodes.Ellipsis.prototype._fields=[],Sk.astnodes.Constant.prototype._astname="Constant",Sk.astnodes.Constant.prototype._fields=["value",function(e){return e.value}],Sk.astnodes.Attribute.prototype._astname="Attribute",Sk.astnodes.Attribute.prototype._fields=["value",function(e){return e.value},"attr",function(e){return e.attr},"ctx",function(e){return e.ctx}],Sk.astnodes.Subscript.prototype._astname="Subscript",Sk.astnodes.Subscript.prototype._fields=["value",function(e){return e.value},"slice",function(e){return e.slice},"ctx",function(e){return e.ctx}],Sk.astnodes.Starred.prototype._astname="Starred",Sk.astnodes.Starred.prototype._fields=["value",function(e){return e.value},"ctx",function(e){return e.ctx}],Sk.astnodes.Name.prototype._astname="Name",Sk.astnodes.Name.prototype._fields=["id",function(e){return e.id},"ctx",function(e){return e.ctx}],Sk.astnodes.List.prototype._astname="List",Sk.astnodes.List.prototype._fields=["elts",function(e){return e.elts},"ctx",function(e){return e.ctx}],Sk.astnodes.Tuple.prototype._astname="Tuple",Sk.astnodes.Tuple.prototype._fields=["elts",function(e){return e.elts},"ctx",function(e){return e.ctx}],Sk.astnodes.Load.prototype._astname="Load",Sk.astnodes.Load.prototype._isenum=!0,Sk.astnodes.Store.prototype._astname="Store",Sk.astnodes.Store.prototype._isenum=!0,Sk.astnodes.Del.prototype._astname="Del",Sk.astnodes.Del.prototype._isenum=!0,Sk.astnodes.AugLoad.prototype._astname="AugLoad",Sk.astnodes.AugLoad.prototype._isenum=!0,Sk.astnodes.AugStore.prototype._astname="AugStore",Sk.astnodes.AugStore.prototype._isenum=!0,Sk.astnodes.Param.prototype._astname="Param",Sk.astnodes.Param.prototype._isenum=!0,Sk.astnodes.Slice.prototype._astname="Slice",Sk.astnodes.Slice.prototype._fields=["lower",function(e){return e.lower},"upper",function(e){return e.upper},"step",function(e){return e.step}],Sk.astnodes.ExtSlice.prototype._astname="ExtSlice",Sk.astnodes.ExtSlice.prototype._fields=["dims",function(e){return e.dims}],Sk.astnodes.Index.prototype._astname="Index",Sk.astnodes.Index.prototype._fields=["value",function(e){return e.value}],Sk.astnodes.And.prototype._astname="And",Sk.astnodes.And.prototype._isenum=!0,Sk.astnodes.Or.prototype._astname="Or",Sk.astnodes.Or.prototype._isenum=!0,Sk.astnodes.Add.prototype._astname="Add",Sk.astnodes.Add.prototype._isenum=!0,Sk.astnodes.Sub.prototype._astname="Sub",Sk.astnodes.Sub.prototype._isenum=!0,Sk.astnodes.Mult.prototype._astname="Mult",Sk.astnodes.Mult.prototype._isenum=!0,Sk.astnodes.MatMult.prototype._astname="MatMult",Sk.astnodes.MatMult.prototype._isenum=!0,Sk.astnodes.Div.prototype._astname="Div",Sk.astnodes.Div.prototype._isenum=!0,Sk.astnodes.Mod.prototype._astname="Mod",Sk.astnodes.Mod.prototype._isenum=!0,Sk.astnodes.Pow.prototype._astname="Pow",Sk.astnodes.Pow.prototype._isenum=!0,Sk.astnodes.LShift.prototype._astname="LShift",Sk.astnodes.LShift.prototype._isenum=!0,Sk.astnodes.RShift.prototype._astname="RShift",Sk.astnodes.RShift.prototype._isenum=!0,Sk.astnodes.BitOr.prototype._astname="BitOr",Sk.astnodes.BitOr.prototype._isenum=!0,Sk.astnodes.BitXor.prototype._astname="BitXor",Sk.astnodes.BitXor.prototype._isenum=!0,Sk.astnodes.BitAnd.prototype._astname="BitAnd",Sk.astnodes.BitAnd.prototype._isenum=!0,Sk.astnodes.FloorDiv.prototype._astname="FloorDiv",Sk.astnodes.FloorDiv.prototype._isenum=!0,Sk.astnodes.Invert.prototype._astname="Invert",Sk.astnodes.Invert.prototype._isenum=!0,Sk.astnodes.Not.prototype._astname="Not",Sk.astnodes.Not.prototype._isenum=!0,Sk.astnodes.UAdd.prototype._astname="UAdd",Sk.astnodes.UAdd.prototype._isenum=!0,Sk.astnodes.USub.prototype._astname="USub",Sk.astnodes.USub.prototype._isenum=!0,Sk.astnodes.Eq.prototype._astname="Eq",Sk.astnodes.Eq.prototype._isenum=!0,Sk.astnodes.NotEq.prototype._astname="NotEq",Sk.astnodes.NotEq.prototype._isenum=!0,Sk.astnodes.Lt.prototype._astname="Lt",Sk.astnodes.Lt.prototype._isenum=!0,Sk.astnodes.LtE.prototype._astname="LtE",Sk.astnodes.LtE.prototype._isenum=!0,Sk.astnodes.Gt.prototype._astname="Gt",Sk.astnodes.Gt.prototype._isenum=!0,Sk.astnodes.GtE.prototype._astname="GtE",Sk.astnodes.GtE.prototype._isenum=!0,Sk.astnodes.Is.prototype._astname="Is",Sk.astnodes.Is.prototype._isenum=!0,Sk.astnodes.IsNot.prototype._astname="IsNot",Sk.astnodes.IsNot.prototype._isenum=!0,Sk.astnodes.In.prototype._astname="In",Sk.astnodes.In.prototype._isenum=!0,Sk.astnodes.NotIn.prototype._astname="NotIn",Sk.astnodes.NotIn.prototype._isenum=!0,Sk.astnodes.comprehension.prototype._astname="comprehension",Sk.astnodes.comprehension.prototype._fields=["target",function(e){return e.target},"iter",function(e){return e.iter},"ifs",function(e){return e.ifs},"is_async",function(e){return e.is_async}],Sk.astnodes.ExceptHandler.prototype._astname="ExceptHandler",Sk.astnodes.ExceptHandler.prototype._fields=["type",function(e){return e.type},"name",function(e){return e.name},"body",function(e){return e.body}],Sk.astnodes.arguments_.prototype._astname="arguments",Sk.astnodes.arguments_.prototype._fields=["args",function(e){return e.args},"vararg",function(e){return e.vararg},"kwonlyargs",function(e){return e.kwonlyargs},"kw_defaults",function(e){return e.kw_defaults},"kwarg",function(e){return e.kwarg},"defaults",function(e){return e.defaults}],Sk.astnodes.arg.prototype._astname="arg",Sk.astnodes.arg.prototype._fields=["arg",function(e){return e.arg},"annotation",function(e){return e.annotation}],Sk.astnodes.keyword.prototype._astname="keyword",Sk.astnodes.keyword.prototype._fields=["arg",function(e){return e.arg},"value",function(e){return e.value}],Sk.astnodes.alias.prototype._astname="alias",Sk.astnodes.alias.prototype._fields=["name",function(e){return e.name},"asname",function(e){return e.asname}],Sk.astnodes.withitem.prototype._astname="withitem",Sk.astnodes.withitem.prototype._fields=["context_expr",function(e){return e.context_expr},"optional_vars",function(e){return e.optional_vars}],Sk.exportSymbol("Sk.astnodes",Sk.astnodes)},function(e,t){function n(e,t,n){this.c_encoding=e,this.c_filename=t,this.c_flags=n||0}function r(e){return Sk.asserts.assert(void 0!==e,"node must be defined"),null===e.children?0:e.children.length}function i(e,t){return Sk.asserts.assert(void 0!==e,"node must be defined"),Sk.asserts.assert(void 0!==t,"index of child must be specified"),e.children[t]}function o(e,t){Sk.asserts.assert(e.type===t,"node wasn't expected type")}function s(e,t,n){throw new Sk.builtin.SyntaxError(n,e.c_filename,t.lineno)}function a(e){return Sk.asserts.assert("string"==typeof e,"expecting string, got "+typeof e),new Sk.builtin.str(e)}function l(e){var t,n;switch(e.type){case z.single_input:if(i(e,0).type===F.T_NEWLINE)break;return l(i(e,0));case z.file_input:for(t=n=0;t<r(e);++t){var o=i(e,t);o.type===z.stmt&&(n+=l(o))}return n;case z.stmt:return l(i(e,0));case z.compound_stmt:return 1;case z.simple_stmt:return Math.floor(r(e)/2);case z.suite:if(1===r(e))return l(i(e,0));for(n=0,t=2;t<r(e)-1;++t)n+=l(i(e,t));return n;default:Sk.asserts.fail("Non-statement found")}return 0}function c(e,t,n,r){if(n instanceof Sk.builtin.str&&(n=n.v),"None"===n)throw new Sk.builtin.SyntaxError("assignment to None",e.c_filename,r);if("True"===n||"False"===n)throw new Sk.builtin.SyntaxError("assignment to True or False is forbidden",e.c_filename,r)}function u(e,t,n,r){var i;Sk.asserts.assert(n!==Sk.astnodes.AugStore&&n!==Sk.astnodes.AugLoad,"context not AugStore or AugLoad");var o=i=null;switch(t.constructor){case Sk.astnodes.Attribute:case Sk.astnodes.Name:n===Sk.astnodes.Store&&c(e,0,t.attr,r.lineno),t.ctx=n;break;case Sk.astnodes.Starred:t.ctx=n,u(e,t.value,n,r);break;case Sk.astnodes.Subscript:t.ctx=n;break;case Sk.astnodes.List:t.ctx=n,i=t.elts;break;case Sk.astnodes.Tuple:if(0===t.elts.length)throw new Sk.builtin.SyntaxError("can't assign to ()",e.c_filename,r.lineno);t.ctx=n,i=t.elts;break;case Sk.astnodes.Lambda:o="lambda";break;case Sk.astnodes.Call:o="function call";break;case Sk.astnodes.BoolOp:case Sk.astnodes.BinOp:case Sk.astnodes.UnaryOp:o="operator";break;case Sk.astnodes.GeneratorExp:o="generator expression";break;case Sk.astnodes.Yield:o="yield expression";break;case Sk.astnodes.ListComp:o="list comprehension";break;case Sk.astnodes.SetComp:o="set comprehension";break;case Sk.astnodes.DictComp:o="dict comprehension";break;case Sk.astnodes.Dict:case Sk.astnodes.Set:case Sk.astnodes.Num:case Sk.astnodes.Str:o="literal";break;case Sk.astnodes.NameConstant:o="True, False or None";break;case Sk.astnodes.Compare:o="comparison";break;case Sk.astnodes.Repr:o="repr";break;case Sk.astnodes.IfExp:o="conditional expression";break;default:Sk.asserts.fail("unhandled expression in assignment")}if(o)throw new Sk.builtin.SyntaxError("can't "+(n===Sk.astnodes.Store?"assign to":"delete")+" "+o,e.c_filename,r.lineno);if(i)for(t=0;t<i.length;++t)u(e,i[t],n,r)}function d(e){if(void 0===Q[e.type])throw new Sk.builtin.SyntaxError("invalid syntax",e.type,e.lineno);return Q[e.type]}function h(e,t){return e.value?new Sk.builtin.str(e.value):new Sk.builtin.str(e)}function p(e,t){if(o(t,z.comp_op),1===r(t))switch(t=i(t,0),t.type){case F.T_LESS:return Sk.astnodes.Lt;case F.T_GREATER:return Sk.astnodes.Gt;case F.T_EQEQUAL:return Sk.astnodes.Eq;case F.T_LESSEQUAL:return Sk.astnodes.LtE;case F.T_GREATEREQUAL:return Sk.astnodes.GtE;case F.T_NOTEQUAL:return Sk.astnodes.NotEq;case F.T_NAME:if("in"===t.value)return Sk.astnodes.In;if("is"===t.value)return Sk.astnodes.Is}else if(2===r(t)&&i(t,0).type===F.T_NAME){if("in"===i(t,1).value)return Sk.astnodes.NotIn;if("is"===i(t,0).value)return Sk.astnodes.IsNot}Sk.asserts.fail("invalid comp_op")}function f(e,t){return e&&(e.lineno=t.lineno,e.col_offset=t.col_offset,e.end_lineno=t.end_lineno,e.end_col_offset=t.end_col_offset),e}function m(e,t){var n,o=[];for(Sk.asserts.assert(t.type===z.testlist||t.type===z.testlist_star_expr||t.type===z.listmaker||t.type===z.testlist_comp||t.type===z.testlist_safe||t.type===z.testlist1,"node type must be listlike"),n=0;n<r(t);n+=2)Sk.asserts.assert(i(t,n).type===z.test||i(t,n).type===z.old_test||i(t,n).type===z.star_expr),o[n/2]=L(e,i(t,n));return o}function g(e,t){var n;o(t,z.suite);var s=[],a=0;if(i(t,0).type===z.simple_stmt){var c=r(t=i(t,0))-1;for(i(t,c-1).type===F.T_SEMI&&--c,n=0;n<c;n+=2)s[a++]=B(e,i(t,n))}else for(n=2;n<r(t)-1;++n){o(c=i(t,n),z.stmt);var u=l(c);if(1===u)s[a++]=B(e,c);else for(o(c=i(c,0),z.simple_stmt),u=0;u<r(c);u+=2){if(0===r(i(c,u))){Sk.asserts.assert(u+1===r(c));break}s[a++]=B(e,i(c,u))}}return Sk.asserts.assert(a===l(t)),s}function b(e,t,n){var s;o(t,z.exprlist);var a=[];for(s=0;s<r(t);s+=2){var l=L(e,i(t,s));a[s/2]=l,n&&u(e,l,n,i(t,s))}return a}function v(e,t){e:for(;;)switch(t.type){case z.import_as_name:e=null;var n=a(i(t,0).value);return 3===r(t)&&(e=i(t,2).value),new Sk.astnodes.alias(n,null==e?null:a(e));case z.dotted_as_name:if(1===r(t)){t=i(t,0);continue e}return e=v(e,i(t,0)),Sk.asserts.assert(!e.asname),e.asname=a(i(t,2).value),e;case z.dotted_name:if(1===r(t))return new Sk.astnodes.alias(a(i(t,0).value),null);for(e="",n=0;n<r(t);n+=2)e+=i(t,n).value+".";return new Sk.astnodes.alias(a(e.substr(0,e.length-1)),null);case F.T_STAR:return new Sk.astnodes.alias(a("*"),null);default:throw new Sk.builtin.SyntaxError("unexpected import name",e.c_filename,t.lineno)}}function y(e,t){return Sk.asserts.assert(t.type==z.testlist_comp||t.type==z.argument),M(e,t,0)}function S(e,t){if(i(t,0).type===F.T_MINUS&&2===r(t)){var n=i(t,1);if(n.type===z.factor&&1===r(n)&&((n=i(n,0)).type===z.power&&1===r(n))){var o=i(n,0);if(o.type===z.atom&&(n=i(o,0)).type===F.T_NUMBER)return n.value="-"+n.value,D(e,o)}}switch(e=L(e,i(t,1)),i(t,0).type){case F.T_PLUS:return new Sk.astnodes.UnaryOp(Sk.astnodes.UAdd,e,t.lineno,t.col_offset);case F.T_MINUS:return new Sk.astnodes.UnaryOp(Sk.astnodes.USub,e,t.lineno,t.col_offset);case F.T_TILDE:return new Sk.astnodes.UnaryOp(Sk.astnodes.Invert,e,t.lineno,t.col_offset)}Sk.asserts.fail("unhandled factor")}function _(e,t,n,a){var l,u,d;for(o(t,z.arglist),l=d=u=0;l<r(t);l++){var h=i(t,l);h.type==z.argument&&(1==r(h)?u++:i(h,1).type==z.comp_for?(u++,a||s(e,h,"invalid syntax"),1<r(t)&&s(e,h,"Generator expression must be parenthesized")):i(h,0).type==F.T_STAR?u++:d++)}var p=[],f=[];for(l=a=d=u=0;l<r(t);l++)if((h=i(t,l)).type==z.argument){var m=i(h,0);if(1==r(h)){d&&s(e,m,a?"positional argument follows keyword argument unpacking":"positional argument follows keyword argument");var g=L(e,m);if(!g)return null;p[u++]=g}else if(m.type==F.T_STAR){if(a)return s(e,m,"iterable argument unpacking follows keyword argument unpacking"),null;if(!(g=L(e,i(h,1))))return null;h=new Sk.astnodes.Starred(g,Sk.astnodes.Load,m.lineno,m.col_offset),p[u++]=h}else if(m.type==F.T_DOUBLESTAR){if(l++,!(g=L(e,i(h,1))))return null;h=new Sk.astnodes.keyword(null,g),f[d++]=h,a++}else if(i(h,1).type==z.comp_for){if(!(g=y(e,h)))return null;p[u++]=g}else{var b;if(!(g=L(e,m)))return null;if(g.constructor===Sk.astnodes.Lambda)return s(e,m,"lambda cannot contain assignment"),null;if(g.constructor!==Sk.astnodes.Name)return s(e,m,"keyword can't be an expression"),null;if(c(e,g.id,h,1))return null;var v=g.id;for(b=0;b<d;b++)if((g=f[b].arg)&&g===v)return s(e,m,"keyword argument repeated"),null;if(!(g=L(e,i(h,2))))return null;h=new Sk.astnodes.keyword(v,g),f[d++]=h}}return new Sk.astnodes.Call(n,p,f,n.lineno,n.col_offset)}function x(e,t,n){if(o(t,z.trailer),i(t,0).type==F.T_LPAR)return 2==r(t)?new Sk.astnodes.Call(n,null,null,t.lineno,t.col_offset):_(e,i(t,1),n,!0);if(i(t,0).type==F.T_DOT){var s=h(i(t,1));return s?new Sk.astnodes.Attribute(n,s,Sk.astnodes.Load,t.lineno,t.col_offset):null}if(o(i(t,0),F.T_LSQB),o(i(t,2),F.T_RSQB),1==r(t=i(t,1)))return(s=N(e,i(t,0)))?new Sk.astnodes.Subscript(n,s,Sk.astnodes.Load,t.lineno,t.col_offset):null;var a,l=1,c=[];for(a=0;a<r(t);a+=2){if(!(s=N(e,i(t,a))))return null;s.kind!=U.Index_kind&&(l=0),c[a/2]=s}if(!l)return new Sk.astnodes.Subscript(n,new Sk.astnodes.ExtSlice(c),Sk.astnodes.Load,t.lineno,t.col_offset);for(e=[],a=0;a<c.length;++a)s=c[a],Sk.asserts.assert(s.kind==U.Index_kind&&s.v.Index.value),e[a]=s.v.Index.value;return s=new Sk.astnodes.Tuple(e,Sk.astnodes.Load,t.lineno,t.col_offset),new Sk.astnodes.Subscript(n,new Sk.astnodes.Index(s),Sk.astnodes.Load,t.lineno,t.col_offset)}function w(e,t){var n=null;Sk.asserts.assert(t.type===z.tfpdef||t.type===z.vfpdef);var o=i(t,0);return c(e,0,o.value,o.lineno),o=a(o.value),3==r(t)&&i(t,1).type===F.T_COLON&&(n=L(e,i(t,2))),new Sk.astnodes.arg(o,n,t.lineno,t.col_offset)}function k(e,t,n,o,l){var u=n,d=0;for(o||s(e,i(t,n),"named arguments must follow bare *"),Sk.asserts.assert(l);u<r(t);){var h=i(t,u);switch(h.type){case z.vfpdef:case z.tfpdef:u+1<r(t)&&i(t,u+1).type==F.T_EQUAL?(l[d]=L(e,i(t,u+2)),u+=2):l[d]=null;var p=3==r(h)?L(e,i(h,2)):null;c(e,0,(h=i(h,0)).value,h.lineno),n=a(h.value),o[d++]=new Sk.astnodes.arg(n,p,h.lineno,h.col_offset),u+=2;break;case F.T_DOUBLESTAR:return u;default:s(e,h,"unexpected node")}}return u}function O(e,t){var n,o,s,a=[],l=[],c=[],u=[],d=null,h=null;if(t.type===z.parameters){if(2===r(t))return new Sk.astnodes.arguments_([],null,[],[],null,[]);t=i(t,1)}for(Sk.asserts.assert(t.type===z.varargslist||t.type===z.typedargslist),n=o=s=0;s<r(t);){var p=i(t,s);switch(p.type){case z.tfpdef:case z.vfpdef:if(s+1<r(t)&&i(t,s+1).type==F.T_EQUAL){l[o++]=L(e,i(t,s+2)),s+=2;var f=1}else if(f)throw new Sk.builtin.SyntaxError("non-default argument follows default argument",e.c_filename,t.lineno);a[n++]=w(e,p),s+=2;break;case F.T_STAR:if(s+1>=r(t)||s+2==r(t)&&i(t,s+1).type==F.T_COMMA)throw new Sk.builtin.SyntaxError("named arguments must follow bare *",e.c_filename,t.lineno);(p=i(t,s+1)).type==F.T_COMMA?s=k(e,t,s+=2,c,u):(d=w(e,p),(s+=3)<r(t)&&(i(t,s).type==z.tfpdef||i(t,s).type==z.vfpdef)&&(s=k(e,t,s,c,u)));break;case F.T_DOUBLESTAR:p=i(t,s+1),Sk.asserts.assert(p.type==z.tfpdef||p.type==z.vfpdef),h=w(e,p),s+=3;break;default:return void Sk.asserts.fail("unexpected node in varargslist")}}return new Sk.astnodes.arguments_(a,d,c,u,h,l)}function E(e,t,n,a){var l=a?i(t,1):t,u=null,d=1,p=null;if(a&&5>e.c_feature_version)return s(e,l,"Async functions are only supported in Python 3.5 and greater"),null;o(l,z.funcdef);var f=h(i(l,d));if(c(e,0,i(l,d),0))return null;var m=O(e,i(l,d+1));if(!m)return null;if(i(l,d+2).type==F.T_RARROW){if(!(u=L(e,i(l,d+3))))return null;d+=2}if(i(l,d+3).type==F.T_TYPE_COMMENT){if(!(p=F.T_NEW_TYPE_COMMENT(i(l,d+3))))return null;d+=1}var b=g(e,i(l,d+3));if(!b)return null;if(1<r(i(l,d+3))&&(d=i(i(l,d+3),1)).type==F.T_TYPE_COMMENT){if(null!=p)return s(e,l,"Cannot have two type comments on def"),null;if(!(p=F.T_NEW_TYPE_COMMENT(d)))return null}return a?new Sk.astnodes.AsyncFunctionDef(f,m,b,n,u,p,t.lineno,t.col_offset,void 0,void 0):new Sk.astnodes.FunctionDef(f,m,b,n,u,p,l.lineno,l.col_offset,void 0,void 0)}function A(e,t,n){if(o(t,z.classdef),4==r(t)){var s=g(e,i(t,3)),a=h(i(t,1).value);return c(e,i(t,3),a,t.lineno),new Sk.astnodes.ClassDef(a,[],[],s,n,null,t.lineno,t.col_offset)}if(i(t,3).type===F.T_RPAR)return s=g(e,i(t,5)),a=h(i(t,1).value),c(e,i(t,3),a,i(t,3).lineno),new Sk.astnodes.ClassDef(a,[],[],s,n,null,t.lineno,t.col_offset);a=h(i(t,1)),a=new Sk.astnodes.Name(a,Sk.astnodes.Load,t.lineno,t.col_offset);var l=_(e,i(t,3),a,!1);return s=g(e,i(t,6)),a=h(i(t,1).value),c(e,i(t,1),a,i(t,1).lineno),new Sk.astnodes.ClassDef(a,l.args,l.keywords,s,n,null,t.lineno,t.col_offset)}function T(e,t){function n(e,t){for(e=0;;){if(o(t,z.comp_iter),i(t,0).type===z.comp_for)return e;if(o(t=i(t,0),z.comp_if),e++,2===r(t))return e;t=i(t,2)}}var s,a=function(e,t){e=0;e:for(;;){if(e++,o(t,z.comp_for),5!==r(t))return e;t=i(t,4);t:for(;;){if(o(t,z.comp_iter),(t=i(t,0)).type===z.comp_for)continue e;if(t.type===z.comp_if){if(3===r(t)){t=i(t,2);continue t}return e}break}break}Sk.asserts.fail("logic error in countCompFors")}(e,t),l=[];for(s=0;s<a;++s){o(t,z.comp_for);var c=i(t,1),u=b(e,c,Sk.astnodes.Store),d=L(e,i(t,3)),h=1===r(c)?new Sk.astnodes.comprehension(u[0],d,[]):new Sk.astnodes.comprehension(new Sk.astnodes.Tuple(u,Sk.astnodes.Store,t.lineno,t.col_offset),d,[]);if(5===r(t)){var p=n(e,t=i(t,4));for(c=[],u=0;u<p;++u)o(t,z.comp_iter),o(t=i(t,0),z.comp_if),d=L(e,i(t,1)),c[u]=d,3===r(t)&&(t=i(t,2));t.type===z.comp_iter&&(t=i(t,0)),h.ifs=c}l[s]=h}return l}function C(e,t){var n=[];e:{var s=t,a=0;t:for(;;){var l=0;if(a++,o(s,z.comp_for),i(s,0).type==F.T_ASYNC&&(l=1),r(s)!=5+l)break e;s=i(s,4+l);n:for(;;){if(o(s,z.comp_iter),(s=i(s,0)).type===z.comp_for)continue t;if(s.type===z.comp_if){if(3===r(s)){s=i(s,2);continue n}break e}break}break}a=void 0}for(s=0;s<a;s++){var c=0;i(t,0).type==F.T_ASYNC&&(c=1);var u=i(t,1+c),d=b(e,u,Sk.astnodes.Store);if(!d)return null;if(!(l=L(e,i(t,3+c))))return null;var h=d[0];if(d=1==r(u)?new Sk.astnodes.comprehension(h,l,null,c):new Sk.astnodes.comprehension(new Sk.astnodes.Tuple(d,Sk.astnodes.Store,h.lineno,h.col_offset,u.end_lineno,u.end_col_offset),l,null,c),r(t)==5+c){h=[];e:for(l=t=i(t,4+c),c=0;;){if(o(l,z.comp_iter),i(l,0).type==z.comp_for){u=c;break e}if(o(l=i(l,0),z.comp_if),c++,2==r(l)){u=c;break e}l=i(l,2)}if(-1==u)return null;for(c=0;c<u;c++){if(o(t,z.comp_iter),o(t=i(t,0),z.comp_if),!(l=L(e,i(t,1))))return null;h[c]=l,3==r(t)&&(t=i(t,2))}t.type==z.comp_iter&&(t=i(t,0)),d.ifs=h}n[s]=d}return n}function M(e,t,n){Sk.asserts.assert(1<r(t));var o=i(t,0),a=L(e,o);return a.constructor===Sk.astnodes.Starred?(s(e,o,"iterable unpacking cannot be used in comprehension"),null):(e=C(e,i(t,1)),0==n?new Sk.astnodes.GeneratorExp(a,e,t.lineno,t.col_offset,t.end_lineno,t.end_col_offset):1==n?new Sk.astnodes.ListComp(a,e,t.lineno,t.col_offset,t.end_lineno,t.end_col_offset):2==n?new Sk.astnodes.SetComp(a,e,t.lineno,t.col_offset,t.end_lineno,t.end_col_offset):null)}function $(e,t){return Sk.asserts.assert(0<r(t)),t.type===z.testlist_comp?1<r(t)&&Sk.asserts.assert(i(t,1).type!==z.comp_for):Sk.asserts.assert(t.type===z.testlist||t.type===z.testlist_star_expr),1===r(t)?L(e,i(t,0)):new Sk.astnodes.Tuple(m(e,t),Sk.astnodes.Load,t.lineno,t.col_offset)}function P(e,t){if(o(t,z.expr_stmt),1===r(t))return new Sk.astnodes.Expr($(e,i(t,0)),t.lineno,t.col_offset);if(i(t,1).type===z.augassign){var n=i(t,0),s=$(e,n);switch(u(e,s,Sk.astnodes.Store,n),s.constructor){case Sk.astnodes.Name:var a=s.id;c(e,0,a,t.lineno);break;case Sk.astnodes.Attribute:case Sk.astnodes.Subscript:break;case Sk.astnodes.GeneratorExp:throw new Sk.builtin.SyntaxError("augmented assignment to generator expression not possible",e.c_filename,t.lineno);case Sk.astnodes.Yield:throw new Sk.builtin.SyntaxError("augmented assignment to yield expression not possible",e.c_filename,t.lineno);default:throw new Sk.builtin.SyntaxError("illegal expression for augmented assignment",e.c_filename,t.lineno)}return a=(n=i(t,2)).type===z.testlist?$(e,n):L(e,n),new Sk.astnodes.AugAssign(s,function(e,t){switch(o(t,z.augassign),(t=i(t,0)).value.charAt(0)){case"+":return Sk.astnodes.Add;case"-":return Sk.astnodes.Sub;case"/":return"/"===t.value.charAt(1)?Sk.astnodes.FloorDiv:Sk.astnodes.Div;case"%":return Sk.astnodes.Mod;case"<":return Sk.astnodes.LShift;case">":return Sk.astnodes.RShift;case"&":return Sk.astnodes.BitAnd;case"^":return Sk.astnodes.BitXor;case"|":return Sk.astnodes.BitOr;case"*":return"*"===t.value.charAt(1)?Sk.astnodes.Pow:Sk.astnodes.Mult;case"@":if(Sk.__future__.python3)return Sk.astnodes.MatMult;default:Sk.asserts.fail("invalid augassign")}}(0,i(t,1)),a,t.lineno,t.col_offset)}if(i(t,1).type===z.annassign){if(!Sk.__future__.python3)throw new Sk.builtin.SyntaxError("Annotated assignment is not supported in Python 2",e.c_filename,t.lineno);n=i(t,0);var l=i(t,1),d=1;for(s=n;1==r(s);)s=i(s,0);switch(0<r(s)&&i(s,0).type==F.T_LPAR&&(d=0),(s=$(e,n)).constructor){case Sk.astnodes.Name:c(e,0,a=s.id,t.lineno),u(e,s,Sk.astnodes.Store,n);break;case Sk.astnodes.Attribute:c(e,0,a=s.attr,t.lineno),u(e,s,Sk.astnodes.Store,n);break;case Sk.astnodes.Subscript:u(e,s,Sk.astnodes.Store,n);break;case Sk.astnodes.List:throw new Sk.builtin.SyntaxError("only single target (not list) can be annotated",e.c_filename,t.lineno);case Sk.astnodes.Tuple:throw new Sk.builtin.SyntaxError("only single target (not tuple) can be annotated",e.c_filename,t.lineno);default:throw new Sk.builtin.SyntaxError("illegal target for annotation",e.c_filename,t.lineno)}return s.constructor!=Sk.astnodes.Name&&(d=0),a=L(e,n=i(l,1)),2==r(l)?new Sk.astnodes.AnnAssign(s,a,null,d,t.lineno,t.col_offset):(e=L(e,n=i(l,3)),new Sk.astnodes.AnnAssign(s,a,e,d,t.lineno,t.col_offset))}for(o(i(t,1),F.T_EQUAL),d=[],s=0;s<r(t)-2;s+=2){if((n=i(t,s)).type===z.yield_expr)throw new Sk.builtin.SyntaxError("assignment to yield expression not possible",e.c_filename,t.lineno);u(e,n=$(e,n),Sk.astnodes.Store,i(t,s)),d[s/2]=n}return e=(n=i(t,r(t)-1)).type===z.testlist_star_expr?$(e,n):L(e,n),new Sk.astnodes.Assign(d,e,t.lineno,t.col_offset)}function R(e,t,n,r,i,o,a){Sk.asserts.assert("{"==e.charAt(t));var l=++t;let c,u,d=null,h=0,p=0,f=()=>s(o,a,"f-string: expecting '}'");for(Sk.asserts.assert(t<=n);t<n;t++){let r=e.charAt(t);if("\\"==r&&s(o,a,"f-string expression part cannot include a backslash"),d)r==d&&(3==h?t+2<n&&e.charAt(t+1)==r&&e.charAt(t+2)==r&&(t+=2,d=h=0):h=d=0);else if("'"==r||'"'==r)t+2<n&&e.charAt(t+1)==r&&e.charAt(t+2)==r?(h=3,t+=2):h=1,d=r;else if("["==r||"{"==r||"("==r)p++;else if(0==p||"]"!=r&&"}"!=r&&")"!=r){if("#"==r)s(o,a,"f-string expression part cannot include '#'");else if(!(0!=p||"!"!=r&&":"!=r&&"}"!=r||"!"==r&&t+1<n&&"="==e.charAt(t+1)))break}else p--}return d&&s(o,a,"f-string: unterminated string"),p&&s(o,a,"f-string: mismatched '(', '{', or '['"),l=function(e,t,n,r,i){Sk.asserts.assert(n>=t),Sk.asserts.assert("{"==e.charAt(t-1)),Sk.asserts.assert("}"==e.charAt(n)||"!"==e.charAt(n)||":"==e.charAt(n)),e=e.substring(t,n),/^\s*$/.test(e)&&s(r,i,"f-string: empty expression not allowed");try{let t=Sk.parse("<fstring>","("+e+")");var o=Sk.astFromParse(t.cst,"<fstring>",t.flags)}catch(e){throw e.traceback&&e.traceback[0]&&((o=e.traceback[0]).lineno=(o.lineno||1)-1+i.lineno,o.filename=r.c_filename),e}return Sk.asserts.assert(1==o.body.length&&o.body[0].constructor===Sk.astnodes.Expr),o.body[0].value}(e,l,t,o,a),"!"==e.charAt(t)&&(++t>=n&&f(),u=e.charAt(t),t++,"s"!=u&&"r"!=u&&"a"!=u&&s(o,a,"f-string: invalid conversion character: expected 's', 'r', or 'a'")),t>=n&&f(),":"==e.charAt(t)&&(++t>=n&&f(),[c,t]=j(e,t,n,r,i+1,o,a)),(t>=n||"}"!=e.charAt(t))&&f(),t++,[new Sk.astnodes.FormattedValue(l,u,c,a.lineno,a.col_offset),t]}function j(e,t,n,r,i,o,s){let a=[],l=e=>{if(-1!==e.indexOf("}")){if(/(^|[^}])}(}})*($|[^}])/.test(e))throw new SyntaxError("f-string: single '}' is not allowed",s.lineno,s.col_offset);e=e.replace(/}}/g,"}")}a.push(new Sk.astnodes.Str(new Sk.builtin.str(e),s.lineno,s.col_offset,o.end_lineno,s.end_col_offset))};for(;t<n;){let c=e.indexOf("{",t);if(0!==i){let r=e.indexOf("}",t);-1!==r&&(-1===c?n=r:c>r&&(c=-1,n=r))}if(-1===c){l(e.substring(t,n)),t=n;break}if(c+1<n&&"{"===e.charAt(c+1))l(e.substring(t,c+1)),t=c+2;else{l(e.substring(t,c)),t=c;let[u,d]=R(e,c,n,r,i,o,s);a.push(u),t=d}}return[new Sk.astnodes.JoinedStr(a,s.lineno,s.col_offset),t]}function N(e,t){var n,s;o(t,z.subscript);var a=i(t,0),l=n=s=null;return a.type===F.T_DOT?new Sk.astnodes.Ellipsis:1===r(t)&&a.type===z.test?new Sk.astnodes.Index(L(e,a)):(a.type===z.test&&(s=L(e,a)),a.type===F.T_COLON?1<r(t)&&((a=i(t,1)).type===z.test&&(n=L(e,a))):2<r(t)&&((a=i(t,2)).type===z.test&&(n=L(e,a))),(a=i(t,r(t)-1)).type===z.sliceop&&(1===r(a)?(a=i(a,0),l=new Sk.astnodes.NameConstant(Sk.builtin.none.none$,Sk.astnodes.Load,a.lineno,a.col_offset)):(a=i(a,1)).type===z.test&&(l=L(e,a))),new Sk.astnodes.Slice(s,n,l))}function D(e,t){var n=i(t,0);switch(n.type){case F.T_NAME:var l=n.value;if(4<=l.length&&5>=l.length){if("None"===l)return new Sk.astnodes.NameConstant(Sk.builtin.none.none$,t.lineno,t.col_offset);if("True"===l)return new Sk.astnodes.NameConstant(Sk.builtin.bool.true$,t.lineno,t.col_offset);if("False"===l)return new Sk.astnodes.NameConstant(Sk.builtin.bool.false$,t.lineno,t.col_offset)}return e=h(l),new Sk.astnodes.Name(e,Sk.astnodes.Load,t.lineno,t.col_offset,t.end_lineno,t.end_col_offset);case F.T_STRING:n=[];for(var c=0;c<r(t);++c){for(var u=i(t,c).value,d=e,p=i(t,c),g=u,b=g.charAt(0),v=!1,S=u=!1;;){if("u"!==b&&"U"!==b)if("r"===b||"R"===b)v=!0;else if("b"===b||"B"===b)S=!0;else{if("f"!==b&&"F"!==b)break;u=!0}b=(g=g.substr(1)).charAt(0)}if(Sk.asserts.assert("'"===b||'"'===b&&g.charAt(g.length-1)===b),4<=(g=g.substr(1,g.length-2)).length&&g.charAt(0)===b&&g.charAt(1)===b&&(Sk.asserts.assert(g.charAt(g.length-1)===b&&g.charAt(g.length-2)===b),g=g.substr(2,g.length-4)),v||-1===g.indexOf("\\")){if(S)for(b=0;b<g.length;b++)127<g.charCodeAt(b)&&s(d,p,"bytes can only contain ASCII literal characters");d=[a(g),u,S]}else{var _=(v=g).length,x="";for(g=0;g<_;++g)"\\"===(b=v.charAt(g))?(++g,"n"===(b=v.charAt(g))?x+="\n":"\\"===b?x+="\\":"t"===b?x+="\t":"r"===b?x+="\r":"b"===b?x+="\b":"f"===b?x+="\f":"v"===b?x+="\v":"0"===b?x+="\0":'"'===b?x+='"':"'"===b?x+="'":"\n"!==b&&("x"===b?(g+2>=_&&s(d,p,"Truncated \\xNN escape"),x+=String.fromCharCode(parseInt(v.substr(g+1,2),16)),g+=2):S||"u"!==b?S||"U"!==b?x+="\\"+b:(g+8>=_&&s(d,p,"Truncated \\UXXXXXXXX escape"),x+=String.fromCodePoint(parseInt(v.substr(g+1,8),16)),g+=8):(g+4>=_&&s(d,p,"Truncated \\uXXXX escape"),x+=String.fromCharCode(parseInt(v.substr(g+1,4),16)),g+=4))):S&&127<b.charCodeAt(0)?s(d,p,"bytes can only contain ASCII literal characters"):x+=b;d=[a(d=x),u,S]}if(d=(u=d)[0],p=u[1],u=u[2],0!=c&&l!==u&&s(e,t,"cannot mix bytes and nonbytes literals"),l=u,p){if(!Sk.__future__.python3)throw new Sk.builtin.SyntaxError("invalid string (f-strings are not supported in Python 2)",e.c_filename,i(t,c).lineno);var w=d.$jsstr();[w]=j(w,0,w.length,!1,0,e,i(t,c)),n.push.apply(n,w.values),w=null}else w?w.s=w.s.sq$concat(d):(w=new(l?Sk.astnodes.Bytes:Sk.astnodes.Str)(d,t.lineno,t.col_offset,e.end_lineno,t.end_col_offset),n.push(w))}return t=1===n.length&&n[0].constructor===Sk.astnodes.Str?n[0]:new Sk.astnodes.JoinedStr(n,t.lineno,t.col_offset,e.end_lineno,t.end_col_offset);case F.T_NUMBER:return new Sk.astnodes.Num(function(e,t,n){var r=t.charAt(t.length-1);if(-1!==t.indexOf("_")){if(q.test(t))throw new Sk.builtin.SyntaxError("invalid syntax",e.c_filename,n);if(G.test(t))throw new Sk.builtin.SyntaxError("invalid decimal literal",e.c_filename,n);t=t.replace(H,"")}if("j"===r||"J"===r)return Sk.builtin.complex.complex_subtype_from_string(t);if("l"===r||"L"===r)return Sk.longFromStr(t.substr(0,t.length-1),0);if(-1!==t.indexOf("."))return new Sk.builtin.float_(parseFloat(t));if(n=t,e=!1,"-"===t.charAt(0)&&(n=t.substr(1),e=!0),"0"!==n.charAt(0)||"x"!==n.charAt(1)&&"X"!==n.charAt(1)){if(-1!==t.indexOf("e")||-1!==t.indexOf("E"))return new Sk.builtin.float_(parseFloat(t));"0"!==n.charAt(0)||"b"!==n.charAt(1)&&"B"!==n.charAt(1)?"0"===n.charAt(0)?"0"===n?n=0:("o"!==(n=n.substring(1)).charAt(0)&&"O"!==n.charAt(0)||(n=n.substring(1)),n=parseInt(n,8)):n=parseInt(n,10):(n=n.substring(2),n=parseInt(n,2))}else n=n.substring(2),n=parseInt(n,16);return n>Number.MAX_SAFE_INTEGER&&Math.floor(n)===n&&-1===t.indexOf("e")&&-1===t.indexOf("E")?Sk.longFromStr(t,0):e?new Sk.builtin.int_(-n):new Sk.builtin.int_(n)}(e,n.value,t.lineno),t.lineno,t.col_offset);case F.T_ELLIPSIS:return new Sk.astnodes.Ellipsis(t.lineno,t.col_offset,t.end_lineno,t.end_col_offset);case F.T_LPAR:return(n=i(t,1)).type==F.T_RPAR?new Sk.astnodes.Tuple([],Sk.astnodes.Load,t.lineno,t.col_offset,t.end_lineno,t.end_col_offset):n.type==z.yield_expr?L(e,n):1==r(n)?$(e,n):i(n,1).type==z.comp_for?f(y(e,n),t):f($(e,n),t);case F.T_LSQB:return(n=i(t,1)).type==F.T_RSQB?new Sk.astnodes.List([],Sk.astnodes.Load,t.lineno,t.col_offset,t.end_lineno,t.end_col_offset):(o(n,z.testlist_comp),1==r(n)||i(n,1).type==F.T_COMMA?(e=m(e,n))?new Sk.astnodes.List(e,Sk.astnodes.Load,t.lineno,t.col_offset,t.end_lineno,t.end_col_offset):null:(l=n,Sk.asserts.assert(l.type==z.testlist_comp),f(e=M(e,l,1),t)));case F.T_LBRACE:if((n=i(t,1)).type==F.T_RBRACE)return new Sk.astnodes.Dict(null,null,t.lineno,t.col_offset,t.end_lineno,t.end_col_offset);if(l=i(n,0).type==F.T_DOUBLESTAR,1==r(n)||1<r(n)&&i(n,1).type==F.T_COMMA){for(l=n,c=[],Sk.asserts.assert(l.type===z.dictorsetmaker),n=0;n<r(l);n+=2)w=L(e,i(l,n)),c[n/2]=w;e=new Sk.astnodes.Set(c,l.lineno,l.col_offset)}else if(1<r(n)&&i(n,1).type==z.comp_for)l=n,Sk.asserts.assert(l.type===z.dictorsetmaker),Sk.asserts.assert(1<r(l)),n=L(e,i(l,0)),e=T(e,i(l,1)),e=new Sk.astnodes.SetComp(n,e,l.lineno,l.col_offset);else if(r(n)>3-l&&i(n,3-l).type==z.comp_for){if(l)return s(e,t,"dict unpacking cannot be used in dict comprehension"),null;l=n,Sk.asserts.assert(3<r(l)),o(i(l,1),F.T_COLON),n=L(e,i(l,0)),c=L(e,i(l,2)),e=T(e,i(l,3)),e=new Sk.astnodes.DictComp(n,c,e,l.lineno,l.col_offset)}else{for(l=n,c=[],w=[],u=n=0;u<r(l);u++)d=e,i(p=l,S=u).type==F.T_DOUBLESTAR?(Sk.asserts.assert(2<=r(p)-S),d={key:null,value:u=L(d,i(p,S+1)),i:S+2}):(Sk.asserts.assert(3<=r(p)-S),(u=L(d,i(p,S)))?(g=u,o(i(p,S+1),F.T_COLON),d=!!(u=L(d,i(p,S+2)))&&{key:g,value:u,i:S+3}):d=0),u=d.i,c[n]=d.key,w[n]=d.value,n++;e=new Sk.astnodes.Dict(c,w,l.lineno,l.col_offset,l.end_lineno,l.end_col_offset)}return f(e,t);default:return Sk.asserts.fail("unhandled atom "+n.type),null}}function I(e,t){var n,s=0;o(t,z.atom_expr);var a=r(t);i(t,0).type===F.T_AWAIT&&(s=1,Sk.asserts.assert(1<a));var l=D(e,i(t,s));if(!l)return null;if(1===a)return l;if(s&&2===a)return new Sk.astnodes.Await(l,t.lineno,t.col_offset);for(n=s+1;n<a;n++){var c=i(t,n);if(c.type!==z.trailer)break;if(!(c=x(e,c,l)))return null;c.lineno=l.lineno,c.col_offset=l.col_offset,l=c}return s?new Sk.astnodes.Await(l,t.line,t.col_offset):l}function L(e,t){e:for(;;){switch(t.type){case z.test:case z.test_nocond:if(i(t,0).type===z.lambdef||i(t,0).type===z.lambdef_nocond){var n=i(t,0);return 3===r(n)?(t=new Sk.astnodes.arguments_([],null,null,[]),e=L(e,i(n,2))):(t=O(e,i(n,1)),e=L(e,i(n,3))),new Sk.astnodes.Lambda(t,e,n.lineno,n.col_offset)}if(1<r(t))return Sk.asserts.assert(5===r(t)),new Sk.astnodes.IfExp(L(e,i(t,2)),L(e,i(t,0)),L(e,i(t,4)),t.lineno,t.col_offset);case z.or_test:case z.and_test:if(1===r(t)){t=i(t,0);continue e}var s=[];for(n=0;n<r(t);n+=2)s[n/2]=L(e,i(t,n));return"and"===i(t,1).value?new Sk.astnodes.BoolOp(Sk.astnodes.And,s,t.lineno,t.col_offset):(Sk.asserts.assert("or"===i(t,1).value),new Sk.astnodes.BoolOp(Sk.astnodes.Or,s,t.lineno,t.col_offset));case z.not_test:if(1===r(t)){t=i(t,0);continue e}return new Sk.astnodes.UnaryOp(Sk.astnodes.Not,L(e,i(t,1)),t.lineno,t.col_offset);case z.comparison:if(1===r(t)){t=i(t,0);continue e}var a=[];for(s=[],n=1;n<r(t);n+=2)a[(n-1)/2]=p(0,i(t,n)),s[(n-1)/2]=L(e,i(t,n+1));return new Sk.astnodes.Compare(L(e,i(t,0)),a,s,t.lineno,t.col_offset);case z.star_expr:return o(t,z.star_expr),new Sk.astnodes.Starred(L(e,i(t,1)),Sk.astnodes.Load,t.lineno,t.col_offset);case z.expr:case z.xor_expr:case z.and_expr:case z.shift_expr:case z.arith_expr:case z.term:if(1===r(t)){t=i(t,0);continue e}var l=t,c=new Sk.astnodes.BinOp(L(e,i(l,0)),d(i(l,1)),L(e,i(l,2)),l.lineno,l.col_offset),u=(r(l)-1)/2;for(t=1;t<u;++t)s=d(n=i(l,2*t+1)),a=L(e,i(l,2*t+2)),c=new Sk.astnodes.BinOp(c,s,a,n.lineno,n.col_offset);return c;case z.yield_expr:return s=!1,a=null,1<r(t)&&(n=i(t,1)),n&&(a=i(n,r(n)-1),2==r(n)?(s=!0,a=L(e,a)):a=$(e,a)),s?new Sk.astnodes.YieldFrom(a,t.lineno,t.col_offset):new Sk.astnodes.Yield(a,t.lineno,t.col_offset);case z.factor:if(1===r(t)){t=i(t,0);continue e}return S(e,t);case z.power:return o(n=t,z.power),t=I(e,i(n,0)),1!==r(n)&&i(n,r(n)-1).type===z.factor&&(e=L(e,i(n,r(n)-1)),t=new Sk.astnodes.BinOp(t,Sk.astnodes.Pow,e,n.lineno,n.col_offset)),t;default:Sk.asserts.fail("unhandled expr","n.type: %d",t.type)}break}}function B(e,t){if(t.type===z.stmt&&(Sk.asserts.assert(1===r(t)),t=i(t,0)),t.type===z.simple_stmt&&(Sk.asserts.assert(1===l(t)),t=i(t,0)),t.type===z.small_stmt)switch(t=i(t,0),t.type){case z.expr_stmt:return P(e,t);case z.del_stmt:var n=t;return o(n,z.del_stmt),new Sk.astnodes.Delete(b(e,i(n,1),Sk.astnodes.Del),n.lineno,n.col_offset);case z.pass_stmt:return new Sk.astnodes.Pass(t.lineno,t.col_offset);case z.flow_stmt:return function(e,t){o(t,z.flow_stmt);var n=i(t,0);switch(n.type){case z.break_stmt:return new Sk.astnodes.Break(t.lineno,t.col_offset,t.end_lineno,t.end_col_offset);case z.continue_stmt:return new Sk.astnodes.Continue(t.lineno,t.col_offset,t.end_lineno,t.end_col_offset);case z.yield_stmt:return(e=L(e,i(n,0)))?new Sk.astnodes.Expr(e,t.lineno,t.col_offset,t.end_lineno,t.end_col_offset):null;case z.return_stmt:if(1==r(n))return new Sk.astnodes.Return(null,t.lineno,t.col_offset,t.end_lineno,t.end_col_offset);var a=$(e,i(n,1));return a?new Sk.astnodes.Return(a,t.lineno,t.col_offset,t.end_lineno,t.end_col_offset):null;case z.raise_stmt:if(1==r(n))return new Sk.astnodes.Raise(null,null,null,null,t.lineno,t.col_offset,t.end_lineno,t.end_col_offset);if(2<=r(n)){var l=null;a=L(e,i(n,1));var c=null,u=null;return 4==r(n)&&"from"==i(n,2).value?(Sk.__future__.python3||s(e,i(n,2),"raise ... from ... is not available in Python 2"),l=L(e,i(n,3))):4<=r(n)&&","==i(n,2).value&&(Sk.__future__.python3&&s(e,t,"Old raise syntax is not available in Python 3"),c=L(e,i(n,3)),6==r(n)&&(u=L(e,i(n,5)))),new Sk.astnodes.Raise(a,l,c,u,t.lineno,t.col_offset,t.end_lineno,t.end_col_offset)}default:return Sk.asserts.fail("unexpected flow_stmt: ",n.type),null}}(e,t);case z.import_stmt:var c,d=t;o(d,z.import_stmt);var h=d.lineno;if(t=d.col_offset,(d=i(d,0)).type===z.import_name){o(d=i(d,1),z.dotted_as_names);var p=[];for(c=0;c<r(d);c+=2)p[c/2]=v(e,i(d,c));e=new Sk.astnodes.Import(p,h,t)}else{if(d.type!==z.import_from)throw new Sk.builtin.SyntaxError("unknown import statement",e.c_filename,d.lineno);var f=null;for(n=0,p=1;p<r(d);++p){if(i(d,p).type===z.dotted_name){f=v(e,i(d,p)),p++;break}if(i(d,p).type===F.T_DOT)n++;else{if(i(d,p).type!==F.T_ELLIPSIS)break;n+=3}}switch(i(d,++p).type){case F.T_STAR:d=i(d,p);break;case F.T_LPAR:r(d=i(d,p+1));break;case z.import_as_names:if(0==(p=r(d=i(d,p)))%2)throw new Sk.builtin.SyntaxError("trailing comma not allowed without surrounding parentheses",e.c_filename,d.lineno);break;default:throw new Sk.builtin.SyntaxError("Unexpected node-type in from-import",e.c_filename,d.lineno)}if(p=[],d.type===F.T_STAR)p[0]=v(e,d);else for(c=0;c<r(d);c+=2)p[c/2]=v(e,i(d,c));e=f?f.name.v:"",e=new Sk.astnodes.ImportFrom(a(e),p,n,h,t)}return e;case z.global_stmt:for(e=t,t=[],o(e,z.global_stmt),n=1;n<r(e);n+=2)t[(n-1)/2]=a(i(e,n).value);return new Sk.astnodes.Global(t,e.lineno,e.col_offset);case z.nonlocal_stmt:s(e,t,"Not implemented: nonlocal");break;case z.assert_stmt:return o(n=t,z.assert_stmt),2===r(n)?e=new Sk.astnodes.Assert(L(e,i(n,1)),null,n.lineno,n.col_offset):4===r(n)?e=new Sk.astnodes.Assert(L(e,i(n,1)),L(e,i(n,3)),n.lineno,n.col_offset):(Sk.asserts.fail("improper number of parts to assert stmt"),e=void 0),e;case z.print_stmt:for(n=t,Sk.__future__.print_function&&s(e,n,"Missing parentheses in call to 'print'"),d=1,h=null,o(n,z.print_stmt),2<=r(n)&&i(n,1).type===F.T_RIGHTSHIFT&&(h=L(e,i(n,2)),d=4),t=[],f=0;d<r(n);d+=2,++f)t[f]=L(e,i(n,d));return e=i(n,r(n)-1).type!==F.T_COMMA,new Sk.astnodes.Print(h,t,e,n.lineno,n.col_offset);case z.debugger_stmt:return new Sk.astnodes.Debugger(t.lineno,t.col_offset);default:Sk.asserts.fail("unhandled small_stmt")}else switch(n=i(t,0),o(t,z.compound_stmt),n.type){case z.if_stmt:if(o(n,z.if_stmt),4===r(n))e=new Sk.astnodes.If(L(e,i(n,1)),g(e,i(n,3)),[],n.lineno,n.col_offset);else if("s"===(t=i(n,4).value.charAt(2)))e=new Sk.astnodes.If(L(e,i(n,1)),g(e,i(n,3)),g(e,i(n,6)),n.lineno,n.col_offset);else if("i"===t){for(d=!1,t=[],i(n,(h=r(n)-4)+1).type===F.T_NAME&&"s"===i(n,h+1).value.charAt(2)&&(d=!0,h-=3),h/=4,d&&(t=[new Sk.astnodes.If(L(e,i(n,r(n)-6)),g(e,i(n,r(n)-4)),g(e,i(n,r(n)-1)),i(n,r(n)-6).lineno,i(n,r(n)-6).col_offset)],h--),f=0;f<h;++f)d=5+4*(h-f-1),t=[new Sk.astnodes.If(L(e,i(n,d)),g(e,i(n,d+2)),t,i(n,d).lineno,i(n,d).col_offset)];e=new Sk.astnodes.If(L(e,i(n,1)),g(e,i(n,3)),t,n.lineno,n.col_offset)}else Sk.asserts.fail("unexpected token in 'if' statement"),e=void 0;return e;case z.while_stmt:return o(n,z.while_stmt),4===r(n)?e=new Sk.astnodes.While(L(e,i(n,1)),g(e,i(n,3)),[],n.lineno,n.col_offset):7===r(n)?e=new Sk.astnodes.While(L(e,i(n,1)),g(e,i(n,3)),g(e,i(n,6)),n.lineno,n.col_offset):(Sk.asserts.fail("wrong number of tokens for 'while' stmt"),e=void 0),e;case z.for_stmt:return t=[],o(n,z.for_stmt),9===r(n)&&(t=g(e,i(n,8))),h=b(e,d=i(n,1),Sk.astnodes.Store),h=1===r(d)?h[0]:new Sk.astnodes.Tuple(h,Sk.astnodes.Store,n.lineno,n.col_offset),new Sk.astnodes.For(h,$(e,i(n,3)),g(e,i(n,5)),t,n.lineno,n.col_offset);case z.try_stmt:if(t=[],h=((c=r(n))-3)/3,f=[],p=null,o(n,z.try_stmt),d=g(e,i(n,2)),i(n,c-3).type===F.T_NAME)"finally"===i(n,c-3).value?(9<=c&&i(n,c-6).type===F.T_NAME&&(f=g(e,i(n,c-4)),h--),p=g(e,i(n,c-1))):f=g(e,i(n,c-1)),h--;else if(i(n,c-3).type!==z.except_clause)throw new Sk.builtin.SyntaxError("malformed 'try' statement",e.c_filename,n.lineno);if(0<h)for(c=0;c<h;c++){var m=c,y=e,S=i(n,3+3*c),x=i(n,5+3*c);if(o(S,z.except_clause),o(x,z.suite),1===r(S))var w=new Sk.astnodes.ExceptHandler(null,null,g(y,x),S.lineno,S.col_offset);else 2===r(S)?w=new Sk.astnodes.ExceptHandler(L(y,i(S,1)),null,g(y,x),S.lineno,S.col_offset):4===r(S)?(Sk.__future__.python3&&","==i(S,2).value&&s(y,S,"Old-style 'except' clauses are not supported in Python 3"),L(y,i(S,1)),u(y,w=L(y,i(S,3)),Sk.astnodes.Store,i(S,3)),w=new Sk.astnodes.ExceptHandler(L(y,i(S,1)),w,g(y,x),S.lineno,S.col_offset)):(Sk.asserts.fail("wrong number of children for except clause"),w=void 0);t[m]=w}return Sk.asserts.assert(!!p||0!=t.length),new Sk.astnodes.Try(d,t,f,p,n.lineno,n.col_offset);case z.with_stmt:for(t=[],o(n,z.with_stmt),h=1;h<r(n)-2;h+=2)d=void 0,p=e,o(c=i(n,h),z.with_item),f=L(p,i(c,0)),3==r(c)&&u(p,d=L(p,i(c,2)),Sk.astnodes.Store,c),d=new Sk.astnodes.withitem(f,d),t[(h-1)/2]=d;return e=g(e,i(n,r(n)-1)),e=new Sk.astnodes.With(t,e,n.lineno,n.col_offset);case z.funcdef:return E(e,n,[],!1);case z.classdef:return A(e,n,[]);case z.decorated:for(h=null,o(n,z.decorated),o(d=i(n,0),z.decorators),t=[],f=0;f<r(d);++f){p=t,c=f,m=e,o(w=i(d,f),z.decorator),o(i(w,0),F.T_AT),o(i(w,r(w)-1),F.T_NEWLINE);var k,O=i(w,1);o(O,z.dotted_name),y=O.lineno,S=O.col_offset,x=a(i(O,0).value);var T=new Sk.astnodes.Name(x,Sk.astnodes.Load,y,S);for(k=2;k<r(O);k+=2)x=a(i(O,k).value),T=new Sk.astnodes.Attribute(T,x,Sk.astnodes.Load,y,S);y=T,m=3===r(w)?y:5===r(w)?new Sk.astnodes.Call(y,[],[],null,null,w.lineno,w.col_offset):_(m,i(w,3),y),p[c]=m}return Sk.asserts.assert(i(n,1).type==z.funcdef||i(n,1).type==z.async_funcdef||i(n,1).type==z.classdef),i(n,1).type==z.funcdef?h=E(e,h=i(n,1),t,!1):i(n,1).type==z.classdef?h=A(e,i(n,1),t):i(n,1).type==z.async_funcdef&&(o(h=i(n,1),z.async_funcdef),o(i(h,0),F.T_NAME),Sk.asserts.assert(("async"===i(h,0)).value),o(i(h,1),z.funcdef),h=E(e,h,t,!0)),h&&(h.lineno=n.lineno,h.col_offset=n.col_offset),h;case z.async_stmt:s(e,n,"Not implemented: async");break;default:Sk.asserts.assert("unhandled compound_stmt")}}var z=Sk.ParseTables.sym,F=Sk.token.tokens,U={Slice_kind:1,ExtSlice_kind:2,Index_kind:3},Q={};Q[F.T_VBAR]=Sk.astnodes.BitOr,Q[F.T_CIRCUMFLEX]=Sk.astnodes.BitXor,Q[F.T_AMPER]=Sk.astnodes.BitAnd,Q[F.T_LEFTSHIFT]=Sk.astnodes.LShift,Q[F.T_RIGHTSHIFT]=Sk.astnodes.RShift,Q[F.T_PLUS]=Sk.astnodes.Add,Q[F.T_MINUS]=Sk.astnodes.Sub,Q[F.T_STAR]=Sk.astnodes.Mult,Q[F.T_SLASH]=Sk.astnodes.Div,Q[F.T_DOUBLESLASH]=Sk.astnodes.FloorDiv,Q[F.T_PERCENT]=Sk.astnodes.Mod,Sk.setupOperators=function(e){e?Q[F.T_AT]=Sk.astnodes.MatMult:Q[F.T_AT]&&delete Q[F.T_AT]},Sk.exportSymbol("Sk.setupOperators",Sk.setupOperators);const q=/_[eE]|[eE]_|\._|j_/,G=/_\.|[+-]_|^0_\D|_j/,H=/_(?=[^_])/g;Sk.astFromParse=function(e,t,s){var a,c=new n("utf-8",t,s),u=[],d=0;switch(e.type){case z.file_input:for(a=0;a<r(e)-1;++a){var h=i(e,a);if(e.type!==F.T_NEWLINE)if(o(h,z.stmt),1===(s=l(h)))u[d++]=B(c,h);else for(o(h=i(h,0),z.simple_stmt),t=0;t<s;++t)u[d++]=B(c,i(h,2*t))}return new Sk.astnodes.Module(u);case z.eval_input:Sk.asserts.fail("todo;");case z.single_input:Sk.asserts.fail("todo;");default:Sk.asserts.fail("todo;")}},Sk.astDump=function(e){var t=function(e){var t,n="";for(t=0;t<e;++t)n+=" ";return n},n=function(e,r){var i;if(null===e)return r+"None";if(e.prototype&&void 0!==e.prototype._astname&&e.prototype._isenum)return r+e.prototype._astname+"()";if(void 0!==e._astname){var o=t(e._astname.length+1),s=[];for(i=0;i<e._fields.length;i+=2){var a=e._fields[i],l=e._fields[i+1](e),c=t(a.length+1);s.push([a,n(l,r+o+c)])}for(l=[],i=0;i<s.length;++i)c=s[i],l.push(c[0]+"="+c[1].replace(/^\s+/,""));return i=l.join(",\n"+r+o),r+e._astname+"("+i+")"}if(Sk.isArrayLike(e)){for(o=[],i=0;i<e.length;++i)s=e[i],o.push(n(s,r+" "));return r+"["+(e=o.join(",\n")).replace(/^\s+/,"")+"]"}return r+(e=!0===e?"True":!1===e?"False":e instanceof Sk.builtin.lng?e.tp$str().v:e instanceof Sk.builtin.str?e.$r().v:""+e)};return n(e,"")},Sk.exportSymbol("Sk.astFromParse",Sk.astFromParse),Sk.exportSymbol("Sk.astDump",Sk.astDump)},function(e,t){function n(e,t,n){this.__name=e,this.__flags=t,this.__scope=t>>11&7,this.__namespaces=n||[]}function r(e,t,n,r,i){this.symFlags={},this.name=t,this.varnames=[],this.children=[],this.blockType=n,this.returnsValue=this.varkeywords=this.varargs=this.generator=this.childHasFree=this.hasFree=this.isNested=!1,this.lineno=i,this.table=e,e.cur&&(e.cur.nested||"function"===e.cur.blockType)&&(this.isNested=!0),r.scopeId=a++,e.stss[r.scopeId]=this,this.symbols={}}function i(e){this.filename=e,this.top=this.cur=null,this.stack=[],this.curClass=this.global=null,this.tmpname=0,this.stss={}}function o(e,t){var n;for(n=0;n<t.length;n++)e(t[n])}function s(e,t){for(var n in t)e[n]=t[n]}Sk.exportSymbol("Sk.SYMTAB_CONSTS",{DEF_GLOBAL:1,DEF_LOCAL:2,DEF_PARAM:4,USE:8,DEF_STAR:16,DEF_DOUBLESTAR:32,DEF_INTUPLE:64,DEF_FREE:128,DEF_FREE_GLOBAL:256,DEF_FREE_CLASS:512,DEF_IMPORT:1024,DEF_BOUND:1030,SCOPE_OFF:11,SCOPE_MASK:7,LOCAL:1,GLOBAL_EXPLICIT:2,GLOBAL_IMPLICIT:3,FREE:4,CELL:5,OPT_IMPORT_STAR:1,OPT_EXEC:2,OPT_BARE_EXEC:4,OPT_TOPLEVEL:8,GENERATOR:2,GENERATOR_EXPRESSION:2,ModuleBlock:"module",FunctionBlock:"function",ClassBlock:"class"}),n.prototype.get_name=function(){return this.__name},n.prototype.is_referenced=function(){return!!(8&this.__flags)},n.prototype.is_parameter=function(){return!!(4&this.__flags)},n.prototype.is_global=function(){return 3===this.__scope||2==this.__scope},n.prototype.is_declared_global=function(){return 2==this.__scope},n.prototype.is_local=function(){return!!(1030&this.__flags)},n.prototype.is_free=function(){return 4==this.__scope},n.prototype.is_imported=function(){return!!(1024&this.__flags)},n.prototype.is_assigned=function(){return!!(2&this.__flags)},n.prototype.is_namespace=function(){return this.__namespaces&&0<this.__namespaces.length},n.prototype.get_namespaces=function(){return this.__namespaces};var a=0;r.prototype.get_type=function(){return this.blockType},r.prototype.get_name=function(){return this.name},r.prototype.get_lineno=function(){return this.lineno},r.prototype.is_nested=function(){return this.isNested},r.prototype.has_children=function(){return 0<this.children.length},r.prototype.get_identifiers=function(){return this._identsMatching((function(){return!0}))},r.prototype.lookup=function(e){if(this.symbols.hasOwnProperty(e))e=this.symbols[e];else{var t=this.symFlags[e],r=this.__check_children(e);e=this.symbols[e]=new n(e,t,r)}return e},r.prototype.__check_children=function(e){var t,n=[];for(t=0;t<this.children.length;++t){var r=this.children[t];r.name===e&&n.push(r)}return n},r.prototype._identsMatching=function(e){var t,n=[];for(t in this.symFlags)this.symFlags.hasOwnProperty(t)&&e(this.symFlags[t])&&n.push(t);return n.sort(),n},r.prototype.get_parameters=function(){return Sk.asserts.assert("function"==this.get_type(),"get_parameters only valid for function scopes"),this._funcParams||(this._funcParams=this._identsMatching((function(e){return 4&e}))),this._funcParams},r.prototype.get_locals=function(){return Sk.asserts.assert("function"==this.get_type(),"get_locals only valid for function scopes"),this._funcLocals||(this._funcLocals=this._identsMatching((function(e){return 1030&e}))),this._funcLocals},r.prototype.get_globals=function(){return Sk.asserts.assert("function"==this.get_type(),"get_globals only valid for function scopes"),this._funcGlobals||(this._funcGlobals=this._identsMatching((function(e){return 3==(e=e>>11&7)||2==e}))),this._funcGlobals},r.prototype.get_frees=function(){return Sk.asserts.assert("function"==this.get_type(),"get_frees only valid for function scopes"),this._funcFrees||(this._funcFrees=this._identsMatching((function(e){return 4==(e>>11&7)}))),this._funcFrees},r.prototype.get_methods=function(){var e;if(Sk.asserts.assert("class"==this.get_type(),"get_methods only valid for class scopes"),!this._classMethods){var t=[];for(e=0;e<this.children.length;++e)t.push(this.children[e].name);t.sort(),this._classMethods=t}return this._classMethods},r.prototype.getScope=function(e){return void 0===(e=this.symFlags[e])?0:e>>11&7},i.prototype.getStsForAst=function(e){return Sk.asserts.assert(void 0!==e.scopeId,"ast wasn't added to st?"),e=this.stss[e.scopeId],Sk.asserts.assert(void 0!==e,"unknown sym tab entry"),e},i.prototype.SEQStmt=function(e){var t,n;if(null!==e){Sk.asserts.assert(Sk.isArrayLike(e),"SEQ: nodes isn't array? got "+e.toString());var r=e.length;for(n=0;n<r;++n)(t=e[n])&&this.visitStmt(t)}},i.prototype.SEQExpr=function(e){var t,n;if(null!==e){Sk.asserts.assert(Sk.isArrayLike(e),"SEQ: nodes isn't array? got "+e.toString());var r=e.length;for(n=0;n<r;++n)(t=e[n])&&this.visitExpr(t)}},i.prototype.enterBlock=function(e,t,n,i){e=Sk.fixReserved(e);var o=null;this.cur&&(o=this.cur,this.stack.push(this.cur)),this.cur=new r(this,e,t,n,i),"top"===e&&(this.global=this.cur.symFlags),o&&o.children.push(this.cur)},i.prototype.exitBlock=function(){this.cur=null,0<this.stack.length&&(this.cur=this.stack.pop())},i.prototype.visitParams=function(e,t){var n;for(n=0;n<e.length;++n){if((t=e[n]).constructor!==Sk.astnodes.arg)throw new Sk.builtin.SyntaxError("invalid expression in parameter list",this.filename);this.addDef(t.arg,4,t.lineno)}},i.prototype.visitArguments=function(e,t){e.args&&this.visitParams(e.args,!0),e.kwonlyargs&&this.visitParams(e.kwonlyargs,!0),e.vararg&&(this.addDef(e.vararg.arg,4,t),this.cur.varargs=!0),e.kwarg&&(this.addDef(e.kwarg.arg,4,t),this.cur.varkeywords=!0)},i.prototype.newTmpname=function(e){this.addDef(new Sk.builtin.str("_["+ ++this.tmpname+"]"),2,e)},i.prototype.addDef=function(e,t,n){var r=Sk.mangleName(this.curClass,e).v;r=Sk.fixReserved(r);var i=this.cur.symFlags[r];if(void 0!==i){if(4&t&&4&i)throw new Sk.builtin.SyntaxError("duplicate argument '"+e.v+"' in function definition",this.filename,n);i|=t}else i=t;this.cur.symFlags[r]=i,4&t?this.cur.varnames.push(r):1&t&&(i=t,void 0!==(e=this.global[r])&&(i|=e),this.global[r]=i)},i.prototype.visitSlice=function(e){var t;switch(e.constructor){case Sk.astnodes.Slice:e.lower&&this.visitExpr(e.lower),e.upper&&this.visitExpr(e.upper),e.step&&this.visitExpr(e.step);break;case Sk.astnodes.ExtSlice:for(t=0;t<e.dims.length;++t)this.visitSlice(e.dims[t]);break;case Sk.astnodes.Index:this.visitExpr(e.value)}},i.prototype.visitStmt=function(e){var t;switch(Sk.asserts.assert(void 0!==e,"visitStmt called with undefined"),e.constructor){case Sk.astnodes.FunctionDef:this.addDef(e.name,2,e.lineno),e.args.defaults&&this.SEQExpr(e.args.defaults),e.decorator_list&&this.SEQExpr(e.decorator_list),this.enterBlock(e.name.v,"function",e,e.lineno),this.visitArguments(e.args,e.lineno),this.SEQStmt(e.body),this.exitBlock();break;case Sk.astnodes.ClassDef:this.addDef(e.name,2,e.lineno),this.SEQExpr(e.bases),e.decorator_list&&this.SEQExpr(e.decorator_list),this.enterBlock(e.name.v,"class",e,e.lineno),this.curClass=e.name,this.SEQStmt(e.body),this.exitBlock();break;case Sk.astnodes.Return:if(e.value&&(this.visitExpr(e.value),this.cur.returnsValue=!0,this.cur.generator))throw new Sk.builtin.SyntaxError("'return' with argument inside generator",this.filename);break;case Sk.astnodes.Delete:this.SEQExpr(e.targets);break;case Sk.astnodes.Assign:this.SEQExpr(e.targets),this.visitExpr(e.value);break;case Sk.astnodes.AnnAssign:if(e.target.constructor==Sk.astnodes.Name){var n=e.target,r=Sk.mangleName(this.curClass,n.id).v;if(r=Sk.fixReserved(r),2049&(n=this.cur.symFlags[r])&&this.global!=this.cur.symFlags&&e.simple)throw new Sk.builtin.SyntaxError("annotated name '"+r+"' can't be global",this.filename,e.lineno);e.simple?this.addDef(new Sk.builtin.str(r),4098,e.lineno):e.value&&this.addDef(new Sk.builtin.str(r),2,e.lineno)}else this.visitExpr(e.target);this.visitExpr(e.annotation),e.value&&this.visitExpr(e.value);break;case Sk.astnodes.AugAssign:this.visitExpr(e.target),this.visitExpr(e.value);break;case Sk.astnodes.Print:e.dest&&this.visitExpr(e.dest),this.SEQExpr(e.values);break;case Sk.astnodes.For:this.visitExpr(e.target),this.visitExpr(e.iter),this.SEQStmt(e.body),e.orelse&&this.SEQStmt(e.orelse);break;case Sk.astnodes.While:case Sk.astnodes.If:this.visitExpr(e.test),this.SEQStmt(e.body),e.orelse&&this.SEQStmt(e.orelse);break;case Sk.astnodes.Raise:e.exc&&(this.visitExpr(e.exc),e.inst&&(this.visitExpr(e.inst),e.tback&&this.visitExpr(e.tback)),e.cause&&this.visitExpr(e.cause));break;case Sk.astnodes.Assert:this.visitExpr(e.test),e.msg&&this.visitExpr(e.msg);break;case Sk.astnodes.Import:case Sk.astnodes.ImportFrom:this.visitAlias(e.names,e.lineno);break;case Sk.astnodes.Global:var i=e.names.length;for(t=0;t<i;++t){if(r=Sk.mangleName(this.curClass,e.names[t]).v,r=Sk.fixReserved(r),10&(n=this.cur.symFlags[r])){if(2&n)throw new Sk.builtin.SyntaxError("name '"+r+"' is assigned to before global declaration",this.filename,e.lineno);throw new Sk.builtin.SyntaxError("name '"+r+"' is used prior to global declaration",this.filename,e.lineno)}this.addDef(new Sk.builtin.str(r),1,e.lineno)}break;case Sk.astnodes.Expr:this.visitExpr(e.value);break;case Sk.astnodes.Pass:case Sk.astnodes.Break:case Sk.astnodes.Continue:case Sk.astnodes.Debugger:break;case Sk.astnodes.With:o(this.visit_withitem.bind(this),e.items),o(this.visitStmt.bind(this),e.body);break;case Sk.astnodes.Try:this.SEQStmt(e.body),this.visitExcepthandlers(e.handlers),this.SEQStmt(e.orelse),this.SEQStmt(e.finalbody);break;default:Sk.asserts.fail("Unhandled type "+e.constructor.name+" in visitStmt")}},i.prototype.visit_withitem=function(e){this.visitExpr(e.context_expr),e.optional_vars&&this.visitExpr(e.optional_vars)},i.prototype.visitExpr=function(e){switch(Sk.asserts.assert(void 0!==e,"visitExpr called with undefined"),e.constructor){case Sk.astnodes.BoolOp:this.SEQExpr(e.values);break;case Sk.astnodes.BinOp:this.visitExpr(e.left),this.visitExpr(e.right);break;case Sk.astnodes.UnaryOp:this.visitExpr(e.operand);break;case Sk.astnodes.Lambda:this.addDef(new Sk.builtin.str("lambda"),2,e.lineno),e.args.defaults&&this.SEQExpr(e.args.defaults),this.enterBlock("lambda","function",e,e.lineno),this.visitArguments(e.args,e.lineno),this.visitExpr(e.body),this.exitBlock();break;case Sk.astnodes.IfExp:this.visitExpr(e.test),this.visitExpr(e.body),this.visitExpr(e.orelse);break;case Sk.astnodes.Dict:this.SEQExpr(e.keys),this.SEQExpr(e.values);break;case Sk.astnodes.DictComp:case Sk.astnodes.SetComp:this.visitComprehension(e.generators,0);break;case Sk.astnodes.ListComp:this.newTmpname(e.lineno),this.visitExpr(e.elt),this.visitComprehension(e.generators,0);break;case Sk.astnodes.GeneratorExp:this.visitGenexp(e);break;case Sk.astnodes.Yield:if(e.value&&this.visitExpr(e.value),this.cur.generator=!0,this.cur.returnsValue)throw new Sk.builtin.SyntaxError("'return' with argument inside generator",this.filename);break;case Sk.astnodes.Compare:this.visitExpr(e.left),this.SEQExpr(e.comparators);break;case Sk.astnodes.Call:if(this.visitExpr(e.func),e.args)for(let t of e.args)t.constructor===Sk.astnodes.Starred?this.visitExpr(t.value):this.visitExpr(t);if(e.keywords)for(let t of e.keywords)this.visitExpr(t.value);break;case Sk.astnodes.Num:case Sk.astnodes.Str:case Sk.astnodes.Bytes:break;case Sk.astnodes.JoinedStr:for(let t of e.values)this.visitExpr(t);break;case Sk.astnodes.FormattedValue:this.visitExpr(e.value),e.format_spec&&this.visitExpr(e.format_spec);break;case Sk.astnodes.Attribute:this.visitExpr(e.value);break;case Sk.astnodes.Subscript:this.visitExpr(e.value),this.visitSlice(e.slice);break;case Sk.astnodes.Name:this.addDef(e.id,e.ctx===Sk.astnodes.Load?8:2,e.lineno);break;case Sk.astnodes.NameConstant:break;case Sk.astnodes.List:case Sk.astnodes.Tuple:case Sk.astnodes.Set:this.SEQExpr(e.elts);break;case Sk.astnodes.Starred:this.visitExpr(e.value);break;default:Sk.asserts.fail("Unhandled type "+e.constructor.name+" in visitExpr")}},i.prototype.visitComprehension=function(e,t){var n,r=e.length;for(n=t;n<r;++n)t=e[n],this.visitExpr(t.target),this.visitExpr(t.iter),this.SEQExpr(t.ifs)},i.prototype.visitAlias=function(e,t){var n,r;for(r=0;r<e.length;++r){var i=e[r],o=n=null===i.asname?i.name.v:i.asname.v;if(-1!==(i=n.indexOf("."))&&(o=n.substr(0,i)),"*"!==n)this.addDef(new Sk.builtin.str(o),1024,t);else if("module"!==this.cur.blockType)throw new Sk.builtin.SyntaxError("import * only allowed at module level",this.filename)}},i.prototype.visitGenexp=function(e){var t=e.generators[0];this.visitExpr(t.iter),this.enterBlock("genexpr","function",e,e.lineno),this.cur.generator=!0,this.addDef(new Sk.builtin.str(".0"),4,e.lineno),this.visitExpr(t.target),this.SEQExpr(t.ifs),this.visitComprehension(e.generators,1),this.visitExpr(e.elt),this.exitBlock()},i.prototype.visitExcepthandlers=function(e){var t,n;for(t=0;n=e[t];++t)n.type&&this.visitExpr(n.type),n.name&&this.visitExpr(n.name),this.SEQStmt(n.body)},i.prototype.analyzeBlock=function(e,t,n,r){var i={},o={},a={},l={},c={};for(d in"class"==e.blockType&&(s(a,r),t&&s(l,t)),e.symFlags){var u=e.symFlags[d];this.analyzeName(e,o,d,u,t,i,n,r)}"class"!==e.blockType&&("function"===e.blockType&&s(l,i),t&&s(l,t),s(a,r)),i={};var d=e.children.length;for(u=0;u<d;++u)r=e.children[u],this.analyzeChildBlock(r,l,c,a,i),(r.hasFree||r.childHasFree)&&(e.childHasFree=!0);s(c,i),"function"===e.blockType&&this.analyzeCells(o,c),t=this.updateSymbols(e.symFlags,o,t,c,"class"===e.blockType),e.hasFree=e.hasFree||t,s(n,c)},i.prototype.analyzeChildBlock=function(e,t,n,r,i){var o={};s(o,t),s(t={},n),s(n={},r),this.analyzeBlock(e,o,t,n),s(i,t)},i.prototype.analyzeCells=function(e,t){var n;for(n in e){1===e[n]&&void 0!==t[n]&&(e[n]=5,delete t[n])}},i.prototype.updateSymbols=function(e,t,n,r,i){var o,s=!1;for(o in e){var a=e[o];a|=t[o]<<11,e[o]=a}for(o in r)void 0!==(t=e[o])?i&&1031&t&&(t|=512,e[o]=t):void 0!==n[o]&&(e[o]=8192,s=!0);return s},i.prototype.analyzeName=function(e,t,n,r,i,o,s,a){if(1&r){if(4&r)throw new Sk.builtin.SyntaxError("name '"+n+"' is local and global",this.filename,e.lineno);t[n]=2,a[n]=null,i&&void 0!==i[n]&&delete i[n]}else 1030&r?(t[n]=1,o[n]=null,delete a[n]):i&&void 0!==i[n]?(t[n]=4,e.hasFree=!0,s[n]=null):(a&&void 0!==a[n]||!e.isNested||(e.hasFree=!0),t[n]=3)},i.prototype.analyze=function(){this.analyzeBlock(this.top,null,{},{})},Sk.symboltable=function(e,t){var n=new i(t);for(n.enterBlock("top","module",e,0),n.top=n.cur,t=0;t<e.body.length;++t)n.visitStmt(e.body[t]);return n.exitBlock(),n.analyze(),n},Sk.dumpSymtab=function(e){var t=function(e){return e?"True":"False"},n=function(e){var t,n=[];for(t=0;t<e.length;++t)n.push(new Sk.builtin.str(e[t]).$r().v);return"["+n.join(", ")+"]"},r=function(e,i){var o,s;void 0===i&&(i="");var a=i+"Sym_type: "+e.get_type()+"\n";a+=i+"Sym_name: "+e.get_name()+"\n",a+=i+"Sym_lineno: "+e.get_lineno()+"\n",a+=i+"Sym_nested: "+t(e.is_nested())+"\n",a+=i+"Sym_haschildren: "+t(e.has_children())+"\n","class"===e.get_type()?a+=i+"Class_methods: "+n(e.get_methods())+"\n":"function"===e.get_type()&&(a+=i+"Func_params: "+n(e.get_parameters())+"\n",a+=i+"Func_locals: "+n(e.get_locals())+"\n",a+=i+"Func_globals: "+n(e.get_globals())+"\n",a+=i+"Func_frees: "+n(e.get_frees())+"\n"),a+=i+"-- Identifiers --\n";var l=e.get_identifiers(),c=l.length;for(s=0;s<c;++s){var u=e.lookup(l[s]);a+=i+"name: "+u.get_name()+"\n",a+=i+" is_referenced: "+t(u.is_referenced())+"\n",a+=i+" is_imported: "+t(u.is_imported())+"\n",a+=i+" is_parameter: "+t(u.is_parameter())+"\n",a+=i+" is_global: "+t(u.is_global())+"\n",a+=i+" is_declared_global: "+t(u.is_declared_global())+"\n",a+=i+" is_local: "+t(u.is_local())+"\n",a+=i+" is_free: "+t(u.is_free())+"\n",a+=i+" is_assigned: "+t(u.is_assigned())+"\n",a+=i+" is_namespace: "+t(u.is_namespace())+"\n";var d=u.get_namespaces(),h=d.length;a+=i+" namespaces: [\n";var p=[];for(o=0;o<h;++o)u=d[o],p.push(r(u,i+" "));a+=p.join("\n"),a+=i+" ]\n"}return a};return r(e.top,"")},Sk.exportSymbol("Sk.symboltable",Sk.symboltable),Sk.exportSymbol("Sk.dumpSymtab",Sk.dumpSymtab)},function(e,t){function n(e,t,n,r,i){this.filename=e,this.st=t,this.flags=n,this.canSuspend=r,this.interactive=!1,this.nestlevel=0,this.u=null,this.stack=[],this.result=[],this.allUnits=[],this.source=!!i&&i.split("\n")}function r(){this.name=this.ste=null,this.doesSuspend=this.canSuspend=!1,this.private_=null,this.lineno=this.firstlineno=0,this.linenoSet=!1,this.localnames=[],this.localtemps=[],this.tempsToSave=[],this.blocknum=0,this.blocks=[],this.curblock=0,this.consts={},this.scopename=null,this.suffixCode=this.switchCode=this.varDeclsCode=this.prefixCode="",this.breakBlocks=[],this.continueBlocks=[],this.exceptBlocks=[],this.finallyBlocks=[]}function i(e){return void 0===a[e]?e:e+"_$rw$"}function o(e,t){var n=t.v;if(null===e||null===n||"_"!==n.charAt(0)||"_"!==n.charAt(1)||"_"===n.charAt(n.length-1)&&"_"===n.charAt(n.length-2))return t;var r=e.v;return r.replace(/_/g,""),""===r?t:((r=e.v).replace(/^_*/,""),new Sk.builtin.str("_"+r+n))}var s;Sk.gensymcount=0,r.prototype.activateScope=function(){var e=this;s=function(){var t,n=e.blocks[e.curblock];if(null===n._next)for(t=0;t<arguments.length;++t)n.push(arguments[t])}},n.prototype.getSourceLine=function(e){return Sk.asserts.assert(this.source),this.source[e-1]},n.prototype.annotateSource=function(e){var t;if(this.source){var n=e.lineno,r=e.col_offset;for(s("\n//\n// line ",n,":\n// ",this.getSourceLine(n),"\n// "),t=0;t<r;++t)s(" ");s("^\n//\n"),Sk.asserts.assert(void 0!==e.lineno&&void 0!==e.col_offset),s("$currLineNo = ",n,";\n$currColNo = ",r,";\n\n")}},n.prototype.gensym=function(e){return"$"+(e||"")+Sk.gensymcount++},n.prototype.niceName=function(e){return this.gensym(e.replace("<","").replace(">","").replace(" ","_"))};var a=Sk.builtin.str.reservedWords_;n.prototype.makeConstant=function(e){var t,n="";for(t=0;t<arguments.length;++t)n+=arguments[t];for(r in this.u.consts)if(this.u.consts.hasOwnProperty(r)&&(t=this.u.consts[r])==n)return r;var r=this.u.scopename+"."+this.gensym("const");return this.u.consts[r]=n,r},n.prototype._gr=function(e,t){var n,r=this.gensym(e);for(this.u.localtemps.push(r),s("var ",r,"="),n=1;n<arguments.length;++n)s(arguments[n]);return s(";"),r},n.prototype.outputInterruptTest=function(){var e="";return(null!==Sk.execLimit||null!==Sk.yieldLimit&&this.u.canSuspend)&&(e+="var $dateNow = Date.now();",null!==Sk.execLimit&&(e+="if ($dateNow - Sk.execStart > Sk.execLimit) {throw new Sk.builtin.TimeLimitError(Sk.timeoutMsg())}"),null!==Sk.yieldLimit&&this.u.canSuspend&&(e=e+"if ($dateNow - Sk.lastYield > Sk.yieldLimit) {var $susp = $saveSuspension({data: {type: 'Sk.yield'}, resume: function() {}}, '"+this.filename+"',$currLineNo,$currColNo);",e+="$susp.$blk = $blk;$susp.optional = true;return $susp;}",this.u.doesSuspend=!0)),e},n.prototype._jumpfalse=function(e,t){e=this._gr("jfalse","(",e,"===false||!Sk.misceval.isTrue(",e,"))"),s("if(",e,"){/*test failed */$blk=",t,";continue;}")},n.prototype._jumpundef=function(e,t){s("if(",e,"===undefined){$blk=",t,";continue;}")},n.prototype._jumpnotundef=function(e,t){s("if(",e,"!==undefined){$blk=",t,";continue;}")},n.prototype._jumptrue=function(e,t){e=this._gr("jtrue","(",e,"===true||Sk.misceval.isTrue(",e,"))"),s("if(",e,"){/*test passed */$blk=",t,";continue;}")},n.prototype._jump=function(e){null===this.u.blocks[this.u.curblock]._next&&(s("$blk=",e,";"),this.u.blocks[this.u.curblock]._next=e)},n.prototype._checkSuspension=function(e){if(this.u.canSuspend){var t=this.newBlock("function return or resume suspension");this._jump(t),this.setBlock(t),e=e||{lineno:"$currLineNo",col_offset:"$currColNo"},s("if ($ret && $ret.$isSuspension) { return $saveSuspension($ret,'"+this.filename+"',"+e.lineno+","+e.col_offset+"); }"),this.u.doesSuspend=!0,this.u.tempsToSave=this.u.tempsToSave.concat(this.u.localtemps)}else s("if ($ret && $ret.$isSuspension) { $ret = Sk.misceval.retryOptionalSuspensionOrThrow($ret); }")},n.prototype.cunpackstarstoarray=function(e,t){if(!e||0==e.length)return"[]";let n=!1;for(let r of e){if(t&&n)throw new Sk.builtin.SyntaxError("Extended argument unpacking is not permitted in Python 2");r.constructor===Sk.astnodes.Starred&&(n=!0)}if(n){t=this._gr("unpack","[]");for(let n of e)n.constructor!==Sk.astnodes.Starred?s(t,".push(",this.vexpr(n),");"):(s("$ret = Sk.misceval.iterFor(Sk.abstr.iter(",this.vexpr(n.value),"), function(e) { ",t,".push(e); });"),this._checkSuspension());return t}return"["+e.map(e=>this.vexpr(e)).join(",")+"]"},n.prototype.ctuplelistorset=function(e,t,n){var r;Sk.asserts.assert("tuple"===n||"list"===n||"set"===n);var i=!1;for(r=0;r<e.elts.length;r++)if(e.elts[r].constructor===Sk.astnodes.Starred){i=!0;var o=r;break}if(e.ctx===Sk.astnodes.Store){if(i){if(!Sk.__future__.python3)throw new Sk.builtin.SyntaxError("assignment unpacking with stars is not supported in Python 2",this.filename,e.lineno);for(r=o+1;r<e.elts.length;r++)if(e.elts[r].constructor===Sk.astnodes.Starred)throw new Sk.builtin.SyntaxError("multiple starred expressions in assignment",this.filename,e.lineno)}for(n=i?o:e.elts.length,s("$ret = Sk.abstr.sequenceUnpack("+t+","+n+","+(i?e.elts.length-1:n)+", "+i+");"),this._checkSuspension(),t=this._gr("items","$ret"),r=0;r<e.elts.length;++r)r===o?this.vexpr(e.elts[r].value,t+"["+r+"]"):this.vexpr(e.elts[r],t+"["+r+"]")}else if(e.ctx===Sk.astnodes.Load||"set"===n){if(i){if(!Sk.__future__.python3)throw new Sk.builtin.SyntaxError("List packing with stars is not supported in Python 2");return this._gr("load"+n,"new Sk.builtins['",n,"'](",this.cunpackstarstoarray(e.elts),")")}if("tuple"===n){for(i=!0,t=[],r=0;r<e.elts.length;++r)o=this.vexpr(e.elts[r]),i&&-1==o.indexOf("$const")&&(i=!1),t.push(o);if(i)return this.makeConstant("new Sk.builtin.tuple(["+t+"])");for(r=0;r<t.length;++r)t[r]=this._gr("elem",t[r]);return this._gr("load"+n,"new Sk.builtins['",n,"']([",t,"])")}for(t=[],r=0;r<e.elts.length;++r)t.push(this._gr("elem",this.vexpr(e.elts[r])));return this._gr("load"+n,"new Sk.builtins['",n,"']([",t,"])")}},n.prototype.cdict=function(e){var t,n=[];if(null!==e.keys)for(Sk.asserts.assert(e.values.length===e.keys.length),t=0;t<e.values.length;++t){var r=this.vexpr(e.values[t]);n.push(this.vexpr(e.keys[t])),n.push(r)}return this._gr("loaddict","new Sk.builtins['dict']([",n,"])")},n.prototype.clistcomp=function(e){Sk.asserts.assert(e instanceof Sk.astnodes.ListComp);var t=this._gr("_compr","new Sk.builtins['list']([])");return this.ccompgen("list",t,e.generators,0,e.elt,null,e)},n.prototype.cdictcomp=function(e){Sk.asserts.assert(e instanceof Sk.astnodes.DictComp);var t=this._gr("_dcompr","new Sk.builtins.dict([])");return this.ccompgen("dict",t,e.generators,0,e.value,e.key,e)},n.prototype.csetcomp=function(e){Sk.asserts.assert(e instanceof Sk.astnodes.SetComp);var t=this._gr("_setcompr","new Sk.builtins.set([])");return this.ccompgen("set",t,e.generators,0,e.elt,null,e)},n.prototype.ccompgen=function(e,t,n,r,i,o,a){var l,c=this.newBlock(e+" comp start"),u=this.newBlock(e+" comp skip"),d=this.newBlock(e+" comp anchor"),h=n[r],p=this.vexpr(h.iter);p=this._gr("iter","Sk.abstr.iter(",p,")"),this._jump(c),this.setBlock(c),s("$ret = Sk.abstr.iternext(",p,", true);"),this._checkSuspension(a),p=this._gr("next","$ret"),this._jumpundef(p,d),this.vexpr(h.target,p);var f=h.ifs?h.ifs.length:0;for(l=0;l<f;++l)p=this.vexpr(h.ifs[l]),this._jumpfalse(p,c);return++r<n.length&&this.ccompgen(e,t,n,r,i,o,a),r>=n.length&&(n=this.vexpr(i),"dict"===e?(e=this.vexpr(o),s(t,".mp$ass_subscript(",e,",",n,");")):"list"===e?s(t,".v.push(",n,");"):"set"===e&&s(t,".v.mp$ass_subscript(",n,", true);"),this._jump(u),this.setBlock(u)),this._jump(c),this.setBlock(d),t},n.prototype.cyield=function(e){if(this.u.ste.blockType!==Sk.SYMTAB_CONSTS.FunctionBlock)throw new Sk.builtin.SyntaxError("'yield' outside function",this.filename,e.lineno);var t="Sk.builtin.none.none$";return e.value&&(t=this.vexpr(e.value)),e=this.newBlock("after yield"),s("return [/*resume*/",e,",/*ret*/",t,"];"),this.setBlock(e),"$gen.gi$sentvalue"},n.prototype.ccompare=function(e){var t;Sk.asserts.assert(e.ops.length===e.comparators.length);var n=this.vexpr(e.left),r=e.ops.length,i=this.newBlock("done"),o=this._gr("compareres","null");for(t=0;t<r;++t){var a=this.vexpr(e.comparators[t]);s("$ret = Sk.builtin.bool(Sk.misceval.richCompareBool(",n,",",a,",'",e.ops[t].prototype._astname,"', true));"),this._checkSuspension(e),s(o,"=$ret;"),this._jumpfalse("$ret",i),n=a}return this._jump(i),this.setBlock(i),o},n.prototype.ccall=function(e){var t=this.vexpr(e.func);let n=this.cunpackstarstoarray(e.args,!Sk.__future__.python3);var r="undefined";if(e.keywords&&0<e.keywords.length){let n=!1;r=[];for(let t of e.keywords){if(n&&!Sk.__future__.python3)throw new SyntaxError("Advanced unpacking of function arguments is not supported in Python 2");t.arg?(r.push("'"+t.arg.v+"'"),r.push(this.vexpr(t.value))):n=!0}if(r="["+r.join(",")+"]",n){r=this._gr("keywordArgs",r);for(let n of e.keywords)n.arg||(s("$ret = Sk.abstr.mappingUnpackIntoKeywordArray(",r,",",this.vexpr(n.value),",",t,");"),this._checkSuspension())}}return Sk.__future__.super_args&&e.func.id&&"super"===e.func.id.v&&"[]"===n&&(s('if (typeof self === "undefined" || self.toString().indexOf("Window") > 0) { throw new Sk.builtin.RuntimeError("super(): no arguments") };'),n="[$gbl.__class__,self]"),s("$ret = (",t,".tp$call)?",t,".tp$call(",n,",",r,") : Sk.misceval.applyOrSuspend(",t,",undefined,undefined,",r,",",n,");"),this._checkSuspension(e),this._gr("call","$ret")},n.prototype.cslice=function(e){if(Sk.asserts.assert(e instanceof Sk.astnodes.Slice),Sk.__future__.python3)var t=e.lower?this.vexpr(e.lower):"Sk.builtin.none.none$",n=e.upper?this.vexpr(e.upper):"Sk.builtin.none.none$";else t=e.lower?this.vexpr(e.lower):e.step?"Sk.builtin.none.none$":"new Sk.builtin.int_(0)",n=e.upper?this.vexpr(e.upper):e.step?"Sk.builtin.none.none$":"new Sk.builtin.int_(2147483647)";return e=e.step?this.vexpr(e.step):"Sk.builtin.none.none$",this._gr("slice","new Sk.builtins['slice'](",t,",",n,",",e,")")},n.prototype.eslice=function(e){var t;Sk.asserts.assert(e instanceof Array);var n=[];for(t=0;t<e.length;t++)n.push(this.vslicesub(e[t]));return this._gr("extslice","new Sk.builtins['tuple']([",n,"])")},n.prototype.vslicesub=function(e){switch(e.constructor){case Sk.astnodes.Index:var t=this.vexpr(e.value);break;case Sk.astnodes.Slice:t=this.cslice(e);break;case Sk.astnodes.Ellipsis:Sk.asserts.fail("todo compile.js Ellipsis;");break;case Sk.astnodes.ExtSlice:t=this.eslice(e.dims);break;default:Sk.asserts.fail("invalid subscript kind")}return t},n.prototype.vslice=function(e,t,n,r){return e=this.vslicesub(e),this.chandlesubscr(t,n,e,r)},n.prototype.chandlesubscr=function(e,t,n,r){if(e===Sk.astnodes.Load||e===Sk.astnodes.AugLoad)return s("$ret = Sk.abstr.objectGetItem(",t,",",n,", true);"),this._checkSuspension(),this._gr("lsubscr","$ret");e===Sk.astnodes.Store||e===Sk.astnodes.AugStore?(s("$ret = Sk.abstr.objectSetItem(",t,",",n,",",r,", true);"),this._checkSuspension()):e===Sk.astnodes.Del?s("Sk.abstr.objectDelItem(",t,",",n,");"):Sk.asserts.fail("handlesubscr fail")},n.prototype.cboolop=function(e){var t,n;Sk.asserts.assert(e instanceof Sk.astnodes.BoolOp);var r=e.op===Sk.astnodes.And?this._jumpfalse:this._jumptrue,i=this.newBlock("end of boolop"),o=e.values,a=o.length;for(t=0;t<a;++t)e=this.vexpr(o[t]),0===t&&(n=this._gr("boolopsucc",e)),s(n,"=",e,";"),r.call(this,e,i);return this._jump(i),this.setBlock(i),n},n.prototype.cjoinedstr=function(e){let t;Sk.asserts.assert(e instanceof Sk.astnodes.JoinedStr);for(let n of e.values)e=this.vexpr(n),t?s(t,"=",t,".sq$concat(",e,");"):t=this._gr("joinedstr",e);return t||(t="Sk.builtin.str.$emptystr"),t},n.prototype.cformattedvalue=function(e){let t=this.vexpr(e.value);switch(e.conversion){case"s":t=this._gr("value","new Sk.builtin.str(",t,")");break;case"a":t=this._gr("value","Sk.builtin.ascii(",t,")");break;case"r":t=this._gr("value","Sk.builtin.repr(",t,")")}return e=e.format_spec?this.vexpr(e.format_spec):"Sk.builtin.str.$emptystr",this._gr("formatted","Sk.abstr.objectFormat("+t+","+e+")")},n.prototype.vexpr=function(e,t,n,r){var i;switch(e.lineno>this.u.lineno&&(this.u.lineno=e.lineno,this.u.linenoSet=!1),e.constructor){case Sk.astnodes.BoolOp:return this.cboolop(e);case Sk.astnodes.BinOp:return this._gr("binop","Sk.abstr.numberBinOp(",this.vexpr(e.left),",",this.vexpr(e.right),",'",e.op.prototype._astname,"')");case Sk.astnodes.UnaryOp:return this._gr("unaryop","Sk.abstr.numberUnaryOp(",this.vexpr(e.operand),",'",e.op.prototype._astname,"')");case Sk.astnodes.Lambda:return this.clambda(e);case Sk.astnodes.IfExp:return this.cifexp(e);case Sk.astnodes.Dict:return this.cdict(e);case Sk.astnodes.ListComp:return this.clistcomp(e);case Sk.astnodes.DictComp:return this.cdictcomp(e);case Sk.astnodes.SetComp:return this.csetcomp(e);case Sk.astnodes.GeneratorExp:return this.cgenexp(e);case Sk.astnodes.Yield:return this.cyield(e);case Sk.astnodes.Compare:return this.ccompare(e);case Sk.astnodes.Call:return t=this.ccall(e),this.annotateSource(e),t;case Sk.astnodes.Num:if("number"==typeof e.n)return e.n;if(e.n instanceof Sk.builtin.lng)return this.makeConstant("new Sk.builtin.lng('"+e.n.v.toString()+"')");if(e.n instanceof Sk.builtin.int_)return"number"==typeof e.n.v?this.makeConstant("new Sk.builtin.int_("+e.n.v+")"):this.makeConstant("new Sk.builtin.int_('"+e.n.v.toString()+"')");if(e.n instanceof Sk.builtin.float_)return e=0===e.n.v&&-1/0==1/e.n.v?"-0":e.n.v,this.makeConstant("new Sk.builtin.float_("+e+")");if(e.n instanceof Sk.builtin.complex)return this.makeConstant("new Sk.builtin.complex("+(0===e.n.real&&-1/0==1/e.n.real?"-0":e.n.real)+", "+(0===e.n.imag&&-1/0==1/e.n.imag?"-0":e.n.imag)+")");Sk.asserts.fail("unhandled Num type");case Sk.astnodes.Bytes:if(Sk.__future__.python3){for(t=[],e=e.s.$jsstr(),n=0;n<e.length;n++)t.push(e.charCodeAt(n));return this.makeConstant("new Sk.builtin.bytes([",t.join(", "),"])")}case Sk.astnodes.Str:return this.makeConstant("new Sk.builtin.str(",function(e){let t='"';for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t=10==r?t+"\\n":92==r?t+"\\\\":34==r||32>r||127<=r&&256>r?t+"\\x"+("0"+r.toString(16)).substr(-2):256<=r?t+"\\u"+("000"+r.toString(16)).substr(-4):t+e.charAt(n)}return t+'"'}(e.s.$jsstr()),")");case Sk.astnodes.Attribute:switch(e.ctx!==Sk.astnodes.AugLoad&&e.ctx!==Sk.astnodes.AugStore&&(i=this.vexpr(e.value)),r=(r=e.attr.$r().v).substring(1,r.length-1),r=o(this.u.private_,new Sk.builtin.str(r)).v,r=this.makeConstant("new Sk.builtin.str('"+r+"')"),e.ctx){case Sk.astnodes.AugLoad:return s("$ret = ",n,".tp$getattr(",r,", true);"),this._checkSuspension(e),s("\nif ($ret === undefined) {"),s("\nthrow new Sk.builtin.AttributeError(",n,'.sk$attrError() + " has no attribute \'" + ',r,'.$jsstr() + "\'");'),s("\n};"),this._gr("lattr","$ret");case Sk.astnodes.Load:return s("$ret = ",i,".tp$getattr(",r,", true);"),this._checkSuspension(e),s("\nif ($ret === undefined) {"),s("\nthrow new Sk.builtin.AttributeError(",i,'.sk$attrError() + " has no attribute \'" + ',r,'.$jsstr() + "\'");'),s("\n};"),this._gr("lattr","$ret");case Sk.astnodes.AugStore:s("$ret = undefined;"),s("if(",t,"!==undefined){"),s("$ret = ",n,".tp$setattr(",r,",",t,", true);"),s("}"),this._checkSuspension(e);break;case Sk.astnodes.Store:s("$ret = ",i,".tp$setattr(",r,",",t,", true);"),this._checkSuspension(e);break;case Sk.astnodes.Del:s("$ret = ",i,".tp$setattr(",r,", undefined, true);"),this._checkSuspension(e);break;default:Sk.asserts.fail("invalid attribute expression")}break;case Sk.astnodes.Subscript:switch(e.ctx){case Sk.astnodes.AugLoad:return s("$ret = Sk.abstr.objectGetItem(",n,",",r,", true);"),this._checkSuspension(e),this._gr("gitem","$ret");case Sk.astnodes.Load:case Sk.astnodes.Store:case Sk.astnodes.Del:return this.vslice(e.slice,e.ctx,this.vexpr(e.value),t);case Sk.astnodes.AugStore:s("$ret=undefined;"),s("if(",t,"!==undefined){"),s("$ret=Sk.abstr.objectSetItem(",n,",",r,",",t,", true)"),s("}"),this._checkSuspension(e);break;default:Sk.asserts.fail("invalid subscript expression")}break;case Sk.astnodes.Name:return this.nameop(e.id,e.ctx,t);case Sk.astnodes.NameConstant:if(e.ctx===Sk.astnodes.Store||e.ctx===Sk.astnodes.AugStore||e.ctx===Sk.astnodes.Del)throw new Sk.builtin.SyntaxError("can not assign to a constant name");switch(e.value){case Sk.builtin.none.none$:return"Sk.builtin.none.none$";case Sk.builtin.bool.true$:return"Sk.builtin.bool.true$";case Sk.builtin.bool.false$:return"Sk.builtin.bool.false$";default:Sk.asserts.fail("invalid named constant")}break;case Sk.astnodes.List:return this.ctuplelistorset(e,t,"list");case Sk.astnodes.Tuple:return this.ctuplelistorset(e,t,"tuple");case Sk.astnodes.Set:return this.ctuplelistorset(e,t,"set");case Sk.astnodes.Starred:switch(e.ctx){case Sk.astnodes.Store:throw new Sk.builtin.SyntaxError("starred assignment target must be in a list or tuple",this.filename,e.lineno);default:throw new Sk.builtin.SyntaxError("can't use starred expression here",this.filename,e.lineno)}case Sk.astnodes.JoinedStr:return this.cjoinedstr(e);case Sk.astnodes.FormattedValue:return this.cformattedvalue(e);default:Sk.asserts.fail("unhandled case "+e.constructor.name+" vexpr")}},n.prototype.vseqexpr=function(e,t){var n;Sk.asserts.assert(void 0===t||e.length===t.length);var r=[];for(n=0;n<e.length;++n)r.push(this.vexpr(e[n],void 0===t?void 0:t[n]));return r},n.prototype.caugassign=function(e){Sk.asserts.assert(e instanceof Sk.astnodes.AugAssign);var t=e.target;switch(t.constructor){case Sk.astnodes.Attribute:var n=this.vexpr(t.value);t=new Sk.astnodes.Attribute(t.value,t.attr,Sk.astnodes.AugLoad,t.lineno,t.col_offset);var r=this.vexpr(t,void 0,n),i=this.vexpr(e.value);return e=this._gr("inplbinopattr","Sk.abstr.numberInplaceBinOp(",r,",",i,",'",e.op.prototype._astname,"')"),t.ctx=Sk.astnodes.AugStore,this.vexpr(t,e,n);case Sk.astnodes.Subscript:n=this.vexpr(t.value);var o=this.vslicesub(t.slice);return t=new Sk.astnodes.Subscript(t.value,o,Sk.astnodes.AugLoad,t.lineno,t.col_offset),r=this.vexpr(t,void 0,n,o),i=this.vexpr(e.value),e=this._gr("inplbinopsubscr","Sk.abstr.numberInplaceBinOp(",r,",",i,",'",e.op.prototype._astname,"')"),t.ctx=Sk.astnodes.AugStore,this.vexpr(t,e,n,o);case Sk.astnodes.Name:return n=this.nameop(t.id,Sk.astnodes.Load),i=this.vexpr(e.value),e=this._gr("inplbinop","Sk.abstr.numberInplaceBinOp(",n,",",i,",'",e.op.prototype._astname,"')"),this.nameop(t.id,Sk.astnodes.Store,e);default:Sk.asserts.fail("unhandled case in augassign")}},n.prototype.exprConstant=function(e){switch(e.constructor){case Sk.astnodes.Num:return Sk.misceval.isTrue(e.n)?1:0;case Sk.astnodes.Str:return Sk.misceval.isTrue(e.s)?1:0;default:return-1}},n.prototype.newBlock=function(e){var t=this.u.blocknum++;return this.u.blocks[t]=[],this.u.blocks[t]._name=e||"<unnamed>",this.u.blocks[t]._next=null,t},n.prototype.setBlock=function(e){Sk.asserts.assert(0<=e&&e<this.u.blocknum),this.u.curblock=e},n.prototype.pushBreakBlock=function(e){Sk.asserts.assert(0<=e&&e<this.u.blocknum),this.u.breakBlocks.push(e)},n.prototype.popBreakBlock=function(){this.u.breakBlocks.pop()},n.prototype.pushContinueBlock=function(e){Sk.asserts.assert(0<=e&&e<this.u.blocknum),this.u.continueBlocks.push(e)},n.prototype.popContinueBlock=function(){this.u.continueBlocks.pop()},n.prototype.pushExceptBlock=function(e){Sk.asserts.assert(0<=e&&e<this.u.blocknum),this.u.exceptBlocks.push(e)},n.prototype.popExceptBlock=function(){this.u.exceptBlocks.pop()},n.prototype.pushFinallyBlock=function(e){Sk.asserts.assert(0<=e&&e<this.u.blocknum),Sk.asserts.assert(this.u.breakBlocks.length===this.u.continueBlocks.length),this.u.finallyBlocks.push({blk:e,breakDepth:this.u.breakBlocks.length})},n.prototype.popFinallyBlock=function(){this.u.finallyBlocks.pop()},n.prototype.peekFinallyBlock=function(){return 0<this.u.finallyBlocks.length?this.u.finallyBlocks[this.u.finallyBlocks.length-1]:void 0},n.prototype.setupExcept=function(e){s("$exc.push(",e,");")},n.prototype.endExcept=function(){s("$exc.pop();")},n.prototype.outputLocals=function(e){var t,n={};for(t=0;e.argnames&&t<e.argnames.length;++t)n[e.argnames[t]]=!0;e.localnames.sort();var r=[];for(t=0;t<e.localnames.length;++t){var i=e.localnames[t];void 0===n[i]&&(r.push(i),n[i]=!0)}return 0<r.length?"var "+r.join(",")+"; /* locals */":""},n.prototype.outputSuspensionHelpers=function(e){var t,n=[],r=e.localnames.concat(e.tempsToSave),i={},o=e.ste.blockType===Sk.SYMTAB_CONSTS.FunctionBlock&&e.ste.childHasFree,s=(0<r.length?"var "+r.join(",")+";":"")+"var $wakeFromSuspension = function() {var susp = "+e.scopename+".$wakingSuspension; "+e.scopename+".$wakingSuspension = undefined;$blk=susp.$blk; $loc=susp.$loc; $gbl=susp.$gbl; $exc=susp.$exc; $err=susp.$err; $postfinally=susp.$postfinally;$currLineNo=susp.$lineno; $currColNo=susp.$colno; Sk.lastYield=Date.now();"+(o?"$cell=susp.$cell;":"");for(t=0;t<r.length;t++){var a=r[t];void 0===i[a]&&(s+=a+"=susp.$tmps."+a+";",i[a]=!0)}for(s+="try { $ret=susp.child.resume(); } catch(err) { if (!(err instanceof Sk.builtin.BaseException)) { err = new Sk.builtin.ExternalError(err); } err.traceback.push({lineno: $currLineNo, colno: $currColNo, filename: '"+this.filename+"'}); if($exc.length>0) { $err=err; $blk=$exc.pop(); } else { throw err; } }};",s+="var $saveSuspension = function($child, $filename, $lineno, $colno) {var susp = new Sk.misceval.Suspension(); susp.child=$child;susp.resume=function(){"+e.scopename+".$wakingSuspension=susp; return "+e.scopename+"("+(e.ste.generator?"$gen":"")+"); };susp.data=susp.child.data;susp.$blk=$blk;susp.$loc=$loc;susp.$gbl=$gbl;susp.$exc=$exc;susp.$err=$err;susp.$postfinally=$postfinally;susp.$filename=$filename;susp.$lineno=$lineno;susp.$colno=$colno;susp.optional=susp.child.optional;"+(o?"susp.$cell=$cell;":""),i={},t=0;t<r.length;t++)void 0===i[a=r[t]]&&(n.push('"'+a+'":'+a),i[a]=!0);return s+"susp.$tmps={"+n.join(",")+"};return susp;};"},n.prototype.outputAllUnits=function(){var e,t,n="";for(t=0;t<this.allUnits.length;++t){var r=this.allUnits[t];n+=r.prefixCode,n+=this.outputLocals(r),r.doesSuspend&&(n+=this.outputSuspensionHelpers(r)),n+=r.varDeclsCode,n+=r.switchCode;var i=r.blocks,o=Object.create(null);for(e=0;e<i.length;++e){var s=e;if(!(s in o))for(;;){if(o[s]=!0,n+="case "+s+": /* --- "+i[s]._name+" --- */",n+=i[s].join(""),null===i[s]._next){n+="throw new Sk.builtin.SystemError('internal error: unterminated block');";break}if(i[s]._next in o){n+="/* jump */ continue;";break}n+="/* allowing case fallthrough */",s=i[s]._next}}n+=r.suffixCode}return n},n.prototype.cif=function(e){var t;Sk.asserts.assert(e instanceof Sk.astnodes.If);var n=this.exprConstant(e.test);if(0===n)e.orelse&&0<e.orelse.length&&this.vseqstmt(e.orelse);else if(1===n)this.vseqstmt(e.body);else{var r=this.newBlock("end of if");e.orelse&&0<e.orelse.length&&(t=this.newBlock("next branch of if")),n=this.vexpr(e.test),e.orelse&&0<e.orelse.length?(this._jumpfalse(n,t),this.vseqstmt(e.body),this._jump(r),this.setBlock(t),this.vseqstmt(e.orelse)):(this._jumpfalse(n,r),this.vseqstmt(e.body)),this._jump(r),this.setBlock(r)}},n.prototype.cwhile=function(e){if(0===this.exprConstant(e.test))e.orelse&&this.vseqstmt(e.orelse);else{var t=this.newBlock("while test");this._jump(t),this.setBlock(t);var n=this.newBlock("after while"),r=0<e.orelse.length?this.newBlock("while orelse"):null,i=this.newBlock("while body");this.annotateSource(e),this._jumpfalse(this.vexpr(e.test),r||n),this._jump(i),this.pushBreakBlock(n),this.pushContinueBlock(t),this.setBlock(i),(Sk.debugging||Sk.killableWhile)&&this.u.canSuspend&&(i=this.newBlock("debug breakpoint for line "+e.lineno),s("if (Sk.breakpoints('"+this.filename+"',"+e.lineno+","+e.col_offset+")) {","var $susp = $saveSuspension({data: {type: 'Sk.delay'}, resume: function() {}}, '"+this.filename+"',"+e.lineno+","+e.col_offset+");","$susp.$blk = "+i+";","$susp.optional = true;","return $susp;","}"),this._jump(i),this.setBlock(i),this.u.doesSuspend=!0),this.vseqstmt(e.body),this._jump(t),this.popContinueBlock(),this.popBreakBlock(),0<e.orelse.length&&(this.setBlock(r),this.vseqstmt(e.orelse),this._jump(n)),this.setBlock(n)}},n.prototype.cfor=function(e){var t=this.newBlock("for start"),n=this.newBlock("for cleanup"),r=this.newBlock("for end");this.pushBreakBlock(r),this.pushContinueBlock(t);var i=this.vexpr(e.iter);if(this.u.ste.generator){var o="$loc."+this.gensym("iter");s(o,"=Sk.abstr.iter(",i,");")}else o=this._gr("iter","Sk.abstr.iter(",i,")"),this.u.tempsToSave.push(o);this._jump(t),this.setBlock(t),s("$ret = Sk.abstr.iternext(",o,this.u.canSuspend?", true":", false",");"),this._checkSuspension(e),o=this._gr("next","$ret"),this._jumpundef(o,n),this.vexpr(e.target,o),(Sk.debugging||Sk.killableFor)&&this.u.canSuspend&&(o=this.newBlock("debug breakpoint for line "+e.lineno),s("if (Sk.breakpoints('"+this.filename+"',"+e.lineno+","+e.col_offset+")) {","var $susp = $saveSuspension({data: {type: 'Sk.delay'}, resume: function() {}}, '"+this.filename+"',"+e.lineno+","+e.col_offset+");","$susp.$blk = "+o+";","$susp.optional = true;","return $susp;","}"),this._jump(o),this.setBlock(o),this.u.doesSuspend=!0),this.vseqstmt(e.body),this._jump(t),this.setBlock(n),this.popContinueBlock(),this.popBreakBlock(),this.vseqstmt(e.orelse),this._jump(r),this.setBlock(r)},n.prototype.craise=function(e){if(e.exc){var t=this._gr("exc",this.vexpr(e.exc)),n=this.newBlock("exception now instantiated"),r=this._gr("isclass",t+".prototype instanceof Sk.builtin.BaseException");this._jumpfalse(r,n),e.inst?(r=this._gr("inst",this.vexpr(e.inst)),s("if(!(",r," instanceof Sk.builtin.tuple)) {",r,"= new Sk.builtin.tuple([",r,"]);","}"),s("$ret = Sk.misceval.callsimOrSuspendArray(",t,",",r,".v);")):s("$ret = Sk.misceval.callsimOrSuspend(",t,");"),this._checkSuspension(e),s(t,"=$ret;"),this._jump(n),this.setBlock(n),s("if (",t," instanceof Sk.builtin.BaseException) {throw ",t,";} else {throw new Sk.builtin.TypeError('exceptions must derive from BaseException');};")}else s("throw $err;")},n.prototype.outputFinallyCascade=function(e){if(0==this.u.finallyBlocks.length)s("if($postfinally!==undefined) { if ($postfinally.returning) { return $postfinally.returning; } else { $blk=$postfinally.gotoBlock; $postfinally=undefined; continue; } }");else{var t=this.peekFinallyBlock();s("if($postfinally!==undefined) {","if ($postfinally.returning",t.breakDepth==e.breakDepth?"|| $postfinally.isBreak":"",") {","$blk=",t.blk,";continue;","} else {","$blk=$postfinally.gotoBlock;$postfinally=undefined;continue;","}","}")}},n.prototype.ctry=function(e){var t,n=e.handlers.length;if(e.finalbody){var r=this.newBlock("finalbody"),i=this.newBlock("finalexh"),o=this._gr("finally_reraise","undefined");this.u.tempsToSave.push(o),this.pushFinallyBlock(r);var a=this.peekFinallyBlock();this.setupExcept(i)}var l=[];for(t=0;t<n;++t)l.push(this.newBlock("except_"+t+"_"));var c=this.newBlock("unhandled"),u=this.newBlock("orelse"),d=this.newBlock("end");for(0!=l.length&&this.setupExcept(l[0]),this.vseqstmt(e.body),0!=l.length&&this.endExcept(),this._jump(u),t=0;t<n;++t){this.setBlock(l[t]);var h=e.handlers[t];if(!h.type&&t<n-1)throw new Sk.builtin.SyntaxError("default 'except:' must be last",this.filename,h.lineno);if(h.type){var p=this.vexpr(h.type),f=t==n-1?c:l[t+1];p=this._gr("instance","Sk.misceval.isTrue(Sk.builtin.isinstance($err, ",p,"))"),this._jumpfalse(p,f)}h.name&&this.vexpr(h.name,"$err"),this.vseqstmt(h.body),this._jump(d)}this.setBlock(c),s("throw $err;"),this.setBlock(u),this.vseqstmt(e.orelse),this._jump(d),this.setBlock(d),e.finalbody&&(this.endExcept(),this._jump(r),this.setBlock(i),s(o,"=$err;"),this._jump(r),this.setBlock(r),this.popFinallyBlock(),this.vseqstmt(e.finalbody),s("if(",o,"!==undefined) { throw ",o,";}"),this.outputFinallyCascade(a))},n.prototype.cwith=function(e,t){var n=this.newBlock("withexh"),r=this.newBlock("withtidyup"),i=this.newBlock("withcarryon"),o=this._gr("mgr",this.vexpr(e.items[t].context_expr));s("$ret = Sk.abstr.lookupSpecial(",o,",Sk.builtin.str.$exit);"),this._checkSuspension(e);var a=this._gr("exit","$ret");this.u.tempsToSave.push(a),s("$ret = Sk.abstr.lookupSpecial(",o,",Sk.builtin.str.$enter);"),this._checkSuspension(e),s("$ret = Sk.misceval.callsimOrSuspendArray($ret);"),this._checkSuspension(e),o=this._gr("value","$ret"),this.pushFinallyBlock(r);var l=this.u.finallyBlocks[this.u.finallyBlocks.length-1];this.setupExcept(n),e.items[t].optional_vars&&this.nameop(e.items[t].optional_vars.id,Sk.astnodes.Store,o),t+1<e.items.length?this.cwith(e,t+1):this.vseqstmt(e.body),this.endExcept(),this._jump(r),this.setBlock(n),s("$ret = Sk.misceval.applyOrSuspend(",a,",undefined,Sk.builtin.getExcInfo($err),undefined,[]);"),this._checkSuspension(e),this._jumptrue("$ret",i),s("throw $err;"),this.setBlock(r),this.popFinallyBlock(),s("$ret = Sk.misceval.callsimOrSuspendArray(",a,",[Sk.builtin.none.none$,Sk.builtin.none.none$,Sk.builtin.none.none$]);"),this._checkSuspension(e),this.outputFinallyCascade(l),this._jump(i),this.setBlock(i)},n.prototype.cassert=function(e){var t=this.vexpr(e.test),n=this.newBlock("end");this._jumptrue(t,n),s("throw new Sk.builtin.AssertionError(",e.msg?this.vexpr(e.msg):"",");"),this.setBlock(n)},n.prototype.cimportas=function(e,t,n){var r=(e=e.v).indexOf("."),i=n;if(-1!==r)for(e=e.substr(r+1);-1!==r;)n=-1!==(r=e.indexOf("."))?e.substr(0,r):e,i=this._gr("lattr","Sk.abstr.gattr(",i,", new Sk.builtin.str('",n,"'))"),e=e.substr(r+1);return this.nameop(t,Sk.astnodes.Store,i)},n.prototype.cimport=function(e){var t,n=e.names.length;for(t=0;t<n;++t){var r=e.names[t];s("$ret = Sk.builtin.__import__(",r.name.$r().v,",$gbl,$loc,[],",Sk.__future__.absolute_import?0:-1,");"),this._checkSuspension(e);var i=this._gr("module","$ret");if(r.asname)this.cimportas(r.name,r.asname,i);else{var o=r.name;-1!==(r=o.v.indexOf("."))&&(o=new Sk.builtin.str(o.v.substr(0,r))),this.nameop(o,Sk.astnodes.Store,i)}}},n.prototype.cfromimport=function(e){var t,n=e.names.length,r=[],o=e.level;for(0!=o||Sk.__future__.absolute_import||(o=-1),t=0;t<n;++t)r[t]="'"+i(e.names[t].name.v)+"'";for(s("$ret = Sk.builtin.__import__(",e.module.$r().v,",$gbl,$loc,[",r,"],",o,");"),this._checkSuspension(e),o=this._gr("module","$ret"),t=0;t<n;++t){var a="'"+(r=e.names[t]).name.v+"'";if(0===t&&"*"===r.name.v){Sk.asserts.assert(1===n),s("Sk.importStar(",o,",$loc, $gbl);");break}var l=this._gr("item","Sk.abstr.gattr(",o,", new Sk.builtin.str(",a,"), undefined)");a=r.name,r.asname&&(a=r.asname),this.nameop(a,Sk.astnodes.Store,l)}},n.prototype.buildcodeobj=function(e,t,n,r,a,l){var c,u=[],d=[],h=[],p=[],f=null,m=null;if(n&&(d=this.vseqexpr(n)),r&&r.defaults&&(h=this.vseqexpr(r.defaults)),r&&r.kw_defaults&&(p=r.kw_defaults.map(e=>e?this.vexpr(e):"undefined")),r&&r.vararg&&(f=r.vararg),r&&r.kwarg&&(m=r.kwarg),!Sk.__future__.python3&&r&&r.kwonlyargs&&0!=r.kwonlyargs.length)throw new Sk.builtin.SyntaxError("Keyword-only arguments are not supported in Python 2");var g=this.enterScope(t,e,e.lineno,this.canSuspend);n=this.u.ste.generator;var b=this.u.ste.hasFree,v=this.u.ste.childHasFree,y=this.newBlock("codeobj entry");this.u.prefixCode="var "+g+"=(function "+this.niceName(t.v)+"$(";var S=[];if(n){if(m)throw new Sk.builtin.SyntaxError(t.v+"(): keyword arguments in generators not supported",this.filename,e.lineno);if(f)throw new Sk.builtin.SyntaxError(t.v+"(): variable number of arguments in generators not supported",this.filename,e.lineno);S.push("$gen")}else{for(m&&(S.push("$kwa"),this.u.tempsToSave.push("$kwa")),c=0;r&&c<r.args.length;++c)S.push(this.nameop(r.args[c].arg,Sk.astnodes.Param));for(c=0;r&&r.kwonlyargs&&c<r.kwonlyargs.length;++c)S.push(this.nameop(r.kwonlyargs[c].arg,Sk.astnodes.Param));f&&S.push(this.nameop(r.vararg.arg,Sk.astnodes.Param))}let _=!n;b&&(_||S.push("$free"),this.u.tempsToSave.push("$free")),this.u.prefixCode=_?this.u.prefixCode+"$posargs,$kwargs":this.u.prefixCode+S.join(","),this.u.prefixCode+="){",n&&(this.u.prefixCode+="\n// generator\n"),b&&(this.u.prefixCode+="\n// has free\n"),v&&(this.u.prefixCode+="\n// has cell\n"),_&&(this.u.prefixCode+="\n// fast call\n");var x="{}";if(n&&(y="$gen.gi$resumeat",x="$gen.gi$locals"),c=",$cell={}",v&&n&&(c=",$cell=$gen.gi$cells"),this.u.varDeclsCode+="var $blk="+y+",$exc=[],$loc="+x+c+",$gbl="+(_?"this && this.func_globals":"this")+(_&&b?",$free=this && this.func_closure":"")+",$err=undefined,$ret=undefined,$postfinally=undefined,$currLineNo=undefined,$currColNo=undefined;",null!==Sk.execLimit&&(this.u.varDeclsCode+="if (typeof Sk.execStart === 'undefined') {Sk.execStart = Date.now()}"),null!==Sk.yieldLimit&&this.u.canSuspend&&(this.u.varDeclsCode+="if (typeof Sk.lastYield === 'undefined') {Sk.lastYield = Date.now()}"),this.u.varDeclsCode+="if ("+g+".$wakingSuspension!==undefined) { $wakeFromSuspension(); } else {",_){for(this.u.varDeclsCode=m||f||r&&r.kwonlyargs&&0!==r.kwonlyargs.length?this.u.varDeclsCode+"\nvar $args = this.$resolveArgs($posargs,$kwargs)\n":this.u.varDeclsCode+"var $args = ((!$kwargs || $kwargs.length===0) && $posargs.length==="+S.length+") ? $posargs : this.$resolveArgs($posargs,$kwargs)",c=0;c<S.length;c++)this.u.varDeclsCode+=","+S[c]+"=$args["+c+"]";this.u.varDeclsCode+=";\n"}if(n&&0<h.length)for(y=r.args.length-h.length,c=0;c<h.length;++c)S=this.nameop(r.args[c+y].arg,Sk.astnodes.Param),this.u.varDeclsCode+="if("+S+"===undefined)"+S+"="+g+".$defaults["+c+"];";for(c=0;r&&c<r.args.length;++c)S=r.args[c].arg,this.isCell(S)&&(S=i(o(this.u.private_,S).v),this.u.varDeclsCode+="$cell."+S+"="+S+";");for(c=0;r&&r.kwonlyargs&&c<r.kwonlyargs.length;++c)S=r.kwonlyargs[c].arg,this.isCell(S)&&(S=i(o(this.u.private_,S).v),this.u.varDeclsCode+="$cell."+S+"="+S+";");if(f&&this.isCell(f.arg)&&(c=i(o(this.u.private_,f.arg).v),this.u.varDeclsCode+="$cell."+c+"="+c+";"),m&&(this.u.localnames.push(m.arg.v),this.u.varDeclsCode+=m.arg.v+"=new Sk.builtins['dict']($kwa);",this.isCell(m.arg)&&(c=i(o(this.u.private_,m.arg).v),this.u.varDeclsCode+="$cell."+c+"="+c+";")),this.u.varDeclsCode+="}",Sk.__future__.python3&&l&&(this.u.varDeclsCode+="$gbl.__class__=$gbl."+l.v+";"),this.u.switchCode="while(true){try{",this.u.switchCode+=this.outputInterruptTest(),this.u.switchCode+="switch($blk){",this.u.suffixCode="} }catch(err){ if (!(err instanceof Sk.builtin.BaseException)) { err = new Sk.builtin.ExternalError(err); } err.traceback.push({lineno: $currLineNo, colno: $currColNo, filename: '"+this.filename+"'}); if ($exc.length>0) { $err = err; $blk=$exc.pop(); continue; } else { throw err; }} }});",a.call(this,g),r){for(let e of r.args)u.push(e.arg.v);for(let e of r.kwonlyargs||[])u.push(e.arg.v);this.u.argnames=u}if(this.exitScope(),0<h.length&&s(g,".$defaults=[",h.join(","),"];"),r&&r.kwonlyargs&&0<r.kwonlyargs.length&&(s(g,".co_argcount=",r.args.length,";"),s(g,".co_kwonlyargcount=",r.kwonlyargs.length,";"),s(g,".$kwdefs=[",p.join(","),"];")),0<u.length?s(g,".co_varnames=['",u.join("','"),"'];"):s(g,".co_varnames=[];"),s(g,".co_docstring=",this.cDocstringOfCode(e),";"),m&&s(g,".co_kwargs=1;"),f&&s(g,".co_varargs=1;"),n||s(g,".co_fastcall=1;"),e="",b&&(e=",$cell",(a=this.u.ste.hasFree)&&(e+=",$free")),n)return r&&0<r.args.length?this._gr("gener","new Sk.builtins['function']((function(){var $origargs=Array.prototype.slice.call(arguments);Sk.builtin.pyCheckArgsLen(\"",t.v,'",arguments.length,',r.args.length-h.length,",",r.args.length,");return new Sk.builtins['generator'](",g,",$gbl,$origargs",e,");}))"):this._gr("gener","new Sk.builtins['function']((function(){Sk.builtin.pyCheckArgsLen(\"",t.v,"\",arguments.length,0,0);return new Sk.builtins['generator'](",g,",$gbl,[]",e,");}))");if(0<d.length){s("$ret = new Sk.builtins['function'](",g,",$gbl",e,");");for(let e of d.reverse())s("$ret = Sk.misceval.callsimOrSuspendArray(",e,",[$ret]);"),this._checkSuspension();return this._gr("funcobj","$ret")}return this._gr("funcobj","new Sk.builtins['function'](",g,",$gbl",e,")")},n.prototype.maybeCDocstringOfBody=function(e){return 0===e.length||(e=e[0]).constructor!==Sk.astnodes.Expr||(e=e.value).constructor!==Sk.astnodes.Str?null:this.vexpr(e)},n.prototype.cDocstringOfCode=function(e){switch(e.constructor){case Sk.astnodes.AsyncFunctionDef:case Sk.astnodes.FunctionDef:return this.maybeCDocstringOfBody(e.body)||"Sk.builtin.none.none$";case Sk.astnodes.Lambda:case Sk.astnodes.GeneratorExp:return"Sk.builtin.none.none$";default:Sk.asserts.fail("unexpected node kind "+e.constructor.name)}},n.prototype.cfunction=function(e,t){Sk.asserts.assert(e instanceof Sk.astnodes.FunctionDef),t=this.buildcodeobj(e,e.name,e.decorator_list,e.args,(function(t){this.vseqstmt(e.body),s("return Sk.builtin.none.none$;")}),t),this.nameop(e.name,Sk.astnodes.Store,t)},n.prototype.clambda=function(e){return Sk.asserts.assert(e instanceof Sk.astnodes.Lambda),this.buildcodeobj(e,new Sk.builtin.str("<lambda>"),null,e.args,(function(t){t=this.vexpr(e.body),s("return ",t,";")}))},n.prototype.cifexp=function(e){var t=this.newBlock("next of ifexp"),n=this.newBlock("end of ifexp"),r=this._gr("res","null"),i=this.vexpr(e.test);return this._jumpfalse(i,t),s(r,"=",this.vexpr(e.body),";"),this._jump(n),this.setBlock(t),s(r,"=",this.vexpr(e.orelse),";"),this._jump(n),this.setBlock(n),r},n.prototype.cgenexpgen=function(e,t,n){var r=this.newBlock("start for "+t),i=this.newBlock("skip for "+t);this.newBlock("if cleanup for "+t);var o=this.newBlock("end for "+t),a=e[t];if(0===t)var l="$loc.$iter0";else{var c=this.vexpr(a.iter);l="$loc."+this.gensym("iter"),s(l,"=","Sk.abstr.iter(",c,");")}this._jump(r),this.setBlock(r),this.annotateSource(n),s("$ret = Sk.abstr.iternext(",l,this.u.canSuspend?", true":", false",");"),this._checkSuspension(n),c=this._gr("next","$ret"),this._jumpundef(c,o),this.vexpr(a.target,c);var u=a.ifs?a.ifs.length:0;for(l=0;l<u;++l)this.annotateSource(a.ifs[l]),c=this.vexpr(a.ifs[l]),this._jumpfalse(c,r);++t<e.length&&this.cgenexpgen(e,t,n),t>=e.length&&(this.annotateSource(n),e=this.vexpr(n),s("return [",i,"/*resume*/,",e,"/*ret*/];"),this.setBlock(i)),this._jump(r),this.setBlock(o),1===t&&s("return Sk.builtin.none.none$;")},n.prototype.cgenexp=function(e){var t=this.buildcodeobj(e,new Sk.builtin.str("<genexpr>"),null,null,(function(t){this.cgenexpgen(e.generators,0,e.elt)}));return t=this._gr("gener","Sk.misceval.callsimArray(",t,");"),s(t,".gi$locals.$iter0=Sk.abstr.iter(",this.vexpr(e.generators[0].iter),");"),t},n.prototype.cclass=function(e){Sk.asserts.assert(e instanceof Sk.astnodes.ClassDef);var t=this.vseqexpr(e.decorator_list),n=this.vseqexpr(e.bases),r=this.enterScope(e.name,e,e.lineno),i=this.newBlock("class entry");this.u.prefixCode="var "+r+"=(function $"+e.name.v+"$class_outer($globals,$locals,$cell){var $gbl=$globals,$loc=$locals;$free=$globals;",this.u.switchCode+="(function $"+e.name.v+"$_closure($cell){",this.u.switchCode+="var $blk="+i+",$exc=[],$ret=undefined,$postfinally=undefined,$currLineNo=undefined,$currColNo=undefined;",null!==Sk.execLimit&&(this.u.switchCode+="if (typeof Sk.execStart === 'undefined') {Sk.execStart = Date.now()}"),null!==Sk.yieldLimit&&this.u.canSuspend&&(this.u.switchCode+="if (typeof Sk.lastYield === 'undefined') {Sk.lastYield = Date.now()}"),this.u.switchCode+="while(true){try{",this.u.switchCode+=this.outputInterruptTest(),this.u.switchCode+="switch($blk){",this.u.suffixCode="}}catch(err){ if (!(err instanceof Sk.builtin.BaseException)) { err = new Sk.builtin.ExternalError(err); } err.traceback.push({lineno: $currLineNo, colno: $currColNo, filename: '"+this.filename+"'}); if ($exc.length>0) { $err = err; $blk=$exc.pop(); continue; } else { throw err; }}}",this.u.suffixCode+="}).call(null, $cell);});",this.u.private_=e.name,this.cbody(e.body,e.name),s("return;"),this.exitScope(),s("$ret = Sk.misceval.buildClass($gbl,",r,",",e.name.$r().v,",[",n,"], $cell);");for(let e of t)s("$ret = Sk.misceval.callsimOrSuspendArray(",e,", [$ret]);"),this._checkSuspension();this.nameop(e.name,Sk.astnodes.Store,"$ret")},n.prototype.ccontinue=function(e){var t=this.peekFinallyBlock();if(0==this.u.continueBlocks.length)throw new Sk.builtin.SyntaxError("'continue' outside loop",this.filename,e.lineno);e=this.u.continueBlocks[this.u.continueBlocks.length-1],Sk.asserts.assert(this.u.breakBlocks.length===this.u.continueBlocks.length),t&&t.breakDepth==this.u.continueBlocks.length?s("$postfinally={isBreak:true,gotoBlock:",e,"};"):this._jump(e)},n.prototype.cbreak=function(e){var t=this.peekFinallyBlock();if(0===this.u.breakBlocks.length)throw new Sk.builtin.SyntaxError("'break' outside loop",this.filename,e.lineno);e=this.u.breakBlocks[this.u.breakBlocks.length-1],t&&t.breakDepth==this.u.breakBlocks.length?s("$postfinally={isBreak:true,gotoBlock:",e,"};"):this._jump(e)},n.prototype.vstmt=function(e,t){if(this.u.lineno=e.lineno,this.u.linenoSet=!1,this.u.localtemps=[],Sk.debugging&&this.u.canSuspend){var n=this.newBlock("debug breakpoint for line "+e.lineno);s("if (Sk.breakpoints('"+this.filename+"',"+e.lineno+","+e.col_offset+")) {","var $susp = $saveSuspension({data: {type: 'Sk.debug'}, resume: function() {}}, '"+this.filename+"',"+e.lineno+","+e.col_offset+");","$susp.$blk = "+n+";","$susp.optional = true;","return $susp;","}"),this._jump(n),this.setBlock(n),this.u.doesSuspend=!0}switch(this.annotateSource(e),e.constructor){case Sk.astnodes.FunctionDef:this.cfunction(e,t);break;case Sk.astnodes.ClassDef:this.cclass(e);break;case Sk.astnodes.Return:if(this.u.ste.blockType!==Sk.SYMTAB_CONSTS.FunctionBlock)throw new Sk.builtin.SyntaxError("'return' outside function",this.filename,e.lineno);n=e.value?this.vexpr(e.value):"Sk.builtin.none.none$",0==this.u.finallyBlocks.length?s("return ",n,";"):(s("$postfinally={returning:",n,"};"),this._jump(this.peekFinallyBlock().blk));break;case Sk.astnodes.Delete:this.vseqexpr(e.targets);break;case Sk.astnodes.Assign:var r=e.targets.length;for(n=this.vexpr(e.value),t=0;t<r;++t)this.vexpr(e.targets[t],n);break;case Sk.astnodes.AnnAssign:n=this.vexpr(e.value),this.vexpr(e.target,n),this.vexpr(e.annotation);break;case Sk.astnodes.AugAssign:return this.caugassign(e);case Sk.astnodes.Print:this.cprint(e);break;case Sk.astnodes.For:return this.cfor(e);case Sk.astnodes.While:return this.cwhile(e);case Sk.astnodes.If:return this.cif(e);case Sk.astnodes.Raise:return this.craise(e);case Sk.astnodes.Try:return this.ctry(e);case Sk.astnodes.With:return this.cwith(e,0);case Sk.astnodes.Assert:return this.cassert(e);case Sk.astnodes.Import:return this.cimport(e);case Sk.astnodes.ImportFrom:return this.cfromimport(e);case Sk.astnodes.Global:break;case Sk.astnodes.Expr:this.vexpr(e.value);break;case Sk.astnodes.Pass:break;case Sk.astnodes.Break:this.cbreak(e);break;case Sk.astnodes.Continue:this.ccontinue(e);break;case Sk.astnodes.Debugger:s("debugger;");break;default:Sk.asserts.fail("unhandled case in vstmt: "+JSON.stringify(e))}},n.prototype.vseqstmt=function(e){var t;for(t=0;t<e.length;++t)this.vstmt(e[t])},n.prototype.isCell=function(e){return e=i(o(this.u.private_,e).v),this.u.ste.getScope(e)===Sk.SYMTAB_CONSTS.CELL},n.prototype.nameop=function(e,t,n){if((t===Sk.astnodes.Store||t===Sk.astnodes.AugStore||t===Sk.astnodes.Del)&&"__debug__"===e.v)throw new Sk.builtin.SyntaxError("can not assign to __debug__",this.filename,this.u.lineno);if(Sk.asserts.assert("None"!==e.v),"NotImplemented"===e.v)return"Sk.builtin.NotImplemented.NotImplemented$";var r=o(this.u.private_,e).v;r=i(r);var a=3,l=this.u.ste.getScope(r),c=null;switch(l){case Sk.SYMTAB_CONSTS.FREE:c="$free",a=2;break;case Sk.SYMTAB_CONSTS.CELL:c="$cell",a=2;break;case Sk.SYMTAB_CONSTS.LOCAL:this.u.ste.blockType!==Sk.SYMTAB_CONSTS.FunctionBlock||this.u.ste.generator||(a=0);break;case Sk.SYMTAB_CONSTS.GLOBAL_IMPLICIT:this.u.ste.blockType===Sk.SYMTAB_CONSTS.FunctionBlock&&(a=1);break;case Sk.SYMTAB_CONSTS.GLOBAL_EXPLICIT:a=1}switch(Sk.asserts.assert(l||"_"===e.v.charAt(1)),e=r,this.u.ste.generator||this.u.ste.blockType!==Sk.SYMTAB_CONSTS.FunctionBlock?r="$loc."+r:(0===a||3===a)&&this.u.localnames.push(r),a){case 0:switch(t){case Sk.astnodes.Load:case Sk.astnodes.Param:return s("if (",r," === undefined) { throw new Sk.builtin.UnboundLocalError('local variable \\'",r,"\\' referenced before assignment'); }\n"),r;case Sk.astnodes.Store:s(r,"=",n,";");break;case Sk.astnodes.Del:s("delete ",r,";");break;default:Sk.asserts.fail("unhandled")}break;case 3:switch(t){case Sk.astnodes.Load:return this._gr("loadname",r,"!==undefined?",r,":Sk.misceval.loadname('",e,"',$gbl);");case Sk.astnodes.Store:s(r,"=",n,";");break;case Sk.astnodes.Del:s("delete ",r,";");break;case Sk.astnodes.Param:return r;default:Sk.asserts.fail("unhandled")}break;case 1:switch(t){case Sk.astnodes.Load:return this._gr("loadgbl","Sk.misceval.loadname('",e,"',$gbl)");case Sk.astnodes.Store:s("$gbl.",e,"=",n,";");break;case Sk.astnodes.Del:s("delete $gbl.",e);break;default:Sk.asserts.fail("unhandled case in name op_global")}break;case 2:switch(t){case Sk.astnodes.Load:return c+"."+e;case Sk.astnodes.Store:s(c,".",e,"=",n,";");break;case Sk.astnodes.Param:return e;default:Sk.asserts.fail("unhandled case in name op_deref")}break;default:Sk.asserts.fail("unhandled case")}},n.prototype.enterScope=function(e,t,n,i){var o=new r;return o.ste=this.st.getStsForAst(t),o.name=e,o.firstlineno=n,o.canSuspend=i||!1,this.u&&this.u.private_&&(o.private_=this.u.private_),this.stack.push(this.u),this.allUnits.push(o),e=this.gensym("scope"),o.scopename=e,this.u=o,this.u.activateScope(),this.nestlevel++,e},n.prototype.exitScope=function(){var e=this.u;if(this.nestlevel--,(this.u=0<=this.stack.length-1?this.stack.pop():null)&&this.u.activateScope(),"<module>"!==e.name.v){var t=e.name.$r().v;t=t.substring(1,t.length-1),s(e.scopename,".co_name=new Sk.builtins['str']('",t,"');"),this.stack.length&&"class"==this.u.ste.blockType&&s(e.scopename,".co_qualname=new Sk.builtins['str']('"+this.u.name.v+"."+t+"');")}for(var n in e.consts)e.consts.hasOwnProperty(n)&&(e.suffixCode+=n+" = "+e.consts[n]+";")},n.prototype.cbody=function(e,t){var n=0;const r=this.maybeCDocstringOfBody(e);for(null!==r&&(s("$loc.__doc__ = ",r,";"),n=1);n<e.length;++n)this.vstmt(e[n],t)},n.prototype.cprint=function(e){var t;Sk.asserts.assert(e instanceof Sk.astnodes.Print),e.dest&&this.vexpr(e.dest);var n=e.values.length;for(t=0;t<n;++t)s("$ret = Sk.misceval.print_(","new Sk.builtins['str'](",this.vexpr(e.values[t]),").v);"),this._checkSuspension(e);e.nl&&(s("$ret = Sk.misceval.print_(",'"\\n");'),this._checkSuspension(e))},n.prototype.cmod=function(e){var t=this.enterScope(new Sk.builtin.str("<module>"),e,0,this.canSuspend),n=this.newBlock("module entry");switch(this.u.prefixCode="var "+t+"=(function($forcegbl){",this.u.varDeclsCode="var $gbl = $forcegbl || {}, $blk="+n+",$exc=[],$loc=$gbl,$cell={},$err=undefined;$loc.__file__=new Sk.builtins.str('"+this.filename+"');var $ret=undefined,$postfinally=undefined,$currLineNo=undefined,$currColNo=undefined;",null!==Sk.execLimit&&(this.u.varDeclsCode+="if (typeof Sk.execStart === 'undefined') {Sk.execStart = Date.now()}"),null!==Sk.yieldLimit&&this.u.canSuspend&&(this.u.varDeclsCode+="if (typeof Sk.lastYield === 'undefined') {Sk.lastYield = Date.now()}"),this.u.varDeclsCode+="if ("+t+".$wakingSuspension!==undefined) { $wakeFromSuspension(); }if (Sk.retainGlobals) { if (Sk.globals) { $gbl = Sk.globals; Sk.globals = $gbl; $loc = $gbl; } if (Sk.globals) { $gbl = Sk.globals; Sk.globals = $gbl; $loc = $gbl; $loc.__file__=new Sk.builtins.str('"+this.filename+"');} else { Sk.globals = $gbl; }} else { Sk.globals = $gbl; }",this.u.switchCode="while(true){try{",this.u.switchCode+=this.outputInterruptTest(),this.u.switchCode+="switch($blk){",this.u.suffixCode="}",this.u.suffixCode+="}catch(err){ if (!(err instanceof Sk.builtin.BaseException)) { err = new Sk.builtin.ExternalError(err); } err.traceback.push({lineno: $currLineNo, colno: $currColNo, filename: '"+this.filename+"'}); if ($exc.length>0) { $err = err; $blk=$exc.pop(); continue; } else { throw err; }} } });",e.constructor){case Sk.astnodes.Module:this.cbody(e.body),s("return $loc;");break;default:Sk.asserts.fail("todo; unhandled case in compilerMod")}return this.exitScope(),this.result.push(this.outputAllUnits()),t},Sk.compile=function(e,t,r,i){r=Sk.__future__,Sk.__future__=Object.create(Sk.__future__);var o=Sk.parse(t,e),s=Sk.astFromParse(o.cst,t,o.flags);return o=o.flags,t=(e=new n(t,Sk.symboltable(s,t),o,i,e)).cmod(s),Sk.__future__=r,{funcname:"$compiledmod",code:"$compiledmod = function() {"+e.result.join("")+"\nreturn "+t+";}();"}},Sk.exportSymbol("Sk.compile",Sk.compile),Sk.resetCompiler=function(){Sk.gensymcount=0},Sk.exportSymbol("Sk.resetCompiler",Sk.resetCompiler),Sk.fixReserved=i,Sk.exportSymbol("Sk.fixReserved",Sk.fixReserved),Sk.unfixReserved=function(e){return e.replace(/_\$rw\$$/,"")},Sk.exportSymbol("Sk.unfixReserved",Sk.unfixReserved),Sk.mangleName=o,Sk.exportSymbol("Sk.mangleName",Sk.mangleName),Sk.reservedWords_=a,Sk.exportSymbol("Sk.reservedWords_",Sk.reservedWords_)},function(e,t){Sk.sysmodules=new Sk.builtin.dict([]),Sk.realsyspath=void 0,Sk.importSearchPathForName=function(e,t,n){var r=e.replace(/\./g,"/"),i=function(e,t){return Sk.misceval.chain(Sk.misceval.tryCatch((function(){return Sk.read(e)}),(function(e){})),(function(n){if(void 0!==n)return new Sk.misceval.Break({filename:e,code:n,packagePath:t})}))};return void 0===n&&(n=Sk.realsyspath),Sk.misceval.iterFor(n.tp$iter(),(function(e){return Sk.misceval.chain(i(e.v+"/"+r+t,!1),(function(n){return n||i(e.v+"/"+r+"/__init__"+t,e.v+"/"+r)}))}))},Sk.importSetUpPath=function(e){if(!Sk.realsyspath){var t=[new Sk.builtin.str("src/builtin"),new Sk.builtin.str("src/lib"),new Sk.builtin.str(".")];for(e=0;e<Sk.syspath.length;++e)t.push(new Sk.builtin.str(Sk.syspath[e]));Sk.realsyspath=new Sk.builtin.list(t)}},Sk.importModuleInternal_=function(e,t,n,r,i,o,s){var a,l,c,u,d=null,h=void 0!==i?i.tp$getattr(Sk.builtin.str.$name):void 0,p=void 0!==h?h.v+".":"",f=void 0!==i?i.tp$getattr(Sk.builtin.str.$path):void 0;if(Sk.importSetUpPath(s),i&&!h){if(o)return;throw new Sk.builtin.ValueError("Attempted to import relative to invalid package (no name)")}void 0===n&&(n=p+e);var m=e.split(".");if(1<m.length){var g=m.slice(0,m.length-1).join(".");d=Sk.importModuleInternal_(g,t,void 0,void 0,i,o,s)}var b=Sk.misceval.chain(d,(function(b){return d=b,void 0!==(l=Sk.sysmodules.quick$lookup(new Sk.builtin.str(n)))?d||l:Sk.misceval.chain(void 0,(function(){var t=e;if(1<m.length){if(!d)return;c=Sk.sysmodules.mp$subscript(new Sk.builtin.str(p+g)),t=m[m.length-1],f=c.tp$getattr(Sk.builtin.str.$path)}if(u=new Sk.builtin.module,"string"==typeof r){a=e+".py";var n=Sk.compile(r,a,"exec",s)}else n=Sk.misceval.chain(void 0,(function(){if(Sk.onBeforeImport&&"function"==typeof Sk.onBeforeImport)return Sk.onBeforeImport(e)}),(function(n){if(!1===n)throw new Sk.builtin.ImportError("Importing "+e+" is not allowed");if("string"==typeof n)throw new Sk.builtin.ImportError(n);return Sk.importSearchPathForName(t,".js",f)}),(function(e){return e?{funcname:"$builtinmodule",code:e.code,filename:e.filename,packagePath:e.packagePath}:Sk.misceval.chain(Sk.importSearchPathForName(t,".py",f),(function(t){if(e=t)return Sk.compile(e.code,e.filename,"exec",s)}),(function(t){if(t)return t.packagePath=e.packagePath,t}))}));return n}),(function(e){if(e){Sk.sysmodules.mp$ass_subscript(new Sk.builtin.str(n),u);var r=u.$js=e.code;if(null==a&&(a=e.filename),null!=Sk.dateSet&&Sk.dateSet||(r="Sk.execStart = Sk.lastYield = new Date();\n"+e.code,Sk.dateSet=!0),t){r=function(e){var t,n=Sk.js_beautify(e).split("\n");for(t=1;t<=n.length;++t){var r=(""+t).length;for(e="";5>r;++r)e+=" ";n[t-1]="/* "+e+t+" */ "+n[t-1]}return n.join("\n")}(r),Sk.debugout(r)}return r+="\n"+e.funcname+";",r=Sk.global.eval(r),u.$d={__name__:new Sk.builtin.str(n),__doc__:Sk.builtin.none.none$,__package__:e.packagePath?new Sk.builtin.str(n):g?new Sk.builtin.str(p+g):h||Sk.builtin.none.none$},e.packagePath&&(u.$d.__path__=new Sk.builtin.tuple([new Sk.builtin.str(e.packagePath)])),r(u.$d)}}),(function(t){var n;if(void 0===t){if(o&&!d)return;throw new Sk.builtin.ImportError("No module named "+e)}if(t!==u.$d){for(n in u.$d)t[n]||(t[n]=u.$d[n]);u.$d=t}if(Sk.onAfterImport&&"function"==typeof Sk.onAfterImport)try{Sk.onAfterImport(e)}catch(e){}return d?(c.tp$setattr(new Sk.builtin.str(m[m.length-1]),u),d):(i&&i.tp$setattr(new Sk.builtin.str(e),u),u)}))}));return s?b:Sk.misceval.retryOptionalSuspensionOrThrow(b)},Sk.importModule=function(e,t,n){return Sk.importModuleInternal_(e,t,void 0,void 0,void 0,!1,n)},Sk.importMain=function(e,t,n){return Sk.dateSet=!1,Sk.filesLoaded=!1,Sk.sysmodules=new Sk.builtin.dict([]),Sk.realsyspath=void 0,Sk.resetCompiler(),Sk.importModuleInternal_(e,t,"__main__",void 0,void 0,!1,n)},Sk.importMainWithBody=function(e,t,n,r){return Sk.dateSet=!1,Sk.filesLoaded=!1,Sk.sysmodules=new Sk.builtin.dict([]),Sk.realsyspath=void 0,Sk.resetCompiler(),Sk.importModuleInternal_(e,t,"__main__",n,void 0,!1,r)},Sk.importBuiltinWithBody=function(e,t,n,r){return Sk.importModuleInternal_(e,t,"__builtin__."+e,n,void 0,!1,r)},Sk.builtin.__import__=function(e,t,n,r,i){var o,s=Sk.globals;if(void 0===i&&(i=Sk.__future__.absolute_import?0:-1),0!==i&&t.__package__&&t.__package__!==Sk.builtin.none.none$){if((o=t.__package__.v)&&0<i){if(t=o.split("."),i-1>=t.length)throw new Sk.builtin.ValueError("Attempted relative import beyond toplevel package");t.length-=i-1,o=t.join(".")}var a=Sk.sysmodules.quick$lookup(new Sk.builtin.str(o))}if(0<i&&void 0===a)throw new Sk.builtin.ValueError("Attempted relative import in non-package");return e.split("."),Sk.misceval.chain(void 0,(function(){if(0!==i&&void 0!==a)return""===e?a:Sk.importModuleInternal_(e,void 0,o+"."+e,void 0,a,-1==i,!0)}),(function(t){return void 0===t?(o=a=void 0,Sk.importModuleInternal_(e,void 0,void 0,void 0,void 0,!1,!0)):t}),(function(t){if(r&&0!==r.length){var n,i=Sk.sysmodules.mp$subscript(new Sk.builtin.str((o||"")+(o&&e?".":"")+e));for(t=0;t<r.length;t++){var s=r[t];"*"!=s&&void 0===i.tp$getattr(new Sk.builtin.str(s))&&(n=Sk.misceval.chain(n,Sk.importModuleInternal_.bind(null,s,void 0,void 0,void 0,i,!0,!0)))}return Sk.misceval.chain(n,(function(){return Sk.asserts.assert(i),i}))}return t}),(function(e){return s!==Sk.globals&&(Sk.globals=s),e}))},Sk.importStar=function(e,t,n){if(n=e.tp$getattr(new Sk.builtin.str("__all__")))for(let r=Sk.abstr.iter(n),i=r.tp$iternext();void 0!==i;i=r.tp$iternext())t[i.v]=Sk.abstr.gattr(e,i);else{n=Object.getOwnPropertyNames(e.$d);for(let r in n)"_"!=n[r].charAt(0)&&(t[n[r]]=e.$d[n[r]])}},Sk.exportSymbol("Sk.importMain",Sk.importMain),Sk.exportSymbol("Sk.importMainWithBody",Sk.importMainWithBody),Sk.exportSymbol("Sk.importBuiltinWithBody",Sk.importBuiltinWithBody),Sk.exportSymbol("Sk.builtin.__import__",Sk.builtin.__import__),Sk.exportSymbol("Sk.importStar",Sk.importStar)},function(e,t){Sk.builtin.timSort=function(e,t){this.list=new Sk.builtin.list(e.v),this.MIN_GALLOP=7,this.listlength=t||e.sq$length()},Sk.builtin.timSort.prototype.lt=function(e,t){return Sk.misceval.richCompareBool(e,t,"Lt")},Sk.builtin.timSort.prototype.le=function(e,t){return!this.lt(t,e)},Sk.builtin.timSort.prototype.setitem=function(e,t){this.list.v[e]=t},Sk.builtin.timSort.prototype.binary_sort=function(e,t){var n;for(n=e.base+t;n<e.base+e.len;n++){var r=e.base,i=n;for(t=e.getitem(i);r<i;){var o=r+(i-r>>1);this.lt(t,e.getitem(o))?i=o:r=o+1}for(Sk.asserts.assert(r===i),o=n;o>r;o--)e.setitem(o,e.getitem(o-1));e.setitem(r,t)}},Sk.builtin.timSort.prototype.count_run=function(e){var t;if(1>=e.len)var n=e.len,r=!1;else if(n=2,this.lt(e.getitem(e.base+1),e.getitem(e.base)))for(r=!0,t=e.base+2;t<e.base+e.len&&this.lt(e.getitem(t),e.getitem(t-1));t++)n++;else for(r=!1,t=e.base+2;t<e.base+e.len&&!this.lt(e.getitem(t),e.getitem(t-1));t++)n++;return{run:new Sk.builtin.listSlice(e.list,e.base,n),descending:r}},Sk.builtin.timSort.prototype.sort=function(){var e,t=new Sk.builtin.listSlice(this.list,0,this.listlength);if(!(2>t.len)){for(this.merge_init(),e=this.merge_compute_minrun(t.len);0<t.len;){var n=this.count_run(t);if(n.descending&&n.run.reverse(),n.run.len<e){var r=n.run.len;n.run.len=e<t.len?e:t.len,this.binary_sort(n.run,r)}t.advance(n.run.len),this.pending.push(n.run),this.merge_collapse()}Sk.asserts.assert(t.base==this.listlength),this.merge_force_collapse(),Sk.asserts.assert(1==this.pending.length),Sk.asserts.assert(0===this.pending[0].base),Sk.asserts.assert(this.pending[0].len==this.listlength)}},Sk.builtin.timSort.prototype.gallop=function(e,t,n,r){var i;Sk.asserts.assert(0<=n&&n<t.len);var o=this;r=r?function(e,t){return o.le(e,t)}:function(e,t){return o.lt(e,t)};var s=t.base+n,a=0,l=1;if(r(t.getitem(s),e)){for(i=t.len-n;l<i&&r(t.getitem(s+l),e);){a=l;try{l=1+(l<<1)}catch(e){l=i}}l>i&&(l=i),a+=n,l+=n}else{for(i=n+1;l<i&&!r(t.getitem(s-l),e);){a=l;try{l=1+(l<<1)}catch(e){l=i}}l>i&&(l=i),s=n-a,a=n-l,l=s}for(Sk.asserts.assert(-1<=a<l<=t.len),a+=1;a<l;)n=a+(l-a>>1),r(t.getitem(t.base+n),e)?a=n+1:l=n;return Sk.asserts.assert(a==l),l},Sk.builtin.timSort.prototype.merge_init=function(){this.min_gallop=this.MIN_GALLOP,this.pending=[]},Sk.builtin.timSort.prototype.merge_lo=function(e,t){var n,r,i;Sk.asserts.assert(0<e.len&&0<t.len&&e.base+e.len==t.base);var o=this.min_gallop,s=e.base;e=e.copyitems();try{if(this.setitem(s,t.popleft()),s++,1!=e.len&&0!==t.len)for(;;){for(r=n=0;;)if(this.lt(t.getitem(t.base),e.getitem(e.base))){if(this.setitem(s,t.popleft()),s++,0===t.len)return;if(n=0,++r>=o)break}else{if(this.setitem(s,e.popleft()),s++,1==e.len)return;if(r=0,++n>=o)break}for(o+=1;;){for(this.min_gallop=o-=1<o,n=this.gallop(t.getitem(t.base),e,0,!0),i=e.base;i<e.base+n;i++)this.setitem(s,e.getitem(i)),s++;if(e.advance(n),1>=e.len)return;if(this.setitem(s,t.popleft()),s++,0===t.len)return;for(r=this.gallop(e.getitem(e.base),t,0,!1),i=t.base;i<t.base+r;i++)this.setitem(s,t.getitem(i)),s++;if(t.advance(r),0===t.len)return;if(this.setitem(s,e.popleft()),s++,1==e.len)return;if(n<this.MIN_GALLOP&&r<this.MIN_GALLOP)break;o++,this.min_gallop=o}}}finally{for(Sk.asserts.assert(0<=e.len&&0<=t.len),i=t.base;i<t.base+t.len;i++)this.setitem(s,t.getitem(i)),s++;for(i=e.base;i<e.base+e.len;i++)this.setitem(s,e.getitem(i)),s++}},Sk.builtin.timSort.prototype.merge_hi=function(e,t){var n,r,i;Sk.asserts.assert(0<e.len&&0<t.len&&e.base+e.len==t.base);var o=this.min_gallop,s=t.base+t.len;t=t.copyitems();try{if(s--,this.setitem(s,e.popright()),0!==e.len&&1!=t.len)for(;;){for(r=n=0;;){var a=e.getitem(e.base+e.len-1),l=t.getitem(t.base+t.len-1);if(this.lt(l,a)){if(s--,this.setitem(s,a),e.len--,0===e.len)return;if(r=0,++n>=o)break}else{if(s--,this.setitem(s,l),t.len--,1==t.len)return;if(n=0,++r>=o)break}}for(o+=1;;){this.min_gallop=o-=1<o,l=t.getitem(t.base+t.len-1);var c=this.gallop(l,e,e.len-1,!0);for(n=e.len-c,i=e.base+e.len-1;i>e.base+c-1;i--)s--,this.setitem(s,e.getitem(i));if(e.len-=n,0===e.len)return;if(s--,this.setitem(s,t.popright()),1==t.len)return;for(a=e.getitem(e.base+e.len-1),c=this.gallop(a,t,t.len-1,!1),r=t.len-c,i=t.base+t.len-1;i>t.base+c-1;i--)s--,this.setitem(s,t.getitem(i));if(t.len-=r,1>=t.len)return;if(s--,this.setitem(s,e.popright()),0===e.len)return;if(n<this.MIN_GALLOP&&r<this.MIN_GALLOP)break;o++,this.min_gallop=o}}}finally{for(Sk.asserts.assert(0<=e.len&&0<=t.len),i=e.base+e.len-1;i>e.base-1;i--)s--,this.setitem(s,e.getitem(i));for(i=t.base+t.len-1;i>t.base-1;i--)s--,this.setitem(s,t.getitem(i))}},Sk.builtin.timSort.prototype.merge_at=function(e){0>e&&(e=this.pending.length+e);var t=this.pending[e],n=this.pending[e+1];Sk.asserts.assert(0<t.len&&0<n.len),Sk.asserts.assert(t.base+t.len==n.base),this.pending[e]=new Sk.builtin.listSlice(this.list,t.base,t.len+n.len),this.pending.splice(e+1,1),e=this.gallop(n.getitem(n.base),t,0,!0),t.advance(e),0!==t.len&&(n.len=this.gallop(t.getitem(t.base+t.len-1),n,n.len-1,!1),0!==n.len&&(t.len<=n.len?this.merge_lo(t,n):this.merge_hi(t,n)))},Sk.builtin.timSort.prototype.merge_collapse=function(){for(var e=this.pending;1<e.length;)if(3<=e.length&&e[e.length-3].len<=e[e.length-2].len+e[e.length-1].len)e[e.length-3].len<e[e.length-1].len?this.merge_at(-3):this.merge_at(-2);else{if(!(e[e.length-2].len<=e[e.length-1].len))break;this.merge_at(-2)}},Sk.builtin.timSort.prototype.merge_force_collapse=function(){for(var e=this.pending;1<e.length;)3<=e.length&&e[e.length-3].len<e[e.length-1].len?this.merge_at(-3):this.merge_at(-2)},Sk.builtin.timSort.prototype.merge_compute_minrun=function(e){for(var t=0;64<=e;)t|=1&e,e>>=1;return e+t},Sk.builtin.listSlice=function(e,t,n){this.list=e,this.base=t,this.len=n},Sk.builtin.listSlice.prototype.copyitems=function(){var e=this.base,t=this.base+this.len;return Sk.asserts.assert(0<=e<=t),new Sk.builtin.listSlice(new Sk.builtin.list(this.list.v.slice(e,t)),0,this.len)},Sk.builtin.listSlice.prototype.advance=function(e){this.base+=e,this.len-=e,Sk.asserts.assert(this.base<=this.list.sq$length())},Sk.builtin.listSlice.prototype.getitem=function(e){return this.list.v[e]},Sk.builtin.listSlice.prototype.setitem=function(e,t){this.list.v[e]=t},Sk.builtin.listSlice.prototype.popleft=function(){var e=this.list.v[this.base];return this.base++,this.len--,e},Sk.builtin.listSlice.prototype.popright=function(){return this.len--,this.list.v[this.base+this.len]},Sk.builtin.listSlice.prototype.reverse=function(){for(var e,t,n=this.list,r=this.base,i=r+this.len-1;r<i;)e=n.v[i],t=n.v[r],n.v[r]=e,n.v[i]=t,r++,i--},Sk.exportSymbol("Sk.builtin.listSlice",Sk.builtin.listSlice),Sk.exportSymbol("Sk.builtin.timSort",Sk.builtin.timSort)},function(e,t){Sk.builtin.super_=Sk.abstr.buildNativeClass("super",{constructor:function(e,t){if(Sk.asserts.assert(this instanceof Sk.builtin.super_,"bad call to super, use 'new'"),this.type=e,this.obj=t,void 0!==e&&!Sk.builtin.checkClass(e))throw new Sk.builtin.TypeError("must be type, not "+Sk.abstr.typeName(e));this.obj_type=void 0!==this.obj?this.$supercheck(e,this.obj):null},slots:{tp$doc:"super() -> same as super(__class__, <first argument>)\nsuper(type) -> unbound super object\nsuper(type, obj) -> bound super object; requires isinstance(obj, type)\nsuper(type, type2) -> bound super object; requires issubclass(type2, type)\nTypical use to call a cooperative superclass method:\nclass C(B):\n def meth(self, arg):\n super().meth(arg)\nThis works for class methods too:\nclass C(B):\n @classmethod\n def cmeth(cls, arg):\n super().cmeth(arg)\n",tp$new:Sk.generic.new,tp$init(e,t){if(Sk.abstr.checkNoKwargs("super",t),Sk.abstr.checkArgsLen("super",e,1,2),t=e[0],e=e[1],!Sk.builtin.checkClass(t))throw new Sk.builtin.TypeError("must be type, not "+Sk.abstr.typeName(t));this.obj=e,this.type=t,null!=this.obj&&(this.obj_type=this.$supercheck(t,this.obj))},$r(){return this.obj?new Sk.builtin.str("<super: <class '"+this.type.prototype.tp$name+"'>, <"+Sk.abstr.typeName(this.obj)+" object>>"):new Sk.builtin.str("<super: <class '"+this.type.prototype.tp$name+"'>, NULL>")},tp$getattr(e,t){let n=this.obj_type;if(null==n)return Sk.generic.getAttr.call(this,e,t);var r=n.prototype.tp$mro;const i=r.length;if(e===Sk.builtin.str.$class)return Sk.generic.getAttr.call(this,e,t);let o,s;for(o=0;o+1<i&&this.type!==r[o];o++);if(o++,o>=i)return Sk.generic.getAttr.call(this,e,t);for(e=e.$mangled;o<i;){if((t=r[o].prototype).hasOwnProperty(e)&&(s=t[e]),void 0!==s)return void 0!==(r=s.tp$descr_get)&&(s=r.call(s,this.obj===n?null:this.obj,n)),s;o++}},tp$descr_get(e,t){if(null===e||null!=this.obj)return this;if(this.ob$type!==Sk.builtin.super_)return Sk.misceval.callsimOrSuspendArray(this.ob$type,[this.type,e]);{t=this.$supercheck(this.type,e);const n=new Sk.builtin.super_;return n.type=this.type,n.obj=e,n.obj_type=t,n}}},getsets:{__thisclass__:{$get(){return this.type},$doc:"the class invoking super()"},__self__:{$get(){return this.obj||Sk.builtin.none.none$},$doc:"the instance invoking super(); may be None"},__self_class__:{$get(){return this.obj_type||Sk.builtin.none.none$},$doc:"the type of the instance invoking super(); may be None"}},proto:{$supercheck(e,t){if(Sk.builtin.checkClass(t)&&t.$isSubType(e))return t;if(t.ob$type.$isSubType(e))return t.ob$type;{const n=t.tp$getattr(Sk.builtin.str.$class);if(void 0!==n&&n!==t.ob$type&&Sk.builtin.checkClass(n)&&n.$isSubType(e))return n}throw new Sk.builtin.TypeError("super(type, obj): obj must be an instance or subtype of type")}}})},function(e,t){Sk.builtins={round:null,len:null,min:null,max:null,sum:null,abs:null,fabs:null,ord:null,chr:null,hex:null,oct:null,bin:null,dir:null,repr:null,open:null,isinstance:null,hash:null,getattr:null,hasattr:null,id:null,reduce:new Sk.builtin.func(Sk.builtin.reduce),sorted:null,any:null,all:null,enumerate:Sk.builtin.enumerate,filter:Sk.builtin.filter_,map:Sk.builtin.map_,range:Sk.builtin.range_,reversed:Sk.builtin.reversed,zip:Sk.builtin.zip_,BaseException:Sk.builtin.BaseException,AttributeError:Sk.builtin.AttributeError,ValueError:Sk.builtin.ValueError,Exception:Sk.builtin.Exception,ZeroDivisionError:Sk.builtin.ZeroDivisionError,AssertionError:Sk.builtin.AssertionError,ImportError:Sk.builtin.ImportError,IndentationError:Sk.builtin.IndentationError,IndexError:Sk.builtin.IndexError,LookupError:Sk.builtin.LookupError,KeyError:Sk.builtin.KeyError,TypeError:Sk.builtin.TypeError,UnicodeDecodeError:Sk.builtin.UnicodeDecodeError,UnicodeEncodeError:Sk.builtin.UnicodeEncodeError,NameError:Sk.builtin.NameError,IOError:Sk.builtin.IOError,NotImplementedError:Sk.builtin.NotImplementedError,SystemExit:Sk.builtin.SystemExit,OverflowError:Sk.builtin.OverflowError,OperationError:Sk.builtin.OperationError,NegativePowerError:Sk.builtin.NegativePowerError,RuntimeError:Sk.builtin.RuntimeError,RecursionError:Sk.builtin.RecursionError,StopIteration:Sk.builtin.StopIteration,SyntaxError:Sk.builtin.SyntaxError,SystemError:Sk.builtin.SystemError,float_$rw$:Sk.builtin.float_,int_$rw$:Sk.builtin.int_,bool:Sk.builtin.bool,complex:Sk.builtin.complex,dict:Sk.builtin.dict,file:Sk.builtin.file,frozenset:Sk.builtin.frozenset,function:Sk.builtin.func,generator:Sk.builtin.generator,list:Sk.builtin.list,long_$rw$:Sk.builtin.lng,method:Sk.builtin.method,object:Sk.builtin.object,slice:Sk.builtin.slice,str:Sk.builtin.str,set:Sk.builtin.set,tuple:Sk.builtin.tuple,type:Sk.builtin.type,input:null,raw_input:new Sk.builtin.func(Sk.builtin.raw_input),setattr:null,jseval:Sk.builtin.jseval,jsmillis:Sk.builtin.jsmillis,quit:new Sk.builtin.func(Sk.builtin.quit),exit:new Sk.builtin.func(Sk.builtin.quit),print:null,divmod:null,format:null,globals:null,issubclass:null,iter:null,execfile:Sk.builtin.execfile,help:Sk.builtin.help,memoryview:Sk.builtin.memoryview,reload:Sk.builtin.reload,super_$rw$:Sk.builtin.super_,unichr:Sk.builtin.unichr,vars:Sk.builtin.vars,apply_$rw$:Sk.builtin.apply_,buffer:Sk.builtin.buffer,coerce:Sk.builtin.coerce,intern:Sk.builtin.intern,property:Sk.builtin.property,classmethod:Sk.builtin.classmethod,staticmethod:Sk.builtin.staticmethod},Sk.abstr.setUpModuleMethods("builtins",Sk.builtins,{__import__:{$meth:Sk.builtin.__import__,$flags:{NamedArgs:["name","globals","locals","fromlist","level"]},$textsig:null,$doc:"__import__(name, globals=None, locals=None, fromlist=(), level=0) -> module\n\nImport a module. Because this function is meant for use by the Python\ninterpreter and not for general use, it is better to use\nimportlib.import_module() to programmatically import a module.\n\nThe globals argument is only used to determine the context;\nthey are not modified. The locals argument is unused. The fromlist\nshould be a list of names to emulate ``from name import ...'', or an\nempty list to emulate ``import name''.\nWhen importing a module from a package, note that __import__('A.B', ...)\nreturns package A when fromlist is empty, but its submodule B when\nfromlist is not empty. The level argument is used to determine whether to\nperform absolute or relative imports: 0 is absolute, while a positive number\nis the number of parent directories to search relative to the current module."},abs:{$meth:Sk.builtin.abs,$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the absolute value of the argument."},all:{$meth:Sk.builtin.all,$flags:{OneArg:!0},$textsig:"($module, iterable, /)",$doc:"Return True if bool(x) is True for all values x in the iterable.\n\nIf the iterable is empty, return True."},any:{$meth:Sk.builtin.any,$flags:{OneArg:!0},$textsig:"($module, iterable, /)",$doc:"Return True if bool(x) is True for any x in the iterable.\n\nIf the iterable is empty, return False."},ascii:{$meth:Sk.builtin.ascii,$flags:{OneArg:!0},$textsig:"($module, obj, /)",$doc:"Return an ASCII-only representation of an object.\n\nAs repr(), return a string containing a printable representation of an\nobject, but escape the non-ASCII characters in the string returned by\nrepr() using \\\\x, \\\\u or \\\\U escapes. This generates a string similar\nto that returned by repr() in Python 2."},bin:{$meth:Sk.builtin.bin,$flags:{OneArg:!0},$textsig:"($module, number, /)",$doc:"Return the binary representation of an integer.\n\n >>> bin(2796202)\n '0b1010101010101010101010'"},callable:{$meth:Sk.builtin.callable,$flags:{OneArg:!0},$textsig:"($module, obj, /)",$doc:"Return whether the object is callable (i.e., some kind of function).\n\nNote that classes are callable, as are instances of classes with a\n__call__() method."},chr:{$meth:Sk.builtin.chr,$flags:{OneArg:!0},$textsig:"($module, i, /)",$doc:"Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff."},delattr:{$meth:Sk.builtin.delattr,$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, obj, name, /)",$doc:"Deletes the named attribute from the given object.\n\ndelattr(x, 'y') is equivalent to ``del x.y''"},dir:{$meth:Sk.builtin.dir,$flags:{MinArgs:0,MaxArgs:1},$textsig:null,$doc:"dir([object]) -> list of strings\n\nIf called without an argument, return the names in the current scope.\nElse, return an alphabetized list of names comprising (some of) the attributes\nof the given object, and of attributes reachable from it.\nIf the object supplies a method named __dir__, it will be used; otherwise\nthe default dir() logic is used and returns:\n for a module object: the module's attributes.\n for a class object: its attributes, and recursively the attributes\n of its bases.\n for any other object: its attributes, its class's attributes, and\n recursively the attributes of its class's base classes."},divmod:{$meth:Sk.builtin.divmod,$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, y, /)",$doc:"Return the tuple (x//y, x%y). Invariant: div*y + mod == x."},eval_$rw$:{$name:"eval",$meth:Sk.builtin.eval_,$flags:{MinArgs:1,MaxArgs:3},$textsig:"($module, source, globals=None, locals=None, /)",$doc:"Evaluate the given source in the context of globals and locals.\n\nThe source may be a string representing a Python expression\nor a code object as returned by compile().\nThe globals must be a dictionary and locals can be any mapping,\ndefaulting to the current globals and locals.\nIf only globals is given, locals defaults to it."},format:{$meth:Sk.builtin.format,$flags:{MinArgs:1,MaxArgs:2},$textsig:"($module, value, format_spec='', /)",$doc:"Return value.__format__(format_spec)\n\nformat_spec defaults to the empty string.\nSee the Format Specification Mini-Language section of help('FORMATTING') for\ndetails."},getattr:{$meth:Sk.builtin.getattr,$flags:{MinArgs:2,MaxArgs:3},$textsig:null,$doc:"getattr(object, name[, default]) -> value\n\nGet a named attribute from an object; getattr(x, 'y') is equivalent to x.y.\nWhen a default argument is given, it is returned when the attribute doesn't\nexist; without it, an exception is raised in that case."},globals:{$meth:Sk.builtin.globals,$flags:{NoArgs:!0},$textsig:"($module, /)",$doc:"Return the dictionary containing the current scope's global variables.\n\nNOTE: Updates to this dictionary *will* affect name lookups in the current\nglobal scope and vice-versa."},hasattr:{$meth:Sk.builtin.hasattr,$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, obj, name, /)",$doc:"Return whether the object has an attribute with the given name.\n\nThis is done by calling getattr(obj, name) and catching AttributeError."},hash:{$meth:Sk.builtin.hash,$flags:{OneArg:!0},$textsig:"($module, obj, /)",$doc:"Return the hash value for the given object.\n\nTwo objects that compare equal must also have the same hash value, but the\nreverse is not necessarily true."},hex:{$meth:Sk.builtin.hex,$flags:{OneArg:!0},$textsig:"($module, number, /)",$doc:"Return the hexadecimal representation of an integer.\n\n >>> hex(12648430)\n '0xc0ffee'"},id:{$meth:Sk.builtin.id,$flags:{OneArg:!0},$textsig:"($module, obj, /)",$doc:"Return the identity of an object.\n\nThis is guaranteed to be unique among simultaneously existing objects.\n(CPython uses the object's memory address.)"},input:{$meth:Sk.builtin.input,$flags:{MinArgs:0,MaxArgs:1},$textsig:"($module, prompt=None, /)",$doc:"Read a string from standard input. The trailing newline is stripped.\n\nThe prompt string, if given, is printed to standard output without a\ntrailing newline before reading input.\n\nIf the user hits EOF (*nix: Ctrl-D, Windows: Ctrl-Z+Return), raise EOFError.\nOn *nix systems, readline is used if available."},isinstance:{$meth:Sk.builtin.isinstance,$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, obj, class_or_tuple, /)",$doc:"Return whether an object is an instance of a class or of a subclass thereof.\n\nA tuple, as in ``isinstance(x, (A, B, ...))``, may be given as the target to\ncheck against. This is equivalent to ``isinstance(x, A) or isinstance(x, B)\nor ...`` etc."},issubclass:{$meth:Sk.builtin.issubclass,$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, cls, class_or_tuple, /)",$doc:"Return whether 'cls' is a derived from another class or is the same class.\n\nA tuple, as in ``issubclass(x, (A, B, ...))``, may be given as the target to\ncheck against. This is equivalent to ``issubclass(x, A) or issubclass(x, B)\nor ...`` etc."},iter:{$meth:Sk.builtin.iter,$flags:{MinArgs:1,MaxArgs:2},$textsig:"($module, iterable /)",$doc:"iter(iterable) -> iterator\niter(callable, sentinel) -> iterator\n\nGet an iterator from an object. In the first form, the argument must\nsupply its own iterator, or be a sequence.\nIn the second form, the callable is called until it returns the sentinel."},len:{$meth:Sk.builtin.len,$flags:{OneArg:!0},$textsig:"($module, obj, /)",$doc:"Return the number of items in a container."},locals:{$meth:Sk.builtin.locals,$flags:{NoArgs:!0},$textsig:"($module, /)",$doc:"Return a dictionary containing the current scope's local variables.\n\nNOTE: Whether or not updates to this dictionary will affect name lookups in\nthe local scope and vice-versa is *implementation dependent* and not\ncovered by any backwards compatibility guarantees."},max:{$meth:Sk.builtin.max,$flags:{FastCall:!0},$textsig:null,$doc:"max(iterable, *[, default=obj, key=func]) -> value\nmax(arg1, arg2, *args, *[, key=func]) -> value\n\nWith a single iterable argument, return its biggest item. The\ndefault keyword-only argument specifies an object to return if\nthe provided iterable is empty.\nWith two or more arguments, return the largest argument."},min:{$meth:Sk.builtin.min,$flags:{FastCall:!0},$textsig:null,$doc:"min(iterable, *[, default=obj, key=func]) -> value\nmin(arg1, arg2, *args, *[, key=func]) -> value\n\nWith a single iterable argument, return its smallest item. The\ndefault keyword-only argument specifies an object to return if\nthe provided iterable is empty.\nWith two or more arguments, return the smallest argument."},next:{$name:"next",$meth:Sk.builtin.next_,$flags:{MinArgs:1,MaxArgs:2},$textsig:null,$doc:"next(iterator[, default])\n\nReturn the next item from the iterator. If default is given and the iterator\nis exhausted, it is returned instead of raising StopIteration."},oct:{$meth:Sk.builtin.oct,$flags:{OneArg:!0},$textsig:"($module, number, /)",$doc:"Return the octal representation of an integer.\n\n >>> oct(342391)\n '0o1234567'"},open:{$meth:Sk.builtin.open,$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"open(name[, mode[, buffering]]) -> file object\n\nOpen a file using the file() type, returns a file object. This is the\npreferred way to open a file. See file.__doc__ for further information."},ord:{$meth:Sk.builtin.ord,$flags:{OneArg:!0},$textsig:"($module, c, /)",$doc:"Return the Unicode code point for a one-character string."},pow:{$meth:Sk.builtin.pow,$flags:{MinArgs:2,MaxArgs:3},$textsig:"($module, x, y, z=None, /)",$doc:"Equivalent to x**y (with two arguments) or x**y % z (with three arguments)\n\nSome types, such as ints, are able to use a more efficient algorithm when\ninvoked using the three argument form."},print:{$meth:Sk.builtin.print,$flags:{FastCall:!0},$textsig:null,$doc:"print(value, ..., sep=' ', end='\\n', file=sys.stdout, flush=False)\n\nPrints the values to a stream, or to sys.stdout by default.\nOptional keyword arguments:\nfile: a file-like object (stream); defaults to the current sys.stdout.\nsep: string inserted between values, default a space.\nend: string appended after the last value, default a newline.\nflush: whether to forcibly flush the stream."},repr:{$meth:Sk.builtin.repr,$flags:{OneArg:!0},$textsig:"($module, obj, /)",$doc:"Return the canonical string representation of the object.\n\nFor many object types, including most builtins, eval(repr(obj)) == obj."},round:{$meth:Sk.builtin.round,$flags:{NamedArgs:["number","ndigits"]},$textsig:"($module, /, number, ndigits=None)",$doc:"Round a number to a given precision in decimal digits.\n\nThe return value is an integer if ndigits is omitted or None. Otherwise\nthe return value has the same type as the number. ndigits may be negative."},setattr:{$meth:Sk.builtin.setattr,$flags:{MinArgs:3,MaxArgs:3},$textsig:"($module, obj, name, value, /)",$doc:"Sets the named attribute on the given object to the specified value.\n\nsetattr(x, 'y', v) is equivalent to ``x.y = v''"},sorted:{$meth:Sk.builtin.sorted,$flags:{NamedArgs:[null,"cmp","key","reverse"],Defaults:[Sk.builtin.none.none$,Sk.builtin.none.none$,Sk.builtin.bool.false$]},$textsig:"($module, iterable, /, *, key=None, reverse=False)",$doc:"Return a new list containing all items from the iterable in ascending order.\n\nA custom key function can be supplied to customize the sort order, and the\nreverse flag can be set to request the result in descending order."},sum:{$meth:Sk.builtin.sum,$flags:{NamedArgs:[null,"start"],Defaults:[new Sk.builtin.int_(0)]},$textsig:"($module, iterable, /, start=0)",$doc:"Return the sum of a 'start' value (default: 0) plus an iterable of numbers\n\nWhen the iterable is empty, return the start value.\nThis function is intended specifically for use with numeric values and may\nreject non-numeric types."},vars:{$meth:Sk.builtin.vars,$flags:{MinArgs:0,MaxArgs:1},$textsig:null,$doc:"vars([object]) -> dictionary\n\nWithout arguments, equivalent to locals().\nWith an argument, equivalent to object.__dict__."}}),Sk.setupObjects=function(e){e?(Sk.builtins.filter=Sk.builtin.filter_,Sk.builtins.map=Sk.builtin.map_,Sk.builtins.zip=Sk.builtin.zip_,Sk.builtins.range=Sk.builtin.range_,delete Sk.builtins.xrange,delete Sk.builtins.StandardError,delete Sk.builtins.unicode,delete Sk.builtins.basestring,delete Sk.builtins.long_$rw$,Sk.builtin.int_.prototype.$r=function(){return new Sk.builtin.str(this.v.toString())},delete Sk.builtin.int_.prototype.tp$str,delete Sk.builtin.bool.prototype.tp$str,delete Sk.builtins.raw_input,delete Sk.builtin.str.prototype.decode,Sk.builtins.bytes=Sk.builtin.bytes,Sk.builtins.ascii=new Sk.builtin.sk_method({$meth:Sk.builtin.ascii,$flags:{OneArg:!0},$textsig:"($module, obj, /)",$doc:"Return an ASCII-only representation of an object.\n\nAs repr(), return a string containing a printable representation of an\nobject, but escape the non-ASCII characters in the string returned by\nrepr() using \\\\x, \\\\u or \\\\U escapes. This generates a string similar\nto that returned by repr() in Python 2."},null,"builtins")):(Sk.builtins.range=new Sk.builtin.sk_method({$meth:Sk.builtin.range,$name:"range",$flags:{MinArgs:1,MaxArgs:3}},void 0,"builtins"),Sk.builtins.xrange=new Sk.builtin.sk_method({$meth:Sk.builtin.xrange,$name:"xrange",$flags:{MinArgs:1,MaxArgs:3}},null,"builtins"),Sk.builtins.filter=new Sk.builtin.func(Sk.builtin.filter),Sk.builtins.map=new Sk.builtin.func(Sk.builtin.map),Sk.builtins.zip=new Sk.builtin.func(Sk.builtin.zip),Sk.builtins.StandardError=Sk.builtin.Exception,Sk.builtins.unicode=Sk.builtin.str,Sk.builtins.basestring=Sk.builtin.str,Sk.builtins.long_$rw$=Sk.builtin.lng,Sk.builtin.int_.prototype.$r=function(){const e=this.v;return"number"==typeof e?new Sk.builtin.str(e.toString()):new Sk.builtin.str(e.toString()+"L")},Sk.builtin.int_.prototype.tp$str=function(){return new Sk.builtin.str(this.v.toString())},Sk.builtin.bool.prototype.tp$str=function(){return this.$r()},Sk.builtins.raw_input=new Sk.builtin.func(Sk.builtin.raw_input),Sk.builtin.str.prototype.decode=Sk.builtin.str.$py2decode,delete Sk.builtins.bytes,delete Sk.builtins.ascii)},Sk.exportSymbol("Sk.setupObjects",Sk.setupObjects),Sk.exportSymbol("Sk.builtins",Sk.builtins)},function(e,t){Sk.builtin.str.$empty=new Sk.builtin.str(""),Sk.builtin.str.$emptystr=Sk.builtin.str.$empty,Sk.builtin.str.$utf8=new Sk.builtin.str("utf-8"),Sk.builtin.str.$ascii=new Sk.builtin.str("ascii"),Sk.builtin.str.$default_factory=new Sk.builtin.str("default_factory"),Sk.builtin.str.$imag=new Sk.builtin.str("imag"),Sk.builtin.str.$real=new Sk.builtin.str("real"),Sk.builtin.str.$abs=new Sk.builtin.str("__abs__"),Sk.builtin.str.$bytes=new Sk.builtin.str("__bytes__"),Sk.builtin.str.$call=new Sk.builtin.str("__call__"),Sk.builtin.str.$class=new Sk.builtin.str("__class__"),Sk.builtin.str.$cmp=new Sk.builtin.str("__cmp__"),Sk.builtin.str.$complex=new Sk.builtin.str("__complex__"),Sk.builtin.str.$contains=new Sk.builtin.str("__contains__"),Sk.builtin.str.$copy=new Sk.builtin.str("__copy__"),Sk.builtin.str.$dict=new Sk.builtin.str("__dict__"),Sk.builtin.str.$dir=new Sk.builtin.str("__dir__"),Sk.builtin.str.$doc=new Sk.builtin.str("__doc__"),Sk.builtin.str.$enter=new Sk.builtin.str("__enter__"),Sk.builtin.str.$eq=new Sk.builtin.str("__eq__"),Sk.builtin.str.$exit=new Sk.builtin.str("__exit__"),Sk.builtin.str.$index=new Sk.builtin.str("__index__"),Sk.builtin.str.$init=new Sk.builtin.str("__init__"),Sk.builtin.str.$int_=new Sk.builtin.str("__int__"),Sk.builtin.str.$iter=new Sk.builtin.str("__iter__"),Sk.builtin.str.$file=new Sk.builtin.str("__file__"),Sk.builtin.str.$float_=new Sk.builtin.str("__float__"),Sk.builtin.str.$format=new Sk.builtin.str("__format__"),Sk.builtin.str.$ge=new Sk.builtin.str("__ge__"),Sk.builtin.str.$getattr=new Sk.builtin.str("__getattr__"),Sk.builtin.str.$getattribute=new Sk.builtin.str("__getattribute__"),Sk.builtin.str.$getitem=new Sk.builtin.str("__getitem__"),Sk.builtin.str.$gt=new Sk.builtin.str("__gt__"),Sk.builtin.str.$keys=new Sk.builtin.str("keys"),Sk.builtin.str.$le=new Sk.builtin.str("__le__"),Sk.builtin.str.$len=new Sk.builtin.str("__len__"),Sk.builtin.str.$length_hint=new Sk.builtin.str("__length_hint__"),Sk.builtin.str.$loader=new Sk.builtin.str("__loader__"),Sk.builtin.str.$lt=new Sk.builtin.str("__lt__"),Sk.builtin.str.$module=new Sk.builtin.str("__module__"),Sk.builtin.str.$missing=new Sk.builtin.str("__missing__"),Sk.builtin.str.$name=new Sk.builtin.str("__name__"),Sk.builtin.str.$ne=new Sk.builtin.str("__ne__"),Sk.builtin.str.$new=new Sk.builtin.str("__new__"),Sk.builtin.str.$next=new Sk.builtin.str("__next__"),Sk.builtin.str.$path=new Sk.builtin.str("__path__"),Sk.builtin.str.$qualname=new Sk.builtin.str("__qualname__"),Sk.builtin.str.$repr=new Sk.builtin.str("__repr__"),Sk.builtin.str.$reversed=new Sk.builtin.str("__reversed__"),Sk.builtin.str.$round=new Sk.builtin.str("__round__"),Sk.builtin.str.$setattr=new Sk.builtin.str("__setattr__"),Sk.builtin.str.$setitem=new Sk.builtin.str("__setitem__"),Sk.builtin.str.$str=new Sk.builtin.str("__str__"),Sk.builtin.str.$trunc=new Sk.builtin.str("__trunc__"),Sk.builtin.str.$write=new Sk.builtin.str("write"),Sk.misceval.op2method_={Eq:Sk.builtin.str.$eq,NotEq:Sk.builtin.str.$ne,Gt:Sk.builtin.str.$gt,GtE:Sk.builtin.str.$ge,Lt:Sk.builtin.str.$lt,LtE:Sk.builtin.str.$le}}])}).call(this||window)}).call(this,n(28))},function(e,t){Sk.builtinFiles={files:{"src/builtin/sys.js":'var $builtinmodule=function(){var b,a=Math.pow,c={},d=[],e=Sk.getSysArgv();for(b=0;b<e.length;++b)d.push(new Sk.builtin.str(e[b]));return c.argv=new Sk.builtins.list(d),c.copyright=new Sk.builtin.str("Copyright 2009-2010 Scott Graham.\\nAll Rights Reserved.\\n"),Sk.__future__.python3?(c.version="3.7(ish) [Skulpt]",c.version_info=new Sk.builtin.tuple([new Sk.builtin.int_(3),new Sk.builtin.int_(7)])):(c.version="2.7(ish) [Skulpt]",c.version_info=new Sk.builtin.tuple([new Sk.builtin.int_(2),new Sk.builtin.int_(7)])),c.maxint=new Sk.builtin.int_(a(2,53)-1),c.maxsize=new Sk.builtin.int_(a(2,53)-1),c.modules=Sk.sysmodules,c.path=Sk.realsyspath,c.getExecutionLimit=new Sk.builtin.func(function(){return null===Sk.execLimit?Sk.builtin.none.none$:new Sk.builtin.int_(Sk.execLimit)}),c.setExecutionLimit=new Sk.builtin.func(function(a){if(null===Sk.execLimit)throw new Sk.builtin.NotImplementedError("Execution limiting is not enabled");void 0!==a&&(Sk.execLimit=Sk.builtin.asnum$(a))}),c.resetTimeout=new Sk.builtin.func(function(){Sk.execStart=new Date}),c.getYieldLimit=new Sk.builtin.func(function(){return null===Sk.yieldLimit?Sk.builtin.none.none$:new Sk.builtin.int_(Sk.yieldLimit)}),c.setYieldLimit=new Sk.builtin.func(function(a){if(null===Sk.yieldLimit)throw new Sk.builtin.NotImplementedError("Yielding is not enabled");void 0!==a&&(Sk.yieldLimit=Sk.builtin.asnum$(a))}),c.debug=new Sk.builtin.func(function(){return Sk.builtin.none.none$}),c.__stdout__=new Sk.builtin.file(new Sk.builtin.str("/dev/stdout"),new Sk.builtin.str("w")),c.__stdin__=new Sk.builtin.file(new Sk.builtin.str("/dev/stdin"),new Sk.builtin.str("r")),c.stdout=c.__stdout__,c.stdin=c.__stdin__,c};',"src/builtin/this.py":'s = """Gur Mra bs Clguba, ol Gvz Crgref\n\nOrnhgvshy vf orggre guna htyl.\nRkcyvpvg vf orggre guna vzcyvpvg.\nFvzcyr vf orggre guna pbzcyrk.\nPbzcyrk vf orggre guna pbzcyvpngrq.\nSyng vf orggre guna arfgrq.\nFcnefr vf orggre guna qrafr.\nErnqnovyvgl pbhagf.\nFcrpvny pnfrf nera\'g fcrpvny rabhtu gb oernx gur ehyrf.\nNygubhtu cenpgvpnyvgl orngf chevgl.\nReebef fubhyq arire cnff fvyragyl.\nHayrff rkcyvpvgyl fvyraprq.\nVa gur snpr bs nzovthvgl, ershfr gur grzcgngvba gb thrff.\nGurer fubhyq or bar-- naq cersrenoyl bayl bar --boivbhf jnl gb qb vg.\nNygubhtu gung jnl znl abg or boivbhf ng svefg hayrff lbh\'er Qhgpu.\nAbj vf orggre guna arire.\nNygubhtu arire vf bsgra orggre guna *evtug* abj.\nVs gur vzcyrzragngvba vf uneq gb rkcynva, vg\'f n onq vqrn.\nVs gur vzcyrzragngvba vf rnfl gb rkcynva, vg znl or n tbbq vqrn.\nAnzrfcnprf ner bar ubaxvat terng vqrn -- yrg\'f qb zber bs gubfr!"""\n\nd = {}\nfor c in (65, 97):\n for i in range(26):\n d[chr(i+c)] = chr((i+13) % 26 + c)\n\nprint("".join([d.get(c, c) for c in s]))\n',"src/lib/BaseHTTPServer.py":'raise NotImplementedError("BaseHTTPServer is not yet implemented in Skulpt")\n',"src/lib/Bastion.py":'raise NotImplementedError("Bastion is not yet implemented in Skulpt")\n',"src/lib/CGIHTTPServer.py":'raise NotImplementedError("CGIHTTPServer is not yet implemented in Skulpt")\n',"src/lib/ConfigParser.py":'raise NotImplementedError("ConfigParser is not yet implemented in Skulpt")\n',"src/lib/Cookie.py":'raise NotImplementedError("Cookie is not yet implemented in Skulpt")\n',"src/lib/DocXMLRPCServer.py":'raise NotImplementedError("DocXMLRPCServer is not yet implemented in Skulpt")\n',"src/lib/HTMLParser.py":'raise NotImplementedError("HTMLParser is not yet implemented in Skulpt")\n',"src/lib/MimeWriter.py":'raise NotImplementedError("MimeWriter is not yet implemented in Skulpt")\n',"src/lib/Queue.py":'raise NotImplementedError("Queue is not yet implemented in Skulpt")\n',"src/lib/SimpleHTTPServer.py":'raise NotImplementedError("SimpleHTTPServer is not yet implemented in Skulpt")\n',"src/lib/SimpleXMLRPCServer.py":'raise NotImplementedError("SimpleXMLRPCServer is not yet implemented in Skulpt")\n',"src/lib/SocketServer.py":'raise NotImplementedError("SocketServer is not yet implemented in Skulpt")\n',"src/lib/StringIO.py":'r"""File-like objects that read from or write to a string buffer.\n\nThis implements (nearly) all stdio methods.\n\nf = StringIO() # ready for writing\nf = StringIO(buf) # ready for reading\nf.close() # explicitly release resources held\nflag = f.isatty() # always false\npos = f.tell() # get current position\nf.seek(pos) # set current position\nf.seek(pos, mode) # mode 0: absolute; 1: relative; 2: relative to EOF\nbuf = f.read() # read until EOF\nbuf = f.read(n) # read up to n bytes\nbuf = f.readline() # read until end of line (\'\\n\') or EOF\nlist = f.readlines()# list of f.readline() results until EOF\nf.truncate([size]) # truncate file at to at most size (default: current pos)\nf.write(buf) # write at current position\nf.writelines(list) # for line in list: f.write(line)\nf.getvalue() # return whole file\'s contents as a string\n\nNotes:\n- Using a real file is often faster (but less convenient).\n- There\'s also a much faster implementation in C, called cStringIO, but\n it\'s not subclassable.\n- fileno() is left unimplemented so that code which uses it triggers\n an exception early.\n- Seeking far beyond EOF and then writing will insert real null\n bytes that occupy space in the buffer.\n- There\'s a simple test set (see end of this file).\n"""\n\n__all__ = ["StringIO"]\n\ndef _complain_ifclosed(closed):\n if closed:\n raise ValueError("I/O operation on closed file")\n\nclass StringIO:\n """class StringIO([buffer])\n\n When a StringIO object is created, it can be initialized to an existing\n string by passing the string to the constructor. If no string is given,\n the StringIO will start empty.\n\n The StringIO object can accept either Unicode or 8-bit strings, but\n mixing the two may take some care. If both are used, 8-bit strings that\n cannot be interpreted as 7-bit ASCII (that use the 8th bit) will cause\n a UnicodeError to be raised when getvalue() is called.\n """\n def __init__(self, buf = \'\'):\n # Force self.buf to be a string or unicode\n if not isinstance(buf, str):\n buf = str(buf)\n self.buf = buf\n self.len = len(buf)\n self.buflist = []\n self.pos = 0\n self.closed = False\n self.softspace = 0\n\n def __iter__(self):\n return self\n\n def next(self):\n """A file object is its own iterator, for example iter(f) returns f\n (unless f is closed). When a file is used as an iterator, typically\n in a for loop (for example, for line in f: print line), the next()\n method is called repeatedly. This method returns the next input line,\n or raises StopIteration when EOF is hit.\n """\n _complain_ifclosed(self.closed)\n r = self.readline()\n if not r:\n raise StopIteration\n return r\n\n def close(self):\n """Free the memory buffer.\n """\n if not self.closed:\n self.closed = True\n self.buf = None\n self.pos = None\n\n def isatty(self):\n """Returns False because StringIO objects are not connected to a\n tty-like device.\n """\n _complain_ifclosed(self.closed)\n return False\n\n def seek(self, pos, mode = 0):\n """Set the file\'s current position.\n\n The mode argument is optional and defaults to 0 (absolute file\n positioning); other values are 1 (seek relative to the current\n position) and 2 (seek relative to the file\'s end).\n\n There is no return value.\n """\n _complain_ifclosed(self.closed)\n if self.buflist:\n self.buf += \'\'.join(self.buflist)\n self.buflist = []\n if mode == 1:\n pos += self.pos\n elif mode == 2:\n pos += self.len\n self.pos = max(0, pos)\n\n def tell(self):\n """Return the file\'s current position."""\n _complain_ifclosed(self.closed)\n return self.pos\n\n def read(self, n = -1):\n """Read at most size bytes from the file\n (less if the read hits EOF before obtaining size bytes).\n\n If the size argument is negative or omitted, read all data until EOF\n is reached. The bytes are returned as a string object. An empty\n string is returned when EOF is encountered immediately.\n """\n _complain_ifclosed(self.closed)\n if self.buflist:\n self.buf += \'\'.join(self.buflist)\n self.buflist = []\n if n is None or n < 0:\n newpos = self.len\n else:\n newpos = min(self.pos+n, self.len)\n r = self.buf[self.pos:newpos]\n self.pos = newpos\n return r\n\n def readline(self, length=None):\n r"""Read one entire line from the file.\n\n A trailing newline character is kept in the string (but may be absent\n when a file ends with an incomplete line). If the size argument is\n present and non-negative, it is a maximum byte count (including the\n trailing newline) and an incomplete line may be returned.\n\n An empty string is returned only when EOF is encountered immediately.\n\n Note: Unlike stdio\'s fgets(), the returned string contains null\n characters (\'\\0\') if they occurred in the input.\n """\n _complain_ifclosed(self.closed)\n if self.buflist:\n self.buf += \'\'.join(self.buflist)\n self.buflist = []\n i = self.buf.find(\'\\n\', self.pos)\n if i < 0:\n newpos = self.len\n else:\n newpos = i+1\n if length is not None and length >= 0:\n if self.pos + length < newpos:\n newpos = self.pos + length\n r = self.buf[self.pos:newpos]\n self.pos = newpos\n return r\n\n def readlines(self, sizehint = 0):\n """Read until EOF using readline() and return a list containing the\n lines thus read.\n\n If the optional sizehint argument is present, instead of reading up\n to EOF, whole lines totalling approximately sizehint bytes (or more\n to accommodate a final whole line).\n """\n total = 0\n lines = []\n line = self.readline()\n while line:\n lines.append(line)\n total += len(line)\n if 0 < sizehint <= total:\n break\n line = self.readline()\n return lines\n\n def truncate(self, size=None):\n """Truncate the file\'s size.\n\n If the optional size argument is present, the file is truncated to\n (at most) that size. The size defaults to the current position.\n The current file position is not changed unless the position\n is beyond the new file size.\n\n If the specified size exceeds the file\'s current size, the\n file remains unchanged.\n """\n _complain_ifclosed(self.closed)\n if size is None:\n size = self.pos\n elif size < 0:\n raise IOError(22, "Negative size not allowed")\n elif size < self.pos:\n self.pos = size\n self.buf = self.getvalue()[:size]\n self.len = size\n\n def write(self, s):\n """Write a string to the file.\n\n There is no return value.\n """\n _complain_ifclosed(self.closed)\n if not s: return\n # Force s to be a string or unicode\n if not isinstance(s, str):\n s = str(s)\n spos = self.pos\n slen = self.len\n if spos == slen:\n self.buflist.append(s)\n self.len = self.pos = spos + len(s)\n return\n if spos > slen:\n self.buflist.append(\'\\0\'*(spos - slen))\n slen = spos\n newpos = spos + len(s)\n if spos < slen:\n if self.buflist:\n self.buf += \'\'.join(self.buflist)\n self.buflist = [self.buf[:spos], s, self.buf[newpos:]]\n self.buf = \'\'\n if newpos > slen:\n slen = newpos\n else:\n self.buflist.append(s)\n slen = newpos\n self.len = slen\n self.pos = newpos\n\n def writelines(self, iterable):\n """Write a sequence of strings to the file. The sequence can be any\n iterable object producing strings, typically a list of strings. There\n is no return value.\n\n (The name is intended to match readlines(); writelines() does not add\n line separators.)\n """\n write = self.write\n for line in iterable:\n write(line)\n\n def flush(self):\n """Flush the internal buffer\n """\n _complain_ifclosed(self.closed)\n\n def getvalue(self):\n """\n Retrieve the entire contents of the "file" at any time before\n the StringIO object\'s close() method is called.\n\n The StringIO object can accept either Unicode or 8-bit strings,\n but mixing the two may take some care. If both are used, 8-bit\n strings that cannot be interpreted as 7-bit ASCII (that use the\n 8th bit) will cause a UnicodeError to be raised when getvalue()\n is called.\n """\n _complain_ifclosed(self.closed)\n if self.buflist:\n self.buf += \'\'.join(self.buflist)\n self.buflist = []\n return self.buf\n',"src/lib/UserDict.py":'raise NotImplementedError("UserDict is not yet implemented in Skulpt")\n',"src/lib/UserList.py":'raise NotImplementedError("UserList is not yet implemented in Skulpt")\n',"src/lib/UserString.py":'raise NotImplementedError("UserString is not yet implemented in Skulpt")\n',"src/lib/_LWPCookieJar.py":'raise NotImplementedError("_LWPCookieJar is not yet implemented in Skulpt")\n',"src/lib/_MozillaCookieJar.py":'raise NotImplementedError("_MozillaCookieJar is not yet implemented in Skulpt")\n',"src/lib/__future__.py":'raise NotImplementedError("__future__ is not yet implemented in Skulpt")\n',"src/lib/__phello__.foo.py":'raise NotImplementedError("__phello__.foo is not yet implemented in Skulpt")\n',"src/lib/_abcoll.py":'raise NotImplementedError("_abcoll is not yet implemented in Skulpt")\n',"src/lib/_strptime.py":'raise NotImplementedError("_strptime is not yet implemented in Skulpt")\n',"src/lib/_threading_local.py":'raise NotImplementedError("_threading_local is not yet implemented in Skulpt")\n',"src/lib/abc.py":'raise NotImplementedError("abc is not yet implemented in Skulpt")\n',"src/lib/aifc.py":'raise NotImplementedError("aifc is not yet implemented in Skulpt")\n',"src/lib/antigravity.py":'import webbrowser\n\nwebbrowser.open("https://xkcd.com/353/")\n',"src/lib/anydbm.py":'raise NotImplementedError("anydbm is not yet implemented in Skulpt")\n',"src/lib/array.js":'$builtinmodule=function(){var a={},b=["c","b","B","u","h","H","i","I","l","L","f","d"];return a.__name__=new Sk.builtin.str("array"),a.array=Sk.misceval.buildClass(a,function(a,c){c.__init__=new Sk.builtin.func(function(a,c,d){if(Sk.builtin.pyCheckArgsLen("__init__",arguments.length,2,3),-1==b.indexOf(Sk.ffi.remapToJs(c)))throw new Sk.builtin.ValueError("bad typecode (must be c, b, B, u, h, H, i, I, l, L, f or d)");if(d&&!Sk.builtin.checkIterable(d))throw new Sk.builtin.TypeError("iteration over non-sequence");if(a.$d.mp$ass_subscript(new Sk.builtin.str("typecode"),c),a.$d.mp$ass_subscript(new Sk.builtin.str("__module__"),new Sk.builtin.str("array")),a.typecode=c,void 0===d)a.internalIterable=new Sk.builtin.list;else if(d instanceof Sk.builtin.list)a.internalIterable=d;else for(a.internalIterable=new Sk.builtin.list,iter=Sk.abstr.iter(d),item=iter.tp$iternext();void 0!==item;item=iter.tp$iternext())Sk.misceval.callsimArray(a.internalIterable.append,[a.internalIterable,item])}),c.__repr__=new Sk.builtin.func(function(a){var b=Sk.ffi.remapToJs(a.typecode),c="";return Sk.ffi.remapToJs(a.internalIterable).length&&("c"==Sk.ffi.remapToJs(a.typecode)?c=", \'"+Sk.ffi.remapToJs(a.internalIterable).join("")+"\'":c=", "+Sk.ffi.remapToJs(Sk.misceval.callsimArray(a.internalIterable.__repr__,[a.internalIterable]))),new Sk.builtin.str("array(\'"+b+"\'"+c+")")}),c.__str__=c.__repr__,c.__getattribute__=new Sk.builtin.func(function(a,b){return a.tp$getattr(b)}),c.append=new Sk.builtin.func(function(a,b){return Sk.misceval.callsimArray(a.internalIterable.append,[a.internalIterable,b]),Sk.builtin.none.none$}),c.extend=new Sk.builtin.func(function(a,b){if(Sk.builtin.pyCheckArgsLen("__init__",arguments.length,2,2),!Sk.builtin.checkIterable(b))throw new Sk.builtin.TypeError("iteration over non-sequence");for(iter=Sk.abstr.iter(b),item=iter.tp$iternext();void 0!==item;item=iter.tp$iternext())Sk.misceval.callsimArray(a.internalIterable.append,[a.internalIterable,item])})},"array",[]),a};',"src/lib/ast.py":'raise NotImplementedError("ast is not yet implemented in Skulpt")\n',"src/lib/asynchat.py":'raise NotImplementedError("asynchat is not yet implemented in Skulpt")\n',"src/lib/asyncore.py":'raise NotImplementedError("asyncore is not yet implemented in Skulpt")\n',"src/lib/atexit.py":'raise NotImplementedError("atexit is not yet implemented in Skulpt")\n',"src/lib/audiodev.py":'raise NotImplementedError("audiodev is not yet implemented in Skulpt")\n',"src/lib/base64.py":'raise NotImplementedError("base64 is not yet implemented in Skulpt")\n',"src/lib/bdb.py":'raise NotImplementedError("bdb is not yet implemented in Skulpt")\n',"src/lib/binhex.py":'raise NotImplementedError("binhex is not yet implemented in Skulpt")\n',"src/lib/bisect.py":'"""Bisection algorithms."""\n\ndef insort_right(a, x, lo=0, hi=None):\n """Insert item x in list a, and keep it sorted assuming a is sorted.\n\n If x is already in a, insert it to the right of the rightmost x.\n\n Optional args lo (default 0) and hi (default len(a)) bound the\n slice of a to be searched.\n """\n\n if lo < 0:\n raise ValueError(\'lo must be non-negative\')\n if hi is None:\n hi = len(a)\n while lo < hi:\n mid = (lo+hi)//2\n if x < a[mid]: hi = mid\n else: lo = mid+1\n a.insert(lo, x)\n\ndef bisect_right(a, x, lo=0, hi=None):\n """Return the index where to insert item x in list a, assuming a is sorted.\n\n The return value i is such that all e in a[:i] have e <= x, and all e in\n a[i:] have e > x. So if x already appears in the list, a.insert(x) will\n insert just after the rightmost x already there.\n\n Optional args lo (default 0) and hi (default len(a)) bound the\n slice of a to be searched.\n """\n\n if lo < 0:\n raise ValueError(\'lo must be non-negative\')\n if hi is None:\n hi = len(a)\n while lo < hi:\n mid = (lo+hi)//2\n if x < a[mid]: hi = mid\n else: lo = mid+1\n return lo\n\ndef insort_left(a, x, lo=0, hi=None):\n """Insert item x in list a, and keep it sorted assuming a is sorted.\n\n If x is already in a, insert it to the left of the leftmost x.\n\n Optional args lo (default 0) and hi (default len(a)) bound the\n slice of a to be searched.\n """\n\n if lo < 0:\n raise ValueError(\'lo must be non-negative\')\n if hi is None:\n hi = len(a)\n while lo < hi:\n mid = (lo+hi)//2\n if a[mid] < x: lo = mid+1\n else: hi = mid\n a.insert(lo, x)\n\n\ndef bisect_left(a, x, lo=0, hi=None):\n """Return the index where to insert item x in list a, assuming a is sorted.\n\n The return value i is such that all e in a[:i] have e < x, and all e in\n a[i:] have e >= x. So if x already appears in the list, a.insert(x) will\n insert just before the leftmost x already there.\n\n Optional args lo (default 0) and hi (default len(a)) bound the\n slice of a to be searched.\n """\n\n if lo < 0:\n raise ValueError(\'lo must be non-negative\')\n if hi is None:\n hi = len(a)\n while lo < hi:\n mid = (lo+hi)//2\n if a[mid] < x: lo = mid+1\n else: hi = mid\n return lo\n\n# Overwrite above definitions with a fast C implementation\ntry:\n from _bisect import *\nexcept ImportError:\n pass\n\n# Create aliases\nbisect = bisect_right\ninsort = insort_right\n',"src/lib/bsddb/__init__.py":'raise NotImplementedError("bsddb is not yet implemented in Skulpt")\n',"src/lib/cProfile.py":'raise NotImplementedError("cProfile is not yet implemented in Skulpt")\n',"src/lib/calendar.py":'raise NotImplementedError("calendar is not yet implemented in Skulpt")\n',"src/lib/cgi.py":'raise NotImplementedError("cgi is not yet implemented in Skulpt")\n',"src/lib/cgitb.py":'raise NotImplementedError("cgitb is not yet implemented in Skulpt")\n',"src/lib/chunk.py":'raise NotImplementedError("chunk is not yet implemented in Skulpt")\n',"src/lib/cmd.py":'raise NotImplementedError("cmd is not yet implemented in Skulpt")\n',"src/lib/code.py":'raise NotImplementedError("code is not yet implemented in Skulpt")\n',"src/lib/codecs.py":'raise NotImplementedError("codecs is not yet implemented in Skulpt")\n',"src/lib/codeop.py":'raise NotImplementedError("codeop is not yet implemented in Skulpt")\n',"src/lib/collections.js":'function $builtinmodule(){const a={};return Sk.misceval.chain(Sk.importModule("keyword",!1,!0),b=>(a._iskeyword=b.$d.iskeyword,Sk.importModule("itertools",!1,!0)),b=>(a._chain=b.$d.chain,a._starmap=b.$d.starmap,a._repeat=b.$d.repeat,Sk.importModule("operator",!1,!0)),b=>{a._itemgetter=b.$d.itemgetter},()=>collections_mod(a))}function collections_mod(a){function counterNumberSlot(b){return function(c){if(void 0!==c&&!(c instanceof a.Counter))return Sk.builtin.NotImplemented.NotImplemented$;const d=new a.Counter;return b.call(this,d,c),d}}function counterInplaceSlot(a,b){return function(c){if(!(c instanceof Sk.builtin.dict))throw new Sk.builtin.TypeError("Counter "+a+"= "+Sk.abstr.typeName(c)+" is not supported");return b.call(this,c),this.keep$positive()}}function namedtuple(b,c,d,l,m){function _make(a,b){return a.prototype.tp$new(Sk.misceval.arrayFromIterable(b))}function _asdict(a){const b=[];for(let c=0;c<a._fields.v.length;c++)b.push(a._fields.v[c]),b.push(a.v[c]);return new Sk.builtin.dict(b)}function _replace(a,b){a=new Sk.builtin.dict(a);const c=a.tp$getattr(new Sk.builtin.str("pop")),d=Sk.abstr.gattr(b,new Sk.builtin.str("_make")),e=Sk.misceval.callsimArray,f=e(d,[e(Sk.builtin.map_,[c,r,b])]);if(a.sq$length()){const b=a.sk$asarray();throw new Sk.builtin.ValueError("Got unexpectd field names: ["+b.map(a=>"\'"+a.$jsstr()+"\'")+"]")}return f}if(b=b.tp$str(),Sk.misceval.isTrue(Sk.misceval.callsimArray(a._iskeyword,[b])))throw new Sk.builtin.ValueError("Type names and field names cannot be a keyword: \'"+Sk.misceval.objectRepr(b)+"\'");const n=b.$jsstr();if(e.test(n)||!g.test(n)||!n)throw new Sk.builtin.ValueError("Type names and field names must be valid identifiers: \'"+n+"\'");let o,p;if(Sk.builtin.checkString(c))o=c.$jsstr().replace(h," ").split(j),1==o.length&&""===o[0]&&(o=[]),p=o.map(a=>new Sk.builtin.str(a));else{o=[],p=[];for(let a=Sk.abstr.iter(c),b=a.tp$iternext();void 0!==b;b=a.tp$iternext())b=b.tp$str(),p.push(b),o.push(b.$jsstr())}let q=new Set;if(Sk.misceval.isTrue(d))for(i=0;i<o.length;i++)(Sk.misceval.isTrue(Sk.misceval.callsimArray(a._iskeyword,[p[i]]))||f.test(o[i])||!g.test(o[i])||!o[i]||q.has(o[i]))&&(o[i]="_"+i,p[i]=new Sk.builtin.str("_"+i)),q.add(o[i]);else for(i=0;i<o.length;i++){if(Sk.misceval.isTrue(Sk.misceval.callsimArray(a._iskeyword,[p[i]])))throw new Sk.builtin.ValueError("Type names and field names cannot be a keyword: \'"+o[i]+"\'");else if(f.test(o[i]))throw new Sk.builtin.ValueError("Field names cannot start with an underscore: \'"+o[i]+"\'");else if(!g.test(o[i])||!o[i])throw new Sk.builtin.ValueError("Type names and field names must be valid identifiers: \'"+o[i]+"\'");else if(q.has(o[i]))throw new Sk.builtin.ValueError("Encountered duplicate field name: \'"+o[i]+"\'");q.add(o[i])}const r=new Sk.builtin.tuple(p),s=[];let t=[];if(!Sk.builtin.checkNone(l)){if(t=Sk.misceval.arrayFromIterable(l),t.length>o.length)throw new Sk.builtin.TypeError("Got more default values than field names");for(let a=0,b=p.length-t.length;b<p.length;a++,b++)s.push(p[b]),s.push(t[a])}const u=new Sk.builtin.dict(s);_make.co_varnames=["_cls","iterable"],_asdict.co_varnames=["self"],_replace.co_kwargs=1,_replace.co_varnames=["_self"];const v={};for(let e=0;e<o.length;e++)v[p[e].$mangled]=new Sk.builtin.property(new a._itemgetter([new Sk.builtin.int_(e)]),void 0,void 0,new Sk.builtin.str("Alias for field number "+e));return Sk.abstr.buildNativeClass(n,{constructor:function NamedTuple(){},base:Sk.builtin.tuple,slots:{tp$doc:n+"("+o.join(", ")+")",tp$new(a,b){a=Sk.abstr.copyKeywordsToNamedArgs("__new__",o,a,b,t);const c=new this.constructor;return Sk.builtin.tuple.call(c,a),c},$r(){const a=this.v.map((a,b)=>o[b]+"="+Sk.misceval.objectRepr(a));return new Sk.builtin.str(Sk.abstr.typeName(this)+"("+a.join(", ")+")")}},proto:Object.assign({__module__:Sk.builtin.checkNone(m)?Sk.globals.__name__:m,__slots__:new Sk.builtin.tuple,_fields:r,_field_defaults:u,_make:new Sk.builtin.classmethod(new Sk.builtin.func(_make)),_asdict:new Sk.builtin.func(_asdict),_replace:new Sk.builtin.func(_replace)},v)})}a.__all__=new Sk.builtin.list(["deque","defaultdict","namedtuple","Counter","OrderedDict"].map(a=>new Sk.builtin.str(a))),a.defaultdict=Sk.abstr.buildNativeClass("collections.defaultdict",{constructor:function defaultdict(a,b){this.default_factory=a,Sk.builtin.dict.call(this,b)},base:Sk.builtin.dict,methods:{copy:{$meth(){return this.$copy()},$flags:{NoArgs:!0}},__copy__:{$meth(){return this.$copy()},$flags:{NoArgs:!0}},__missing__:{$meth(a){if(Sk.builtin.checkNone(this.default_factory))throw new Sk.builtin.KeyError(Sk.misceval.objectRepr(a));else{const b=Sk.misceval.callsimArray(this.default_factory,[]);return this.mp$ass_subscript(a,b),b}},$flags:{OneArg:!0}}},getsets:{default_factory:{$get(){return this.default_factory},$set(a){a=a||Sk.builtin.none.none$,this.default_factory=a}}},slots:{tp$doc:"defaultdict(default_factory[, ...]) --\x3e dict with default factory\\n\\nThe default factory is called without arguments to produce\\na new value when a key is not present, in __getitem__ only.\\nA defaultdict compares equal to a dict with the same items.\\nAll remaining arguments are treated the same as if they were\\npassed to the dict constructor, including keyword arguments.\\n",tp$init(a,b){const c=a.shift();if(void 0===c)this.default_factory=Sk.builtin.none.none$;else if(!Sk.builtin.checkCallable(c)&&!Sk.builtin.checkNone(c))throw new Sk.builtin.TypeError("first argument must be callable");else this.default_factory=c;return Sk.builtin.dict.prototype.tp$init.call(this,a,b)},$r(){const a=Sk.misceval.objectRepr(this.default_factory),b=Sk.builtin.dict.prototype.$r.call(this).v;return new Sk.builtin.str("defaultdict("+a+", "+b+")")}},proto:{$copy(){const b=[];return Sk.misceval.iterFor(Sk.abstr.iter(this),a=>{b.push(a),b.push(this.mp$subscript(a))}),new a.defaultdict(this.default_factory,b)}}}),a.Counter=Sk.abstr.buildNativeClass("Counter",{constructor:function Counter(){this.$d=new Sk.builtin.dict,Sk.builtin.dict.apply(this)},base:Sk.builtin.dict,methods:{elements:{$flags:{NoArgs:!0},$meth(){const b=a._chain.tp$getattr(new Sk.builtin.str("from_iterable")),c=a._starmap,d=a._repeat,e=Sk.misceval.callsimArray;return e(b,[e(c,[d,e(this.tp$getattr(this.str$items))])])}},most_common:{$flags:{NamedArgs:["n"],Defaults:[Sk.builtin.none.none$]},$meth(a){length=this.sq$length(),Sk.builtin.checkNone(a)?a=length:(a=Sk.misceval.asIndexOrThrow(a),a=a>length?length:0>a?0:a);const b=this.$items().sort((c,a)=>Sk.misceval.richCompareBool(c[1],a[1],"Lt")?1:Sk.misceval.richCompareBool(c[1],a[1],"Gt")?-1:0);return new Sk.builtin.list(b.slice(0,a).map(a=>new Sk.builtin.tuple(a)))}},update:{$flags:{FastCall:!0},$meth(a,b){return Sk.abstr.checkArgsLen("update",a,0,1),this.counter$update(a,b)}},subtract:{$flags:{FastCall:!0},$meth(a,b){Sk.abstr.checkArgsLen("subtract",a,0,1);const c=a[0];if(void 0!==c)if(c instanceof Sk.builtin.dict)for(let a=Sk.abstr.iter(c),b=a.tp$iternext();void 0!==b;b=a.tp$iternext()){const a=this.mp$subscript(b);this.mp$ass_subscript(b,Sk.abstr.numberBinOp(a,c.mp$subscript(b),"Sub"))}else for(iter=Sk.abstr.iter(c),k=iter.tp$iternext();void 0!==k;k=iter.tp$iternext()){const a=this.mp$subscript(k);this.mp$ass_subscript(k,Sk.abstr.numberBinOp(a,this.$one,"Sub"))}b=b||[];for(let c=0;c<b.length;c+=2){const a=new Sk.builtin.str(b[c]),d=this.mp$subscript(a);this.mp$ass_subscript(a,Sk.abstr.numberBinOp(d,b[c+1],"Sub"))}return Sk.builtin.none.none$}},__missing__:{$meth(){return this.$zero},$flags:{OneArg:!0}},copy:{$meth(){return Sk.misceval.callsimArray(a.Counter,[this])},$flags:{NoArgs:!0}}},getsets:{__dict__:Sk.generic.getSetDict},slots:{tp$doc:"Dict subclass for counting hashable items. Sometimes called a bag\\n or multiset. Elements are stored as dictionary keys and their counts\\n are stored as dictionary values.\\n\\n >>> c = Counter(\'abcdeabcdabcaba\') # count elements from a string\\n\\n >>> c.most_common(3) # three most common elements\\n [(\'a\', 5), (\'b\', 4), (\'c\', 3)]\\n >>> sorted(c) # list all unique elements\\n [\'a\', \'b\', \'c\', \'d\', \'e\']\\n >>> \'\'.join(sorted(c.elements())) # list elements with repetitions\\n \'aaaaabbbbcccdde\'\\n >>> sum(c.values()) # total of all counts\\n 15\\n\\n >>> c[\'a\'] # count of letter \'a\'\\n 5\\n >>> for elem in \'shazam\': # update counts from an iterable\\n ... c[elem] += 1 # by adding 1 to each element\'s count\\n >>> c[\'a\'] # now there are seven \'a\'\\n 7\\n >>> del c[\'b\'] # remove all \'b\'\\n >>> c[\'b\'] # now there are zero \'b\'\\n 0\\n\\n >>> d = Counter(\'simsalabim\') # make another counter\\n >>> c.update(d) # add in the second counter\\n >>> c[\'a\'] # now there are nine \'a\'\\n 9\\n\\n >>> c.clear() # empty the counter\\n >>> c\\n Counter()\\n\\n Note: If a count is set to zero or reduced to zero, it will remain\\n in the counter until the entry is deleted or the counter is cleared:\\n\\n >>> c = Counter(\'aaabbc\')\\n >>> c[\'b\'] -= 2 # reduce the count of \'b\' by two\\n >>> c.most_common() # \'b\' is still in, but its count is zero\\n [(\'a\', 3), (\'c\', 1), (\'b\', 0)]\\n\\n",tp$init(a,b){return Sk.abstr.checkArgsLen(this.tpjs_name,a,0,1),this.counter$update(a,b)},$r(){const a=0<this.size?Sk.builtin.dict.prototype.$r.call(this).v:"";return new Sk.builtin.str(Sk.abstr.typeName(this)+"("+a+")")},tp$as_sequence_or_mapping:!0,mp$ass_subscript(a,b){return void 0===b?this.mp$lookup(a)&&Sk.builtin.dict.prototype.mp$ass_subscript.call(this,a,b):Sk.builtin.dict.prototype.mp$ass_subscript.call(this,a,b)},tp$as_number:!0,nb$positive:counterNumberSlot(function(a){this.$items().forEach(([b,c])=>{Sk.misceval.richCompareBool(c,this.$zero,"Gt")&&a.mp$ass_subscript(b,c)})}),nb$negative:counterNumberSlot(function(a){this.$items().forEach(([b,c])=>{Sk.misceval.richCompareBool(c,this.$zero,"Lt")&&a.mp$ass_subscript(b,Sk.abstr.numberBinOp(this.$zero,c,"Sub"))})}),nb$subtract:counterNumberSlot(function(a,b){this.$items().forEach(([c,d])=>{const e=Sk.abstr.numberBinOp(d,b.mp$subscript(c),"Sub");Sk.misceval.richCompareBool(e,this.$zero,"Gt")&&a.mp$ass_subscript(c,e)}),b.$items().forEach(([b,c])=>{void 0===this.mp$lookup(b)&&Sk.misceval.richCompareBool(c,this.$zero,"Lt")&&a.mp$ass_subscript(b,Sk.abstr.numberBinOp(this.$zero,c,"Sub"))})}),nb$add:counterNumberSlot(function(a,b){this.$items().forEach(([c,d])=>{const e=Sk.abstr.numberBinOp(d,b.mp$subscript(c),"Add");Sk.misceval.richCompareBool(e,this.$zero,"Gt")&&a.mp$ass_subscript(c,e)}),b.$items().forEach(([b,c])=>{void 0===this.mp$lookup(b)&&Sk.misceval.richCompareBool(c,this.$zero,"Gt")&&a.mp$ass_subscript(b,c)})}),nb$inplace_add:counterInplaceSlot("+",function(a){a.$items().forEach(([a,b])=>{const c=Sk.abstr.numberInplaceBinOp(this.mp$subscript(a),b,"Add");this.mp$ass_subscript(a,c)})}),nb$inplace_subtract:counterInplaceSlot("-",function(a){a.$items().forEach(([a,b])=>{const c=Sk.abstr.numberInplaceBinOp(this.mp$subscript(a),b,"Sub");this.mp$ass_subscript(a,c)})}),nb$or:counterNumberSlot(function(a,b){this.$items().forEach(([c,d])=>{const e=b.mp$subscript(c),f=Sk.misceval.richCompareBool(d,e,"Lt")?e:d;Sk.misceval.richCompareBool(f,this.$zero,"Gt")&&a.mp$ass_subscript(c,f)}),b.$items().forEach(([b,c])=>{void 0===this.mp$lookup(b)&&Sk.misceval.richCompareBool(c,this.$zero,"Gt")&&a.mp$ass_subscript(b,c)})}),nb$and:counterNumberSlot(function(a,b){this.$items().forEach(([c,d])=>{const e=b.mp$subscript(c),f=Sk.misceval.richCompareBool(d,e,"Lt")?d:e;Sk.misceval.richCompareBool(f,this.$zero,"Gt")&&a.mp$ass_subscript(c,f)})}),nb$inplace_and:counterInplaceSlot("&",function(a){this.$items().forEach(([b,c])=>{const d=a.mp$subscript(b);Sk.misceval.richCompareBool(d,c,"Lt")&&this.mp$ass_subscript(b,d)})}),nb$inplace_or:counterInplaceSlot("|",function(a){a.$items().forEach(([a,b])=>{Sk.misceval.richCompareBool(b,this.mp$subscript(a),"Gt")&&this.mp$ass_subscript(a,b)})}),nb$reflected_and:null,nb$reflected_or:null,nb$reflected_add:null,nb$reflected_subtract:null},proto:{keep$positive(){return this.$items().forEach(([a,b])=>{Sk.misceval.richCompareBool(b,this.$zero,"LtE")&&this.mp$ass_subscript(a)}),this},$zero:new Sk.builtin.int_(0),$one:new Sk.builtin.int_(1),str$items:new Sk.builtin.str("items"),counter$update(a,b){const c=a[0];if(void 0!==c)if(!Sk.builtin.checkMapping(c))for(let a=Sk.abstr.iter(c),b=a.tp$iternext();void 0!==b;b=a.tp$iternext()){const a=this.mp$subscript(b);this.mp$ass_subscript(b,Sk.abstr.numberBinOp(a,this.$one,"Add"))}else if(!this.sq$length())this.update$common(a,void 0,"update");else for(let a=Sk.abstr.iter(c),b=a.tp$iternext();void 0!==b;b=a.tp$iternext()){const a=this.mp$subscript(b);this.mp$ass_subscript(b,Sk.abstr.numberBinOp(a,c.mp$subscript(b),"Add"))}if(b&&b.length)if(!this.sq$length())this.update$common([],b,"update");else for(let a=0;a<b.length;a+=2){const c=new Sk.builtin.str(b[a]),d=this.mp$subscript(c);this.mp$ass_subscript(c,Sk.abstr.numberBinOp(d,b[a+1],"Add"))}return Sk.builtin.none.none$}},classmethods:{fromkeys:{$meth:function fromkeys(){throw new Sk.builtin.NotImplementedError("Counter.fromkeys() is undefined. Use Counter(iterable) instead.")},$flags:{MinArgs:1,MaxArgs:2}}}});const b=Sk.abstr.buildIteratorClass("odict_iterator",{constructor:function odict_iter_(a){this.$index=0,this.$seq=a.sk$asarray(),this.$orig=a},iternext:Sk.generic.iterNextWithArrayCheckSize,flags:{sk$acceptable_as_base_class:!1}});a.OrderedDict=Sk.abstr.buildNativeClass("OrderedDict",{constructor:function OrderedDict(){return this.orderedkeys=[],Sk.builtin.dict.call(this),this},base:Sk.builtin.dict,slots:{tp$as_sequence_or_mapping:!0,tp$init(a,b){Sk.abstr.checkArgsLen("OrderedDict",a,0,1),a.unshift(this),res=Sk.misceval.callsimArray(this.update,a,b)},tp$doc:"Dictionary that remembers insertion order",$r(){let a,b;const c=[];for(let b=this.tp$iter(),d=b.tp$iternext();void 0!==d;d=b.tp$iternext())a=this.mp$subscript(d),void 0===a&&(a=null),c.push("("+Sk.misceval.objectRepr(d)+", "+Sk.misceval.objectRepr(a)+")");return b=c.join(", "),0<c.length&&(b="["+b+"]"),new Sk.builtin.str("OrderedDict("+b+")")},tp$richcompare(b,c){if("Eq"!=c&&"Ne"!=c)return Sk.builtin.NotImplemented.NotImplemented$;const d="Eq"==c;if(!(b instanceof a.OrderedDict))return Sk.builtin.dict.prototype.tp$richcompare.call(this,b,c);const e=this.size,f=b.size;if(e!==f)return!d;for(let a=this.tp$iter(),e=b.tp$iter(),f=a.tp$iternext(),g=e.tp$iternext();void 0!==f;f=a.tp$iternext(),g=e.tp$iternext()){if(!Sk.misceval.isTrue(Sk.misceval.richCompareBool(f,g,"Eq")))return!d;const a=this.mp$subscript(f),c=b.mp$subscript(g);if(!Sk.misceval.isTrue(Sk.misceval.richCompareBool(a,c,"Eq")))return!d}return d},mp$ass_subscript(a,b){if(void 0===b){const b=this.pop$item(a);if(void 0===b)throw new Sk.builtin.KeyError(a)}else this.set$item(a,b)},tp$iter(){return new b(this)}},methods:{pop:{$flags:{NamedArgs:["key","default"],Defaults:[null]},$meth(a,b){return null===b?Sk.misceval.callsimArray(Sk.builtin.dict.prototype.pop,[this,a]):Sk.misceval.callsimArray(Sk.builtin.dict.prototype.pop,[this,a,b])}},popitem:{$flags:{NamedArgs:["last"],Defaults:[Sk.builtin.bool.true$]},$meth(a){let b,c;if(!this.orderedkeys.length)throw new Sk.builtin.KeyError("dictionary is empty");return b=this.orderedkeys[0],Sk.misceval.isTrue(a)&&(b=this.orderedkeys[this.orderedkeys.length-1]),c=Sk.misceval.callsimArray(this.pop,[this,b]),new Sk.builtin.tuple([b,c])}},move_to_end:{$flags:{NamedArgs:["key","last"],Defaults:[Sk.builtin.bool.true$]},$meth(a,b){let c,d=-1;for(let e=0;e<this.orderedkeys.length;e++)if(c=this.orderedkeys[e],c===a||Sk.misceval.richCompareBool(c,a,"Eq")){d=e;break}if(-1!==d)this.orderedkeys.splice(d,1);else throw new Sk.builtin.KeyError(a);return Sk.misceval.isTrue(b)?this.orderedkeys.push(a):this.orderedkeys.unshift(a),Sk.builtin.none.none$}}},proto:{sk$asarray(){return this.orderedkeys.slice(0)},set$item(a,b){const c=this.orderedkeys.indexOf(a);-1==c&&this.orderedkeys.push(a),Sk.builtin.dict.prototype.set$item.call(this,a,b)},pop$item(a){var b=this.orderedkeys.indexOf(a);if(-1!=b)return this.orderedkeys.splice(b,1),Sk.builtin.dict.prototype.pop$item.call(this,a)}}}),a.deque=Sk.abstr.buildNativeClass("collections.deque",{constructor:function deque(a,b,c,d,e){this.head=c||0,this.tail=d||0,this.mask=e||1,this.maxlen=b,this.v=a||[,,]},slots:{tp$doc:"deque([iterable[, maxlen]]) --\x3e deque object\\n\\nA list-like sequence optimized for data accesses near its endpoints.",tp$hash:Sk.builtin.none.none$,tp$new:Sk.generic.new,tp$init(a,b){if([iterable,maxlen]=Sk.abstr.copyKeywordsToNamedArgs("deque",["iterable","maxlen"],a,b),void 0!==maxlen&&!Sk.builtin.checkNone(maxlen))if(maxlen=Sk.misceval.asIndexSized(maxlen,Sk.builtin.OverflowError,"an integer is required"),0>maxlen)throw new Sk.builtin.ValueError("maxlen must be non-negative");else this.maxlen=maxlen;this.$clear(),void 0!==iterable&&this.$extend(iterable)},tp$getattr:Sk.generic.getAttr,tp$richcompare(b,c){var d=Math.max;if(this===b&&Sk.misceval.opAllowsEquality(c))return!0;if(!(b instanceof a.deque))return Sk.builtin.NotImplemented.NotImplemented$;const e=b,f=this.v;b=b.v;const g=this.tail-this.head&this.mask,h=e.tail-e.head&e.mask;let j,l=d(g,h);if(g===h)for(l=0;l<g&&l<h&&(j=Sk.misceval.richCompareBool(f[this.head+l&this.mask],b[e.head+l&e.mask],"Eq"),!!j);++l);if(l>=g||l>=h)switch(c){case"Lt":return g<h;case"LtE":return g<=h;case"Eq":return g===h;case"NotEq":return g!==h;case"Gt":return g>h;case"GtE":return g>=h;}return"Eq"!==c&&("NotEq"===c||Sk.misceval.richCompareBool(f[this.head+l&this.mask],b[e.head+l&e.mask],c))},tp$iter(){return new c(this)},$r(){const a=[],b=this.tail-this.head&this.mask;if(this.$entered_repr)return new Sk.builtin.str("[...]");this.$entered_repr=!0;for(let c=0;c<b;c++)a.push(Sk.misceval.objectRepr(this.v[this.head+c&this.mask]));const c=Sk.abstr.typeName(this);return void 0===this.maxlen?(this.$entered_repr=void 0,new Sk.builtin.str(c+"(["+a.filter(Boolean).join(", ")+"])")):new Sk.builtin.str(c+"(["+a.filter(Boolean).join(", ")+"], maxlen="+this.maxlen+")")},tp$as_number:!0,nb$bool(){return 0!=(this.tail-this.head&this.mask)},tp$as_sequence_or_mapping:!0,sq$contains(a){for(let b=this.tp$iter(),c=b.tp$iternext();void 0!==c;c=b.tp$iternext())if(Sk.misceval.richCompareBool(c,a,"Eq"))return!0;return!1},sq$concat(b){if(!(b instanceof a.deque))throw new Sk.builtin.TypeError("can only concatenate deque (not \'"+Sk.abstr.typeName(b)+"\') to deque");const c=this.$copy();for(let a=b.tp$iter(),d=a.tp$iternext();void 0!==d;d=a.tp$iternext())c.$push(d);return c},sq$length(){return this.tail-this.head&this.mask},sq$repeat(a){a=Sk.misceval.asIndexOrThrow(a,"can\'t multiply sequence by non-int of type \'{tp$name}\'");const b=this.tail-this.head&this.mask,c=this.$copy();let d;0>=a&&c.$clear();for(let e=1;e<a;e++)for(let a=0;a<b;a++)d=this.head+a&this.mask,c.$push(this.v[d]);return c},mp$subscript(a){a=Sk.misceval.asIndexOrThrow(a);const b=this.tail-this.head&this.mask;if(a>=b||a<-b)throw new Sk.builtin.IndexError("deque index out of range");const c=(0<=a?this.head:this.tail)+a&this.mask;return this.v[c]},mp$ass_subscript(a,b){a=Sk.misceval.asIndexOrThrow(a);const c=this.tail-this.head&this.mask;if(a>=c||a<-c)throw new Sk.builtin.IndexError("deque index out of range");void 0===b?this.del$item(a):this.set$item(a,b)},nb$inplace_add(a){for(this.maxlen=void 0,it=Sk.abstr.iter(a),i=it.tp$iternext();void 0!==i;i=it.tp$iternext())this.$push(i);return this},nb$inplace_multiply(a){a=Sk.misceval.asIndexSized(a,Sk.builtin.OverflowError,"can\'t multiply sequence by non-int of type \'{tp$name}\'"),0>=a&&this.$clear();const b=this.$copy(),c=this.tail-this.head&this.mask;for(let d=1;d<a;d++)for(let a=0;a<c;a++){const c=this.head+a&this.mask;b.$push(this.v[c])}return this.v=b.v,this.head=b.head,this.tail=b.tail,this.mask=b.mask,this}},methods:{append:{$meth(a){return this.$push(a),Sk.builtin.none.none$},$flags:{OneArg:!0},$textsig:null,$doc:"Add an element to the right side of the deque."},appendleft:{$meth(a){return this.$pushLeft(a),Sk.builtin.none.none$},$flags:{OneArg:!0},$textsig:null,$doc:"Add an element to the left side of the deque."},clear:{$meth(){return this.$clear(),Sk.builtin.none.none$},$flags:{NoArgs:!0},$textsig:null,$doc:"Remove all elements from the deque."},__copy__:{$meth(){return this.$copy()},$flags:{NoArgs:!0},$textsig:null,$doc:"Return a shallow copy of a deque."},copy:{$meth(){return this.$copy()},$flags:{NoArgs:!0},$textsig:null,$doc:"Return a shallow copy of a deque."},count:{$meth(a){const b=this.tail-this.head&this.mask;let c=0;for(let d=0;d<b;d++)Sk.misceval.richCompareBool(this.v[this.head+d&this.mask],a,"Eq")&&c++;return new Sk.builtin.int_(c)},$flags:{OneArg:!0},$textsig:null,$doc:"D.count(value) -> integer -- return number of occurrences of value"},extend:{$meth(a){return this.$extend(a),Sk.builtin.none.none$},$flags:{OneArg:!0},$textsig:null,$doc:"Extend the right side of the deque with elements from the iterable"},extendleft:{$meth(a){for(it=Sk.abstr.iter(a),i=it.tp$iternext();void 0!==i;i=it.tp$iternext())this.$pushLeft(i);return Sk.builtin.none.none$},$flags:{OneArg:!0},$textsig:null,$doc:"Extend the left side of the deque with elements from the iterable"},index:{$meth(a,b,c){const d=this.$index(a,b,c);if(void 0!==d)return new Sk.builtin.int_(d);throw new Sk.builtin.ValueError(Sk.misceval.objectRepr(a)+" is not in deque")},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"D.index(value, [start, [stop]]) -> integer -- return first index of value.\\nRaises ValueError if the value is not present."},insert:{$meth(a,b){a=Sk.misceval.asIndexOrThrow(a,"integer argument expected, got {tp$name}");const c=this.tail-this.head&this.mask;if(void 0!==this.maxlen&&c>=this.maxlen)throw new Sk.builtin.IndexError("deque already at its maximum size");a>c&&(a=c),a<=-c&&(a=0);const d=(0<=a?this.head:this.tail)+a&this.mask;let e=this.tail;for(this.tail=this.tail+1&this.mask;e!==d;){const a=e-1&this.mask;this.v[e]=this.v[a],e=a}return this.v[d]=b,this.head===this.tail&&this.$resize(this.v.length,this.v.length<<1),Sk.builtin.none.none$},$flags:{MinArgs:2,MaxArgs:2},$textsig:null,$doc:"D.insert(index, object) -- insert object before index"},pop:{$meth(){return this.$pop()},$flags:{NoArgs:!0},$textsig:null,$doc:"Remove and return the rightmost element."},popleft:{$meth(){return this.$popLeft()},$flags:{NoArgs:!0},$textsig:null,$doc:"Remove and return the leftmost element."},remove:{$meth(a){const b=this.$index(a);if(void 0===b)throw new Sk.builtin.ValueError(Sk.misceval.objectRepr(a)+" is not in deque");const c=this.head+b&this.mask;for(let b=c;b!==this.tail;){const a=b+1&this.mask;this.v[b]=this.v[a],b=a}this.tail=this.tail-1&this.mask;var d=this.tail-this.head&this.mask;d<this.mask>>>1&&this.$resize(d,this.v.length>>>1)},$flags:{OneArg:!0},$textsig:null,$doc:"D.remove(value) -- remove first occurrence of value."},__reversed__:{$meth(){return new d(this)},$flags:{NoArgs:!0},$textsig:null,$doc:"D.__reversed__() -- return a reverse iterator over the deque"},reverse:{$meth(){const c=this.head,d=this.tail,e=this.mask,f=this.tail-this.head&this.mask;for(let g=0;g<~~(f/2);g++){const f=d-g-1&e,a=c+g&e,b=this.v[f];this.v[f]=this.v[a],this.v[a]=b}return Sk.builtin.none.none$},$flags:{NoArgs:!0},$textsig:null,$doc:"D.reverse() -- reverse *IN PLACE*"},rotate:{$meth(a){a=void 0===a?1:Sk.misceval.asIndexSized(a,Sk.builtin.OverflowError);const c=this.head,d=this.tail;if(0===a||c===d)return this;if(this.head=c-a&this.mask,this.tail=d-a&this.mask,0<a)for(let e=1;e<=a;e++){const f=c-e&this.mask,a=d-e&this.mask;this.v[f]=this.v[a],this.v[a]=void 0}else for(let e=0;e>a;e--){const f=d-e&this.mask,a=c-e&this.mask;this.v[f]=this.v[a],this.v[a]=void 0}return Sk.builtin.none.none$},$flags:{MinArgs:0,MaxArgs:1},$textsig:null,$doc:"Rotate the deque n steps to the right (default n=1). If n is negative, rotates left."}},getsets:{maxlen:{$get(){return void 0===this.maxlen?Sk.builtin.none.none$:new Sk.builtin.int_(this.maxlen)},$doc:"maximum size of a deque or None if unbounded"}},proto:{$clear(){this.head=0,this.tail=0,this.mask=1,this.v=[,,]},$copy(){return new a.deque(this.v.slice(0),this.maxlen,this.head,this.tail,this.mask)},$extend(a){for(it=Sk.abstr.iter(a),i=it.tp$iternext();void 0!==i;i=it.tp$iternext())this.$push(i)},set$item(a,b){const c=(0<=a?this.head:this.tail)+a&this.mask;this.v[c]=b},del$item(a){const b=(0<=a?this.head:this.tail)+a&this.mask;for(let c=b;c!==this.tail;){const a=c+1&this.mask;this.v[c]=this.v[a],c=a}const c=this.tail-this.head&this.mask;this.tail=this.tail-1&this.mask,c<this.mask>>>1&&this.$resize(c,this.v.length>>>1)},$push(a){this.v[this.tail]=a,this.tail=this.tail+1&this.mask,this.head===this.tail&&this.$resize(this.v.length,this.v.length<<1);const b=this.tail-this.head&this.mask;return void 0!==this.maxlen&&b>this.maxlen&&this.$popLeft(),this},$pushLeft(a){this.head=this.head-1&this.mask,this.v[this.head]=a,this.head===this.tail&&this.$resize(this.v.length,this.v.length<<1);const b=this.tail-this.head&this.mask;return void 0!==this.maxlen&&b>this.maxlen&&this.$pop(),this},$pop(){if(this.head===this.tail)throw new Sk.builtin.IndexError("pop from an empty deque");this.tail=this.tail-1&this.mask;const a=this.v[this.tail];this.v[this.tail]=void 0;const b=this.tail-this.head&this.mask;return b<this.mask>>>1&&this.$resize(b,this.v.length>>>1),a},$popLeft(){if(this.head===this.tail)throw new Sk.builtin.IndexError("pop from an empty deque");const a=this.v[this.head];this.v[this.head]=void 0,this.head=this.head+1&this.mask;const b=this.tail-this.head&this.mask;return b<this.mask>>>1&&this.$resize(b,this.v.length>>>1),a},$resize(a,b){const c=this.head,d=this.mask;if(this.head=0,this.tail=a,this.mask=b-1,0===c)return void(this.v.length=b);const e=Array(b);for(let f=0;f<a;f++)e[f]=this.v[c+f&d];this.v=e},$index(a,b,c){const d=this.tail-this.head&this.mask;b=void 0===b?0:Sk.misceval.asIndexOrThrow(b),c=c===void 0?d:Sk.misceval.asIndexOrThrow(c);const e=this.head,f=this.mask,g=this.v,h=0<=b?b:b<-d?0:d+b;c=0<=c?c:c<-d?0:d+c;for(let d=h;d<c;d++)if(g[e+d&f]===a)return d},sk$asarray(){const a=[],b=this.tail-this.head&this.mask;for(let c=0;c<b;++c){const b=this.head+c&this.mask;a.push(this.v[b])}return a}}});const c=Sk.abstr.buildIteratorClass("_collections._deque_iterator",{constructor:function _deque_iterator(a){this.$index=0,this.dq=a.v,this.$length=a.tail-a.head&a.mask,this.$head=a.head,this.$tail=a.tail,this.$mask=a.mask},iternext(){if(!(this.$index>=this.$length)){const a=(0<=this.$index?this.$head:this.$tail)+this.$index&this.$mask;return this.$index++,this.dq[a]}},methods:{__length_hint__:{$meth:function __length_hint__(){return new Sk.builtin.int_(this.$length-this.$index)},$flags:{NoArgs:!0}}}}),d=Sk.abstr.buildIteratorClass("_collections._deque_reverse_iterator",{constructor:function _deque_reverse_iterator(a){this.$index=(a.tail-a.head&a.mask)-1,this.dq=a.v,this.$head=a.head,this.$mask=a.mask},iternext(){if(!(0>this.$index)){const a=this.$head+this.$index&this.$mask;return this.$index--,this.dq[a]}},methods:{__length_hint__:Sk.generic.iterReverseLengthHintMethodDef}}),e=new RegExp(/^[0-9].*/),f=new RegExp(/^[0-9_].*/),g=new RegExp(/^\\w*$/),h=/,/g,j=/\\s+/;return namedtuple.co_argcount=2,namedtuple.co_kwonlyargcount=3,namedtuple.$kwdefs=[Sk.builtin.bool.false$,Sk.builtin.none.none$,Sk.builtin.none.none$],namedtuple.co_varnames=["typename","field_names","rename","defaults","module"],a.namedtuple=new Sk.builtin.func(namedtuple),a}',"src/lib/colorsys.py":'raise NotImplementedError("colorsys is not yet implemented in Skulpt")\n',"src/lib/commands.py":'raise NotImplementedError("commands is not yet implemented in Skulpt")\n',"src/lib/compileall.py":'raise NotImplementedError("compileall is not yet implemented in Skulpt")\n',"src/lib/compiler/__init__.py":'raise NotImplementedError("compiler is not yet implemented in Skulpt")\n',"src/lib/config/__init__.py":'raise NotImplementedError("config is not yet implemented in Skulpt")\n',"src/lib/contextlib.py":'raise NotImplementedError("contextlib is not yet implemented in Skulpt")\n',"src/lib/cookielib.py":'raise NotImplementedError("cookielib is not yet implemented in Skulpt")\n',"src/lib/copy.py":'"""\nThis file was modified from CPython.\nCopyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,\n2011, 2012, 2013, 2014, 2015 Python Software Foundation; All Rights Reserved\n"""\nimport types\nclass Error(Exception):\n pass\nerror = Error \nclass _EmptyClass:\n pass\ntry:\n long\nexcept NameError:\n long = int\n\ndef copy(x):\n cls = type(x)\n if callable(x):\n return x\n copier = getattr(cls, "__copy__", None)\n if copier:\n return copier(x)\n if cls in (type(None), int, float, bool, str, tuple, type, frozenset, long):\n return x\n if (cls == list) or (cls == dict) or (cls == set) or (cls == slice):\n return cls(x)\n try:\n getstate = getattr(x, "__getstate__", None)\n setstate = getattr(x, "__setstate__", None)\n initargs = getattr(x, "__getinitargs__", None)\n except:\n reductor = False\n if getstate or setstate or initargs:\n raise NotImplementedError("Skulpt does not yet support copying with user-defined __getstate__, __setstate__ or __getinitargs__()")\n reductor = getattr(x, "__reduce_ex__", None)\n if reductor:\n rv = reductor(4)\n else:\n reductor = getattr(x, "__reduce__", None)\n if reductor:\n rv = reductor()\n elif str(cls)[1:6] == "class":\n copier = _copy_inst\n return copier(x)\n else:\n raise Error("un(shallow)copyable object of type %s" % cls)\n if isinstance(rv, str):\n return x\n return _reconstruct(x, rv, 0)\n\ndef _copy_inst(x):\n if hasattr(x, \'__copy__\'):\n return x.__copy__()\n if hasattr(x, \'__getinitargs__\'):\n args = x.__getinitargs__()\n y = x.__class__(*args)\n else:\n y = _EmptyClass()\n y.__class__ = x.__class__\n if hasattr(x, \'__getstate__\'):\n state = x.__getstate__()\n else:\n state = x.__dict__\n if hasattr(y, \'__setstate__\'):\n y.__setstate__(state)\n else:\n y.__dict__.update(state)\n return y\n\nd = _deepcopy_dispatch = {}\n\ndef deepcopy(x, memo=None, _nil=[]):\n """Deep copy operation on arbitrary Python objects.\n See the module\'s __doc__ string for more info.\n """\n if memo is None:\n memo = {}\n idx = id(x)\n y = memo.get(idx, _nil)\n if y is not _nil:\n return y\n cls = type(x)\n try:\n getstate = getattr(x, "__getstate__", None)\n setstate = getattr(x, "__setstate__", None)\n initargs = getattr(x, "__getinitargs__", None)\n except:\n reductor = False\n if getstate or setstate or initargs:\n raise NotImplementedError("Skulpt does not yet support copying with user-defined __getstate__, __setstate__ or __getinitargs__()")\n copier = _deepcopy_dispatch.get(cls)\n if copier:\n y = copier(x, memo)\n elif str(cls)[1:6] == "class":\n copier = _deepcopy_dispatch["InstanceType"]\n y = copier(x, memo)\n else:\n try:\n issc = issubclass(cls, type)\n except TypeError: # cls is not a class (old Boost; see SF #502085)\n issc = 0\n if issc:\n y = _deepcopy_atomic(x, memo)\n else:\n copier = getattr(x, "__deepcopy__", None)\n if copier:\n y = copier(memo)\n else:\n reductor = getattr(x, "__reduce_ex__", None)\n if reductor:\n rv = reductor(2)\n else:\n reductor = getattr(x, "__reduce__", None)\n if reductor:\n rv = reductor()\n else:\n raise Error(\n "un(deep)copyable object of type %s" % cls)\n y = _reconstruct(x, rv, 1, memo)\n memo[idx] = y\n _keep_alive(x, memo) # Make sure x lives at least as long as d\n return y\n\ndef _deepcopy_atomic(x, memo):\n return x\nd[type(None)] = _deepcopy_atomic\n# d[type(Ellipsis)] = _deepcopy_atomic\nd[type(NotImplemented)] = _deepcopy_atomic\nd[int] = _deepcopy_atomic\nd[float] = _deepcopy_atomic\nd[bool] = _deepcopy_atomic\nd[complex] = _deepcopy_atomic\n# d[bytes] = _deepcopy_atomic\nd[str] = _deepcopy_atomic\n# try:\n# d[types.CodeType] = _deepcopy_atomic\n# except AttributeError:\n# pass\nd[type] = _deepcopy_atomic\n# d[types.BuiltinFunctionType] = _deepcopy_atomic\nd[types.FunctionType] = _deepcopy_atomic\n# d[weakref.ref] = _deepcopy_atomic\n\ndef _deepcopy_list(x, memo):\n y = []\n memo[id(x)] = y\n for a in x:\n y.append(deepcopy(a, memo))\n return y\nd[list] = _deepcopy_list\n\ndef _deepcopy_set(x, memo):\n result = set([]) # make empty set\n memo[id(x)] = result # register this set in the memo for loop checking\n for a in x: # go through elements of set\n result.add(deepcopy(a, memo)) # add the copied elements into the new set\n return result # return the new set\nd[set] = _deepcopy_set\n\ndef _deepcopy_frozenset(x, memo):\n result = frozenset(_deepcopy_set(x,memo)) \n memo[id(x)] = result \n return result\nd[frozenset] = _deepcopy_frozenset\n\ndef _deepcopy_tuple(x, memo):\n y = [deepcopy(a, memo) for a in x]\n # We\'re not going to put the tuple in the memo, but it\'s still important we\n # check for it, in case the tuple contains recursive mutable structures.\n try:\n return memo[id(x)]\n except KeyError:\n pass\n for k, j in zip(x, y):\n if k is not j:\n y = tuple(y)\n break\n else:\n y = x\n return y\nd[tuple] = _deepcopy_tuple\n\ndef _deepcopy_dict(x, memo):\n y = {}\n memo[id(x)] = y\n for key, value in x.items():\n y[deepcopy(key, memo)] = deepcopy(value, memo)\n return y\nd[dict] = _deepcopy_dict\n\n# def _deepcopy_method(x, memo): # Copy instance methods\n# y = type(x)(x.im_func, deepcopy(x.im_self, memo), x.im_class);\n# return y\nd[types.MethodType] = _deepcopy_atomic\n\ndef _deepcopy_inst(x, memo):\n if hasattr(x, \'__deepcopy__\'):\n return x.__deepcopy__(memo)\n if hasattr(x, \'__getinitargs__\'):\n args = x.__getinitargs__()\n args = deepcopy(args, memo)\n y = x.__class__(*args)\n else:\n y = _EmptyClass()\n y.__class__ = x.__class__\n memo[id(x)] = y\n if hasattr(x, \'__getstate__\'):\n state = x.__getstate__()\n else:\n state = x.__dict__\n state = deepcopy(state, memo)\n if hasattr(y, \'__setstate__\'):\n y.__setstate__(state)\n else:\n y.__dict__.update(state)\n return y\nd["InstanceType"] = _deepcopy_inst\n\ndef _keep_alive(x, memo):\n """Keeps a reference to the object x in the memo.\n Because we remember objects by their id, we have\n to assure that possibly temporary objects are kept\n alive by referencing them.\n We store a reference at the id of the memo, which should\n normally not be used unless someone tries to deepcopy\n the memo itself...\n """\n try:\n memo[id(memo)].append(x)\n except KeyError:\n # aha, this is the first one :-)\n memo[id(memo)]=[x]\n\ndef _reconstruct(x, info, deep, memo=None):\n if isinstance(info, str):\n return x\n assert isinstance(info, tuple)\n if memo is None:\n memo = {}\n n = len(info)\n assert n in (2, 3, 4, 5)\n callable, args = info[:2]\n if n > 2:\n state = info[2]\n else:\n state = None\n if n > 3:\n listiter = info[3]\n else:\n listiter = None\n if n > 4:\n dictiter = info[4]\n else:\n dictiter = None\n if deep:\n args = deepcopy(args, memo)\n y = callable(*args)\n memo[id(x)] = y\n\n if state is not None:\n if deep:\n state = deepcopy(state, memo)\n if hasattr(y, \'__setstate__\'):\n y.__setstate__(state)\n else:\n if isinstance(state, tuple) and len(state) == 2:\n state, slotstate = state\n else:\n slotstate = None\n if state is not None:\n y.__dict__.update(state)\n if slotstate is not None:\n for key, value in slotstate.items():\n setattr(y, key, value)\n\n if listiter is not None:\n for item in listiter:\n if deep:\n item = deepcopy(item, memo)\n y.append(item)\n if dictiter is not None:\n for key, value in dictiter:\n if deep:\n key = deepcopy(key, memo)\n value = deepcopy(value, memo)\n y[key] = value\n return y\n\ndel d\n\ndel types\n\n# Helper for instance creation without calling __init__\nclass _EmptyClass:\n pass',"src/lib/copy_reg.py":'raise NotImplementedError("copy_reg is not yet implemented in Skulpt")\n',"src/lib/csv.py":'raise NotImplementedError("csv is not yet implemented in Skulpt")\n',"src/lib/ctypes/__init__.py":'raise NotImplementedError("ctypes is not yet implemented in Skulpt")\n',"src/lib/ctypes/macholib/__init__.py":'raise NotImplementedError("macholib is not yet implemented in Skulpt")\n',"src/lib/curses/__init__.py":'raise NotImplementedError("curses is not yet implemented in Skulpt")\n',"src/lib/datetime.py":'"""Concrete date/time and related types -- prototype implemented in Python.\n\nSee http://www.zope.org/Members/fdrake/DateTimeWiki/FrontPage\n\nSee also http://dir.yahoo.com/Reference/calendars/\n\nFor a primer on DST, including many current DST rules, see\nhttp://webexhibits.org/daylightsaving/\n\nFor more about DST than you ever wanted to know, see\nftp://elsie.nci.nih.gov/pub/\n\nSources for time zone and DST data: http://www.twinsun.com/tz/tz-link.htm\n\nThis was originally copied from the sandbox of the CPython CVS repository.\nThanks to Tim Peters for suggesting using it.\n\nThis was then copied from PyPy v5.1.0 into Skulpt by Meredydd Luff, removing\n\'from __future__ import division\' (and replacing division operators accordingly)\nand pickle support (which requires \'struct\', which Skulpt does not currently\n[as of 31/8/2016] have)\n"""\n\nimport time as _time\nimport math as _math\n\n# Python 2-vs-3 compat hack\nimport sys\nunicode = unicode if sys.version_info < (3,) else str\n\n_SENTINEL = object()\n\ndef _cmp(x, y):\n return 0 if x == y else 1 if x > y else -1\n\ndef _round(x):\n return int(_math.floor(x + 0.5) if x >= 0.0 else _math.ceil(x - 0.5))\n\nMINYEAR = 1\nMAXYEAR = 9999\n_MINYEARFMT = 1900\n\n_MAX_DELTA_DAYS = 999999999\n\n# Utility functions, adapted from Python\'s Demo/classes/Dates.py, which\n# also assumes the current Gregorian calendar indefinitely extended in\n# both directions. Difference: Dates.py calls January 1 of year 0 day\n# number 1. The code here calls January 1 of year 1 day number 1. This is\n# to match the definition of the "proleptic Gregorian" calendar in Dershowitz\n# and Reingold\'s "Calendrical Calculations", where it\'s the base calendar\n# for all computations. See the book for algorithms for converting between\n# proleptic Gregorian ordinals and many other calendar systems.\n\n_DAYS_IN_MONTH = [-1, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]\n\n_DAYS_BEFORE_MONTH = [-1]\ndbm = 0\nfor dim in _DAYS_IN_MONTH[1:]:\n _DAYS_BEFORE_MONTH.append(dbm)\n dbm += dim\ndel dbm, dim\n\ndef _is_leap(year):\n "year -> 1 if leap year, else 0."\n return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)\n\ndef _days_before_year(year):\n "year -> number of days before January 1st of year."\n y = year - 1\n return y*365 + y//4 - y//100 + y//400\n\ndef _days_in_month(year, month):\n "year, month -> number of days in that month in that year."\n assert 1 <= month <= 12, month\n if month == 2 and _is_leap(year):\n return 29\n return _DAYS_IN_MONTH[month]\n\ndef _days_before_month(year, month):\n "year, month -> number of days in year preceding first day of month."\n assert 1 <= month <= 12, \'month must be in 1..12\'\n return _DAYS_BEFORE_MONTH[month] + (month > 2 and _is_leap(year))\n\ndef _ymd2ord(year, month, day):\n "year, month, day -> ordinal, considering 01-Jan-0001 as day 1."\n assert 1 <= month <= 12, \'month must be in 1..12\'\n dim = _days_in_month(year, month)\n assert 1 <= day <= dim, (\'day must be in 1..%d\' % dim)\n return (_days_before_year(year) +\n _days_before_month(year, month) +\n day)\n\n_DI400Y = _days_before_year(401) # number of days in 400 years\n_DI100Y = _days_before_year(101) # " " " " 100 "\n_DI4Y = _days_before_year(5) # " " " " 4 "\n\n# A 4-year cycle has an extra leap day over what we\'d get from pasting\n# together 4 single years.\nassert _DI4Y == 4 * 365 + 1\n\n# Similarly, a 400-year cycle has an extra leap day over what we\'d get from\n# pasting together 4 100-year cycles.\nassert _DI400Y == 4 * _DI100Y + 1\n\n# OTOH, a 100-year cycle has one fewer leap day than we\'d get from\n# pasting together 25 4-year cycles.\nassert _DI100Y == 25 * _DI4Y - 1\n\n_US_PER_US = 1\n_US_PER_MS = 1000\n_US_PER_SECOND = 1000000\n_US_PER_MINUTE = 60000000\n_SECONDS_PER_DAY = 24 * 3600\n_US_PER_HOUR = 3600000000\n_US_PER_DAY = 86400000000\n_US_PER_WEEK = 604800000000\n\ndef _ord2ymd(n):\n "ordinal -> (year, month, day), considering 01-Jan-0001 as day 1."\n\n # n is a 1-based index, starting at 1-Jan-1. The pattern of leap years\n # repeats exactly every 400 years. The basic strategy is to find the\n # closest 400-year boundary at or before n, then work with the offset\n # from that boundary to n. Life is much clearer if we subtract 1 from\n # n first -- then the values of n at 400-year boundaries are exactly\n # those divisible by _DI400Y:\n #\n # D M Y n n-1\n # -- --- ---- ---------- ----------------\n # 31 Dec -400 -_DI400Y -_DI400Y -1\n # 1 Jan -399 -_DI400Y +1 -_DI400Y 400-year boundary\n # ...\n # 30 Dec 000 -1 -2\n # 31 Dec 000 0 -1\n # 1 Jan 001 1 0 400-year boundary\n # 2 Jan 001 2 1\n # 3 Jan 001 3 2\n # ...\n # 31 Dec 400 _DI400Y _DI400Y -1\n # 1 Jan 401 _DI400Y +1 _DI400Y 400-year boundary\n n -= 1\n n400, n = divmod(n, _DI400Y)\n year = n400 * 400 + 1 # ..., -399, 1, 401, ...\n\n # Now n is the (non-negative) offset, in days, from January 1 of year, to\n # the desired date. Now compute how many 100-year cycles precede n.\n # Note that it\'s possible for n100 to equal 4! In that case 4 full\n # 100-year cycles precede the desired day, which implies the desired\n # day is December 31 at the end of a 400-year cycle.\n n100, n = divmod(n, _DI100Y)\n\n # Now compute how many 4-year cycles precede it.\n n4, n = divmod(n, _DI4Y)\n\n # And now how many single years. Again n1 can be 4, and again meaning\n # that the desired day is December 31 at the end of the 4-year cycle.\n n1, n = divmod(n, 365)\n\n year += n100 * 100 + n4 * 4 + n1\n if n1 == 4 or n100 == 4:\n assert n == 0\n return year-1, 12, 31\n\n # Now the year is correct, and n is the offset from January 1. We find\n # the month via an estimate that\'s either exact or one too large.\n leapyear = n1 == 3 and (n4 != 24 or n100 == 3)\n assert leapyear == _is_leap(year)\n month = (n + 50) >> 5\n preceding = _DAYS_BEFORE_MONTH[month] + (month > 2 and leapyear)\n if preceding > n: # estimate is too large\n month -= 1\n preceding -= _DAYS_IN_MONTH[month] + (month == 2 and leapyear)\n n -= preceding\n assert 0 <= n < _days_in_month(year, month)\n\n # Now the year and month are correct, and n is the offset from the\n # start of that month: we\'re done!\n return year, month, n+1\n\n# Month and day names. For localized versions, see the calendar module.\n_MONTHNAMES = [None, "Jan", "Feb", "Mar", "Apr", "May", "Jun",\n "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]\n_DAYNAMES = [None, "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]\n\n\ndef _build_struct_time(y, m, d, hh, mm, ss, dstflag):\n wday = (_ymd2ord(y, m, d) + 6) % 7\n dnum = _days_before_month(y, m) + d\n return _time.struct_time((y, m, d, hh, mm, ss, wday, dnum, dstflag))\n\ndef _format_time(hh, mm, ss, us):\n # Skip trailing microseconds when us==0.\n result = "%02d:%02d:%02d" % (hh, mm, ss)\n if us:\n result += ".%06d" % us\n return result\n\n# Correctly substitute for %z and %Z escapes in strftime formats.\ndef _wrap_strftime(object, format, timetuple):\n year = timetuple[0]\n if year < _MINYEARFMT:\n raise ValueError("year=%d is before %d; the datetime strftime() "\n "methods require year >= %d" %\n (year, _MINYEARFMT, _MINYEARFMT))\n # Don\'t call utcoffset() or tzname() unless actually needed.\n freplace = None # the string to use for %f\n zreplace = None # the string to use for %z\n Zreplace = None # the string to use for %Z\n\n # Scan format for %z and %Z escapes, replacing as needed.\n newformat = []\n push = newformat.append\n i, n = 0, len(format)\n while i < n:\n ch = format[i]\n i += 1\n if ch == \'%\':\n if i < n:\n ch = format[i]\n i += 1\n if ch == \'f\':\n if freplace is None:\n freplace = \'%06d\' % getattr(object,\n \'microsecond\', 0)\n newformat.append(freplace)\n elif ch == \'z\':\n if zreplace is None:\n zreplace = ""\n if hasattr(object, "_utcoffset"):\n offset = object._utcoffset()\n if offset is not None:\n sign = \'+\'\n if offset < 0:\n offset = -offset\n sign = \'-\'\n h, m = divmod(offset, 60)\n zreplace = \'%c%02d%02d\' % (sign, h, m)\n assert \'%\' not in zreplace\n newformat.append(zreplace)\n elif ch == \'Z\':\n if Zreplace is None:\n Zreplace = ""\n if hasattr(object, "tzname"):\n s = object.tzname()\n if s is not None:\n # strftime is going to have at this: escape %\n Zreplace = s.replace(\'%\', \'%%\')\n newformat.append(Zreplace)\n else:\n push(\'%\')\n push(ch)\n else:\n push(\'%\')\n else:\n push(ch)\n newformat = "".join(newformat)\n return _time.strftime(newformat, timetuple)\n\n# Just raise TypeError if the arg isn\'t None or a string.\ndef _check_tzname(name):\n if name is not None and not isinstance(name, str):\n raise TypeError("tzinfo.tzname() must return None or string, "\n "not \'%s\'" % type(name))\n\n# name is the offset-producing method, "utcoffset" or "dst".\n# offset is what it returned.\n# If offset isn\'t None or timedelta, raises TypeError.\n# If offset is None, returns None.\n# Else offset is checked for being in range, and a whole # of minutes.\n# If it is, its integer value is returned. Else ValueError is raised.\ndef _check_utc_offset(name, offset):\n assert name in ("utcoffset", "dst")\n if offset is None:\n return\n if not isinstance(offset, timedelta):\n raise TypeError("tzinfo.%s() must return None "\n "or timedelta, not \'%s\'" % (name, type(offset)))\n days = offset.days\n if days < -1 or days > 0:\n offset = 1440 # trigger out-of-range\n else:\n seconds = days * 86400 + offset.seconds\n minutes, seconds = divmod(seconds, 60)\n if seconds or offset.microseconds:\n raise ValueError("tzinfo.%s() must return a whole number "\n "of minutes" % name)\n offset = minutes\n if not -1440 < offset < 1440:\n raise ValueError("%s()=%d, must be in -1439..1439" % (name, offset))\n return offset\n\ndef _check_int_field(value):\n if isinstance(value, int):\n return int(value)\n if not isinstance(value, float):\n try:\n value = value.__int__()\n except AttributeError:\n pass\n else:\n if isinstance(value, int):\n return int(value)\n raise TypeError(\'__int__ method should return an integer\')\n raise TypeError(\'an integer is required\')\n raise TypeError(\'integer argument expected, got float\')\n\ndef _check_date_fields(year, month, day):\n year = _check_int_field(year)\n month = _check_int_field(month)\n day = _check_int_field(day)\n if not MINYEAR <= year <= MAXYEAR:\n raise ValueError(\'year must be in %d..%d\' % (MINYEAR, MAXYEAR), year)\n if not 1 <= month <= 12:\n raise ValueError(\'month must be in 1..12\', month)\n dim = _days_in_month(year, month)\n if not 1 <= day <= dim:\n raise ValueError(\'day must be in 1..%d\' % dim, day)\n return year, month, day\n\ndef _check_time_fields(hour, minute, second, microsecond):\n hour = _check_int_field(hour)\n minute = _check_int_field(minute)\n second = _check_int_field(second)\n microsecond = _check_int_field(microsecond)\n if not 0 <= hour <= 23:\n raise ValueError(\'hour must be in 0..23\', hour)\n if not 0 <= minute <= 59:\n raise ValueError(\'minute must be in 0..59\', minute)\n if not 0 <= second <= 59:\n raise ValueError(\'second must be in 0..59\', second)\n if not 0 <= microsecond <= 999999:\n raise ValueError(\'microsecond must be in 0..999999\', microsecond)\n return hour, minute, second, microsecond\n\ndef _check_tzinfo_arg(tz):\n if tz is not None and not isinstance(tz, tzinfo):\n raise TypeError("tzinfo argument must be None or of a tzinfo subclass")\n\n\n# Notes on comparison: In general, datetime module comparison operators raise\n# TypeError when they don\'t know how to do a comparison themself. If they\n# returned NotImplemented instead, comparison could (silently) fall back to\n# the default compare-objects-by-comparing-their-memory-addresses strategy,\n# and that\'s not helpful. There are two exceptions:\n#\n# 1. For date and datetime, if the other object has a "timetuple" attr,\n# NotImplemented is returned. This is a hook to allow other kinds of\n# datetime-like objects a chance to intercept the comparison.\n#\n# 2. Else __eq__ and __ne__ return False and True, respectively. This is\n# so opertaions like\n#\n# x == y\n# x != y\n# x in sequence\n# x not in sequence\n# dict[x] = y\n#\n# don\'t raise annoying TypeErrors just because a datetime object\n# is part of a heterogeneous collection. If there\'s no known way to\n# compare X to a datetime, saying they\'re not equal is reasonable.\n\ndef _cmperror(x, y):\n raise TypeError("can\'t compare \'%s\' to \'%s\'" % (\n type(x).__name__, type(y).__name__))\n\ndef _normalize_pair(hi, lo, factor):\n if not 0 <= lo <= factor-1:\n inc, lo = divmod(lo, factor)\n hi += inc\n return hi, lo\n\ndef _normalize_datetime(y, m, d, hh, mm, ss, us, ignore_overflow=False):\n # Normalize all the inputs, and store the normalized values.\n ss, us = _normalize_pair(ss, us, 1000000)\n mm, ss = _normalize_pair(mm, ss, 60)\n hh, mm = _normalize_pair(hh, mm, 60)\n d, hh = _normalize_pair(d, hh, 24)\n y, m, d = _normalize_date(y, m, d, ignore_overflow)\n return y, m, d, hh, mm, ss, us\n\ndef _normalize_date(year, month, day, ignore_overflow=False):\n # That was easy. Now it gets muddy: the proper range for day\n # can\'t be determined without knowing the correct month and year,\n # but if day is, e.g., plus or minus a million, the current month\n # and year values make no sense (and may also be out of bounds\n # themselves).\n # Saying 12 months == 1 year should be non-controversial.\n if not 1 <= month <= 12:\n year, month = _normalize_pair(year, month-1, 12)\n month += 1\n assert 1 <= month <= 12\n\n # Now only day can be out of bounds (year may also be out of bounds\n # for a datetime object, but we don\'t care about that here).\n # If day is out of bounds, what to do is arguable, but at least the\n # method here is principled and explainable.\n dim = _days_in_month(year, month)\n if not 1 <= day <= dim:\n # Move day-1 days from the first of the month. First try to\n # get off cheap if we\'re only one day out of range (adjustments\n # for timezone alone can\'t be worse than that).\n if day == 0: # move back a day\n month -= 1\n if month > 0:\n day = _days_in_month(year, month)\n else:\n year, month, day = year-1, 12, 31\n elif day == dim + 1: # move forward a day\n month += 1\n day = 1\n if month > 12:\n month = 1\n year += 1\n else:\n ordinal = _ymd2ord(year, month, 1) + (day - 1)\n year, month, day = _ord2ymd(ordinal)\n\n if not ignore_overflow and not MINYEAR <= year <= MAXYEAR:\n raise OverflowError("date value out of range")\n return year, month, day\n\ndef _accum(tag, sofar, num, factor, leftover):\n if isinstance(num, int):\n prod = num * factor\n rsum = sofar + prod\n return rsum, leftover\n if isinstance(num, float):\n fracpart, intpart = _math.modf(num)\n prod = int(intpart) * factor\n rsum = sofar + prod\n if fracpart == 0.0:\n return rsum, leftover\n assert isinstance(factor, int)\n fracpart, intpart = _math.modf(factor * fracpart)\n rsum += int(intpart)\n return rsum, leftover + fracpart\n raise TypeError("unsupported type for timedelta %s component: %s" %\n (tag, type(num)))\n\nclass timedelta(object):\n """Represent the difference between two datetime objects.\n\n Supported operators:\n\n - add, subtract timedelta\n - unary plus, minus, abs\n - compare to timedelta\n - multiply, divide by int/long\n\n In addition, datetime supports subtraction of two datetime objects\n returning a timedelta, and addition or subtraction of a datetime\n and a timedelta giving a datetime.\n\n Representation: (days, seconds, microseconds). Why? Because I\n felt like it.\n """\n __slots__ = \'_days\', \'_seconds\', \'_microseconds\', \'_hashcode\'\n\n def __new__(cls, days=_SENTINEL, seconds=_SENTINEL, microseconds=_SENTINEL,\n milliseconds=_SENTINEL, minutes=_SENTINEL, hours=_SENTINEL, weeks=_SENTINEL):\n x = 0\n leftover = 0.0\n if microseconds is not _SENTINEL:\n x, leftover = _accum("microseconds", x, microseconds, _US_PER_US, leftover)\n if milliseconds is not _SENTINEL:\n x, leftover = _accum("milliseconds", x, milliseconds, _US_PER_MS, leftover)\n if seconds is not _SENTINEL:\n x, leftover = _accum("seconds", x, seconds, _US_PER_SECOND, leftover)\n if minutes is not _SENTINEL:\n x, leftover = _accum("minutes", x, minutes, _US_PER_MINUTE, leftover)\n if hours is not _SENTINEL:\n x, leftover = _accum("hours", x, hours, _US_PER_HOUR, leftover)\n if days is not _SENTINEL:\n x, leftover = _accum("days", x, days, _US_PER_DAY, leftover)\n if weeks is not _SENTINEL:\n x, leftover = _accum("weeks", x, weeks, _US_PER_WEEK, leftover)\n if leftover != 0.0:\n x += _round(leftover)\n return cls._from_microseconds(x)\n\n @classmethod\n def _from_microseconds(cls, us):\n s, us = divmod(us, _US_PER_SECOND)\n d, s = divmod(s, _SECONDS_PER_DAY)\n return cls._create(d, s, us, False)\n\n @classmethod\n def _create(cls, d, s, us, normalize):\n if normalize:\n s, us = _normalize_pair(s, us, 1000000)\n d, s = _normalize_pair(d, s, 24*3600)\n\n if not -_MAX_DELTA_DAYS <= d <= _MAX_DELTA_DAYS:\n raise OverflowError("days=%d; must have magnitude <= %d" % (d, _MAX_DELTA_DAYS))\n\n self = object.__new__(cls)\n self._days = d\n self._seconds = s\n self._microseconds = us\n self._hashcode = -1\n return self\n\n def _to_microseconds(self):\n return ((self._days * _SECONDS_PER_DAY + self._seconds) * _US_PER_SECOND +\n self._microseconds)\n\n def __repr__(self):\n module = "datetime." if self.__class__ is timedelta else ""\n if self._microseconds:\n return "%s(%d, %d, %d)" % (module + self.__class__.__name__,\n self._days,\n self._seconds,\n self._microseconds)\n if self._seconds:\n return "%s(%d, %d)" % (module + self.__class__.__name__,\n self._days,\n self._seconds)\n return "%s(%d)" % (module + self.__class__.__name__, self._days)\n\n def __str__(self):\n mm, ss = divmod(self._seconds, 60)\n hh, mm = divmod(mm, 60)\n s = "%d:%02d:%02d" % (hh, mm, ss)\n if self._days:\n def plural(n):\n return n, abs(n) != 1 and "s" or ""\n s = ("%d day%s, " % plural(self._days)) + s\n if self._microseconds:\n s = s + ".%06d" % self._microseconds\n return s\n\n def total_seconds(self):\n """Total seconds in the duration."""\n return self._to_microseconds() / 10.0**6\n\n # Read-only field accessors\n @property\n def days(self):\n """days"""\n return self._days\n\n @property\n def seconds(self):\n """seconds"""\n return self._seconds\n\n @property\n def microseconds(self):\n """microseconds"""\n return self._microseconds\n\n def __add__(self, other):\n if isinstance(other, timedelta):\n # for CPython compatibility, we cannot use\n # our __class__ here, but need a real timedelta\n return timedelta._create(self._days + other._days,\n self._seconds + other._seconds,\n self._microseconds + other._microseconds,\n True)\n return NotImplemented\n\n def __sub__(self, other):\n if isinstance(other, timedelta):\n # for CPython compatibility, we cannot use\n # our __class__ here, but need a real timedelta\n return timedelta._create(self._days - other._days,\n self._seconds - other._seconds,\n self._microseconds - other._microseconds,\n True)\n return NotImplemented\n\n def __neg__(self):\n # for CPython compatibility, we cannot use\n # our __class__ here, but need a real timedelta\n return timedelta._create(-self._days,\n -self._seconds,\n -self._microseconds,\n True)\n\n def __pos__(self):\n # for CPython compatibility, we cannot use\n # our __class__ here, but need a real timedelta\n return timedelta._create(self._days,\n self._seconds,\n self._microseconds,\n False)\n\n def __abs__(self):\n if self._days < 0:\n return -self\n else:\n return self\n\n def __mul__(self, other):\n if not isinstance(other, int):\n return NotImplemented\n usec = self._to_microseconds()\n return timedelta._from_microseconds(usec * other)\n\n __rmul__ = __mul__\n\n def __div__(self, other):\n if not isinstance(other, int):\n return NotImplemented\n usec = self._to_microseconds()\n return timedelta._from_microseconds(usec // other)\n\n __floordiv__ = __div__\n\n # Comparisons of timedelta objects with other.\n\n def __eq__(self, other):\n if isinstance(other, timedelta):\n return self._cmp(other) == 0\n else:\n return False\n\n def __ne__(self, other):\n if isinstance(other, timedelta):\n return self._cmp(other) != 0\n else:\n return True\n\n def __le__(self, other):\n if isinstance(other, timedelta):\n return self._cmp(other) <= 0\n else:\n _cmperror(self, other)\n\n def __lt__(self, other):\n if isinstance(other, timedelta):\n return self._cmp(other) < 0\n else:\n _cmperror(self, other)\n\n def __ge__(self, other):\n if isinstance(other, timedelta):\n return self._cmp(other) >= 0\n else:\n _cmperror(self, other)\n\n def __gt__(self, other):\n if isinstance(other, timedelta):\n return self._cmp(other) > 0\n else:\n _cmperror(self, other)\n\n def _cmp(self, other):\n assert isinstance(other, timedelta)\n return _cmp(self._getstate(), other._getstate())\n\n def __hash__(self):\n if self._hashcode == -1:\n self._hashcode = hash(self._getstate())\n return self._hashcode\n\n def __nonzero__(self):\n return (self._days != 0 or\n self._seconds != 0 or\n self._microseconds != 0)\n\ntimedelta.min = timedelta(-_MAX_DELTA_DAYS)\ntimedelta.max = timedelta(_MAX_DELTA_DAYS, 24*3600-1, 1000000-1)\ntimedelta.resolution = timedelta(microseconds=1)\n\nclass date(object):\n """Concrete date type.\n\n Constructors:\n\n __new__()\n fromtimestamp()\n today()\n fromordinal()\n\n Operators:\n\n __repr__, __str__\n __cmp__, __hash__\n __add__, __radd__, __sub__ (add/radd only with timedelta arg)\n\n Methods:\n\n timetuple()\n toordinal()\n weekday()\n isoweekday(), isocalendar(), isoformat()\n ctime()\n strftime()\n\n Properties (readonly):\n year, month, day\n """\n __slots__ = \'_year\', \'_month\', \'_day\', \'_hashcode\'\n\n def __new__(cls, year, month=None, day=None):\n """Constructor.\n\n Arguments:\n\n year, month, day (required, base 1)\n """\n year, month, day = _check_date_fields(year, month, day)\n self = object.__new__(cls)\n self._year = year\n self._month = month\n self._day = day\n self._hashcode = -1\n return self\n\n # Additional constructors\n\n @classmethod\n def fromtimestamp(cls, t):\n "Construct a date from a POSIX timestamp (like time.time())."\n y, m, d, hh, mm, ss, weekday, jday, dst = _time.localtime(t)\n return cls(y, m, d)\n\n @classmethod\n def today(cls):\n "Construct a date from time.time()."\n t = _time.time()\n return cls.fromtimestamp(t)\n\n @classmethod\n def fromordinal(cls, n):\n """Contruct a date from a proleptic Gregorian ordinal.\n\n January 1 of year 1 is day 1. Only the year, month and day are\n non-zero in the result.\n """\n y, m, d = _ord2ymd(n)\n return cls(y, m, d)\n\n # Conversions to string\n\n def __repr__(self):\n """Convert to formal string, for repr().\n\n >>> dt = datetime(2010, 1, 1)\n >>> repr(dt)\n \'datetime.datetime(2010, 1, 1, 0, 0)\'\n\n >>> dt = datetime(2010, 1, 1, tzinfo=timezone.utc)\n >>> repr(dt)\n \'datetime.datetime(2010, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)\'\n """\n module = "datetime." if self.__class__ is date else ""\n return "%s(%d, %d, %d)" % (module + self.__class__.__name__,\n self._year,\n self._month,\n self._day)\n\n # XXX These shouldn\'t depend on time.localtime(), because that\n # clips the usable dates to [1970 .. 2038). At least ctime() is\n # easily done without using strftime() -- that\'s better too because\n # strftime("%c", ...) is locale specific.\n\n def ctime(self):\n "Return ctime() style string."\n weekday = self.toordinal() % 7 or 7\n return "%s %s %2d 00:00:00 %04d" % (\n _DAYNAMES[weekday],\n _MONTHNAMES[self._month],\n self._day, self._year)\n\n def strftime(self, format):\n "Format using strftime()."\n return _wrap_strftime(self, format, self.timetuple())\n\n def __format__(self, fmt):\n if not isinstance(fmt, (str, unicode)):\n raise ValueError("__format__ expects str or unicode, not %s" %\n fmt.__class__.__name__)\n if len(fmt) != 0:\n return self.strftime(fmt)\n return str(self)\n\n def isoformat(self):\n """Return the date formatted according to ISO.\n\n This is \'YYYY-MM-DD\'.\n\n References:\n - http://www.w3.org/TR/NOTE-datetime\n - http://www.cl.cam.ac.uk/~mgk25/iso-time.html\n """\n return "%04d-%02d-%02d" % (self._year, self._month, self._day)\n\n __str__ = isoformat\n\n # Read-only field accessors\n @property\n def year(self):\n """year (1-9999)"""\n return self._year\n\n @property\n def month(self):\n """month (1-12)"""\n return self._month\n\n @property\n def day(self):\n """day (1-31)"""\n return self._day\n\n # Standard conversions, __cmp__, __hash__ (and helpers)\n\n def timetuple(self):\n "Return local time tuple compatible with time.localtime()."\n return _build_struct_time(self._year, self._month, self._day,\n 0, 0, 0, -1)\n\n def toordinal(self):\n """Return proleptic Gregorian ordinal for the year, month and day.\n\n January 1 of year 1 is day 1. Only the year, month and day values\n contribute to the result.\n """\n return _ymd2ord(self._year, self._month, self._day)\n\n def replace(self, year=None, month=None, day=None):\n """Return a new date with new values for the specified fields."""\n if year is None:\n year = self._year\n if month is None:\n month = self._month\n if day is None:\n day = self._day\n return date(year, month, day)\n\n # Comparisons of date objects with other.\n\n def __eq__(self, other):\n if isinstance(other, date):\n return self._cmp(other) == 0\n elif hasattr(other, "timetuple"):\n return NotImplemented\n else:\n return False\n\n def __ne__(self, other):\n if isinstance(other, date):\n return self._cmp(other) != 0\n elif hasattr(other, "timetuple"):\n return NotImplemented\n else:\n return True\n\n def __le__(self, other):\n if isinstance(other, date):\n return self._cmp(other) <= 0\n elif hasattr(other, "timetuple"):\n return NotImplemented\n else:\n _cmperror(self, other)\n\n def __lt__(self, other):\n if isinstance(other, date):\n return self._cmp(other) < 0\n elif hasattr(other, "timetuple"):\n return NotImplemented\n else:\n _cmperror(self, other)\n\n def __ge__(self, other):\n if isinstance(other, date):\n return self._cmp(other) >= 0\n elif hasattr(other, "timetuple"):\n return NotImplemented\n else:\n _cmperror(self, other)\n\n def __gt__(self, other):\n if isinstance(other, date):\n return self._cmp(other) > 0\n elif hasattr(other, "timetuple"):\n return NotImplemented\n else:\n _cmperror(self, other)\n\n def _cmp(self, other):\n assert isinstance(other, date)\n y, m, d = self._year, self._month, self._day\n y2, m2, d2 = other._year, other._month, other._day\n return _cmp((y, m, d), (y2, m2, d2))\n\n def __hash__(self):\n "Hash."\n if self._hashcode == -1:\n self._hashcode = hash(self._getstate())\n return self._hashcode\n\n # Computations\n\n def _add_timedelta(self, other, factor):\n y, m, d = _normalize_date(\n self._year,\n self._month,\n self._day + other.days * factor)\n return date(y, m, d)\n\n def __add__(self, other):\n "Add a date to a timedelta."\n if isinstance(other, timedelta):\n return self._add_timedelta(other, 1)\n return NotImplemented\n\n __radd__ = __add__\n\n def __sub__(self, other):\n """Subtract two dates, or a date and a timedelta."""\n if isinstance(other, date):\n days1 = self.toordinal()\n days2 = other.toordinal()\n return timedelta._create(days1 - days2, 0, 0, False)\n if isinstance(other, timedelta):\n return self._add_timedelta(other, -1)\n return NotImplemented\n\n def weekday(self):\n "Return day of the week, where Monday == 0 ... Sunday == 6."\n return (self.toordinal() + 6) % 7\n\n # Day-of-the-week and week-of-the-year, according to ISO\n\n def isoweekday(self):\n "Return day of the week, where Monday == 1 ... Sunday == 7."\n # 1-Jan-0001 is a Monday\n return self.toordinal() % 7 or 7\n\n def isocalendar(self):\n """Return a 3-tuple containing ISO year, week number, and weekday.\n\n The first ISO week of the year is the (Mon-Sun) week\n containing the year\'s first Thursday; everything else derives\n from that.\n\n The first week is 1; Monday is 1 ... Sunday is 7.\n\n ISO calendar algorithm taken from\n http://www.phys.uu.nl/~vgent/calendar/isocalendar.htm\n """\n year = self._year\n week1monday = _isoweek1monday(year)\n today = _ymd2ord(self._year, self._month, self._day)\n # Internally, week and day have origin 0\n week, day = divmod(today - week1monday, 7)\n if week < 0:\n year -= 1\n week1monday = _isoweek1monday(year)\n week, day = divmod(today - week1monday, 7)\n elif week >= 52:\n if today >= _isoweek1monday(year+1):\n year += 1\n week = 0\n return year, week+1, day+1\n\n_date_class = date # so functions w/ args named "date" can get at the class\n\ndate.min = date(1, 1, 1)\ndate.max = date(9999, 12, 31)\ndate.resolution = timedelta(days=1)\n\nclass tzinfo(object):\n """Abstract base class for time zone info classes.\n\n Subclasses must override the name(), utcoffset() and dst() methods.\n """\n __slots__ = ()\n\n def tzname(self, dt):\n "datetime -> string name of time zone."\n raise NotImplementedError("tzinfo subclass must override tzname()")\n\n def utcoffset(self, dt):\n "datetime -> minutes east of UTC (negative for west of UTC)"\n raise NotImplementedError("tzinfo subclass must override utcoffset()")\n\n def dst(self, dt):\n """datetime -> DST offset in minutes east of UTC.\n\n Return 0 if DST not in effect. utcoffset() must include the DST\n offset.\n """\n raise NotImplementedError("tzinfo subclass must override dst()")\n\n def fromutc(self, dt):\n "datetime in UTC -> datetime in local time."\n\n if not isinstance(dt, datetime):\n raise TypeError("fromutc() requires a datetime argument")\n if dt.tzinfo is not self:\n raise ValueError("dt.tzinfo is not self")\n\n dtoff = dt.utcoffset()\n if dtoff is None:\n raise ValueError("fromutc() requires a non-None utcoffset() "\n "result")\n\n # See the long comment block at the end of this file for an\n # explanation of this algorithm.\n dtdst = dt.dst()\n if dtdst is None:\n raise ValueError("fromutc() requires a non-None dst() result")\n delta = dtoff - dtdst\n if delta:\n dt = dt + delta\n dtdst = dt.dst()\n if dtdst is None:\n raise ValueError("fromutc(): dt.dst gave inconsistent "\n "results; cannot convert")\n if dtdst:\n return dt + dtdst\n else:\n return dt\n\n_tzinfo_class = tzinfo\n\nclass time(object):\n """Time with time zone.\n\n Constructors:\n\n __new__()\n\n Operators:\n\n __repr__, __str__\n __cmp__, __hash__\n\n Methods:\n\n strftime()\n isoformat()\n utcoffset()\n tzname()\n dst()\n\n Properties (readonly):\n hour, minute, second, microsecond, tzinfo\n """\n __slots__ = \'_hour\', \'_minute\', \'_second\', \'_microsecond\', \'_tzinfo\', \'_hashcode\'\n\n def __new__(cls, hour=0, minute=0, second=0, microsecond=0, tzinfo=None):\n """Constructor.\n\n Arguments:\n\n hour, minute (required)\n second, microsecond (default to zero)\n tzinfo (default to None)\n """\n hour, minute, second, microsecond = _check_time_fields(\n hour, minute, second, microsecond)\n _check_tzinfo_arg(tzinfo)\n self = object.__new__(cls)\n self._hour = hour\n self._minute = minute\n self._second = second\n self._microsecond = microsecond\n self._tzinfo = tzinfo\n self._hashcode = -1\n return self\n\n # Read-only field accessors\n @property\n def hour(self):\n """hour (0-23)"""\n return self._hour\n\n @property\n def minute(self):\n """minute (0-59)"""\n return self._minute\n\n @property\n def second(self):\n """second (0-59)"""\n return self._second\n\n @property\n def microsecond(self):\n """microsecond (0-999999)"""\n return self._microsecond\n\n @property\n def tzinfo(self):\n """timezone info object"""\n return self._tzinfo\n\n # Standard conversions, __hash__ (and helpers)\n\n # Comparisons of time objects with other.\n\n def __eq__(self, other):\n if isinstance(other, time):\n return self._cmp(other) == 0\n else:\n return False\n\n def __ne__(self, other):\n if isinstance(other, time):\n return self._cmp(other) != 0\n else:\n return True\n\n def __le__(self, other):\n if isinstance(other, time):\n return self._cmp(other) <= 0\n else:\n _cmperror(self, other)\n\n def __lt__(self, other):\n if isinstance(other, time):\n return self._cmp(other) < 0\n else:\n _cmperror(self, other)\n\n def __ge__(self, other):\n if isinstance(other, time):\n return self._cmp(other) >= 0\n else:\n _cmperror(self, other)\n\n def __gt__(self, other):\n if isinstance(other, time):\n return self._cmp(other) > 0\n else:\n _cmperror(self, other)\n\n def _cmp(self, other):\n assert isinstance(other, time)\n mytz = self._tzinfo\n ottz = other._tzinfo\n myoff = otoff = None\n\n if mytz is ottz:\n base_compare = True\n else:\n myoff = self._utcoffset()\n otoff = other._utcoffset()\n base_compare = myoff == otoff\n\n if base_compare:\n return _cmp((self._hour, self._minute, self._second,\n self._microsecond),\n (other._hour, other._minute, other._second,\n other._microsecond))\n if myoff is None or otoff is None:\n raise TypeError("can\'t compare offset-naive and offset-aware times")\n myhhmm = self._hour * 60 + self._minute - myoff\n othhmm = other._hour * 60 + other._minute - otoff\n return _cmp((myhhmm, self._second, self._microsecond),\n (othhmm, other._second, other._microsecond))\n\n def __hash__(self):\n """Hash."""\n if self._hashcode == -1:\n tzoff = self._utcoffset()\n if not tzoff: # zero or None\n self._hashcode = hash(self._getstate()[0])\n else:\n h, m = divmod(self.hour * 60 + self.minute - tzoff, 60)\n if 0 <= h < 24:\n self._hashcode = hash(time(h, m, self.second, self.microsecond))\n else:\n self._hashcode = hash((h, m, self.second, self.microsecond))\n return self._hashcode\n\n # Conversion to string\n\n def _tzstr(self, sep=":"):\n """Return formatted timezone offset (+xx:xx) or None."""\n off = self._utcoffset()\n if off is not None:\n if off < 0:\n sign = "-"\n off = -off\n else:\n sign = "+"\n hh, mm = divmod(off, 60)\n assert 0 <= hh < 24\n off = "%s%02d%s%02d" % (sign, hh, sep, mm)\n return off\n\n def __repr__(self):\n """Convert to formal string, for repr()."""\n if self._microsecond != 0:\n s = ", %d, %d" % (self._second, self._microsecond)\n elif self._second != 0:\n s = ", %d" % self._second\n else:\n s = ""\n module = "datetime." if self.__class__ is time else ""\n s= "%s(%d, %d%s)" % (module + self.__class__.__name__,\n self._hour, self._minute, s)\n if self._tzinfo is not None:\n assert s[-1:] == ")"\n s = s[:-1] + ", tzinfo=%r" % self._tzinfo + ")"\n return s\n\n def isoformat(self):\n """Return the time formatted according to ISO.\n\n This is \'HH:MM:SS.mmmmmm+zz:zz\', or \'HH:MM:SS+zz:zz\' if\n self.microsecond == 0.\n """\n s = _format_time(self._hour, self._minute, self._second,\n self._microsecond)\n tz = self._tzstr()\n if tz:\n s += tz\n return s\n\n __str__ = isoformat\n\n def strftime(self, format):\n """Format using strftime(). The date part of the timestamp passed\n to underlying strftime should not be used.\n """\n # The year must be >= _MINYEARFMT else Python\'s strftime implementation\n # can raise a bogus exception.\n timetuple = (1900, 1, 1,\n self._hour, self._minute, self._second,\n 0, 1, -1)\n return _wrap_strftime(self, format, timetuple)\n\n def __format__(self, fmt):\n if not isinstance(fmt, (str, unicode)):\n raise ValueError("__format__ expects str or unicode, not %s" %\n fmt.__class__.__name__)\n if len(fmt) != 0:\n return self.strftime(fmt)\n return str(self)\n\n # Timezone functions\n\n def utcoffset(self):\n """Return the timezone offset in minutes east of UTC (negative west of\n UTC)."""\n if self._tzinfo is None:\n return None\n offset = self._tzinfo.utcoffset(None)\n offset = _check_utc_offset("utcoffset", offset)\n if offset is not None:\n offset = timedelta._create(0, offset * 60, 0, True)\n return offset\n\n # Return an integer (or None) instead of a timedelta (or None).\n def _utcoffset(self):\n if self._tzinfo is None:\n return None\n offset = self._tzinfo.utcoffset(None)\n offset = _check_utc_offset("utcoffset", offset)\n return offset\n\n def tzname(self):\n """Return the timezone name.\n\n Note that the name is 100% informational -- there\'s no requirement that\n it mean anything in particular. For example, "GMT", "UTC", "-500",\n "-5:00", "EDT", "US/Eastern", "America/New York" are all valid replies.\n """\n if self._tzinfo is None:\n return None\n name = self._tzinfo.tzname(None)\n _check_tzname(name)\n return name\n\n def dst(self):\n """Return 0 if DST is not in effect, or the DST offset (in minutes\n eastward) if DST is in effect.\n\n This is purely informational; the DST offset has already been added to\n the UTC offset returned by utcoffset() if applicable, so there\'s no\n need to consult dst() unless you\'re interested in displaying the DST\n info.\n """\n if self._tzinfo is None:\n return None\n offset = self._tzinfo.dst(None)\n offset = _check_utc_offset("dst", offset)\n if offset is not None:\n offset = timedelta._create(0, offset * 60, 0, True)\n return offset\n\n # Return an integer (or None) instead of a timedelta (or None).\n def _dst(self):\n if self._tzinfo is None:\n return None\n offset = self._tzinfo.dst(None)\n offset = _check_utc_offset("dst", offset)\n return offset\n\n def replace(self, hour=None, minute=None, second=None, microsecond=None,\n tzinfo=True):\n """Return a new time with new values for the specified fields."""\n if hour is None:\n hour = self.hour\n if minute is None:\n minute = self.minute\n if second is None:\n second = self.second\n if microsecond is None:\n microsecond = self.microsecond\n if tzinfo is True:\n tzinfo = self.tzinfo\n return time(hour, minute, second, microsecond, tzinfo)\n\n def __nonzero__(self):\n if self.second or self.microsecond:\n return True\n offset = self._utcoffset() or 0\n return self.hour * 60 + self.minute != offset\n\n_time_class = time # so functions w/ args named "time" can get at the class\n\ntime.min = time(0, 0, 0)\ntime.max = time(23, 59, 59, 999999)\ntime.resolution = timedelta(microseconds=1)\n\nclass datetime(date):\n """datetime(year, month, day[, hour[, minute[, second[, microsecond[,tzinfo]]]]])\n\n The year, month and day arguments are required. tzinfo may be None, or an\n instance of a tzinfo subclass. The remaining arguments may be ints or longs.\n """\n __slots__ = date.__slots__ + time.__slots__\n\n def __new__(cls, year, month=None, day=None, hour=0, minute=0, second=0,\n microsecond=0, tzinfo=None):\n year, month, day = _check_date_fields(year, month, day)\n hour, minute, second, microsecond = _check_time_fields(\n hour, minute, second, microsecond)\n _check_tzinfo_arg(tzinfo)\n self = object.__new__(cls)\n self._year = year\n self._month = month\n self._day = day\n self._hour = hour\n self._minute = minute\n self._second = second\n self._microsecond = microsecond\n self._tzinfo = tzinfo\n self._hashcode = -1\n return self\n\n # Read-only field accessors\n @property\n def hour(self):\n """hour (0-23)"""\n return self._hour\n\n @property\n def minute(self):\n """minute (0-59)"""\n return self._minute\n\n @property\n def second(self):\n """second (0-59)"""\n return self._second\n\n @property\n def microsecond(self):\n """microsecond (0-999999)"""\n return self._microsecond\n\n @property\n def tzinfo(self):\n """timezone info object"""\n return self._tzinfo\n\n @classmethod\n def fromtimestamp(cls, timestamp, tz=None):\n """Construct a datetime from a POSIX timestamp (like time.time()).\n\n A timezone info object may be passed in as well.\n """\n _check_tzinfo_arg(tz)\n converter = _time.localtime if tz is None else _time.gmtime\n self = cls._from_timestamp(converter, timestamp, tz)\n if tz is not None:\n self = tz.fromutc(self)\n return self\n\n @classmethod\n def utcfromtimestamp(cls, t):\n "Construct a UTC datetime from a POSIX timestamp (like time.time())."\n return cls._from_timestamp(_time.gmtime, t, None)\n\n @classmethod\n def _from_timestamp(cls, converter, timestamp, tzinfo):\n t_full = timestamp\n timestamp = int(_math.floor(timestamp))\n frac = t_full - timestamp\n us = _round(frac * 1e6)\n\n # If timestamp is less than one microsecond smaller than a\n # full second, us can be rounded up to 1000000. In this case,\n # roll over to seconds, otherwise, ValueError is raised\n # by the constructor.\n if us == 1000000:\n timestamp += 1\n us = 0\n y, m, d, hh, mm, ss, weekday, jday, dst = converter(timestamp)\n ss = min(ss, 59) # clamp out leap seconds if the platform has them\n return cls(y, m, d, hh, mm, ss, us, tzinfo)\n\n @classmethod\n def now(cls, tz=None):\n "Construct a datetime from time.time() and optional time zone info."\n t = _time.time()\n return cls.fromtimestamp(t, tz)\n\n @classmethod\n def utcnow(cls):\n "Construct a UTC datetime from time.time()."\n t = _time.time()\n return cls.utcfromtimestamp(t)\n\n @classmethod\n def combine(cls, date, time):\n "Construct a datetime from a given date and a given time."\n if not isinstance(date, _date_class):\n raise TypeError("date argument must be a date instance")\n if not isinstance(time, _time_class):\n raise TypeError("time argument must be a time instance")\n return cls(date.year, date.month, date.day,\n time.hour, time.minute, time.second, time.microsecond,\n time.tzinfo)\n\n def timetuple(self):\n "Return local time tuple compatible with time.localtime()."\n dst = self._dst()\n if dst is None:\n dst = -1\n elif dst:\n dst = 1\n return _build_struct_time(self.year, self.month, self.day,\n self.hour, self.minute, self.second,\n dst)\n\n def utctimetuple(self):\n "Return UTC time tuple compatible with time.gmtime()."\n y, m, d = self.year, self.month, self.day\n hh, mm, ss = self.hour, self.minute, self.second\n offset = self._utcoffset()\n if offset: # neither None nor 0\n mm -= offset\n y, m, d, hh, mm, ss, _ = _normalize_datetime(\n y, m, d, hh, mm, ss, 0, ignore_overflow=True)\n return _build_struct_time(y, m, d, hh, mm, ss, 0)\n\n def date(self):\n "Return the date part."\n return date(self._year, self._month, self._day)\n\n def time(self):\n "Return the time part, with tzinfo None."\n return time(self.hour, self.minute, self.second, self.microsecond)\n\n def timetz(self):\n "Return the time part, with same tzinfo."\n return time(self.hour, self.minute, self.second, self.microsecond,\n self._tzinfo)\n\n def replace(self, year=None, month=None, day=None, hour=None,\n minute=None, second=None, microsecond=None, tzinfo=True):\n """Return a new datetime with new values for the specified fields."""\n if year is None:\n year = self.year\n if month is None:\n month = self.month\n if day is None:\n day = self.day\n if hour is None:\n hour = self.hour\n if minute is None:\n minute = self.minute\n if second is None:\n second = self.second\n if microsecond is None:\n microsecond = self.microsecond\n if tzinfo is True:\n tzinfo = self.tzinfo\n return datetime(year, month, day, hour, minute, second, microsecond,\n tzinfo)\n\n def astimezone(self, tz):\n if not isinstance(tz, tzinfo):\n raise TypeError("tz argument must be an instance of tzinfo")\n\n mytz = self.tzinfo\n if mytz is None:\n raise ValueError("astimezone() requires an aware datetime")\n\n if tz is mytz:\n return self\n\n # Convert self to UTC, and attach the new time zone object.\n myoffset = self.utcoffset()\n if myoffset is None:\n raise ValueError("astimezone() requires an aware datetime")\n utc = (self - myoffset).replace(tzinfo=tz)\n\n # Convert from UTC to tz\'s local time.\n return tz.fromutc(utc)\n\n # Ways to produce a string.\n\n def ctime(self):\n "Return ctime() style string."\n weekday = self.toordinal() % 7 or 7\n return "%s %s %2d %02d:%02d:%02d %04d" % (\n _DAYNAMES[weekday],\n _MONTHNAMES[self._month],\n self._day,\n self._hour, self._minute, self._second,\n self._year)\n\n def isoformat(self, sep=\'T\'):\n """Return the time formatted according to ISO.\n\n This is \'YYYY-MM-DD HH:MM:SS.mmmmmm\', or \'YYYY-MM-DD HH:MM:SS\' if\n self.microsecond == 0.\n\n If self.tzinfo is not None, the UTC offset is also attached, giving\n \'YYYY-MM-DD HH:MM:SS.mmmmmm+HH:MM\' or \'YYYY-MM-DD HH:MM:SS+HH:MM\'.\n\n Optional argument sep specifies the separator between date and\n time, default \'T\'.\n """\n s = ("%04d-%02d-%02d%c" % (self._year, self._month, self._day, sep) +\n _format_time(self._hour, self._minute, self._second,\n self._microsecond))\n off = self._utcoffset()\n if off is not None:\n if off < 0:\n sign = "-"\n off = -off\n else:\n sign = "+"\n hh, mm = divmod(off, 60)\n s += "%s%02d:%02d" % (sign, hh, mm)\n return s\n\n def __repr__(self):\n """Convert to formal string, for repr()."""\n L = [self._year, self._month, self._day, # These are never zero\n self._hour, self._minute, self._second, self._microsecond]\n if L[-1] == 0:\n del L[-1]\n if L[-1] == 0:\n del L[-1]\n s = ", ".join(map(str, L))\n module = "datetime." if self.__class__ is datetime else ""\n s = "%s(%s)" % (module + self.__class__.__name__, s)\n if self._tzinfo is not None:\n assert s[-1:] == ")"\n s = s[:-1] + ", tzinfo=%r" % self._tzinfo + ")"\n return s\n\n def __str__(self):\n "Convert to string, for str()."\n return self.isoformat(sep=\' \')\n\n @classmethod\n def strptime(cls, date_string, format):\n \'string, format -> new datetime parsed from a string (like time.strptime()).\'\n from _strptime import _strptime\n # _strptime._strptime returns a two-element tuple. The first\n # element is a time.struct_time object. The second is the\n # microseconds (which are not defined for time.struct_time).\n struct, micros = _strptime(date_string, format)\n return cls(*(struct[0:6] + (micros,)))\n\n def utcoffset(self):\n """Return the timezone offset in minutes east of UTC (negative west of\n UTC)."""\n if self._tzinfo is None:\n return None\n offset = self._tzinfo.utcoffset(self)\n offset = _check_utc_offset("utcoffset", offset)\n if offset is not None:\n offset = timedelta._create(0, offset * 60, 0, True)\n return offset\n\n # Return an integer (or None) instead of a timedelta (or None).\n def _utcoffset(self):\n if self._tzinfo is None:\n return None\n offset = self._tzinfo.utcoffset(self)\n offset = _check_utc_offset("utcoffset", offset)\n return offset\n\n def tzname(self):\n """Return the timezone name.\n\n Note that the name is 100% informational -- there\'s no requirement that\n it mean anything in particular. For example, "GMT", "UTC", "-500",\n "-5:00", "EDT", "US/Eastern", "America/New York" are all valid replies.\n """\n if self._tzinfo is None:\n return None\n name = self._tzinfo.tzname(self)\n _check_tzname(name)\n return name\n\n def dst(self):\n """Return 0 if DST is not in effect, or the DST offset (in minutes\n eastward) if DST is in effect.\n\n This is purely informational; the DST offset has already been added to\n the UTC offset returned by utcoffset() if applicable, so there\'s no\n need to consult dst() unless you\'re interested in displaying the DST\n info.\n """\n if self._tzinfo is None:\n return None\n offset = self._tzinfo.dst(self)\n offset = _check_utc_offset("dst", offset)\n if offset is not None:\n offset = timedelta._create(0, offset * 60, 0, True)\n return offset\n\n # Return an integer (or None) instead of a timedelta (or None).\n def _dst(self):\n if self._tzinfo is None:\n return None\n offset = self._tzinfo.dst(self)\n offset = _check_utc_offset("dst", offset)\n return offset\n\n # Comparisons of datetime objects with other.\n\n def __eq__(self, other):\n if isinstance(other, datetime):\n return self._cmp(other) == 0\n elif hasattr(other, "timetuple") and not isinstance(other, date):\n return NotImplemented\n else:\n return False\n\n def __ne__(self, other):\n if isinstance(other, datetime):\n return self._cmp(other) != 0\n elif hasattr(other, "timetuple") and not isinstance(other, date):\n return NotImplemented\n else:\n return True\n\n def __le__(self, other):\n if isinstance(other, datetime):\n return self._cmp(other) <= 0\n elif hasattr(other, "timetuple") and not isinstance(other, date):\n return NotImplemented\n else:\n _cmperror(self, other)\n\n def __lt__(self, other):\n if isinstance(other, datetime):\n return self._cmp(other) < 0\n elif hasattr(other, "timetuple") and not isinstance(other, date):\n return NotImplemented\n else:\n _cmperror(self, other)\n\n def __ge__(self, other):\n if isinstance(other, datetime):\n return self._cmp(other) >= 0\n elif hasattr(other, "timetuple") and not isinstance(other, date):\n return NotImplemented\n else:\n _cmperror(self, other)\n\n def __gt__(self, other):\n if isinstance(other, datetime):\n return self._cmp(other) > 0\n elif hasattr(other, "timetuple") and not isinstance(other, date):\n return NotImplemented\n else:\n _cmperror(self, other)\n\n def _cmp(self, other):\n assert isinstance(other, datetime)\n mytz = self._tzinfo\n ottz = other._tzinfo\n myoff = otoff = None\n\n if mytz is ottz:\n base_compare = True\n else:\n if mytz is not None:\n myoff = self._utcoffset()\n if ottz is not None:\n otoff = other._utcoffset()\n base_compare = myoff == otoff\n\n if base_compare:\n return _cmp((self._year, self._month, self._day,\n self._hour, self._minute, self._second,\n self._microsecond),\n (other._year, other._month, other._day,\n other._hour, other._minute, other._second,\n other._microsecond))\n if myoff is None or otoff is None:\n raise TypeError("can\'t compare offset-naive and offset-aware datetimes")\n # XXX What follows could be done more efficiently...\n diff = self - other # this will take offsets into account\n if diff.days < 0:\n return -1\n return diff and 1 or 0\n\n def _add_timedelta(self, other, factor):\n y, m, d, hh, mm, ss, us = _normalize_datetime(\n self._year,\n self._month,\n self._day + other.days * factor,\n self._hour,\n self._minute,\n self._second + other.seconds * factor,\n self._microsecond + other.microseconds * factor)\n return datetime(y, m, d, hh, mm, ss, us, tzinfo=self._tzinfo)\n\n def __add__(self, other):\n "Add a datetime and a timedelta."\n if not isinstance(other, timedelta):\n return NotImplemented\n return self._add_timedelta(other, 1)\n\n __radd__ = __add__\n\n def __sub__(self, other):\n "Subtract two datetimes, or a datetime and a timedelta."\n if not isinstance(other, datetime):\n if isinstance(other, timedelta):\n return self._add_timedelta(other, -1)\n return NotImplemented\n\n delta_d = self.toordinal() - other.toordinal()\n delta_s = (self._hour - other._hour) * 3600 + \\\n (self._minute - other._minute) * 60 + \\\n (self._second - other._second)\n delta_us = self._microsecond - other._microsecond\n base = timedelta._create(delta_d, delta_s, delta_us, True)\n if self._tzinfo is other._tzinfo:\n return base\n myoff = self._utcoffset()\n otoff = other._utcoffset()\n if myoff == otoff:\n return base\n if myoff is None or otoff is None:\n raise TypeError("can\'t subtract offset-naive and offset-aware datetimes")\n return base + timedelta(minutes = otoff-myoff)\n\n def __hash__(self):\n if self._hashcode == -1:\n tzoff = self._utcoffset()\n if tzoff is None:\n self._hashcode = hash(self._getstate()[0])\n else:\n days = _ymd2ord(self.year, self.month, self.day)\n seconds = self.hour * 3600 + (self.minute - tzoff) * 60 + self.second\n self._hashcode = hash(timedelta(days, seconds, self.microsecond))\n return self._hashcode\n\n\n\ndatetime.min = datetime(1, 1, 1)\ndatetime.max = datetime(9999, 12, 31, 23, 59, 59, 999999)\ndatetime.resolution = timedelta(microseconds=1)\n\n\ndef _isoweek1monday(year):\n # Helper to calculate the day number of the Monday starting week 1\n # XXX This could be done more efficiently\n THURSDAY = 3\n firstday = _ymd2ord(year, 1, 1)\n firstweekday = (firstday + 6) % 7 # See weekday() above\n week1monday = firstday - firstweekday\n if firstweekday > THURSDAY:\n week1monday += 7\n return week1monday\n\n"""\nSome time zone algebra. For a datetime x, let\n x.n = x stripped of its timezone -- its naive time.\n x.o = x.utcoffset(), and assuming that doesn\'t raise an exception or\n return None\n x.d = x.dst(), and assuming that doesn\'t raise an exception or\n return None\n x.s = x\'s standard offset, x.o - x.d\n\nNow some derived rules, where k is a duration (timedelta).\n\n1. x.o = x.s + x.d\n This follows from the definition of x.s.\n\n2. If x and y have the same tzinfo member, x.s = y.s.\n This is actually a requirement, an assumption we need to make about\n sane tzinfo classes.\n\n3. The naive UTC time corresponding to x is x.n - x.o.\n This is again a requirement for a sane tzinfo class.\n\n4. (x+k).s = x.s\n This follows from #2, and that datimetimetz+timedelta preserves tzinfo.\n\n5. (x+k).n = x.n + k\n Again follows from how arithmetic is defined.\n\nNow we can explain tz.fromutc(x). Let\'s assume it\'s an interesting case\n(meaning that the various tzinfo methods exist, and don\'t blow up or return\nNone when called).\n\nThe function wants to return a datetime y with timezone tz, equivalent to x.\nx is already in UTC.\n\nBy #3, we want\n\n y.n - y.o = x.n [1]\n\nThe algorithm starts by attaching tz to x.n, and calling that y. So\nx.n = y.n at the start. Then it wants to add a duration k to y, so that [1]\nbecomes true; in effect, we want to solve [2] for k:\n\n (y+k).n - (y+k).o = x.n [2]\n\nBy #1, this is the same as\n\n (y+k).n - ((y+k).s + (y+k).d) = x.n [3]\n\nBy #5, (y+k).n = y.n + k, which equals x.n + k because x.n=y.n at the start.\nSubstituting that into [3],\n\n x.n + k - (y+k).s - (y+k).d = x.n; the x.n terms cancel, leaving\n k - (y+k).s - (y+k).d = 0; rearranging,\n k = (y+k).s - (y+k).d; by #4, (y+k).s == y.s, so\n k = y.s - (y+k).d\n\nOn the RHS, (y+k).d can\'t be computed directly, but y.s can be, and we\napproximate k by ignoring the (y+k).d term at first. Note that k can\'t be\nvery large, since all offset-returning methods return a duration of magnitude\nless than 24 hours. For that reason, if y is firmly in std time, (y+k).d must\nbe 0, so ignoring it has no consequence then.\n\nIn any case, the new value is\n\n z = y + y.s [4]\n\nIt\'s helpful to step back at look at [4] from a higher level: it\'s simply\nmapping from UTC to tz\'s standard time.\n\nAt this point, if\n\n z.n - z.o = x.n [5]\n\nwe have an equivalent time, and are almost done. The insecurity here is\nat the start of daylight time. Picture US Eastern for concreteness. The wall\ntime jumps from 1:59 to 3:00, and wall hours of the form 2:MM don\'t make good\nsense then. The docs ask that an Eastern tzinfo class consider such a time to\nbe EDT (because it\'s "after 2"), which is a redundant spelling of 1:MM EST\non the day DST starts. We want to return the 1:MM EST spelling because that\'s\nthe only spelling that makes sense on the local wall clock.\n\nIn fact, if [5] holds at this point, we do have the standard-time spelling,\nbut that takes a bit of proof. We first prove a stronger result. What\'s the\ndifference between the LHS and RHS of [5]? Let\n\n diff = x.n - (z.n - z.o) [6]\n\nNow\n z.n = by [4]\n (y + y.s).n = by #5\n y.n + y.s = since y.n = x.n\n x.n + y.s = since z and y are have the same tzinfo member,\n y.s = z.s by #2\n x.n + z.s\n\nPlugging that back into [6] gives\n\n diff =\n x.n - ((x.n + z.s) - z.o) = expanding\n x.n - x.n - z.s + z.o = cancelling\n - z.s + z.o = by #2\n z.d\n\nSo diff = z.d.\n\nIf [5] is true now, diff = 0, so z.d = 0 too, and we have the standard-time\nspelling we wanted in the endcase described above. We\'re done. Contrarily,\nif z.d = 0, then we have a UTC equivalent, and are also done.\n\nIf [5] is not true now, diff = z.d != 0, and z.d is the offset we need to\nadd to z (in effect, z is in tz\'s standard time, and we need to shift the\nlocal clock into tz\'s daylight time).\n\nLet\n\n z\' = z + z.d = z + diff [7]\n\nand we can again ask whether\n\n z\'.n - z\'.o = x.n [8]\n\nIf so, we\'re done. If not, the tzinfo class is insane, according to the\nassumptions we\'ve made. This also requires a bit of proof. As before, let\'s\ncompute the difference between the LHS and RHS of [8] (and skipping some of\nthe justifications for the kinds of substitutions we\'ve done several times\nalready):\n\n diff\' = x.n - (z\'.n - z\'.o) = replacing z\'.n via [7]\n x.n - (z.n + diff - z\'.o) = replacing diff via [6]\n x.n - (z.n + x.n - (z.n - z.o) - z\'.o) =\n x.n - z.n - x.n + z.n - z.o + z\'.o = cancel x.n\n - z.n + z.n - z.o + z\'.o = cancel z.n\n - z.o + z\'.o = #1 twice\n -z.s - z.d + z\'.s + z\'.d = z and z\' have same tzinfo\n z\'.d - z.d\n\nSo z\' is UTC-equivalent to x iff z\'.d = z.d at this point. If they are equal,\nwe\'ve found the UTC-equivalent so are done. In fact, we stop with [7] and\nreturn z\', not bothering to compute z\'.d.\n\nHow could z.d and z\'d differ? z\' = z + z.d [7], so merely moving z\' by\na dst() offset, and starting *from* a time already in DST (we know z.d != 0),\nwould have to change the result dst() returns: we start in DST, and moving\na little further into it takes us out of DST.\n\nThere isn\'t a sane case where this can happen. The closest it gets is at\nthe end of DST, where there\'s an hour in UTC with no spelling in a hybrid\ntzinfo class. In US Eastern, that\'s 5:MM UTC = 0:MM EST = 1:MM EDT. During\nthat hour, on an Eastern clock 1:MM is taken as being in standard time (6:MM\nUTC) because the docs insist on that, but 0:MM is taken as being in daylight\ntime (4:MM UTC). There is no local time mapping to 5:MM UTC. The local\nclock jumps from 1:59 back to 1:00 again, and repeats the 1:MM hour in\nstandard time. Since that\'s what the local clock *does*, we want to map both\nUTC hours 5:MM and 6:MM to 1:MM Eastern. The result is ambiguous\nin local time, but so it goes -- it\'s the way the local clock works.\n\nWhen x = 5:MM UTC is the input to this algorithm, x.o=0, y.o=-5 and y.d=0,\nso z=0:MM. z.d=60 (minutes) then, so [5] doesn\'t hold and we keep going.\nz\' = z + z.d = 1:MM then, and z\'.d=0, and z\'.d - z.d = -60 != 0 so [8]\n(correctly) concludes that z\' is not UTC-equivalent to x.\n\nBecause we know z.d said z was in daylight time (else [5] would have held and\nwe would have stopped then), and we know z.d != z\'.d (else [8] would have held\nand we have stopped then), and there are only 2 possible values dst() can\nreturn in Eastern, it follows that z\'.d must be 0 (which it is in the example,\nbut the reasoning doesn\'t depend on the example -- it depends on there being\ntwo possible dst() outcomes, one zero and the other non-zero). Therefore\nz\' must be in standard time, and is the spelling we want in this case.\n\nNote again that z\' is not UTC-equivalent as far as the hybrid tzinfo class is\nconcerned (because it takes z\' as being in standard time rather than the\ndaylight time we intend here), but returning it gives the real-life "local\nclock repeats an hour" behavior when mapping the "unspellable" UTC hour into\ntz.\n\nWhen the input is 6:MM, z=1:MM and z.d=0, and we stop at once, again with\nthe 1:MM standard time spelling we want.\n\nSo how can this break? One of the assumptions must be violated. Two\npossibilities:\n\n1) [2] effectively says that y.s is invariant across all y belong to a given\n time zone. This isn\'t true if, for political reasons or continental drift,\n a region decides to change its base offset from UTC.\n\n2) There may be versions of "double daylight" time where the tail end of\n the analysis gives up a step too early. I haven\'t thought about that\n enough to say.\n\nIn any case, it\'s clear that the default fromutc() is strong enough to handle\n"almost all" time zones: so long as the standard offset is invariant, it\ndoesn\'t matter if daylight time transition points change from year to year, or\nif daylight time is skipped in some years; it doesn\'t matter how large or\nsmall dst() may get within its bounds; and it doesn\'t even matter if some\nperverse time zone returns a negative dst()). So a breaking case must be\npretty bizarre, and a tzinfo subclass can override fromutc() if it is.\n"""\n',"src/lib/dbhash.py":'raise NotImplementedError("dbhash is not yet implemented in Skulpt")\n',"src/lib/decimal.py":'raise NotImplementedError("decimal is not yet implemented in Skulpt")\n',"src/lib/difflib.py":'raise NotImplementedError("difflib is not yet implemented in Skulpt")\n',"src/lib/dircache.py":'raise NotImplementedError("dircache is not yet implemented in Skulpt")\n',"src/lib/dis.py":'raise NotImplementedError("dis is not yet implemented in Skulpt")\n',"src/lib/distutils/__init__.py":'raise NotImplementedError("distutils is not yet implemented in Skulpt")\n',"src/lib/distutils/command/__init__.py":'raise NotImplementedError("command is not yet implemented in Skulpt")\n',"src/lib/distutils/tests/__init__.py":'raise NotImplementedError("tests is not yet implemented in Skulpt")\n',"src/lib/doctest.py":'raise NotImplementedError("doctest is not yet implemented in Skulpt")\n',"src/lib/document.js":'var $builtinmodule=function(){var a,b={__name__:new Sk.builtin.str("document")};return b.getElementById=new Sk.builtin.func(function(a){var c=document.getElementById(a.v);return c?Sk.misceval.callsimArray(b.Element,[c]):Sk.builtin.none.none$}),b.createElement=new Sk.builtin.func(function(a){var c=document.createElement(a.v);if(c)return Sk.misceval.callsimArray(b.Element,[c])}),b.getElementsByTagName=new Sk.builtin.func(function(a){for(var c=document.getElementsByTagName(a.v),d=[],e=c.length-1;0<=e;e--)d.push(Sk.misceval.callsimArray(b.Element,[c[e]]));return new Sk.builtin.list(d)}),b.getElementsByClassName=new Sk.builtin.func(function(a){for(var c=document.getElementsByClassName(a.v),d=[],e=0;e<c.length;e++)d.push(Sk.misceval.callsimArray(b.Element,[c[e]]));return new Sk.builtin.list(d)}),b.getElementsByName=new Sk.builtin.func(function(a){for(var c=document.getElementsByName(a.v),d=[],e=0;e<c.length;e++)d.push(Sk.misceval.callsimArray(b.Element,[c[e]]));return new Sk.builtin.list(d)}),b.currentDiv=new Sk.builtin.func(function(){if(void 0!==Sk.divid)return new Sk.builtin.str(Sk.divid);throw new Sk.builtin.AttributeError("There is no value set for divid")}),a=function(a,b){b.__init__=new Sk.builtin.func(function(a,b){a.v=b,a.innerHTML=b.innerHTML,a.innerText=b.innerText,void 0!==b.value&&(a.value=b.value,Sk.abstr.objectSetItem(a.$d,new Sk.builtin.str("value"),new Sk.builtin.str(a.value))),void 0!==b.checked&&(a.checked=b.checked,Sk.abstr.objectSetItem(a.$d,new Sk.builtin.str("checked"),new Sk.builtin.str(a.checked))),Sk.abstr.objectSetItem(a.$d,new Sk.builtin.str("innerHTML"),new Sk.builtin.str(a.innerHTML)),Sk.abstr.objectSetItem(a.$d,new Sk.builtin.str("innerText"),new Sk.builtin.str(a.innerText))}),b.tp$getattr=Sk.generic.getAttr,b.__setattr__=new Sk.builtin.func(function(a,b,c){b=Sk.ffi.remapToJs(b),"innerHTML"===b&&(a.innerHTML=c,a.v.innerHTML=c.v,Sk.abstr.objectSetItem(a.$d,new Sk.builtin.str("innerHTML"),c)),"innerText"===b&&(a.innerText=c,a.v.innerText=c.v,Sk.abstr.objectSetItem(a.$d,new Sk.builtin.str("innerText"),c))}),b.appendChild=new Sk.builtin.func(function(a,b){a.v.appendChild(b.v)}),b.removeChild=new Sk.builtin.func(function(a,b){a.v.removeChild(b.v)}),b.getCSS=new Sk.builtin.func(function(a,b){return new Sk.builtin.str(a.v.style[b.v])}),b.setCSS=new Sk.builtin.func(function(a,b,c){a.v.style[b.v]=c.v}),b.getAttribute=new Sk.builtin.func(function(a,b){var c=a.v.getAttribute(b.v);return c?new Sk.builtin.str(c):Sk.builtin.none.none$}),b.setAttribute=new Sk.builtin.func(function(a,b,c){a.v.setAttribute(b.v,c.v)}),b.getProperty=new Sk.builtin.func(function(a,b){var c=a.v[b.v];return c?new Sk.builtin.str(c):Sk.builtin.none.none$}),b.__str__=new Sk.builtin.func(function(a){return console.log(a.v.tagName),new Sk.builtin.str(a.v.tagName)}),b.__repr__=new Sk.builtin.func(function(){return new Sk.builtin.str("[DOM Element]")})},b.Element=Sk.misceval.buildClass(b,a,"Element",[]),b};',"src/lib/dumbdbm.py":'raise NotImplementedError("dumbdbm is not yet implemented in Skulpt")\n',"src/lib/dummy_thread.py":'raise NotImplementedError("dummy_thread is not yet implemented in Skulpt")\n',"src/lib/dummy_threading.py":'raise NotImplementedError("dummy_threading is not yet implemented in Skulpt")\n',"src/lib/email/__init__.py":'raise NotImplementedError("email is not yet implemented in Skulpt")\n',"src/lib/email/mime/__init__.py":'raise NotImplementedError("mime is not yet implemented in Skulpt")\n',"src/lib/email/test/data/__init__.py":'raise NotImplementedError("data is not yet implemented in Skulpt")\n',"src/lib/encodings/__init__.py":'raise NotImplementedError("encodings is not yet implemented in Skulpt")\n',"src/lib/filecmp.py":'raise NotImplementedError("filecmp is not yet implemented in Skulpt")\n',"src/lib/fileinput.py":'raise NotImplementedError("fileinput is not yet implemented in Skulpt")\n',"src/lib/fnmatch.py":'raise NotImplementedError("fnmatch is not yet implemented in Skulpt")\n',"src/lib/formatter.py":'raise NotImplementedError("formatter is not yet implemented in Skulpt")\n',"src/lib/fpformat.py":'raise NotImplementedError("fpformat is not yet implemented in Skulpt")\n',"src/lib/fractions.py":'raise NotImplementedError("fractions is not yet implemented in Skulpt")\n',"src/lib/ftplib.py":'raise NotImplementedError("ftplib is not yet implemented in Skulpt")\n',"src/lib/functools.py":'raise NotImplementedError("functools is not yet implemented in Skulpt")\n',"src/lib/genericpath.py":'raise NotImplementedError("genericpath is not yet implemented in Skulpt")\n',"src/lib/getopt.py":'raise NotImplementedError("getopt is not yet implemented in Skulpt")\n',"src/lib/getpass.py":'raise NotImplementedError("getpass is not yet implemented in Skulpt")\n',"src/lib/gettext.py":'raise NotImplementedError("gettext is not yet implemented in Skulpt")\n',"src/lib/glob.py":'raise NotImplementedError("glob is not yet implemented in Skulpt")\n',"src/lib/gzip.py":'raise NotImplementedError("gzip is not yet implemented in Skulpt")\n',"src/lib/hashlib.py":'raise NotImplementedError("hashlib is not yet implemented in Skulpt")\n',"src/lib/heapq.py":'raise NotImplementedError("heapq is not yet implemented in Skulpt")\n',"src/lib/hmac.py":'raise NotImplementedError("hmac is not yet implemented in Skulpt")\n',"src/lib/hotshot/__init__.py":'raise NotImplementedError("hotshot is not yet implemented in Skulpt")\n',"src/lib/htmlentitydefs.py":'raise NotImplementedError("htmlentitydefs is not yet implemented in Skulpt")\n',"src/lib/htmllib.py":'raise NotImplementedError("htmllib is not yet implemented in Skulpt")\n',"src/lib/httplib.py":'raise NotImplementedError("httplib is not yet implemented in Skulpt")\n',"src/lib/idlelib/Icons/__init__.py":'raise NotImplementedError("Icons is not yet implemented in Skulpt")\n',"src/lib/idlelib/__init__.py":'raise NotImplementedError("idlelib is not yet implemented in Skulpt")\n',"src/lib/ihooks.py":'raise NotImplementedError("ihooks is not yet implemented in Skulpt")\n',"src/lib/image.js":'var ImageMod,$builtinmodule;ImageMod||(ImageMod={},ImageMod.canvasLib=[]),$builtinmodule=function(){var a,b,c,d,e,f,g,h={__name__:new Sk.builtin.str("image")};return h.Image=Sk.misceval.buildClass(h,function(a,b){var c=Math.floor;e=function(a){a.width=a.image.width,a.height=a.image.height,a.delay=0,a.updateCount=0,a.updateInterval=1,a.lastx=0,a.lasty=0,a.canvas=document.createElement("canvas"),a.canvas.height=a.height,a.canvas.width=a.width,a.ctx=a.canvas.getContext("2d"),a.ctx.drawImage(a.image,0,0),a.imagedata=a.ctx.getImageData(0,0,a.width,a.height)},b.__init__=new Sk.builtin.func(function(a,b){var c;Sk.builtin.pyCheckArgsLen("__init__",arguments.length,2,2);try{a.image=document.getElementById(Sk.ffi.remapToJs(b)),e(a)}catch(b){a.image=null}if(null==a.image)return c=new Sk.misceval.Suspension,c.resume=function(){if(c.data.error)throw new Sk.builtin.IOError(c.data.error.message)},c.data={type:"Sk.promise",promise:new Promise(function(c,d){var f=new Image;f.crossOrigin="",f.onerror=function(){d(Error("Failed to load URL: "+f.src))},f.onload=function(){a.image=this,e(a),c()},f.src=g(b)})},c}),g=function(a){var b,c,d="function"==typeof Sk.imageProxy?Sk.imageProxy:function(a){return b=document.createElement("a"),b.href=c,window.location.host===b.host?a:Sk.imageProxy+"/"+a};return c=Sk.ffi.remapToJs(a),c=d(c),c},f=function(a,b,c){if(0>b||0>c||b>=a.width||c>=a.height)throw new Sk.builtin.ValueError("Pixel index out of range.")};var i=function(a,b,c){var d;Sk.builtin.pyCheckArgsLen("setdelay",arguments.length,2,3),a.delay=Sk.ffi.remapToJs(b),d=Sk.builtin.asnum$(c),a.updateInterval=d?d:1};b.set_delay=new Sk.builtin.func(i),b.setDelay=new Sk.builtin.func(i);var j=function(a){var b,d=[];for(Sk.builtin.pyCheckArgsLen("getpixels",arguments.length,1,1),b=0;b<a.image.height*a.image.width;b++)d[b]=Sk.misceval.callsimArray(a.getPixel,[a,b%a.image.width,c(b/a.image.width)]);return new Sk.builtin.tuple(d)};b.get_pixels=new Sk.builtin.func(j),b.getPixels=new Sk.builtin.func(j),b.getData=new Sk.builtin.func(function(a){var b,d,e,g,h,j,k,l=[];for(Sk.builtin.pyCheckArgsLen("getData",arguments.length,1,1),b=0;b<a.image.height*a.image.width;b++)d=b%a.image.width,e=c(b/a.image.width),f(a,d,e),k=4*e*a.width+4*d,g=a.imagedata.data[k],h=a.imagedata.data[k+1],j=a.imagedata.data[k+2],l[b]=new Sk.builtin.tuple([new Sk.builtin.int_(g),new Sk.builtin.int_(h),new Sk.builtin.int_(j)]);return new Sk.builtin.list(l)});var k=function(a,b,c){var d,e,g,i;return Sk.builtin.pyCheckArgsLen("getpixel",arguments.length,3,3),b=Sk.builtin.asnum$(b),c=Sk.builtin.asnum$(c),f(a,b,c),i=4*c*a.width+4*b,d=a.imagedata.data[i],g=a.imagedata.data[i+1],e=a.imagedata.data[i+2],Sk.misceval.callsimArray(h.Pixel,[d,g,e,b,c])};b.get_pixel=new Sk.builtin.func(k),b.getPixel=new Sk.builtin.func(k),d=function(a,b,c){var d=new Sk.misceval.Suspension;return d.resume=function(){return Sk.builtin.none.none$},d.data={type:"Sk.promise",promise:new Promise(function(d){var e=Math.max,f=Math.abs,g=Math.min;a.updateCount++,0==a.updateCount%a.updateInterval?(a.lastx+a.updateInterval>=a.width?a.lastCtx.putImageData(a.imagedata,a.lastUlx,a.lastUly,0,a.lasty,a.width,2):a.lasty+a.updateInterval>=a.height?a.lastCtx.putImageData(a.imagedata,a.lastUlx,a.lastUly,a.lastx,0,2,a.height):a.lastCtx.putImageData(a.imagedata,a.lastUlx,a.lastUly,g(b,a.lastx),g(c,a.lasty),e(f(b-a.lastx),1),e(f(c-a.lasty),1)),a.lastx=b,a.lasty=c,0<a.delay?window.setTimeout(d,a.delay):d()):d()})},d};var l=function(a,b,c,e){var g;return Sk.builtin.pyCheckArgsLen("setpixel",arguments.length,4,4),b=Sk.builtin.asnum$(b),c=Sk.builtin.asnum$(c),f(a,b,c),g=4*c*a.width+4*b,a.imagedata.data[g]=Sk.builtin.asnum$(Sk.misceval.callsimArray(e.getRed,[e])),a.imagedata.data[g+1]=Sk.builtin.asnum$(Sk.misceval.callsimArray(e.getGreen,[e])),a.imagedata.data[g+2]=Sk.builtin.asnum$(Sk.misceval.callsimArray(e.getBlue,[e])),a.imagedata.data[g+3]=255,d(a,b,c)};b.set_pixel=new Sk.builtin.func(l),b.setPixel=new Sk.builtin.func(l);var m=function(a,b,e){var g,h,i;return Sk.builtin.pyCheckArgsLen("setpixelat",arguments.length,3,3),b=Sk.builtin.asnum$(b),g=b%a.image.width,h=c(b/a.image.width),f(a,g,h),i=4*h*a.width+4*g,a.imagedata.data[i]=Sk.builtin.asnum$(Sk.misceval.callsimArray(e.getRed,[e])),a.imagedata.data[i+1]=Sk.builtin.asnum$(Sk.misceval.callsimArray(e.getGreen,[e])),a.imagedata.data[i+2]=Sk.builtin.asnum$(Sk.misceval.callsimArray(e.getBlue,[e])),a.imagedata.data[i+3]=255,d(a,g,h)};b.set_pixel_at=new Sk.builtin.func(m),b.setPixelAt=new Sk.builtin.func(m);var n=function(a,b){var c,e,g;return Sk.builtin.pyCheckArgsLen("updatepixel",arguments.length,2,2),c=Sk.builtin.asnum$(Sk.misceval.callsimArray(b.getX,[b])),e=Sk.builtin.asnum$(Sk.misceval.callsimArray(b.getY,[b])),f(a,c,e),g=4*e*a.width+4*c,a.imagedata.data[g]=Sk.builtin.asnum$(Sk.misceval.callsimArray(b.getRed,[b])),a.imagedata.data[g+1]=Sk.builtin.asnum$(Sk.misceval.callsimArray(b.getGreen,[b])),a.imagedata.data[g+2]=Sk.builtin.asnum$(Sk.misceval.callsimArray(b.getBlue,[b])),a.imagedata.data[g+3]=255,d(a,c,e)};b.update_pixel=new Sk.builtin.func(n),b.updatePixel=new Sk.builtin.func(n);var o=function(a){return Sk.builtin.pyCheckArgsLen("getheight",arguments.length,1,1),new Sk.builtin.int_(a.height)};b.get_height=new Sk.builtin.func(o),b.getHeight=new Sk.builtin.func(o);var p=function(a){return Sk.builtin.pyCheckArgsLen("getwidth",arguments.length,1,1),new Sk.builtin.int_(a.width)};b.get_width=new Sk.builtin.func(p),b.getWidth=new Sk.builtin.func(p),b.__getattr__=new Sk.builtin.func(function(a,b){return(b=Sk.ffi.remapToJs(b),"height"===b)?Sk.builtin.assk$(a.height):"width"===b?Sk.builtin.assk$(a.width):void 0}),b.__setattr__=new Sk.builtin.func(function(a,b){if(b=Sk.ffi.remapToJs(b),"height"===b||"width"===b)throw new Sk.builtin.Exception("Cannot change height or width they can only be set on creation");else throw new Sk.builtin.Exception("Unknown attribute: "+b)}),b.draw=new Sk.builtin.func(function(a,b,c,d){var e;return Sk.builtin.pyCheckArgsLen("draw",arguments.length,2,4),e=new Sk.misceval.Suspension,e.resume=function(){return Sk.builtin.none.none$},e.data={type:"Sk.promise",promise:new Promise(function(e){var f,g;b=Sk.builtin.asnum$(b),c=Sk.builtin.asnum$(c),d=Sk.builtin.asnum$(d),f=Sk.misceval.callsimArray(b.getWin,[b]),g=f.getContext("2d"),void 0===c&&(c=0,d=0),a.lastUlx=c,a.lastUly=d,a.lastCtx=g,g.putImageData(a.imagedata,c,d),0<a.delay?window.setTimeout(e,a.delay):window.setTimeout(e,200)})},e})},"Image",[]),c=function(a,b){b.__init__=new Sk.builtin.func(function(a,b,c){Sk.builtin.pyCheckArgsLen("__init__",arguments.length,3,3),a.width=Sk.builtin.asnum$(b),a.height=Sk.builtin.asnum$(c),a.canvas=document.createElement("canvas"),a.ctx=a.canvas.getContext("2d"),a.canvas.height=a.height,a.canvas.width=a.width,a.imagedata=a.ctx.getImageData(0,0,a.width,a.height)})},h.EmptyImage=Sk.misceval.buildClass(h,c,"EmptyImage",[h.Image]),b=function(a,b){b.__init__=new Sk.builtin.func(function(a,c,d,e,b,f){Sk.builtin.pyCheckArgsLen("__init__",arguments.length,4,6),a.red=Sk.builtin.asnum$(c),a.green=Sk.builtin.asnum$(d),a.blue=Sk.builtin.asnum$(e),a.x=Sk.builtin.asnum$(b),a.y=Sk.builtin.asnum$(f)});var c=function(a){return Sk.builtin.pyCheckArgsLen("getred",arguments.length,1,1),Sk.builtin.assk$(a.red)};b.get_red=new Sk.builtin.func(c),b.getRed=new Sk.builtin.func(c);var d=function(a){return Sk.builtin.pyCheckArgsLen("getgreen",arguments.length,1,1),Sk.builtin.assk$(a.green)};b.get_green=new Sk.builtin.func(d),b.getGreen=new Sk.builtin.func(d);var e=function(a){return Sk.builtin.pyCheckArgsLen("getblue",arguments.length,1,1),Sk.builtin.assk$(a.blue)};b.get_blue=new Sk.builtin.func(e),b.getBlue=new Sk.builtin.func(e);var f=function(a){return Sk.builtin.pyCheckArgsLen("getx",arguments.length,1,1),Sk.builtin.assk$(a.x)};b.get_x=new Sk.builtin.func(f),b.getX=new Sk.builtin.func(f);var g=function(a){return Sk.builtin.pyCheckArgsLen("gety",arguments.length,1,1),Sk.builtin.assk$(a.y)};b.get_y=new Sk.builtin.func(g),b.getY=new Sk.builtin.func(g);var h=function(a,b){Sk.builtin.pyCheckArgsLen("setred",arguments.length,2,2),a.red=Sk.builtin.asnum$(b)};b.set_red=new Sk.builtin.func(h),b.setRed=new Sk.builtin.func(h);var i=function(a,b){Sk.builtin.pyCheckArgsLen("setgreen",arguments.length,2,2),a.green=Sk.builtin.asnum$(b)};b.set_green=new Sk.builtin.func(i),b.setGreen=new Sk.builtin.func(i);var j=function(a,c){Sk.builtin.pyCheckArgsLen("setblue",arguments.length,2,2),a.blue=Sk.builtin.asnum$(c)};b.set_blue=new Sk.builtin.func(j),b.setBlue=new Sk.builtin.func(j),b.__getattr__=new Sk.builtin.func(function(a,b){return(b=Sk.ffi.remapToJs(b),"red"===b)?Sk.builtin.assk$(a.red):"green"===b?Sk.builtin.assk$(a.green):"blue"===b?Sk.builtin.assk$(a.blue):void 0}),b.__setattr__=new Sk.builtin.func(function(a,b,c){b=Sk.ffi.remapToJs(b),("red"===b||"green"===b||"blue"===b)&&(a[b]=Sk.builtin.asnum$(c))});var k=function(a,b){Sk.builtin.pyCheckArgsLen("setx",arguments.length,2,2),a.x=Sk.builtin.asnum$(b)};b.set_x=new Sk.builtin.func(k),b.setX=new Sk.builtin.func(k);var l=function(a,b){Sk.builtin.pyCheckArgsLen("sety",arguments.length,2,2),a.y=Sk.builtin.asnum$(b)};b.set_y=new Sk.builtin.func(l),b.setY=new Sk.builtin.func(l),b.__getitem__=new Sk.builtin.func(function(a,b){return(b=Sk.builtin.asnum$(b),0===b)?a.red:1==b?a.green:2==b?a.blue:void 0}),b.__str__=new Sk.builtin.func(function(a){return Sk.ffi.remapToPy("["+a.red+","+a.green+","+a.blue+"]")}),b.getColorTuple=new Sk.builtin.func(function(){}),b.setRange=new Sk.builtin.func(function(a,b){a.max=Sk.builtin.asnum$(b)})},h.Pixel=Sk.misceval.buildClass(h,b,"Pixel",[]),a=function(a,b){b.__init__=new Sk.builtin.func(function(a,b,c){var d,e,f;Sk.builtin.pyCheckArgsLen("__init__",arguments.length,1,3),d=ImageMod.canvasLib[Sk.canvas],void 0===d?(e=document.createElement("canvas"),f=document.getElementById(Sk.canvas),a.theScreen=e,f.appendChild(e),ImageMod.canvasLib[Sk.canvas]=e,ImageMod.canvasLib[Sk.canvas]=a.theScreen):(a.theScreen=d,a.theScreen.height=a.theScreen.height),void 0===b?(Sk.availableHeight&&(a.theScreen.height=Sk.availableHeight),Sk.availableWidth&&(a.theScreen.width=Sk.availableWidth)):(a.theScreen.height=c.v,a.theScreen.width=b.v),a.theScreen.style.display="block"}),b.getWin=new Sk.builtin.func(function(a){return a.theScreen}),b.exitonclick=new Sk.builtin.func(function(a){var b=a.theScreen.id;a.theScreen.onclick=function(){document.getElementById(b).style.display="none",document.getElementById(b).onclick=null,delete ImageMod.canvasLib[b]}})},h.ImageWin=Sk.misceval.buildClass(h,a,"ImageWin",[]),h};',"src/lib/imaplib.py":'raise NotImplementedError("imaplib is not yet implemented in Skulpt")\n',"src/lib/imghdr.py":'raise NotImplementedError("imghdr is not yet implemented in Skulpt")\n',"src/lib/imputil.py":'raise NotImplementedError("imputil is not yet implemented in Skulpt")\n',"src/lib/io.py":'raise NotImplementedError("io is not yet implemented in Skulpt")\n',"src/lib/itertools.js":'var $builtinmodule=function(){function combinationsNew(a,b,c){let d,e;[d,e]=Sk.abstr.copyKeywordsToNamedArgs(a.tp$name,["iterable","r"],b,c,[]);const f=Sk.misceval.arrayFromIterable(d);if(e=Sk.misceval.asIndexSized(e,Sk.builtin.OverFlowError),0>e)throw new Sk.builtin.ValueError("r must be non-negative");if(this===a)return new a.constructor(f,e);else{const b=new this.constructor;return a.constructor.call(b,f,e),b}}var a={};return a.accumulate=Sk.abstr.buildIteratorClass("itertools.accumulate",{constructor:function accumulate(a,b,c){this.iter=a,this.func=b,this.total=c,this.tp$iternext=()=>(this.total=Sk.builtin.checkNone(this.total)?this.iter.tp$iternext():this.total,this.tp$iternext=this.constructor.prototype.tp$iternext,this.total)},iternext(){let a=this.iter.tp$iternext();if(void 0!==a)return this.total=Sk.misceval.callsimArray(this.func,[this.total,a]),this.total},slots:{tp$doc:"accumulate(iterable[, func, initial]) --\x3e accumulate object\\n\\nReturn series of accumulated sums (or other binary function results).",tp$new(b,c){Sk.abstr.checkArgsLen("accumulate",b,0,2);let[d,e,f]=Sk.abstr.copyKeywordsToNamedArgs("accumulate",["iterable","func","initial"],b,c,[Sk.builtin.none.none$,Sk.builtin.none.none$]);if(d=Sk.abstr.iter(d),e=Sk.builtin.checkNone(e)?new Sk.builtin.func((c,a)=>Sk.abstr.numberBinOp(c,a,"Add")):e,this===a.accumulate.prototype)return new a.accumulate(d,e,f);else{const b=new this.constructor;return a.accumulate.call(b,d,e,f),b}}}}),a.chain=Sk.abstr.buildIteratorClass("itertools.chain",{constructor:function chain(a){this.iterables=a,this.current_it=null,this.tp$iternext=()=>(this.tp$iternext=this.constructor.prototype.tp$iternext,this.current_it=this.iterables.tp$iternext(),void 0===this.current_it)?void(this.tp$iternext=()=>void 0):(this.current_it=Sk.abstr.iter(this.current_it),this.tp$iternext())},iternext(){for(let a;void 0===a;)if(a=this.current_it.tp$iternext(),void 0===a){if(this.current_it=this.iterables.tp$iternext(),void 0===this.current_it)return void(this.tp$iternext=()=>void 0);this.current_it=Sk.abstr.iter(this.current_it)}else return a},slots:{tp$doc:"chain(*iterables) --\x3e chain object\\n\\nReturn a chain object whose .__next__() method returns elements from the\\nfirst iterable until it is exhausted, then elements from the next\\niterable, until all of the iterables are exhausted.",tp$new(b,c){if(Sk.abstr.checkNoKwargs("chain",c),b=new Sk.builtin.tuple(b.slice(0)).tp$iter(),this===a.chain.prototype)return new a.chain(b);else{const c=new this.constructor;return a.chain.call(c,b),c}}},classmethods:{from_iterable:{$meth(b){const c=Sk.abstr.iter(b);return new a.chain(c)},$flags:{OneArg:!0},$doc:"chain.from_iterable(iterable) --\x3e chain object\\n\\nAlternate chain() constructor taking a single iterable argument\\nthat evaluates lazily.",$textsig:null}}}),a.combinations=Sk.abstr.buildIteratorClass("itertools.combinations",{constructor:function combinations(a,b){this.pool=a,this.r=b,this.indices=Array(b).fill().map((a,b)=>b),this.n=a.length,this.tp$iternext=()=>{if(!(this.r>this.n))return this.tp$iternext=this.constructor.prototype.tp$iternext,new Sk.builtin.tuple(this.pool.slice(0,this.r))}},iternext(){let a,b=!1;for(a=this.r-1;0<=a;a--)if(this.indices[a]!=a+this.n-this.r){b=!0;break}if(!b)return void(this.r=0);this.indices[a]++;for(let b=a+1;b<this.r;b++)this.indices[b]=this.indices[b-1]+1;const c=this.indices.map(a=>this.pool[a]);return new Sk.builtin.tuple(c)},slots:{tp$doc:"combinations(iterable, r) --\x3e combinations object\\n\\nReturn successive r-length combinations of elements in the iterable.\\n\\ncombinations(range(4), 3) --\x3e (0,1,2), (0,1,3), (0,2,3), (1,2,3)",tp$new(b,c){return combinationsNew.call(this,a.combinations.prototype,b,c)}}}),a.combinations_with_replacement=Sk.abstr.buildIteratorClass("itertools.combinations_with_replacement",{constructor:function combinations_with_replacement(a,b){this.pool=a,this.r=b,this.indices=Array(b).fill(0),this.n=a.length,this.tp$iternext=()=>{if(!this.r||this.n){this.tp$iternext=this.constructor.prototype.tp$iternext;const a=this.indices.map(a=>this.pool[a]);return new Sk.builtin.tuple(a)}}},iternext(){let a,b=!1;for(a=this.r-1;0<=a;a--)if(this.indices[a]!=this.n-1){b=!0;break}if(!b)return void(this.r=0);const c=this.indices[a]+1;for(let b=a;b<this.r;b++)this.indices[b]=c;const d=this.indices.map(a=>this.pool[a]);return new Sk.builtin.tuple(d)},slots:{tp$doc:"combinations_with_replacement(iterable, r) --\x3e combinations_with_replacement object\\n\\nReturn successive r-length combinations of elements in the iterable\\nallowing individual elements to have successive repeats.\\ncombinations_with_replacement(\'ABC\', 2) --\x3e AA AB AC BB BC CC",tp$new(b,c){return combinationsNew.call(this,a.combinations_with_replacement.prototype,b,c)}}}),a.compress=Sk.abstr.buildIteratorClass("itertools.compress",{constructor:function compress(a,b){this.data=a,this.selectors=b},iternext(){let a=this.data.tp$iternext(),b=this.selectors.tp$iternext();for(;void 0!==a&&void 0!==b;){if(Sk.misceval.isTrue(b))return a;a=this.data.tp$iternext(),b=this.selectors.tp$iternext()}},slots:{tp$doc:"compress(data, selectors) --\x3e iterator over selected data\\n\\nReturn data elements corresponding to true selector elements.\\nForms a shorter iterator from selected data elements using the\\nselectors to choose the data elements.",tp$new(b,c){let d,e;if([d,e]=Sk.abstr.copyKeywordsToNamedArgs("compress",["data","selectors"],b,c,[]),d=Sk.abstr.iter(d),e=Sk.abstr.iter(e),this===a.count.prototype)return new a.compress(d,e);else{const b=new this.constructor;return a.compress.call(b,d,e),b}}}}),a.count=Sk.abstr.buildIteratorClass("itertools.count",{constructor:function count(a,b){this.start=a,this.step=b},iternext(){const a=this.start;return this.start=Sk.abstr.numberBinOp(this.start,this.step,"Add"),a},slots:{tp$doc:"count(start=0, step=1) --\x3e count object\\n\\nReturn a count object whose .__next__() method returns consecutive values.\\nEquivalent to:\\n\\n def count(firstval=0, step=1):\\n x = firstval\\n while 1:\\n yield x\\n x += step\\n",tp$new(b,c){const[d,e]=Sk.abstr.copyKeywordsToNamedArgs("count",["start","step"],b,c,[new Sk.builtin.int_(0),new Sk.builtin.int_(1)]);if(!Sk.builtin.checkNumber(d)&&!Sk.builtin.checkComplex(d))throw new Sk.builtin.TypeError("a number is required");if(!Sk.builtin.checkNumber(e)&&!Sk.builtin.checkComplex(e))throw new Sk.builtin.TypeError("a number is required");if(this===a.count.prototype)return new a.count(d,e);else{const b=new this.constructor;return a.count.call(b,d,e),b}},$r(){const a=Sk.misceval.objectRepr(this.start);let b=Sk.misceval.objectRepr(this.step);return b="1"===b?"":", "+b,new Sk.builtin.str(Sk.abstr.typeName(this)+"("+a+b+")")}}}),a.cycle=Sk.abstr.buildIteratorClass("itertools.cycle",{constructor:function cycle(a){this.iter=a,this.saved=[],this.consumed=!1,this.i=0,this.length},iternext(){let a;if(!this.consumed){if(a=this.iter.tp$iternext(),void 0!==a)return this.saved.push(a),a;if(this.consumed=!0,this.length=this.saved.length,!this.length)return}return a=this.saved[this.i],this.i=(this.i+1)%this.length,a},slots:{tp$doc:"cycle(iterable) --\x3e cycle object\\n\\nReturn elements from the iterable until it is exhausted.\\nThen repeat the sequence indefinitely.",tp$new(b,c){Sk.abstr.checkOneArg("cycle",b,c);const d=Sk.abstr.iter(b[0]);if(this===a.cycle.prototype)return new a.cycle(d);else{const b=new this.constructor;return a.cycle.call(b,d),b}}}}),a.dropwhile=Sk.abstr.buildIteratorClass("itertools.dropwhile",{constructor:function dropwhile(a,b){this.predicate=a,this.iter=b,this.passed},iternext(){let a=this.iter.tp$iternext();for(;void 0===this.passed&&void 0!==a;){const b=Sk.misceval.callsimArray(this.predicate,[a]);if(!Sk.misceval.isTrue(b))return this.passed=!0,a;a=this.iter.tp$iternext()}return a},slots:{tp$doc:"dropwhile(predicate, iterable) --\x3e dropwhile object\\n\\nDrop items from the iterable while predicate(item) is true.\\nAfterwards, return every element until the iterable is exhausted.",tp$new(b,c){Sk.abstr.checkNoKwargs("dropwhile",c),Sk.abstr.checkArgsLen("dropwhile",b,2,2);const d=b[0],e=Sk.abstr.iter(b[1]);if(this===a.dropwhile.prototype)return new a.dropwhile(d,e);else{const b=new this.constructor;return a.dropwhile.call(b,d,e),b}}}}),a.filterfalse=Sk.abstr.buildIteratorClass("itertools.filterfalse",{constructor:function filterfalse(a,b){this.predicate=a,this.iter=b},iternext(){let a=this.iter.tp$iternext();if(void 0!==a){for(let b=Sk.misceval.callsimArray(this.predicate,[a]);Sk.misceval.isTrue(b);){if(a=this.iter.tp$iternext(),void 0===a)return;b=Sk.misceval.callsimArray(this.predicate,[a])}return a}},slots:{tp$doc:"filterfalse(function or None, sequence) --\x3e filterfalse object\\n\\nReturn those items of sequence for which function(item) is false.\\nIf function is None, return the items that are false.",tp$new(b,c){Sk.abstr.checkNoKwargs("filterfalse",c),Sk.abstr.checkArgsLen("filterfalse",b,2,2);const d=Sk.builtin.checkNone(b[0])?Sk.builtin.bool:b[0],e=Sk.abstr.iter(b[1]);if(this===a.filterfalse.prototype)return new a.filterfalse(d,e);else{const b=new this.constructor;return a.filterfalse.call(b,d,e),b}}}}),a._grouper=Sk.abstr.buildIteratorClass("itertools._grouper",{constructor:function _grouper(a){this.groupby=a,this.tgtkey=a.tgtkey,this.id=a.id},iternext(){const a=Sk.misceval.richCompareBool(this.groupby.currkey,this.tgtkey,"Eq");if(this.groupby.id===this.id&&a){let a=this.groupby.currval;return this.groupby.currval=this.groupby.iter.tp$iternext(),void 0!==this.groupby.currval&&(this.groupby.currkey=Sk.misceval.callsimArray(this.groupby.keyf,[this.groupby.currval])),a}}}),a.groupby=Sk.abstr.buildIteratorClass("itertools.groupby",{constructor:function groupby(a,b){this.iter=a,this.keyf=b,this.currval,this.currkey=this.tgtkey=new Sk.builtin.object,this.id},iternext(){this.id={};for(let a=Sk.misceval.richCompareBool(this.currkey,this.tgtkey,"Eq");a;){if(this.currval=this.iter.tp$iternext(),void 0===this.currval)return;this.currkey=Sk.misceval.callsimArray(this.keyf,[this.currval]),a=Sk.misceval.richCompareBool(this.currkey,this.tgtkey,"Eq")}this.tgtkey=this.currkey;const b=new a._grouper(this);return new Sk.builtin.tuple([this.currkey,b])},slots:{tp$doc:"groupby(iterable, key=None) -> make an iterator that returns consecutive\\nkeys and groups from the iterable. If the key function is not specified or\\nis None, the element itself is used for grouping.\\n",tp$new(b,c){let d,e;if([d,e]=Sk.abstr.copyKeywordsToNamedArgs("groupby",["iterable","key"],b,c,[Sk.builtin.none.none$]),d=Sk.abstr.iter(d),e=Sk.builtin.checkNone(e)?new Sk.builtin.func(a=>a):e,this===a.groupby.prototype)return new a.groupby(d,e);else{const b=new this.constructor;return a.groupby.call(b,d,e),b}}}}),a.islice=Sk.abstr.buildIteratorClass("itertools.islice",{constructor:function islice(a,b,c,d){this.iter=a,this.previt=b,this.stop=c,this.step=d,this.tp$iternext=()=>{if(this.tp$iternext=this.constructor.prototype.tp$iternext,this.previt>=this.stop){for(let a=0;a<this.stop;a++)this.iter.tp$iternext();return}for(let a=0;a<this.previt;a++)this.iter.tp$iternext();return this.iter.tp$iternext()}},iternext(){if(this.previt+this.step>=this.stop){for(let a=this.previt+1;a<this.stop;a++)this.previt+=this.step,this.iter.tp$iternext();return}for(let a=this.previt+1;a<this.previt+this.step;a++)this.iter.tp$iternext();return this.previt+=this.step,this.iter.tp$iternext()},slots:{tp$doc:"islice(iterable, stop) --\x3e islice object\\nislice(iterable, start, stop[, step]) --\x3e islice object\\n\\nReturn an iterator whose next() method returns selected values from an\\niterable. If start is specified, will skip all preceding elements;\\notherwise, start defaults to zero. Step defaults to one. If\\nspecified as another value, step determines how many values are \\nskipped between successive calls. Works like a slice() on a list\\nbut returns an iterator.",tp$new(b,c){var d=Number.MAX_SAFE_INTEGER;Sk.abstr.checkNoKwargs("islice",c),Sk.abstr.checkArgsLen("islice",b,2,4);const e=Sk.abstr.iter(b[0]);let f=b[1],g=b[2],h=b[3];if(void 0===g?(g=f,f=Sk.builtin.none.none$,h=Sk.builtin.none.none$):void 0===h&&(h=Sk.builtin.none.none$),!(Sk.builtin.checkNone(g)||Sk.misceval.isIndex(g)))throw new Sk.builtin.ValueError("Stop for islice() must be None or an integer: 0 <= x <= sys.maxsize.");else if(g=Sk.builtin.checkNone(g)?d:Sk.misceval.asIndexSized(g),0>g||g>d)throw new Sk.builtin.ValueError("Stop for islice() must be None or an integer: 0 <= x <= sys.maxsize.");if(!(Sk.builtin.checkNone(f)||Sk.misceval.isIndex(f)))throw new Sk.builtin.ValueError("Indices for islice() must be None or an integer: 0 <= x <= sys.maxsize.");else if(f=Sk.builtin.checkNone(f)?0:Sk.misceval.asIndexSized(f),0>f||f>d)throw new Sk.builtin.ValueError("Indices for islice() must be None or an integer: 0 <= x <= sys.maxsize.");if(!(Sk.builtin.checkNone(h)||Sk.misceval.isIndex(h)))throw new Sk.builtin.ValueError("Step for islice() must be a positive integer or None");else if(h=Sk.builtin.checkNone(h)?1:Sk.misceval.asIndexSized(h),0>=h||h>d)throw new Sk.builtin.ValueError("Step for islice() must be a positive integer or None.");if(this===a.islice.prototype)return new a.islice(e,f,g,h);else{const b=new this.constructor;return a.islice.call(b,e,f,g,h),b}}}}),a.permutations=Sk.abstr.buildIteratorClass("itertools.permutations",{constructor:function permutations(a,b){this.pool=a,this.r=b;const c=a.length;this.indices=Array(c).fill().map((a,b)=>b),this.cycles=Array(b).fill().map((a,b)=>c-b),this.n=c,this.tp$iternext=()=>{if(!(this.r>this.n))return this.tp$iternext=this.constructor.prototype.tp$iternext,new Sk.builtin.tuple(this.pool.slice(0,this.r))}},iternext(){for(let a=this.r-1;0<=a;a--)if(this.cycles[a]--,0==this.cycles[a])this.indices.push(this.indices.splice(a,1)[0]),this.cycles[a]=this.n-a;else{j=this.cycles[a],[this.indices[a],this.indices[this.n-j]]=[this.indices[this.n-j],this.indices[a]];const b=this.indices.map(a=>this.pool[a]).slice(0,this.r);return new Sk.builtin.tuple(b)}this.r=0},slots:{tp$doc:"permutations(iterable[, r]) --\x3e permutations object\\n\\nReturn successive r-length permutations of elements in the iterable.\\n\\npermutations(range(3), 2) --\x3e (0,1), (0,2), (1,0), (1,2), (2,0), (2,1)",tp$new(b,c){let d,e;[d,e]=Sk.abstr.copyKeywordsToNamedArgs("permutations",["iterable","r"],b,c,[Sk.builtin.none.none$]);const f=Sk.misceval.arrayFromIterable(d);if(e=Sk.builtin.checkNone(e)?f.length:Sk.misceval.asIndexSized(e,Sk.builtin.OverFlowError),0>e)throw new Sk.builtin.ValueError("r must be non-negative");if(this===a.permutations.prototype)return new a.permutations(f,e);else{const b=new this.constructor;return a.permutations.call(b,f,e),b}}}}),a.product=Sk.abstr.buildIteratorClass("itertools.product",{constructor:function product(a){this.pools=a,this.n=a.length,this.indices=Array(a.length).fill(0),this.pool_sizes=a.map(a=>a.length),this.tp$iternext=()=>{this.tp$iternext=this.constructor.prototype.tp$iternext;const a=this.indices.map((a,b)=>this.pools[b][this.indices[b]]);return a.some(a=>void 0===a)?void(this.n=0):new Sk.builtin.tuple(a)}},iternext(){for(let a=this.n-1;0<=a&&a<this.n;)this.indices[a]++,this.indices[a]>=this.pool_sizes[a]?(this.indices[a]=-1,a--):a++;if(!this.n||this.indices.every(a=>-1===a))return void(this.n=0);else{const a=this.indices.map((a,b)=>this.pools[b][this.indices[b]]);return new Sk.builtin.tuple(a)}},slots:{tp$doc:"product(*iterables, repeat=1) --\x3e product object\\n\\nCartesian product of input iterables. Equivalent to nested for-loops.\\n\\nFor example, product(A, B) returns the same as: ((x,y) for x in A for y in B).\\nThe leftmost iterators are in the outermost for-loop, so the output tuples\\ncycle in a manner similar to an odometer (with the rightmost element changing\\non every iteration).\\n\\nTo compute the product of an iterable with itself, specify the number\\nof repetitions with the optional repeat keyword argument. For example,\\nproduct(A, repeat=4) means the same as product(A, A, A, A).\\n\\nproduct(\'ab\', range(3)) --\x3e (\'a\',0) (\'a\',1) (\'a\',2) (\'b\',0) (\'b\',1) (\'b\',2)\\nproduct((0,1), (0,1), (0,1)) --\x3e (0,0,0) (0,0,1) (0,1,0) (0,1,1) (1,0,0) ...",tp$new(b,c){let[d]=Sk.abstr.copyKeywordsToNamedArgs("product",["repeat"],[],c,[new Sk.builtin.int_(1)]);if(d=Sk.misceval.asIndexSized(d,Sk.builtin.OverFlowError),0>d)throw new Sk.builtin.ValueError("repeat argument cannot be negative");const e=[];for(let a=0;a<b.length;a++)e.push(Sk.misceval.arrayFromIterable(b[a]));const f=[].concat(...Array(d).fill(e));if(this===a.product.prototype)return new a.product(f);else{const b=new this.constructor;return a.product.call(b,f),b}}}}),a.repeat=Sk.abstr.buildIteratorClass("itertools.repeat",{constructor:function repeat(a,b){this.object=a,this.times=b,void 0===b&&(this.tp$iternext=()=>this.object)},iternext(){return 0<this.times--?this.object:void 0},slots:{tp$doc:"repeat(object [,times]) -> create an iterator which returns the object\\nfor the specified number of times. If not specified, returns the object\\nendlessly.",tp$new(b,c){let d,e;if([d,e]=Sk.abstr.copyKeywordsToNamedArgs("repeat",["object","times"],b,c,[null]),e=null===e?void 0:Sk.misceval.asIndexSized(e,Sk.builtin.OverFlowError),this===a.repeat.prototype)return new a.repeat(d,e);else{const b=new this.constructor;return a.repeat.call(b,d,e),b}},$r(){return object_repr=Sk.misceval.objectRepr(this.object),times_repr=void 0===this.times?"":", "+(0<=this.times?this.times:0),new Sk.builtin.str(Sk.abstr.typeName(this)+"("+object_repr+times_repr+")")}},methods:{__lenght_hint__:{$meth(){if(void 0===this.times)throw new Sk.builtin.TypeError("len() of unsized object");return new Sk.builtin.int_(this.times)},$flags:{NoArgs:!0},$textsig:null}}}),a.starmap=Sk.abstr.buildIteratorClass("itertools.starmap",{constructor:function starmap(a,b){this.func=a,this.iter=b},iternext(){const a=this.iter.tp$iternext();if(void 0===a)return;const b=Sk.misceval.arrayFromIterable(a),c=Sk.misceval.callsimArray(this.func,b);return c},slots:{tp$new(b,c){let d,e;if([d,e]=Sk.abstr.copyKeywordsToNamedArgs("starmap",["func","iterable"],b,c,[]),e=Sk.abstr.iter(e),d=Sk.builtin.checkNone(d)?Sk.builtin.bool:d,this===a.starmap.prototype)return new a.starmap(d,e);else{const b=new this.constructor;return a.starmap.call(b,d,e),b}}}}),a.takewhile=Sk.abstr.buildIteratorClass("itertools.takewhile",{constructor:function takewhile(a,b){this.predicate=a,this.iter=b},iternext(){const a=this.iter.tp$iternext();if(void 0!==a){const b=Sk.misceval.callsimArray(this.predicate,[a]);if(Sk.misceval.isTrue(b))return a;this.tp$iternext=()=>void 0}},slots:{tp$doc:"takewhile(predicate, iterable) --\x3e takewhile object\\n\\nReturn successive entries from an iterable as long as the \\npredicate evaluates to true for each entry.",tp$new(b,c){Sk.abstr.checkNoKwargs("takewhile",c),Sk.abstr.checkArgsLen("takewhile",b,2,2);const d=b[0],e=Sk.abstr.iter(b[1]);if(this===a.takewhile.prototype)return new a.takewhile(d,e);else{const b=new this.constructor;return a.takewhile.call(b,d,e),b}}}}),a.tee=new Sk.builtin.func(function(){throw new Sk.builtin.NotImplementedError("tee is not yet implemented in Skulpt")}),a.zip_longest=Sk.abstr.buildIteratorClass("itertools.zip_longest",{constructor:function zip_longest(a,b){this.iters=a,this.fillvalue=b,this.active=this.iters.length},iternext(){if(!this.active)return;let b;const c=[];for(let d=0;d<this.iters.length;d++){if(b=this.iters[d].tp$iternext(),void 0===b){if(this.active--,!this.active)return;this.iters[d]=new a.repeat(this.fillvalue),b=this.fillvalue}c.push(b)}return new Sk.builtin.tuple(c)},slots:{tp$doc:"zip_longest(iter1 [,iter2 [...]], [fillvalue=None]) --\x3e zip_longest object\\n\\nReturn a zip_longest object whose .__next__() method returns a tuple where\\nthe i-th element comes from the i-th iterable argument. The .__next__()\\nmethod continues until the longest iterable in the argument sequence\\nis exhausted and then it raises StopIteration. When the shorter iterables\\nare exhausted, the fillvalue is substituted in their place. The fillvalue\\ndefaults to None or can be specified by a keyword argument.\\n",tp$new(b,c){const[d]=Sk.abstr.copyKeywordsToNamedArgs("zip_longest",["fillvalue"],[],c,[Sk.builtin.none.none$]),e=[];for(let a=0;a<b.length;a++)e.push(Sk.abstr.iter(b[a]));if(this===a.zip_longest.prototype)return new a.zip_longest(e,d);else{const b=new this.constructor;return a.zip_longest.call(b,e,d),b}}}}),a.__doc__=new Sk.builtin.str("An implementation of the python itertools module in Skulpt"),a.__package__=new Sk.builtin.str(""),a};',"src/lib/json/__init__.py":'raise NotImplementedError("json is not yet implemented in Skulpt")\n',"src/lib/json/tests/__init__.py":'raise NotImplementedError("tests is not yet implemented in Skulpt")\n',"src/lib/keyword.py":"\n__all__ = [\"iskeyword\", \"kwlist\"]\n\nkwlist = [\n#--start keywords--\n 'and',\n 'as',\n 'assert',\n 'break',\n 'class',\n 'continue',\n 'def',\n 'del',\n 'elif',\n 'else',\n 'except',\n 'exec',\n 'finally',\n 'for',\n 'from',\n 'global',\n 'if',\n 'import',\n 'in',\n 'is',\n 'lambda',\n 'not',\n 'or',\n 'pass',\n 'print',\n 'raise',\n 'return',\n 'try',\n 'while',\n 'with',\n 'yield',\n#--end keywords--\n ]\n\niskeyword = frozenset(kwlist).__contains__\n\n","src/lib/lib-dynload/__init__.py":'raise NotImplementedError("lib-dynload is not yet implemented in Skulpt")\n',"src/lib/lib-tk/__init__.py":'raise NotImplementedError("lib-tk is not yet implemented in Skulpt")\n',"src/lib/lib2to3/__init__.py":'raise NotImplementedError("lib2to3 is not yet implemented in Skulpt")\n',"src/lib/lib2to3/fixes/__init__.py":'raise NotImplementedError("fixes is not yet implemented in Skulpt")\n',"src/lib/lib2to3/pgen2/__init__.py":'raise NotImplementedError("pgen2 is not yet implemented in Skulpt")\n',"src/lib/lib2to3/tests/__init__.py":'raise NotImplementedError("tests is not yet implemented in Skulpt")\n',"src/lib/linecache.py":'raise NotImplementedError("linecache is not yet implemented in Skulpt")\n',"src/lib/locale.py":'raise NotImplementedError("locale is not yet implemented in Skulpt")\n',"src/lib/logging/__init__.py":'raise NotImplementedError("logging is not yet implemented in Skulpt")\n',"src/lib/macpath.py":'raise NotImplementedError("macpath is not yet implemented in Skulpt")\n',"src/lib/macurl2path.py":'raise NotImplementedError("macurl2path is not yet implemented in Skulpt")\n',"src/lib/mailbox.py":'raise NotImplementedError("mailbox is not yet implemented in Skulpt")\n',"src/lib/mailcap.py":'raise NotImplementedError("mailcap is not yet implemented in Skulpt")\n',"src/lib/markupbase.py":'raise NotImplementedError("markupbase is not yet implemented in Skulpt")\n',"src/lib/math.js":'const $builtinmodule=function(){var a=Math.PI,b=Math.sqrt,c=Number.MAX_SAFE_INTEGER,d=Math.E,e=Math.log,f=Math.exp,g=Math.pow,h=Math.log2,i=Number.isFinite,j=Math.floor,k=Math.abs;const l={pi:new Sk.builtin.float_(a),e:new Sk.builtin.float_(d),tau:new Sk.builtin.float_(2*a),nan:new Sk.builtin.float_(NaN),inf:new Sk.builtin.float_(1/0)},n=function(a){return a=a?0>a?-1:1:0>1/a?-1:1,a},o=18;return Sk.abstr.setUpModuleMethods("math",l,{acos:{$meth:function acos(a){var b=Math.acos;return Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(a)),new Sk.builtin.float_(b(Sk.builtin.asnum$(a)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the arc cosine (measured in radians) of x."},acosh:{$meth:function acosh(a){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(a)),a=Sk.builtin.asnum$(a);const c=a+b(a*a-1);return new Sk.builtin.float_(e(c))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the inverse hyperbolic cosine of x."},asin:{$meth:function asin(a){var b=Math.asin;return Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(a)),new Sk.builtin.float_(b(Sk.builtin.asnum$(a)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the arc sine (measured in radians) of x."},asinh:{$meth:function asinh(a){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(a)),a=Sk.builtin.asnum$(a);const c=a+b(a*a+1);return new Sk.builtin.float_(e(c))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the inverse hyperbolic sine of x."},atan:{$meth:function atan(a){var b=Math.atan;return Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(a)),new Sk.builtin.float_(b(Sk.builtin.asnum$(a)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the arc tangent (measured in radians) of x."},atan2:{$meth:function atan2(a,b){var c=Math.atan2;return Sk.builtin.pyCheckType("y","number",Sk.builtin.checkNumber(a)),Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(b)),new Sk.builtin.float_(c(Sk.builtin.asnum$(a),Sk.builtin.asnum$(b)))},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, y, x, /)",$doc:"Return the arc tangent (measured in radians) of y/x.\\n\\nUnlike atan(y/x), the signs of both x and y are considered."},atanh:{$meth:function atanh(a){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(a)),a=Sk.builtin.asnum$(a);const b=(1+a)/(1-a);return new Sk.builtin.float_(e(b)/2)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the inverse hyperbolic tangent of x."},ceil:{$meth:function ceil(a){var b=Math.ceil;Sk.builtin.pyCheckType("","real number",Sk.builtin.checkNumber(a));const c=Sk.builtin.asnum$(a);return Sk.__future__.ceil_floor_int?new Sk.builtin.int_(b(c)):new Sk.builtin.float_(b(c))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the ceiling of x as an Integral.\\n\\nThis is the smallest integer >= x."},copysign:{$meth:function copysign(a,b){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(a)),Sk.builtin.pyCheckType("y","number",Sk.builtin.checkNumber(b));const c=Sk.builtin.asnum$(b),d=Sk.builtin.asnum$(a),e=n(d),f=n(c);return new Sk.builtin.float_(d*(e*f))},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, y, /)",$doc:"Return a float with the magnitude (absolute value) of x but the sign of y.\\n\\nOn platforms that support signed zeros, copysign(1.0, -0.0)\\nreturns -1.0.\\n"},cos:{$meth:function cos(a){var b=Math.cos;return Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(a)),new Sk.builtin.float_(b(Sk.builtin.asnum$(a)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the cosine of x (measured in radians)."},cosh:{$meth:function cosh(a){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(a)),a=Sk.builtin.asnum$(a);const b=g(d,a);return new Sk.builtin.float_((b+1/b)/2)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the hyperbolic cosine of x."},degrees:{$meth:function degrees(b){Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(b));const c=180/a*Sk.builtin.asnum$(b);return new Sk.builtin.float_(c)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Convert angle x from radians to degrees."},erf:{$meth:function erf(){throw new Sk.builtin.NotImplementedError("math.erf() is not yet implemented in Skulpt")},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Error function at x."},erfc:{$meth:function erfc(){throw new Sk.builtin.NotImplementedError("math.erfc() is not yet implemented in Skulpt")},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Complementary error function at x."},exp:{$meth:function exp(a){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(a));let b=a.v;if("number"!=typeof b&&(b=a.nb$float().v),b==1/0||b==-Infinity||isNaN(b))return new Sk.builtin.float_(f(b));const c=f(b);if(!isFinite(c))throw new Sk.builtin.OverflowError("math range error");return new Sk.builtin.float_(c)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return e raised to the power of x."},expm1:{$meth:function expm1(a){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(a));const b=Sk.builtin.asnum$(a);if(.7>k(b)){const a=f(b);if(1==a)return new Sk.builtin.float_(b);else{const c=(a-1)*b/e(a);return new Sk.builtin.float_(c)}}else{const a=f(b)-1;return new Sk.builtin.float_(a)}},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return exp(x)-1.\\n\\nThis function avoids the loss of precision involved in the direct evaluation of exp(x)-1 for small x."},fabs:{$meth:function fabs(a){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(a));let b=a.v;return JSBI.__isBigInt(b)&&(b=a.nb$float().v),b=k(b),new Sk.builtin.float_(b)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the absolute value of the float x."},factorial:{$meth:function factorial(a){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(a));let b=Sk.builtin.asnum$(a);if(a=j(b),a!=b)throw new Sk.builtin.ValueError("factorial() only accepts integral values");if(0>a)throw new Sk.builtin.ValueError("factorial() not defined for negative numbers");let c=1;for(let b=2;b<=a&&b<=o;b++)c*=b;if(a<=o)return new Sk.builtin.int_(c);c=JSBI.BigInt(c);for(let b=19;b<=a;b++)c=JSBI.multiply(c,JSBI.BigInt(b));return new Sk.builtin.int_(c)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Find x!.\\n\\nRaise a ValueError if x is negative or non-integral."},floor:{$meth:function floor(a){return Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(a)),Sk.__future__.ceil_floor_int?new Sk.builtin.int_(j(Sk.builtin.asnum$(a))):new Sk.builtin.float_(j(Sk.builtin.asnum$(a)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the floor of x as an Integral.\\n\\nThis is the largest integer <= x."},fmod:{$meth:function fmod(a,b){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(a)),Sk.builtin.pyCheckType("y","number",Sk.builtin.checkNumber(b));let c=a.v,d=b.v;if("number"!=typeof c&&(c=a.nb$float().v),"number"!=typeof d&&(d=b.nb$float().v),(d==1/0||d==-Infinity)&&isFinite(c))return new Sk.builtin.float_(c);const e=c%d;if(isNaN(e)&&!isNaN(c)&&!isNaN(d))throw new Sk.builtin.ValueError("math domain error");return new Sk.builtin.float_(e)},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, y, /)",$doc:"Return fmod(x, y), according to platform C.\\n\\nx % y may differ."},frexp:{$meth:function frexp(a){var b=Math.max;Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(a));const c=Sk.builtin.asnum$(a),d=[c,0];if(0!==c&&i(c)){const a=k(c);let e=b(-1023,j(h(a))+1),f=a*g(2,-e);for(;.5>f;)f*=2,e--;for(;1<=f;)f*=.5,e++;0>c&&(f=-f),d[0]=f,d[1]=e}return d[0]=new Sk.builtin.float_(d[0]),d[1]=new Sk.builtin.int_(d[1]),new Sk.builtin.tuple(d)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the mantissa and exponent of x, as pair (m, e).\\n\\nm is a float and e is an int, such that x = m * 2.**e.\\nIf x is 0, m and e are both 0. Else 0.5 <= abs(m) < 1.0."},fsum:{$meth:function fsum(a){if(!Sk.builtin.checkIterable(a))throw new Sk.builtin.TypeError("\'"+Sk.abstr.typeName(a)+"\' object is not iterable");let b=[];a=Sk.abstr.iter(a);let c,d,e;for(let f=a.tp$iternext();void 0!==f;f=a.tp$iternext()){Sk.builtin.pyCheckType("","real number",Sk.builtin.checkNumber(f)),c=0;let a=f.v;"number"!=typeof a&&(a=f.nb$float().v),f=a;for(let a,g=0,h=b.length;g<h;g++){if(a=b[g],k(f)<k(a)){let b=f;f=a,a=b}d=f+a,e=a-(d-f),e&&(b[c]=e,c++),f=d}b=b.slice(0,c).concat([f])}const f=b.reduce(function(c,a){return c+a},0);return new Sk.builtin.float_(f)},$flags:{OneArg:!0},$textsig:"($module, seq, /)",$doc:"Return an accurate floating point sum of values in the iterable seq.\\n\\nAssumes IEEE-754 floating point arithmetic."},gamma:{$meth:function gamma(){throw new Sk.builtin.NotImplementedError("math.gamma() is not yet implemented in Skulpt")},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Gamma function at x."},gcd:{$meth:function gcd(c,a){function _gcd(c,a){return 0==a?c:_gcd(a,c%a)}function _biggcd(c,a){return JSBI.equal(a,JSBI.__ZERO)?c:_biggcd(a,JSBI.remainder(c,a))}Sk.builtin.pyCheckType("a","integer",Sk.builtin.checkInt(c)),Sk.builtin.pyCheckType("b","integer",Sk.builtin.checkInt(a));let b,d=Sk.builtin.asnum$(c),e=Sk.builtin.asnum$(a);return"number"==typeof d&&"number"==typeof e?(d=k(d),e=k(e),b=_gcd(d,e),b=0>b?-b:b,new Sk.builtin.int_(b)):(d=JSBI.BigInt(d),e=JSBI.BigInt(e),b=_biggcd(d,e),JSBI.lessThan(b,JSBI.__ZERO)&&(b=JSBI.multiply(b,JSBI.BigInt(-1))),new Sk.builtin.int_(b.toString()))},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, y, /)",$doc:"greatest common divisor of x and y"},hypot:{$meth:function hypot(a,c){return Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(a)),Sk.builtin.pyCheckType("y","number",Sk.builtin.checkNumber(c)),a=Sk.builtin.asnum$(a),c=Sk.builtin.asnum$(c),new Sk.builtin.float_(b(a*a+c*c))},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, y, /)",$doc:"Return the Euclidean distance, sqrt(x*x + y*y)."},isclose:{$meth:function isclose(c,d){Sk.abstr.checkArgsLen("isclose",c,2,2),rel_abs_vals=Sk.abstr.copyKeywordsToNamedArgs("isclose",["rel_tol","abs_tol"],[],d,[new Sk.builtin.float_(1e-9),new Sk.builtin.float_(0)]);const e=c[0],a=c[1],b=rel_abs_vals[0],f=rel_abs_vals[1];Sk.builtin.pyCheckType("a","number",Sk.builtin.checkNumber(e)),Sk.builtin.pyCheckType("b","number",Sk.builtin.checkNumber(a)),Sk.builtin.pyCheckType("rel_tol","number",Sk.builtin.checkNumber(b)),Sk.builtin.pyCheckType("abs_tol","number",Sk.builtin.checkNumber(f));const g=Sk.builtin.asnum$(e),h=Sk.builtin.asnum$(a),i=Sk.builtin.asnum$(b),j=Sk.builtin.asnum$(f);if(0>i||0>j)throw new Sk.builtin.ValueError("tolerances must be non-negative");if(g==h)return Sk.builtin.bool.true$;if(g==1/0||g==-Infinity||h==1/0||h==-Infinity)return Sk.builtin.bool.false$;const l=k(h-g),m=l<=k(i*h)||l<=k(i*g)||l<=j;return new Sk.builtin.bool(m)},$flags:{FastCall:!0},$textsig:"($module, /, a, b, *, rel_tol=1e-09, abs_tol=0.0)",$doc:"Determine whether two floating point numbers are close in value.\\n\\n rel_tol\\n maximum difference for being considered \\"close\\", relative to the\\n magnitude of the input values\\n abs_tol\\n maximum difference for being considered \\"close\\", regardless of the\\n magnitude of the input values\\n\\nReturn True if a is close in value to b, and False otherwise.\\n\\nFor the values to be considered close, the difference between them\\nmust be smaller than at least one of the tolerances.\\n\\n-inf, inf and NaN behave similarly to the IEEE 754 Standard. That\\nis, NaN is not close to anything, even itself. inf and -inf are\\nonly close to themselves."},isfinite:{$meth:function isfinite(a){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(a));const b=Sk.builtin.asnum$(a);return Sk.builtin.checkInt(a)?Sk.builtin.bool.true$:isFinite(b)?Sk.builtin.bool.true$:Sk.builtin.bool.false$},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return True if x is neither an infinity nor a NaN, and False otherwise."},isinf:{$meth:function isinf(a){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(a));const b=Sk.builtin.asnum$(a);return Sk.builtin.checkInt(a)?Sk.builtin.bool.false$:isFinite(b)||isNaN(b)?Sk.builtin.bool.false$:Sk.builtin.bool.true$},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return True if x is a positive or negative infinity, and False otherwise."},isnan:{$meth:function isnan(a){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(a));const b=Sk.builtin.asnum$(a);return isNaN(b)?Sk.builtin.bool.true$:Sk.builtin.bool.false$},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return True if x is a NaN (not a number), and False otherwise."},ldexp:{$meth:function ldexp(a,b){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(a)),Sk.builtin.pyCheckType("i","integer",Sk.builtin.checkInt(b));let c=a.v;"number"!=typeof c&&(c=a.nb$float().v);const d=Sk.builtin.asnum$(b);if(c==1/0||c==-Infinity||0==c||isNaN(c))return a;const e=c*g(2,d);if(!isFinite(e))throw new Sk.builtin.OverflowError("math range error");return new Sk.builtin.float_(e)},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, i, /)",$doc:"Return x * (2**i).\\n\\nThis is essentially the inverse of frexp()."},lgamma:{$meth:function lgamma(){throw new Sk.builtin.NotImplementedError("math.lgamma() is not yet implemented in Skulpt")},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Natural logarithm of absolute value of Gamma function at x."},log:{$meth:function log(a,b){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(a));let f,g,h=Sk.builtin.asnum$(a);if(0>=h)throw new Sk.builtin.ValueError("math domain error");if(void 0===b?f=d:(Sk.builtin.pyCheckType("base","number",Sk.builtin.checkNumber(b)),f=Sk.builtin.asnum$(b)),0>=f)throw new Sk.builtin.ValueError("math domain error");else if(Sk.builtin.checkFloat(a)||h<c)g=e(h)/e(f);else{h=new Sk.builtin.str(a).$jsstr();const b=h.length,c=parseFloat("0."+h);g=(b*e(10)+e(c))/e(f)}return new Sk.builtin.float_(g)},$flags:{MinArgs:1,MaxArgs:2},$textsig:null,$doc:"log(x, [base=e])\\nReturn the logarithm of x to the given base.\\n\\nIf the base not specified, returns the natural logarithm (base e) of x."},log10:{$meth:function log10(a){var b=Math.log10;Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(a));let d,e=Sk.builtin.asnum$(a);if(0>e)throw new Sk.builtin.ValueError("math domain error");else if(Sk.builtin.checkFloat(a)||e<c)d=b(e);else{e=new Sk.builtin.str(a).$jsstr();const c=e.length,f=parseFloat("0."+e);d=c+b(f)}return new Sk.builtin.float_(d)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the base 10 logarithm of x."},log1p:{$meth:function log1p(a){var b=Number.EPSILON;Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(a));let c=a.v;if("number"!=typeof c&&(c=a.nb$float().v),-1>=c)throw new Sk.builtin.ValueError("math domain error");else{if(0==c)return new Sk.builtin.float_(c);if(k(c)<b/2)return new Sk.builtin.float_(c);if(-.5<=c&&1>=c){const a=1+c,b=e(a)-(a-1-c)/a;return new Sk.builtin.float_(b)}else{const a=e(1+c);return new Sk.builtin.float_(a)}}},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the natural logarithm of 1+x (base e).\\n\\nThe result is computed in a way which is accurate for x near zero."},log2:{$meth:function log2(a){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(a));let b,d=Sk.builtin.asnum$(a);if(0>d)throw new Sk.builtin.ValueError("math domain error");else if(Sk.builtin.checkFloat(a)||d<c)b=h(d);else{d=new Sk.builtin.str(a).$jsstr();const c=d.length,e=parseFloat("0."+d);b=c*h(10)+h(e)}return new Sk.builtin.float_(b)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the base 2 logarithm of x."},modf:{$meth:function modf(a){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(a));let b=Sk.builtin.asnum$(a);if(!isFinite(b)){if(b==1/0)return new Sk.builtin.tuple([new Sk.builtin.float_(0),new Sk.builtin.float_(b)]);if(b==-Infinity)return new Sk.builtin.tuple([new Sk.builtin.float_(-0),new Sk.builtin.float_(b)]);if(isNaN(b))return new Sk.builtin.tuple([new Sk.builtin.float_(b),new Sk.builtin.float_(b)])}const c=n(b);b=k(b);const e=c*j(b),f=c*(b-j(b));return new Sk.builtin.tuple([new Sk.builtin.float_(f),new Sk.builtin.float_(e)])},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the fractional and integer parts of x.\\n\\nBoth results carry the sign of x and are floats."},pow:{$meth:function pow(a,b){var c=Number.isInteger;Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(a)),Sk.builtin.pyCheckType("y","number",Sk.builtin.checkNumber(b));let d=a.v,e=b.v;if("number"!=typeof d&&(d=a.nb$float().v),"number"!=typeof e&&(e=b.nb$float().v),0==d&&0>e)throw new Sk.builtin.ValueError("math domain error");else{if(1==d)return new Sk.builtin.float_(1);if(i(d)&&i(e)&&0>d&&!c(e))throw new Sk.builtin.ValueError("math domain error");else if(-1==d&&(e==-Infinity||e==1/0))return new Sk.builtin.float_(1)}const f=g(d,e);if(!i(d)||!i(e))return new Sk.builtin.float_(f);if(f==1/0||f==-Infinity)throw new Sk.builtin.OverflowError("math range error");return new Sk.builtin.float_(f)},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, y, /)",$doc:"Return x**y (x to the power of y)."},radians:{$meth:function radians(b){Sk.builtin.pyCheckType("deg","number",Sk.builtin.checkNumber(b));const c=a/180*Sk.builtin.asnum$(b);return new Sk.builtin.float_(c)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Convert angle x from degrees to radians."},remainder:{$meth:function remainder(a,b){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(a)),Sk.builtin.pyCheckType("y","number",Sk.builtin.checkNumber(b));let d=a.v,e=b.v;if("number"!=typeof d&&(d=a.nb$float().v),"number"!=typeof e&&(e=b.nb$float().v),isFinite(d)&&isFinite(e)){let a,b,f,c,g;if(0==e)throw new Sk.builtin.ValueError("math domain error");if(a=k(d),b=k(e),c=a%b,f=b-c,c<f)g=c;else if(c>f)g=-f;else{if(c!=f)throw new Sk.builtin.AssertionError;g=c-2*(.5*(a-c)%b)}return new Sk.builtin.float_(n(d)*g)}if(isNaN(d))return a;if(isNaN(e))return b;if(d==1/0||d==-Infinity)throw new Sk.builtin.ValueError("math domain error");if(e!=1/0&&e!=-Infinity)throw new Sk.builtin.AssertionError;return new Sk.builtin.float_(d)},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, y, /)",$doc:"Difference between x and the closest integer multiple of y.\\n\\nReturn x - n*y where n*y is the closest integer multiple of y.\\nIn the case where x is exactly halfway between two multiples of\\ny, the nearest even value of n is used. The result is always exact."},sin:{$meth:function sin(a){var b=Math.sin;return Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(a)),new Sk.builtin.float_(b(Sk.builtin.asnum$(a)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the sine of x (measured in radians)."},sinh:{$meth:function sinh(a){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(a)),a=Sk.builtin.asnum$(a);const b=g(d,a);return new Sk.builtin.float_((b-1/b)/2)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the hyperbolic sine of x."},sqrt:{$meth:function sqrt(a){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(a));const c=Sk.builtin.asnum$(a);if(0>c)throw new Sk.builtin.ValueError("math domain error");return new Sk.builtin.float_(b(c))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the square root of x."},tan:{$meth:function tan(a){var b=Math.tan;return Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(a)),new Sk.builtin.float_(b(Sk.builtin.asnum$(a)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the tangent of x (measured in radians)."},tanh:{$meth:function tanh(a){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(a));const b=Sk.builtin.asnum$(a);if(0===b)return new Sk.builtin.float_(b);const c=g(d,b),e=1/c;return new Sk.builtin.float_((c-e)/2/((c+e)/2))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the hyperbolic tangent of x."},trunc:{$meth:function trunc(a){return Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(a)),Sk.builtin.checkInt(a)?a:new Sk.builtin.int_(0|Sk.builtin.asnum$(a))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Truncates the Real x to the nearest Integral toward 0.\\n\\nUses the __trunc__ magic method."}}),l};',"src/lib/md5.py":'raise NotImplementedError("md5 is not yet implemented in Skulpt")\n',"src/lib/mhlib.py":'raise NotImplementedError("mhlib is not yet implemented in Skulpt")\n',"src/lib/mimetools.py":'raise NotImplementedError("mimetools is not yet implemented in Skulpt")\n',"src/lib/mimetypes.py":'raise NotImplementedError("mimetypes is not yet implemented in Skulpt")\n',"src/lib/mimify.py":'raise NotImplementedError("mimify is not yet implemented in Skulpt")\n',"src/lib/modulefinder.py":'raise NotImplementedError("modulefinder is not yet implemented in Skulpt")\n',"src/lib/multifile.py":'raise NotImplementedError("multifile is not yet implemented in Skulpt")\n',"src/lib/multiprocessing/__init__.py":'raise NotImplementedError("multiprocessing is not yet implemented in Skulpt")\n',"src/lib/multiprocessing/dummy/__init__.py":'raise NotImplementedError("dummy is not yet implemented in Skulpt")\n',"src/lib/mutex.py":'raise NotImplementedError("mutex is not yet implemented in Skulpt")\n',"src/lib/netrc.py":'raise NotImplementedError("netrc is not yet implemented in Skulpt")\n',"src/lib/new.py":'raise NotImplementedError("new is not yet implemented in Skulpt")\n',"src/lib/nntplib.py":'raise NotImplementedError("nntplib is not yet implemented in Skulpt")\n',"src/lib/ntpath.py":'raise NotImplementedError("ntpath is not yet implemented in Skulpt")\n',"src/lib/nturl2path.py":'raise NotImplementedError("nturl2path is not yet implemented in Skulpt")\n',"src/lib/numbers.py":"Number = (int, float, complex)\nIntegral = int\nComplex = complex\n","src/lib/opcode.py":'raise NotImplementedError("opcode is not yet implemented in Skulpt")\n',"src/lib/operator.js":'function $builtinmodule(){return operator={__name__:new Sk.builtin.str("operator"),__doc__:new Sk.builtin.str("Operator interface.\\n\\nThis module exports a set of functions implemented in javascript corresponding\\nto the intrinsic operators of Python. For example, operator.add(x, y)\\nis equivalent to the expression x+y. The function names are those\\nused for special methods; variants without leading and trailing\\n\'__\' are also provided for convenience."),__all__:new Sk.builtin.list(["abs","add","and_","attrgetter","concat","contains","countOf","delitem","eq","floordiv","ge","getitem","gt","iadd","iand","iconcat","ifloordiv","ilshift","imatmul","imod","imul","index","indexOf","inv","invert","ior","ipow","irshift","is_","is_not","isub","itemgetter","itruediv","ixor","le","length_hint","lshift","lt","matmul","methodcaller","mod","mul","ne","neg","not_","or_","pos","pow","rshift","setitem","sub","truediv","truth","xor"].map(a=>new Sk.builtin.str(a)))},operator.itemgetter=Sk.abstr.buildNativeClass("operator.itemgetter",{constructor:function itemgetter(a){this.items=a,this.oneitem=1===a.length,this.item=a[0],this.in$repr=!1},slots:{tp$getattr:Sk.generic.getAttr,tp$new(a,b){return Sk.abstr.checkNoKwargs("itemgetter",b),Sk.abstr.checkArgsLen("itemgetter",a,1),new operator.itemgetter(a)},tp$call(a,b){Sk.abstr.checkNoKwargs("itemgetter",b),Sk.abstr.checkArgsLen("itemgetter",a,1,1);const c=a[0];return this.oneitem?Sk.abstr.objectGetItem(c,this.item,!0):new Sk.builtin.tuple(this.items.map(a=>Sk.abstr.objectGetItem(c,a)))},tp$doc:"Return a callable object that fetches the given item(s) from its operand.\\n After f = itemgetter(2), the call f(r) returns r[2].\\n After g = itemgetter(2, 5, 3), the call g(r) returns (r[2], r[5], r[3])",$r(){if(this.in$repr)return new Sk.builtin.str(this.tp$name+"(...)");this.in$repr=!0;const a=this.tp$name+"("+this.items.map(a=>Sk.misceval.objectRepr(a)).join(", ")+")";return this.in$repr=!1,a}}}),operator.attrgetter=Sk.abstr.buildNativeClass("operator.attrgetter",{constructor:function attrgetter(a){this.attrs=a,this.oneattr=1===a.length,this.attr=a[0],this.in$repr=!1},slots:{tp$getattr:Sk.generic.getAttr,tp$new(a,b){Sk.abstr.checkNoKwargs("attrgetter",b),Sk.abstr.checkArgsLen("attrgetter",a,1);const c=[];for(let d=0;d<a.length;d++){const b=a[d];if(!Sk.builtin.checkString(b))throw new Sk.builtin.TypeError("attribute name must be a string");b.v.includes(".")?c.push(b.$jsstr().split(".").map(a=>new Sk.builtin.str(a))):c.push([b])}return new operator.attrgetter(c)},tp$call(a,b){Sk.abstr.checkNoKwargs("attrgetter",b),Sk.abstr.checkArgsLen("attrgetter",a,1,1);const c=a[0];if(this.oneattr)return this.attr.reduce((a,b)=>Sk.abstr.gattr(a,b),c);const d=this.attrs.map(a=>a.reduce((a,b)=>Sk.abstr.gattr(a,b),c));return new Sk.builtin.tuple(d)},tp$doc:"attrgetter(attr, ...) --\x3e attrgetter object\\n\\nReturn a callable object that fetches the given attribute(s) from its operand.\\nAfter f = attrgetter(\'name\'), the call f(r) returns r.name.\\nAfter g = attrgetter(\'name\', \'date\'), the call g(r) returns (r.name, r.date).\\nAfter h = attrgetter(\'name.first\', \'name.last\'), the call h(r) returns\\n(r.name.first, r.name.last).",$r(){if(this.in$repr)return new Sk.builtin.str(this.tp$name+"(...)");this.in$repr=!0;const a=this.tp$name+"("+this.items.map(a=>Sk.misceval.objectRepr(a)).join(", ")+")";return this.in$repr=!1,a}}}),operator.methodcaller=Sk.abstr.buildNativeClass("operator.methodcaller",{constructor:function methodcaller(a,b,c){this.$name=a,this.args=b,this.kwargs=c||[],this.in$repr=!1},slots:{tp$getattr:Sk.generic.getAttr,tp$new(a,b){Sk.abstr.checkArgsLen("methodcaller",a,1);const c=a[0];if(!Sk.builtin.checkString(c))throw new Sk.builtin.TypeError("method name must be a string");return new operator.methodcaller(c,a.slice(1),b)},tp$call(a,b){Sk.abstr.checkNoKwargs("methodcaller",b),Sk.abstr.checkArgsLen("methodcaller",a,1,1);const c=a[0];return Sk.misceval.chain(Sk.abstr.gattr(c,this.$name,!0),a=>Sk.misceval.callsimOrSuspendArray(a,this.args,this.kwargs))},tp$doc:"methodcaller(name, ...) --\x3e methodcaller object\\n\\nReturn a callable object that calls the given method on its operand.\\nAfter f = methodcaller(\'name\'), the call f(r) returns r.name().\\nAfter g = methodcaller(\'name\', \'date\', foo=1), the call g(r) returns\\nr.name(\'date\', foo=1).",$r(){if(this.in$repr)return new Sk.builtin.str(this.tp$name+"(...)");this.in$repr=!0;let a=[Sk.misceval.objectRepr(this.$name),...this.args.map(a=>Sk.misceval.objectRepr(a))];for(let b=0;b<this.kwargs.length;b+=2)a.push(this.kwargs[b]+"="+Sk.misceval.objectRepr(this.kwargs[b+1]));return a=this.tp$name+"("+a.join(", ")+")",this.in$repr=!1,a}}}),Sk.abstr.setUpModuleMethods("operator",operator,{lt:{$meth:function lt(c,a){return Sk.builtin.bool(Sk.misceval.richCompareBool(c,a,"Lt"))},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a < b."},le:{$meth:function le(c,a){return Sk.builtin.bool(Sk.misceval.richCompareBool(c,a,"LtE"))},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a <= b."},eq:{$meth:function eq(c,a){return Sk.builtin.bool(Sk.misceval.richCompareBool(c,a,"Eq"))},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a == b."},ne:{$meth:function ne(c,a){return Sk.builtin.bool(Sk.misceval.richCompareBool(c,a,"NotEq"))},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a != b."},ge:{$meth:function ge(c,a){return Sk.builtin.bool(Sk.misceval.richCompareBool(c,a,"GtE"))},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a >= b."},gt:{$meth:function gt(c,a){return Sk.builtin.bool(Sk.misceval.richCompareBool(c,a,"Gt"))},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a > b."},not_:{$meth:function not_(a){return Sk.abstr.numberUnaryOp(a,"Not")},$flags:{OneArg:!0},$textsig:"($module, a, /)",$doc:"Same as not a."},truth:{$meth:function truth(a){return Sk.builtin.bool(a)},$flags:{OneArg:!0},$textsig:"($module, a, /)",$doc:"Return True if a is true, False otherwise."},is_:{$meth:function is_(c,a){return Sk.builtin.bool(Sk.misceval.richCompareBool(c,a,"Is"))},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a is b."},is_not:{$meth:function is_not(c,a){return Sk.builtin.bool(Sk.misceval.richCompareBool(c,a,"IsNot"))},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a is not b."},abs:{$meth:function abs(a){return Sk.builtin.abs(a)},$flags:{OneArg:!0},$textsig:"($module, a, /)",$doc:"Same as abs(a)."},add:{$meth:function add(c,a){return Sk.abstr.numberBinOp(c,a,"Add")},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a + b."},and_:{$meth:function and_(c,a){return Sk.abstr.numberBinOp(c,a,"BitAnd")},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a & b."},floordiv:{$meth:function floordiv(c,a){return Sk.abstr.numberBinOp(c,a,"FloorDiv")},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a // b."},index:{$meth:function index(b){return new Sk.builtin.int_(Sk.misceval.asIndexOrThrow(b))},$flags:{OneArg:!0},$textsig:"($module, a, /)",$doc:"Same as a.__index__()"},inv:{$meth:function inv(a){return Sk.abstr.numberUnaryOp(a,"Invert")},$flags:{OneArg:!0},$textsig:"($module, a, /)",$doc:"Same as ~a."},invert:{$meth:function invert(a){return Sk.abstr.numberUnaryOp(a,"Invert")},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, /)",$doc:"Same as ~a."},lshift:{$meth:function lshift(c,a){return Sk.abstr.numberBinOp(c,a,"LShift")},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a << b."},mod:{$meth:function mod(c,a){return Sk.abstr.numberBinOp(c,a,"Mod")},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a % b."},mul:{$meth:function mul(c,a){return Sk.abstr.numberBinOp(c,a,"Mult")},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a * b."},matmul:{$meth:function matmul(c,a){return Sk.abstr.numberBinOp(c,a,"MatMult")},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a @ b."},neg:{$meth:function neg(a){return Sk.abstr.numberUnaryOp(a,"USub")},$flags:{OneArg:!0},$textsig:"($module, a, /)",$doc:"Same as -a."},or_:{$meth:function or_(c,a){return Sk.abstr.numberBinOp(c,a,"BitOr")},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a | b."},pos:{$meth:function pos(a){return Sk.abstr.numberUnaryOp(a,"UAdd")},$flags:{OneArg:!0},$textsig:"($module, a, /)",$doc:"Same as +a."},pow:{$meth:function pow(c,a){return Sk.abstr.numberBinOp(c,a,"Pow")},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a ** b."},rshift:{$meth:function rshift(c,a){return Sk.abstr.numberBinOp(c,a,"RShift")},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a >> b."},sub:{$meth:function sub(c,a){return Sk.abstr.numberBinOp(c,a,"Sub")},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a - b."},truediv:{$meth:function div(c,a){return Sk.abstr.numberBinOp(c,a,"Div")},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a / b."},xor:{$meth:function xor(c,a){return Sk.abstr.numberBinOp(c,a,"BitXor")},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a ^ b."},concat:{$meth:function concat(c,a){return Sk.abstr.sequenceConcat(c,a)},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a + b, for a and b sequences."},contains:{$meth:function contains(c,a){return Sk.builtin.bool(Sk.abstr.sequenceContains(c,a))},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as b in a (note reversed operands)."},countOf:{$meth:function countOf(c,a){return Sk.abstr.sequenceGetCountOf(c,a)},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Return the number of times b occurs in a."},delitem:{$meth:function delitem(c,a){return Sk.misceval.chain(Sk.abstr.objectDelItem(c,a,!0),()=>Sk.builtin.none.none$)},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as del a[b]."},getitem:{$meth:function getitem(c,a){return Sk.abstr.objectGetItem(c,a)},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a[b]."},indexOf:{$meth:function indexOf(c,a){return Sk.abstr.sequenceGetIndexOf(c,a)},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Return the first index of b in a."},setitem:{$meth:function setitem(d,a,b){return Sk.misceval.chain(Sk.abstr.objectSetItem(d,a,b,!0),()=>Sk.builtin.none.none$)},$flags:{MinArgs:3,MaxArgs:3},$textsig:"($module, a, b, c, /)",$doc:"Same as a[b] = c."},length_hint:{$meth:function length_hint(a,b){if(void 0===b)b=new Sk.builtin.int_(0);else if(!Sk.builtin.checkInt(b))throw new Sk.builtin.TypeError("\'"+Sk.abstr.typeName(b)+"\' object cannot be interpreted as an integer");try{return Sk.builtin.len(a)}catch(a){if(!(a instanceof Sk.builtin.TypeError))throw a}const c=Sk.abstr.lookupSpecial(a,Sk.builtin.str.$length_hint);if(void 0!==c){const a=Sk.misceval.callsimArray(c,[]);if(a===Sk.builtin.NotImplemented.NotImplemented$)return b;if(!Sk.builtin.checkInteger(a))throw new Sk.builtin.TypeError("__length_hint__ must be an integer, not "+Sk.abstr.typeName(a));else if(a.nb$isnegative())throw new Sk.builtin.TypeError("__length_hint__() should return >= 0");return a}return b},$flags:{MinArgs:1,MaxArgs:2},$textsig:"($module, obj, default=0, /)",$doc:"Return an estimate of the number of items in obj.\\n\\nThis is useful for presizing containers when building from an iterable.\\n\\nIf the object supports len(), the result will be exact.\\nOtherwise, it may over- or under-estimate by an arbitrary amount.\\nThe result will be an integer >= 0."},iadd:{$meth:function iadd(c,a){return Sk.abstr.numberInplaceBinOp(c,a,"Add")},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a += b."},iand:{$meth:function iand(c,a){return Sk.abstr.numberInplaceBinOp(c,a,"BitAnd")},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a &= b."},iconcat:{$meth:function iconcat(c,a){if(void 0!==c.sq$inplace_concat)return c.sq$inplace_concat(a);if(void 0!==c.sq$concat)return c.sq$concat(a);if(!Sk.builtin.checkSequence(c)||!Sk.builtin.checkSequence(a))throw new Sk.builtin.TypeError(Sk.abstr.typeName(c)+" object can\'t be concatenated");return Sk.abstr.numberInplaceBinOp(c,a,"Add")},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a += b, for a and b sequences."},ifloordiv:{$meth:function ifloordiv(c,a){return Sk.abstr.numberInplaceBinOp(c,a,"FloorDiv")},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a //= b."},ilshift:{$meth:function ilshift(c,a){return Sk.abstr.numberInplaceBinOp(c,a,"LShift")},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a <<= b."},imod:{$meth:function imod(c,a){return Sk.abstr.numberInplaceBinOp(c,a,"Mod")},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a %= b."},imul:{$meth:function imul(c,a){return Sk.abstr.numberInplaceBinOp(c,a,"Mult")},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a *= b."},imatmul:{$meth:function imatmul(c,a){return Sk.abstr.numberInplaceBinOp(c,a,"MatMult")},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a @= b."},ior:{$meth:function ior(c,a){return Sk.abstr.numberInplaceBinOp(c,a,"BitOr")},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a |= b."},ipow:{$meth:function ipow(c,a){return Sk.abstr.numberInplaceBinOp(c,a,"Pow")},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a **= b."},irshift:{$meth:function irshift(c,a){return Sk.abstr.numberInplaceBinOp(c,a,"LRhift")},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a >>= b."},isub:{$meth:function isub(c,a){return Sk.abstr.numberInplaceBinOp(c,a,"Sub")},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a -= b."},itruediv:{$meth:function idiv(c,a){return Sk.abstr.numberInplaceBinOp(c,a,"Div")},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a /= b."},ixor:{$meth:function ixor(c,a){return Sk.abstr.numberInplaceBinOp(c,a,"BitXor")},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, a, b, /)",$doc:"Same as a ^= b."}}),Object.assign(operator,{__abs__:operator.abs,__add__:operator.add,__and__:operator.and,__concat__:operator.concat,__contains__:operator.contains,__delitem__:operator.delitem,__eq__:operator.eq,__floordiv__:operator.floordiv,__ge__:operator.ge,__getitem__:operator.getitem,__gt__:operator.gt,__iadd__:operator.iadd,__iand__:operator.iand,__iconcat__:operator.iconcat,__ifloordiv__:operator.ifloordiv,__ilshift__:operator.ilshift,__imatmul__:operator.imatmul,__imod__:operator.imod,__imul__:operator.imul,__index__:operator.index,__inv__:operator.inv,__invert__:operator.invert,__ior__:operator.ior,__ipow__:operator.ipow,__irshift__:operator.irshift,__isub__:operator.isub,__itruediv__:operator.itruediv,__ixor__:operator.ixor,__le__:operator.le,__lshift__:operator.lshift,__lt__:operator.lt,__matmul__:operator.matmul,__mod__:operator.mod,__mul__:operator.mul,__ne__:operator.ne,__neg__:operator.neg,__not__:operator.not,__or__:operator.or,__pos__:operator.pos,__pow__:operator.pow,__rshift__:operator.rshift,__setitem__:operator.setitem,__sub__:operator.sub,__truediv__:operator.truediv,__xor__:operator.xor,_abs:Sk.builtins.abs,div:operator.truediv,__div__:operator.truediv}),operator}',"src/lib/optparse.py":'raise NotImplementedError("optparse is not yet implemented in Skulpt")\n',"src/lib/os.py":'raise NotImplementedError("os is not yet implemented in Skulpt")\n',"src/lib/os2emxpath.py":'raise NotImplementedError("os2emxpath is not yet implemented in Skulpt")\n',"src/lib/pdb.py":'raise NotImplementedError("pdb is not yet implemented in Skulpt")\n',"src/lib/pickle.py":'raise NotImplementedError("pickle is not yet implemented in Skulpt")\n',"src/lib/pickletools.py":'raise NotImplementedError("pickletools is not yet implemented in Skulpt")\n',"src/lib/pipes.py":'raise NotImplementedError("pipes is not yet implemented in Skulpt")\n',"src/lib/pkgutil.py":'raise NotImplementedError("pkgutil is not yet implemented in Skulpt")\n',"src/lib/platform.js":'var $builtinmodule=function(){var a={},b="undefined"!=typeof window&&"undefined"!=typeof window.navigator;return a.python_implementation=new Sk.builtin.func(function(){return Sk.builtin.pyCheckArgsLen("python_implementation",arguments.length,0,0),new Sk.builtin.str("Skulpt")}),a.node=new Sk.builtin.func(function(){return Sk.builtin.pyCheckArgsLen("node",arguments.length,0,0),new Sk.builtin.str("")}),a.version=new Sk.builtin.func(function(){return Sk.builtin.pyCheckArgsLen("version",arguments.length,0,0),new Sk.builtin.str("")}),a.python_version=new Sk.builtin.func(function(){var a;return Sk.builtin.pyCheckArgsLen("python_version",arguments.length,0,0),a=Sk.__future__.python_version?"3.2.0":"2.7.0",new Sk.builtin.str(a)}),a.system=new Sk.builtin.func(function(){var a;return Sk.builtin.pyCheckArgsLen("system",arguments.length,0,0),a=b?window.navigator.appCodeName:"",new Sk.builtin.str(a)}),a.machine=new Sk.builtin.func(function(){var a;return Sk.builtin.pyCheckArgsLen("machine",arguments.length,0,0),a=b?window.navigator.platform:"",new Sk.builtin.str(a)}),a.release=new Sk.builtin.func(function(){var a;return Sk.builtin.pyCheckArgsLen("release",arguments.length,0,0),a=b?window.navigator.appVersion:"",new Sk.builtin.str(a)}),a.architecture=new Sk.builtin.func(function(){return Sk.builtin.pyCheckArgsLen("architecture",arguments.length,0,0),new Sk.builtin.tuple([new Sk.builtin.str("64bit"),new Sk.builtin.str("")])}),a.processor=new Sk.builtin.func(function(){return Sk.builtin.pyCheckArgsLen("processor",arguments.length,0,0),new Sk.builtin.str("")}),a};',"src/lib/platform.py":'raise NotImplementedError("platform is not yet implemented in Skulpt")\n',"src/lib/plistlib.py":'raise NotImplementedError("plistlib is not yet implemented in Skulpt")\n',"src/lib/popen2.py":'raise NotImplementedError("popen2 is not yet implemented in Skulpt")\n',"src/lib/poplib.py":'raise NotImplementedError("poplib is not yet implemented in Skulpt")\n',"src/lib/posixfile.py":'raise NotImplementedError("posixfile is not yet implemented in Skulpt")\n',"src/lib/posixpath.py":'raise NotImplementedError("posixpath is not yet implemented in Skulpt")\n',"src/lib/pprint.py":'raise NotImplementedError("pprint is not yet implemented in Skulpt")\n',"src/lib/processing.js":'var $builtinmodule=function(){var b,c,d,e,f,g,h,a=Math.PI,j={__name__:new Sk.builtin.str("processing")},k=[],l=!0,m=null;return j.processing=null,j.p=null,j.X=new Sk.builtin.int_(0),j.Y=new Sk.builtin.int_(1),j.Z=new Sk.builtin.int_(2),j.R=new Sk.builtin.int_(3),j.G=new Sk.builtin.int_(4),j.B=new Sk.builtin.int_(5),j.A=new Sk.builtin.int_(6),j.U=new Sk.builtin.int_(7),j.V=new Sk.builtin.int_(8),j.NX=new Sk.builtin.int_(9),j.NY=new Sk.builtin.int_(10),j.NZ=new Sk.builtin.int_(11),j.EDGE=new Sk.builtin.int_(12),j.SR=new Sk.builtin.int_(13),j.SG=new Sk.builtin.int_(14),j.SB=new Sk.builtin.int_(15),j.SA=new Sk.builtin.int_(16),j.SW=new Sk.builtin.int_(17),j.TX=new Sk.builtin.int_(18),j.TY=new Sk.builtin.int_(19),j.TZ=new Sk.builtin.int_(20),j.VX=new Sk.builtin.int_(21),j.VY=new Sk.builtin.int_(22),j.VZ=new Sk.builtin.int_(23),j.VW=new Sk.builtin.int_(24),j.AR=new Sk.builtin.int_(25),j.AG=new Sk.builtin.int_(26),j.AB=new Sk.builtin.int_(27),j.DR=new Sk.builtin.int_(3),j.DG=new Sk.builtin.int_(4),j.DB=new Sk.builtin.int_(5),j.DA=new Sk.builtin.int_(6),j.SPR=new Sk.builtin.int_(28),j.SPG=new Sk.builtin.int_(29),j.SPB=new Sk.builtin.int_(30),j.SHINE=new Sk.builtin.int_(31),j.ER=new Sk.builtin.int_(32),j.EG=new Sk.builtin.int_(33),j.EB=new Sk.builtin.int_(34),j.BEEN_LIT=new Sk.builtin.int_(35),j.VERTEX_FIELD_COUNT=new Sk.builtin.int_(36),j.CENTER=new Sk.builtin.int_(3),j.RADIUS=new Sk.builtin.int_(2),j.CORNERS=new Sk.builtin.int_(1),j.CORNER=new Sk.builtin.int_(0),j.DIAMETER=new Sk.builtin.int_(3),j.BASELINE=new Sk.builtin.int_(0),j.TOP=new Sk.builtin.int_(101),j.BOTTOM=new Sk.builtin.int_(102),j.NORMAL=new Sk.builtin.int_(1),j.NORMALIZED=new Sk.builtin.int_(1),j.IMAGE=new Sk.builtin.int_(2),j.MODEL=new Sk.builtin.int_(4),j.SHAPE=new Sk.builtin.int_(5),j.AMBIENT=new Sk.builtin.int_(0),j.DIRECTIONAL=new Sk.builtin.int_(1),j.SPOT=new Sk.builtin.int_(3),j.RGB=new Sk.builtin.int_(1),j.ARGB=new Sk.builtin.int_(2),j.HSB=new Sk.builtin.int_(3),j.ALPHA=new Sk.builtin.int_(4),j.CMYK=new Sk.builtin.int_(5),j.TIFF=new Sk.builtin.int_(0),j.TARGA=new Sk.builtin.int_(1),j.JPEG=new Sk.builtin.int_(2),j.GIF=new Sk.builtin.int_(3),j.MITER=new Sk.builtin.str("miter"),j.BEVEL=new Sk.builtin.str("bevel"),j.ROUND=new Sk.builtin.str("round"),j.SQUARE=new Sk.builtin.str("butt"),j.PROJECT=new Sk.builtin.str("square"),j.P2D=new Sk.builtin.int_(1),j.JAVA2D=new Sk.builtin.int_(1),j.WEBGL=new Sk.builtin.int_(2),j.P3D=new Sk.builtin.int_(2),j.OPENGL=new Sk.builtin.int_(2),j.PDF=new Sk.builtin.int_(0),j.DXF=new Sk.builtin.int_(0),j.OTHER=new Sk.builtin.int_(0),j.WINDOWS=new Sk.builtin.int_(1),j.MAXOSX=new Sk.builtin.int_(2),j.LINUX=new Sk.builtin.int_(3),j.EPSILON=new Sk.builtin.float_(1e-4),j.MAX_FLOAT=new Sk.builtin.float_(34028235e31),j.MIN_FLOAT=new Sk.builtin.float_(-34028235e31),j.MAX_INT=new Sk.builtin.int_(2147483647),j.MIN_INT=new Sk.builtin.int_(-2147483648),j.HALF_PI=new Sk.builtin.float_(a/2),j.THIRD_PI=new Sk.builtin.float_(a/3),j.PI=new Sk.builtin.float_(a),j.TWO_PI=new Sk.builtin.float_(2*a),j.TAU=new Sk.builtin.float_(2*a),j.QUARTER_PI=new Sk.builtin.float_(a/4),j.DEG_TO_RAD=new Sk.builtin.float_(a/180),j.RAD_TO_DEG=new Sk.builtin.float_(180/a),j.WHITESPACE=new Sk.builtin.str(" \\t\\n\\r\\f\\xA0"),j.POINT=new Sk.builtin.int_(2),j.POINTS=new Sk.builtin.int_(2),j.LINE=new Sk.builtin.int_(4),j.LINES=new Sk.builtin.int_(4),j.TRIANGLE=new Sk.builtin.int_(8),j.TRIANGLES=new Sk.builtin.int_(9),j.TRIANGLE_FAN=new Sk.builtin.int_(11),j.TRIANGLE_STRIP=new Sk.builtin.int_(10),j.QUAD=new Sk.builtin.int_(16),j.QUADS=new Sk.builtin.int_(16),j.QUAD_STRIP=new Sk.builtin.int_(17),j.POLYGON=new Sk.builtin.int_(20),j.PATH=new Sk.builtin.int_(21),j.RECT=new Sk.builtin.int_(30),j.ELLIPSE=new Sk.builtin.int_(31),j.ARC=new Sk.builtin.int_(32),j.SPHERE=new Sk.builtin.int_(40),j.BOX=new Sk.builtin.int_(41),j.GROUP=new Sk.builtin.int_(0),j.PRIMITIVE=new Sk.builtin.int_(1),j.GEOMETRY=new Sk.builtin.int_(3),j.VERTEX=new Sk.builtin.int_(0),j.BEZIER_VERTEX=new Sk.builtin.int_(1),j.CURVE_VERTEX=new Sk.builtin.int_(2),j.BREAK=new Sk.builtin.int_(3),j.CLOSESHAPE=new Sk.builtin.int_(4),j.REPLACE=new Sk.builtin.int_(0),j.BLEND=new Sk.builtin.int_(1),j.ADD=new Sk.builtin.int_(2),j.SUBTRACT=new Sk.builtin.int_(4),j.LIGHTEST=new Sk.builtin.int_(8),j.DARKEST=new Sk.builtin.int_(16),j.DIFFERENCE=new Sk.builtin.int_(32),j.EXCLUSION=new Sk.builtin.int_(64),j.MULTIPLY=new Sk.builtin.int_(128),j.SCREEN=new Sk.builtin.int_(256),j.OVERLAY=new Sk.builtin.int_(512),j.HARD_LIGHT=new Sk.builtin.int_(1024),j.SOFT_LIGHT=new Sk.builtin.int_(2048),j.DODGE=new Sk.builtin.int_(4096),j.BURN=new Sk.builtin.int_(8192),j.ALPHA_MASK=new Sk.builtin.int_(4278190080),j.RED_MASK=new Sk.builtin.int_(16711680),j.GREEN_MASK=new Sk.builtin.int_(65280),j.BLUE_MASK=new Sk.builtin.int_(255),j.CUSTOM=new Sk.builtin.int_(0),j.ORTHOGRAPHIC=new Sk.builtin.int_(2),j.PERSPECTIVE=new Sk.builtin.int_(3),j.ARROW=new Sk.builtin.str("default"),j.CROSS=new Sk.builtin.str("crosshair"),j.HAND=new Sk.builtin.str("pointer"),j.MOVE=new Sk.builtin.str("move"),j.TEXT=new Sk.builtin.str("text"),j.WAIT=new Sk.builtin.str("wait"),j.NOCURSOR=Sk.builtin.assk$("url(\'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==\'), auto"),j.DISABLE_OPENGL_2X_SMOOTH=new Sk.builtin.int_(1),j.ENABLE_OPENGL_2X_SMOOTH=new Sk.builtin.int_(-1),j.ENABLE_OPENGL_4X_SMOOTH=new Sk.builtin.int_(2),j.ENABLE_NATIVE_FONTS=new Sk.builtin.int_(3),j.DISABLE_DEPTH_TEST=new Sk.builtin.int_(4),j.ENABLE_DEPTH_TEST=new Sk.builtin.int_(-4),j.ENABLE_DEPTH_SORT=new Sk.builtin.int_(5),j.DISABLE_DEPTH_SORT=new Sk.builtin.int_(-5),j.DISABLE_OPENGL_ERROR_REPORT=new Sk.builtin.int_(6),j.ENABLE_OPENGL_ERROR_REPORT=new Sk.builtin.int_(-6),j.ENABLE_ACCURATE_TEXTURES=new Sk.builtin.int_(7),j.DISABLE_ACCURATE_TEXTURES=new Sk.builtin.int_(-7),j.HINT_COUNT=new Sk.builtin.int_(10),j.OPEN=new Sk.builtin.int_(1),j.CLOSE=new Sk.builtin.int_(2),j.BLUR=new Sk.builtin.int_(11),j.GRAY=new Sk.builtin.int_(12),j.INVERT=new Sk.builtin.int_(13),j.OPAQUE=new Sk.builtin.int_(14),j.POSTERIZE=new Sk.builtin.int_(15),j.THRESHOLD=new Sk.builtin.int_(16),j.ERODE=new Sk.builtin.int_(17),j.DILATE=new Sk.builtin.int_(18),j.BACKSPACE=new Sk.builtin.int_(8),j.TAB=new Sk.builtin.int_(9),j.ENTER=new Sk.builtin.int_(10),j.RETURN=new Sk.builtin.int_(13),j.ESC=new Sk.builtin.int_(27),j.DELETE=new Sk.builtin.int_(127),j.CODED=new Sk.builtin.int_(65535),j.SHIFT=new Sk.builtin.int_(16),j.CONTROL=new Sk.builtin.int_(17),j.ALT=new Sk.builtin.int_(18),j.CAPSLK=new Sk.builtin.int_(20),j.PGUP=new Sk.builtin.int_(33),j.PGDN=new Sk.builtin.int_(34),j.END=new Sk.builtin.int_(35),j.HOME=new Sk.builtin.int_(36),j.LEFT=new Sk.builtin.int_(37),j.UP=new Sk.builtin.int_(38),j.RIGHT=new Sk.builtin.int_(39),j.DOWN=new Sk.builtin.int_(40),j.F1=new Sk.builtin.int_(112),j.F2=new Sk.builtin.int_(113),j.F3=new Sk.builtin.int_(114),j.F4=new Sk.builtin.int_(115),j.F5=new Sk.builtin.int_(116),j.F6=new Sk.builtin.int_(117),j.F7=new Sk.builtin.int_(118),j.F8=new Sk.builtin.int_(119),j.F9=new Sk.builtin.int_(120),j.F10=new Sk.builtin.int_(121),j.F11=new Sk.builtin.int_(122),j.F12=new Sk.builtin.int_(123),j.NUMLK=new Sk.builtin.int_(144),j.META=new Sk.builtin.int_(157),j.INSERT=new Sk.builtin.int_(155),j.SINCOS_LENGTH=new Sk.builtin.int_(720),j.PRECISIONB=new Sk.builtin.int_(15),j.PRECISIONF=new Sk.builtin.int_(32768),j.PREC_MAXVAL=new Sk.builtin.int_(32767),j.PREC_ALPHA_SHIFT=new Sk.builtin.int_(9),j.PREC_RED_SHIFT=new Sk.builtin.int_(1),j.NORMAL_MODE_AUTO=new Sk.builtin.int_(0),j.NORMAL_MODE_SHAPE=new Sk.builtin.int_(1),j.NORMAL_MODE_VERTEX=new Sk.builtin.int_(2),j.MAX_LIGHTS=new Sk.builtin.int_(8),j.line=new Sk.builtin.func(function(a,b,c,d){j.processing.line(a.v,b.v,c.v,d.v)}),j.ellipse=new Sk.builtin.func(function(a,b,c,d){j.processing.ellipse(a.v,b.v,c.v,d.v)}),j.text=new Sk.builtin.func(function(a,b,c){j.processing.text(a.v,b.v,c.v)}),j.point=new Sk.builtin.func(function(a,b){j.processing.point(a.v,b.v)}),j.arc=new Sk.builtin.func(function(a,b,c,d,e,f){j.processing.arc(a.v,b.v,c.v,d.v,e.v,f.v)}),j.quad=new Sk.builtin.func(function(a,b,c,d,e,f,g,h){j.processing.quad(a.v,b.v,c.v,d.v,e.v,f.v,g.v,h.v)}),j.rect=new Sk.builtin.func(function(a,b,c,d,e){"undefined"==typeof e?j.processing.rect(a.v,b.v,c.v,d.v):j.processing.rect(a.v,b.v,c.v,d.v,e.v)}),j.triangle=new Sk.builtin.func(function(a,b,c,d,e,f){j.processing.triangle(a.v,b.v,c.v,d.v,e.v,f.v)}),j.bezier=new Sk.builtin.func(function(a,b,c,d,e,f,g,h,i,k,l,m){"undefined"==typeof i?j.processing.bezier(a.v,b.v,c.v,d.v,e.v,f.v,g.v,h.v):j.processing.bezier(a.v,b.v,c.v,d.v,e.v,f.v,g.v,h.v,i.v,k.v,l.v,m.v)}),j.alpha=new Sk.builtin.func(function(a,c,d){return"undefined"==typeof c?new Sk.builtin.float_(j.processing.alpha(a.v)):"undefined"==typeof d?new Sk.builtin.float_(j.processing.alpha(a.v,c.v)):new Sk.builtin.float_(j.processing.alpha(a.v,c.v,d.v))}),j.ambient=new Sk.builtin.func(function(a,c,d){"undefined"==typeof c?j.processing.ambient(a.v):"undefined"==typeof d?j.processing.ambient(a.v,c.v):j.processing.ambient(a.v,c.v,d.v)}),j.ambientLight=new Sk.builtin.func(function(a,b,c,d,e,f){"undefined"==typeof d?j.processing.ambientLight(a.v,b.v,c.v):"undefined"==typeof e?j.processing.ambientLight(a.v,b.v,c.v,d.v):"undefined"==typeof f?j.processing.ambientLight(a.v,b.v,c.v,d.v,e.v):j.processing.ambientLight(a.v,b.v,c.v,d.v,e.v,f.v)}),j.beginCamera=new Sk.builtin.func(function(){j.processing.beginCamera()}),j.beginShape=new Sk.builtin.func(function(a){"undefined"==typeof a&&(a=j.POLYGON),j.processing.beginShape(a.v)}),j.bezierDetail=new Sk.builtin.func(function(a){a="undefined"==typeof a?20:a.v,j.processing.bezierDetail(a)}),j.bezierPoint=new Sk.builtin.func(function(e,a,b,c,d){j.processing.bezierPoint(e.v,a.v,b.v,c.v,d.v)}),j.bezierTangent=new Sk.builtin.func(function(e,a,b,c,d){j.processing.bezierTangent(e.v,a.v,b.v,c.v,d.v)}),j.bezierVertex=new Sk.builtin.func(function(a,b,c,d,e,f,g,h,i){"undefined"==typeof g?j.processing.bezierVertex(a.v,b.v,c.v,d.v,e.v,f.v):"undefined"==typeof h?j.processing.bezierVertex(a.v,b.v,c.v,d.v,e.v,f.v,g.v):"undefined"==typeof i?j.processing.bezierVertex(a.v,b.v,c.v,d.v,e.v,f.v,g.v,h.v):j.processing.bezierVertex(a.v,b.v,c.v,d.v,e.v,f.v,g.v,h.v,i.v)}),j.blend=new Sk.builtin.func(function(a,b,c,d,e,f,g,h,i,k){other instanceof Sk.builtin.int_||other instanceof Sk.builtin.float_?j.processing.blend(a.v,b.v,c.v,d.v,e.v,f.v,g.v,h.v,i.v):j.processing.blend(a.v,b.v,c.v,d.v,e.v,f.v,g.v,h.v,i.v,k.v)}),j.blendColor=new Sk.builtin.func(function(a,b,d){var e=Sk.misceval.callsimArray(j.color,[new Sk.builtin.int_(0),new Sk.builtin.int_(0),new Sk.builtin.int_(0)]);return e.v=j.processing.blendColor(a.v,b.v,d.v),e}),j.brightness=new Sk.builtin.func(function(a,c,d){return"undefined"==typeof c?new Sk.builtin.float_(j.processing.brightness(a.v)):"undefined"==typeof d?new Sk.builtin.float_(j.processing.brightness(a.v,c.v)):new Sk.builtin.float_(j.processing.brightness(a.v,c.v,d.v))}),j.camera=new Sk.builtin.func(function(a,b,c,d,e,f,g,h,i){"undefined"==typeof a?j.processing.camera():j.processing.camera(a.v,b.v,c.v,d.v,e.v,f.v,g.v,h.v,i.v)}),j.constrain=new Sk.builtin.func(function(a,b,c){return new Sk.builtin.float_(j.processing.constrain(a.v,b.v,c.v))}),j.copy=new Sk.builtin.func(function(a,b,c,d,e,f,g,h,i){other instanceof Sk.builtin.int_||other instanceof Sk.builtin.float_?j.processing.copy(a.v,b.v,c.v,d.v,e.v,f.v,g.v,h.v):j.processing.copy(a.v,b.v,c.v,d.v,e.v,f.v,g.v,h.v,i.v)}),j.createFont=new Sk.builtin.func(function(a,b,c,d){var e=Sk.misceval.callsimArray(j.PFont);return e.v="undefined"==typeof c?j.processing.createFont(a.v,b.v):"undefined"==typeof d?j.processing.createFont(a.v,b.v,c.v):j.processing.createFont(a.v,b.v,c.v,d.v),e}),j.createGraphics=new Sk.builtin.func(function(a,b,c,d){var e=Sk.misceval.callsimArray(j.PGraphics);return e.v="undefined"==typeof d?j.processing.createGraphics(a.v,b.v,c.v):j.processing.createGraphics(a.v,b.v,c.v,d.v),e}),j.createImage=new Sk.builtin.func(function(a,b,c){var d=Sk.misceval.callsimArray(j.PImage);return d.v=j.processing.createImage(a.v,b.v,c.v),d}),j.cursor=new Sk.builtin.func(function(a,b,c){"undefined"==typeof a?j.processing.cursor():"undefined"==typeof b?j.processing.cursor(a.v):"undefined"==typeof c?j.processing.cursor(a.v,b.v):j.processing.cursor(a.v,b.v,c.v)}),j.curve=new Sk.builtin.func(function(a,b,c,d,e,f,g,h,i,k,l,m){"undefined"==typeof i?j.processing.curve(a.v,b.v,c.v,d.v,e.v,f.v,g.v,h.v):"undefined"==typeof k?j.processing.curve(a.v,b.v,c.v,d.v,e.v,f.v,g.v,h.v,i.v):"undefined"==typeof l?j.processing.curve(a.v,b.v,c.v,d.v,e.v,f.v,g.v,h.v,i.v,k.v):"undefined"==typeof m?j.processing.curve(a.v,b.v,c.v,d.v,e.v,f.v,g.v,h.v,i.v,k.v,l.v):j.processing.curve(a.v,b.v,c.v,d.v,e.v,f.v,g.v,h.v,i.v,k.v,l.v,m.v)}),j.curveDetail=new Sk.builtin.func(function(a){j.processing.curveDetail(a.v)}),j.curvePoint=new Sk.builtin.func(function(e,a,b,c,d){j.processing.curvePoint(e.v,a.v,b.v,c.v,d.v)}),j.curveTangent=new Sk.builtin.func(function(e,a,b,c,d){j.processing.curveTangent(e.v,a.v,b.v,c.v,d.v)}),j.curveTightness=new Sk.builtin.func(function(a){j.processing.curveTightness(a.v)}),j.curveVertex=new Sk.builtin.func(function(a,b,c){"undefined"==typeof c?j.processing.curveVertex(a.v,b.v):j.processing.curveVertex(a.v,b.v,c.v)}),j.day=new Sk.builtin.func(function(){return new Sk.builtin.int_(j.processing.day())}),j.degrees=new Sk.builtin.func(function(a){return new Sk.builtin.float_(j.processing.degrees(a.v))}),j.directionalLight=new Sk.builtin.func(function(a,b,c,d,e,f){j.processing.directionalLight(a.v,b.v,c.v,d.v,e.v,f.v)}),j.dist=new Sk.builtin.func(function(a,b,c,d,e,f){return"undefined"==typeof e?new Sk.builtin.float_(j.processing.dist(a.v,b.v,c.v,d.v)):"undefined"==typeof f?new Sk.builtin.float_(j.processing.dist(a.v,b.v,c.v,d.v,e.v)):new Sk.builtin.float_(j.processing.dist(a.v,b.v,c.v,d.v,e.v,f.v))}),j.emissive=new Sk.builtin.func(function(a,b,c){"undefined"==typeof b?j.processing.emissive(a.v):"undefined"==typeof c?j.processing.emissive(a.v,b.v):j.processing.emissive(a.v,b.v,c.v)}),j.endCamera=new Sk.builtin.func(function(){j.processing.endCamera()}),j.endShape=new Sk.builtin.func(function(a){"undefined"==typeof a?j.processing.endShape():j.processing.endShape(a.v)}),j.filter=new Sk.builtin.func(function(a,b){"undefined"==typeof b?j.processing.filter(a.v):j.processing.filter(a.v,b.v)}),j.frustum=new Sk.builtin.func(function(a,b,c,d,e,f){j.processing.frustum(a,b,c,d,e,f)}),j.hint=new Sk.builtin.func(function(a){j.processing.hint(a)}),j.hour=new Sk.builtin.func(function(){return new Sk.builtin.int_(j.processing.hour())}),j.hue=new Sk.builtin.func(function(a){return new Sk.builtin.float_(j.processing.hue(a.v))}),j.imageMode=new Sk.builtin.func(function(a){j.processing.imageMode(a.v)}),j.lerp=new Sk.builtin.func(function(a,b,c){return new Sk.builtin.float_(j.processing.lerp(a.v,b.v,c.v))}),j.lerpColor=new Sk.builtin.func(function(a,b,d){var e=Sk.misceval.callsimArray(j.color,[new Sk.builtin.int_(0),new Sk.builtin.int_(0),new Sk.builtin.int_(0)]);return e.v=j.processing.lerpColor(a.v,b.v,d.v),e}),j.lightFalloff=new Sk.builtin.func(function(a,b,c){j.processing.lightFalloff(a.v,b.v,c.v)}),j.lights=new Sk.builtin.func(function(){j.processing.lights()}),j.lightSpecular=new Sk.builtin.func(function(a,b,c){j.processing.lightSpecular(a.v,b.v,c.v)}),j.loadBytes=new Sk.builtin.func(function(a){return new Sk.builtin.list(j.processing.loadBytes(a.v))}),j.loadFont=new Sk.builtin.func(function(a){var b=Sk.misceval.callsimArray(j.PFont);return b.v=j.processing.loadFont(a.v),b}),j.loadShape=new Sk.builtin.func(function(a){var b=Sk.misceval.callsimArray(j.PShapeSVG,[new Sk.builtin.str("string"),a]);return b}),j.loadStrings=new Sk.builtin.func(function(a){return new Sk.builtin.list(j.processing.loadStrings(a.v))}),j.mag=new Sk.builtin.func(function(d,a,b){return"undefined"==typeof b?new Sk.builtin.float_(j.processing.mag(d.v,a.v)):new Sk.builtin.float_(j.processing.mag(d.v,a.v,b.v))}),j.map=new Sk.builtin.func(function(a,b,c,d,e){return new Sk.builtin.float_(j.processing.map(a.v,b.v,c.v,d.v,e.v))}),j.millis=new Sk.builtin.func(function(){return new Sk.builtin.int_(j.processing.millis())}),j.minute=new Sk.builtin.func(function(){return new Sk.builtin.int_(j.processing.minute())}),j.modelX=new Sk.builtin.func(function(a,b,c){return new Sk.builtin.float_(j.processing.modelX(a.v,b.v,c.v))}),j.modelY=new Sk.builtin.func(function(a,b,c){return new Sk.builtin.float_(j.processing.modelY(a.v,b.v,c.v))}),j.modelZ=new Sk.builtin.func(function(a,b,c){return new Sk.builtin.float_(j.processing.modelZ(a.v,b.v,c.v))}),j.month=new Sk.builtin.func(function(){return new Sk.builtin.int_(j.processing.month())}),j.noCursor=new Sk.builtin.func(function(){j.processing.noCursor()}),j.noise=new Sk.builtin.func(function(a,b,c){return"undefined"==typeof b?new Sk.builtin.float_(j.processing.noise(a.v)):"undefined"==typeof c?new Sk.builtin.float_(j.processing.noise(a.v,b.v)):new Sk.builtin.float_(j.processing.noise(a.v,b.v,c.v))}),j.noiseDetail=new Sk.builtin.func(function(a,b){j.processing.noiseDetail(a.v,b.v)}),j.noiseSeed=new Sk.builtin.func(function(a){return new Sk.builtin.float_(j.processing.noiseSeed(a.v))}),j.noLights=new Sk.builtin.func(function(){j.processing.noLights()}),j.norm=new Sk.builtin.func(function(a,b,c){return new Sk.builtin.float_(j.processing.norm(a.v,b.v,c.v))}),j.normal=new Sk.builtin.func(function(a,b,c){j.processing.normal(a.v,b.v,c.v)}),j.noTint=new Sk.builtin.func(function(){j.processing.noTint()}),j.ortho=new Sk.builtin.func(function(a,b,c,d,e,f){j.processing.ortho(a.v,b.v,c.v,d.v,e.v,f.v)}),j.perspective=new Sk.builtin.func(function(a,b,c,d){"undefined"==typeof a?j.processing.perspective():"undefined"==typeof b?j.processing.perspective(a.v):"undefined"==typeof c?j.processing.perspective(a.v,b.v):"undefined"==typeof d?j.processing.perspective(a.v,b.v,c.v):j.processing.perspective(a.v,b.v,c.v,d.v)}),j.pointLight=new Sk.builtin.func(function(a,b,c,d,e,f){j.processing.pointLight(a.v,b.v,c.v,d.v,e.v,f.v)}),j.printCamera=new Sk.builtin.func(function(){j.processing.printCamera()}),j.println=new Sk.builtin.func(function(a){j.processing.println(a.v)}),j.printProjection=new Sk.builtin.func(function(){j.processing.printProjection()}),j.radians=new Sk.builtin.func(function(a){return new Sk.builtin.float_(j.processing.radians(a.v))}),j.randomSeed=new Sk.builtin.func(function(a){return new Sk.builtin.float_(j.processing.randomSeed(a.v))}),j.random=new Sk.builtin.func(function(a,b){return"undefined"==typeof a?new Sk.builtin.float_(j.processing.random()):"undefined"==typeof b?new Sk.builtin.float_(j.processing.random(a.v)):new Sk.builtin.float_(j.processing.random(a.v,b.v))}),j.requestImage=new Sk.builtin.func(function(a,b){var c=Sk.misceval.callsimArray(j.PImage);return c.v="undefined"==typeof b?j.processing.requestImage(a.v):j.processing.requestImage(a.v,b.v),c}),j.saturation=new Sk.builtin.func(function(a){return new Sk.builtin.float_(j.processing.saturation(a.v))}),j.save=new Sk.builtin.func(function(a){j.processing.save(a.v)}),j.saveFrame=new Sk.builtin.func(function(a){"undefined"==typeof a?j.processing.saveFrame():j.processing.saveFrame(a.v)}),j.saveStrings=new Sk.builtin.func(function(a,b){j.processing.saveStrings(a.v,b.v)}),j.screenX=new Sk.builtin.func(function(a,b,c){return new Sk.builtin.float_(j.processing.screenX(a.v,b.v,c.v))}),j.screenY=new Sk.builtin.func(function(a,b,c){return new Sk.builtin.float_(j.processing.screenY(a.v,b.v,c.v))}),j.screenZ=new Sk.builtin.func(function(a,b,c){return new Sk.builtin.float_(j.processing.screenZ(a.v,b.v,c.v))}),j.second=new Sk.builtin.func(function(){return new Sk.builtin.int_(j.processing.second())}),j.shape=new Sk.builtin.func(function(a,b,c,d,e){"undefined"==typeof b?j.processing.shape(a.v):"undefined"==typeof c?j.processing.shape(a.v,b.v):"undefined"==typeof d?j.processing.shape(a.v,b.v,c.v):"undefined"==typeof e?j.processing.shape(a.v,b.v,c.v,d.v):j.processing.shape(a.v,b.v,c.v,d.v,e.v)}),j.shapeMode=new Sk.builtin.func(function(a){j.processing.shapeMode(a.v)}),j.shininess=new Sk.builtin.func(function(a){j.processing.shininess(a.v)}),j.specular=new Sk.builtin.func(function(a,b,c){"undefined"==typeof b?j.processing.specular(a.v):"undefined"==typeof c?j.processing.specular(a.v,b.v):j.processing.specular(a.v,b.v,c.v)}),j.spotLight=new Sk.builtin.func(function(a,b,c,d,e,f,g,h){j.processing.spotLight(a.v,b.v,c.v,d.v,e.v,f.v,g.v,h.v)}),j.sq=new Sk.builtin.func(function(a){return new Sk.builtin.float_(j.processing.sq(a))}),j.status=new Sk.builtin.func(function(a){j.processing.status(a.v)}),j.textAlign=new Sk.builtin.func(function(a,b){"undefined"==typeof b?j.processing.textAlign(a.v):j.processing.textAlign(a.v,b.v)}),j.textAscent=new Sk.builtin.func(function(){return new Sk.builtin.float_(j.processing.textAscent())}),j.textDescent=new Sk.builtin.func(function(){return new Sk.builtin.float_(j.processing.textDescent())}),j.textFont=new Sk.builtin.func(function(a,b){"undefined"==typeof b?j.processing.textFont(a.v):j.processing.textFont(a.v,b.v)}),j.textLeading=new Sk.builtin.func(function(a){j.processing.textLeading(a.v)}),j.textMode=new Sk.builtin.func(function(a){j.processing.textMode(a.v)}),j.textSize=new Sk.builtin.func(function(a){j.processing.textSize(a.v)}),j.texture=new Sk.builtin.func(function(a){j.processing.texture(a.v)}),j.textureMode=new Sk.builtin.func(function(a){j.processing.textureMode(a.v)}),j.textWidth=new Sk.builtin.func(function(a){return new Sk.builtin.float_(j.processing.textWidth(a.v))}),j.tint=new Sk.builtin.func(function(a,b,c,d){"undefined"==typeof b?j.processing.tint(a.v):"undefined"==typeof c?j.processing.tint(a.v,b.v):"undefined"==typeof d?j.processing.tint(a.v,b.v,c.v):j.processing.tint(a.v,b.v,c.v,d.v)}),j.updatePixels=new Sk.builtin.func(function(){j.processing.updatePixels()}),j.vertex=new Sk.builtin.func(function(a,b,c,d,e){"undefined"==typeof c?j.processing.vertex(a.v,b.v):"undefined"==typeof d?j.processing.vertex(a.v,b.v,c.v):"undefined"==typeof e?j.processing.vertex(a.v,b.v,c.v,d.v):j.processing.vertex(a.v,b.v,c.v,d.v,e.v)}),j.year=new Sk.builtin.func(function(){return new Sk.builtin.int_(j.processing.year())}),j.box=new Sk.builtin.func(function(a){j.processing.box(a.v)}),j.sphere=new Sk.builtin.func(function(a){j.processing.sphere(a.v)}),j.sphereDetail=new Sk.builtin.func(function(a,b){"undefined"==typeof b?j.processing.sphereDetail(a.v):j.processing.sphereDetail(a.v,b.v)}),j.background=new Sk.builtin.func(function(a,c,d){"undefined"!=typeof c&&(c=c.v),"undefined"!=typeof d&&(d=d.v),j.processing.background(a.v,c,d)}),j.fill=new Sk.builtin.func(function(a,c,d,e){"undefined"!=typeof c&&(c=c.v),"undefined"!=typeof d&&(d=d.v),"undefined"!=typeof e&&(e=e.v),j.processing.fill(a.v,c,d,e)}),j.stroke=new Sk.builtin.func(function(a,c,d,e){"undefined"!=typeof c&&(c=c.v),"undefined"!=typeof d&&(d=d.v),"undefined"!=typeof e&&(e=e.v),j.processing.stroke(a.v,c,d,e)}),j.noStroke=new Sk.builtin.func(function(){j.processing.noStroke()}),j.colorMode=new Sk.builtin.func(function(a,b,c,d,e){b="undefined"==typeof b?255:b.v,"undefined"!=typeof c&&(c=c.v),"undefined"!=typeof d&&(d=d.v),"undefined"!=typeof e&&(e=e.v),j.processing.colorMode(a.v,b,c,d,e)}),j.noFill=new Sk.builtin.func(function(){j.processing.noFill()}),j.loop=new Sk.builtin.func(function(){if(null===j.processing)throw new Sk.builtin.Exception("loop() should be called after run()");l=!0,j.processing.loop()}),j.noLoop=new Sk.builtin.func(function(){if(null===j.processing)throw new Sk.builtin.Exception("noLoop() should be called after run()");l=!1,j.processing.noLoop()}),j.frameRate=new Sk.builtin.func(function(a){j.processing.frameRate(a.v)}),j.width=new Sk.builtin.int_(0),j.height=new Sk.builtin.int_(0),j.renderMode=j.P2D,j.size=new Sk.builtin.func(function(a,b,c){"undefined"==typeof c&&(c=j.P2D),j.processing.size(a.v,b.v,c.v),j.width=new Sk.builtin.int_(j.processing.width),j.height=new Sk.builtin.int_(j.processing.height),j.renderMode=c}),j.exitp=new Sk.builtin.func(function(){j.processing.exit()}),j.mouseX=new Sk.builtin.func(function(){return new Sk.builtin.int_(j.processing.mouseX)}),j.mouseY=new Sk.builtin.func(function(){return new Sk.builtin.int_(j.processing.mouseY)}),j.pmouseX=new Sk.builtin.func(function(){return new Sk.builtin.int_(j.processing.pmouseX)}),j.pmouseY=new Sk.builtin.func(function(){return new Sk.builtin.int_(j.processing.pmouseY)}),j.rectMode=new Sk.builtin.func(function(a){j.processing.rectMode(a.v)}),j.strokeWeight=new Sk.builtin.func(function(a){j.processing.strokeWeight(a.v)}),j.smooth=new Sk.builtin.func(function(){j.processing.smooth()}),j.noSmooth=new Sk.builtin.func(function(){j.processing.noSmooth()}),j.ellipseMode=new Sk.builtin.func(function(a){j.processing.ellipseMode(a.v)}),j.strokeCap=new Sk.builtin.func(function(a){j.processing.strokeCap(a.v)}),j.strokeJoin=new Sk.builtin.func(function(a){j.processing.strokeJoin(a.v)}),j.rotate=new Sk.builtin.func(function(a){j.processing.rotate(a.v)}),j.rotateX=new Sk.builtin.func(function(a){j.processing.rotateX(a.v)}),j.rotateY=new Sk.builtin.func(function(a){j.processing.rotateY(a.v)}),j.rotateZ=new Sk.builtin.func(function(a){j.processing.rotateZ(a.v)}),j.scale=new Sk.builtin.func(function(a,b,c){b="undefined"==typeof b?1:b.v,c="undefined"==typeof c?1:c.v,j.processing.scale(a.v,b,c)}),j.translate=new Sk.builtin.func(function(a,b,c){b="undefined"==typeof b?1:b.v,c="undefined"==typeof c?1:c.v,j.processing.translate(a.v,b,c)}),j.popMatrix=new Sk.builtin.func(function(){j.processing.popMatrix()}),j.pushMatrix=new Sk.builtin.func(function(){j.processing.pushMatrix()}),j.applyMatrix=new Sk.builtin.func(function(){var a,b=Array.prototype.slice.call(arguments,0,16);for(a=0;a<b.length;a++)b[a]="undefined"==typeof b[a]?0:b[a].v;j.processing.applyMatrix.apply(j.processing,b)}),j.resetMatrix=new Sk.builtin.func(function(){j.processing.resetMatrix()}),j.printMatrix=new Sk.builtin.func(function(){return Sk.ffi.remapToPy(j.processing.printMatrix())}),j.run=new Sk.builtin.func(function(){var a=document.getElementById(Sk.canvas);if(!a)throw new Error("Processing module: Canvas element not specified");if(window.Processing.logger={log:function(a){Sk.misceval.print_(a)}},m=window.Processing.getInstanceById(Sk.canvas),m&&m.exit(),j.p=new window.Processing(a,function sketchProc(a){j.processing=a,a.draw=function(){var b=!1;for(var c in k)0===k[c].width&&(b=!0);if(!0==b)return!0===l?void 0:void a.loop();if(!1===l&&a.noLoop(),j.frameCount=a.frameCount,Sk.globals.draw)try{Sk.misceval.callsimArray(Sk.globals.draw)}catch(a){Sk.uncaughtException(a)}};var b=["setup","mouseMoved","mouseClicked","mouseDragged","mouseMoved","mouseOut","mouseOver","mousePressed","mouseReleased","keyPressed","keyReleased","keyTyped"];for(var c in b)Sk.globals[b[c]]&&(a[b[c]]=new Function("try {Sk.misceval.callsimArray(Sk.globals[\'"+b[c]+"\']);} catch(e) {Sk.uncaughtException(e);}"))}),0===j.width.v&&0===j.height.v){var b=a.offsetWidth,c=a.offsetHeight;Sk.misceval.callsimArray(j.size,[new Sk.builtin.int_(b),new Sk.builtin.int_(c),j.renderMode])}}),g=function(a,b){b.__getattr__=new Sk.builtin.func(function(a,b){return(b=Sk.ffi.remapToJs(b),"x"===b)?Sk.builtin.assk$(j.processing.mouseX):"y"===b?Sk.builtin.assk$(j.processing.mouseY):"px"===b?Sk.builtin.assk$(j.processing.pmouseX):"py"===b?Sk.builtin.assk$(j.processing.pmouseY):"pressed"===b?new Sk.builtin.bool(j.processing.__mousePressed):"button"===b?Sk.builtin.assk$(j.processing.mouseButton):void 0})},j.Mouse=Sk.misceval.buildClass(j,g,"Mouse",[]),j.mouse=Sk.misceval.callsimArray(j.Mouse),f=function(a,b){b.__getattr__=new Sk.builtin.func(function(a,b){return(b=Sk.ffi.remapToJs(b),"key"===b)?new Sk.builtin.str(j.processing.key.toString()):"keyCode"===b?Sk.builtin.assk$(j.processing.keyCode):"keyPressed"===b?new Sk.builtin.str(j.processing.keyPressed):void 0})},j.Keyboard=Sk.misceval.buildClass(j,f,"Keyboard",[]),j.keyboard=Sk.misceval.callsimArray(j.Keyboard),e=function(a,b){b.__getattr__=new Sk.builtin.func(function(a,b){return(b=Sk.ffi.remapToJs(b),"frameCount"===b)?Sk.builtin.assk$(j.processing.frameCount):"frameRate"===b?Sk.builtin.assk$(j.processing.frameRate):"height"===b?Sk.builtin.assk$(j.processing.height):"width"===b?Sk.builtin.assk$(j.processing.width):"online"===b?new Sk.builtin.bool(j.processing.online):"focused"===b?new Sk.builtin.bool(j.processing.focused):void 0})},j.Environment=Sk.misceval.buildClass(j,e,"Environment",[]),j.environment=Sk.misceval.callsimArray(j.Environment),d=function(a,b){b.__init__=new Sk.builtin.func(function(a){a.pixels=null}),b.__getattr__=new Sk.builtin.func(function(a,b){return(b=Sk.ffi.remapToJs(b),"height"===b)?Sk.builtin.assk$(j.processing.height):"width"===b?Sk.builtin.assk$(j.processing.width):("pixels"===b&&null==a.pixels&&(a.pixels=new Sk.builtin.list(j.processing.pixels.toArray())),a.pixels)})},j.Screen=Sk.misceval.buildClass(j,d,"Screen",[]),j.screen=Sk.misceval.callsimArray(j.Screen),j.loadPixels=new Sk.builtin.func(function(){j.processing.loadPixels()}),c=function(a,b){b.__init__=new Sk.builtin.func(function(a,b,c,d,e){"undefined"!=typeof c&&(c=c.v),"undefined"!=typeof d&&(d=d.v),"undefined"!=typeof e&&(e=e.v),a.v=j.processing.color(b.v,c,d,e)})},j.color=Sk.misceval.buildClass(j,c,"color",[]),j.red=new Sk.builtin.func(function(a){return new Sk.builtin.int_(j.processing.red(a.v))}),j.green=new Sk.builtin.func(function(a){return new Sk.builtin.int_(j.processing.green(a.v))}),j.blue=new Sk.builtin.func(function(a){return new Sk.builtin.int_(j.processing.blue(a.v))}),b=function(a,b){b.__init__=new Sk.builtin.func(function(a,b,c,d){a.v="undefined"==typeof b?new j.processing.PImage:"undefined"==typeof c?new j.processing.PImage(b.v):"undefined"==typeof d?new j.processing.PImage(b.v,c.v):new j.processing.PImage(b.v,c.v,d.v)}),b.__getattr__=new Sk.builtin.func(function(a,b){return b=Sk.ffi.remapToJs(b),"width"===b?Sk.builtin.assk$(a.v.width):"height"===b?Sk.builtin.assk$(a.v.height):void 0})},j.loadImage=new Sk.builtin.func(function(a){var b=j.processing.loadImage(a.v);k.push(b);var c=Sk.misceval.callsimArray(j.PImage);return c.v=b,c}),j.image=new Sk.builtin.func(function(a,b,c,d,e){"undefined"==typeof d?j.processing.image(a.v,b.v,c.v):j.processing.image(a.v,b.v,c.v,d.v,e.v)}),j.get=new Sk.builtin.func(function(a,b){var c=j.processing.get(a.v,b.v);return Sk.misceval.callsimArray(j.color,[new Sk.builtin.int_(j.processing.red(c)),new Sk.builtin.int_(j.processing.green(c)),new Sk.builtin.int_(j.processing.blue(c))])}),j.set=new Sk.builtin.func(function(a,b,c){j.processing.set(a.v,b.v,c.v)}),h=function(a,b){b.__init__=new Sk.builtin.func(function(a,b,c,d){a.v="undefined"==typeof b?new j.processing.PVector:"undefined"==typeof d?new j.processing.PVector(b.v,c.v):new j.processing.PVector(b.v,c.v,d.v)}),b.__getattr__=new Sk.builtin.func(function(a,b){return(b=Sk.ffi.remapToJs(b),"x"===b)?Sk.builtin.assk$(a.v.x):"y"===b?Sk.builtin.assk$(a.v.y):"z"===b?Sk.builtin.assk$(a.v.z):void 0}),b.get=new Sk.builtin.func(function(a){var b=Sk.misceval.callsimArray(j.PVector);return b.v=a.v.get(),b}),b.set=new Sk.builtin.func(function(a,b,c,d){"undefined"==typeof d?a.v.set(b.v,c.v):a.v.set(b.v,c.v,d.v)}),b.mag=new Sk.builtin.func(function(a){return Sk.builtin.assk$(a.v.mag())}),b.add=new Sk.builtin.func(function(a,b){var c=Sk.misceval.callsimArray(j.PVector);return c.v=a.v.add(b.v),c}),b.sub=new Sk.builtin.func(function(a,b){var c=Sk.misceval.callsimArray(j.PVector);return c.v=a.v.sub(b.v),c}),b.mult=new Sk.builtin.func(function(a,b){var c=Sk.misceval.callsimArray(j.PVector);return c.v=a.v.mult(b.v),c}),b.div=new Sk.builtin.func(function(a,b){var c=Sk.misceval.callsimArray(j.PVector);return c.v=a.v.div(b.v),c}),b.dist=new Sk.builtin.func(function(a,b){return Sk.builtin.assk$(a.v.dist(b.v))}),b.dot=new Sk.builtin.func(function(a,b,c,d){return"undefined"==typeof c?Sk.builtin.assk$(a.v.dot(b.v)):Sk.builtin.assk$(a.v.dot(b.v,c.v,d.v))}),b.cross=new Sk.builtin.func(function(a,b){var c=Sk.misceval.callsimArray(j.PVector);return c.v=a.v.cross(b.v),c}),b.normalize=new Sk.builtin.func(function(a){a.v.normalize()}),b.limit=new Sk.builtin.func(function(a,b){a.v.limit(b.v)}),b.angleBetween=new Sk.builtin.func(function(a,b){return Sk.builtin.assk$(a.v.angleBetween(b.v))}),b.array=new Sk.builtin.func(function(a){return new Sk.builtin.list(a.v.array())})},fontClass=function(a,b){b.__init__=new Sk.builtin.func(function(a,b){a.v="undefined"==typeof b?new j.processing.PFont:new j.processing.PVector(b.v)}),b.list=new Sk.builtin.func(function(a){return new Sk.builtin.list(a.v.list())})},graphicsClass=function(a,b){b.__init__=new Sk.builtin.func(function(a,b,c,d){a.v="undefined"==typeof b?new j.processing.PVector:"undefined"==typeof d?new j.processing.PVector(b.v,c.v):new j.processing.PVector(b.v,c.v,d.v)}),b.beginDraw=new Sk.builtin.func(function(a){a.v.beginDraw()}),b.endDraw=new Sk.builtin.func(function(a){a.v.endDraw()})},shapeClass=function(a,b){b.__init__=new Sk.builtin.func(function(a,b,c,d){a.v="undefined"==typeof b?null:"undefined"==typeof c?new j.processing.PShapeSVG(b.v):"undefined"==typeof d?new j.processing.PShapeSVG(b.v,c.v):new j.processing.PShapeSVG(b.v,c.v,d.v)}),b.__getattr__=new Sk.builtin.func(function(a,b){return(b=Sk.ffi.remapToJs(b),"width"===b)?Sk.builtin.assk$(a.v.width):"height"===b?Sk.builtin.assk$(a.v.height):void 0}),b.isVisible=new Sk.builtin.func(function(a){return new Sk.builtin.bool(a.v.isVisible())}),b.setVisible=new Sk.builtin.func(function(a,b){a.v.setVisible(b.v)}),b.disableStyle=new Sk.builtin.func(function(a){a.v.disableStyle()}),b.enableStyle=new Sk.builtin.func(function(a){a.v.enableStyle()}),b.getChild=new Sk.builtin.func(function(a,b){var c=a.v.getChild(b.v);if(null!=c){var d=Sk.misceval.callsimArray(j.PShapeSVG);return d.v=c,d}return null}),b.translate=new Sk.builtin.func(function(a,b,c,d){"undefined"==typeof d?a.v.translate(b.v,c.v):a.v.translate(b.v,c.v,d.v)}),b.rotate=new Sk.builtin.func(function(a,b){a.v.rotate(b.v)}),b.rotateX=new Sk.builtin.func(function(a,b){a.v.rotateX(b.v)}),b.rotateY=new Sk.builtin.func(function(a){a.v.rotateY(angle.v)}),b.rotateZ=new Sk.builtin.func(function(a){a.v.rotateZ(angle.v)}),b.scale=new Sk.builtin.func(function(a,b,c,d){"undefined"==typeof c?a.v.scale(b.v):"undefined"==typeof d?a.v.scale(b.v,c.v):a.v.scale(b.v,c.v,d.v)})},j.PFont=Sk.misceval.buildClass(j,fontClass,"PFont",[]),j.PGraphics=Sk.misceval.buildClass(j,graphicsClass,"PGraphics",[]),j.PShapeSVG=Sk.misceval.buildClass(j,shapeClass,"PShapeSVG",[]),j.PVector=Sk.misceval.buildClass(j,h,"PVector",[]),j.PImage=Sk.misceval.buildClass(j,b,"PImage",[]),j};',"src/lib/profile.py":'raise NotImplementedError("profile is not yet implemented in Skulpt")\n',"src/lib/pstats.py":'raise NotImplementedError("pstats is not yet implemented in Skulpt")\n',"src/lib/pty.py":'raise NotImplementedError("pty is not yet implemented in Skulpt")\n',"src/lib/py_compile.py":'raise NotImplementedError("py_compile is not yet implemented in Skulpt")\n',"src/lib/pyclbr.py":'raise NotImplementedError("pyclbr is not yet implemented in Skulpt")\n',"src/lib/pydoc.py":'raise NotImplementedError("pydoc is not yet implemented in Skulpt")\n',"src/lib/pydoc_topics.py":'raise NotImplementedError("pydoc_topics is not yet implemented in Skulpt")\n',"src/lib/pythonds/__init__.py":"","src/lib/pythonds/basic/__init__.py":'\n#__all__ = ["stack"]\n\n\n#from .stack import Stack\n#from .queue import Queue\n\n\n\n',"src/lib/pythonds/basic/deque.py":"# Bradley N. Miller, David L. Ranum\n# Introduction to Data Structures and Algorithms in Python\n# Copyright 2005\n# \n#deque.py\n\n\nclass Deque:\n def __init__(self):\n self.items = []\n\n def isEmpty(self):\n return self.items == []\n\n def addFront(self, item):\n self.items.append(item)\n\n def addRear(self, item):\n self.items.insert(0,item)\n\n def removeFront(self):\n return self.items.pop()\n\n def removeRear(self):\n return self.items.pop(0)\n\n def size(self):\n return len(self.items)\n","src/lib/pythonds/basic/queue.py":"# Bradley N. Miller, David L. Ranum\n# Introduction to Data Structures and Algorithms in Python\n# Copyright 2005\n# \n#queue.py\n\nclass Queue:\n def __init__(self):\n self.items = []\n\n def isEmpty(self):\n return self.items == []\n\n def enqueue(self, item):\n self.items.insert(0,item)\n\n def dequeue(self):\n return self.items.pop()\n\n def size(self):\n return len(self.items)\n","src/lib/pythonds/basic/stack.py":"# Bradley N. Miller, David L. Ranum\n# Introduction to Data Structures and Algorithms in Python\n# Copyright 2005\n# \n#stack.py\n\nclass Stack:\n def __init__(self):\n self.items = []\n\n def isEmpty(self):\n return self.items == []\n\n def push(self, item):\n self.items.append(item)\n\n def pop(self):\n return self.items.pop()\n\n def peek(self):\n return self.items[len(self.items)-1]\n\n def size(self):\n return len(self.items)\n\n","src/lib/pythonds/graphs/__init__.py":"\n\nfrom .adjGraph import Graph\nfrom .adjGraph import Vertex\nfrom .priorityQueue import PriorityQueue\n","src/lib/pythonds/graphs/adjGraph.py":'#\n# adjGraph\n#\n# Created by Brad Miller on 2005-02-24.\n# Copyright (c) 2005 Brad Miller, David Ranum, Luther College. All rights reserved.\n#\n\nimport sys\nimport os\nimport unittest\n\nclass Graph:\n def __init__(self):\n self.vertices = {}\n self.numVertices = 0\n \n def addVertex(self,key):\n self.numVertices = self.numVertices + 1\n newVertex = Vertex(key)\n self.vertices[key] = newVertex\n return newVertex\n \n def getVertex(self,n):\n if n in self.vertices:\n return self.vertices[n]\n else:\n return None\n\n def __contains__(self,n):\n return n in self.vertices\n \n def addEdge(self,f,t,cost=0):\n if f not in self.vertices:\n nv = self.addVertex(f)\n if t not in self.vertices:\n nv = self.addVertex(t)\n self.vertices[f].addNeighbor(self.vertices[t],cost)\n \n def getVertices(self):\n return list(self.vertices.keys())\n \n def __iter__(self):\n return iter(self.vertices.values())\n \nclass Vertex:\n def __init__(self,num):\n self.id = num\n self.connectedTo = {}\n self.color = \'white\'\n self.dist = sys.maxsize\n self.pred = None\n self.disc = 0\n self.fin = 0\n\n # def __lt__(self,o):\n # return self.id < o.id\n \n def addNeighbor(self,nbr,weight=0):\n self.connectedTo[nbr] = weight\n \n def setColor(self,color):\n self.color = color\n \n def setDistance(self,d):\n self.dist = d\n\n def setPred(self,p):\n self.pred = p\n\n def setDiscovery(self,dtime):\n self.disc = dtime\n \n def setFinish(self,ftime):\n self.fin = ftime\n \n def getFinish(self):\n return self.fin\n \n def getDiscovery(self):\n return self.disc\n \n def getPred(self):\n return self.pred\n \n def getDistance(self):\n return self.dist\n \n def getColor(self):\n return self.color\n \n def getConnections(self):\n return self.connectedTo.keys()\n \n def getWeight(self,nbr):\n return self.connectedTo[nbr]\n \n def __str__(self):\n return str(self.id) + ":color " + self.color + ":disc " + str(self.disc) + ":fin " + str(self.fin) + ":dist " + str(self.dist) + ":pred \\n\\t[" + str(self.pred)+ "]\\n"\n \n def getId(self):\n return self.id\n\nclass adjGraphTests(unittest.TestCase):\n def setUp(self):\n self.tGraph = Graph()\n \n def testMakeGraph(self):\n gFile = open("test.dat")\n for line in gFile:\n fVertex, tVertex = line.split(\'|\')\n fVertex = int(fVertex)\n tVertex = int(tVertex)\n self.tGraph.addEdge(fVertex,tVertex)\n for i in self.tGraph:\n adj = i.getAdj()\n for k in adj:\n print(i, k)\n\n \nif __name__ == \'__main__\':\n unittest.main()\n \n',"src/lib/pythonds/graphs/priorityQueue.py":"# Bradley N. Miller, David L. Ranum\n# Introduction to Data Structures and Algorithms in Python\n# Copyright 2005\n# \nimport unittest\n\n# this implementation of binary heap takes key value pairs,\n# we will assume that the keys are all comparable\n\nclass PriorityQueue:\n def __init__(self):\n self.heapArray = [(0,0)]\n self.currentSize = 0\n\n def buildHeap(self,alist):\n self.currentSize = len(alist)\n self.heapArray = [(0,0)]\n for i in alist:\n self.heapArray.append(i)\n i = len(alist) // 2 \n while (i > 0):\n self.percDown(i)\n i = i - 1\n \n def percDown(self,i):\n while (i * 2) <= self.currentSize:\n mc = self.minChild(i)\n if self.heapArray[i][0] > self.heapArray[mc][0]:\n tmp = self.heapArray[i]\n self.heapArray[i] = self.heapArray[mc]\n self.heapArray[mc] = tmp\n i = mc\n \n def minChild(self,i):\n if i*2 > self.currentSize:\n return -1\n else:\n if i*2 + 1 > self.currentSize:\n return i*2\n else:\n if self.heapArray[i*2][0] < self.heapArray[i*2+1][0]:\n return i*2\n else:\n return i*2+1\n\n def percUp(self,i):\n while i // 2 > 0:\n if self.heapArray[i][0] < self.heapArray[i//2][0]:\n tmp = self.heapArray[i//2]\n self.heapArray[i//2] = self.heapArray[i]\n self.heapArray[i] = tmp\n i = i//2\n \n def add(self,k):\n self.heapArray.append(k)\n self.currentSize = self.currentSize + 1\n self.percUp(self.currentSize)\n\n def delMin(self):\n retval = self.heapArray[1][1]\n self.heapArray[1] = self.heapArray[self.currentSize]\n self.currentSize = self.currentSize - 1\n self.heapArray.pop()\n self.percDown(1)\n return retval\n \n def isEmpty(self):\n if self.currentSize == 0:\n return True\n else:\n return False\n\n def decreaseKey(self,val,amt):\n # this is a little wierd, but we need to find the heap thing to decrease by\n # looking at its value\n done = False\n i = 1\n myKey = 0\n while not done and i <= self.currentSize:\n if self.heapArray[i][1] == val:\n done = True\n myKey = i\n else:\n i = i + 1\n if myKey > 0:\n self.heapArray[myKey] = (amt,self.heapArray[myKey][1])\n self.percUp(myKey)\n \n def __contains__(self,vtx):\n for pair in self.heapArray:\n if pair[1] == vtx:\n return True\n return False\n \nclass TestBinHeap(unittest.TestCase):\n def setUp(self):\n self.theHeap = PriorityQueue()\n self.theHeap.add((2,'x'))\n self.theHeap.add((3,'y'))\n self.theHeap.add((5,'z'))\n self.theHeap.add((6,'a'))\n self.theHeap.add((4,'d'))\n\n\n def testInsert(self):\n assert self.theHeap.currentSize == 5\n\n def testDelmin(self):\n assert self.theHeap.delMin() == 'x'\n assert self.theHeap.delMin() == 'y'\n \n def testDecKey(self):\n self.theHeap.decreaseKey('d',1)\n assert self.theHeap.delMin() == 'd'\n \nif __name__ == '__main__':\n unittest.main()\n","src/lib/pythonds/trees/__init__.py":"\n# from .binaryTree import BinaryTree\n# from .balance import AVLTree\n# from .bst import BinarySearchTree\n# from .binheap import BinHeap\n\n\n","src/lib/pythonds/trees/balance.py":"#!/bin/env python3.1\n# Bradley N. Miller, David L. Ranum\n# Introduction to Data Structures and Algorithms in Python\n# Copyright 2005, 2010\n# \n\nfrom .bst import BinarySearchTree, TreeNode\n\nclass AVLTree(BinarySearchTree):\n '''\n Author: Brad Miller\n Date: 1/15/2005\n Description: Imlement a binary search tree with the following interface\n functions: \n __contains__(y) <==> y in x\n __getitem__(y) <==> x[y]\n __init__()\n __len__() <==> len(x)\n __setitem__(k,v) <==> x[k] = v\n clear()\n get(k)\n has_key(k)\n items() \n keys() \n values()\n put(k,v)\n '''\n\n\n def _put(self,key,val,currentNode):\n if key < currentNode.key:\n if currentNode.hasLeftChild():\n self._put(key,val,currentNode.leftChild)\n else:\n currentNode.leftChild = TreeNode(key,val,parent=currentNode)\n self.updateBalance(currentNode.leftChild)\n else:\n if currentNode.hasRightChild():\n self._put(key,val,currentNode.rightChild)\n else:\n currentNode.rightChild = TreeNode(key,val,parent=currentNode)\n self.updateBalance(currentNode.rightChild) \n\n def updateBalance(self,node):\n if node.balanceFactor > 1 or node.balanceFactor < -1:\n self.rebalance(node)\n return\n if node.parent != None:\n if node.isLeftChild():\n node.parent.balanceFactor += 1\n elif node.isRightChild():\n node.parent.balanceFactor -= 1\n\n if node.parent.balanceFactor != 0:\n self.updateBalance(node.parent)\n\n def rebalance(self,node):\n if node.balanceFactor < 0:\n if node.rightChild.balanceFactor > 0:\n # Do an LR Rotation\n self.rotateRight(node.rightChild)\n self.rotateLeft(node)\n else:\n # single left\n self.rotateLeft(node)\n elif node.balanceFactor > 0:\n if node.leftChild.balanceFactor < 0:\n # Do an RL Rotation\n self.rotateLeft(node.leftChild)\n self.rotateRight(node)\n else:\n # single right\n self.rotateRight(node)\n\n def rotateLeft(self,rotRoot):\n newRoot = rotRoot.rightChild\n rotRoot.rightChild = newRoot.leftChild\n if newRoot.leftChild != None:\n newRoot.leftChild.parent = rotRoot\n newRoot.parent = rotRoot.parent\n if rotRoot.isRoot():\n self.root = newRoot\n else:\n if rotRoot.isLeftChild():\n rotRoot.parent.leftChild = newRoot\n else:\n rotRoot.parent.rightChild = newRoot\n newRoot.leftChild = rotRoot\n rotRoot.parent = newRoot\n rotRoot.balanceFactor = rotRoot.balanceFactor + 1 - min(newRoot.balanceFactor, 0)\n newRoot.balanceFactor = newRoot.balanceFactor + 1 + max(rotRoot.balanceFactor, 0)\n\n\n def rotateRight(self,rotRoot):\n newRoot = rotRoot.leftChild\n rotRoot.leftChild = newRoot.rightChild\n if newRoot.rightChild != None:\n newRoot.rightChild.parent = rotRoot\n newRoot.parent = rotRoot.parent\n if rotRoot.isRoot():\n self.root = newRoot\n else:\n if rotRoot.isRightChild():\n rotRoot.parent.rightChild = newRoot\n else:\n rotRoot.parent.leftChild = newRoot\n newRoot.rightChild = rotRoot\n rotRoot.parent = newRoot\n rotRoot.balanceFactor = rotRoot.balanceFactor - 1 - max(newRoot.balanceFactor, 0)\n newRoot.balanceFactor = newRoot.balanceFactor - 1 + min(rotRoot.balanceFactor, 0)\n \n","src/lib/pythonds/trees/binaryTree.py":"# Bradley N. Miller, David L. Ranum\n# Introduction to Data Structures and Algorithms in Python\n# Copyright 2005\n# \n\nclass BinaryTree:\n \"\"\"\n A recursive implementation of Binary Tree\n Using links and Nodes approach.\n \"\"\" \n def __init__(self,rootObj):\n self.key = rootObj\n self.leftChild = None\n self.rightChild = None\n\n def insertLeft(self,newNode):\n if self.leftChild == None:\n self.leftChild = BinaryTree(newNode)\n else:\n t = BinaryTree(newNode)\n t.left = self.leftChild\n self.leftChild = t\n \n def insertRight(self,newNode):\n if self.rightChild == None:\n self.rightChild = BinaryTree(newNode)\n else:\n t = BinaryTree(newNode)\n t.right = self.rightChild\n self.rightChild = t\n\n def isLeaf(self):\n return ((not self.leftChild) and (not self.rightChild))\n\n def getRightChild(self):\n return self.rightChild\n\n def getLeftChild(self):\n return self.leftChild\n\n def setRootVal(self,obj):\n self.key = obj\n\n def getRootVal(self,):\n return self.key\n\n def inorder(self):\n if self.leftChild:\n self.leftChild.inorder()\n print(self.key)\n if self.rightChild:\n self.rightChild.inorder()\n\n def postorder(self):\n if self.leftChild:\n self.leftChild.postorder()\n if self.rightChild:\n self.rightChild.postorder()\n print(self.key)\n\n\n def preorder(self):\n print(self.key)\n if self.leftChild:\n self.leftChild.preorder()\n if self.rightChild:\n self.rightChild.preorder()\n\n def printexp(self):\n if self.leftChild:\n print('(')\n self.leftChild.printexp()\n print(self.key)\n if self.rightChild:\n self.rightChild.printexp()\n print(')')\n\n def postordereval(self):\n opers = {'+':operator.add, '-':operator.sub, '*':operator.mul, '/':operator.truediv}\n res1 = None\n res2 = None\n if self.leftChild:\n res1 = self.leftChild.postordereval() #// \\label{peleft}\n if self.rightChild:\n res2 = self.rightChild.postordereval() #// \\label{peright}\n if res1 and res2:\n return opers[self.key](res1,res2) #// \\label{peeval}\n else:\n return self.key\n\ndef inorder(tree):\n if tree != None:\n inorder(tree.getLeftChild())\n print(tree.getRootVal())\n inorder(tree.getRightChild())\n\ndef printexp(tree):\n if tree.leftChild:\n print('(')\n printexp(tree.getLeftChild())\n print(tree.getRootVal())\n if tree.rightChild:\n printexp(tree.getRightChild())\n print(')') \n\ndef printexp(tree):\n sVal = \"\"\n if tree:\n sVal = '(' + printexp(tree.getLeftChild())\n sVal = sVal + str(tree.getRootVal())\n sVal = sVal + printexp(tree.getRightChild()) + ')'\n return sVal\n\ndef postordereval(tree):\n opers = {'+':operator.add, '-':operator.sub, '*':operator.mul, '/':operator.truediv}\n res1 = None\n res2 = None\n if tree:\n res1 = postordereval(tree.getLeftChild()) #// \\label{peleft}\n res2 = postordereval(tree.getRightChild()) #// \\label{peright}\n if res1 and res2:\n return opers[tree.getRootVal()](res1,res2) #// \\label{peeval}\n else:\n return tree.getRootVal()\n\ndef height(tree):\n if tree == None:\n return -1\n else:\n return 1 + max(height(tree.leftChild),height(tree.rightChild))\n\n# t = BinaryTree(7)\n# t.insertLeft(3)\n# t.insertRight(9)\n# inorder(t)\n# import operator\n# x = BinaryTree('*')\n# x.insertLeft('+')\n# l = x.getLeftChild()\n# l.insertLeft(4)\n# l.insertRight(5)\n# x.insertRight(7)\n# print(printexp(x))\n# print(postordereval(x))\n# print(height(x))\n","src/lib/pythonds/trees/binheap.py":"# Bradley N. Miller, David L. Ranum\n# Introduction to Data Structures and Algorithms in Python\n# Copyright 2005\n# \n\n# this heap takes key value pairs, we will assume that the keys are integers\nclass BinHeap:\n def __init__(self):\n self.heapList = [0]\n self.currentSize = 0\n\n\n def buildHeap(self,alist):\n i = len(alist) // 2\n self.currentSize = len(alist)\n self.heapList = [0] + alist[:]\n print(len(self.heapList), i)\n while (i > 0):\n print(self.heapList, i)\n self.percDown(i)\n i = i - 1\n print(self.heapList,i)\n \n def percDown(self,i):\n while (i * 2) <= self.currentSize:\n mc = self.minChild(i)\n if self.heapList[i] > self.heapList[mc]:\n tmp = self.heapList[i]\n self.heapList[i] = self.heapList[mc]\n self.heapList[mc] = tmp\n i = mc\n \n def minChild(self,i):\n if i * 2 + 1 > self.currentSize:\n return i * 2\n else:\n if self.heapList[i * 2] < self.heapList[i * 2 + 1]:\n return i * 2\n else:\n return i * 2 + 1\n\n def percUp(self,i):\n while i // 2 > 0:\n if self.heapList[i] < self.heapList[i//2]:\n tmp = self.heapList[i // 2]\n self.heapList[i // 2] = self.heapList[i]\n self.heapList[i] = tmp\n i = i // 2\n \n def insert(self,k):\n self.heapList.append(k)\n self.currentSize = self.currentSize + 1\n self.percUp(self.currentSize)\n\n def delMin(self):\n retval = self.heapList[1]\n self.heapList[1] = self.heapList[self.currentSize]\n self.currentSize = self.currentSize - 1\n self.heapList.pop()\n self.percDown(1)\n return retval\n \n def isEmpty(self):\n if currentSize == 0:\n return True\n else:\n return False\n","src/lib/pythonds/trees/bst.py":"#!/bin/env python3.1\n# Bradley N. Miller, David L. Ranum\n# Introduction to Data Structures and Algorithms in Python\n# Copyright 2005, 2010\n# \n\nclass BinarySearchTree:\n '''\n Author: Brad Miller\n Date: 1/15/2005\n Description: Imlement a binary search tree with the following interface\n functions: \n __contains__(y) <==> y in x\n __getitem__(y) <==> x[y]\n __init__()\n __len__() <==> len(x)\n __setitem__(k,v) <==> x[k] = v\n clear()\n get(k)\n items() \n keys() \n values()\n put(k,v)\n in\n del <==> \n '''\n\n def __init__(self):\n self.root = None\n self.size = 0\n \n def put(self,key,val):\n if self.root:\n self._put(key,val,self.root)\n else:\n self.root = TreeNode(key,val)\n self.size = self.size + 1\n\n def _put(self,key,val,currentNode):\n if key < currentNode.key:\n if currentNode.hasLeftChild():\n self._put(key,val,currentNode.leftChild)\n else:\n currentNode.leftChild = TreeNode(key,val,parent=currentNode)\n else:\n if currentNode.hasRightChild():\n self._put(key,val,currentNode.rightChild)\n else:\n currentNode.rightChild = TreeNode(key,val,parent=currentNode)\n \n def __setitem__(self,k,v):\n self.put(k,v)\n\n def get(self,key):\n if self.root:\n res = self._get(key,self.root)\n if res:\n return res.payload\n else:\n return None\n else:\n return None\n \n def _get(self,key,currentNode):\n if not currentNode:\n return None\n elif currentNode.key == key:\n return currentNode\n elif key < currentNode.key:\n return self._get(key,currentNode.leftChild)\n else:\n return self._get(key,currentNode.rightChild)\n \n \n def __getitem__(self,key):\n res = self.get(key)\n if res:\n return res\n else:\n raise KeyError('Error, key not in tree')\n \n\n def __contains__(self,key):\n if self._get(key,self.root):\n return True\n else:\n return False\n \n def length(self):\n return self.size\n\n def __len__(self):\n return self.size\n\n def __iter__(self):\n return self.root.__iter__()\n \n def delete(self,key):\n if self.size > 1:\n nodeToRemove = self._get(key,self.root)\n if nodeToRemove:\n self.remove(nodeToRemove)\n self.size = self.size-1\n else:\n raise KeyError('Error, key not in tree')\n elif self.size == 1 and self.root.key == key:\n self.root = None\n self.size = self.size - 1\n else:\n raise KeyError('Error, key not in tree')\n\n def __delitem__(self,key):\n self.delete(key)\n \n def remove(self,currentNode):\n if currentNode.isLeaf(): #leaf\n if currentNode == currentNode.parent.leftChild:\n currentNode.parent.leftChild = None\n else:\n currentNode.parent.rightChild = None\n elif currentNode.hasBothChildren(): #interior\n succ = currentNode.findSuccessor()\n succ.spliceOut()\n currentNode.key = succ.key\n currentNode.payload = succ.payload\n else: # this node has one child\n if currentNode.hasLeftChild():\n if currentNode.isLeftChild():\n currentNode.leftChild.parent = currentNode.parent\n currentNode.parent.leftChild = currentNode.leftChild\n elif currentNode.isRightChild():\n currentNode.leftChild.parent = currentNode.parent\n currentNode.parent.rightChild = currentNode.leftChild\n else:\n currentNode.replaceNodeData(currentNode.leftChild.key,\n currentNode.leftChild.payload,\n currentNode.leftChild.leftChild,\n currentNode.leftChild.rightChild)\n else:\n if currentNode.isLeftChild():\n currentNode.rightChild.parent = currentNode.parent\n currentNode.parent.leftChild = currentNode.rightChild\n elif currentNode.isRightChild():\n currentNode.rightChild.parent = currentNode.parent\n currentNode.parent.rightChild = currentNode.rightChild\n else:\n currentNode.replaceNodeData(currentNode.rightChild.key,\n currentNode.rightChild.payload,\n currentNode.rightChild.leftChild,\n currentNode.rightChild.rightChild)\n\n def inorder(self):\n self._inorder(self.root)\n\n def _inorder(self,tree):\n if tree != None:\n self._inorder(tree.leftChild)\n print(tree.key)\n self._inorder(tree.rightChild)\n\n def postorder(self):\n self._postorder(self.root)\n\n def _postorder(self, tree):\n if tree:\n self._postorder(tree.rightChild)\n self._postorder(tree.leftChild)\n print(tree.key) \n\n def preorder(self):\n self._preorder(self,self.root)\n\n def _preorder(self,tree):\n if tree:\n print(tree.key) \n self._preorder(tree.leftChild)\n self._preorder(tree.rightChild)\n\n \nclass TreeNode:\n def __init__(self,key,val,left=None,right=None,parent=None):\n self.key = key\n self.payload = val\n self.leftChild = left\n self.rightChild = right\n self.parent = parent\n self.balanceFactor = 0\n \n def hasLeftChild(self):\n return self.leftChild\n\n def hasRightChild(self):\n return self.rightChild\n \n def isLeftChild(self):\n return self.parent and self.parent.leftChild == self\n\n def isRightChild(self):\n return self.parent and self.parent.rightChild == self\n\n def isRoot(self):\n return not self.parent\n\n def isLeaf(self):\n return not (self.rightChild or self.leftChild)\n\n def hasAnyChildren(self):\n return self.rightChild or self.leftChild\n\n def hasBothChildren(self):\n return self.rightChild and self.leftChild\n \n def replaceNodeData(self,key,value,lc,rc):\n self.key = key\n self.payload = value\n self.leftChild = lc\n self.rightChild = rc\n if self.hasLeftChild():\n self.leftChild.parent = self\n if self.hasRightChild():\n self.rightChild.parent = self\n \n def findSuccessor(self):\n succ = None\n if self.hasRightChild():\n succ = self.rightChild.findMin()\n else:\n if self.parent:\n if self.isLeftChild():\n succ = self.parent\n else:\n self.parent.rightChild = None\n succ = self.parent.findSuccessor()\n self.parent.rightChild = self\n return succ\n\n\n def spliceOut(self):\n if self.isLeaf():\n if self.isLeftChild():\n self.parent.leftChild = None\n else:\n self.parent.rightChild = None\n elif self.hasAnyChildren():\n if self.hasLeftChild():\n if self.isLeftChild():\n self.parent.leftChild = self.leftChild\n else:\n self.parent.rightChild = self.leftChild\n self.leftChild.parent = self.parent\n else:\n if self.isLeftChild():\n self.parent.leftChild = self.rightChild\n else:\n self.parent.rightChild = self.rightChild\n self.rightChild.parent = self.parent\n\n def findMin(self):\n current = self\n while current.hasLeftChild():\n current = current.leftChild\n return current\n\n def __iter__(self):\n \"\"\"The standard inorder traversal of a binary tree.\"\"\"\n if self:\n if self.hasLeftChild():\n for elem in self.leftChild:\n yield elem\n yield self.key\n if self.hasRightChild():\n for elem in self.rightChild:\n yield elem\n\n \n","src/lib/quopri.py":'raise NotImplementedError("quopri is not yet implemented in Skulpt")\n',"src/lib/random.js":'var MersenneTwister=function(a){a==null&&(a=new Date().getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=Array(this.N),this.mti=this.N+1,this.init_genrand(a)};MersenneTwister.prototype.init_genrand=function(a){for(this.mt[0]=a>>>0,this.mti=1;this.mti<this.N;this.mti++){var a=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30;this.mt[this.mti]=(1812433253*((4294901760&a)>>>16)<<16)+1812433253*(65535&a)+this.mti,this.mt[this.mti]>>>=0}},MersenneTwister.prototype.init_by_array=function(a,b){var d,e,f;for(this.init_genrand(19650218),d=1,e=0,f=this.N>b?this.N:b;f;f--){var g=this.mt[d-1]^this.mt[d-1]>>>30;this.mt[d]=(this.mt[d]^(1664525*((4294901760&g)>>>16)<<16)+1664525*(65535&g))+a[e]+e,this.mt[d]>>>=0,d++,e++,d>=this.N&&(this.mt[0]=this.mt[this.N-1],d=1),e>=b&&(e=0)}for(f=this.N-1;f;f--){var g=this.mt[d-1]^this.mt[d-1]>>>30;this.mt[d]=(this.mt[d]^(1566083941*((4294901760&g)>>>16)<<16)+1566083941*(65535&g))-d,this.mt[d]>>>=0,d++,d>=this.N&&(this.mt[0]=this.mt[this.N-1],d=1)}this.mt[0]=2147483648},MersenneTwister.prototype.genrand_int32=function(){var a,b=[0,this.MATRIX_A];if(this.mti>=this.N){var d;for(this.mti==this.N+1&&this.init_genrand(5489),d=0;d<this.N-this.M;d++)a=this.mt[d]&this.UPPER_MASK|this.mt[d+1]&this.LOWER_MASK,this.mt[d]=this.mt[d+this.M]^a>>>1^b[1&a];for(;d<this.N-1;d++)a=this.mt[d]&this.UPPER_MASK|this.mt[d+1]&this.LOWER_MASK,this.mt[d]=this.mt[d+(this.M-this.N)]^a>>>1^b[1&a];a=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^a>>>1^b[1&a],this.mti=0}return a=this.mt[this.mti++],a^=a>>>11,a^=2636928640&a<<7,a^=4022730752&a<<15,a^=a>>>18,a>>>0},MersenneTwister.prototype.genrand_int31=function(){return this.genrand_int32()>>>1},MersenneTwister.prototype.genrand_real1=function(){return this.genrand_int32()*(1/4294967295)},MersenneTwister.prototype.random=function(){return this.genrand_int32()*(1/4294967296)},MersenneTwister.prototype.genrand_real3=function(){return(this.genrand_int32()+.5)*(1/4294967296)},MersenneTwister.prototype.genrand_res53=function(){var d=this.genrand_int32()>>>5,a=this.genrand_int32()>>>6;return(67108864*d+a)*(1/9007199254740992)};var $builtinmodule=function(){var a=Math.log,b=Math.sqrt,d={},e=new MersenneTwister,f=void 0;d.seed=new Sk.builtin.func(function(a){return Sk.builtin.pyCheckArgsLen("seed",arguments.length,0,1),a=Sk.builtin.asnum$(a),e=0<arguments.length?new MersenneTwister(a):new MersenneTwister,Sk.builtin.none.none$}),d.random=new Sk.builtin.func(function(){return Sk.builtin.pyCheckArgsLen("random",arguments.length,0,0),new Sk.builtin.float_(e.genrand_res53())});var g=function(a){return 0|a},h=function(a,b,d){var f,h,i;if(!Sk.builtin.checkInt(a))throw new Sk.builtin.ValueError("non-integer first argument for randrange()");if(void 0===b)return i=g(e.genrand_res53()*a),new Sk.builtin.int_(i);if(!Sk.builtin.checkInt(b))throw new Sk.builtin.ValueError("non-integer stop for randrange()");if(void 0===d&&(d=1),f=b-a,1==d&&0<f)return i=a+g(e.genrand_res53()*f),new Sk.builtin.int_(i);if(1==d)throw new Sk.builtin.ValueError("empty range for randrange() ("+a+", "+b+", "+f+")");if(!Sk.builtin.checkInt(d))throw new Sk.builtin.ValueError("non-integer step for randrange()");if(0<d)h=g((f+d-1)/d);else if(0>d)h=g((f+d+1)/d);else throw new Sk.builtin.ValueError("zero step for randrange()");if(0>=h)throw new Sk.builtin.ValueError("empty range for randrange()");return i=a+d*g(e.genrand_res53()*h),new Sk.builtin.int_(i)};d.randint=new Sk.builtin.func(function(d,e){return Sk.builtin.pyCheckArgsLen("randint",arguments.length,2,2),d=Sk.builtin.asnum$(d),e=Sk.builtin.asnum$(e),h(d,e+1)}),d.randrange=new Sk.builtin.func(function(a,b,d){return Sk.builtin.pyCheckArgsLen("randrange",arguments.length,1,3),a=Sk.builtin.asnum$(a),b=Sk.builtin.asnum$(b),d=Sk.builtin.asnum$(d),h(a,b,d)}),d.uniform=new Sk.builtin.func(function(d,f){Sk.builtin.pyCheckArgsLen("uniform",arguments.length,2,2),d=Sk.builtin.asnum$(d),f=Sk.builtin.asnum$(f);var g=e.genrand_res53();return c=d+g*(f-d),new Sk.builtin.float_(c)}),d.triangular=new Sk.builtin.func(function(a,d,f){Sk.builtin.pyCheckArgsLen("triangular",arguments.length,2,3),Sk.builtin.pyCheckType("low","number",Sk.builtin.checkNumber(a)),Sk.builtin.pyCheckType("high","number",Sk.builtin.checkNumber(d));var g,h,i;return a=Sk.builtin.asnum$(a),d=Sk.builtin.asnum$(d),a>d&&(i=a,a=d,d=i),void 0===f||f===Sk.builtin.none.none$?f=(d-a)/2:(Sk.builtin.pyCheckType("mode","number",Sk.builtin.checkNumber(f)),f=Sk.builtin.asnum$(f)),g=e.genrand_res53(),h=g<(f-a)/(d-a)?a+b(g*(d-a)*(f-a)):d-b((1-g)*(d-a)*(d-f)),new Sk.builtin.float_(h)});var i=function(d,g){var k,l,m,n,o,h=Math.sin,i=Math.cos,j=Math.PI;return void 0===f?(k=e.genrand_res53(),l=e.genrand_res53(),m=b(-2*a(k)),n=2*j*l,o=m*i(n),f=m*h(n)):(o=f,f=void 0),d+g*o};return d.gauss=new Sk.builtin.func(function(a,b){return Sk.builtin.pyCheckArgsLen("gauss",arguments.length,2,2),Sk.builtin.pyCheckType("mu","number",Sk.builtin.checkNumber(a)),Sk.builtin.pyCheckType("sigma","number",Sk.builtin.checkNumber(b)),a=Sk.builtin.asnum$(a),b=Sk.builtin.asnum$(b),new Sk.builtin.float_(i(a,b))}),d.normalvariate=d.gauss,d.lognormvariate=new Sk.builtin.func(function(a,b){var d=Math.exp;return Sk.builtin.pyCheckArgsLen("lognormvariate",arguments.length,2,2),Sk.builtin.pyCheckType("mu","number",Sk.builtin.checkNumber(a)),Sk.builtin.pyCheckType("sigma","number",Sk.builtin.checkNumber(b)),a=Sk.builtin.asnum$(a),b=Sk.builtin.asnum$(b),new Sk.builtin.float_(d(i(a,b)))}),d.expovariate=new Sk.builtin.func(function(b){Sk.builtin.pyCheckArgsLen("expovariate",arguments.length,1,1),Sk.builtin.pyCheckType("lambd","number",Sk.builtin.checkNumber(b)),b=Sk.builtin.asnum$(b);var d=e.genrand_res53();return new Sk.builtin.float_(-a(d)/b)}),d.choice=new Sk.builtin.func(function(a){if(Sk.builtin.pyCheckArgsLen("choice",arguments.length,1,1),Sk.builtin.pyCheckType("seq","sequence",Sk.builtin.checkSequence(a)),void 0!==a.sq$length){var b=new Sk.builtin.int_(g(e.genrand_res53()*a.sq$length()));return a.mp$subscript(b)}throw new Sk.builtin.TypeError("object has no length")}),d.shuffle=new Sk.builtin.func(function(a){if(Sk.builtin.pyCheckArgsLen("shuffle",arguments.length,1,1),Sk.builtin.pyCheckType("x","sequence",Sk.builtin.checkSequence(a)),a.constructor===Sk.builtin.list){const h=a.v;for(var b=h.length-1;0<b;b-=1){var d=g(e.genrand_res53()*(b+1)),f=h[d];h[d]=h[b],h[b]=f}}else if(void 0===a.sq$length)throw new Sk.builtin.TypeError("object has no length");else if(void 0!==a.mp$ass_subscript)for(var d,b=a.sq$length()-1;0<b;b-=1){d=new Sk.builtin.int_(g(e.genrand_res53()*(b+1))),b=new Sk.builtin.int_(b);var f=a.mp$subscript(d);a.mp$ass_subscript(d,a.mp$subscript(b)),a.mp$ass_subscript(b,f)}else throw new Sk.builtin.TypeError("object is immutable");return Sk.builtin.none.none$}),d.sample=new Sk.builtin.func(function(a,b){var f,g,h,l,m,d=Math.floor;for(Sk.builtin.pyCheckArgsLen("sample",arguments.length,2,2),Sk.builtin.pyCheckType("population","iterable",Sk.builtin.checkIterable(a)),Sk.builtin.pyCheckType("k","integer",Sk.builtin.checkInt(b)),b=Sk.builtin.asnum$(b),m=[],h=Sk.abstr.iter(a),(f=0,l=h.tp$iternext());void 0!==l;f++,l=h.tp$iternext())g=d(e.genrand_res53()*(f+1)),f<b?(g<f&&(m[f]=m[g]),m[g]=l):g<b&&(m[g]=l);if(f<b)throw new Sk.builtin.ValueError("sample larger than population");return new Sk.builtin.list(m)}),d};',"src/lib/re.js":'var $builtinmodule=function(name){var validGroups,convert,getFlags,_split,_findall,matchobj,_search,_match,regexobj,mod={__name__:new Sk.builtin.str("re")};return mod.I=2,mod.IGNORECASE=2,mod.M=8,mod.MULTILINE=8,validGroups=["(?:","(?=","(?!"],convert=function(a){var b,c,d;if(c=a.match(/\\(\\?./g),c)for(d=0;d<c.length;d++)if(-1==validGroups.indexOf(c[d]))throw new Sk.builtin.ValueError("Disallowed group in pattern: \'"+c[d]+"\'");return b=a.replace("/\\\\/g","\\\\\\\\"),b=a.replace(/([^\\\\]){,(?![^\\[]*\\])/g,"$1{0,"),b},getFlags=function(a){var b="g";return(a&mod.IGNORECASE)==mod.IGNORECASE&&(b+="i"),(a&mod.MULTILINE)==mod.MULTILINE&&(b+="m"),b},_split=function(a,b,c,d){var e,f,g,h,i,j,k,l,m;if(Sk.builtin.pyCheckArgsLen("split",arguments.length,2,4),!Sk.builtin.checkString(a))throw new Sk.builtin.TypeError("pattern must be a string");if(!Sk.builtin.checkString(b))throw new Sk.builtin.TypeError("string must be a string");if(void 0===c&&(c=0),!Sk.builtin.checkNumber(c))throw new Sk.builtin.TypeError("maxsplit must be a number");if(void 0===d&&(d=0),!Sk.builtin.checkNumber(d))throw new Sk.builtin.TypeError("flags must be a number");for(c=Sk.builtin.asnum$(c),e=Sk.ffi.unwrapo(a),f=Sk.ffi.unwrapo(b),e=convert(e),g=null!==e.match(/^\\(.*\\)$/),h=getFlags(d),i=new RegExp(e,h),j=[],k,l=0,m=0;null!=(k=i.exec(f))&&k.index!==i.lastIndex&&(j.push(new Sk.builtin.str(f.substring(l,k.index))),g&&j.push(new Sk.builtin.str(k[0])),l=i.lastIndex,m+=1,!(c&&m>=c)););return j.push(new Sk.builtin.str(f.substring(l))),new Sk.builtin.list(j)},_split.co_varnames=["pattern","string","maxsplit","flags"],_split.$defaults=[new Sk.builtin.int_(0),new Sk.builtin.int_(0)],mod.split=new Sk.builtin.func(_split),_findall=function(a,b,c){var d,e,f,g,h,j;if(Sk.builtin.pyCheckArgsLen("findall",arguments.length,2,3),!Sk.builtin.checkString(a))throw new Sk.builtin.TypeError("pattern must be a string");if(!Sk.builtin.checkString(b))throw new Sk.builtin.TypeError("string must be a string");if(void 0===c&&(c=0),!Sk.builtin.checkNumber(c))throw new Sk.builtin.TypeError("flags must be a number");if(d=Sk.ffi.unwrapo(a),e=Sk.ffi.unwrapo(b),d=convert(d),f=getFlags(c),g=new RegExp(d,f),d.match(/\\$/)){var k=new RegExp(/\\n$/);e.match(k)&&(e=e.slice(0,-1))}for(h=[],j;null!=(j=g.exec(e));){if(2>j.length)h.push(new Sk.builtin.str(j[0]));else if(2==j.length)h.push(new Sk.builtin.str(j[1]));else{for(var l=[],m=1;m<j.length;m++)l.push(new Sk.builtin.str(j[m]));h.push(new Sk.builtin.tuple(l))}j.index===g.lastIndex&&(g.lastIndex+=1)}return new Sk.builtin.list(h)},_findall.co_varnames=["pattern","string","flags"],_findall.$defaults=[new Sk.builtin.int_(0)],mod.findall=new Sk.builtin.func(_findall),matchobj=function(a,b){b.__init__=new Sk.builtin.func(function(a,b,c,d){return a.thematch=b,a.re=c,a.string=d,Sk.builtin.none.none$}),b.groups=new Sk.builtin.func(function(a){var b=a.thematch.v.slice(1);return new Sk.builtin.tuple(b)}),b.group=new Sk.builtin.func(function(a,b){if(b=void 0===b?0:Sk.builtin.asnum$(b),b>=a.thematch.v.length)throw new Sk.builtin.IndexError("Index out of range: "+b);return a.thematch.v[b]})},mod.MatchObject=Sk.misceval.buildClass(mod,matchobj,"MatchObject",[]),mod._findre=function(res,string){res=res.replace(/([^\\\\]){,(?![^\\[]*\\])/g,"$1{0,");var matches,sitem,retval,re=eval(res),patt=/\\n$/,str=Sk.ffi.remapToJs(string);if(matches=str.match(patt)?str.slice(0,-1).match(re):str.match(re),retval=new Sk.builtin.list,null==matches)return retval;for(var i=0;i<matches.length;++i)sitem=new Sk.builtin.str(matches[i]),retval.v.push(sitem);return retval},_search=function(a,b,c){var d,e;if(Sk.builtin.pyCheckArgsLen("search",arguments.length,2,3),!Sk.builtin.checkString(a))throw new Sk.builtin.TypeError("pattern must be a string");if(!Sk.builtin.checkString(b))throw new Sk.builtin.TypeError("string must be a string");if(void 0===c&&(c=0),!Sk.builtin.checkNumber(c))throw new Sk.builtin.TypeError("flags must be a number");return(e="/"+a.v.replace(/\\//g,"\\\\/")+"/",lst=mod._findre(e,b),1>lst.v.length)?Sk.builtin.none.none$:(d=Sk.misceval.callsimArray(mod.MatchObject,[lst,a,b]),d)},_search.co_varnames=["pattern","string","flags"],_search.$defaults=[new Sk.builtin.int_(0)],mod.search=new Sk.builtin.func(_search),_match=function(a,b,c){var d,e;if(Sk.builtin.pyCheckArgsLen("match",arguments.length,2,3),!Sk.builtin.checkString(a))throw new Sk.builtin.TypeError("pattern must be a string");if(!Sk.builtin.checkString(b))throw new Sk.builtin.TypeError("string must be a string");if(void 0===c&&(c=0),!Sk.builtin.checkNumber(c))throw new Sk.builtin.TypeError("flags must be a number");return(pat=Sk.ffi.remapToJs(a),e="/^"+pat.replace(/\\//g,"\\\\/")+"/",lst=mod._findre(e,b),1>Sk.ffi.remapToJs(lst).length)?Sk.builtin.none.none$:(d=Sk.misceval.callsimArray(mod.MatchObject,[lst,a,b]),d)},_match.co_varnames=["pattern","string","flags"],_match.$defaults=[new Sk.builtin.int_(0)],mod.match=new Sk.builtin.func(_match),regexobj=function(a,b){var c,d,e,f,g,h;b.__init__=new Sk.builtin.func(function(a,b,c){return a.re=b,a.flags=void 0===c?0:c,Sk.builtin.none.none$}),h=new Sk.builtin.func(function(a){var b="re.compile(\'"+Sk.ffi.remapToJs(a.re)+"\')";return Sk.ffi.remapToPy(b.substring(0,212))}),b.__str__=h,b.__repr__=h,c=function(a,b,c){var d=Sk.ffi.remapToJs(a),e=null==b?0:Sk.ffi.remapToJs(b),f=null==c?d.length:Sk.ffi.remapToJs(c);return"^"==e&&(e=d.indexOf("\\n")+1),null===f&&(f=d.length),Sk.ffi.remapToPy(d.substring(e,f))},d=function(a,b,d,e){Sk.builtin.pyCheckArgsLen("search",arguments.length,2,4);var f=c(b,d,e);return _search(a.re,f,a.flags)},d.co_varnames=["self","string","pos","endpos"],d.$defaults=[new Sk.builtin.int_(0),Sk.builtin.none.none$],b.search=new Sk.builtin.func(d),e=function(a,b,d,e){Sk.builtin.pyCheckArgsLen("match",arguments.length,2,4);var f=c(b,d,e);return _match(a.re,f,a.flags)},e.co_varnames=["self","string","pos","endpos"],e.$defaults=[new Sk.builtin.int_(0),Sk.builtin.none.none$],b.match=new Sk.builtin.func(e),f=function(a,b,c){if(Sk.builtin.pyCheckArgsLen("split",arguments.length,2,3),void 0===c&&(c=0),!Sk.builtin.checkInt(c))throw new Sk.builtin.TypeError("maxsplit must be an integer");return _split(a.re,b,c,a.flags)},f.co_varnames=["self","string","maxsplit"],f.$defaults=[new Sk.builtin.int_(0)],b.split=new Sk.builtin.func(f),g=function(a,b,d,e){Sk.builtin.pyCheckArgsLen("findall",arguments.length,2,4);var f=c(b,d,e);return _findall(a.re,f,a.flags)},g.co_varnames=["self","string","pos","endpos"],g.$defaults=[new Sk.builtin.int_(0),Sk.builtin.none.none$],b.findall=new Sk.builtin.func(g)},mod.RegexObject=Sk.misceval.buildClass(mod,regexobj,"RegexObject",[]),mod.compile=new Sk.builtin.func(function(a,b){var c;if(Sk.builtin.pyCheckArgsLen("compile",arguments.length,1,2),!Sk.builtin.checkString(a))throw new Sk.builtin.TypeError("pattern must be a string");if(void 0===b&&(b=0),!Sk.builtin.checkNumber(b))throw new Sk.builtin.TypeError("flags must be a number");return c=Sk.misceval.callsimArray(mod.RegexObject,[a,b]),c}),mod.purge=new Sk.builtin.func(function(){}),mod};',"src/lib/repr.py":'raise NotImplementedError("repr is not yet implemented in Skulpt")\n',"src/lib/rexec.py":'raise NotImplementedError("rexec is not yet implemented in Skulpt")\n',"src/lib/rfc822.py":'raise NotImplementedError("rfc822 is not yet implemented in Skulpt")\n',"src/lib/rlcompleter.py":'raise NotImplementedError("rlcompleter is not yet implemented in Skulpt")\n',"src/lib/robotparser.py":'raise NotImplementedError("robotparser is not yet implemented in Skulpt")\n',"src/lib/runpy.py":'raise NotImplementedError("runpy is not yet implemented in Skulpt")\n',"src/lib/sched.py":'raise NotImplementedError("sched is not yet implemented in Skulpt")\n',"src/lib/sets.py":'raise NotImplementedError("sets is not yet implemented in Skulpt")\n',"src/lib/sgmllib.py":'raise NotImplementedError("sgmllib is not yet implemented in Skulpt")\n',"src/lib/sha.py":'raise NotImplementedError("sha is not yet implemented in Skulpt")\n',"src/lib/shelve.py":'raise NotImplementedError("shelve is not yet implemented in Skulpt")\n',"src/lib/shlex.py":'raise NotImplementedError("shlex is not yet implemented in Skulpt")\n',"src/lib/shutil.py":'raise NotImplementedError("shutil is not yet implemented in Skulpt")\n',"src/lib/signal.js":'var $builtinmodule=function(){var a={SIG_DFL:new Sk.builtin.int_(0),SIG_IGN:new Sk.builtin.int_(1),CTRL_C_EVENT:new Sk.builtin.int_(0),CTRL_BREAK_EVENT:new Sk.builtin.int_(0),NSIG:new Sk.builtin.int_(23),SIGHUP:new Sk.builtin.int_(1),SIGNINT:new Sk.builtin.int_(2),SIGILL:new Sk.builtin.int_(4),SIGFPE:new Sk.builtin.int_(8),SIGKILL:new Sk.builtin.int_(9),SIGSEGV:new Sk.builtin.int_(11),SIGTERM:new Sk.builtin.int_(15),SIGBREAK:new Sk.builtin.int_(21),SIGABRT:new Sk.builtin.int_(22),pause:new Sk.builtin.func(function(){Sk.builtin.pyCheckArgsLen("pause",arguments.length,0,0);var a=new Sk.misceval.Suspension;return a.resume=function(){return Sk.builtin.none.none$},a.data={type:"Sk.promise",promise:new Promise(function(a){if(null!=Sk.signals&&Sk.signals.addEventListener){function handleSignal(){Sk.signals.removeEventListener(handleSignal),a()}Sk.signals.addEventListener(handleSignal)}else console.warn("signal.pause() not supported"),Sk.misceval.print_("signal.pause() not supported"),a()})},a}),signal:new Sk.builtin.func(function(){throw new Sk.builtin.NotImplementedError("signal.signal is not supported.")})};return a};',"src/lib/site.py":'raise NotImplementedError("site is not yet implemented in Skulpt")\n',"src/lib/smtpd.py":'raise NotImplementedError("smtpd is not yet implemented in Skulpt")\n',"src/lib/smtplib.py":'raise NotImplementedError("smtplib is not yet implemented in Skulpt")\n',"src/lib/sndhdr.py":'raise NotImplementedError("sndhdr is not yet implemented in Skulpt")\n',"src/lib/socket.py":'raise NotImplementedError("socket is not yet implemented in Skulpt")\n',"src/lib/sqlite3/__init__.py":'raise NotImplementedError("sqlite3 is not yet implemented in Skulpt")\n',"src/lib/sre.py":'raise NotImplementedError("sre is not yet implemented in Skulpt")\n',"src/lib/sre_compile.py":'raise NotImplementedError("sre_compile is not yet implemented in Skulpt")\n',"src/lib/sre_constants.py":'raise NotImplementedError("sre_constants is not yet implemented in Skulpt")\n',"src/lib/sre_parse.py":'raise NotImplementedError("sre_parse is not yet implemented in Skulpt")\n',"src/lib/ssl.py":'raise NotImplementedError("ssl is not yet implemented in Skulpt")\n',"src/lib/stat.py":'raise NotImplementedError("stat is not yet implemented in Skulpt")\n',"src/lib/statvfs.py":'raise NotImplementedError("statvfs is not yet implemented in Skulpt")\n',"src/lib/string.js":'var $builtinmodule=function(){var a={};return a.ascii_lowercase=new Sk.builtin.str("abcdefghijklmnopqrstuvwxyz"),a.ascii_uppercase=new Sk.builtin.str("ABCDEFGHIJKLMNOPQRSTUVWXYZ"),a.ascii_letters=new Sk.builtin.str(a.ascii_lowercase.v+a.ascii_uppercase.v),a.lowercase=new Sk.builtin.str("abcdefghijklmnopqrstuvwxyz"),a.uppercase=new Sk.builtin.str("ABCDEFGHIJKLMNOPQRSTUVWXYZ"),a.letters=new Sk.builtin.str(a.lowercase.v+a.uppercase.v),a.digits=new Sk.builtin.str("0123456789"),a.hexdigits=new Sk.builtin.str("0123456789abcdefABCDEF"),a.octdigits=new Sk.builtin.str("01234567"),a.punctuation=new Sk.builtin.str("!\\"#$%&\'()*+,-./:;<=>?@[\\\\]^_`{|}~"),a.whitespace=new Sk.builtin.str("\\t\\n\\x0B\\f\\r "),a.printable=new Sk.builtin.str(a.digits.v+a.letters.v+a.punctuation.v+" \\t\\n\\r\\x0B\\f"),a.split=new Sk.builtin.func(function(...a){return Sk.misceval.callsimArray(Sk.builtin.str.prototype.split,a)}),a.capitalize=new Sk.builtin.func(function(a){return Sk.misceval.callsimArray(Sk.builtin.str.prototype.capitalize,[a])}),a.join=new Sk.builtin.func(function(a,b){return void 0===b&&(b=new Sk.builtin.str(" ")),Sk.misceval.callsimArray(Sk.builtin.str.prototype.join,[b,a])}),a.capwords=new Sk.builtin.func(function(b,c){if(Sk.builtin.pyCheckArgsLen("capwords",arguments.length,1,2),!Sk.builtin.checkString(b))throw new Sk.builtin.TypeError("s must be a string");if(void 0===c&&(c=new Sk.builtin.str(" ")),!Sk.builtin.checkString(c))throw new Sk.builtin.TypeError("sep must be a string");for(var d=Sk.misceval.callsimArray(a.split,[b,c]).v,e=[],f=0;f<d.length;f++){var g=d[f],h=Sk.misceval.callsimArray(a.capitalize,[g]);e.push(h)}return Sk.misceval.callsimArray(a.join,[new Sk.builtin.list(e),c])}),a};',"src/lib/string.py":'raise NotImplementedError("string is not yet implemented in Skulpt")\n',"src/lib/stringold.py":'raise NotImplementedError("stringold is not yet implemented in Skulpt")\n',"src/lib/stringprep.py":'raise NotImplementedError("stringprep is not yet implemented in Skulpt")\n',"src/lib/struct.py":'raise NotImplementedError("struct is not yet implemented in Skulpt")\n',"src/lib/subprocess.py":'raise NotImplementedError("subprocess is not yet implemented in Skulpt")\n',"src/lib/sunau.py":'raise NotImplementedError("sunau is not yet implemented in Skulpt")\n',"src/lib/sunaudio.py":'raise NotImplementedError("sunaudio is not yet implemented in Skulpt")\n',"src/lib/symbol.py":'raise NotImplementedError("symbol is not yet implemented in Skulpt")\n',"src/lib/symtable.py":'raise NotImplementedError("symtable is not yet implemented in Skulpt")\n',"src/lib/tabnanny.py":'raise NotImplementedError("tabnanny is not yet implemented in Skulpt")\n',"src/lib/tarfile.py":'raise NotImplementedError("tarfile is not yet implemented in Skulpt")\n',"src/lib/telnetlib.py":'raise NotImplementedError("telnetlib is not yet implemented in Skulpt")\n',"src/lib/tempfile.py":'raise NotImplementedError("tempfile is not yet implemented in Skulpt")\n',"src/lib/test/__init__.py":"__author__ = 'bmiller'\n\ndef testEqual(actual, expected):\n if type(expected) == type(1):\n if actual == expected:\n print('Pass')\n return True\n elif type(expected) == type(1.11):\n if abs(actual-expected) < 0.00001:\n print('Pass')\n return True\n else:\n if actual == expected:\n print('Pass')\n return True\n print('Test Failed: expected ' + str(expected) + ' but got ' + str(actual))\n return False\n\ndef testNotEqual(actual, expected):\n pass\n\n","src/lib/test/bad_getattr.py":'x = 1\n\n__getattr__ = "Surprise!"\n__dir__ = "Surprise again!"\n',"src/lib/test/bad_getattr2.py":'def __getattr__():\n "Bad one"\n\nx = 1\n\ndef __dir__(bad_sig):\n return []\n',"src/lib/test/bad_getattr3.py":"def __getattr__(name):\n global __getattr__\n if name != 'delgetattr':\n raise AttributeError\n del __getattr__\n raise AttributeError\n","src/lib/test/decimaltestdata/__init__.py":'raise NotImplementedError("decimaltestdata is not yet implemented in Skulpt")\n',"src/lib/test/good_getattr.py":"x = 1\n\ndef __dir__():\n return ['a', 'b', 'c']\n\ndef __getattr__(name):\n if name == \"yolo\":\n raise AttributeError(\"Deprecated, use whatever instead\")\n return f\"There is {name}\"\n\ny = 2\n","src/lib/test/test_support.py":'"""Supporting definitions for the Python regression tests."""\n\nif __name__ != \'test.test_support\':\n raise ImportError(\'test_support must be imported from the test package\')\n\nimport unittest\n\n\n# def run_unittest(*classes):\n# """Run tests from unittest.TestCase-derived classes."""\n# valid_types = (unittest.TestSuite, unittest.TestCase)\n# suite = unittest.TestSuite()\n# for cls in classes:\n# if isinstance(cls, str):\n# if cls in sys.modules:\n# suite.addTest(unittest.findTestCases(sys.modules[cls]))\n# else:\n# raise ValueError("str arguments must be keys in sys.modules")\n# elif isinstance(cls, valid_types):\n# suite.addTest(cls)\n# else:\n# suite.addTest(unittest.makeSuite(cls))\n# _run_suite(suite)\n\ndef run_unittest(*classes):\n """Run tests from unittest.TestCase-derived classes."""\n for cls in classes:\n print cls\n if issubclass(cls, unittest.TestCase):\n cls().main()\n else:\n print "Don\'t know what to do with ", cls\n',"src/lib/textwrap.py":"\"\"\"Text wrapping and filling.\n\"\"\"\n\n# Copyright (C) 1999-2001 Gregory P. Ward.\n# Copyright (C) 2002, 2003 Python Software Foundation.\n# Written by Greg Ward <gward@python.net>\n\nimport re, string\n\n__all__ = ['TextWrapper', 'wrap', 'fill', 'dedent', 'indent', 'shorten']\n\n# Hardcode the recognized whitespace characters to the US-ASCII\n# whitespace characters. The main reason for doing this is that\n# some Unicode spaces (like \\u00a0) are non-breaking whitespaces.\n_whitespace = '\\t\\n\\x0b\\x0c\\r '\n\nclass TextWrapper:\n \"\"\"\n Object for wrapping/filling text. The public interface consists of\n the wrap() and fill() methods; the other methods are just there for\n subclasses to override in order to tweak the default behaviour.\n If you want to completely replace the main wrapping algorithm,\n you'll probably have to override _wrap_chunks().\n Several instance attributes control various aspects of wrapping:\n width (default: 70)\n the maximum width of wrapped lines (unless break_long_words\n is false)\n initial_indent (default: \"\")\n string that will be prepended to the first line of wrapped\n output. Counts towards the line's width.\n subsequent_indent (default: \"\")\n string that will be prepended to all lines save the first\n of wrapped output; also counts towards each line's width.\n expand_tabs (default: true)\n Expand tabs in input text to spaces before further processing.\n Each tab will become 0 .. 'tabsize' spaces, depending on its position\n in its line. If false, each tab is treated as a single character.\n tabsize (default: 8)\n Expand tabs in input text to 0 .. 'tabsize' spaces, unless\n 'expand_tabs' is false.\n replace_whitespace (default: true)\n Replace all whitespace characters in the input text by spaces\n after tab expansion. Note that if expand_tabs is false and\n replace_whitespace is true, every tab will be converted to a\n single space!\n fix_sentence_endings (default: false)\n Ensure that sentence-ending punctuation is always followed\n by two spaces. Off by default because the algorithm is\n (unavoidably) imperfect.\n break_long_words (default: true)\n Break words longer than 'width'. If false, those words will not\n be broken, and some lines might be longer than 'width'.\n break_on_hyphens (default: true)\n Allow breaking hyphenated words. If true, wrapping will occur\n preferably on whitespaces and right after hyphens part of\n compound words.\n drop_whitespace (default: true)\n Drop leading and trailing whitespace from lines.\n max_lines (default: None)\n Truncate wrapped lines.\n placeholder (default: ' [...]')\n Append to the last line of truncated text.\n \"\"\"\n\n unicode_whitespace_trans = {}\n # uspace = ord(' ')\n uspace = ' '\n for x in _whitespace:\n # unicode_whitespace_trans[ord(x)] = uspace\n unicode_whitespace_trans[x] = uspace\n\n # This funky little regex is just the trick for splitting\n # text up into word-wrappable chunks. E.g.\n # \"Hello there -- you goof-ball, use the -b option!\"\n # splits into\n # Hello/ /there/ /--/ /you/ /goof-/ball,/ /use/ /the/ /-b/ /option!\n # (after stripping out empty strings).\n wordsep_re = re.compile(\n r'(\\s+|' # any whitespace\n r'[^\\s\\w]*\\w+[^0-9\\W]-(?=\\w+[^0-9\\W]))') # hyphenated words\n em_dash = re.compile(r'(\\s+|' # any whitespace\n r'[^\\s\\w]*\\w+[^0-9\\W]-(?=\\w+[^0-9\\W])|' # hyphenated words\n r'(?!^)-{2,}(?=\\w))') # em-dash\n\n \n # This less funky little regex just split on recognized spaces. E.g.\n # \"Hello there -- you goof-ball, use the -b option!\"\n # splits into\n # Hello/ /there/ /--/ /you/ /goof-ball,/ /use/ /the/ /-b/ /option!/\n wordsep_simple_re = re.compile(r'(\\s+)')\n\n\n # XXX this is not locale- or charset-aware -- string.lowercase\n # is US-ASCII only (and therefore English-only)\n sentence_end_re = re.compile(r'[a-z]' # lowercase letter\n r'[\\.\\!\\?]' # sentence-ending punct.\n r'[\\\"\\']?' # optional end-of-quote\n r'\\Z') # end of chunk\n sentence_end_re = r'[a-z][\\.\\!\\?][\\\"\\']?'\n\n def __init__(self,\n width=70,\n initial_indent=\"\",\n subsequent_indent=\"\",\n expand_tabs=True,\n replace_whitespace=True,\n fix_sentence_endings=False,\n break_long_words=True,\n drop_whitespace=True,\n break_on_hyphens=True,\n tabsize=8,\n max_lines=None,\n placeholder=' [...]'):\n self.width = width\n self.initial_indent = initial_indent\n self.subsequent_indent = subsequent_indent\n self.expand_tabs = expand_tabs\n self.replace_whitespace = replace_whitespace\n self.fix_sentence_endings = fix_sentence_endings\n self.break_long_words = break_long_words\n self.drop_whitespace = drop_whitespace\n self.break_on_hyphens = break_on_hyphens\n self.tabsize = tabsize\n self.max_lines = max_lines\n self.placeholder = placeholder\n\n\n # -- Private methods -----------------------------------------------\n # (possibly useful for subclasses to override)\n\n def _munge_whitespace(self, text):\n \"\"\"_munge_whitespace(text : string) -> string\n Munge whitespace in text: expand tabs and convert all other\n whitespace characters to spaces. Eg. \" foo\\\\tbar\\\\n\\\\nbaz\"\n becomes \" foo bar baz\".\n \"\"\"\n if self.expand_tabs:\n text = text.expandtabs(self.tabsize)\n if self.replace_whitespace:\n for key, val in self.unicode_whitespace_trans.items():\n text = text.replace(key, val)\n return text\n\n\n def _split(self, text):\n \"\"\"_split(text : string) -> [string]\n Split the text to wrap into indivisible chunks. Chunks are\n not quite the same as words; see _wrap_chunks() for full\n details. As an example, the text\n Look, goof-ball -- use the -b option!\n breaks into the following chunks:\n 'Look,', ' ', 'goof-', 'ball', ' ', '--', ' ',\n 'use', ' ', 'the', ' ', '-b', ' ', 'option!'\n if break_on_hyphens is True, or in:\n 'Look,', ' ', 'goof-ball', ' ', '--', ' ',\n 'use', ' ', 'the', ' ', '-b', ' ', option!'\n otherwise.\n \"\"\"\n if self.break_on_hyphens is True:\n chunks = self.wordsep_re.split(text)\n if \"--\" in text:\n chunks = [item \n for sublist in [self.em_dash.split(chunk) for chunk in chunks] \n for item in sublist]\n else:\n chunks = self.wordsep_simple_re.split(text)\n chunks = [c for c in chunks if c]\n return chunks\n\n def _fix_sentence_endings(self, chunks):\n \"\"\"_fix_sentence_endings(chunks : [string])\n Correct for sentence endings buried in 'chunks'. Eg. when the\n original text contains \"... foo.\\\\nBar ...\", munge_whitespace()\n and split() will convert that to [..., \"foo.\", \" \", \"Bar\", ...]\n which has one too few spaces; this method simply changes the one\n space to two.\n \"\"\"\n i = 0\n # patsearch = self.sentence_end_re.search\n while i < len(chunks)-1:\n if chunks[i+1] == \" \" and re.search(self.sentence_end_re, chunks[i]) and chunks[i][-1] in \".!?\\\"\\'\":\n chunks[i+1] = \" \"\n i += 2\n else:\n i += 1\n\n def _handle_long_word(self, reversed_chunks, cur_line, cur_len, width):\n \"\"\"_handle_long_word(chunks : [string],\n cur_line : [string],\n cur_len : int, width : int)\n Handle a chunk of text (most likely a word, not whitespace) that\n is too long to fit in any line.\n \"\"\"\n # Figure out when indent is larger than the specified width, and make\n # sure at least one character is stripped off on every pass\n if width < 1:\n space_left = 1\n else:\n space_left = width - cur_len\n\n # If we're allowed to break long words, then do so: put as much\n # of the next chunk onto the current line as will fit.\n if self.break_long_words:\n cur_line.append(reversed_chunks[-1][:space_left])\n reversed_chunks[-1] = reversed_chunks[-1][space_left:]\n\n # Otherwise, we have to preserve the long word intact. Only add\n # it to the current line if there's nothing already there --\n # that minimizes how much we violate the width constraint.\n elif not cur_line:\n cur_line.append(reversed_chunks.pop())\n\n # If we're not allowed to break long words, and there's already\n # text on the current line, do nothing. Next time through the\n # main loop of _wrap_chunks(), we'll wind up here again, but\n # cur_len will be zero, so the next line will be entirely\n # devoted to the long word that we can't handle right now.\n\n def _wrap_chunks(self, chunks):\n \"\"\"_wrap_chunks(chunks : [string]) -> [string]\n Wrap a sequence of text chunks and return a list of lines of\n length 'self.width' or less. (If 'break_long_words' is false,\n some lines may be longer than this.) Chunks correspond roughly\n to words and the whitespace between them: each chunk is\n indivisible (modulo 'break_long_words'), but a line break can\n come between any two chunks. Chunks should not have internal\n whitespace; ie. a chunk is either all whitespace or a \"word\".\n Whitespace chunks will be removed from the beginning and end of\n lines, but apart from that whitespace is preserved.\n \"\"\"\n lines = []\n if self.width <= 0:\n raise ValueError(\"invalid width %r (must be > 0)\" % self.width)\n if self.max_lines is not None:\n if self.max_lines > 1:\n indent = self.subsequent_indent\n else:\n indent = self.initial_indent\n if len(indent) + len(self.placeholder.lstrip()) > self.width:\n raise ValueError(\"placeholder too large for max width\")\n\n # Arrange in reverse order so items can be efficiently popped\n # from a stack of chucks.\n chunks.reverse()\n\n while chunks:\n\n # Start the list of chunks that will make up the current line.\n # cur_len is just the length of all the chunks in cur_line.\n cur_line = []\n cur_len = 0\n\n # Figure out which static string will prefix this line.\n if lines:\n indent = self.subsequent_indent\n else:\n indent = self.initial_indent\n\n # Maximum width for this line.\n width = self.width - len(indent)\n\n # First chunk on line is whitespace -- drop it, unless this\n # is the very beginning of the text (ie. no lines started yet).\n if self.drop_whitespace and chunks[-1].strip() == '' and lines:\n del chunks[-1]\n\n while chunks:\n l = len(chunks[-1])\n\n # Can at least squeeze this chunk onto the current line.\n if cur_len + l <= width:\n cur_line.append(chunks.pop())\n cur_len += l\n\n # Nope, this line is full.\n else:\n break\n\n # The current line is full, and the next chunk is too big to\n # fit on *any* line (not just this one).\n if chunks and len(chunks[-1]) > width:\n self._handle_long_word(chunks, cur_line, cur_len, width)\n cur_len = sum(map(len, cur_line))\n\n # If the last chunk on this line is all whitespace, drop it.\n if self.drop_whitespace and cur_line and cur_line[-1].strip() == '':\n cur_len -= len(cur_line[-1])\n del cur_line[-1]\n\n if cur_line:\n if (self.max_lines is None or\n len(lines) + 1 < self.max_lines or\n (not chunks or\n self.drop_whitespace and\n len(chunks) == 1 and\n not chunks[0].strip()) and cur_len <= width):\n # Convert current line back to a string and store it in\n # list of all lines (return value).\n lines.append(indent + ''.join(cur_line))\n else:\n while cur_line:\n if (cur_line[-1].strip() and\n cur_len + len(self.placeholder) <= width):\n cur_line.append(self.placeholder)\n lines.append(indent + ''.join(cur_line))\n break\n cur_len -= len(cur_line[-1])\n del cur_line[-1]\n else:\n if lines:\n prev_line = lines[-1].rstrip()\n if (len(prev_line) + len(self.placeholder) <=\n self.width):\n lines[-1] = prev_line + self.placeholder\n break\n lines.append(indent + self.placeholder.lstrip())\n break\n\n return lines\n\n def _split_chunks(self, text):\n text = self._munge_whitespace(text)\n return self._split(text)\n\n # -- Public interface ----------------------------------------------\n\n def wrap(self, text):\n \"\"\"wrap(text : string) -> [string]\n Reformat the single paragraph in 'text' so it fits in lines of\n no more than 'self.width' columns, and return a list of wrapped\n lines. Tabs in 'text' are expanded with string.expandtabs(),\n and all other whitespace characters (including newline) are\n converted to space.\n \"\"\"\n chunks = self._split_chunks(text)\n if self.fix_sentence_endings:\n self._fix_sentence_endings(chunks)\n return self._wrap_chunks(chunks)\n\n def fill(self, text):\n \"\"\"fill(text : string) -> string\n Reformat the single paragraph in 'text' to fit in lines of no\n more than 'self.width' columns, and return a new string\n containing the entire wrapped paragraph.\n \"\"\"\n return \"\\n\".join(self.wrap(text))\n\n\n# -- Convenience interface ---------------------------------------------\n\ndef wrap(text, width=70, **kwargs):\n \"\"\"Wrap a single paragraph of text, returning a list of wrapped lines.\n Reformat the single paragraph in 'text' so it fits in lines of no\n more than 'width' columns, and return a list of wrapped lines. By\n default, tabs in 'text' are expanded with string.expandtabs(), and\n all other whitespace characters (including newline) are converted to\n space. See TextWrapper class for available keyword args to customize\n wrapping behaviour.\n \"\"\"\n w = TextWrapper(width=width, **kwargs)\n return w.wrap(text)\n\ndef fill(text, width=70, **kwargs):\n \"\"\"Fill a single paragraph of text, returning a new string.\n Reformat the single paragraph in 'text' to fit in lines of no more\n than 'width' columns, and return a new string containing the entire\n wrapped paragraph. As with wrap(), tabs are expanded and other\n whitespace characters converted to space. See TextWrapper class for\n available keyword args to customize wrapping behaviour.\n \"\"\"\n w = TextWrapper(width=width, **kwargs)\n return w.fill(text)\n\ndef shorten(text, width, **kwargs):\n \"\"\"Collapse and truncate the given text to fit in the given width.\n The text first has its whitespace collapsed. If it then fits in\n the *width*, it is returned as is. Otherwise, as many words\n as possible are joined and then the placeholder is appended::\n >>> textwrap.shorten(\"Hello world!\", width=12)\n 'Hello world!'\n >>> textwrap.shorten(\"Hello world!\", width=11)\n 'Hello [...]'\n \"\"\"\n w = TextWrapper(width=width, max_lines=1, **kwargs)\n return w.fill(' '.join(text.strip().split()))\n\n\n# -- Loosely related functionality -------------------------------------\n\n# _whitespace_only_re = re.compile('^[ \\t]+$', re.MULTILINE)\n# _leading_whitespace_re = re.compile('(^[ \\t]*)(?:[^ \\t\\n])', re.MULTILINE)\n\ndef dedent(text):\n \"\"\"Remove any common leading whitespace from every line in `text`.\n This can be used to make triple-quoted strings line up with the left\n edge of the display, while still presenting them in the source code\n in indented form.\n Note that tabs and spaces are both treated as whitespace, but they\n are not equal: the lines \" hello\" and \"\\\\thello\" are\n considered to have no common leading whitespace.\n Entirely blank lines are normalized to a newline character.\n \"\"\"\n # Look for the longest leading string of spaces and tabs common to\n # all lines.\n margin = None\n\n indents = re.findall(r'(^[ \\t]*)(?:[^ \\t\\n])',text, re.MULTILINE)\n for indent in indents:\n if margin is None:\n margin = indent\n\n # Current line more deeply indented than previous winner:\n # no change (previous winner is still on top).\n elif indent.startswith(margin):\n pass\n\n # Current line consistent with and no deeper than previous winner:\n # it's the new winner.\n elif margin.startswith(indent):\n margin = indent\n\n # Find the largest common whitespace between current line and previous\n # winner.\n else:\n for i, (x, y) in enumerate(zip(margin, indent)):\n if x != y:\n margin = margin[:i]\n break\n # sanity check (testing/debugging only)\n if 0 and margin:\n for line in text.split(\"\\n\"):\n assert not line or line.startswith(margin), \\\n \"line = %r, margin = %r\" % (line, margin)\n\n if margin:\n lines = [line[len(margin):] \n if line.strip()\n else line.strip() \n for line in text.split(\"\\n\")]\n text = \"\\n\".join(lines)\n return text\n\n\ndef indent(text, prefix, predicate=None):\n \"\"\"Adds 'prefix' to the beginning of selected lines in 'text'.\n If 'predicate' is provided, 'prefix' will only be added to the lines\n where 'predicate(line)' is True. If 'predicate' is not provided,\n it will default to adding 'prefix' to all non-empty lines that do not\n consist solely of whitespace characters.\n \"\"\"\n if predicate is None:\n def predicate(line):\n return line.strip()\n\n def prefixed_lines():\n for line in text.splitlines(True):\n yield (prefix + line if predicate(line) else line)\n return ''.join(prefixed_lines())\n\n\nif __name__ == \"__main__\":\n #print dedent(\"\\tfoo\\n\\tbar\")\n #print dedent(\" \\thello there\\n \\t how are you?\")\n print(dedent(\"Hello there.\\n This is indented.\"))","src/lib/this.py":'raise NotImplementedError("this is not yet implemented in Skulpt")\n',"src/lib/threading.py":'raise NotImplementedError("threading is not yet implemented in Skulpt")\n',"src/lib/time.js":'var $builtinmodule=function(){function check_struct_time(a){if(!(a instanceof b))throw new Sk.builtin.TypeError("Required argument \'struct_time\' must be of type: \'struct_time\'");var c,d=a.v.length,e=a.v;for(c=0;c<d;++c)if(!Sk.builtin.checkInt(e[c]))throw new Sk.builtin.TypeError("struct_time may only contain integers");return!0}function padLeft(a,b,d){var c=a.toString();return Array(b-c.length+1).join(d||" ")+c}function isLeapYear(a){return 0==(3&a)&&(0!=a%100||0==a%400)}function getDayOfYear(a,b){b=b||!1;var c=b?a.getUTCMonth():a.getMonth(),d=b?a.getUTCDate():a.getDate(),e=[0,31,59,90,120,151,181,212,243,273,304,334][c]+d;return 1<c&&isLeapYear(b?a.getUTCFullYear():a.getFullYear())&&e++,e}function stdTimezoneOffset(){var a=Math.max,b=new Date(2002,0,1),c=new Date(2002,6,1);return a(b.getTimezoneOffset(),c.getTimezoneOffset())}function dst(a){return a.getTimezoneOffset()<stdTimezoneOffset()}function timeZoneName(a){var b,c=/\\((.*)\\)/.exec(a.toString());if(null!=this.navigator&&(b=this.navigator.userLanguage||this.navigator.language),c&&1<c.length)return c[1];if(void 0===b)return null;try{var d=a.toLocaleString(b,{timeZoneName:"short"});return c=d.split(" "),c[c.length-1]}catch(a){return null}}function date_to_struct_time(a,c){return c=c||!1,new b([Sk.builtin.assk$(c?a.getUTCFullYear():a.getFullYear()),Sk.builtin.assk$((c?a.getUTCMonth():a.getMonth())+1),Sk.builtin.assk$(c?a.getUTCDate():a.getDate()),Sk.builtin.assk$(c?a.getUTCHours():a.getHours()),Sk.builtin.assk$(c?a.getUTCMinutes():a.getMinutes()),Sk.builtin.assk$(c?a.getUTCSeconds():a.getSeconds()),Sk.builtin.assk$(((c?a.getUTCDay():a.getDay())+6)%7),Sk.builtin.assk$(getDayOfYear(a,c)),Sk.builtin.assk$(c?0:dst(a)?1:0)])}function from_seconds(a,b){var c=new Date;if(a){Sk.builtin.pyCheckType("secs","number",Sk.builtin.checkNumber(a));var d=Sk.builtin.asnum$(a);c.setTime(1e3*d)}return date_to_struct_time(c,b)}function asctime_f(a){if(Sk.builtin.pyCheckArgsLen("asctime",arguments.length,0,1),!a||Sk.builtin.checkNone(a)?a=from_seconds():!(a instanceof b)&&(a=new b(a)),a instanceof Sk.builtin.tuple&&9==a.v.length){var e=[d[Sk.builtin.asnum$(a.v[6])],c[Sk.builtin.asnum$(a.v[1])-1],padLeft(Sk.builtin.asnum$(a.v[2]).toString(),2,"0"),padLeft(Sk.builtin.asnum$(a.v[3]).toString(),2,"0")+":"+padLeft(Sk.builtin.asnum$(a.v[4]).toString(),2,"0")+":"+padLeft(Sk.builtin.asnum$(a.v[5]).toString(),2,"0"),padLeft(Sk.builtin.asnum$(a.v[0]).toString(),4,"0")];return new Sk.builtin.str(e.join(" "))}}function mktime_f(a){if(Sk.builtin.pyCheckArgsLen("mktime",arguments.length,1,1),a instanceof Sk.builtin.tuple&&9==a.v.length){var b=new Date(Sk.builtin.asnum$(a.v[0]),Sk.builtin.asnum$(a.v[1])-1,Sk.builtin.asnum$(a.v[2]),Sk.builtin.asnum$(a.v[3]),Sk.builtin.asnum$(a.v[4]),Sk.builtin.asnum$(a.v[5]));return Sk.builtin.assk$(b.getTime()/1e3,void 0)}throw new Sk.builtin.TypeError("mktime() requires a struct_time or 9-tuple")}var a={__package__:new Sk.builtin.str("")},b=Sk.builtin.make_structseq("time","struct_time",{tm_year:"year, for example, 1993",tm_mon:"month of year, range [1, 12]",tm_mday:"day of month, range [1, 31]",tm_hour:"hours, range [0, 23]",tm_min:"minutes, range [0, 59]",tm_sec:"seconds, range [0, 61]",tm_wday:"day of week, range [0, 6], Monday is 0",tm_yday:"day of year, range [1, 366]",tm_isdst:"1 if summer time is in effect, 0 if not, and -1 if unknown"});a.struct_time=b,a.time=new Sk.builtin.func(function(){Sk.builtin.pyCheckArgsLen("time",arguments.length,0,0);var a=Date.now();return this.performance&&this.performance.now&&(a+=performance.now()%1),Sk.builtin.assk$(a/1e3,void 0)}),a.sleep=new Sk.builtin.func(function(a){return Sk.builtin.pyCheckArgsLen("sleep",arguments.length,1,1),Sk.builtin.pyCheckType("delay","float",Sk.builtin.checkNumber(a)),new Sk.misceval.promiseToSuspension(new Promise(function(b){Sk.setTimeout(function(){b(Sk.builtin.none.none$)},1e3*Sk.ffi.remapToJs(a))}))}),a.localtime=new Sk.builtin.func(function(a){return Sk.builtin.pyCheckArgsLen("localtime",arguments.length,0,1),from_seconds(a,!1)}),a.gmtime=new Sk.builtin.func(function(a){return Sk.builtin.pyCheckArgsLen("gmtime",arguments.length,0,1),from_seconds(a,!0)});var c=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],d=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];return a.asctime=new Sk.builtin.func(asctime_f),a.ctime=new Sk.builtin.func(function(a){return Sk.builtin.pyCheckArgsLen("ctime",arguments.length,0,1),asctime_f(from_seconds(a))}),a.mktime=new Sk.builtin.func(mktime_f),a.timezone=new Sk.builtin.int_(60*stdTimezoneOffset()),a.altzone=new Sk.builtin.int_(60*function altTimezoneOffset(){var a=Math.min,b=new Date(2002,0,1),c=new Date(2002,6,1);return a(b.getTimezoneOffset(),c.getTimezoneOffset())}()),a.daylight=new Sk.builtin.int_(dst(new Date)?1:0),a.tzname=new Sk.builtin.tuple(function timeZoneNames(){var a=new Date(2002,0,1),b=new Date(2002,6,1);return dst(a)?[new Sk.builtin.str(timeZoneName(b)),new Sk.builtin.str(timeZoneName(a))]:[new Sk.builtin.str(timeZoneName(a)),new Sk.builtin.str(timeZoneName(b))]}()),a.accept2dyear=Sk.builtin.assk$(1),a.clock=new Sk.builtin.func(function(){var a=0;return a=this.performance&&this.performance.now?performance.now()/1e3:new Date().getTime()/1e3,new Sk.builtin.float_(a)}),a.strftime=new Sk.builtin.func(function strftime_f(a,c){var d;if(Sk.builtin.pyCheckArgsLen("strftime",arguments.length,1,2),!Sk.builtin.checkString(a))throw new Sk.builtin.TypeError("format must be a string");return c?!(c instanceof b)&&(c=new b(c)):c=from_seconds(),check_struct_time(c),d=Sk.ffi.remapToJs(a),Sk.ffi.remapToPy(strftime(d,new Date(1e3*mktime_f(c).v)))}),a.tzset=new Sk.builtin.func(function tzset_f(){throw new Sk.builtin.NotImplementedError("time.tzset() is not yet implemented")}),a.strptime=new Sk.builtin.func(function strptime_f(a,b){Sk.builtin.pyCheckArgsLen("strptime",arguments.length,1,2),Sk.builtin.pyCheckType("string","string",Sk.builtin.checkString(a)),void 0===b?b=new Sk.builtin.str("%a %b %d %H:%M:%S %Y"):Sk.builtin.pyCheckType("format","string",Sk.builtin.checkString(b));let c=date_to_struct_time(strptime(Sk.ffi.remapToJs(a),Sk.ffi.remapToJs(b),!0));return c.v[8]=new Sk.builtin.int_(-1),c}),a};',"src/lib/timeit.py":'raise NotImplementedError("timeit is not yet implemented in Skulpt")\n',"src/lib/toaiff.py":'raise NotImplementedError("toaiff is not yet implemented in Skulpt")\n',"src/lib/token.js":'var $builtinmodule=function(){var a={__file__:"/src/lib/token.py"};const b=[];for(token in Sk.token.tok_name){const c=Sk.token.tok_name[token].slice(2),d=parseInt(token,10);b.push(Sk.ffi.remapToPy(d)),b.push(Sk.ffi.remapToPy(c)),a[c]=Sk.ffi.remapToPy(d)}return a.tok_name=new Sk.builtin.dict(b),a.ISTERMINAL=new Sk.builtin.func(function(a){return Sk.builtin.pyCheckArgsLen("ISTERMINAL",arguments.length,1,1),Sk.token.ISTERMINAL(Sk.ffi.remapToJs(a))}),a.ISNONTERMINAL=new Sk.builtin.func(function(a){return Sk.builtin.pyCheckArgsLen("ISNONTERMINAL",arguments.length,1,1),Sk.token.ISNONTERMINAL(Sk.ffi.remapToJs(a))}),a.ISEOF=new Sk.builtin.func(function(a){return Sk.builtin.pyCheckArgsLen("ISEOF",arguments.length,1,1),Sk.token.ISEOF(Sk.ffi.remapToJs(a))}),a};',"src/lib/tokenize.js":'var $builtinmodule=function(){var a={tokenize:new Sk.builtin.func(function(a){Sk.builtin.pyCheckArgsLen("tokenize",1,1),Sk.builtin.checkFunction(a);const b=[];return Sk._tokenize("<stdin>",function jsReadline(){const b=Sk.misceval.callsimArray(a);return Sk.ffi.remapToJs(b)},"UTF-8",function receiveToken(a){b.push(new Sk.builtin.tuple([Sk.ffi.remapToPy(a.type),Sk.ffi.remapToPy(a.string),new Sk.builtin.tuple([Sk.ffi.remapToPy(a.start[0]),Sk.ffi.remapToPy(a.start[1])]),new Sk.builtin.tuple([Sk.ffi.remapToPy(a.end[0]),Sk.ffi.remapToPy(a.end[1])]),Sk.ffi.remapToPy(a.line)]))}),new Sk.builtin.list(b)})};return a};',"src/lib/trace.py":'raise NotImplementedError("trace is not yet implemented in Skulpt")\n',"src/lib/traceback.py":'raise NotImplementedError("traceback is not yet implemented in Skulpt")\n',"src/lib/tty.py":'raise NotImplementedError("tty is not yet implemented in Skulpt")\n',"src/lib/turtle.js":'var $builtinmodule=function(){"use strict";var e=function getConfiguredTarget(){var e,t;for(e=Sk.TurtleGraphics&&Sk.TurtleGraphics.target||"turtle",t="string"==typeof e?document.getElementById(e):e;t.firstChild;)t.removeChild(t.firstChild);return t}();return e.turtleInstance?e.turtleInstance.reset():e.turtleInstance=function generateTurtleModule(e){var t=Math.round,r=Math.max,n=Math.sqrt,a=Math.min,s=Math.abs,o=Math.PI,d=Math.atan2,_=Math.sin,c=Math.cos;function getAsset(e){var t=g.assets,r="function"==typeof t?t(e):t[e];return"string"==typeof r?new Promise(function(t,n){var a=new Image;a.onload=function(){g.assets[e]=this,t(a)},a.onerror=function(){n(new Error("Missing asset: "+r))},a.src=r}):new InstantPromise(void 0,r)}function InstantPromise(e,t){this.lastResult=t,this.lastError=e}function FrameManager(){this.reset()}function getFrameManager(){return A||(A=new FrameManager),A}function MouseHandler(){var t=this;for(var r in this._target=getTarget(),this._managers={},this._handlers={mousedown:function(r){t.onEvent("mousedown",r)},mouseup:function(r){t.onEvent("mouseup",r)},mousemove:function(r){t.onEvent("mousemove",r)}},this._handlers)this._target.addEventListener(r,this._handlers[r])}function EventManager(e,t){this._type=e,this._target=t,this._handlers=void 0,getMouseHandler().addManager(e,this)}function Turtle(e){if(getFrameManager().addTurtle(this),this._screen=getScreen(),this._managers={},this._shape=e.v,!v.hasOwnProperty(this._shape))throw new Sk.builtin.ValueError("Shape:\'"+this._shape+"\' not in default shape, please check shape again!");this.reset()}function Screen(){var e,t;this._frames=1,this._delay=void 0,this._bgcolor="none",this._mode="standard",this._managers={},this._keyLogger={},e=(g.worldWidth||g.width||getWidth())/2,t=(g.worldHeight||g.height||getHeight())/2,this.setUpWorld(-e,-t,e,t)}function ensureAnonymous(){return f||(f=Sk.misceval.callsimArray(y.Turtle)),f.instance}function getTarget(){return e}function getScreen(){return p||(p=new Screen),p}function getMouseHandler(){return h||(h=new MouseHandler),h}function getWidth(){return 0|(p&&p._width||g.width||getTarget().clientWidth||T.width)}function getHeight(){return 0|(p&&p._height||g.height||getTarget().clientHeight||T.height)}function createLayer(e,t){var r,n=document.createElement("canvas"),a=getWidth(),s=getHeight(),l=getTarget().firstChild?-s+"px":"0";return n.width=a,n.height=s,n.style.position="relative",n.style.display="block",n.style.setProperty("margin-top",l),n.style.setProperty("z-index",e),t&&(n.style.display="none"),getTarget().appendChild(n),r=n.getContext("2d"),r.lineCap="round",r.lineJoin="round",applyWorld(getScreen(),r),r}function cancelAnimationFrame(){u&&((window.cancelAnimationFrame||window.mozCancelAnimationFrame)(u),u=void 0),m&&(window.clearTimeout(m),m=void 0)}function applyWorld(e,t){var r=e.llx,n=e.lly,a=e.urx,s=e.ury,l=e.xScale,i=e.yScale;t&&(clearLayer(t),t.restore(),t.save(),t.scale(1/l,1/i),t.translate(-r,-s))}function pushUndo(e){var t,r,n;if(g.allowUndo&&e._bufferSize){for(e._undoBuffer||(e._undoBuffer=[]);e._undoBuffer.length>e._bufferSize;)e._undoBuffer.shift();for(r={},t=["x","y","angle","radians","color","fill","down","filling","shown","shape","size"],n=0;n<t.length;n++)r[t[n]]=e["_"+t[n]];return e._undoBuffer.push(r),e.addUpdate(function(){r.fillBuffer=this.fillBuffer?this.fillBuffer.slice():void 0,e._paper&&e._paper.canvas&&(r.image=e._paper.canvas.toDataURL())},!1)}}function popUndo(e){var t;if(e._bufferSize&&e._undoBuffer&&(t=e._undoBuffer.pop(),!!t)){for(var r in t)"image"!=r&&"fillBuffer"!==r&&(e["_"+r]=t[r]);return e.addUpdate(function(){var e;t.image&&(L.src=t.image,e=L),clearLayer(this.context(),!1,L),delete t.image},!0,t)}}function removeLayer(e){e&&e.canvas&&e.canvas.parentNode&&e.canvas.parentNode.removeChild(e.canvas)}function clearLayer(e,t,r){e&&(e.save(),e.setTransform(1,0,0,1,0,0),t?(e.fillStyle=t,e.fillRect(0,0,e.canvas.width,e.canvas.height)):e.clearRect(0,0,e.canvas.width,e.canvas.height),r&&e.drawImage(r,0,0),e.restore())}function drawTurtle(e,t){var r,n,a,s=v[e.shape],l=getScreen(),u=getWidth(),m=getHeight(),p=l.xScale,g=l.yScale;if(t){if(r=c(e.radians)/p,n=_(e.radians)/g,a=d(n,r)-o/2,t.save(),t.translate(e.x,e.y),t.scale(p,g),s.nodeName){var f=s.naturalWidth,h=s.naturalHeight;t.drawImage(s,0,0,f,h,-f/2,-h/2,f,h)}else{t.rotate(a),t.beginPath(),t.lineWidth=1,t.strokeStyle=e.color,t.fillStyle=e.fill,t.moveTo(-s[0][0],s[0][1]);for(var $=1;$<s.length;$++)t.lineTo(-s[$][0],s[$][1]);t.closePath(),t.fill(),t.stroke()}t.restore()}}function drawDot(e,t){var r=this.context(),n=getScreen(),l=n.xScale,i=n.yScale;r&&(r.beginPath(),r.moveTo(this.x,this.y),e*=a(s(l),s(i)),r.arc(this.x,this.y,e/2,0,Turtle.RADIANS),r.closePath(),r.fillStyle=t||this.color,r.fill())}function measureText(e,t){return t&&(S.font=t),S.measureText(e).width}function drawText(e,t,r){var n=this.context();n&&(n.save(),r&&(n.font=r),t&&t.match(/^(left|right|center)$/)&&(n.textAlign=t),n.scale(1,-1),n.fillStyle=this.fill,n.fillText(e,this.x,-this.y),n.restore())}function drawLine(e,t){var r=this.context();r&&(t&&(r.beginPath(),r.moveTo(this.x,this.y)),r.lineWidth=this.size*getScreen().lineScale,r.strokeStyle=this.color,r.lineTo(e.x,e.y),r.stroke())}function drawFill(){var e,t=this.context(),r=this.fillBuffer;if(t&&r&&r.length){for(t.save(),t.beginPath(),t.moveTo(r[0].x,r[0].y),e=1;e<r.length;e++)t.lineTo(r[e].x,r[e].y);for(t.closePath(),t.fillStyle=this.fill,t.fill(),e=1;e<r.length;e++)r[e].stroke&&(t.beginPath(),t.moveTo(r[e-1].x,r[e-1].y),t.lineWidth=r[e].size*getScreen().lineScale,t.strokeStyle=r[e].color,t.lineTo(r[e].x,r[e].y),t.stroke());t.restore()}}function partialTranslate(e,t,r,n,a){return function(){return e.addUpdate(function(e){this.down&&drawLine.call(this,e,n)},a,{x:t,y:r},n)}}function translate(e,a,l,o,d,_,c){var u,m=e._computed_speed,p=getScreen(),g=s(p.xScale),f=s(p.yScale),h=a,$=l,w=n(o*o*g+d*d*f),b=m?t(r(1,w/m)):1,v=getFrameManager().willRenderNext()?Promise.resolve():new InstantPromise;for(e.addUpdate(function(){this.filling&&this.fillBuffer.push({x:this.x,y:this.y,stroke:this.down,color:this.color,size:this.size})},!1),u=0;u<b;u++)h=a+o/b*(u+1),$=l+d/b*(u+1),v=v.then(partialTranslate(e,h,$,_,m||!c)),_=!1;return v.then(function(){return[a+o,l+d]})}function partialRotate(e,t,r,n){return function(){return e.addUpdate(void 0,n,{angle:t,radians:r})}}function rotate(e,n,a,l){var o,d=e._computed_speed,_=360*(a/e._fullCircle),c=d?t(r(1,s(_)/d)):1,u={},m=getFrameManager().willRenderNext()?Promise.resolve():new InstantPromise;for(o=0;o<c;o++)calculateHeading(e,n+a/c*(o+1),u),m=m.then(partialRotate(e,u.angle,u.radians,d||!l));return m.then(function(){return calculateHeading(e,n+a)})}function getCoordinates(e,t){return void 0===t&&(t=e&&(e.y||e._y||e[1])||0,e=e&&(e.x||e._x||e[0])||0),{x:e,y:t}}function hexToRGB(e){var t,r,n;return(t=/^rgba?\\((\\d+),(\\d+),(\\d+)(?:,([.\\d]+))?\\)$/.exec(e))?(n=[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])],t[4]&&n.push(parseFloat(t[4]))):/^#?[a-f\\d]{3}|[a-f\\d]{6}$/i.exec(e)?(4===e.length&&(e=e.replace(/^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i,function(e,t,r,n){return t+t+r+r+n+n})),r=/^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(e),n=[parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16)]):n=e,n}function createColor(e,t,n,s,l){var o;if(void 0!==n&&(t=[t,n,s,l]),t.constructor===Array&&t.length){if(255===e){for(o=0;3>o;o++)if("number"==typeof t[o])t[o]=r(0,a(255,parseInt(t[o])));else throw new Sk.builtin.ValueError("bad color sequence");}else for(o=0;3>o;o++)if("number"!=typeof t[o])throw new Sk.builtin.ValueError("bad color sequence");else if(1>=t[o])t[o]=r(0,a(255,parseInt(255*t[o])));else throw new Sk.builtin.ValueError("bad color sequence");"number"==typeof t[o]?(t[3]=r(0,a(1,t[o])),t="rgba("+t.join(",")+")"):t="rgb("+t.slice(0,3).join(",")+")"}else if("string"==typeof t&&!t.match(/\\s*url\\s*\\(/i))t=t.replace(/\\s+/g,"");else return"black";return t}function calculateHeading(e,t,r){var n=e._angle||0,a=e._radians||0;return r||(r={}),"number"==typeof t&&(e._isRadians?n=a=t%Turtle.RADIANS:e._fullCircle?(n=t%e._fullCircle,a=n/e._fullCircle*Turtle.RADIANS):n=a=0,0>n&&(n+=e._fullCircle,a+=Turtle.RADIANS)),r.angle=n,r.radians=a,r}function pythonToJavascriptFunction(e,t){return function(){var r=Array.prototype.slice.call(arguments),n=r.map(function(e){return Sk.ffi.remapToPy(e)});return"undefined"!=typeof t&&n.unshift(t),Sk.misceval.applyAsync(void 0,e,void 0,void 0,void 0,n).catch(Sk.uncaughtException)}}function addModuleMethod(e,t,r,n){var a,s=r.replace(/^\\$/,""),l=s.replace(/_\\$[a-z]+\\$$/i,""),o=e.prototype[r].length,d=e.prototype[r].minArgs,_=e.prototype[r].co_varnames||[],c=e.prototype[r].returnType,u=e.prototype[r].isSk;void 0===d&&(d=o),a=function(){var e,t,a,s,_,m=Array.prototype.slice.call(arguments,0),p=n?n():m.shift().instance;if(m.length<d||m.length>o)throw _=d===o?"exactly "+o:"between "+d+" and "+o,new Sk.builtin.TypeError(l+"() takes "+_+" positional argument(s) ("+m.length+" given)");for(e=m.length;0<=--e;)void 0!==m[e]&&(m[e]=m[e]instanceof Sk.builtin.func?pythonToJavascriptFunction(m[e]):m[e]instanceof Sk.builtin.method?pythonToJavascriptFunction(m[e].im_func,m[e].im_self):m[e]&&m[e].$d instanceof Sk.builtin.dict&&m[e].instance?m[e].instance:Sk.ffi.remapToJs(m[e]));var g=m.slice(0);for(m=[],e=g.length;0<=e;--e)null!==g[e]&&(m[e]=g[e]);try{t=p[r].apply(p,m)}catch(t){throw window&&window.console&&(window.console.log("wrapped method failed"),window.console.log(t.stack)),t}return t instanceof InstantPromise&&(t=t.lastResult),t instanceof Promise?(t=t.catch(function(t){throw window&&window.console&&(window.console.log("promise failed"),window.console.log(t.stack)),t}),a=new Sk.misceval.Suspension,a.resume=function(){return void 0===s?Sk.builtin.none.none$:Sk.ffi.remapToPy(s)},a.data={type:"Sk.promise",promise:t.then(function(e){return s=e,e})},a):void 0===t?Sk.builtin.none.none$:u?t:"function"==typeof c?c(t):Sk.ffi.remapToPy(t)},a.co_name=new Sk.builtin.str(l),a.co_varnames=_.slice(),a.$defaults=[];for(var m=d;m<_.length;m++)a.$defaults.push(Sk.builtin.none.none$);n||a.co_varnames.unshift("self"),t[s]=new Sk.builtin.func(a)}function initTurtle(e,t){Sk.builtin.pyCheckArgs("__init__",arguments,2,3,!1,!1),e.instance=new Turtle(t),e.instance.skInstance=e}function focusTurtle(e){return void 0!==e&&(w=!!e,w?getTarget().focus():getTarget().blur()),w}function resetTurtle(){for(cancelAnimationFrame(),getScreen().reset(),getFrameManager().reset();e.firstChild;)e.removeChild(e.firstChild);h&&h.reset(),$=0,p=void 0,f=void 0,h=void 0,k=0}function stopTurtle(){cancelAnimationFrame(),h&&h.reset(),$=0,p=void 0,f=void 0,h=void 0,k=0}var u,m,p,g,f,h,y={__name__:new Sk.builtin.str("turtle")},$=0,w=!0,b=1e3/30,v={},k=0,x={},T={target:"turtle",width:400,height:400,worldWidth:0,worldHeight:0,animate:!0,bufferSize:0,allowUndo:!0,assets:{}};e.hasAttribute("tabindex")||e.setAttribute("tabindex",0),x.FLOAT=function(e){return new Sk.builtin.float_(e)},x.COLOR=function(e){if("string"==typeof e)return new Sk.builtin.str(e);for(var t=0;3>t;t++)e[t]=Sk.builtin.assk$(e[t]);return 4===e.length&&(e[3]=new Sk.builtin.float_(e[3])),new Sk.builtin.tuple(e)},x.TURTLE_LIST=function(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r].skInstance);return new Sk.builtin.tuple(t)},v.arrow=[[-10,0],[10,0],[0,10]],v.square=[[10,-10],[10,10],[-10,10],[-10,-10]],v.triangle=[[10,-5.77],[0,11.55],[-10,-5.77]],v.classic=[[0,0],[-5,-9],[0,-7],[5,-9]],v.turtle=[[0,16],[-2,14],[-1,10],[-4,7],[-7,9],[-9,8],[-6,5],[-7,1],[-5,-3],[-8,-6],[-6,-8],[-4,-5],[0,-7],[4,-5],[6,-8],[8,-6],[5,-3],[7,1],[6,5],[9,8],[7,9],[4,7],[1,10],[2,14]],v.circle=[[10,0],[9.51,3.09],[8.09,5.88],[5.88,8.09],[3.09,9.51],[0,10],[-3.09,9.51],[-5.88,8.09],[-8.09,5.88],[-9.51,3.09],[-10,0],[-9.51,-3.09],[-8.09,-5.88],[-5.88,-8.09],[-3.09,-9.51],[-0,-10],[3.09,-9.51],[5.88,-8.09],[8.09,-5.88],[9.51,-3.09]],g=function(){for(var e in Sk.TurtleGraphics||(Sk.TurtleGraphics={}),T)Sk.TurtleGraphics.hasOwnProperty(e)||(Sk.TurtleGraphics[e]=T[e]);return Sk.TurtleGraphics}(),InstantPromise.prototype.then=function(e){if(this.lastError)return this;try{this.lastResult=e(this.lastResult)}catch(t){this.lastResult=void 0,this.lastError=t}return this.lastResult instanceof Promise?this.lastResult:this},InstantPromise.prototype.catch=function(e){if(this.lastError)try{this.lastResult=e(this.lastError),this.lastError=void 0}catch(t){this.lastResult=void 0,this.lastError=t}return this.lastResult instanceof Promise?this.lastResult:this};var A;(function(e){function animationFrame(e){return g.animate?!e&&t?t:function(t){return m=window.setTimeout(t,e||b),m}:function(e){e()}}var t;(function(e){e&&(t=function(t){return u=e(t)})})(window.requestAnimationFrame||window.mozRequestAnimationFrame),e.willRenderNext=function(){return!!(this._buffer&&this._frameCount+1===this.frameBuffer())},e.turtles=function(){return this._turtles},e.addTurtle=function(e){this._turtles.push(e)},e.reset=function(){if(this._turtles)for(var e=this._turtles.length;0<=--e;)this._turtles[e].reset();this._turtles=[],this._frames=[],this._frameCount=0,this._buffer=1,this._rate=0,this._animationFrame=animationFrame()},e.addFrame=function(e,t){var r=!1;return t&&(this._frameCount+=1),this.frames().push(e),r=!g.animate||this._buffer&&this._frameCount===this.frameBuffer(),r?this.update():new InstantPromise},e.frames=function(){return this._frames},e.frameBuffer=function(e){return"number"==typeof e&&(this._buffer=0|e,e&&e<=this._frameCount)?this.update():this._buffer},e.refreshInterval=function(e){return"number"==typeof e&&(this._rate=0|e,this._animationFrame=animationFrame(e)),this._rate},e.update=function(){return this._frames&&this._frames.length?this.requestAnimationFrame():new InstantPromise},e.requestAnimationFrame=function(){var e,t,r=this._frames,n=this._animationFrame,a=this._turtles,s=getScreen().spriteLayer();return this._frames=[],this._frameCount=0,new Promise(function(l){n(function paint(){for(t=0;t<r.length;t++)r[t]&&r[t]();for(clearLayer(s),t=0;t<a.length;t++)e=a[t],e.getState().shown&&drawTurtle(e.getState(),s);l()})})}})(FrameManager.prototype),function(e){e.onEvent=function(t,r){function computeCoordinates(){if(!_){var t=getScreen(),l=t.spriteLayer().canvas.getBoundingClientRect();e=0|r.clientX-l.left,n=0|r.clientY-l.top,a=e*t.xScale+t.llx,s=n*t.yScale+t.ury,_=!0}}var e,n,a,s,l,o=this._managers[t],d=this._managers.mousemove,_=!1;if(("mousedown"===t||"mouseup"===t)&&d&&d.length)for(computeCoordinates(),l=d.length;0<=--l;)d[l].test(e,n,a,s)&&d[l].canMove("mousedown"===t);if(o&&o.length)for(computeCoordinates(),l=o.length;0<=--l;)"mousemove"===t&&o[l].canMove()&&o[l].test(e,n,a,s)?o[l].trigger([a,s]):"mousedown"===t&&o[l].test(e,n,a,s)&&o[l].trigger([a,s])},e.reset=function(){this._managers={}},e.addManager=function(e,t){this._managers[e]||(this._managers[e]=[]),this._managers[e].push(t)}}(MouseHandler.prototype),function(e){e.reset=function(){this._handlers=void 0},e.canMove=function(e){return!!(this._target&&this._target.hitTest)&&(void 0!==e&&(this._target.hitTest.hit=e),this._target.hitTest.hit)},e.test=function(e,t,r,n){return this._target&&this._target.hitTest?this._target.hitTest(e,t,r,n):!!this._target},e.trigger=function(e){var t,r=this._handlers;if(r&&r.length)for(t=0;t<r.length;t++)r[t].apply({},e)},e.addHandler=function(e,t){var r=this._handlers;if(!t&&r&&r.length)for(;r.shift(););return"function"==typeof e?void(!r&&(r=this._handlers=[]),r.push(e)):void(r&&!r.length&&this.reset())}}(EventManager.prototype),Turtle.RADIANS=2*o,function(e){function circleRotate(e,t,r){return function(){return e.addUpdate(void 0,!1,{angle:t,radians:r})}}function circleSegment(e,t,r,n,a,s){return function(){return e.translate(t,r,n,a,s,!0)}}e.hitTest=function(e,t){var r=getScreen().hitTestLayer();clearLayer(r),drawTurtle(this.getState(),r);var n=r.getImageData(e,t,1,1).data;return n[3]||n[0]||n[1]||n[2]},e.addUpdate=function(e,t,r){var n=this,a=this.getState(),s=Array.prototype.slice.call(arguments,r?2:3);return getFrameManager().addFrame(function(){if(e&&e.apply(a,s),r)for(var t in r)a[t]=r[t]},t)},e.getState=function(){var e=this;return this._state||(this._state={x:this._x,y:this._y,angle:this._angle,radians:this._radians,shape:this._shape,color:this._color,fill:this._fill,filling:this._filling,size:this._size,speed:this._computed_speed,down:this._down,shown:this._shown,colorMode:this._colorMode,context:function(){return e.getPaper()}}),this._state},e.translate=function(e,t,r,n,a,s){var l=this;return translate(this,e,t,r,n,a,s).then(function(e){l._x=e[0],l._y=e[1]})},e.rotate=function(e,t,r){var n=this;return rotate(this,e,t,r).then(function(e){n._angle=e.angle,n._radians=e.radians})},e.queueMoveBy=function(e,t,r,n){var a=c(r)*n,s=_(r)*n;return this.translate(e,t,a,s,!0)},e.queueTurnTo=function(e,t){return t%=this._fullCircle,0>t&&(t+=this._fullCircle),this.rotate(e,t-e)},e.getManager=function(e){return this._managers[e]||(this._managers[e]=new EventManager(e,this)),this._managers[e]},e.getPaper=function(){return this._paper||(this._paper=createLayer(2))},e.reset=function(){for(var e in this._x=0,this._y=0,this._radians=0,this._angle=0,this._shown=!0,this._down=!0,this._color="black",this._fill="black",this._size=1,this._filling=!1,this._undoBuffer=[],this._speed=3,this._computed_speed=5,this._colorMode=1,this._state=void 0,this._managers)this._managers[e].reset();this._isRadians=!1,this._fullCircle=360,this._bufferSize="number"==typeof g.bufferSize?g.bufferSize:0,removeLayer(this._paper),this._paper=void 0},e.$degrees=function(e){return e="number"==typeof e?s(e):360,this._isRadians=!1,this._angle=e&&this._fullCircle?this._angle/this._fullCircle*e:this._radians=0,this._fullCircle=e,this.addUpdate(void 0,!1,{angle:this._angle,radians:this._radians})},e.$degrees.minArgs=0,e.$degrees.co_varnames=["fullcircle"],e.$degrees.returnType=x.FLOAT,e.$radians=function(){return this._isRadians||(this._isRadians=!0,this._angle=this._radians,this._fullCircle=Turtle.RADIANS),this._angle},e.$radians.returnType=x.FLOAT,e.$position=e.$pos=function(){return[this.$xcor(),this.$ycor()]},e.$position.returnType=function(e){return new Sk.builtin.tuple([new Sk.builtin.float_(e[0]),new Sk.builtin.float_(e[1])])},e.$towards=function(e,t){var r=getCoordinates(e,t),n=o+d(this._y-r.y,this._x-r.x),a=n*(this._fullCircle/Turtle.RADIANS);return a},e.$towards.co_varnames=["x","y"],e.$towards.minArgs=1,e.$towards.returnType=x.FLOAT,e.$distance=function(e,t){var r=getCoordinates(e,t),a=r.x-this._x,s=r.y-this._y;return n(a*a+s*s)},e.$distance.co_varnames=["x","y"],e.$distance.minArgs=1,e.$distance.returnType=x.FLOAT,e.$heading=function(){return 1e-13>s(this._angle)?0:this._angle},e.$heading.returnType=x.FLOAT,e.$xcor=function(){return 1e-13>s(this._x)?0:this._x},e.$xcor.returnType=x.FLOAT,e.$ycor=function(){return 1e-13>s(this._y)?0:this._y},e.$ycor.returnType=x.FLOAT,e.$forward=e.$fd=function(e){return pushUndo(this),this.queueMoveBy(this._x,this._y,this._radians,e)},e.$forward.co_varnames=e.$fd.co_varnames=["distance"],e.$undo=function(){popUndo(this)},e.$undobufferentries=function(){return this._undoBuffer.length},e.$setundobuffer=function(e){this._bufferSize="number"==typeof e?a(s(e),1e3):0},e.$setundobuffer.co_varnames=["size"],e.$backward=e.$back=e.$bk=function(e){return pushUndo(this),this.queueMoveBy(this._x,this._y,this._radians,-e)},e.$backward.co_varnames=e.$back.co_varnames=e.$bk.co_varnames=["distance"],e.$goto_$rw$=e.$setpos=e.$setposition=function(e,t){var r=getCoordinates(e,t);return pushUndo(this),this.translate(this._x,this._y,r.x-this._x,r.y-this._y,!0)},e.$goto_$rw$.co_varnames=e.$setpos.co_varnames=e.$setposition.co_varnames=["x","y"],e.$goto_$rw$.minArgs=e.$setpos.minArgs=e.$setposition.minArgs=1,e.$setx=function(e){return this.translate(this._x,this._y,e-this._x,0,!0)},e.$setx.co_varnames=["x"],e.$sety=function(e){return this.translate(this._x,this._y,0,e-this._y,!0)},e.$sety.co_varnames=["y"],e.$home=function(){var e=this,t=this._angle;return pushUndo(this),e.translate(this._x,this._y,-this._x,-this._y,!0).then(function(){return e.queueTurnTo(t,0)}).then(function(){})},e.$right=e.$rt=function(e){return pushUndo(this),this.rotate(this._angle,-e)},e.$right.co_varnames=e.$rt.co_varnames=["angle"],e.$left=e.$lt=function(e){return pushUndo(this),this.rotate(this._angle,e)},e.$left.co_varnames=e.$lt.co_varnames=["angle"],e.$setheading=e.$seth=function(e){return pushUndo(this),this.queueTurnTo(this._angle,e)},e.$setheading.co_varnames=e.$seth.co_varnames=["angle"],e.$circle=function(e,t,r){var n,d,u,m,p,g,f,h,$,b=this,v=this._x,k=this._y,T=this._angle,A={},L=1/getScreen().lineScale,S=!0;for(pushUndo(this),void 0===t&&(t=b._fullCircle),void 0===r&&(d=s(t)/b._fullCircle,r=1+(0|a(11+s(e*L)/6,59)*d)),u=t/r,m=.5*u,p=2*e*_(u*o/b._fullCircle),0>e?(p=-p,u=-u,m=-m,n=T-t):n=T+t,$=getFrameManager().willRenderNext()?Promise.resolve():new InstantPromise,T+=m,g=0;g<r;g++)calculateHeading(b,T+u*g,A),f=c(A.radians)*p,h=_(A.radians)*p,$=$.then(circleRotate(b,A.angle,A.radians)).then(circleSegment(b,v,k,f,h,S)),v+=f,k+=h,S=!1;return $=$.then(function(){return calculateHeading(b,n,A),b._angle=A.angle,b._radians=A.radians,b.addUpdate(void 0,!0,A)}),$},e.$circle.co_varnames=["radius","extent","steps"],e.$circle.minArgs=1,e.$penup=e.$up=e.$pu=function(){return this._down=!1,this.addUpdate(void 0,!1,{down:!1})},e.$pendown=e.$down=e.$pd=function(){return this._down=!0,this.addUpdate(void 0,!1,{down:!0})},e.$isdown=function(){return this._down},e.$speed=function(e){return void 0===e?this._speed:(this._speed=r(0,a(1e3,e)),this._computed_speed=r(0,2*e-1),this.addUpdate(void 0,!1,{speed:this._computed_speed}))},e.$speed.minArgs=0,e.$speed.co_varnames=["speed"],e.$pencolor=function(e,t,r,n){return void 0===e?hexToRGB(this._color):(this._color=createColor(this._colorMode,e,t,r,n),this.addUpdate(void 0,this._shown,{color:this._color}))},e.$pencolor.co_varnames=["r","g","b","a"],e.$pencolor.minArgs=0,e.$pencolor.returnType=x.COLOR,e.$fillcolor=function(e,t,r,n){return void 0===e?hexToRGB(this._fill):(this._fill=createColor(this._colorMode,e,t,r,n),this.addUpdate(void 0,this._shown,{fill:this._fill}))},e.$fillcolor.co_varnames=["r","g","b","a"],e.$fillcolor.minArgs=0,e.$fillcolor.returnType=x.COLOR,e.$color=function(e,t,r,n){return void 0===e?[this.$pencolor(),this.$fillcolor()]:(void 0===t||void 0!==r?(this._color=createColor(this._colorMode,e,t,r,n),this._fill=this._color):(this._color=createColor(this._colorMode,e),this._fill=createColor(this._colorMode,t)),this.addUpdate(void 0,this._shown,{color:this._color,fill:this._fill}))},e.$color.minArgs=0,e.$color.co_varnames=["color","fill","b","a"],e.$color.returnType=function(e){return new Sk.builtin.tuple([x.COLOR(e[0]),x.COLOR(e[1])])},e.$fill=function(e){this;return void 0===e?this._filling:(e=!!e,e===this._filling)?void 0:(this._filling=e,e?(pushUndo(this),this.addUpdate(void 0,!1,{filling:!0,fillBuffer:[{x:this._x,y:this._y}]})):(pushUndo(this),this.addUpdate(function(){this.fillBuffer.push(this),drawFill.call(this)},!0,{filling:!1,fillBuffer:void 0})))},e.$fill.co_varnames=["flag"],e.$fill.minArgs=0,e.$begin_fill=function(){return this.$fill(!0)},e.$end_fill=function(){return this.$fill(!1)},e.$stamp=function(){return pushUndo(this),this.addUpdate(function(){drawTurtle(this,this.context())},!0)},e.$dot=function(e,t,n,l,i){return pushUndo(this),e=Sk.builtin.asnum$(e),e="number"==typeof e?r(1,0|s(e)):r(this._size+4,2*this._size),t=void 0===t?this._color:createColor(this._colorMode,t,n,l,i),this.addUpdate(drawDot,!0,void 0,e,t)},e.$dot.co_varnames=["size","color","g","b","a"],e.$write=function(e,t,r,n){var a,s,l,i,o,d=this;return pushUndo(this),e+="",n&&n.constructor===Array&&(s="string"==typeof n[0]?n[0]:"Arial",l=(n[1]||"12pt")+"",i="string"==typeof n[2]?n[2]:"normal",/^\\d+$/.test(l)&&(l+="pt"),n=[i,l,s].join(" ")),r||(r="left"),a=this.addUpdate(drawText,!0,void 0,e,r,n),t&&("left"===r||"center"===r)&&(o=measureText(e,n),"center"===r&&(o/=2),a=a.then(function(){var e=d.getState();return d.translate(e.x,e.y,o,0,!0)})),a},e.$write.co_varnames=["message","move","align","font"],e.$write.minArgs=1,e.$pensize=e.$width=function(e){return void 0===e?this._size:(this._size=e,this.addUpdate(void 0,this._shown,{size:e}))},e.$pensize.minArgs=e.$width.minArgs=0,e.$pensize.co_varnames=e.$width.co_varnames=["width"],e.$showturtle=e.$st=function(){return this._shown=!0,this.addUpdate(void 0,!0,{shown:!0})},e.$hideturtle=e.$ht=function(){return this._shown=!1,this.addUpdate(void 0,!0,{shown:!1})},e.$isvisible=function(){return this._shown},e.$shape=function(e){return e&&v[e]?(this._shape=e,this.addUpdate(void 0,this._shown,{shape:e})):this._shape},e.$shape.minArgs=0,e.$shape.co_varnames=["name"],e.$colormode=function(e){return void 0===e?this._colorMode:(this._colorMode=255===e?255:1,this.addUpdate(void 0,this._shown,{colorMode:this._colorMode}))},e.$colormode.minArgs=0,e.$colormode.co_varnames=["cmode"],e.$colormode.returnType=function(e){return 255===e?new Sk.builtin.int_(255):new Sk.builtin.float_(1)},e.$window_width=function(){return this._screen.$window_width()},e.$window_height=function(){return this._screen.$window_height()},e.$tracer=function(e,t){return this._screen.$tracer(e,t)},e.$tracer.minArgs=0,e.$tracer.co_varnames=["n","delay"],e.$update=function(){return this._screen.$update()},e.$delay=function(e){return this._screen.$delay(e)},e.$delay.minArgs=0,e.$delay.co_varnames=["delay"],e.$reset=function(){return this.reset(),this.$clear()},e.$mainloop=e.$done=function(){return this._screen.$mainloop()},e.$clear=function(){return this.addUpdate(function(){clearLayer(this.context())},!0)},e.$dot.minArgs=0,e.$onclick=function(e,t,r){this.getManager("mousedown").addHandler(e,r)},e.$onclick.minArgs=1,e.$onclick.co_varnames=["method","btn","add"],e.$onrelease=function(e,t,r){this.getManager("mouseup").addHandler(e,r)},e.$onrelease.minArgs=1,e.$onrelease.co_varnames=["method","btn","add"],e.$ondrag=function(e,t,r){this.getManager("mousemove").addHandler(e,r)},e.$ondrag.minArgs=1,e.$ondrag.co_varnames=["method","btn","add"],e.$getscreen=function(){return Sk.misceval.callsimArray(y.Screen)},e.$getscreen.isSk=!0,e.$clone=function(){var e=Sk.misceval.callsimOrSuspendArray(y.Turtle);return e.instance._x=this._x,e.instance._y=this._y,e.instance._angle=this._angle,e.instance._radians=this._radians,e.instance._shape=this._shape,e.instance._color=this._color,e.instance._fill=this._fill,e.instance._filling=this._filling,e.instance._size=this._size,e.instance._computed_speed=this._computed_speed,e.instance._down=this._down,e.instance._shown=this._shown,e.instance._colorMode=this._colorMode,e.instance._isRadians=this._isRadians,e.instance._fullCircle=this._fullCircle,e.instance._bufferSize=this._bufferSize,e.instance._undoBuffer=this._undoBuffer,e._clonedFrom=this,e},e.$clone.returnType=function(e){return e},e.$getturtle=e.$getpen=function(){return this.skInstance},e.$getturtle.isSk=!0}(Turtle.prototype),function(e){e.spriteLayer=function(){return this._sprites||(this._sprites=createLayer(3))},e.bgLayer=function(){return this._background||(this._background=createLayer(1))},e.hitTestLayer=function(){return this._hitTest||(this._hitTest=createLayer(0,!0))},e.getManager=function(e){return this._managers[e]||(this._managers[e]=new EventManager(e,this)),this._managers[e]},e.reset=function(){for(var e in this._keyListeners=void 0,this._keyLogger)window.clearInterval(this._keyLogger[e]),window.clearTimeout(this._keyLogger[e]),delete this._keyLogger[e];for(e in this._keyDownListener&&(getTarget().removeEventListener("keydown",this._keyDownListener),this._keyDownListener=void 0),this._keyUpListener&&(getTarget().removeEventListener("keyup",this._keyUpListener),this._keyUpListener=void 0),this._timer&&(window.clearTimeout(this._timer),this._timer=void 0),this._managers)this._managers[e].reset();this._mode="standard",removeLayer(this._sprites),this._sprites=void 0,removeLayer(this._background),this._background=void 0},e.setUpWorld=function(e,t,r,n){var l=this;l.llx=e,l.lly=t,l.urx=r,l.ury=n,l.xScale=(r-e)/getWidth(),l.yScale=-1*(n-t)/getHeight(),l.lineScale=a(s(l.xScale),s(l.yScale))},e.$setup=function(e,t,r,n){return isNaN(parseFloat(e))&&(e=getWidth()),isNaN(parseFloat(t))&&(t=getHeight()),1>=e&&(e=getWidth()*e),1>=t&&(t=getHeight()*t),this._width=e,this._height=t,this._xOffset=void 0===r||isNaN(parseInt(r))?0:parseInt(r),this._yOffset=void 0===n||isNaN(parseInt(n))?0:parseInt(n),"world"===this._mode?this._setworldcoordinates(this.llx,this.lly,this.urx,this.ury):this._setworldcoordinates(-e/2,-t/2,e/2,t/2)},e.$setup.minArgs=0,e.$setup.co_varnames=["width","height","startx","starty"],e.$register_shape=e.$addshape=function(e,t){return t?void(v[e]=t):getAsset(e).then(function(t){v[e]=t})},e.$register_shape.minArgs=1,e.$getshapes=function(){return Object.keys(v)},e.$tracer=function(e,t){return void 0!==e||void 0!==t?("number"==typeof t&&(this._delay=t,getFrameManager().refreshInterval(t)),"number"==typeof e?(this._frames=e,getFrameManager().frameBuffer(e)):void 0):this._frames},e.$tracer.co_varnames=["frames","delay"],e.$tracer.minArgs=0,e.$delay=function(e){return void 0===e?void 0===this._delay?b:this._delay:this.$tracer(void 0,e)},e.$delay.co_varnames=["delay"],e._setworldcoordinates=function(e,t,r,n){var a=this,s=getFrameManager().turtles();return this.setUpWorld(e,t,r,n),this._sprites&&applyWorld(this,this._sprites),this._background&&applyWorld(this,this._background),this.$clear()},e.$setworldcoordinates=function(e,t,r,n){return this._mode="world",this._setworldcoordinates(e,t,r,n)},e.$setworldcoordinates.co_varnames=["llx","lly","urx","ury"],e.minArgs=4,e.$clear=e.$clearscreen=function(){return this.reset(),this.$reset()},e.$update=function(){return getFrameManager().update()},e.$reset=e.$resetscreen=function(){var e=this,t=getFrameManager().turtles();return getFrameManager().addFrame(function(){applyWorld(e,e._sprites),applyWorld(e,e._background);for(var r=0;r<t.length;r++)t[r].reset(),applyWorld(e,t[r]._paper)},!0)},e.$window_width=function(){return getWidth()},e.$window_height=function(){return getHeight()},e.$delay.minArgs=0,e.$turtles=function(){return getFrameManager().turtles()},e.$turtles.returnType=x.TURTLE_LIST,e.$bgpic=function(e){var t;return e?(t=this,getAsset(e).then(function(e){clearLayer(t.bgLayer(),void 0,e)})):this._bgpic},e.$bgpic.minArgs=0,e.$bgpic.co_varnames=["name"],e.$bgcolor=function(e,t,r,n){return void 0===e?hexToRGB(this._bgcolor):(this._bgcolor=createColor(this._colorMode,e,t,r,n),void clearLayer(this.bgLayer(),this._bgcolor))},e.$bgcolor.minArgs=0,e.$bgcolor.co_varnames=["color","g","b","a"],e.$bgcolor.returnType=x.COLOR,e.$mainloop=e.$done=function(){},e.$bye=function(){return Sk.TurtleGraphics.reset()},e.$exitonclick=function(){return this._exitOnClick=!0,this.getManager("mousedown").addHandler(function(){resetTurtle()},!1)},e.$onclick=function(e,t,r){this._exitOnClick||this.getManager("mousedown").addHandler(e,r)},e.$onclick.minArgs=1,e.$onclick.co_varnames=["method","btn","add"];var t={8:/^back(space)?$/i,9:/^tab$/i,13:/^(enter|return)$/i,16:/^shift$/i,17:/^(ctrl|control)$/i,18:/^alt$/i,27:/^esc(ape)?$/i,32:/^space$/i,33:/^page[\\s\\-]?up$/i,34:/^page[\\s\\-]?down$/i,35:/^end$/i,36:/^home$/i,37:/^left([\\s\\-]?arrow)?$/i,38:/^up([\\s\\-]?arrow)?$/i,39:/^right([\\s\\-]?arrow)?$/i,40:/^down([\\s\\-]?arrow)?$/i,45:/^insert$/i,46:/^del(ete)?$/i};e._createKeyRepeater=function(e,t){var r=this;r._keyLogger[t]=window.setTimeout(function(){r._keyListeners[e](),r._keyLogger[t]=window.setInterval(function(){r._keyListeners[e]()},50)},333)},e._createKeyDownListener=function(){var r=this;this._keyDownListener||(this._keyDownListener=function(n){var e=String.fromCharCode;if(focusTurtle()){var a,s,l=n.charCode||n.keyCode,i=e(l).toLowerCase();if(!r._keyLogger[l])for(a in r._keyListeners)if(s=1<a.length&&t[l]&&t[l].test(a),a===i||s){r._keyListeners[a](),r._createKeyRepeater(a,l),n.preventDefault();break}}},getTarget().addEventListener("keydown",this._keyDownListener))},e._createKeyUpListener=function(){var t=this;this._keyUpListener||(this._keyUpListener=function(r){var e=t._keyLogger[r.charCode||r.keyCode];void 0!==e&&(r.preventDefault(),window.clearInterval(e),window.clearTimeout(e),delete t._keyLogger[r.charCode||r.keyCode])},getTarget().addEventListener("keyup",this._keyUpListener))},e.$title=function(e){document.title=e},e.$title.minArgs=1,e.$title.co_varnames=["title"],e.$listen=function(){this._createKeyUpListener(),this._createKeyDownListener()},e.$onkey=function(e,t){if("function"==typeof t){var r=e;e=t,t=r}t=(t+"").toLowerCase(),e&&"function"==typeof e?(!this._keyListeners&&(this._keyListeners={}),this._keyListeners[t]=e):delete this._keyListeners[t]},e.$onkey.minArgs=2,e.$onkey.co_varnames=["method","keyValue"],e.$onscreenclick=function(e,t,r){this.getManager("mousedown").addHandler(e,r)},e.$onscreenclick.minArgs=1,e.$onscreenclick.co_varnames=["method","btn","add"],e.$ontimer=function(e,t){this._timer&&(window.clearTimeout(this._timer),this._timer=void 0),e&&"number"==typeof t&&(this._timer=window.setTimeout(e,r(0,0|t)))},e.$ontimer.minArgs=0,e.$ontimer.co_varnames=["method","interval"]}(Screen.prototype);var L=new Image,S=document.createElement("canvas").getContext("2d");for(var C in initTurtle.co_varnames=["self","shape"],initTurtle.co_name=new Sk.builtin.str("Turtle"),initTurtle.co_argcount=2,initTurtle.$defaults=[Sk.builtin.none.none$,new Sk.builtin.str("classic")],Turtle.prototype)/^\\$[a-z_]+/.test(C)&&addModuleMethod(Turtle,y,C,ensureAnonymous);return addModuleMethod(Screen,y,"$mainloop",getScreen),addModuleMethod(Screen,y,"$done",getScreen),addModuleMethod(Screen,y,"$bye",getScreen),addModuleMethod(Screen,y,"$tracer",getScreen),addModuleMethod(Screen,y,"$update",getScreen),addModuleMethod(Screen,y,"$delay",getScreen),addModuleMethod(Screen,y,"$window_width",getScreen),addModuleMethod(Screen,y,"$window_height",getScreen),addModuleMethod(Screen,y,"$title",getScreen),y.Turtle=Sk.misceval.buildClass(y,function TurtleWrapper(e,t){for(var r in t.__init__=new Sk.builtin.func(initTurtle),Turtle.prototype)/^\\$[a-z_]+/.test(r)&&addModuleMethod(Turtle,t,r)},"Turtle",[]),y.Screen=Sk.misceval.buildClass(y,function ScreenWrapper(e,t){for(var r in t.__init__=new Sk.builtin.func(function(e){e.instance=getScreen()}),Screen.prototype)/^\\$[a-z_]+/.test(r)&&addModuleMethod(Screen,t,r)},"Screen",[]),{skModule:y,reset:resetTurtle,stop:stopTurtle,focus:focusTurtle,Turtle:Turtle,Screen:Screen}}(e),Sk.TurtleGraphics.module=e.turtleInstance.skModule,Sk.TurtleGraphics.reset=e.turtleInstance.reset,Sk.TurtleGraphics.stop=e.turtleInstance.stop,Sk.TurtleGraphics.focus=e.turtleInstance.focus,Sk.TurtleGraphics.raw={Turtle:e.turtleInstance.Turtle,Screen:e.turtleInstance.Screen},e.turtleInstance.skModule};',"src/lib/types.py":'"""\nThis file was modified from CPython.\nCopyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,\n2011, 2012, 2013, 2014, 2015 Python Software Foundation; All Rights Reserved\n"""\n"""Define names for all type symbols known in the standard interpreter.\nTypes that are part of optional modules (e.g. array) are not listed.\n"""\nimport sys\n\n# Iterators in Python aren\'t a matter of type but of protocol. A large\n# and changing number of builtin types implement *some* flavor of\n# iterator. Don\'t check the type! Use hasattr to check for both\n# "__iter__" and "next" attributes instead.\nMappingProxyType = type(type.__dict__)\nWrapperDescriptorType = type(object.__init__)\nMethodWrapperType = type(object().__str__)\nMethodDescriptorType = type(str.join)\nClassMethodDescriptorType = type(dict.__dict__[\'fromkeys\'])\n\nNoneType = type(None)\nTypeType = type\nObjectType = object\nIntType = int\ntry:\n LongType = long\nexcept: pass\nFloatType = float\nBooleanType = bool\ntry:\n ComplexType = complex\nexcept NameError:\n pass\nStringType = str\n\n# StringTypes is already outdated. Instead of writing "type(x) in\n# types.StringTypes", you should use "isinstance(x, basestring)". But\n# we keep around for compatibility with Python 2.2.\ntry:\n UnicodeType = unicode\n StringTypes = (StringType, UnicodeType)\nexcept NameError:\n StringTypes = (StringType,)\n\nBufferType = buffer\n\nTupleType = tuple\nListType = list\nDictType = DictionaryType = dict\n\ndef _f(): pass\nFunctionType = type(_f)\nLambdaType = type(lambda: None) # Same as FunctionType\n#CodeType = type(_f.func_code)\n\ndef _g():\n yield 1\nGeneratorType = type(_g())\n\nclass _C:\n def _m(self): pass\nClassType = type(_C)\nUnboundMethodType = type(_C._m) # Same as MethodType\n_x = _C()\nInstanceType = type(_x)\nMethodType = type(_x._m)\nBuiltinFunctionType = type(len)\nBuiltinMethodType = type([].append) # Same as BuiltinFunctionType\n\nModuleType = type(sys)\nFileType = file\ntry:\n XRangeType = xrange\nexcept NameError:\n pass\n\n# try:\n# raise TypeError\n# except TypeError:\n# tb = sys.exc_info()[2]\n# TracebackType = type(tb)\n# FrameType = type(tb.tb_frame)\n# del tb\n\nSliceType = slice\n# EllipsisType = type(Ellipsis)\n\n# DictProxyType = type(TypeType.__dict__)\nNotImplementedType = type(NotImplemented)\n\n# For Jython, the following two types are identical\n# GetSetDescriptorType = type(FunctionType.func_code)\n# MemberDescriptorType = type(FunctionType.func_globals)\n\ndel sys, _f, _g, _C, _x # Not for export\n__all__ = list(n for n in globals() if n[:1] != \'_\')\n',"src/lib/unittest/__init__.py":'__author__ = \'bmiller\'\n\'\'\'\nThis is the start of something that behaves like\nthe unittest module from cpython.\n\n\'\'\'\nimport re\n\nclass _AssertRaisesContext(object):\n """A context manager used to implement TestCase.assertRaises* methods."""\n def __init__(self, expected, test_case):\n self.test_case = test_case\n self.expected = expected\n self.exception = None\n\n def _is_subtype(self, expected, basetype):\n if isinstance(expected, tuple):\n return all(self._is_subtype(e, basetype) for e in expected)\n return isinstance(expected, type) and issubclass(expected, basetype)\n\n def handle(self, args, kwargs):\n """\n If args is empty, assertRaises is being used as a\n context manager, so return self.\n If args is not empty, call a callable passing positional and keyword\n arguments.\n """\n try:\n if not self._is_subtype(self.expected, BaseException):\n raise TypeError(\'assertRaises() arg 1 must be an exception type or tuple of exception types\')\n if not args:\n return self\n\n callable_obj = args[0]\n args = args[1:]\n with self:\n callable_obj(*args, **kwargs) \n\n finally:\n # bpo-23890: manually break a reference cycle\n self = None\n\n def __enter__(self):\n return self\n\n def __exit__(self, exc_type, exc_value, tb):\n res = True\n feedback = ""\n self.exception = exc_value\n try:\n act_exc = exc_type.__name__\n except AttributeError:\n act_exc = str(exc_type)\n try:\n exp_exc = self.expected.__name__\n except AttributeError:\n exp_exc = str(self.expected)\n\n if exc_type is None:\n res = False\n feedback = "{} not raised".format(exp_exc)\n elif not issubclass(exc_type, self.expected):\n res = False\n feedback = "Expected {} but got {}".format(exp_exc, act_exc)\n\n self.test_case.appendResult(res, act_exc, exp_exc, feedback)\n return True\n\n\nclass TestCase(object):\n def __init__(self):\n self.numPassed = 0\n self.numFailed = 0\n self.assertPassed = 0\n self.assertFailed = 0\n self.verbosity = 1\n self.tlist = []\n testNames = {}\n for name in dir(self):\n if name[:4] == \'test\' and name not in testNames:\n self.tlist.append(getattr(self,name))\n testNames[name]=True\n\n def setUp(self):\n pass\n\n def tearDown(self):\n pass\n \n def cleanName(self,funcName):\n return funcName.__func__.__name__\n\n def main(self):\n\n for func in self.tlist:\n if self.verbosity > 1:\n print(\'Running %s\' % self.cleanName(func))\n try:\n self.setUp()\n self.assertPassed = 0\n self.assertFailed = 0\n func()\n self.tearDown()\n if self.assertFailed == 0:\n self.numPassed += 1\n else:\n self.numFailed += 1\n print(\'Tests failed in %s \' % self.cleanName(func))\n except Exception as e:\n self.assertFailed += 1\n self.numFailed += 1\n print(\'Test threw exception in %s (%s)\' % (self.cleanName(func), e))\n self.showSummary()\n\n def assertEqual(self, actual, expected, feedback=""):\n res = actual==expected\n if not res and feedback == "":\n feedback = "Expected %s to equal %s" % (str(actual),str(expected))\n self.appendResult(res, actual ,expected, feedback)\n\n def assertNotEqual(self, actual, expected, feedback=""):\n res = actual != expected\n if not res and feedback == "":\n feedback = "Expected %s to not equal %s" % (str(actual),str(expected))\n self.appendResult(res, actual, expected, feedback)\n\n def assertTrue(self,x, feedback=""):\n res = bool(x) is True\n if not res and feedback == "":\n feedback = "Expected %s to be True" % (str(x))\n self.appendResult(res, x, True, feedback)\n\n def assertFalse(self,x, feedback=""):\n res = not bool(x)\n if not res and feedback == "":\n feedback = "Expected %s to be False" % (str(x))\n self.appendResult(res, x, False, feedback)\n\n def assertIs(self,a,b, feedback=""):\n res = a is b\n if not res and feedback == "":\n feedback = "Expected %s to be the same object as %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertIsNot(self,a,b, feedback=""):\n res = a is not b\n if not res and feedback == "":\n feedback = "Expected %s to not be the same object as %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertIsNone(self,x, feedback=""):\n res = x is None\n if not res and feedback == "":\n feedback = "Expected %s to be None" % (str(x))\n self.appendResult(res, x, None, feedback)\n\n def assertIsNotNone(self,x, feedback=""):\n res = x is not None\n if not res and feedback == "":\n feedback = "Expected %s to not be None" % (str(x))\n self.appendResult(res, x, None, feedback)\n\n def assertIn(self, a, b, feedback=""):\n res = a in b\n if not res and feedback == "":\n feedback = "Expected %s to be in %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertNotIn(self, a, b, feedback=""):\n res = a not in b\n if not res and feedback == "":\n feedback = "Expected %s to not be in %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertIsInstance(self,a,b, feedback=""):\n res = isinstance(a,b)\n if not res and feedback == "":\n feedback = "Expected %s to be an instance of %s" % (str(a), str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertNotIsInstance(self,a,b, feedback=""):\n res = not isinstance(a,b)\n if not res and feedback == "":\n feedback = "Expected %s to not be an instance of %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertRegex(self, text, expected_regex, feedback=""):\n """Fail the test unless the text matches the regular expression."""\n if isinstance(expected_regex, (str, )): #bytes\n assert expected_regex, "expected_regex must not be empty."\n expected_regex = re.compile(expected_regex)\n if not expected_regex.search(text):\n res = False\n feedback = "Regex didn\'t match: %r not found in %r" % (\n repr(expected_regex), text)\n else:\n res = True\n self.appendResult(res, text, expected_regex, feedback)\n\n def assertNotRegex(self, text, unexpected_regex, feedback=""):\n """Fail the test if the text matches the regular expression."""\n if isinstance(unexpected_regex, (str, )): # bytes\n unexpected_regex = re.compile(unexpected_regex)\n match = unexpected_regex.search(text)\n if match:\n feedback = \'Regex matched: %r matches %r in %r\' % (\n text[match.start() : match.end()],\n repr(unexpected_regex),\n text)\n # _formatMessage ensures the longMessage option is respected\n self.appendResult(not bool(match), text, unexpected_regex, feedback)\n\n def assertAlmostEqual(self, a, b, places=7, feedback="", delta=None):\n\n if delta is not None:\n res = abs(a-b) <= delta\n else:\n if places is None:\n places = 7\n res = round(a-b, places) == 0\n \n if not res and feedback == "":\n feedback = "Expected %s to equal %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertNotAlmostEqual(self, a, b, places=7, feedback="", delta=None):\n\n if delta is not None:\n res = not (a == b) and abs(a - b) > delta\n else:\n if places is None:\n places = 7\n\n res = round(a-b, places) != 0\n\n if not res and feedback == "":\n feedback = "Expected %s to not equal %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertGreater(self,a,b, feedback=""):\n res = a > b\n if not res and feedback == "":\n feedback = "Expected %s to be greater than %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertGreaterEqual(self,a,b, feedback=""):\n res = a >= b\n if not res and feedback == "":\n feedback = "Expected %s to be >= %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertLess(self, a, b, feedback=""):\n res = a < b\n if not res and feedback == "":\n feedback = "Expected %s to be less than %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def assertLessEqual(self,a,b, feedback=""):\n res = a <= b\n if not res and feedback == "":\n feedback = "Expected %s to be <= %s" % (str(a),str(b))\n self.appendResult(res, a, b, feedback)\n\n def appendResult(self,res,actual,expected,feedback):\n if res:\n msg = \'Pass\'\n self.assertPassed += 1\n else:\n msg = \'Fail: \' + feedback\n print(msg)\n self.assertFailed += 1\n\n def assertRaises(self, expected_exception, *args, **kwargs):\n context = _AssertRaisesContext(expected_exception, self)\n try:\n return context.handle(args, kwargs)\n finally:\n # bpo-23890: manually break a reference cycle\n context = None\n\n def fail(self, msg=None):\n if msg is None:\n msg = \'Fail\'\n else:\n msg = \'Fail: \' + msg\n print(msg)\n self.assertFailed += 1\n\n def showSummary(self):\n pct = self.numPassed / (self.numPassed+self.numFailed) * 100\n print("Ran %d tests, passed: %d failed: %d\\n" % (self.numPassed+self.numFailed,\n self.numPassed, self.numFailed))\n\n\n\ndef main(verbosity=1):\n glob = globals() # globals() still needs work\n for name in glob:\n if type(glob[name]) == type and issubclass(glob[name], TestCase):\n try:\n tc = glob[name]()\n tc.verbosity = verbosity\n tc.main()\n except:\n print("Uncaught Error in: ", name)\n',"src/lib/unittest/gui.py":"import document\nfrom unittest import TestCase\n\nclass TestCaseGui(TestCase):\n def __init__(self):\n TestCase.__init__(self)\n self.divid = document.currentDiv()\n self.mydiv = document.getElementById(self.divid)\n res = document.getElementById(self.divid+'_unit_results')\n if res:\n self.resdiv = res\n res.innerHTML = ''\n else:\n self.resdiv = document.createElement('div')\n self.resdiv.setAttribute('id',self.divid+'_unit_results')\n self.resdiv.setAttribute('class','unittest-results')\n self.mydiv.appendChild(self.resdiv)\n\n\n def main(self):\n t = document.createElement('table')\n self.resTable = t\n self.resdiv.appendChild(self.resTable)\n\n headers = ['Result','Actual Value','Expected Value','Notes']\n row = document.createElement('tr')\n for item in headers:\n head = document.createElement('th')\n head.setAttribute('class','ac-feedback')\n head.innerHTML = item\n head.setCSS('text-align','center')\n row.appendChild(head)\n self.resTable.appendChild(row)\n\n for func in self.tlist:\n try:\n self.setUp()\n func()\n self.tearDown()\n except Exception as e:\n self.appendResult('Error', None, None, e)\n self.numFailed += 1\n self.showSummary()\n\n def appendResult(self,res,actual,expected,param):\n trimActual = False\n if len(str(actual)) > 15:\n trimActual = True\n actualType = type(actual)\n trimExpected = False\n if len(str(expected)) > 15:\n trimExpected = True\n expectedType = type(expected)\n row = document.createElement('tr')\n err = False\n if res == 'Error':\n err = True\n msg = 'Error: %s' % param\n errorData = document.createElement('td')\n errorData.setAttribute('class','ac-feedback')\n errorData.innerHTML = 'ERROR'\n errorData.setCSS('background-color','#de8e96')\n errorData.setCSS('text-align','center')\n row.appendChild(errorData)\n elif res:\n passed = document.createElement('td')\n passed.setAttribute('class','ac-feedback')\n passed.innerHTML = 'Pass'\n passed.setCSS('background-color','#83d382')\n passed.setCSS('text-align','center')\n row.appendChild(passed)\n self.numPassed += 1\n else:\n fail = document.createElement('td')\n fail.setAttribute('class','ac-feedback')\n fail.innerHTML = 'Fail'\n fail.setCSS('background-color','#de8e96')\n fail.setCSS('text-align','center')\n row.appendChild(fail)\n self.numFailed += 1\n\n\n act = document.createElement('td')\n act.setAttribute('class','ac-feedback')\n if trimActual:\n actHTML = str(actual)[:5] + \"...\" + str(actual)[-5:]\n if actualType == str:\n actHTML = repr(actHTML)\n act.innerHTML = actHTML\n else:\n act.innerHTML = repr(actual)\n act.setCSS('text-align','center')\n row.appendChild(act)\n\n expect = document.createElement('td')\n expect.setAttribute('class','ac-feedback')\n\n if trimExpected:\n expectedHTML = str(expected)[:5] + \"...\" + str(expected)[-5:]\n if expectedType == str:\n expectedHTML = repr(expectedHTML)\n expect.innerHTML = expectedHTML\n else:\n expect.innerHTML = repr(expected)\n expect.setCSS('text-align','center')\n row.appendChild(expect)\n inp = document.createElement('td')\n inp.setAttribute('class','ac-feedback')\n\n if err:\n inp.innerHTML = msg\n else:\n inp.innerHTML = param\n inp.setCSS('text-align','center')\n row.appendChild(inp)\n self.resTable.appendChild(row)\n\n\n def showSummary(self):\n pct = self.numPassed / (self.numPassed+self.numFailed) * 100\n pTag = document.createElement('p')\n pTag.innerHTML = \"You passed: \" + str(pct) + \"% of the tests\"\n self.resdiv.appendChild(pTag)\n","src/lib/urllib/__init__.js":"var $builtinmodule=function(){return{}};","src/lib/urllib/request/__init__.js":'var $builtinmodule=function(){var a={};return a.Response=Sk.misceval.buildClass(a,function(a,b){b.__init__=new Sk.builtin.func(function(a,b){a.data$=b.responseText,a.lineList=a.data$.split("\\n"),a.lineList=a.lineList.slice(0,-1);for(var c=0;c<a.lineList.length;c++)a.lineList[c]+="\\n";a.currentLine=0,a.pos$=0}),b.__str__=new Sk.builtin.func(function(){return Sk.ffi.remapToPy("<Response>")}),b.__iter__=new Sk.builtin.func(function(a){var b=a.lineList;return Sk.builtin.makeGenerator(function(){return this.$index>=this.$lines.length?void 0:new Sk.builtin.str(this.$lines[this.$index++])},{$obj:a,$index:0,$lines:b})}),b.read=new Sk.builtin.func(function(a,b){if(a.closed)throw new Sk.builtin.ValueError("I/O operation on closed file");var c=a.data$.length;void 0===b&&(b=c);var d=new Sk.builtin.str(a.data$.substr(a.pos$,b));return a.pos$+=b,a.pos$>=c&&(a.pos$=c),d}),b.readline=new Sk.builtin.func(function(a){var b="";return a.currentLine<a.lineList.length&&(b=a.lineList[a.currentLine],a.currentLine++),new Sk.builtin.str(b)}),b.readlines=new Sk.builtin.func(function(a){for(var b=[],c=a.currentLine;c<a.lineList.length;c++)b.push(new Sk.builtin.str(a.lineList[c]));return new Sk.builtin.list(b)})},"Response",[]),a.urlopen=new Sk.builtin.func(function(b,c){var d=new Promise(function(d){var e=new XMLHttpRequest;e.addEventListener("loadend",function(){d(Sk.misceval.callsimArray(a.Response,[e]))}),c?(e.open("POST",b.v),e.setRequestHeader("Content-type","application/x-www-form-urlencoded"),e.setRequestHeader("Content-length",c.v.length),e.send(c.v)):(e.open("GET",b.v),e.send(null))}),e=new Sk.misceval.Suspension;return e.resume=function(){return resolution},e.data={type:"Sk.promise",promise:d.then(function(a){return resolution=a,a},function(a){return resolution="",a})},e}),a};',"src/lib/urllib2.py":'raise NotImplementedError("urllib2 is not yet implemented in Skulpt")\n',"src/lib/urlparse.py":'raise NotImplementedError("urlparse is not yet implemented in Skulpt")\n',"src/lib/user.py":'raise NotImplementedError("user is not yet implemented in Skulpt")\n',"src/lib/uu.py":'raise NotImplementedError("uu is not yet implemented in Skulpt")\n',"src/lib/uuid.py":'raise NotImplementedError("uuid is not yet implemented in Skulpt")\n',"src/lib/warnings.py":'raise NotImplementedError("warnings is not yet implemented in Skulpt")\n',"src/lib/wave.py":'raise NotImplementedError("wave is not yet implemented in Skulpt")\n',"src/lib/weakref.py":'raise NotImplementedError("weakref is not yet implemented in Skulpt")\n',"src/lib/webbrowser.js":'var $builtinmodule=function(){function open_tab(a){return(Sk.builtin.pyCheckType("url","string",Sk.builtin.checkString(a)),!b)?Sk.builtin.bool.false$:(a=a.$jsstr(),window.open(a,"_blank"),Sk.builtin.bool.true$)}var a={},b="undefined"!=typeof window&&"undefined"!=typeof window.navigator;return a.__name__=new Sk.builtin.str("webbrowser"),a.open=new Sk.builtin.func(function open(a){return Sk.builtin.pyCheckArgsLen("open",arguments.length+1,1,3),open_tab(a)}),a.open_new=new Sk.builtin.func(function open_new(a){return Sk.builtin.pyCheckArgsLen("open_new",arguments.length,1,1),open_tab(a)}),a.open_new_tab=new Sk.builtin.func(function open_new_tab(a){return Sk.builtin.pyCheckArgsLen("open_new_tab",arguments.length,1,1),open_tab(a)}),a.DefaultBrowser=Sk.misceval.buildClass(a,function dflbrowser(a,b){b.__init__=new Sk.builtin.func(function __init__(){return Sk.builtin.none.none$}),b.open=new Sk.builtin.func(function open(a,b){return Sk.builtin.pyCheckArgsLen("open",arguments.length,2,4),open_tab(b)}),b.open_new=new Sk.builtin.func(function open_new(a,b){return Sk.builtin.pyCheckArgsLen("open_new",arguments.length,2,2),open_tab(b)}),b.open_new_tab=new Sk.builtin.func(function open_new_tab(a,b){return Sk.builtin.pyCheckArgsLen("open_new_tab",arguments.length,2,2),open_tab(b)})},"DefaultBrowser",[]),a.get=new Sk.builtin.func(function get(){return Sk.builtin.pyCheckArgsLen("get",arguments.length,0,1),Sk.misceval.callsimArray(a.DefaultBrowser,[])}),a};',"src/lib/webbrowser.py":'raise NotImplementedError("webbrowser is not yet implemented in Skulpt")\n',"src/lib/webgl/__init__.js":'var $builtinmodule=function(){var a={__name__:new Sk.builtin.str("webgl")},c=function(a){return"<table style=\\"background-color: #8CE; width: 100%; height: 100%;\\"><tr><td align=\\"center\\"><div style=\\"display: table-cell; vertical-align: middle;\\"><div style=\\"\\">"+a+"</div></div></td></tr></table>"},d="This page requires a browser that supports WebGL.<br/><a href=\\"http://get.webgl.org\\">Click here to upgrade your browser.</a>",e=function(a){for(var b=["webgl","experimental-webgl","webkit-3d","moz-webgl"],c=null,d=0;d<b.length;++d){try{c=a.getContext(b[d])}catch(a){}if(c)break}if(c){function returnFalse(){return!1}a.onselectstart=returnFalse,a.onmousedown=returnFalse}return c},f=function(a,f){var g=document.getElementById(a);if(f||(f=g.getElementsByTagName("canvas")[0]),!f)return void(g.innerHTML=c(d));var h=e(f);if(!h){var i=navigator.userAgent.match(/(\\w+\\/.*? )/g),j={};try{for(var k=0;k<i.length;++k){for(var l=i[k].match(/(\\w+)/g),m=[],n=1;n<l.length;++n)m.push(parseInt(l[n]));j[l[0]]=m}}catch(a){}g.innerHTML=j.Chrome&&(7<j.Chrome[0]||7==j.Chrome[0]&&0<j.Chrome[1]||7==j.Chrome[0]&&0==j.Chrome[1]&&521<=j.Chrome[2])?c("It doesn\'t appear your computer can support WebGL.<br/><a href=\\"http://get.webgl.org\\">Click here for more information.</a>"):c(d)}return h};return a.Context=Sk.misceval.buildClass(a,function(a,b){b.__init__=new Sk.builtin.func(function(a,b){var c=document.getElementById(b.v),d=f(b.v,c);if(!d)throw new Error("Your browser does not appear to support WebGL.");for(var e in a.gl=d,d.__proto__)if("number"==typeof d.__proto__[e])Sk.abstr.objectSetItem(a.$d,new Sk.builtin.str(e),d.__proto__[e]);else if("function"==typeof d.__proto__[e])switch(e){case"bufferData":break;case"clearColor":break;case"drawArrays":break;case"getAttribLocation":break;case"getUniformLocation":break;case"shaderSource":break;case"uniformMatrix4fv":break;case"vertexAttribPointer":break;case"viewport":break;default:(function(b){Sk.abstr.objectSetItem(a.$d,new Sk.builtin.str(e),new Sk.builtin.func(function(){var a=d.__proto__[b];return a.apply(d,arguments)}))})(e);}d.clearColor(100/255,149/255,237/255,1),d.clear(d.COLOR_BUFFER_BIT)}),b.tp$getattr=Sk.generic.getAttr,b.bufferData=new Sk.builtin.func(function(a,b,c,d){a.gl.bufferData(b,c.v,d)}),b.clearColor=new Sk.builtin.func(function(a,b,c,d,e){a.gl.clearColor(Sk.builtin.asnum$(b),Sk.builtin.asnum$(c),Sk.builtin.asnum$(d),Sk.builtin.asnum$(e))}),b.getAttribLocation=new Sk.builtin.func(function(a,b,c){return a.gl.getAttribLocation(b,c.v)}),b.getUniformLocation=new Sk.builtin.func(function(a,b,c){return a.gl.getUniformLocation(b,c.v)}),b.shaderSource=new Sk.builtin.func(function(a,b,c){a.gl.shaderSource(b,c.v)}),b.drawArrays=new Sk.builtin.func(function(a,b,c,d){a.gl.drawArrays(Sk.builtin.asnum$(b),Sk.builtin.asnum$(c),Sk.builtin.asnum$(d))}),b.vertexAttribPointer=new Sk.builtin.func(function(a,b,c,d,e,f,g){a.gl.vertexAttribPointer(b,Sk.builtin.asnum$(c),Sk.builtin.asnum$(d),e,Sk.builtin.asnum$(f),Sk.builtin.asnum$(g))}),b.viewport=new Sk.builtin.func(function(a,b,c,d,e){a.gl.viewport(Sk.builtin.asnum$(b),Sk.builtin.asnum$(c),Sk.builtin.asnum$(d),Sk.builtin.asnum$(e))}),b.uniformMatrix4fv=new Sk.builtin.func(function(a,b,c,d){a.gl.uniformMatrix4fv(Sk.builtin.asnum$(b),c,d.v)}),b.setDrawFunc=new Sk.builtin.func(function(a,b){var c=new Date().getTime(),d=setInterval(function(){Sk.misceval.callsimArray(b,[a,new Date().getTime()-c])},1e3/60)})},"Context",[]),a.Float32Array=Sk.misceval.buildClass(a,function(a,b){b.__init__=new Sk.builtin.func(function(a,b){a.v="number"==typeof b?new Float32Array(b):new Float32Array(Sk.ffi.remapToJs(b))}),b.__repr__=new Sk.builtin.func(function(a){for(var b=[],c=0;c<a.v.length;++c)b.push(a.v[c]);return new Sk.builtin.str("["+b.join(", ")+"]")})},"Float32Array",[]),a.Matrix4x4=Sk.misceval.buildClass(a,function(a,b){b.__init__=new Sk.builtin.func(function(a,b){a.v=new Float32Array(Sk.ffi.remapToJs(b))}),b.identity=new Sk.builtin.func(function(a){var b=a.v;b[0]=1,b[1]=0,b[2]=0,b[3]=0,b[4]=0,b[5]=1,b[6]=0,b[7]=0,b[8]=0,b[9]=0,b[10]=1,b[11]=0,b[12]=0,b[13]=0,b[14]=0,b[15]=1}),b.perspective=new Sk.builtin.func(function(b,c,d,e,g){var h=Math.tan,i=Math.PI,j=h(.5*i-.5*(Sk.builtin.asnum$(c)*i/180)),l=Sk.builtin.asnum$(d),a=Sk.builtin.asnum$(e),n=Sk.builtin.asnum$(g),f=1/(a-n),k=b.v;k[0]=j/l,k[1]=0,k[2]=0,k[3]=0,k[4]=0,k[5]=j,k[6]=0,k[7]=0,k[8]=0,k[9]=0,k[10]=(a+n)*f,k[11]=-1,k[12]=0,k[13]=0,k[14]=2*(a*n*f),k[15]=0}),b.translate=new Sk.builtin.func(function(a,b){var c=a.v,d=Sk.ffi.remapToJs(b);c[0]=1,c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=1,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=1,c[11]=0,c[12]=d[0],c[13]=d[1],c[14]=d[2],c[15]=1}),b.__repr__=new Sk.builtin.func(function(a){for(var b=[],c=0;c<a.v.length;++c)b.push(a.v[c]);return new Sk.builtin.str("["+b.join(", ")+"]")})},"Matrix4x4",[]),a};',"src/lib/webgl/math.js":'var $builtinmodule=function(){var a={};return a.Mat44=Sk.misceval.buildClass(a,function(b,c){var d=Math.sqrt;c.__init__=new Sk.builtin.func(function(a){Sk.misceval.callsimArray(c.loadIdentity,[a]),a.stack=[]}),c.push=new Sk.builtin.func(function(a){a.stack.push(a.elements.slice(0))}),c.pop=new Sk.builtin.func(function(a){a.elements=a.stack.pop()}),c.loadIdentity=new Sk.builtin.func(function(a){a.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}),c.transform3=new Sk.builtin.func(function(b,c){var d=b.elements;return Sk.misceval.callsimArray(a.Vec3,[d[0]*c.x+d[4]*c.y+d[8]*c.z,d[1]*c.x+d[5]*c.y+d[9]*c.z,d[2]*c.x+d[6]*c.y+d[10]*c.z])}),c.scale=new Sk.builtin.func(function(a,b,c,d){return a.elements[0]*=b,a.elements[1]*=b,a.elements[2]*=b,a.elements[3]*=b,a.elements[4]*=c,a.elements[5]*=c,a.elements[6]*=c,a.elements[7]*=c,a.elements[8]*=d,a.elements[9]*=d,a.elements[10]*=d,a.elements[11]*=d,a}),c.translate=new Sk.builtin.func(function(a,b,c,d){return a.elements[12]+=a.elements[0]*b+a.elements[4]*c+a.elements[8]*d,a.elements[13]+=a.elements[1]*b+a.elements[5]*c+a.elements[9]*d,a.elements[14]+=a.elements[2]*b+a.elements[6]*c+a.elements[10]*d,a.elements[15]+=a.elements[3]*b+a.elements[7]*c+a.elements[11]*d,a}),c.rotate=new Sk.builtin.func(function(b,c,e,f,g){var h=Math.cos,i=Math.sin,j=Math.PI,k=d(e*e+f*f+g*g),l=i(c*j/180),m=h(c*j/180);if(0<k){var n,o,p,q,r,s,t,u,v,w,A;e/=k,f/=k,g/=k,n=e*e,o=f*f,p=g*g,q=e*f,r=f*g,s=g*e,t=e*l,u=f*l,v=g*l,w=1-m,A=Sk.misceval.callsimArray(a.Mat44),A.elements[0]=w*n+m,A.elements[1]=w*q-v,A.elements[2]=w*s+u,A.elements[3]=0,A.elements[4]=w*q+v,A.elements[5]=w*o+m,A.elements[6]=w*r-t,A.elements[7]=0,A.elements[8]=w*s-u,A.elements[9]=w*r+t,A.elements[10]=w*p+m,A.elements[11]=0,A.elements[12]=0,A.elements[13]=0,A.elements[14]=0,A.elements[15]=1,A=A.multiply(b),b.elements=A.elements}return b}),c.multiply=new Sk.builtin.func(function(b,c){for(var d=Sk.misceval.callsimArray(a.Mat44),e=0;4>e;e++)d.elements[4*e+0]=b.elements[4*e+0]*c.elements[0]+b.elements[4*e+1]*c.elements[4]+b.elements[4*e+2]*c.elements[8]+b.elements[4*e+3]*c.elements[12],d.elements[4*e+1]=b.elements[4*e+0]*c.elements[1]+b.elements[4*e+1]*c.elements[5]+b.elements[4*e+2]*c.elements[9]+b.elements[4*e+3]*c.elements[13],d.elements[4*e+2]=b.elements[4*e+0]*c.elements[2]+b.elements[4*e+1]*c.elements[6]+b.elements[4*e+2]*c.elements[10]+b.elements[4*e+3]*c.elements[14],d.elements[4*e+3]=b.elements[4*e+0]*c.elements[3]+b.elements[4*e+1]*c.elements[7]+b.elements[4*e+2]*c.elements[11]+b.elements[4*e+3]*c.elements[15];return b.elements=d.elements,b}),c.lookAt=new Sk.builtin.func(function(b,c,e,f,g,h,i,j,k,l){var m=[c-g,e-h,f-i],n=d(m[0]*m[0]+m[1]*m[1]+m[2]*m[2]);n&&(m[0]/=n,m[1]/=n,m[2]/=n);var o=[j,k,l],p=[];p[0]=o[1]*m[2]-o[2]*m[1],p[1]=-o[0]*m[2]+o[2]*m[0],p[2]=o[0]*m[1]-o[1]*m[0],o[0]=m[1]*p[2]-m[2]*p[1],o[1]=-m[0]*p[2]+m[2]*p[0],o[2]=m[0]*p[1]-m[1]*p[0],n=d(p[0]*p[0]+p[1]*p[1]+p[2]*p[2]),n&&(p[0]/=n,p[1]/=n,p[2]/=n),n=d(o[0]*o[0]+o[1]*o[1]+o[2]*o[2]),n&&(o[0]/=n,o[1]/=n,o[2]/=n);var q=Sk.misceval.callsimArray(a.Mat44);return q.elements[0]=p[0],q.elements[4]=p[1],q.elements[8]=p[2],q.elements[12]=0,q.elements[1]=o[0],q.elements[5]=o[1],q.elements[9]=o[2],q.elements[13]=0,q.elements[2]=m[0],q.elements[6]=m[1],q.elements[10]=m[2],q.elements[14]=0,q.elements[3]=0,q.elements[7]=0,q.elements[11]=0,q.elements[15]=1,q=q.multiply(b),b.elements=q.elements,b.translate(-c,-e,-f),b})},"Mat44",[]),a.Mat33=Sk.misceval.buildClass(a,function(a,b){b.__init__=new Sk.builtin.func(function(a){Sk.misceval.callsimArray(b.loadIdentity,[a])}),b.loadIdentity=new Sk.builtin.func(function(a){a.elements=[1,0,0,0,1,0,0,0,1]})},"Mat33",[]),a.Vec3=Sk.misceval.buildClass(a,function(b,c){c.__init__=new Sk.builtin.func(function(a,b,c,d){a.x=b,a.y=c,a.z=d}),c.__sub__=new Sk.builtin.func(function(b,c){return Sk.misceval.callsimArray(a.Vec3,[b.x-c.x,b.y-c.y,b.z-c.z])})},"Vec3",[]),a.cross=new Sk.builtin.func(function(b,c){return Sk.asserts.assert(b instanceof a.Vec3&&c instanceof a.Vec3),Sk.misceval.callsimArray(a.Vec3,[b.y*c.z-b.z*c.y,b.z*c.x-b.x*c.z,b.x*c.y-b.y*c.x])}),a};',"src/lib/webgl/matrix4.js":"var $builtinmodule=function(){var a=Math.PI,b={},c=new Float32Array(3),d=new Float32Array(3),e=new Float32Array(3),f=new Float32Array(4),g=new Float32Array(4),h=new Float32Array(4),i=new Float32Array(16),j=new Float32Array(16),k=new Float32Array(16),l=function(b,c){for(var a=Math.sqrt,d=0,e=c.length,f=0;f<e;++f)d+=c[f]*c[f];if(d=a(d),1e-5<d)for(var f=0;f<e;++f)b[f]=c[f]/d;else for(var f=0;f<e;++f)b[f]=0;return b},m=function(c,d,a){return c[0]=d[1]*a[2]-d[2]*a[1],c[1]=d[2]*a[0]-d[0]*a[2],c[2]=d[0]*a[1]-d[1]*a[0],c},n=function(c,d,a){for(var b=d.length,e=0;e<b;++e)c[e]=d[e]-a[e];return c},o=function(c,a){return c[0]*a[0]+c[1]*a[1]+c[2]*a[2]};return b.lookAt=new Sk.builtin.func(function(a,b,f,g){var h=c,i=d,j=l(h,n(h,b.v,f.v)),k=l(i,m(i,g.v,j)),p=m(e,j,k),q=a.v;return q[0]=k[0],q[1]=p[0],q[2]=j[0],q[3]=0,q[4]=k[1],q[5]=p[1],q[6]=j[1],q[7]=0,q[8]=k[2],q[9]=p[2],q[10]=j[2],q[11]=0,q[12]=-o(k,b.v),q[13]=-o(p,b.v),q[14]=-o(j,b.v),q[15]=1,a}),b.perspective=new Sk.builtin.func(function(b,c,d,e,g){var h=Math.tan,i=h(.5*a-.5*(c*a/180)),f=1/(e-g),j=b.v;return j[0]=i/d,j[1]=0,j[2]=0,j[3]=0,j[4]=0,j[5]=i,j[6]=0,j[7]=0,j[8]=0,j[9]=0,j[10]=(e+g)*f,j[11]=-1,j[12]=0,j[13]=0,j[14]=2*(e*g*f),j[15]=0,b}),b.rotationY=new Sk.builtin.func(function(b,d){var e=Math.sin,f=Math.cos,g=b.v,h=f(d*a/180),c=e(d*a/180);return g[0]=h,g[1]=0,g[2]=-c,g[3]=0,g[4]=0,g[5]=1,g[6]=0,g[7]=0,g[8]=c,g[9]=0,g[10]=h,g[11]=0,g[12]=0,g[13]=0,g[14]=0,g[15]=1,b}),b.identity=new Sk.builtin.func(function(a){var b=a.v;return b[0]=1,b[1]=0,b[2]=0,b[3]=0,b[4]=0,b[5]=1,b[6]=0,b[7]=0,b[8]=0,b[9]=0,b[10]=1,b[11]=0,b[12]=0,b[13]=0,b[14]=0,b[15]=1,a}),b.mul=new Sk.builtin.func(function(c,d,e){var f=c.v,g=d.v,a=e.v,b=g[0],h=g[1],i=g[2],j=g[3],k=g[4],l=g[5],m=g[6],n=g[7],o=g[8],p=g[9],q=g[10],r=g[11],s=g[12],t=g[13],u=g[14],v=g[15],w=a[0],x=a[1],y=a[2],z=a[3],A=a[4],B=a[5],C=a[6],D=a[7],E=a[8],F=a[9],G=a[10],H=a[11],I=a[12],J=a[13],K=a[14],L=a[15];return f[0]=b*w+h*A+i*E+j*I,f[1]=b*x+h*B+i*F+j*J,f[2]=b*y+h*C+i*G+j*K,f[3]=b*z+h*D+i*H+j*L,f[4]=k*w+l*A+m*E+n*I,f[5]=k*x+l*B+m*F+n*J,f[6]=k*y+l*C+m*G+n*K,f[7]=k*z+l*D+m*H+n*L,f[8]=o*w+p*A+q*E+r*I,f[9]=o*x+p*B+q*F+r*J,f[10]=o*y+p*C+q*G+r*K,f[11]=o*z+p*D+q*H+r*L,f[12]=s*w+t*A+u*E+v*I,f[13]=s*x+t*B+u*F+v*J,f[14]=s*y+t*C+u*G+v*K,f[15]=s*z+t*D+u*H+v*L,c}),b.invert=new Sk.builtin.func(function(a,b){var c=a.v,e=b.v,f=e[0],g=e[1],h=e[2],i=e[3],j=e[4],k=e[5],l=e[6],m=e[7],n=e[8],o=e[9],p=e[10],q=e[11],r=e[12],s=e[13],t=e[14],u=e[15],v=p*u,w=t*q,x=l*u,y=t*m,z=l*q,A=p*m,B=h*u,C=t*i,D=h*q,E=p*i,F=h*m,G=l*i,H=n*s,I=r*o,J=j*s,K=r*k,L=j*o,M=n*k,N=f*s,O=r*g,P=f*o,Q=n*g,R=f*k,S=j*g,T=v*k+y*o+z*s-(w*k+x*o+A*s),U=w*g+B*o+E*s-(v*g+C*o+D*s),V=x*g+C*k+F*s-(y*g+B*k+G*s),W=A*g+D*k+G*o-(z*g+E*k+F*o),X=1/(f*T+j*U+n*V+r*W);return c[0]=X*T,c[1]=X*U,c[2]=X*V,c[3]=X*W,c[4]=X*(w*j+x*n+A*r-(v*j+y*n+z*r)),c[5]=X*(v*f+C*n+D*r-(w*f+B*n+E*r)),c[6]=X*(y*f+B*j+G*r-(x*f+C*j+F*r)),c[7]=X*(z*f+E*j+F*n-(A*f+D*j+G*n)),c[8]=X*(H*m+K*q+L*u-(I*m+J*q+M*u)),c[9]=X*(I*i+N*q+Q*u-(H*i+O*q+P*u)),c[10]=X*(J*i+O*m+R*u-(K*i+N*m+S*u)),c[11]=X*(M*i+P*m+S*q-(L*i+Q*m+R*q)),c[12]=X*(J*p+M*t+I*l-(L*t+H*l+K*p)),c[13]=X*(P*t+H*h+O*p-(N*p+Q*t+I*h)),c[14]=X*(N*l+S*t+K*h-(R*t+J*h+O*l)),c[15]=X*(R*p+L*h+Q*l-(P*l+S*p+M*h)),a}),b.transpose=new Sk.builtin.func(function(a,b){for(var c=a.v,d=b.v,e=0;4>e;++e)for(var f=0;4>f;++f)c[4*e+f]=d[4*f+e];return c}),b};","src/lib/webgl/models.js":'var $builtinmodule=function(a){var c={},d=function(a,c){var d=c||gl.ARRAY_BUFFER,e=gl.createBuffer();if(this.target=d,this.buf=e,this.set(a),this.numComponents_=a.numComponents,this.numElements_=a.numElements,this.totalComponents_=this.numComponents_*this.numElements_,a.buffer instanceof Float32Array)this.type_=gl.FLOAT;else if(a.buffer instanceof Uint8Array)this.type_=gl.UNSIGNED_BYTE;else if(a.buffer instanceof Int8Array)this.type_=gl._BYTE;else if(a.buffer instanceof Uint16Array)this.type_=gl.UNSIGNED_SHORT;else if(a.buffer instanceof Int16Array)this.type_=gl.SHORT;else throw"unhandled type:"+typeof a.buffer};return d.prototype.set=function(a){gl.bindBuffer(this.target,this.buf),gl.bufferData(this.target,a.buffer,gl.STATIC_DRAW)},d.prototype.type=function(){return this.type_},d.prototype.numComponents=function(){return this.numComponents_},d.prototype.numElements=function(){return this.numElements_},d.prototype.totalComponents=function(){return this.totalComponents_},d.prototype.buffer=function(){return this.buf},d.prototype.stride=function(){return 0},d.prototype.offset=function(){return 0},c.Model=Sk.misceval.buildClass(c,function(c,e){e.__init__=new Sk.builtin.func(function(c,e,f,g){c.buffers={};var h=function(a,e){var f="indices"==a?gl.ELEMENT_ARRAY_BUFFER:gl.ARRAY_BUFFER;b=c.buffers[a],b?b.set(e):b=new d(e,f),c.buffers[a]=b};for(a in f)h(a,f[a]);var i={},j=0;for(var k in g)i[k]=j++;c.mode=gl.TRIANGLES,c.textures=g.v,c.textureUnits=i,c.shader=e}),e.drawPrep=new Sk.builtin.func(function(a,c){var d=a.shader,e=a.buffers,f=a.textures;for(var g in c=Sk.ffi.remapToJs(c),Sk.misceval.callsimArray(d.use,[d]),e){var h=e[g];if("indices"==g)gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER,h.buffer());else{var i=d.attrib[g];i&&i(h)}}for(var j in f){var k=a.textureUnits[j];d.setUniform$impl(d,textuer,k),f[j].bindToUnit(k)}for(var l in c)d.setUniform$impl(d,l,c[l])}),e.draw=new Sk.builtin.func(function(a,c,d){var e=a.shader;for(uniform in c=Sk.ffi.remapToJs(c),c)e.setUniform$impl(e,uniform,c[uniform]);if(d)for(var f in d){var g=a.textureUnits[f];e.setUniform$impl(e,f,g),d[f].bindToUnit(g)}var h=a.buffers;gl.drawElements(a.mode,h.indices.totalComponents(),gl.UNSIGNED_SHORT,0)})},"Model",[]),c};',"src/lib/webgl/primitives.js":'var $builtinmodule=function(){var a={},b=function(a,b,c){c=c||"Float32Array";var d=window[c];b.length?(this.buffer=new d(b),b=this.buffer.length/a,this.cursor=b):(this.buffer=new d(a*b),this.cursor=0),this.numComponents=a,this.numElements=b,this.type=c};return b.prototype.stride=function(){return 0},b.prototype.offset=function(){return 0},b.prototype.getElement=function(a){for(var b=a*this.numComponents,c=[],d=0;d<this.numComponents;++d)c.push(this.buffer[b+d]);return c},b.prototype.setElement=function(a,b){for(var c=a*this.numComponents,d=0;d<this.numComponents;++d)this.buffer[c+d]=b[d]},b.prototype.clone=function(){var a=new b(this.numComponents,this.numElements,this.type);return a.pushArray(this),a},b.prototype.push=function(a){this.setElement(this.cursor++,a)},b.prototype.pushArray=function(a){for(var b=0;b<a.numElements;++b)this.push(a.getElement(b))},b.prototype.pushArrayWithOffset=function(a,b){for(var c,d=0;d<a.numElements;++d){c=a.getElement(d);for(var e=0;e<b.length;++e)c[e]+=b[e];this.push(c)}},b.prototype.computeExtents=function(){for(var a=Math.max,b=Math.min,c,d=this.numElements,e=this.numComponents,f=this.getElement(0),g=this.getElement(0),h=1;h<d;++h){c=this.getElement(h);for(var i=0;i<e;++i)f[i]=b(f[i],c[i]),g[i]=a(g[i],c[i])}return{min:f,max:g}},a.createCube=new Sk.builtin.func(function(a){for(var c,d=[[3,7,5,1],[0,4,6,2],[6,7,3,2],[0,1,5,4],[5,7,6,4],[2,3,1,0]],e=a/2,g=[[-e,-e,-e],[+e,-e,-e],[-e,+e,-e],[+e,+e,-e],[-e,-e,+e],[+e,-e,+e],[-e,+e,+e],[+e,+e,+e]],h=[[1,0,0],[-1,0,0],[0,1,0],[0,-1,0],[0,0,1],[0,0,-1]],i=[[0,0],[1,0],[1,1],[0,1]],j=24,k=new b(3,j),l=new b(3,j),m=new b(2,j),n=new b(3,12,"Uint16Array"),o=0;6>o;++o){c=d[o];for(var p=0;4>p;++p){var q=g[c[p]],r=h[o],s=i[p];k.push(q),l.push(r),m.push(s)}var t=4*o;n.push([t+0,t+1,t+2]),n.push([t+0,t+2,t+3])}return{position:k,normal:l,texCoord:m,indices:n}}),a};',"src/lib/whichdb.py":'raise NotImplementedError("whichdb is not yet implemented in Skulpt")\n',"src/lib/wsgiref/__init__.py":'raise NotImplementedError("wsgiref is not yet implemented in Skulpt")\n',"src/lib/xdrlib.py":'raise NotImplementedError("xdrlib is not yet implemented in Skulpt")\n',"src/lib/xml/__init__.py":'raise NotImplementedError("xml is not yet implemented in Skulpt")\n',"src/lib/xml/dom/__init__.py":'raise NotImplementedError("dom is not yet implemented in Skulpt")\n',"src/lib/xml/etree/__init__.py":'raise NotImplementedError("etree is not yet implemented in Skulpt")\n',"src/lib/xml/parsers/__init__.py":'raise NotImplementedError("parsers is not yet implemented in Skulpt")\n',"src/lib/xml/sax/__init__.py":'raise NotImplementedError("sax is not yet implemented in Skulpt")\n',"src/lib/xmllib.py":'raise NotImplementedError("xmllib is not yet implemented in Skulpt")\n',"src/lib/xmlrpclib.py":'raise NotImplementedError("xmlrpclib is not yet implemented in Skulpt")\n',"src/lib/zipfile.py":'raise NotImplementedError("zipfile is not yet implemented in Skulpt")\n'}}},function(e,t,n){"use strict";
|
||
/**
|
||
* @license React
|
||
* react-reconciler-constants.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/t.ConcurrentRoot=1,t.ContinuousEventPriority=4,t.DefaultEventPriority=16,t.DiscreteEventPriority=1,t.IdleEventPriority=536870912,t.LegacyRoot=0},function(e,t,n){
|
||
/**
|
||
* @license React
|
||
* react-reconciler.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
e.exports=function(e){var t={},r=n(0),i=n(70),o=Object.assign;function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,l=Symbol.for("react.element"),c=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),f=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),y=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var S=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var _=Symbol.iterator;function x(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=_&&e[_]||e["@@iterator"])?e:null}function w(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case u:return"Fragment";case c:return"Portal";case h:return"Profiler";case d:return"StrictMode";case g:return"Suspense";case b:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case f:return(e.displayName||"Context")+".Consumer";case p:return(e._context.displayName||"Context")+".Provider";case m:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case v:return null!==(t=e.displayName||null)?t:w(e.type)||"Memo";case y:t=e._payload,e=e._init;try{return w(e(t))}catch(e){}}return null}function k(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return w(t);case 8:return t===d?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function O(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function E(e){if(O(e)!==e)throw Error(s(188))}function A(e){var t=e.alternate;if(!t){if(null===(t=O(e)))throw Error(s(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return E(i),e;if(o===r)return E(i),t;o=o.sibling}throw Error(s(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,l=i.child;l;){if(l===n){a=!0,n=i,r=o;break}if(l===r){a=!0,r=i,n=o;break}l=l.sibling}if(!a){for(l=o.child;l;){if(l===n){a=!0,n=o,r=i;break}if(l===r){a=!0,r=o,n=i;break}l=l.sibling}if(!a)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(3!==n.tag)throw Error(s(188));return n.stateNode.current===n?e:t}function T(e){return null!==(e=A(e))?function e(t){if(5===t.tag||6===t.tag)return t;for(t=t.child;null!==t;){var n=e(t);if(null!==n)return n;t=t.sibling}return null}(e):null}var C,M=Array.isArray,$=e.getPublicInstance,P=e.getRootHostContext,R=e.getChildHostContext,j=e.prepareForCommit,N=e.resetAfterCommit,D=e.createInstance,I=e.appendInitialChild,L=e.finalizeInitialChildren,B=e.prepareUpdate,z=e.shouldSetTextContent,F=e.createTextInstance,U=e.scheduleTimeout,Q=e.cancelTimeout,q=e.noTimeout,G=e.isPrimaryRenderer,H=e.supportsMutation,V=e.supportsPersistence,W=e.supportsHydration,X=e.getInstanceFromNode,Y=e.preparePortalMount,Z=e.getCurrentEventPriority,J=e.detachDeletedInstance,K=e.supportsMicrotasks,ee=e.scheduleMicrotask,te=e.supportsTestSelectors,ne=e.findFiberRoot,re=e.getBoundingRect,ie=e.getTextContent,oe=e.isHiddenSubtree,se=e.matchAccessibilityRole,ae=e.setFocusIfFocusable,le=e.setupIntersectionObserver,ce=e.appendChild,ue=e.appendChildToContainer,de=e.commitTextUpdate,he=e.commitMount,pe=e.commitUpdate,fe=e.insertBefore,me=e.insertInContainerBefore,ge=e.removeChild,be=e.removeChildFromContainer,ve=e.resetTextContent,ye=e.hideInstance,Se=e.hideTextInstance,_e=e.unhideInstance,xe=e.unhideTextInstance,we=e.clearContainer,ke=e.cloneInstance,Oe=e.createContainerChildSet,Ee=e.appendChildToContainerChildSet,Ae=e.finalizeContainerChildren,Te=e.replaceContainerChildren,Ce=e.cloneHiddenInstance,Me=e.cloneHiddenTextInstance,$e=e.canHydrateInstance,Pe=e.canHydrateTextInstance,Re=e.canHydrateSuspenseInstance,je=e.isSuspenseInstancePending,Ne=e.isSuspenseInstanceFallback,De=e.registerSuspenseInstanceRetry,Ie=e.getNextHydratableSibling,Le=e.getFirstHydratableChild,Be=e.getFirstHydratableChildWithinContainer,ze=e.getFirstHydratableChildWithinSuspenseInstance,Fe=e.hydrateInstance,Ue=e.hydrateTextInstance,Qe=e.hydrateSuspenseInstance,qe=e.getNextHydratableInstanceAfterSuspenseInstance,Ge=e.commitHydratedContainer,He=e.commitHydratedSuspenseInstance,Ve=e.clearSuspenseBoundary,We=e.clearSuspenseBoundaryFromContainer,Xe=e.shouldDeleteUnhydratedTailInstances,Ye=e.didNotMatchHydratedContainerTextInstance,Ze=e.didNotMatchHydratedTextInstance;function Je(e){if(void 0===C)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);C=t&&t[1]||""}return"\n"+C+e}var Ke=!1;function et(e,t){if(!e||Ke)return"";Ke=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),o=r.stack.split("\n"),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(1!==s||1!==a)do{if(s--,0>--a||i[s]!==o[a]){var l="\n"+i[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=s&&0<=a);break}}}finally{Ke=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Je(e):""}var tt=Object.prototype.hasOwnProperty,nt=[],rt=-1;function it(e){return{current:e}}function ot(e){0>rt||(e.current=nt[rt],nt[rt]=null,rt--)}function st(e,t){rt++,nt[rt]=e.current,e.current=t}var at={},lt=it(at),ct=it(!1),ut=at;function dt(e,t){var n=e.type.contextTypes;if(!n)return at;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function ht(e){return null!=(e=e.childContextTypes)}function pt(){ot(ct),ot(lt)}function ft(e,t,n){if(lt.current!==at)throw Error(s(168));st(lt,t),st(ct,n)}function mt(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(s(108,k(e)||"Unknown",i));return o({},n,r)}function gt(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||at,ut=lt.current,st(lt,e),st(ct,ct.current),!0}function bt(e,t,n){var r=e.stateNode;if(!r)throw Error(s(169));n?(e=mt(e,t,ut),r.__reactInternalMemoizedMergedChildContext=e,ot(ct),ot(lt),st(lt,e)):ot(ct),st(ct,n)}var vt=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(yt(e)/St|0)|0},yt=Math.log,St=Math.LN2;var _t=64,xt=4194304;function wt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function kt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=268435455&n;if(0!==s){var a=s&~i;0!==a?r=wt(a):0!==(o&=s)&&(r=wt(o))}else 0!==(s=n&~i)?r=wt(s):0!==o&&(r=wt(o));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&0!=(4194240&o)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-vt(t)),r|=e[n],t&=~i;return r}function Ot(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:default:return-1}}function Et(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function At(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Tt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-vt(t)]=n}function Ct(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-vt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Mt=0;function $t(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var Pt=i.unstable_scheduleCallback,Rt=i.unstable_cancelCallback,jt=i.unstable_shouldYield,Nt=i.unstable_requestPaint,Dt=i.unstable_now,It=i.unstable_ImmediatePriority,Lt=i.unstable_UserBlockingPriority,Bt=i.unstable_NormalPriority,zt=i.unstable_IdlePriority,Ft=null,Ut=null;var Qt="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},qt=null,Gt=!1,Ht=!1;function Vt(e){null===qt?qt=[e]:qt.push(e)}function Wt(){if(!Ht&&null!==qt){Ht=!0;var e=0,t=Mt;try{var n=qt;for(Mt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}qt=null,Gt=!1}catch(t){throw null!==qt&&(qt=qt.slice(e+1)),Pt(It,Wt),t}finally{Mt=t,Ht=!1}}return null}var Xt=a.ReactCurrentBatchConfig;function Yt(e,t){if(Qt(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!tt.call(t,i)||!Qt(e[i],t[i]))return!1}return!0}function Zt(e){switch(e.tag){case 5:return Je(e.type);case 16:return Je("Lazy");case 13:return Je("Suspense");case 19:return Je("SuspenseList");case 0:case 2:case 15:return e=et(e.type,!1);case 11:return e=et(e.type.render,!1);case 1:return e=et(e.type,!0);default:return""}}function Jt(e,t){if(e&&e.defaultProps){for(var n in t=o({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Kt=it(null),en=null,tn=null,nn=null;function rn(){nn=tn=en=null}function on(e,t,n){G?(st(Kt,t._currentValue),t._currentValue=n):(st(Kt,t._currentValue2),t._currentValue2=n)}function sn(e){var t=Kt.current;ot(Kt),G?e._currentValue=t:e._currentValue2=t}function an(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ln(e,t){en=e,nn=tn=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(ji=!0),e.firstContext=null)}function cn(e){var t=G?e._currentValue:e._currentValue2;if(nn!==e)if(e={context:e,memoizedValue:t,next:null},null===tn){if(null===en)throw Error(s(308));tn=e,en.dependencies={lanes:0,firstContext:e}}else tn=tn.next=e;return t}var un=null,dn=!1;function hn(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function pn(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function fn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function mn(e,t){var n=e.updateQueue;null!==n&&(n=n.shared,null!==qo&&0!=(1&e.mode)&&0==(2&Qo)?(null===(e=n.interleaved)?(t.next=t,null===un?un=[n]:un.push(n)):(t.next=e.next,e.next=t),n.interleaved=t):(null===(e=n.pending)?t.next=t:(t.next=e.next,e.next=t),n.pending=t))}function gn(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Ct(e,n)}}function bn(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=s:o=o.next=s,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function vn(e,t,n,r){var i=e.updateQueue;dn=!1;var s=i.firstBaseUpdate,a=i.lastBaseUpdate,l=i.shared.pending;if(null!==l){i.shared.pending=null;var c=l,u=c.next;c.next=null,null===a?s=u:a.next=u,a=c;var d=e.alternate;null!==d&&((l=(d=d.updateQueue).lastBaseUpdate)!==a&&(null===l?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(null!==s){var h=i.baseState;for(a=0,d=u=c=null,l=s;;){var p=l.lane,f=l.eventTime;if((r&p)===p){null!==d&&(d=d.next={eventTime:f,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var m=e,g=l;switch(p=t,f=n,g.tag){case 1:if("function"==typeof(m=g.payload)){h=m.call(f,h,p);break e}h=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null==(p="function"==typeof(m=g.payload)?m.call(f,h,p):m))break e;h=o({},h,p);break e;case 2:dn=!0}}null!==l.callback&&0!==l.lane&&(e.flags|=64,null===(p=i.effects)?i.effects=[l]:p.push(l))}else f={eventTime:f,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},null===d?(u=d=f,c=h):d=d.next=f,a|=p;if(null===(l=l.next)){if(null===(l=i.shared.pending))break;l=(p=l).next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}if(null===d&&(c=h),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=d,null!==(t=i.shared.interleaved)){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===s&&(i.shared.lanes=0);Zo|=a,e.lanes=a,e.memoizedState=h}}function yn(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(s(191,i));i.call(r)}}}var Sn=(new r.Component).refs;function _n(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:o({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var xn={isMounted:function(e){return!!(e=e._reactInternals)&&O(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=gs(),i=bs(e),o=fn(r,i);o.payload=t,null!=n&&(o.callback=n),mn(e,o),null!==(t=vs(e,i,r))&&gn(t,e,i)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=gs(),i=bs(e),o=fn(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),mn(e,o),null!==(t=vs(e,i,r))&&gn(t,e,i)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=gs(),r=bs(e),i=fn(n,r);i.tag=2,null!=t&&(i.callback=t),mn(e,i),null!==(t=vs(e,r,n))&&gn(t,e,r)}};function wn(e,t,n,r,i,o,s){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,s):!t.prototype||!t.prototype.isPureReactComponent||(!Yt(n,r)||!Yt(i,o))}function kn(e,t,n){var r=!1,i=at,o=t.contextType;return"object"==typeof o&&null!==o?o=cn(o):(i=ht(t)?ut:lt.current,o=(r=null!=(r=t.contextTypes))?dt(e,i):at),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=xn,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function On(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&xn.enqueueReplaceState(t,t.state,null)}function En(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Sn,hn(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=cn(o):(o=ht(t)?ut:lt.current,i.context=dt(e,o)),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(_n(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&xn.enqueueReplaceState(i,i.state,null),vn(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}var An=[],Tn=0,Cn=null,Mn=0,$n=[],Pn=0,Rn=null,jn=1,Nn="";function Dn(e,t){An[Tn++]=Mn,An[Tn++]=Cn,Cn=e,Mn=t}function In(e,t,n){$n[Pn++]=jn,$n[Pn++]=Nn,$n[Pn++]=Rn,Rn=e;var r=jn;e=Nn;var i=32-vt(r)-1;r&=~(1<<i),n+=1;var o=32-vt(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,jn=1<<32-vt(t)+i|n<<i|r,Nn=o+e}else jn=1<<o|n<<i|r,Nn=e}function Ln(e){null!==e.return&&(Dn(e,1),In(e,1,0))}function Bn(e){for(;e===Cn;)Cn=An[--Tn],An[Tn]=null,Mn=An[--Tn],An[Tn]=null;for(;e===Rn;)Rn=$n[--Pn],$n[Pn]=null,Nn=$n[--Pn],$n[Pn]=null,jn=$n[--Pn],$n[Pn]=null}var zn=null,Fn=null,Un=!1,Qn=!1,qn=null;function Gn(e,t){var n=Vs(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function Hn(e,t){switch(e.tag){case 5:return null!==(t=$e(t,e.type,e.pendingProps))&&(e.stateNode=t,zn=e,Fn=Le(t),!0);case 6:return null!==(t=Pe(t,e.pendingProps))&&(e.stateNode=t,zn=e,Fn=null,!0);case 13:if(null!==(t=Re(t))){var n=null!==Rn?{id:jn,overflow:Nn}:null;return e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Vs(18,null,null,0)).stateNode=t,n.return=e,e.child=n,zn=e,Fn=null,!0}return!1;default:return!1}}function Vn(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function Wn(e){if(Un){var t=Fn;if(t){var n=t;if(!Hn(e,t)){if(Vn(e))throw Error(s(418));t=Ie(n);var r=zn;t&&Hn(e,t)?Gn(r,n):(e.flags=-4097&e.flags|2,Un=!1,zn=e)}}else{if(Vn(e))throw Error(s(418));e.flags=-4097&e.flags|2,Un=!1,zn=e}}}function Xn(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;zn=e}function Yn(e){if(!W||e!==zn)return!1;if(!Un)return Xn(e),Un=!0,!1;if(3!==e.tag&&(5!==e.tag||Xe(e.type)&&!z(e.type,e.memoizedProps))){var t=Fn;if(t){if(Vn(e)){for(e=Fn;e;)e=Ie(e);throw Error(s(418))}for(;t;)Gn(e,t),t=Ie(t)}}if(Xn(e),13===e.tag){if(!W)throw Error(s(316));if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(s(317));Fn=qe(e)}else Fn=zn?Ie(e.stateNode):null;return!0}function Zn(){W&&(Fn=zn=null,Qn=Un=!1)}function Jn(e){null===qn?qn=[e]:qn.push(e)}function Kn(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(s(309));var r=n.stateNode}if(!r)throw Error(s(147,e));var i=r,o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:((t=function(e){var t=i.refs;t===Sn&&(t=i.refs={}),null===e?delete t[o]:t[o]=e})._stringRef=o,t)}if("string"!=typeof e)throw Error(s(284));if(!n._owner)throw Error(s(290,e))}return e}function er(e,t){throw e=Object.prototype.toString.call(t),Error(s(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function tr(e){return(0,e._init)(e._payload)}function nr(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Xs(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function a(t){return e&&null===t.alternate&&(t.flags|=2),t}function d(e,t,n,r){return null===t||6!==t.tag?((t=Ks(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n,r){var o=n.type;return o===u?f(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===y&&tr(o)===t.type)?((r=i(t,n.props)).ref=Kn(e,t,n),r.return=e,r):((r=Ys(n.type,n.key,n.props,null,e.mode,r)).ref=Kn(e,t,n),r.return=e,r)}function p(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=ea(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function f(e,t,n,r,o){return null===t||7!==t.tag?((t=Zs(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function m(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Ks(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case l:return(n=Ys(t.type,t.key,t.props,null,e.mode,n)).ref=Kn(e,null,t),n.return=e,n;case c:return(t=ea(t,e.mode,n)).return=e,t;case y:return m(e,(0,t._init)(t._payload),n)}if(M(t)||x(t))return(t=Zs(t,e.mode,n,null)).return=e,t;er(e,t)}return null}function g(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:d(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case l:return n.key===i?h(e,t,n,r):null;case c:return n.key===i?p(e,t,n,r):null;case y:return g(e,t,(i=n._init)(n._payload),r)}if(M(n)||x(n))return null!==i?null:f(e,t,n,r,null);er(e,n)}return null}function b(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return d(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case l:return h(t,e=e.get(null===r.key?n:r.key)||null,r,i);case c:return p(t,e=e.get(null===r.key?n:r.key)||null,r,i);case y:return b(e,t,n,(0,r._init)(r._payload),i)}if(M(r)||x(r))return f(t,e=e.get(n)||null,r,i,null);er(t,r)}return null}function v(i,s,a,l){for(var c=null,u=null,d=s,h=s=0,p=null;null!==d&&h<a.length;h++){d.index>h?(p=d,d=null):p=d.sibling;var f=g(i,d,a[h],l);if(null===f){null===d&&(d=p);break}e&&d&&null===f.alternate&&t(i,d),s=o(f,s,h),null===u?c=f:u.sibling=f,u=f,d=p}if(h===a.length)return n(i,d),Un&&Dn(i,h),c;if(null===d){for(;h<a.length;h++)null!==(d=m(i,a[h],l))&&(s=o(d,s,h),null===u?c=d:u.sibling=d,u=d);return Un&&Dn(i,h),c}for(d=r(i,d);h<a.length;h++)null!==(p=b(d,i,h,a[h],l))&&(e&&null!==p.alternate&&d.delete(null===p.key?h:p.key),s=o(p,s,h),null===u?c=p:u.sibling=p,u=p);return e&&d.forEach((function(e){return t(i,e)})),Un&&Dn(i,h),c}function S(i,a,l,c){var u=x(l);if("function"!=typeof u)throw Error(s(150));if(null==(l=u.call(l)))throw Error(s(151));for(var d=u=null,h=a,p=a=0,f=null,v=l.next();null!==h&&!v.done;p++,v=l.next()){h.index>p?(f=h,h=null):f=h.sibling;var y=g(i,h,v.value,c);if(null===y){null===h&&(h=f);break}e&&h&&null===y.alternate&&t(i,h),a=o(y,a,p),null===d?u=y:d.sibling=y,d=y,h=f}if(v.done)return n(i,h),Un&&Dn(i,p),u;if(null===h){for(;!v.done;p++,v=l.next())null!==(v=m(i,v.value,c))&&(a=o(v,a,p),null===d?u=v:d.sibling=v,d=v);return Un&&Dn(i,p),u}for(h=r(i,h);!v.done;p++,v=l.next())null!==(v=b(h,i,p,v.value,c))&&(e&&null!==v.alternate&&h.delete(null===v.key?p:v.key),a=o(v,a,p),null===d?u=v:d.sibling=v,d=v);return e&&h.forEach((function(e){return t(i,e)})),Un&&Dn(i,p),u}return function e(r,o,s,d){if("object"==typeof s&&null!==s&&s.type===u&&null===s.key&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case l:e:{for(var h=s.key,p=o;null!==p;){if(p.key===h){if((h=s.type)===u){if(7===p.tag){n(r,p.sibling),(o=i(p,s.props.children)).return=r,r=o;break e}}else if(p.elementType===h||"object"==typeof h&&null!==h&&h.$$typeof===y&&tr(h)===p.type){n(r,p.sibling),(o=i(p,s.props)).ref=Kn(r,p,s),o.return=r,r=o;break e}n(r,p);break}t(r,p),p=p.sibling}s.type===u?((o=Zs(s.props.children,r.mode,d,s.key)).return=r,r=o):((d=Ys(s.type,s.key,s.props,null,r.mode,d)).ref=Kn(r,o,s),d.return=r,r=d)}return a(r);case c:e:{for(p=s.key;null!==o;){if(o.key===p){if(4===o.tag&&o.stateNode.containerInfo===s.containerInfo&&o.stateNode.implementation===s.implementation){n(r,o.sibling),(o=i(o,s.children||[])).return=r,r=o;break e}n(r,o);break}t(r,o),o=o.sibling}(o=ea(s,r.mode,d)).return=r,r=o}return a(r);case y:return e(r,o,(p=s._init)(s._payload),d)}if(M(s))return v(r,o,s,d);if(x(s))return S(r,o,s,d);er(r,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==o&&6===o.tag?(n(r,o.sibling),(o=i(o,s)).return=r,r=o):(n(r,o),(o=Ks(s,r.mode,d)).return=r,r=o),a(r)):n(r,o)}}var rr=nr(!0),ir=nr(!1),or={},sr=it(or),ar=it(or),lr=it(or);function cr(e){if(e===or)throw Error(s(174));return e}function ur(e,t){st(lr,t),st(ar,e),st(sr,or),e=P(t),ot(sr),st(sr,e)}function dr(){ot(sr),ot(ar),ot(lr)}function hr(e){var t=cr(lr.current),n=cr(sr.current);n!==(t=R(n,e.type,t))&&(st(ar,e),st(sr,t))}function pr(e){ar.current===e&&(ot(sr),ot(ar))}var fr=it(0);function mr(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||je(n)||Ne(n)))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var gr=[];function br(){for(var e=0;e<gr.length;e++){var t=gr[e];G?t._workInProgressVersionPrimary=null:t._workInProgressVersionSecondary=null}gr.length=0}var vr=a.ReactCurrentDispatcher,yr=a.ReactCurrentBatchConfig,Sr=0,_r=null,xr=null,wr=null,kr=!1,Or=!1,Er=0,Ar=0;function Tr(){throw Error(s(321))}function Cr(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Qt(e[n],t[n]))return!1;return!0}function Mr(e,t,n,r,i,o){if(Sr=o,_r=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,vr.current=null===e||null===e.memoizedState?hi:pi,e=n(r,i),Or){o=0;do{if(Or=!1,Er=0,25<=o)throw Error(s(301));o+=1,wr=xr=null,t.updateQueue=null,vr.current=fi,e=n(r,i)}while(Or)}if(vr.current=di,t=null!==xr&&null!==xr.next,Sr=0,wr=xr=_r=null,kr=!1,t)throw Error(s(300));return e}function $r(){var e=0!==Er;return Er=0,e}function Pr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===wr?_r.memoizedState=wr=e:wr=wr.next=e,wr}function Rr(){if(null===xr){var e=_r.alternate;e=null!==e?e.memoizedState:null}else e=xr.next;var t=null===wr?_r.memoizedState:wr.next;if(null!==t)wr=t,xr=e;else{if(null===e)throw Error(s(310));e={memoizedState:(xr=e).memoizedState,baseState:xr.baseState,baseQueue:xr.baseQueue,queue:xr.queue,next:null},null===wr?_r.memoizedState=wr=e:wr=wr.next=e}return wr}function jr(e,t){return"function"==typeof t?t(e):t}function Nr(e){var t=Rr(),n=t.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=e;var r=xr,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(null!==i){o=i.next,r=r.baseState;var l=a=null,c=null,u=o;do{var d=u.lane;if((Sr&d)===d)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=h,a=r):c=c.next=h,_r.lanes|=d,Zo|=d}u=u.next}while(null!==u&&u!==o);null===c?a=r:c.next=l,Qt(r,t.memoizedState)||(ji=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{o=i.lane,_r.lanes|=o,Zo|=o,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Dr(e){var t=Rr(),n=t.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var a=i=i.next;do{o=e(o,a.action),a=a.next}while(a!==i);Qt(o,t.memoizedState)||(ji=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Ir(){}function Lr(e,t){var n=_r,r=Rr(),i=t(),o=!Qt(r.memoizedState,i);if(o&&(r.memoizedState=i,ji=!0),r=r.queue,Xr(Fr.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||null!==wr&&1&wr.memoizedState.tag){if(n.flags|=2048,qr(9,zr.bind(null,n,r,i,t),void 0,null),null===qo)throw Error(s(349));0!=(30&Sr)||Br(n,t,i)}return i}function Br(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=_r.updateQueue)?(t={lastEffect:null,stores:null},_r.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function zr(e,t,n,r){t.value=n,t.getSnapshot=r,Ur(t)&&vs(e,1,-1)}function Fr(e,t,n){return n((function(){Ur(t)&&vs(e,1,-1)}))}function Ur(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Qt(e,n)}catch(e){return!0}}function Qr(e){var t=Pr();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:jr,lastRenderedState:e},t.queue=e,e=e.dispatch=si.bind(null,_r,e),[t.memoizedState,e]}function qr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=_r.updateQueue)?(t={lastEffect:null,stores:null},_r.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Gr(){return Rr().memoizedState}function Hr(e,t,n,r){var i=Pr();_r.flags|=e,i.memoizedState=qr(1|t,n,void 0,void 0===r?null:r)}function Vr(e,t,n,r){var i=Rr();r=void 0===r?null:r;var o=void 0;if(null!==xr){var s=xr.memoizedState;if(o=s.destroy,null!==r&&Cr(r,s.deps))return void(i.memoizedState=qr(t,n,o,r))}_r.flags|=e,i.memoizedState=qr(1|t,n,o,r)}function Wr(e,t){return Hr(8390656,8,e,t)}function Xr(e,t){return Vr(2048,8,e,t)}function Yr(e,t){return Vr(4,2,e,t)}function Zr(e,t){return Vr(4,4,e,t)}function Jr(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Kr(e,t,n){return n=null!=n?n.concat([e]):null,Vr(4,4,Jr.bind(null,t,e),n)}function ei(){}function ti(e,t){var n=Rr();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Cr(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ni(e,t){var n=Rr();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Cr(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ri(e,t){var n=Mt;Mt=0!==n&&4>n?n:4,e(!0);var r=yr.transition;yr.transition={};try{e(!1),t()}finally{Mt=n,yr.transition=r}}function ii(){return Rr().memoizedState}function oi(e,t,n){var r=bs(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ai(e)?li(t,n):(ci(e,t,n),null!==(e=vs(e,r,n=gs()))&&ui(e,t,r))}function si(e,t,n){var r=bs(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ai(e))li(t,i);else{ci(e,t,i);var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,Qt(a,s))return}catch(e){}null!==(e=vs(e,r,n=gs()))&&ui(e,t,r)}}function ai(e){var t=e.alternate;return e===_r||null!==t&&t===_r}function li(e,t){Or=kr=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ci(e,t,n){null!==qo&&0!=(1&e.mode)&&0==(2&Qo)?(null===(e=t.interleaved)?(n.next=n,null===un?un=[t]:un.push(t)):(n.next=e.next,e.next=n),t.interleaved=n):(null===(e=t.pending)?n.next=n:(n.next=e.next,e.next=n),t.pending=n)}function ui(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Ct(e,n)}}var di={readContext:cn,useCallback:Tr,useContext:Tr,useEffect:Tr,useImperativeHandle:Tr,useInsertionEffect:Tr,useLayoutEffect:Tr,useMemo:Tr,useReducer:Tr,useRef:Tr,useState:Tr,useDebugValue:Tr,useDeferredValue:Tr,useTransition:Tr,useMutableSource:Tr,useSyncExternalStore:Tr,useId:Tr,unstable_isNewReconciler:!1},hi={readContext:cn,useCallback:function(e,t){return Pr().memoizedState=[e,void 0===t?null:t],e},useContext:cn,useEffect:Wr,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Hr(4194308,4,Jr.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Hr(4194308,4,e,t)},useInsertionEffect:function(e,t){return Hr(4,2,e,t)},useMemo:function(e,t){var n=Pr();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Pr();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=oi.bind(null,_r,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Pr().memoizedState=e},useState:Qr,useDebugValue:ei,useDeferredValue:function(e){var t=Qr(e),n=t[0],r=t[1];return Wr((function(){var t=yr.transition;yr.transition={};try{r(e)}finally{yr.transition=t}}),[e]),n},useTransition:function(){var e=Qr(!1),t=e[0];return e=ri.bind(null,e[1]),Pr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=_r,i=Pr();if(Un){if(void 0===n)throw Error(s(407));n=n()}else{if(n=t(),null===qo)throw Error(s(349));0!=(30&Sr)||Br(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Wr(Fr.bind(null,r,o,e),[e]),r.flags|=2048,qr(9,zr.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Pr(),t=qo.identifierPrefix;if(Un){var n=Nn;t=":"+t+"R"+(n=(jn&~(1<<32-vt(jn)-1)).toString(32)+n),0<(n=Er++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=Ar++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},pi={readContext:cn,useCallback:ti,useContext:cn,useEffect:Xr,useImperativeHandle:Kr,useInsertionEffect:Yr,useLayoutEffect:Zr,useMemo:ni,useReducer:Nr,useRef:Gr,useState:function(){return Nr(jr)},useDebugValue:ei,useDeferredValue:function(e){var t=Nr(jr),n=t[0],r=t[1];return Xr((function(){var t=yr.transition;yr.transition={};try{r(e)}finally{yr.transition=t}}),[e]),n},useTransition:function(){return[Nr(jr)[0],Rr().memoizedState]},useMutableSource:Ir,useSyncExternalStore:Lr,useId:ii,unstable_isNewReconciler:!1},fi={readContext:cn,useCallback:ti,useContext:cn,useEffect:Xr,useImperativeHandle:Kr,useInsertionEffect:Yr,useLayoutEffect:Zr,useMemo:ni,useReducer:Dr,useRef:Gr,useState:function(){return Dr(jr)},useDebugValue:ei,useDeferredValue:function(e){var t=Dr(jr),n=t[0],r=t[1];return Xr((function(){var t=yr.transition;yr.transition={};try{r(e)}finally{yr.transition=t}}),[e]),n},useTransition:function(){return[Dr(jr)[0],Rr().memoizedState]},useMutableSource:Ir,useSyncExternalStore:Lr,useId:ii,unstable_isNewReconciler:!1};function mi(e,t){try{var n="",r=t;do{n+=Zt(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i}}function gi(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var bi,vi,yi,Si,_i="function"==typeof WeakMap?WeakMap:Map;function xi(e,t,n){(n=fn(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ss||(ss=!0,as=r),gi(0,t)},n}function wi(e,t,n){(n=fn(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){gi(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){gi(0,t),"function"!=typeof r&&(null===ls?ls=new Set([this]):ls.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ki(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new _i;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Fs.bind(null,e,t,n),t.then(e,e))}function Oi(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function Ei(e,t,n,r,i){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=fn(-1,1)).tag=2,mn(n,t))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}function Ai(e){e.flags|=4}function Ti(e,t){if(null!==e&&e.child===t.child)return!0;if(0!=(16&t.flags))return!1;for(e=t.child;null!==e;){if(0!=(12854&e.flags)||0!=(12854&e.subtreeFlags))return!1;e=e.sibling}return!0}if(H)bi=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)I(e,n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},vi=function(){},yi=function(e,t,n,r,i){if((e=e.memoizedProps)!==r){var o=t.stateNode,s=cr(sr.current);n=B(o,n,e,r,i,s),(t.updateQueue=n)&&Ai(t)}},Si=function(e,t,n,r){n!==r&&Ai(t)};else if(V){bi=function(e,t,n,r){for(var i=t.child;null!==i;){if(5===i.tag){var o=i.stateNode;n&&r&&(o=Ce(o,i.type,i.memoizedProps,i)),I(e,o)}else if(6===i.tag)o=i.stateNode,n&&r&&(o=Me(o,i.memoizedProps,i)),I(e,o);else if(4!==i.tag)if(22===i.tag&&null!==i.memoizedState)null!==(o=i.child)&&(o.return=i),bi(e,i,!0,!0);else if(null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};var Ci=function(e,t,n,r){for(var i=t.child;null!==i;){if(5===i.tag){var o=i.stateNode;n&&r&&(o=Ce(o,i.type,i.memoizedProps,i)),Ee(e,o)}else if(6===i.tag)o=i.stateNode,n&&r&&(o=Me(o,i.memoizedProps,i)),Ee(e,o);else if(4!==i.tag)if(22===i.tag&&null!==i.memoizedState)null!==(o=i.child)&&(o.return=i),Ci(e,i,!0,!0);else if(null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};vi=function(e,t){var n=t.stateNode;if(!Ti(e,t)){e=n.containerInfo;var r=Oe(e);Ci(r,t,!1,!1),n.pendingChildren=r,Ai(t),Ae(e,r)}},yi=function(e,t,n,r,i){var o=e.stateNode,s=e.memoizedProps;if((e=Ti(e,t))&&s===r)t.stateNode=o;else{var a=t.stateNode,l=cr(sr.current),c=null;s!==r&&(c=B(a,n,s,r,i,l)),e&&null===c?t.stateNode=o:(o=ke(o,c,n,s,r,t,e,a),L(o,n,r,i,l)&&Ai(t),t.stateNode=o,e?Ai(t):bi(o,t,!1,!1))}},Si=function(e,t,n,r){n!==r?(e=cr(lr.current),n=cr(sr.current),t.stateNode=F(r,e,n,t),Ai(t)):t.stateNode=e.stateNode}}else vi=function(){},yi=function(){},Si=function(){};function Mi(e,t){if(!Un)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function $i(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Pi(e,t,n){var r=t.pendingProps;switch(Bn(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $i(t),null;case 1:return ht(t.type)&&pt(),$i(t),null;case 3:return r=t.stateNode,dr(),ot(ct),ot(lt),br(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Yn(t)?Ai(t):null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==qn&&(ws(qn),qn=null))),vi(e,t),$i(t),null;case 5:pr(t),n=cr(lr.current);var i=t.type;if(null!==e&&null!=t.stateNode)yi(e,t,i,r,n),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(s(166));return $i(t),null}if(e=cr(sr.current),Yn(t)){if(!W)throw Error(s(175));e=Fe(t.stateNode,t.type,t.memoizedProps,n,e,t,!Qn),t.updateQueue=e,null!==e&&Ai(t)}else{var o=D(i,r,n,e,t);bi(o,t,!1,!1),t.stateNode=o,L(o,i,r,n,e)&&Ai(t)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return $i(t),null;case 6:if(e&&null!=t.stateNode)Si(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(s(166));if(e=cr(lr.current),n=cr(sr.current),Yn(t)){if(!W)throw Error(s(176));if(e=t.stateNode,r=t.memoizedProps,(n=Ue(e,r,t,!Qn))&&null!==(i=zn))switch(o=0!=(1&i.mode),i.tag){case 3:Ye(i.stateNode.containerInfo,e,r,o);break;case 5:Ze(i.type,i.memoizedProps,i.stateNode,e,r,o)}n&&Ai(t)}else t.stateNode=F(r,e,n,t)}return $i(t),null;case 13:if(ot(fr),r=t.memoizedState,Un&&null!==Fn&&0!=(1&t.mode)&&0==(128&t.flags)){for(e=Fn;e;)e=Ie(e);return Zn(),t.flags|=98560,t}if(null!==r&&null!==r.dehydrated){if(r=Yn(t),null===e){if(!r)throw Error(s(318));if(!W)throw Error(s(344));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(s(317));Qe(e,t)}else Zn(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;return $i(t),null}return null!==qn&&(ws(qn),qn=null),0!=(128&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?Yn(t):n=null!==e.memoizedState,r&&!n&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&fr.current)?0===Xo&&(Xo=3):$s())),null!==t.updateQueue&&(t.flags|=4),$i(t),null);case 4:return dr(),vi(e,t),null===e&&Y(t.stateNode.containerInfo),$i(t),null;case 10:return sn(t.type._context),$i(t),null;case 17:return ht(t.type)&&pt(),$i(t),null;case 19:if(ot(fr),null===(i=t.memoizedState))return $i(t),null;if(r=0!=(128&t.flags),null===(o=i.rendering))if(r)Mi(i,!1);else{if(0!==Xo||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(o=mr(e))){for(t.flags|=128,Mi(i,!1),null!==(e=o.updateQueue)&&(t.updateQueue=e,t.flags|=4),t.subtreeFlags=0,e=n,r=t.child;null!==r;)i=e,(n=r).flags&=14680066,null===(o=n.alternate)?(n.childLanes=0,n.lanes=i,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=o.childLanes,n.lanes=o.lanes,n.child=o.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=o.memoizedProps,n.memoizedState=o.memoizedState,n.updateQueue=o.updateQueue,n.type=o.type,i=o.dependencies,n.dependencies=null===i?null:{lanes:i.lanes,firstContext:i.firstContext}),r=r.sibling;return st(fr,1&fr.current|2),t.child}e=e.sibling}null!==i.tail&&Dt()>rs&&(t.flags|=128,r=!0,Mi(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=mr(o))){if(t.flags|=128,r=!0,null!==(e=e.updateQueue)&&(t.updateQueue=e,t.flags|=4),Mi(i,!0),null===i.tail&&"hidden"===i.tailMode&&!o.alternate&&!Un)return $i(t),null}else 2*Dt()-i.renderingStartTime>rs&&1073741824!==n&&(t.flags|=128,r=!0,Mi(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(null!==(e=i.last)?e.sibling=o:t.child=o,i.last=o)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Dt(),t.sibling=null,e=fr.current,st(fr,r?1&e|2:1&e),t):($i(t),null);case 22:case 23:return As(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&Vo)&&($i(t),H&&6&t.subtreeFlags&&(t.flags|=8192)):$i(t),null;case 24:case 25:return null}throw Error(s(156,t.tag))}var Ri=a.ReactCurrentOwner,ji=!1;function Ni(e,t,n,r){t.child=null===e?ir(t,null,n,r):rr(t,e.child,n,r)}function Di(e,t,n,r,i){n=n.render;var o=t.ref;return ln(t,i),r=Mr(e,t,n,r,o,i),n=$r(),null===e||ji?(Un&&n&&Ln(t),t.flags|=1,Ni(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,no(e,t,i))}function Ii(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||Ws(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Ys(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Li(e,t,o,r,i))}if(o=e.child,0==(e.lanes&i)){var s=o.memoizedProps;if((n=null!==(n=n.compare)?n:Yt)(s,r)&&e.ref===t.ref)return no(e,t,i)}return t.flags|=1,(e=Xs(o,r)).ref=t.ref,e.return=t,t.child=e}function Li(e,t,n,r,i){if(null!==e&&Yt(e.memoizedProps,r)&&e.ref===t.ref){if(ji=!1,0==(e.lanes&i))return t.lanes=e.lanes,no(e,t,i);0!=(131072&e.flags)&&(ji=!0)}return Fi(e,t,n,r,i)}function Bi(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null},st(Wo,Vo),Vo|=n;else{if(0==(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null},t.updateQueue=null,st(Wo,Vo),Vo|=e,null;t.memoizedState={baseLanes:0,cachePool:null},r=null!==o?o.baseLanes:n,st(Wo,Vo),Vo|=r}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,st(Wo,Vo),Vo|=r;return Ni(e,t,i,n),t.child}function zi(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Fi(e,t,n,r,i){var o=ht(n)?ut:lt.current;return o=dt(t,o),ln(t,i),n=Mr(e,t,n,r,o,i),r=$r(),null===e||ji?(Un&&r&&Ln(t),t.flags|=1,Ni(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,no(e,t,i))}function Ui(e,t,n,r,i){if(ht(n)){var o=!0;gt(t)}else o=!1;if(ln(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),kn(t,n,r),En(t,n,r,i),r=!0;else if(null===e){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,c=n.contextType;"object"==typeof c&&null!==c?c=cn(c):c=dt(t,c=ht(n)?ut:lt.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof s.getSnapshotBeforeUpdate;d||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==r||l!==c)&&On(t,s,r,c),dn=!1;var h=t.memoizedState;s.state=h,vn(t,r,s,i),l=t.memoizedState,a!==r||h!==l||ct.current||dn?("function"==typeof u&&(_n(t,n,u,r),l=t.memoizedState),(a=dn||wn(t,n,a,r,h,l,c))?(d||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||("function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"==typeof s.componentDidMount&&(t.flags|=4194308)):("function"==typeof s.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=c,r=a):("function"==typeof s.componentDidMount&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,pn(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Jt(t.type,a),s.props=c,d=t.pendingProps,h=s.context,"object"==typeof(l=n.contextType)&&null!==l?l=cn(l):l=dt(t,l=ht(n)?ut:lt.current);var p=n.getDerivedStateFromProps;(u="function"==typeof p||"function"==typeof s.getSnapshotBeforeUpdate)||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==d||h!==l)&&On(t,s,r,l),dn=!1,h=t.memoizedState,s.state=h,vn(t,r,s,i);var f=t.memoizedState;a!==d||h!==f||ct.current||dn?("function"==typeof p&&(_n(t,n,p,r),f=t.memoizedState),(c=dn||wn(t,n,c,r,h,f,l)||!1)?(u||"function"!=typeof s.UNSAFE_componentWillUpdate&&"function"!=typeof s.componentWillUpdate||("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(r,f,l),"function"==typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(r,f,l)),"function"==typeof s.componentDidUpdate&&(t.flags|=4),"function"==typeof s.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof s.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=f),s.props=r,s.state=f,s.context=l,r=c):("function"!=typeof s.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Qi(e,t,n,r,o,i)}function Qi(e,t,n,r,i,o){zi(e,t);var s=0!=(128&t.flags);if(!r&&!s)return i&&bt(t,n,!1),no(e,t,o);r=t.stateNode,Ri.current=t;var a=s&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&s?(t.child=rr(t,e.child,null,o),t.child=rr(t,null,a,o)):Ni(e,t,a,o),t.memoizedState=r.state,i&&bt(t,n,!0),t.child}function qi(e){var t=e.stateNode;t.pendingContext?ft(0,t.pendingContext,t.pendingContext!==t.context):t.context&&ft(0,t.context,!1),ur(e,t.containerInfo)}function Gi(e,t,n,r,i){return Zn(),Jn(i),t.flags|=256,Ni(e,t,n,r),t.child}var Hi={dehydrated:null,treeContext:null,retryLane:0};function Vi(e){return{baseLanes:e,cachePool:null}}function Wi(e,t,n){var r,i=t.pendingProps,o=fr.current,a=!1,l=0!=(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!=(2&o)),r?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),st(fr,1&o),null===e)return Wn(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:Ne(e)?t.lanes=8:t.lanes=1073741824,null):(o=i.children,e=i.fallback,a?(i=t.mode,a=t.child,o={mode:"hidden",children:o},0==(1&i)&&null!==a?(a.childLanes=0,a.pendingProps=o):a=Js(o,i,0,null),e=Zs(e,i,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Vi(n),t.memoizedState=Hi,e):Xi(t,o));if(null!==(o=e.memoizedState)){if(null!==(r=o.dehydrated)){if(l)return 256&t.flags?(t.flags&=-257,Ji(e,t,n,Error(s(422)))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=i.fallback,o=t.mode,i=Js({mode:"visible",children:i.children},o,0,null),(a=Zs(a,o,n,null)).flags|=2,i.return=t,a.return=t,i.sibling=a,t.child=i,0!=(1&t.mode)&&rr(t,e.child,null,n),t.child.memoizedState=Vi(n),t.memoizedState=Hi,a);if(0==(1&t.mode))t=Ji(e,t,n,null);else if(Ne(r))t=Ji(e,t,n,Error(s(419)));else if(i=0!=(n&e.childLanes),ji||i){if(null!==(i=qo)){switch(n&-n){case 4:a=2;break;case 16:a=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}0!==(i=0!=(a&(i.suspendedLanes|n))?0:a)&&i!==o.retryLane&&(o.retryLane=i,vs(e,i,-1))}$s(),t=Ji(e,t,n,Error(s(421)))}else je(r)?(t.flags|=128,t.child=e.child,t=Qs.bind(null,e),De(r,t),t=null):(n=o.treeContext,W&&(Fn=ze(r),zn=t,Un=!0,qn=null,Qn=!1,null!==n&&($n[Pn++]=jn,$n[Pn++]=Nn,$n[Pn++]=Rn,jn=n.id,Nn=n.overflow,Rn=t)),(t=Xi(t,t.pendingProps.children)).flags|=4096);return t}return a?(i=Zi(e,t,i.children,i.fallback,n),a=t.child,o=e.child.memoizedState,a.memoizedState=null===o?Vi(n):{baseLanes:o.baseLanes|n,cachePool:null},a.childLanes=e.childLanes&~n,t.memoizedState=Hi,i):(n=Yi(e,t,i.children,n),t.memoizedState=null,n)}return a?(i=Zi(e,t,i.children,i.fallback,n),a=t.child,o=e.child.memoizedState,a.memoizedState=null===o?Vi(n):{baseLanes:o.baseLanes|n,cachePool:null},a.childLanes=e.childLanes&~n,t.memoizedState=Hi,i):(n=Yi(e,t,i.children,n),t.memoizedState=null,n)}function Xi(e,t){return(t=Js({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Yi(e,t,n,r){var i=e.child;return e=i.sibling,n=Xs(i,{mode:"visible",children:n}),0==(1&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n}function Zi(e,t,n,r,i){var o=t.mode,s=(e=e.child).sibling,a={mode:"hidden",children:n};return 0==(1&o)&&t.child!==e?((n=t.child).childLanes=0,n.pendingProps=a,t.deletions=null):(n=Xs(e,a)).subtreeFlags=14680064&e.subtreeFlags,null!==s?r=Xs(s,r):(r=Zs(r,o,i,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Ji(e,t,n,r){return null!==r&&Jn(r),rr(t,e.child,null,n),(e=Xi(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Ki(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),an(e.return,t,n)}function eo(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function to(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Ni(e,t,r.children,n),0!=(2&(r=fr.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ki(e,n,t);else if(19===e.tag)Ki(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(st(fr,r),0==(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===mr(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),eo(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===mr(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}eo(t,!0,n,null,o);break;case"together":eo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function no(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Zo|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(s(153));if(null!==t.child){for(n=Xs(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Xs(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function ro(e,t){switch(Bn(t),t.tag){case 1:return ht(t.type)&&pt(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return dr(),ot(ct),ot(lt),br(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return pr(t),null;case 13:if(ot(fr),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(s(340));Zn()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return ot(fr),null;case 4:return dr(),null;case 10:return sn(t.type._context),null;case 22:case 23:return As(),null;case 24:default:return null}}var io=!1,oo=!1,so="function"==typeof WeakSet?WeakSet:Set,ao=null;function lo(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){zs(e,t,n)}else n.current=null}function co(e,t,n){try{n()}catch(n){zs(e,t,n)}}var uo=!1;function ho(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&co(t,n,o)}i=i.next}while(i!==r)}}function po(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function fo(e){var t=e.ref;if(null!==t){var n=e.stateNode;switch(e.tag){case 5:e=$(n);break;default:e=n}"function"==typeof t?t(e):t.current=e}}function mo(e,t,n){if(Ut&&"function"==typeof Ut.onCommitFiberUnmount)try{Ut.onCommitFiberUnmount(Ft,t)}catch(e){}switch(t.tag){case 0:case 11:case 14:case 15:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e=e.next;do{var i=r,o=i.destroy;i=i.tag,void 0!==o&&(0!=(2&i)||0!=(4&i))&&co(t,n,o),r=r.next}while(r!==e)}break;case 1:if(lo(t,n),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){zs(t,n,e)}break;case 5:lo(t,n);break;case 4:H?_o(e,t,n):V&&V&&(t=t.stateNode.containerInfo,n=Oe(t),Te(t,n))}}function go(e,t,n){for(var r=t;;)if(mo(e,r,n),null===r.child||H&&4===r.tag){if(r===t)break;for(;null===r.sibling;){if(null===r.return||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}else r.child.return=r,r=r.child}function bo(e){var t=e.alternate;null!==t&&(e.alternate=null,bo(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&J(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function vo(e){return 5===e.tag||3===e.tag||4===e.tag}function yo(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||vo(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function So(e){if(H){e:{for(var t=e.return;null!==t;){if(vo(t))break e;t=t.return}throw Error(s(160))}var n=t;switch(n.tag){case 5:t=n.stateNode,32&n.flags&&(ve(t),n.flags&=-33),function e(t,n,r){var i=t.tag;if(5===i||6===i)t=t.stateNode,n?fe(r,t,n):ce(r,t);else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n=yo(e),t);break;case 3:case 4:t=n.stateNode.containerInfo,function e(t,n,r){var i=t.tag;if(5===i||6===i)t=t.stateNode,n?me(r,t,n):ue(r,t);else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n=yo(e),t);break;default:throw Error(s(161))}}}function _o(e,t,n){for(var r,i,o=t,a=!1;;){if(!a){a=o.return;e:for(;;){if(null===a)throw Error(s(160));switch(r=a.stateNode,a.tag){case 5:i=!1;break e;case 3:case 4:r=r.containerInfo,i=!0;break e}a=a.return}a=!0}if(5===o.tag||6===o.tag)go(e,o,n),i?be(r,o.stateNode):ge(r,o.stateNode);else if(18===o.tag)i?We(r,o.stateNode):Ve(r,o.stateNode);else if(4===o.tag){if(null!==o.child){r=o.stateNode.containerInfo,i=!0,o.child.return=o,o=o.child;continue}}else if(mo(e,o,n),null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;4===(o=o.return).tag&&(a=!1)}o.sibling.return=o.return,o=o.sibling}}function xo(e,t){if(H){switch(t.tag){case 0:case 11:case 14:case 15:return ho(3,t,t.return),po(3,t),void ho(5,t,t.return);case 1:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps;e=null!==e?e.memoizedProps:r;var i=t.type,o=t.updateQueue;t.updateQueue=null,null!==o&&pe(n,o,i,e,r,t)}return;case 6:if(null===t.stateNode)throw Error(s(162));return n=t.memoizedProps,void de(t.stateNode,null!==e?e.memoizedProps:n,n);case 3:return void(W&&null!==e&&e.memoizedState.isDehydrated&&Ge(t.stateNode.containerInfo));case 12:return;case 13:case 19:return void wo(t);case 17:return}throw Error(s(163))}switch(t.tag){case 0:case 11:case 14:case 15:return ho(3,t,t.return),po(3,t),void ho(5,t,t.return);case 12:return;case 13:case 19:return void wo(t);case 3:W&&null!==e&&e.memoizedState.isDehydrated&&Ge(t.stateNode.containerInfo);break;case 22:case 23:return}e:if(V){switch(t.tag){case 1:case 5:case 6:break e;case 3:case 4:t=t.stateNode,Te(t.containerInfo,t.pendingChildren);break e}throw Error(s(163))}}function wo(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new so),t.forEach((function(t){var r=qs.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function ko(e,t,n){ao=e,function e(t,n,r){for(var i=0!=(1&t.mode);null!==ao;){var o=ao,s=o.child;if(22===o.tag&&i){var a=null!==o.memoizedState||io;if(!a){var l=o.alternate,c=null!==l&&null!==l.memoizedState||oo;l=io;var u=oo;if(io=a,(oo=c)&&!u)for(ao=o;null!==ao;)c=(a=ao).child,22===a.tag&&null!==a.memoizedState?Ao(o):null!==c?(c.return=a,ao=c):Ao(o);for(;null!==s;)ao=s,e(s,n,r),s=s.sibling;ao=o,io=l,oo=u}Oo(t)}else 0!=(8772&o.subtreeFlags)&&null!==s?(s.return=o,ao=s):Oo(t)}}(e,t,n)}function Oo(e){for(;null!==ao;){var t=ao;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:oo||po(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!oo)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Jt(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&yn(t,o,r);break;case 3:var a=t.updateQueue;if(null!==a){if(n=null,null!==t.child)switch(t.child.tag){case 5:n=$(t.child.stateNode);break;case 1:n=t.child.stateNode}yn(t,a,n)}break;case 5:var l=t.stateNode;null===n&&4&t.flags&&he(l,t.type,t.memoizedProps,t);break;case 6:case 4:case 12:break;case 13:if(W&&null===t.memoizedState){var c=t.alternate;if(null!==c){var u=c.memoizedState;if(null!==u){var d=u.dehydrated;null!==d&&He(d)}}}break;case 19:case 17:case 21:case 22:case 23:break;default:throw Error(s(163))}oo||512&t.flags&&fo(t)}catch(e){zs(t,t.return,e)}}if(t===e){ao=null;break}if(null!==(n=t.sibling)){n.return=t.return,ao=n;break}ao=t.return}}function Eo(e){for(;null!==ao;){var t=ao;if(t===e){ao=null;break}var n=t.sibling;if(null!==n){n.return=t.return,ao=n;break}ao=t.return}}function Ao(e){for(;null!==ao;){var t=ao;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{po(4,t)}catch(e){zs(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){zs(t,i,e)}}var o=t.return;try{fo(t)}catch(e){zs(t,o,e)}break;case 5:var s=t.return;try{fo(t)}catch(e){zs(t,s,e)}}}catch(e){zs(t,t.return,e)}if(t===e){ao=null;break}var a=t.sibling;if(null!==a){a.return=t.return,ao=a;break}ao=t.return}}var To=0,Co=1,Mo=2,$o=3,Po=4;if("function"==typeof Symbol&&Symbol.for){var Ro=Symbol.for;To=Ro("selector.component"),Co=Ro("selector.has_pseudo_class"),Mo=Ro("selector.role"),$o=Ro("selector.test_id"),Po=Ro("selector.text")}function jo(e){var t=X(e);if(null!=t){if("string"!=typeof t.memoizedProps["data-testname"])throw Error(s(364));return t}if(null===(e=ne(e)))throw Error(s(362));return e.stateNode.current}function No(e,t){switch(t.$$typeof){case To:if(e.type===t.value)return!0;break;case Co:e:{t=t.value,e=[e,0];for(var n=0;n<e.length;){var r=e[n++],i=e[n++],o=t[i];if(5!==r.tag||!oe(r)){for(;null!=o&&No(r,o);)o=t[++i];if(i===t.length){t=!0;break e}for(r=r.child;null!==r;)e.push(r,i),r=r.sibling}}t=!1}return t;case Mo:if(5===e.tag&&se(e.stateNode,t.value))return!0;break;case Po:if((5===e.tag||6===e.tag)&&(null!==(e=ie(e))&&0<=e.indexOf(t.value)))return!0;break;case $o:if(5===e.tag&&("string"==typeof(e=e.memoizedProps["data-testname"])&&e.toLowerCase()===t.value.toLowerCase()))return!0;break;default:throw Error(s(365))}return!1}function Do(e){switch(e.$$typeof){case To:return"<"+(w(e.value)||"Unknown")+">";case Co:return":has("+(Do(e)||"")+")";case Mo:return'[role="'+e.value+'"]';case Po:return'"'+e.value+'"';case $o:return'[data-testname="'+e.value+'"]';default:throw Error(s(365))}}function Io(e,t){var n=[];e=[e,0];for(var r=0;r<e.length;){var i=e[r++],o=e[r++],s=t[o];if(5!==i.tag||!oe(i)){for(;null!=s&&No(i,s);)s=t[++o];if(o===t.length)n.push(i);else for(i=i.child;null!==i;)e.push(i,o),i=i.sibling}}return n}function Lo(e,t){if(!te)throw Error(s(363));e=Io(e=jo(e),t),t=[],e=Array.from(e);for(var n=0;n<e.length;){var r=e[n++];if(5===r.tag)oe(r)||t.push(r.stateNode);else for(r=r.child;null!==r;)e.push(r),r=r.sibling}return t}var Bo=Math.ceil,zo=a.ReactCurrentDispatcher,Fo=a.ReactCurrentOwner,Uo=a.ReactCurrentBatchConfig,Qo=0,qo=null,Go=null,Ho=0,Vo=0,Wo=it(0),Xo=0,Yo=null,Zo=0,Jo=0,Ko=0,es=null,ts=null,ns=0,rs=1/0;function is(){rs=Dt()+500}var os,ss=!1,as=null,ls=null,cs=!1,us=null,ds=0,hs=0,ps=null,fs=-1,ms=0;function gs(){return 0!=(6&Qo)?Dt():-1!==fs?fs:fs=Dt()}function bs(e){return 0==(1&e.mode)?1:0!=(2&Qo)&&0!==Ho?Ho&-Ho:null!==Xt.transition?(0===ms&&(e=_t,0==(4194240&(_t<<=1))&&(_t=64),ms=e),ms):0!==(e=Mt)?e:Z()}function vs(e,t,n){if(50<hs)throw hs=0,ps=null,Error(s(185));var r=ys(e,t);return null===r?null:(Tt(r,t,n),0!=(2&Qo)&&r===qo||(r===qo&&(0==(2&Qo)&&(Jo|=t),4===Xo&&ks(r,Ho)),Ss(r,n),1===t&&0===Qo&&0==(1&e.mode)&&(is(),Gt&&Wt())),r)}function ys(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function Ss(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-vt(o),a=1<<s,l=i[s];-1===l?0!=(a&n)&&0==(a&r)||(i[s]=Ot(a,t)):l<=t&&(e.expiredLanes|=a),o&=~a}}(e,t);var r=kt(e,e===qo?Ho:0);if(0===r)null!==n&&Rt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Rt(n),1===t)0===e.tag?function(e){Gt=!0,Vt(e)}(Os.bind(null,e)):Vt(Os.bind(null,e)),K?ee((function(){0===Qo&&Wt()})):Pt(It,Wt),n=null;else{switch($t(r)){case 1:n=It;break;case 4:n=Lt;break;case 16:n=Bt;break;case 536870912:n=zt;break;default:n=Bt}n=Gs(n,_s.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function _s(e,t){if(fs=-1,ms=0,0!=(6&Qo))throw Error(s(327));var n=e.callbackNode;if(Ls()&&e.callbackNode!==n)return null;var r=kt(e,e===qo?Ho:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=Ps(e,r);else{t=r;var i=Qo;Qo|=2;var o=Ms();for(qo===e&&Ho===t||(is(),Ts(e,t));;)try{js();break}catch(t){Cs(e,t)}rn(),zo.current=o,Qo=i,null!==Go?t=0:(qo=null,Ho=0,t=Xo)}if(0!==t){if(2===t&&(0!==(i=Et(e))&&(r=i,t=xs(e,i))),1===t)throw n=Yo,Ts(e,0),ks(e,r),Ss(e,Dt()),n;if(6===t)ks(e,r);else{if(i=e.current.alternate,0==(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!Qt(o(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)&&(2===(t=Ps(e,r))&&(0!==(o=Et(e))&&(r=o,t=xs(e,o))),1===t))throw n=Yo,Ts(e,0),ks(e,r),Ss(e,Dt()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(s(345));case 2:Is(e,ts);break;case 3:if(ks(e,r),(130023424&r)===r&&10<(t=ns+500-Dt())){if(0!==kt(e,0))break;if(((i=e.suspendedLanes)&r)!==r){gs(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=U(Is.bind(null,e,ts),t);break}Is(e,ts);break;case 4:if(ks(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-vt(r);o=1<<a,(a=t[a])>i&&(i=a),r&=~o}if(r=i,10<(r=(120>(r=Dt()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Bo(r/1960))-r)){e.timeoutHandle=U(Is.bind(null,e,ts),r);break}Is(e,ts);break;case 5:Is(e,ts);break;default:throw Error(s(329))}}}return Ss(e,Dt()),e.callbackNode===n?_s.bind(null,e):null}function xs(e,t){var n=es;return e.current.memoizedState.isDehydrated&&(Ts(e,t).flags|=256),2!==(e=Ps(e,t))&&(t=ts,ts=n,null!==t&&ws(t)),e}function ws(e){null===ts?ts=e:ts.push.apply(ts,e)}function ks(e,t){for(t&=~Ko,t&=~Jo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-vt(t),r=1<<n;e[n]=-1,t&=~r}}function Os(e){if(0!=(6&Qo))throw Error(s(327));Ls();var t=kt(e,0);if(0==(1&t))return Ss(e,Dt()),null;var n=Ps(e,t);if(0!==e.tag&&2===n){var r=Et(e);0!==r&&(t=r,n=xs(e,r))}if(1===n)throw n=Yo,Ts(e,0),ks(e,t),Ss(e,Dt()),n;if(6===n)throw Error(s(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Is(e,ts),Ss(e,Dt()),null}function Es(e){null!==us&&0===us.tag&&0==(6&Qo)&&Ls();var t=Qo;Qo|=1;var n=Uo.transition,r=Mt;try{if(Uo.transition=null,Mt=1,e)return e()}finally{Mt=r,Uo.transition=n,0==(6&(Qo=t))&&Wt()}}function As(){Vo=Wo.current,ot(Wo)}function Ts(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==q&&(e.timeoutHandle=q,Q(n)),null!==Go)for(n=Go.return;null!==n;){var r=n;switch(Bn(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&pt();break;case 3:dr(),ot(ct),ot(lt),br();break;case 5:pr(r);break;case 4:dr();break;case 13:case 19:ot(fr);break;case 10:sn(r.type._context);break;case 22:case 23:As()}n=n.return}if(qo=e,Go=e=Xs(e.current,null),Ho=Vo=t,Xo=0,Yo=null,Ko=Jo=Zo=0,ts=es=null,null!==un){for(t=0;t<un.length;t++)if(null!==(r=(n=un[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var s=o.next;o.next=i,r.next=s}n.pending=r}un=null}return e}function Cs(e,t){for(;;){var n=Go;try{if(rn(),vr.current=di,kr){for(var r=_r.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}kr=!1}if(Sr=0,wr=xr=_r=null,Or=!1,Er=0,Fo.current=null,null===n||null===n.return){Xo=1,Yo=t,Go=null;break}e:{var o=e,a=n.return,l=n,c=t;if(t=Ho,l.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var u=c,d=l,h=d.tag;if(0==(1&d.mode)&&(0===h||11===h||15===h)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var f=Oi(a);if(null!==f){f.flags&=-257,Ei(f,a,l,0,t),1&f.mode&&ki(o,u,t),c=u;var m=(t=f).updateQueue;if(null===m){var g=new Set;g.add(c),t.updateQueue=g}else m.add(c);break e}if(0==(1&t)){ki(o,u,t),$s();break e}c=Error(s(426))}else if(Un&&1&l.mode){var b=Oi(a);if(null!==b){0==(65536&b.flags)&&(b.flags|=256),Ei(b,a,l,0,t),Jn(c);break e}}o=c,4!==Xo&&(Xo=2),null===es?es=[o]:es.push(o),c=mi(c,l),l=a;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t,bn(l,xi(0,c,t));break e;case 1:o=c;var v=l.type,y=l.stateNode;if(0==(128&l.flags)&&("function"==typeof v.getDerivedStateFromError||null!==y&&"function"==typeof y.componentDidCatch&&(null===ls||!ls.has(y)))){l.flags|=65536,t&=-t,l.lanes|=t,bn(l,wi(l,o,t));break e}}l=l.return}while(null!==l)}Ds(n)}catch(e){t=e,Go===n&&null!==n&&(Go=n=n.return);continue}break}}function Ms(){var e=zo.current;return zo.current=di,null===e?di:e}function $s(){0!==Xo&&3!==Xo&&2!==Xo||(Xo=4),null===qo||0==(268435455&Zo)&&0==(268435455&Jo)||ks(qo,Ho)}function Ps(e,t){var n=Qo;Qo|=2;var r=Ms();for(qo===e&&Ho===t||Ts(e,t);;)try{Rs();break}catch(t){Cs(e,t)}if(rn(),Qo=n,zo.current=r,null!==Go)throw Error(s(261));return qo=null,Ho=0,Xo}function Rs(){for(;null!==Go;)Ns(Go)}function js(){for(;null!==Go&&!jt();)Ns(Go)}function Ns(e){var t=os(e.alternate,e,Vo);e.memoizedProps=e.pendingProps,null===t?Ds(e):Go=t,Fo.current=null}function Ds(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=Pi(n,t,Vo)))return void(Go=n)}else{if(null!==(n=ro(n,t)))return n.flags&=32767,void(Go=n);if(null===e)return Xo=6,void(Go=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Go=t);Go=t=e}while(null!==t);0===Xo&&(Xo=5)}function Is(e,t){var n=Mt,r=Uo.transition;try{Uo.transition=null,Mt=1,function(e,t,n){do{Ls()}while(null!==us);if(0!=(6&Qo))throw Error(s(327));var r=e.finishedWork,i=e.finishedLanes;if(null===r)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(s(177));e.callbackNode=null,e.callbackPriority=0;var o=r.lanes|r.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-vt(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,o),e===qo&&(Go=qo=null,Ho=0),0==(2064&r.subtreeFlags)&&0==(2064&r.flags)||cs||(cs=!0,Gs(Bt,(function(){return Ls(),null}))),o=0!=(15990&r.flags),0!=(15990&r.subtreeFlags)||o){o=Uo.transition,Uo.transition=null;var a=Mt;Mt=1;var l=Qo;Qo|=4,Fo.current=null,function(e,t){for(j(e.containerInfo),ao=t;null!==ao;)if(t=(e=ao).child,0!=(1028&e.subtreeFlags)&&null!==t)t.return=e,ao=t;else for(;null!==ao;){e=ao;try{var n=e.alternate;if(0!=(1024&e.flags))switch(e.tag){case 0:case 11:case 15:break;case 1:if(null!==n){var r=n.memoizedProps,i=n.memoizedState,o=e.stateNode,a=o.getSnapshotBeforeUpdate(e.elementType===e.type?r:Jt(e.type,r),i);o.__reactInternalSnapshotBeforeUpdate=a}break;case 3:H&&we(e.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(t){zs(e,e.return,t)}if(null!==(t=e.sibling)){t.return=e.return,ao=t;break}ao=e.return}n=uo,uo=!1}(e,r),function(e,t){for(ao=t;null!==ao;){var n=(t=ao).deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e;H?_o(o,i,t):go(o,i,t);var s=i.alternate;null!==s&&(s.return=null),i.return=null}catch(e){zs(i,t,e)}}if(n=t.child,0!=(12854&t.subtreeFlags)&&null!==n)n.return=t,ao=n;else for(;null!==ao;){t=ao;try{var a=t.flags;if(32&a&&H&&ve(t.stateNode),512&a){var l=t.alternate;if(null!==l){var c=l.ref;null!==c&&("function"==typeof c?c(null):c.current=null)}}if(8192&a)switch(t.tag){case 13:if(null!==t.memoizedState){var u=t.alternate;null!==u&&null!==u.memoizedState||(ns=Dt())}break;case 22:var d=null!==t.memoizedState,h=t.alternate,p=null!==h&&null!==h.memoizedState;if(n=t,H)e:if(r=n,i=d,o=null,H)for(var f=r;;){if(5===f.tag){if(null===o){o=f;var m=f.stateNode;i?ye(m):_e(f.stateNode,f.memoizedProps)}}else if(6===f.tag){if(null===o){var g=f.stateNode;i?Se(g):xe(g,f.memoizedProps)}}else if((22!==f.tag&&23!==f.tag||null===f.memoizedState||f===r)&&null!==f.child){f.child.return=f,f=f.child;continue}if(f===r)break;for(;null===f.sibling;){if(null===f.return||f.return===r)break e;o===f&&(o=null),f=f.return}o===f&&(o=null),f.sibling.return=f.return,f=f.sibling}if(d&&!p&&0!=(1&n.mode)){ao=n;for(var b=n.child;null!==b;){for(n=ao=b;null!==ao;){var v=(r=ao).child;switch(r.tag){case 0:case 11:case 14:case 15:ho(4,r,r.return);break;case 1:lo(r,r.return);var y=r.stateNode;if("function"==typeof y.componentWillUnmount){var S=r.return;try{y.props=r.memoizedProps,y.state=r.memoizedState,y.componentWillUnmount()}catch(e){zs(r,S,e)}}break;case 5:lo(r,r.return);break;case 22:if(null!==r.memoizedState){Eo(n);continue}}null!==v?(v.return=r,ao=v):Eo(n)}b=b.sibling}}}switch(4102&a){case 2:So(t),t.flags&=-3;break;case 6:So(t),t.flags&=-3,xo(t.alternate,t);break;case 4096:t.flags&=-4097;break;case 4100:t.flags&=-4097,xo(t.alternate,t);break;case 4:xo(t.alternate,t)}}catch(e){zs(t,t.return,e)}if(null!==(n=t.sibling)){n.return=t.return,ao=n;break}ao=t.return}}}(e,r),N(e.containerInfo),e.current=r,ko(r,e,i),Nt(),Qo=l,Mt=a,Uo.transition=o}else e.current=r;if(cs&&(cs=!1,us=e,ds=i),0===(o=e.pendingLanes)&&(ls=null),function(e){if(Ut&&"function"==typeof Ut.onCommitFiberRoot)try{Ut.onCommitFiberRoot(Ft,e,void 0,128==(128&e.current.flags))}catch(e){}}(r.stateNode),Ss(e,Dt()),null!==t)for(n=e.onRecoverableError,r=0;r<t.length;r++)n(t[r]);if(ss)throw ss=!1,e=as,as=null,e;0!=(1&ds)&&0!==e.tag&&Ls(),0!=(1&(o=e.pendingLanes))?e===ps?hs++:(hs=0,ps=e):hs=0,Wt()}(e,t,n)}finally{Uo.transition=r,Mt=n}return null}function Ls(){if(null!==us){var e=$t(ds),t=Uo.transition,n=Mt;try{if(Uo.transition=null,Mt=16>e?16:e,null===us)var r=!1;else{if(e=us,us=null,ds=0,0!=(6&Qo))throw Error(s(331));var i=Qo;for(Qo|=4,ao=e.current;null!==ao;){var o=ao,a=o.child;if(0!=(16&ao.flags)){var l=o.deletions;if(null!==l){for(var c=0;c<l.length;c++){var u=l[c];for(ao=u;null!==ao;){var d=ao;switch(d.tag){case 0:case 11:case 15:ho(8,d,o)}var h=d.child;if(null!==h)h.return=d,ao=h;else for(;null!==ao;){var p=(d=ao).sibling,f=d.return;if(bo(d),d===u){ao=null;break}if(null!==p){p.return=f,ao=p;break}ao=f}}}var m=o.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var b=g.sibling;g.sibling=null,g=b}while(null!==g)}}ao=o}}if(0!=(2064&o.subtreeFlags)&&null!==a)a.return=o,ao=a;else e:for(;null!==ao;){if(0!=(2048&(o=ao).flags))switch(o.tag){case 0:case 11:case 15:ho(9,o,o.return)}var v=o.sibling;if(null!==v){v.return=o.return,ao=v;break e}ao=o.return}}var y=e.current;for(ao=y;null!==ao;){var S=(a=ao).child;if(0!=(2064&a.subtreeFlags)&&null!==S)S.return=a,ao=S;else e:for(a=y;null!==ao;){if(0!=(2048&(l=ao).flags))try{switch(l.tag){case 0:case 11:case 15:po(9,l)}}catch(e){zs(l,l.return,e)}if(l===a){ao=null;break e}var _=l.sibling;if(null!==_){_.return=l.return,ao=_;break e}ao=l.return}}if(Qo=i,Wt(),Ut&&"function"==typeof Ut.onPostCommitFiberRoot)try{Ut.onPostCommitFiberRoot(Ft,e)}catch(e){}r=!0}return r}finally{Mt=n,Uo.transition=t}}return!1}function Bs(e,t,n){mn(e,t=xi(0,t=mi(n,t),1)),t=gs(),null!==(e=ys(e,1))&&(Tt(e,1,t),Ss(e,t))}function zs(e,t,n){if(3===e.tag)Bs(e,e,n);else for(;null!==t;){if(3===t.tag){Bs(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===ls||!ls.has(r))){mn(t,e=wi(t,e=mi(n,e),1)),e=gs(),null!==(t=ys(t,1))&&(Tt(t,1,e),Ss(t,e));break}}t=t.return}}function Fs(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=gs(),e.pingedLanes|=e.suspendedLanes&n,qo===e&&(Ho&n)===n&&(4===Xo||3===Xo&&(130023424&Ho)===Ho&&500>Dt()-ns?Ts(e,0):Ko|=n),Ss(e,t)}function Us(e,t){0===t&&(0==(1&e.mode)?t=1:(t=xt,0==(130023424&(xt<<=1))&&(xt=4194304)));var n=gs();null!==(e=ys(e,t))&&(Tt(e,t,n),Ss(e,n))}function Qs(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Us(e,n)}function qs(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(s(314))}null!==r&&r.delete(t),Us(e,n)}function Gs(e,t){return Pt(e,t)}function Hs(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vs(e,t,n,r){return new Hs(e,t,n,r)}function Ws(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Xs(e,t){var n=e.alternate;return null===n?((n=Vs(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ys(e,t,n,r,i,o){var a=2;if(r=e,"function"==typeof e)Ws(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case u:return Zs(n.children,i,o,t);case d:a=8,i|=8;break;case h:return(e=Vs(12,n,t,2|i)).elementType=h,e.lanes=o,e;case g:return(e=Vs(13,n,t,i)).elementType=g,e.lanes=o,e;case b:return(e=Vs(19,n,t,i)).elementType=b,e.lanes=o,e;case S:return Js(n,i,o,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case p:a=10;break e;case f:a=9;break e;case m:a=11;break e;case v:a=14;break e;case y:a=16,r=null;break e}throw Error(s(130,null==e?e:typeof e,""))}return(t=Vs(a,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Zs(e,t,n,r){return(e=Vs(7,e,r,t)).lanes=n,e}function Js(e,t,n,r){return(e=Vs(22,e,r,t)).elementType=S,e.lanes=n,e.stateNode={},e}function Ks(e,t,n){return(e=Vs(6,e,null,t)).lanes=n,e}function ea(e,t,n){return(t=Vs(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ta(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=q,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=At(0),this.expirationTimes=At(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=At(0),this.identifierPrefix=r,this.onRecoverableError=i,W&&(this.mutableSourceEagerHydrationData=null)}function na(e,t,n,r,i,o,s,a,l){return e=new ta(e,t,n,a,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Vs(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null},hn(o),e}function ra(e){if(!e)return at;e:{if(O(e=e._reactInternals)!==e||1!==e.tag)throw Error(s(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ht(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(s(171))}if(1===e.tag){var n=e.type;if(ht(n))return mt(e,n,t)}return t}function ia(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(s(188));throw e=Object.keys(e).join(","),Error(s(268,e))}return null===(e=T(t))?null:e.stateNode}function oa(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function sa(e,t){oa(e,t),(e=e.alternate)&&oa(e,t)}function aa(e){return null===(e=T(e))?null:e.stateNode}function la(){return null}return os=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||ct.current)ji=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return ji=!1,function(e,t,n){switch(t.tag){case 3:qi(t),Zn();break;case 5:hr(t);break;case 1:ht(t.type)&>(t);break;case 4:ur(t,t.stateNode.containerInfo);break;case 10:on(0,t.type._context,t.memoizedProps.value);break;case 13:var r=t.memoizedState;if(null!==r)return null!==r.dehydrated?(st(fr,1&fr.current),t.flags|=128,null):0!=(n&t.child.childLanes)?Wi(e,t,n):(st(fr,1&fr.current),null!==(e=no(e,t,n))?e.sibling:null);st(fr,1&fr.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return to(e,t,n);t.flags|=128}var i=t.memoizedState;if(null!==i&&(i.rendering=null,i.tail=null,i.lastEffect=null),st(fr,fr.current),r)break;return null;case 22:case 23:return t.lanes=0,Bi(e,t,n)}return no(e,t,n)}(e,t,n);ji=0!=(131072&e.flags)}else ji=!1,Un&&0!=(1048576&t.flags)&&In(t,Mn,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps;var i=dt(t,lt.current);ln(t,n),i=Mr(null,t,r,e,i,n);var o=$r();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ht(r)?(o=!0,gt(t)):o=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,hn(t),i.updater=xn,t.stateNode=i,i._reactInternals=t,En(t,r,e,n),t=Qi(null,t,r,!0,o,n)):(t.tag=0,Un&&o&&Ln(t),Ni(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return Ws(e)?1:0;if(null!=e){if((e=e.$$typeof)===m)return 11;if(e===v)return 14}return 2}(r),e=Jt(r,e),i){case 0:t=Fi(null,t,r,e,n);break e;case 1:t=Ui(null,t,r,e,n);break e;case 11:t=Di(null,t,r,e,n);break e;case 14:t=Ii(null,t,r,Jt(r.type,e),n);break e}throw Error(s(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,Fi(e,t,r,i=t.elementType===r?i:Jt(r,i),n);case 1:return r=t.type,i=t.pendingProps,Ui(e,t,r,i=t.elementType===r?i:Jt(r,i),n);case 3:e:{if(qi(t),null===e)throw Error(s(387));r=t.pendingProps,i=(o=t.memoizedState).element,pn(e,t),vn(t,r,null,n);var a=t.memoizedState;if(r=a.element,W&&o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:a.cache,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=Gi(e,t,r,n,i=Error(s(423)));break e}if(r!==i){t=Gi(e,t,r,n,i=Error(s(424)));break e}for(W&&(Fn=Be(t.stateNode.containerInfo),zn=t,Un=!0,qn=null,Qn=!1),n=ir(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(Zn(),r===i){t=no(e,t,n);break e}Ni(e,t,r,n)}t=t.child}return t;case 5:return hr(t),null===e&&Wn(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,a=i.children,z(r,i)?a=null:null!==o&&z(r,o)&&(t.flags|=32),zi(e,t),Ni(e,t,a,n),t.child;case 6:return null===e&&Wn(t),null;case 13:return Wi(e,t,n);case 4:return ur(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=rr(t,null,r,n):Ni(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Di(e,t,r,i=t.elementType===r?i:Jt(r,i),n);case 7:return Ni(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ni(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,on(0,r,a=i.value),null!==o)if(Qt(o.value,a)){if(o.children===i.children&&!ct.current){t=no(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var l=o.dependencies;if(null!==l){a=o.child;for(var c=l.firstContext;null!==c;){if(c.context===r){if(1===o.tag){(c=fn(-1,n&-n)).tag=2;var u=o.updateQueue;if(null!==u){var d=(u=u.shared).pending;null===d?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}o.lanes|=n,null!==(c=o.alternate)&&(c.lanes|=n),an(o.return,n,t),l.lanes|=n;break}c=c.next}}else if(10===o.tag)a=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(a=o.return))throw Error(s(341));a.lanes|=n,null!==(l=a.alternate)&&(l.lanes|=n),an(a,n,t),a=o.sibling}else a=o.child;if(null!==a)a.return=o;else for(a=o;null!==a;){if(a===t){a=null;break}if(null!==(o=a.sibling)){o.return=a.return,a=o;break}a=a.return}o=a}Ni(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,ln(t,n),r=r(i=cn(i)),t.flags|=1,Ni(e,t,r,n),t.child;case 14:return i=Jt(r=t.type,t.pendingProps),Ii(e,t,r,i=Jt(r.type,i),n);case 15:return Li(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Jt(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,ht(r)?(e=!0,gt(t)):e=!1,ln(t,n),kn(t,r,i),En(t,r,i,n),Qi(null,t,r,!0,e,n);case 19:return to(e,t,n);case 22:return Bi(e,t,n)}throw Error(s(156,t.tag))},t.attemptContinuousHydration=function(e){13===e.tag&&(vs(e,134217728,gs()),sa(e,134217728))},t.attemptHydrationAtCurrentPriority=function(e){if(13===e.tag){var t=gs(),n=bs(e);vs(e,n,t),sa(e,n)}},t.attemptSynchronousHydration=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=wt(t.pendingLanes);0!==n&&(Ct(t,1|n),Ss(t,Dt()),0==(6&Qo)&&(is(),Wt()))}break;case 13:var r=gs();Es((function(){return vs(e,1,r)})),sa(e,1)}},t.batchedUpdates=function(e,t){var n=Qo;Qo|=1;try{return e(t)}finally{0===(Qo=n)&&(is(),Gt&&Wt())}},t.createComponentSelector=function(e){return{$$typeof:To,value:e}},t.createContainer=function(e,t,n,r,i,o,s){return na(e,t,!1,null,0,r,0,o,s)},t.createHasPseudoClassSelector=function(e){return{$$typeof:Co,value:e}},t.createHydrationContainer=function(e,t,n,r,i,o,s,a,l){return(e=na(n,r,!0,e,0,o,0,a,l)).context=ra(null),n=e.current,(o=fn(r=gs(),i=bs(n))).callback=null!=t?t:null,mn(n,o),e.current.lanes=i,Tt(e,i,r),Ss(e,r),e},t.createPortal=function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:c,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}},t.createRoleSelector=function(e){return{$$typeof:Mo,value:e}},t.createTestNameSelector=function(e){return{$$typeof:$o,value:e}},t.createTextSelector=function(e){return{$$typeof:Po,value:e}},t.deferredUpdates=function(e){var t=Mt,n=Uo.transition;try{return Uo.transition=null,Mt=16,e()}finally{Mt=t,Uo.transition=n}},t.discreteUpdates=function(e,t,n,r,i){var o=Mt,s=Uo.transition;try{return Uo.transition=null,Mt=1,e(t,n,r,i)}finally{Mt=o,Uo.transition=s,0===Qo&&is()}},t.findAllNodes=Lo,t.findBoundingRects=function(e,t){if(!te)throw Error(s(363));t=Lo(e,t),e=[];for(var n=0;n<t.length;n++)e.push(re(t[n]));for(t=e.length-1;0<t;t--)for(var r=(n=e[t]).x,i=r+n.width,o=n.y,a=o+n.height,l=t-1;0<=l;l--)if(t!==l){var c=e[l],u=c.x,d=u+c.width,h=c.y,p=h+c.height;if(r>=u&&o>=h&&i<=d&&a<=p){e.splice(t,1);break}if(!(r!==u||n.width!==c.width||p<o||h>a)){h>o&&(c.height+=h-o,c.y=o),p<a&&(c.height=a-h),e.splice(t,1);break}if(!(o!==h||n.height!==c.height||d<r||u>i)){u>r&&(c.width+=u-r,c.x=r),d<i&&(c.width=i-u),e.splice(t,1);break}}return e},t.findHostInstance=ia,t.findHostInstanceWithNoPortals=function(e){return null===(e=null!==(e=A(e))?function e(t){if(5===t.tag||6===t.tag)return t;for(t=t.child;null!==t;){if(4!==t.tag){var n=e(t);if(null!==n)return n}t=t.sibling}return null}(e):null)?null:e.stateNode},t.findHostInstanceWithWarning=function(e){return ia(e)},t.flushControlled=function(e){var t=Qo;Qo|=1;var n=Uo.transition,r=Mt;try{Uo.transition=null,Mt=1,e()}finally{Mt=r,Uo.transition=n,0===(Qo=t)&&(is(),Wt())}},t.flushPassiveEffects=Ls,t.flushSync=Es,t.focusWithin=function(e,t){if(!te)throw Error(s(363));for(t=Io(e=jo(e),t),t=Array.from(t),e=0;e<t.length;){var n=t[e++];if(!oe(n)){if(5===n.tag&&ae(n.stateNode))return!0;for(n=n.child;null!==n;)t.push(n),n=n.sibling}}return!1},t.getCurrentUpdatePriority=function(){return Mt},t.getFindAllNodesFailureDescription=function(e,t){if(!te)throw Error(s(363));var n=0,r=[];e=[jo(e),0];for(var i=0;i<e.length;){var o=e[i++],a=e[i++],l=t[a];if((5!==o.tag||!oe(o))&&(No(o,l)&&(r.push(Do(l)),++a>n&&(n=a)),a<t.length))for(o=o.child;null!==o;)e.push(o,a),o=o.sibling}if(n<t.length){for(e=[];n<t.length;n++)e.push(Do(t[n]));return"findAllNodes was able to match part of the selector:\n "+r.join(" > ")+"\n\nNo matching component was found for:\n "+e.join(" > ")}return null},t.getPublicRootInstance=function(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:return $(e.child.stateNode);default:return e.child.stateNode}},t.injectIntoDevTools=function(e){if(e={bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:aa,findFiberByHostInstance:e.findFiberByHostInstance||la,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},"undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)e=!1;else{var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)e=!0;else{try{Ft=t.inject(e),Ut=t}catch(e){}e=!!t.checkDCE}}return e},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(e,t,n,r){if(!te)throw Error(s(363));e=Lo(e,t);var i=le(e,n,r).disconnect;return{disconnect:function(){i()}}},t.registerMutableSourceForHydration=function(e,t){var n=t._getVersion;n=n(t._source),null==e.mutableSourceEagerHydrationData?e.mutableSourceEagerHydrationData=[t,n]:e.mutableSourceEagerHydrationData.push(t,n)},t.runWithPriority=function(e,t){var n=Mt;try{return Mt=e,t()}finally{Mt=n}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(e,t,n,r){var i=t.current,o=gs(),s=bs(i);return n=ra(n),null===t.context?t.context=n:t.pendingContext=n,(t=fn(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),mn(i,t),null!==(e=vs(i,s,o))&&gn(e,i,s),s},t}},function(e,t,n){"use strict";(function(e){
|
||
/**
|
||
* @license React
|
||
* scheduler.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<o(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,s=i>>>1;r<s;){var a=2*(r+1)-1,l=e[a],c=a+1,u=e[c];if(0>o(l,n))c<i&&0>o(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[a]=n,r=a);else{if(!(c<i&&0>o(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var a=Date,l=a.now();t.unstable_now=function(){return a.now()-l}}var c=[],u=[],d=1,h=null,p=3,f=!1,m=!1,g=!1,b="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,y=void 0!==e?e:null;function S(e){for(var t=r(u);null!==t;){if(null===t.callback)i(u);else{if(!(t.startTime<=e))break;i(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function _(e){if(g=!1,S(e),!m)if(null!==r(c))m=!0,R(x);else{var t=r(u);null!==t&&j(_,t.startTime-e)}}function x(e,n){m=!1,g&&(g=!1,v(E),E=-1),f=!0;var o=p;try{for(S(n),h=r(c);null!==h&&(!(h.expirationTime>n)||e&&!C());){var s=h.callback;if("function"==typeof s){h.callback=null,p=h.priorityLevel;var a=s(h.expirationTime<=n);n=t.unstable_now(),"function"==typeof a?h.callback=a:h===r(c)&&i(c),S(n)}else i(c);h=r(c)}if(null!==h)var l=!0;else{var d=r(u);null!==d&&j(_,d.startTime-n),l=!1}return l}finally{h=null,p=o,f=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var w,k=!1,O=null,E=-1,A=5,T=-1;function C(){return!(t.unstable_now()-T<A)}function M(){if(null!==O){var e=t.unstable_now();T=e;var n=!0;try{n=O(!0,e)}finally{n?w():(k=!1,O=null)}}else k=!1}if("function"==typeof y)w=function(){y(M)};else if("undefined"!=typeof MessageChannel){var $=new MessageChannel,P=$.port2;$.port1.onmessage=M,w=function(){P.postMessage(null)}}else w=function(){b(M,0)};function R(e){O=e,k||(k=!0,w())}function j(e,n){E=b((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){m||f||(m=!0,R(x))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,i,o){var s=t.unstable_now();switch("object"==typeof o&&null!==o?o="number"==typeof(o=o.delay)&&0<o?s+o:s:o=s,e){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return e={id:d++,callback:i,priorityLevel:e,startTime:o,expirationTime:a=o+a,sortIndex:-1},o>s?(e.sortIndex=o,n(u,e),null===r(c)&&e===r(u)&&(g?(v(E),E=-1):g=!0,j(_,o-s))):(e.sortIndex=a,n(c,e),m||f||(m=!0,R(x))),e},t.unstable_shouldYield=C,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}}).call(this,n(89).setImmediate)},function(e,t,n){"use strict";var r=n(352);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,s){if(s!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(0),o=(r=i)&&r.__esModule?r:{default:r};t.default=function(){return o.default.createElement("svg",{width:"14",height:"11",viewBox:"0 0 14 11"},o.default.createElement("path",{d:"M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0",fill:"#fff",fillRule:"evenodd"}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(0),o=(r=i)&&r.__esModule?r:{default:r};t.default=function(){return o.default.createElement("svg",{width:"10",height:"10",viewBox:"0 0 10 10"},o.default.createElement("path",{d:"M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12",fill:"#fff",fillRule:"evenodd"}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pointerCoord=function(e){if(e){var t=e.changedTouches;if(t&&t.length>0){var n=t[0];return{x:n.clientX,y:n.clientY}}var r=e.pageX;if(void 0!==r)return{x:r,y:e.pageY}}return{x:0,y:0}}},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,".react-toggle {\n touch-action: pan-x;\n\n display: inline-block;\n position: relative;\n cursor: pointer;\n background-color: transparent;\n border: 0;\n padding: 0;\n\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n -webkit-tap-highlight-color: transparent;\n}\n\n.react-toggle-screenreader-only {\n border: 0;\n clip: rect(0 0 0 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px;\n}\n\n.react-toggle--disabled {\n cursor: not-allowed;\n opacity: 0.5;\n -webkit-transition: opacity 0.25s;\n transition: opacity 0.25s;\n}\n\n.react-toggle-track {\n width: 50px;\n height: 24px;\n padding: 0;\n border-radius: 30px;\n background-color: #4D4D4D;\n -webkit-transition: all 0.2s ease;\n -moz-transition: all 0.2s ease;\n transition: all 0.2s ease;\n}\n\n.react-toggle:hover:not(.react-toggle--disabled) .react-toggle-track {\n background-color: #000000;\n}\n\n.react-toggle--checked .react-toggle-track {\n background-color: #19AB27;\n}\n\n.react-toggle--checked:hover:not(.react-toggle--disabled) .react-toggle-track {\n background-color: #128D15;\n}\n\n.react-toggle-track-check {\n position: absolute;\n width: 14px;\n height: 10px;\n top: 0px;\n bottom: 0px;\n margin-top: auto;\n margin-bottom: auto;\n line-height: 0;\n left: 8px;\n opacity: 0;\n -webkit-transition: opacity 0.25s ease;\n -moz-transition: opacity 0.25s ease;\n transition: opacity 0.25s ease;\n}\n\n.react-toggle--checked .react-toggle-track-check {\n opacity: 1;\n -webkit-transition: opacity 0.25s ease;\n -moz-transition: opacity 0.25s ease;\n transition: opacity 0.25s ease;\n}\n\n.react-toggle-track-x {\n position: absolute;\n width: 10px;\n height: 10px;\n top: 0px;\n bottom: 0px;\n margin-top: auto;\n margin-bottom: auto;\n line-height: 0;\n right: 10px;\n opacity: 1;\n -webkit-transition: opacity 0.25s ease;\n -moz-transition: opacity 0.25s ease;\n transition: opacity 0.25s ease;\n}\n\n.react-toggle--checked .react-toggle-track-x {\n opacity: 0;\n}\n\n.react-toggle-thumb {\n transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1) 0ms;\n position: absolute;\n top: 1px;\n left: 1px;\n width: 22px;\n height: 22px;\n border: 1px solid #4D4D4D;\n border-radius: 50%;\n background-color: #FAFAFA;\n\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n\n -webkit-transition: all 0.25s ease;\n -moz-transition: all 0.25s ease;\n transition: all 0.25s ease;\n}\n\n.react-toggle--checked .react-toggle-thumb {\n left: 27px;\n border-color: #19AB27;\n}\n\n.react-toggle--focus .react-toggle-thumb {\n -webkit-box-shadow: 0px 0px 3px 2px #0099E0;\n -moz-box-shadow: 0px 0px 3px 2px #0099E0;\n box-shadow: 0px 0px 2px 3px #0099E0;\n}\n\n.react-toggle:active:not(.react-toggle--disabled) .react-toggle-thumb {\n -webkit-box-shadow: 0px 0px 5px 5px #0099E0;\n -moz-box-shadow: 0px 0px 5px 5px #0099E0;\n box-shadow: 0px 0px 5px 5px #0099E0;\n}\n",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,"body.react-confirm-alert-body-element {\n overflow: hidden;\n}\n\n.react-confirm-alert-blur {\n filter: url(#gaussian-blur);\n filter: blur(2px);\n -webkit-filter: blur(2px);\n}\n\n.react-confirm-alert-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 99;\n background: rgba(255, 255, 255, 0.9);\n display: -webkit-flex;\n display: -moz-flex;\n display: -ms-flex;\n display: -o-flex;\n display: flex;\n justify-content: center;\n -ms-align-items: center;\n align-items: center;\n opacity: 0;\n -webkit-animation: react-confirm-alert-fadeIn 0.5s 0.2s forwards;\n -moz-animation: react-confirm-alert-fadeIn 0.5s 0.2s forwards;\n -o-animation: react-confirm-alert-fadeIn 0.5s 0.2s forwards;\n animation: react-confirm-alert-fadeIn 0.5s 0.2s forwards;\n}\n\n.react-confirm-alert-body {\n font-family: Arial, Helvetica, sans-serif;\n width: 400px;\n padding: 30px;\n text-align: left;\n background: #fff;\n border-radius: 10px;\n box-shadow: 0 20px 75px rgba(0, 0, 0, 0.13);\n color: #666;\n}\n\n.react-confirm-alert-svg {\n position: absolute;\n top: 0;\n left: 0;\n}\n\n.react-confirm-alert-body > h1 {\n margin-top: 0;\n}\n\n.react-confirm-alert-body > h3 {\n margin: 0;\n font-size: 16px;\n}\n\n.react-confirm-alert-button-group {\n display: -webkit-flex;\n display: -moz-flex;\n display: -ms-flex;\n display: -o-flex;\n display: flex;\n justify-content: flex-start;\n margin-top: 20px;\n}\n\n.react-confirm-alert-button-group > button {\n outline: none;\n background: #333;\n border: none;\n display: inline-block;\n padding: 6px 18px;\n color: #eee;\n margin-right: 10px;\n border-radius: 5px;\n font-size: 12px;\n cursor: pointer;\n}\n\n@-webkit-keyframes react-confirm-alert-fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@-moz-keyframes react-confirm-alert-fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@-o-keyframes react-confirm-alert-fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes react-confirm-alert-fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.btn{align-items:center;border-radius:calc(.5rem*var(--scale-factor, 1));border:3px solid rgba(0,0,0,0);box-sizing:border-box;color:inherit;cursor:pointer;display:inline-flex;font-family:sans-serif;font-size:inherit;font-weight:700;gap:calc(.5rem*var(--scale-factor, 1));justify-content:center;min-block-size:44px;min-inline-size:44px;padding:10px;position:relative;text-align:center;text-decoration:none}.btn:disabled{background-color:#4a4d59;color:#fff;cursor:default}.btn:focus-visible{border:3px solid #cd2356;outline:none}.btn--primary{background-color:var(--rpf-button-primary-background-color);border-radius:calc(.5rem*var(--scale-factor, 1));color:var(--rpf-button-primary-text-color)}.btn--primary svg{fill:var(--rpf-button-primary-text-color)}.btn--primary:active,.btn-outer:active .btn--primary{background-color:var(--rpf-button-primary-background-color-active)}.btn--primary:focus-visible,.btn-outer:focus-visible .btn--primary{background-color:var(--rpf-button-primary-background-color-focus)}.btn--primary:hover,.btn-outer:hover .btn--primary{background-color:var(--rpf-button-primary-background-color-hover);border-radius:calc(.5rem*var(--scale-factor, 1))}.btn--primary:disabled{background-color:var(--rpf-button-primary-background-color-disabled);color:var(--rpf-button-primary-color-disabled)}.btn--primary:disabled svg{fill:var(--rpf-button-primary-color-disabled)}.btn--primary:disabled:hover,.btn-outer:hover .btn--primary:disabled{background-color:var(--rpf-button-primary-background-color-disabled)}.btn--secondary{background-color:inherit;color:var(--rpf-button-secondary-text-color);border:2px solid var(--rpf-button-primary-background-color)}.btn--secondary svg{fill:var(--rpf-button-secondary-text-color)}.btn--secondary:active,.btn-outer:active .btn--secondary{background-color:inherit}.btn--secondary:focus-visible,.btn-outer:focus-visible .btn--secondary{background-color:inherit}.btn--secondary:hover,.btn-outer:hover .btn--secondary{background-color:inherit}.btn--secondary:disabled{background-color:var(--rpf-button-secondary-background-color-disabled);color:var(--rpf-button-secondary-background-color-active)}.btn--secondary:disabled svg{fill:var(--rpf-button-secondary-background-color-active)}.btn--secondary:disabled:hover,.btn-outer:hover .btn--secondary:disabled{background-color:var(--rpf-button-secondary-background-color-disabled)}.btn--secondary:active{border:2px solid var(--rpf-button-secondary-background-color-active)}.btn--secondary:hover{background-color:var(--rpf-button-secondary-background-color-hover);color:var(--rpf-button-secondary-text-color-hover);border-color:var(--rpf-button-secondary-border-color-hover) !important}.btn--secondary:hover svg{fill:var(--rpf-button-secondary-text-color-hover)}.btn--secondary:focus-visible{outline:3px solid var(--rpf-button-secondary-background-color-focus)}.btn--tertiary{background-color:inherit;color:inherit}.btn--tertiary:active,.btn-outer:active .btn--tertiary{background-color:inherit}.btn--tertiary:focus-visible,.btn-outer:focus-visible .btn--tertiary{background-color:inherit}.btn--tertiary:hover,.btn-outer:hover .btn--tertiary{background-color:inherit}.btn--tertiary:disabled{background-color:inherit;color:#4a4d59}.btn--tertiary:disabled svg{fill:#4a4d59}.btn--tertiary:disabled:hover,.btn-outer:hover .btn--tertiary:disabled{background-color:inherit}.btn--tertiary:active{color:#0e857a}.btn--tertiary:active svg{fill:#0e857a}.btn--tertiary:hover{color:var(--rpf-button-tertiary-text-color-hover)}.btn--tertiary:hover svg{fill:var(--rpf-button-tertiary-text-color-hover)}.btn--danger{background-color:#9e0a0a;color:#fff}.btn--danger svg{fill:#fff}.btn--danger:active,.btn-outer:active .btn--danger{background-color:#9e0a0a}.btn--danger:focus-visible,.btn-outer:focus-visible .btn--danger{background-color:#9e0a0a}.btn--danger:hover,.btn-outer:hover .btn--danger{background-color:#86151e}.btn--danger:disabled{background-color:#9e0a0a;color:#fff}.btn--danger:disabled svg{fill:#fff}.btn--danger:disabled:hover,.btn-outer:hover .btn--danger:disabled{background-color:#9e0a0a}.btn--danger:focus-visible{background-clip:padding-box;border:2px solid rgba(0,0,0,0);outline:3px solid #cd2356}.btn--small{min-block-size:unset;min-inline-size:unset;padding:calc(.25rem*var(--scale-factor, 1))}.btn--svg-only svg{margin:0}.btn-outer{background:rgba(0,0,0,0);border-radius:calc(.5rem*var(--scale-factor, 1));cursor:pointer;padding:calc(.5rem*var(--scale-factor, 1)) 0;display:flex;align-items:center;justify-content:center}.btn-outer:focus-visible{outline:none}.btn-outer:focus-visible .btn{border:3px solid #cd2356}.btn-outer:has(.btn:disabled){cursor:default}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.output-view-toggle__button{block-size:100%}.--light .output-view-toggle{border-inline-start:1px solid #d5d7dc}.--dark .output-view-toggle{border-inline-start:1px solid #4a4d59}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,".runner-controls{display:flex;align-items:center;padding:0 calc(.5rem*var(--scale-factor, 1))}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.htmlrunner-container{container-type:inline-size;display:flex;block-size:100%;inline-size:100%}.htmlrunner-link{margin-inline-start:auto}@container (max-width: 480px){.htmlrunner-link__text{display:none}}.htmlrunner-iframe{border:none;background-color:#fff;block-size:100%;inline-size:100%}",""])},function(e,t,n){
|
||
/*!
|
||
* mime-db
|
||
* Copyright(c) 2014 Jonathan Ong
|
||
* Copyright(c) 2015-2022 Douglas Christopher Wilson
|
||
* MIT Licensed
|
||
*/
|
||
e.exports=n(363)},function(e){e.exports=JSON.parse('{"application/1d-interleaved-parityfec":{"source":"iana"},"application/3gpdash-qoe-report+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/3gpp-ims+xml":{"source":"iana","compressible":true},"application/3gpphal+json":{"source":"iana","compressible":true},"application/3gpphalforms+json":{"source":"iana","compressible":true},"application/a2l":{"source":"iana"},"application/ace+cbor":{"source":"iana"},"application/activemessage":{"source":"iana"},"application/activity+json":{"source":"iana","compressible":true},"application/alto-costmap+json":{"source":"iana","compressible":true},"application/alto-costmapfilter+json":{"source":"iana","compressible":true},"application/alto-directory+json":{"source":"iana","compressible":true},"application/alto-endpointcost+json":{"source":"iana","compressible":true},"application/alto-endpointcostparams+json":{"source":"iana","compressible":true},"application/alto-endpointprop+json":{"source":"iana","compressible":true},"application/alto-endpointpropparams+json":{"source":"iana","compressible":true},"application/alto-error+json":{"source":"iana","compressible":true},"application/alto-networkmap+json":{"source":"iana","compressible":true},"application/alto-networkmapfilter+json":{"source":"iana","compressible":true},"application/alto-updatestreamcontrol+json":{"source":"iana","compressible":true},"application/alto-updatestreamparams+json":{"source":"iana","compressible":true},"application/aml":{"source":"iana"},"application/andrew-inset":{"source":"iana","extensions":["ez"]},"application/applefile":{"source":"iana"},"application/applixware":{"source":"apache","extensions":["aw"]},"application/at+jwt":{"source":"iana"},"application/atf":{"source":"iana"},"application/atfx":{"source":"iana"},"application/atom+xml":{"source":"iana","compressible":true,"extensions":["atom"]},"application/atomcat+xml":{"source":"iana","compressible":true,"extensions":["atomcat"]},"application/atomdeleted+xml":{"source":"iana","compressible":true,"extensions":["atomdeleted"]},"application/atomicmail":{"source":"iana"},"application/atomsvc+xml":{"source":"iana","compressible":true,"extensions":["atomsvc"]},"application/atsc-dwd+xml":{"source":"iana","compressible":true,"extensions":["dwd"]},"application/atsc-dynamic-event-message":{"source":"iana"},"application/atsc-held+xml":{"source":"iana","compressible":true,"extensions":["held"]},"application/atsc-rdt+json":{"source":"iana","compressible":true},"application/atsc-rsat+xml":{"source":"iana","compressible":true,"extensions":["rsat"]},"application/atxml":{"source":"iana"},"application/auth-policy+xml":{"source":"iana","compressible":true},"application/bacnet-xdd+zip":{"source":"iana","compressible":false},"application/batch-smtp":{"source":"iana"},"application/bdoc":{"compressible":false,"extensions":["bdoc"]},"application/beep+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/calendar+json":{"source":"iana","compressible":true},"application/calendar+xml":{"source":"iana","compressible":true,"extensions":["xcs"]},"application/call-completion":{"source":"iana"},"application/cals-1840":{"source":"iana"},"application/captive+json":{"source":"iana","compressible":true},"application/cbor":{"source":"iana"},"application/cbor-seq":{"source":"iana"},"application/cccex":{"source":"iana"},"application/ccmp+xml":{"source":"iana","compressible":true},"application/ccxml+xml":{"source":"iana","compressible":true,"extensions":["ccxml"]},"application/cdfx+xml":{"source":"iana","compressible":true,"extensions":["cdfx"]},"application/cdmi-capability":{"source":"iana","extensions":["cdmia"]},"application/cdmi-container":{"source":"iana","extensions":["cdmic"]},"application/cdmi-domain":{"source":"iana","extensions":["cdmid"]},"application/cdmi-object":{"source":"iana","extensions":["cdmio"]},"application/cdmi-queue":{"source":"iana","extensions":["cdmiq"]},"application/cdni":{"source":"iana"},"application/cea":{"source":"iana"},"application/cea-2018+xml":{"source":"iana","compressible":true},"application/cellml+xml":{"source":"iana","compressible":true},"application/cfw":{"source":"iana"},"application/city+json":{"source":"iana","compressible":true},"application/clr":{"source":"iana"},"application/clue+xml":{"source":"iana","compressible":true},"application/clue_info+xml":{"source":"iana","compressible":true},"application/cms":{"source":"iana"},"application/cnrp+xml":{"source":"iana","compressible":true},"application/coap-group+json":{"source":"iana","compressible":true},"application/coap-payload":{"source":"iana"},"application/commonground":{"source":"iana"},"application/conference-info+xml":{"source":"iana","compressible":true},"application/cose":{"source":"iana"},"application/cose-key":{"source":"iana"},"application/cose-key-set":{"source":"iana"},"application/cpl+xml":{"source":"iana","compressible":true,"extensions":["cpl"]},"application/csrattrs":{"source":"iana"},"application/csta+xml":{"source":"iana","compressible":true},"application/cstadata+xml":{"source":"iana","compressible":true},"application/csvm+json":{"source":"iana","compressible":true},"application/cu-seeme":{"source":"apache","extensions":["cu"]},"application/cwt":{"source":"iana"},"application/cybercash":{"source":"iana"},"application/dart":{"compressible":true},"application/dash+xml":{"source":"iana","compressible":true,"extensions":["mpd"]},"application/dash-patch+xml":{"source":"iana","compressible":true,"extensions":["mpp"]},"application/dashdelta":{"source":"iana"},"application/davmount+xml":{"source":"iana","compressible":true,"extensions":["davmount"]},"application/dca-rft":{"source":"iana"},"application/dcd":{"source":"iana"},"application/dec-dx":{"source":"iana"},"application/dialog-info+xml":{"source":"iana","compressible":true},"application/dicom":{"source":"iana"},"application/dicom+json":{"source":"iana","compressible":true},"application/dicom+xml":{"source":"iana","compressible":true},"application/dii":{"source":"iana"},"application/dit":{"source":"iana"},"application/dns":{"source":"iana"},"application/dns+json":{"source":"iana","compressible":true},"application/dns-message":{"source":"iana"},"application/docbook+xml":{"source":"apache","compressible":true,"extensions":["dbk"]},"application/dots+cbor":{"source":"iana"},"application/dskpp+xml":{"source":"iana","compressible":true},"application/dssc+der":{"source":"iana","extensions":["dssc"]},"application/dssc+xml":{"source":"iana","compressible":true,"extensions":["xdssc"]},"application/dvcs":{"source":"iana"},"application/ecmascript":{"source":"iana","compressible":true,"extensions":["es","ecma"]},"application/edi-consent":{"source":"iana"},"application/edi-x12":{"source":"iana","compressible":false},"application/edifact":{"source":"iana","compressible":false},"application/efi":{"source":"iana"},"application/elm+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/elm+xml":{"source":"iana","compressible":true},"application/emergencycalldata.cap+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/emergencycalldata.comment+xml":{"source":"iana","compressible":true},"application/emergencycalldata.control+xml":{"source":"iana","compressible":true},"application/emergencycalldata.deviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.ecall.msd":{"source":"iana"},"application/emergencycalldata.providerinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.serviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.subscriberinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.veds+xml":{"source":"iana","compressible":true},"application/emma+xml":{"source":"iana","compressible":true,"extensions":["emma"]},"application/emotionml+xml":{"source":"iana","compressible":true,"extensions":["emotionml"]},"application/encaprtp":{"source":"iana"},"application/epp+xml":{"source":"iana","compressible":true},"application/epub+zip":{"source":"iana","compressible":false,"extensions":["epub"]},"application/eshop":{"source":"iana"},"application/exi":{"source":"iana","extensions":["exi"]},"application/expect-ct-report+json":{"source":"iana","compressible":true},"application/express":{"source":"iana","extensions":["exp"]},"application/fastinfoset":{"source":"iana"},"application/fastsoap":{"source":"iana"},"application/fdt+xml":{"source":"iana","compressible":true,"extensions":["fdt"]},"application/fhir+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/fhir+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/fido.trusted-apps+json":{"compressible":true},"application/fits":{"source":"iana"},"application/flexfec":{"source":"iana"},"application/font-sfnt":{"source":"iana"},"application/font-tdpfr":{"source":"iana","extensions":["pfr"]},"application/font-woff":{"source":"iana","compressible":false},"application/framework-attributes+xml":{"source":"iana","compressible":true},"application/geo+json":{"source":"iana","compressible":true,"extensions":["geojson"]},"application/geo+json-seq":{"source":"iana"},"application/geopackage+sqlite3":{"source":"iana"},"application/geoxacml+xml":{"source":"iana","compressible":true},"application/gltf-buffer":{"source":"iana"},"application/gml+xml":{"source":"iana","compressible":true,"extensions":["gml"]},"application/gpx+xml":{"source":"apache","compressible":true,"extensions":["gpx"]},"application/gxf":{"source":"apache","extensions":["gxf"]},"application/gzip":{"source":"iana","compressible":false,"extensions":["gz"]},"application/h224":{"source":"iana"},"application/held+xml":{"source":"iana","compressible":true},"application/hjson":{"extensions":["hjson"]},"application/http":{"source":"iana"},"application/hyperstudio":{"source":"iana","extensions":["stk"]},"application/ibe-key-request+xml":{"source":"iana","compressible":true},"application/ibe-pkg-reply+xml":{"source":"iana","compressible":true},"application/ibe-pp-data":{"source":"iana"},"application/iges":{"source":"iana"},"application/im-iscomposing+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/index":{"source":"iana"},"application/index.cmd":{"source":"iana"},"application/index.obj":{"source":"iana"},"application/index.response":{"source":"iana"},"application/index.vnd":{"source":"iana"},"application/inkml+xml":{"source":"iana","compressible":true,"extensions":["ink","inkml"]},"application/iotp":{"source":"iana"},"application/ipfix":{"source":"iana","extensions":["ipfix"]},"application/ipp":{"source":"iana"},"application/isup":{"source":"iana"},"application/its+xml":{"source":"iana","compressible":true,"extensions":["its"]},"application/java-archive":{"source":"apache","compressible":false,"extensions":["jar","war","ear"]},"application/java-serialized-object":{"source":"apache","compressible":false,"extensions":["ser"]},"application/java-vm":{"source":"apache","compressible":false,"extensions":["class"]},"application/javascript":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["js","mjs"]},"application/jf2feed+json":{"source":"iana","compressible":true},"application/jose":{"source":"iana"},"application/jose+json":{"source":"iana","compressible":true},"application/jrd+json":{"source":"iana","compressible":true},"application/jscalendar+json":{"source":"iana","compressible":true},"application/json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["json","map"]},"application/json-patch+json":{"source":"iana","compressible":true},"application/json-seq":{"source":"iana"},"application/json5":{"extensions":["json5"]},"application/jsonml+json":{"source":"apache","compressible":true,"extensions":["jsonml"]},"application/jwk+json":{"source":"iana","compressible":true},"application/jwk-set+json":{"source":"iana","compressible":true},"application/jwt":{"source":"iana"},"application/kpml-request+xml":{"source":"iana","compressible":true},"application/kpml-response+xml":{"source":"iana","compressible":true},"application/ld+json":{"source":"iana","compressible":true,"extensions":["jsonld"]},"application/lgr+xml":{"source":"iana","compressible":true,"extensions":["lgr"]},"application/link-format":{"source":"iana"},"application/load-control+xml":{"source":"iana","compressible":true},"application/lost+xml":{"source":"iana","compressible":true,"extensions":["lostxml"]},"application/lostsync+xml":{"source":"iana","compressible":true},"application/lpf+zip":{"source":"iana","compressible":false},"application/lxf":{"source":"iana"},"application/mac-binhex40":{"source":"iana","extensions":["hqx"]},"application/mac-compactpro":{"source":"apache","extensions":["cpt"]},"application/macwriteii":{"source":"iana"},"application/mads+xml":{"source":"iana","compressible":true,"extensions":["mads"]},"application/manifest+json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["webmanifest"]},"application/marc":{"source":"iana","extensions":["mrc"]},"application/marcxml+xml":{"source":"iana","compressible":true,"extensions":["mrcx"]},"application/mathematica":{"source":"iana","extensions":["ma","nb","mb"]},"application/mathml+xml":{"source":"iana","compressible":true,"extensions":["mathml"]},"application/mathml-content+xml":{"source":"iana","compressible":true},"application/mathml-presentation+xml":{"source":"iana","compressible":true},"application/mbms-associated-procedure-description+xml":{"source":"iana","compressible":true},"application/mbms-deregister+xml":{"source":"iana","compressible":true},"application/mbms-envelope+xml":{"source":"iana","compressible":true},"application/mbms-msk+xml":{"source":"iana","compressible":true},"application/mbms-msk-response+xml":{"source":"iana","compressible":true},"application/mbms-protection-description+xml":{"source":"iana","compressible":true},"application/mbms-reception-report+xml":{"source":"iana","compressible":true},"application/mbms-register+xml":{"source":"iana","compressible":true},"application/mbms-register-response+xml":{"source":"iana","compressible":true},"application/mbms-schedule+xml":{"source":"iana","compressible":true},"application/mbms-user-service-description+xml":{"source":"iana","compressible":true},"application/mbox":{"source":"iana","extensions":["mbox"]},"application/media-policy-dataset+xml":{"source":"iana","compressible":true,"extensions":["mpf"]},"application/media_control+xml":{"source":"iana","compressible":true},"application/mediaservercontrol+xml":{"source":"iana","compressible":true,"extensions":["mscml"]},"application/merge-patch+json":{"source":"iana","compressible":true},"application/metalink+xml":{"source":"apache","compressible":true,"extensions":["metalink"]},"application/metalink4+xml":{"source":"iana","compressible":true,"extensions":["meta4"]},"application/mets+xml":{"source":"iana","compressible":true,"extensions":["mets"]},"application/mf4":{"source":"iana"},"application/mikey":{"source":"iana"},"application/mipc":{"source":"iana"},"application/missing-blocks+cbor-seq":{"source":"iana"},"application/mmt-aei+xml":{"source":"iana","compressible":true,"extensions":["maei"]},"application/mmt-usd+xml":{"source":"iana","compressible":true,"extensions":["musd"]},"application/mods+xml":{"source":"iana","compressible":true,"extensions":["mods"]},"application/moss-keys":{"source":"iana"},"application/moss-signature":{"source":"iana"},"application/mosskey-data":{"source":"iana"},"application/mosskey-request":{"source":"iana"},"application/mp21":{"source":"iana","extensions":["m21","mp21"]},"application/mp4":{"source":"iana","extensions":["mp4s","m4p"]},"application/mpeg4-generic":{"source":"iana"},"application/mpeg4-iod":{"source":"iana"},"application/mpeg4-iod-xmt":{"source":"iana"},"application/mrb-consumer+xml":{"source":"iana","compressible":true},"application/mrb-publish+xml":{"source":"iana","compressible":true},"application/msc-ivr+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msc-mixer+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msword":{"source":"iana","compressible":false,"extensions":["doc","dot"]},"application/mud+json":{"source":"iana","compressible":true},"application/multipart-core":{"source":"iana"},"application/mxf":{"source":"iana","extensions":["mxf"]},"application/n-quads":{"source":"iana","extensions":["nq"]},"application/n-triples":{"source":"iana","extensions":["nt"]},"application/nasdata":{"source":"iana"},"application/news-checkgroups":{"source":"iana","charset":"US-ASCII"},"application/news-groupinfo":{"source":"iana","charset":"US-ASCII"},"application/news-transmission":{"source":"iana"},"application/nlsml+xml":{"source":"iana","compressible":true},"application/node":{"source":"iana","extensions":["cjs"]},"application/nss":{"source":"iana"},"application/oauth-authz-req+jwt":{"source":"iana"},"application/oblivious-dns-message":{"source":"iana"},"application/ocsp-request":{"source":"iana"},"application/ocsp-response":{"source":"iana"},"application/octet-stream":{"source":"iana","compressible":false,"extensions":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{"source":"iana","extensions":["oda"]},"application/odm+xml":{"source":"iana","compressible":true},"application/odx":{"source":"iana"},"application/oebps-package+xml":{"source":"iana","compressible":true,"extensions":["opf"]},"application/ogg":{"source":"iana","compressible":false,"extensions":["ogx"]},"application/omdoc+xml":{"source":"apache","compressible":true,"extensions":["omdoc"]},"application/onenote":{"source":"apache","extensions":["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{"source":"iana","compressible":true},"application/oscore":{"source":"iana"},"application/oxps":{"source":"iana","extensions":["oxps"]},"application/p21":{"source":"iana"},"application/p21+zip":{"source":"iana","compressible":false},"application/p2p-overlay+xml":{"source":"iana","compressible":true,"extensions":["relo"]},"application/parityfec":{"source":"iana"},"application/passport":{"source":"iana"},"application/patch-ops-error+xml":{"source":"iana","compressible":true,"extensions":["xer"]},"application/pdf":{"source":"iana","compressible":false,"extensions":["pdf"]},"application/pdx":{"source":"iana"},"application/pem-certificate-chain":{"source":"iana"},"application/pgp-encrypted":{"source":"iana","compressible":false,"extensions":["pgp"]},"application/pgp-keys":{"source":"iana","extensions":["asc"]},"application/pgp-signature":{"source":"iana","extensions":["asc","sig"]},"application/pics-rules":{"source":"apache","extensions":["prf"]},"application/pidf+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pidf-diff+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pkcs10":{"source":"iana","extensions":["p10"]},"application/pkcs12":{"source":"iana"},"application/pkcs7-mime":{"source":"iana","extensions":["p7m","p7c"]},"application/pkcs7-signature":{"source":"iana","extensions":["p7s"]},"application/pkcs8":{"source":"iana","extensions":["p8"]},"application/pkcs8-encrypted":{"source":"iana"},"application/pkix-attr-cert":{"source":"iana","extensions":["ac"]},"application/pkix-cert":{"source":"iana","extensions":["cer"]},"application/pkix-crl":{"source":"iana","extensions":["crl"]},"application/pkix-pkipath":{"source":"iana","extensions":["pkipath"]},"application/pkixcmp":{"source":"iana","extensions":["pki"]},"application/pls+xml":{"source":"iana","compressible":true,"extensions":["pls"]},"application/poc-settings+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/postscript":{"source":"iana","compressible":true,"extensions":["ai","eps","ps"]},"application/ppsp-tracker+json":{"source":"iana","compressible":true},"application/problem+json":{"source":"iana","compressible":true},"application/problem+xml":{"source":"iana","compressible":true},"application/provenance+xml":{"source":"iana","compressible":true,"extensions":["provx"]},"application/prs.alvestrand.titrax-sheet":{"source":"iana"},"application/prs.cww":{"source":"iana","extensions":["cww"]},"application/prs.cyn":{"source":"iana","charset":"7-BIT"},"application/prs.hpub+zip":{"source":"iana","compressible":false},"application/prs.nprend":{"source":"iana"},"application/prs.plucker":{"source":"iana"},"application/prs.rdf-xml-crypt":{"source":"iana"},"application/prs.xsf+xml":{"source":"iana","compressible":true},"application/pskc+xml":{"source":"iana","compressible":true,"extensions":["pskcxml"]},"application/pvd+json":{"source":"iana","compressible":true},"application/qsig":{"source":"iana"},"application/raml+yaml":{"compressible":true,"extensions":["raml"]},"application/raptorfec":{"source":"iana"},"application/rdap+json":{"source":"iana","compressible":true},"application/rdf+xml":{"source":"iana","compressible":true,"extensions":["rdf","owl"]},"application/reginfo+xml":{"source":"iana","compressible":true,"extensions":["rif"]},"application/relax-ng-compact-syntax":{"source":"iana","extensions":["rnc"]},"application/remote-printing":{"source":"iana"},"application/reputon+json":{"source":"iana","compressible":true},"application/resource-lists+xml":{"source":"iana","compressible":true,"extensions":["rl"]},"application/resource-lists-diff+xml":{"source":"iana","compressible":true,"extensions":["rld"]},"application/rfc+xml":{"source":"iana","compressible":true},"application/riscos":{"source":"iana"},"application/rlmi+xml":{"source":"iana","compressible":true},"application/rls-services+xml":{"source":"iana","compressible":true,"extensions":["rs"]},"application/route-apd+xml":{"source":"iana","compressible":true,"extensions":["rapd"]},"application/route-s-tsid+xml":{"source":"iana","compressible":true,"extensions":["sls"]},"application/route-usd+xml":{"source":"iana","compressible":true,"extensions":["rusd"]},"application/rpki-ghostbusters":{"source":"iana","extensions":["gbr"]},"application/rpki-manifest":{"source":"iana","extensions":["mft"]},"application/rpki-publication":{"source":"iana"},"application/rpki-roa":{"source":"iana","extensions":["roa"]},"application/rpki-updown":{"source":"iana"},"application/rsd+xml":{"source":"apache","compressible":true,"extensions":["rsd"]},"application/rss+xml":{"source":"apache","compressible":true,"extensions":["rss"]},"application/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"application/rtploopback":{"source":"iana"},"application/rtx":{"source":"iana"},"application/samlassertion+xml":{"source":"iana","compressible":true},"application/samlmetadata+xml":{"source":"iana","compressible":true},"application/sarif+json":{"source":"iana","compressible":true},"application/sarif-external-properties+json":{"source":"iana","compressible":true},"application/sbe":{"source":"iana"},"application/sbml+xml":{"source":"iana","compressible":true,"extensions":["sbml"]},"application/scaip+xml":{"source":"iana","compressible":true},"application/scim+json":{"source":"iana","compressible":true},"application/scvp-cv-request":{"source":"iana","extensions":["scq"]},"application/scvp-cv-response":{"source":"iana","extensions":["scs"]},"application/scvp-vp-request":{"source":"iana","extensions":["spq"]},"application/scvp-vp-response":{"source":"iana","extensions":["spp"]},"application/sdp":{"source":"iana","extensions":["sdp"]},"application/secevent+jwt":{"source":"iana"},"application/senml+cbor":{"source":"iana"},"application/senml+json":{"source":"iana","compressible":true},"application/senml+xml":{"source":"iana","compressible":true,"extensions":["senmlx"]},"application/senml-etch+cbor":{"source":"iana"},"application/senml-etch+json":{"source":"iana","compressible":true},"application/senml-exi":{"source":"iana"},"application/sensml+cbor":{"source":"iana"},"application/sensml+json":{"source":"iana","compressible":true},"application/sensml+xml":{"source":"iana","compressible":true,"extensions":["sensmlx"]},"application/sensml-exi":{"source":"iana"},"application/sep+xml":{"source":"iana","compressible":true},"application/sep-exi":{"source":"iana"},"application/session-info":{"source":"iana"},"application/set-payment":{"source":"iana"},"application/set-payment-initiation":{"source":"iana","extensions":["setpay"]},"application/set-registration":{"source":"iana"},"application/set-registration-initiation":{"source":"iana","extensions":["setreg"]},"application/sgml":{"source":"iana"},"application/sgml-open-catalog":{"source":"iana"},"application/shf+xml":{"source":"iana","compressible":true,"extensions":["shf"]},"application/sieve":{"source":"iana","extensions":["siv","sieve"]},"application/simple-filter+xml":{"source":"iana","compressible":true},"application/simple-message-summary":{"source":"iana"},"application/simplesymbolcontainer":{"source":"iana"},"application/sipc":{"source":"iana"},"application/slate":{"source":"iana"},"application/smil":{"source":"iana"},"application/smil+xml":{"source":"iana","compressible":true,"extensions":["smi","smil"]},"application/smpte336m":{"source":"iana"},"application/soap+fastinfoset":{"source":"iana"},"application/soap+xml":{"source":"iana","compressible":true},"application/sparql-query":{"source":"iana","extensions":["rq"]},"application/sparql-results+xml":{"source":"iana","compressible":true,"extensions":["srx"]},"application/spdx+json":{"source":"iana","compressible":true},"application/spirits-event+xml":{"source":"iana","compressible":true},"application/sql":{"source":"iana"},"application/srgs":{"source":"iana","extensions":["gram"]},"application/srgs+xml":{"source":"iana","compressible":true,"extensions":["grxml"]},"application/sru+xml":{"source":"iana","compressible":true,"extensions":["sru"]},"application/ssdl+xml":{"source":"apache","compressible":true,"extensions":["ssdl"]},"application/ssml+xml":{"source":"iana","compressible":true,"extensions":["ssml"]},"application/stix+json":{"source":"iana","compressible":true},"application/swid+xml":{"source":"iana","compressible":true,"extensions":["swidtag"]},"application/tamp-apex-update":{"source":"iana"},"application/tamp-apex-update-confirm":{"source":"iana"},"application/tamp-community-update":{"source":"iana"},"application/tamp-community-update-confirm":{"source":"iana"},"application/tamp-error":{"source":"iana"},"application/tamp-sequence-adjust":{"source":"iana"},"application/tamp-sequence-adjust-confirm":{"source":"iana"},"application/tamp-status-query":{"source":"iana"},"application/tamp-status-response":{"source":"iana"},"application/tamp-update":{"source":"iana"},"application/tamp-update-confirm":{"source":"iana"},"application/tar":{"compressible":true},"application/taxii+json":{"source":"iana","compressible":true},"application/td+json":{"source":"iana","compressible":true},"application/tei+xml":{"source":"iana","compressible":true,"extensions":["tei","teicorpus"]},"application/tetra_isi":{"source":"iana"},"application/thraud+xml":{"source":"iana","compressible":true,"extensions":["tfi"]},"application/timestamp-query":{"source":"iana"},"application/timestamp-reply":{"source":"iana"},"application/timestamped-data":{"source":"iana","extensions":["tsd"]},"application/tlsrpt+gzip":{"source":"iana"},"application/tlsrpt+json":{"source":"iana","compressible":true},"application/tnauthlist":{"source":"iana"},"application/token-introspection+jwt":{"source":"iana"},"application/toml":{"compressible":true,"extensions":["toml"]},"application/trickle-ice-sdpfrag":{"source":"iana"},"application/trig":{"source":"iana","extensions":["trig"]},"application/ttml+xml":{"source":"iana","compressible":true,"extensions":["ttml"]},"application/tve-trigger":{"source":"iana"},"application/tzif":{"source":"iana"},"application/tzif-leap":{"source":"iana"},"application/ubjson":{"compressible":false,"extensions":["ubj"]},"application/ulpfec":{"source":"iana"},"application/urc-grpsheet+xml":{"source":"iana","compressible":true},"application/urc-ressheet+xml":{"source":"iana","compressible":true,"extensions":["rsheet"]},"application/urc-targetdesc+xml":{"source":"iana","compressible":true,"extensions":["td"]},"application/urc-uisocketdesc+xml":{"source":"iana","compressible":true},"application/vcard+json":{"source":"iana","compressible":true},"application/vcard+xml":{"source":"iana","compressible":true},"application/vemmi":{"source":"iana"},"application/vividence.scriptfile":{"source":"apache"},"application/vnd.1000minds.decision-model+xml":{"source":"iana","compressible":true,"extensions":["1km"]},"application/vnd.3gpp-prose+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-prose-pc3ch+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-v2x-local-service-information":{"source":"iana"},"application/vnd.3gpp.5gnas":{"source":"iana"},"application/vnd.3gpp.access-transfer-events+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.bsf+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gmop+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gtpc":{"source":"iana"},"application/vnd.3gpp.interworking-data":{"source":"iana"},"application/vnd.3gpp.lpp":{"source":"iana"},"application/vnd.3gpp.mc-signalling-ear":{"source":"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-payload":{"source":"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-signalling":{"source":"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-floor-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-signed+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-init-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-transmission-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mid-call+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ngap":{"source":"iana"},"application/vnd.3gpp.pfcp":{"source":"iana"},"application/vnd.3gpp.pic-bw-large":{"source":"iana","extensions":["plb"]},"application/vnd.3gpp.pic-bw-small":{"source":"iana","extensions":["psb"]},"application/vnd.3gpp.pic-bw-var":{"source":"iana","extensions":["pvb"]},"application/vnd.3gpp.s1ap":{"source":"iana"},"application/vnd.3gpp.sms":{"source":"iana"},"application/vnd.3gpp.sms+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-ext+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.state-and-event-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ussd+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.bcmcsinfo+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.sms":{"source":"iana"},"application/vnd.3gpp2.tcap":{"source":"iana","extensions":["tcap"]},"application/vnd.3lightssoftware.imagescal":{"source":"iana"},"application/vnd.3m.post-it-notes":{"source":"iana","extensions":["pwn"]},"application/vnd.accpac.simply.aso":{"source":"iana","extensions":["aso"]},"application/vnd.accpac.simply.imp":{"source":"iana","extensions":["imp"]},"application/vnd.acucobol":{"source":"iana","extensions":["acu"]},"application/vnd.acucorp":{"source":"iana","extensions":["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{"source":"apache","compressible":false,"extensions":["air"]},"application/vnd.adobe.flash.movie":{"source":"iana"},"application/vnd.adobe.formscentral.fcdt":{"source":"iana","extensions":["fcdt"]},"application/vnd.adobe.fxp":{"source":"iana","extensions":["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{"source":"iana"},"application/vnd.adobe.xdp+xml":{"source":"iana","compressible":true,"extensions":["xdp"]},"application/vnd.adobe.xfdf":{"source":"iana","extensions":["xfdf"]},"application/vnd.aether.imp":{"source":"iana"},"application/vnd.afpc.afplinedata":{"source":"iana"},"application/vnd.afpc.afplinedata-pagedef":{"source":"iana"},"application/vnd.afpc.cmoca-cmresource":{"source":"iana"},"application/vnd.afpc.foca-charset":{"source":"iana"},"application/vnd.afpc.foca-codedfont":{"source":"iana"},"application/vnd.afpc.foca-codepage":{"source":"iana"},"application/vnd.afpc.modca":{"source":"iana"},"application/vnd.afpc.modca-cmtable":{"source":"iana"},"application/vnd.afpc.modca-formdef":{"source":"iana"},"application/vnd.afpc.modca-mediummap":{"source":"iana"},"application/vnd.afpc.modca-objectcontainer":{"source":"iana"},"application/vnd.afpc.modca-overlay":{"source":"iana"},"application/vnd.afpc.modca-pagesegment":{"source":"iana"},"application/vnd.age":{"source":"iana","extensions":["age"]},"application/vnd.ah-barcode":{"source":"iana"},"application/vnd.ahead.space":{"source":"iana","extensions":["ahead"]},"application/vnd.airzip.filesecure.azf":{"source":"iana","extensions":["azf"]},"application/vnd.airzip.filesecure.azs":{"source":"iana","extensions":["azs"]},"application/vnd.amadeus+json":{"source":"iana","compressible":true},"application/vnd.amazon.ebook":{"source":"apache","extensions":["azw"]},"application/vnd.amazon.mobi8-ebook":{"source":"iana"},"application/vnd.americandynamics.acc":{"source":"iana","extensions":["acc"]},"application/vnd.amiga.ami":{"source":"iana","extensions":["ami"]},"application/vnd.amundsen.maze+xml":{"source":"iana","compressible":true},"application/vnd.android.ota":{"source":"iana"},"application/vnd.android.package-archive":{"source":"apache","compressible":false,"extensions":["apk"]},"application/vnd.anki":{"source":"iana"},"application/vnd.anser-web-certificate-issue-initiation":{"source":"iana","extensions":["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{"source":"apache","extensions":["fti"]},"application/vnd.antix.game-component":{"source":"iana","extensions":["atx"]},"application/vnd.apache.arrow.file":{"source":"iana"},"application/vnd.apache.arrow.stream":{"source":"iana"},"application/vnd.apache.thrift.binary":{"source":"iana"},"application/vnd.apache.thrift.compact":{"source":"iana"},"application/vnd.apache.thrift.json":{"source":"iana"},"application/vnd.api+json":{"source":"iana","compressible":true},"application/vnd.aplextor.warrp+json":{"source":"iana","compressible":true},"application/vnd.apothekende.reservation+json":{"source":"iana","compressible":true},"application/vnd.apple.installer+xml":{"source":"iana","compressible":true,"extensions":["mpkg"]},"application/vnd.apple.keynote":{"source":"iana","extensions":["key"]},"application/vnd.apple.mpegurl":{"source":"iana","extensions":["m3u8"]},"application/vnd.apple.numbers":{"source":"iana","extensions":["numbers"]},"application/vnd.apple.pages":{"source":"iana","extensions":["pages"]},"application/vnd.apple.pkpass":{"compressible":false,"extensions":["pkpass"]},"application/vnd.arastra.swi":{"source":"iana"},"application/vnd.aristanetworks.swi":{"source":"iana","extensions":["swi"]},"application/vnd.artisan+json":{"source":"iana","compressible":true},"application/vnd.artsquare":{"source":"iana"},"application/vnd.astraea-software.iota":{"source":"iana","extensions":["iota"]},"application/vnd.audiograph":{"source":"iana","extensions":["aep"]},"application/vnd.autopackage":{"source":"iana"},"application/vnd.avalon+json":{"source":"iana","compressible":true},"application/vnd.avistar+xml":{"source":"iana","compressible":true},"application/vnd.balsamiq.bmml+xml":{"source":"iana","compressible":true,"extensions":["bmml"]},"application/vnd.balsamiq.bmpr":{"source":"iana"},"application/vnd.banana-accounting":{"source":"iana"},"application/vnd.bbf.usp.error":{"source":"iana"},"application/vnd.bbf.usp.msg":{"source":"iana"},"application/vnd.bbf.usp.msg+json":{"source":"iana","compressible":true},"application/vnd.bekitzur-stech+json":{"source":"iana","compressible":true},"application/vnd.bint.med-content":{"source":"iana"},"application/vnd.biopax.rdf+xml":{"source":"iana","compressible":true},"application/vnd.blink-idb-value-wrapper":{"source":"iana"},"application/vnd.blueice.multipass":{"source":"iana","extensions":["mpm"]},"application/vnd.bluetooth.ep.oob":{"source":"iana"},"application/vnd.bluetooth.le.oob":{"source":"iana"},"application/vnd.bmi":{"source":"iana","extensions":["bmi"]},"application/vnd.bpf":{"source":"iana"},"application/vnd.bpf3":{"source":"iana"},"application/vnd.businessobjects":{"source":"iana","extensions":["rep"]},"application/vnd.byu.uapi+json":{"source":"iana","compressible":true},"application/vnd.cab-jscript":{"source":"iana"},"application/vnd.canon-cpdl":{"source":"iana"},"application/vnd.canon-lips":{"source":"iana"},"application/vnd.capasystems-pg+json":{"source":"iana","compressible":true},"application/vnd.cendio.thinlinc.clientconf":{"source":"iana"},"application/vnd.century-systems.tcp_stream":{"source":"iana"},"application/vnd.chemdraw+xml":{"source":"iana","compressible":true,"extensions":["cdxml"]},"application/vnd.chess-pgn":{"source":"iana"},"application/vnd.chipnuts.karaoke-mmd":{"source":"iana","extensions":["mmd"]},"application/vnd.ciedi":{"source":"iana"},"application/vnd.cinderella":{"source":"iana","extensions":["cdy"]},"application/vnd.cirpack.isdn-ext":{"source":"iana"},"application/vnd.citationstyles.style+xml":{"source":"iana","compressible":true,"extensions":["csl"]},"application/vnd.claymore":{"source":"iana","extensions":["cla"]},"application/vnd.cloanto.rp9":{"source":"iana","extensions":["rp9"]},"application/vnd.clonk.c4group":{"source":"iana","extensions":["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{"source":"iana","extensions":["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{"source":"iana","extensions":["c11amz"]},"application/vnd.coffeescript":{"source":"iana"},"application/vnd.collabio.xodocuments.document":{"source":"iana"},"application/vnd.collabio.xodocuments.document-template":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation-template":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{"source":"iana"},"application/vnd.collection+json":{"source":"iana","compressible":true},"application/vnd.collection.doc+json":{"source":"iana","compressible":true},"application/vnd.collection.next+json":{"source":"iana","compressible":true},"application/vnd.comicbook+zip":{"source":"iana","compressible":false},"application/vnd.comicbook-rar":{"source":"iana"},"application/vnd.commerce-battelle":{"source":"iana"},"application/vnd.commonspace":{"source":"iana","extensions":["csp"]},"application/vnd.contact.cmsg":{"source":"iana","extensions":["cdbcmsg"]},"application/vnd.coreos.ignition+json":{"source":"iana","compressible":true},"application/vnd.cosmocaller":{"source":"iana","extensions":["cmc"]},"application/vnd.crick.clicker":{"source":"iana","extensions":["clkx"]},"application/vnd.crick.clicker.keyboard":{"source":"iana","extensions":["clkk"]},"application/vnd.crick.clicker.palette":{"source":"iana","extensions":["clkp"]},"application/vnd.crick.clicker.template":{"source":"iana","extensions":["clkt"]},"application/vnd.crick.clicker.wordbank":{"source":"iana","extensions":["clkw"]},"application/vnd.criticaltools.wbs+xml":{"source":"iana","compressible":true,"extensions":["wbs"]},"application/vnd.cryptii.pipe+json":{"source":"iana","compressible":true},"application/vnd.crypto-shade-file":{"source":"iana"},"application/vnd.cryptomator.encrypted":{"source":"iana"},"application/vnd.cryptomator.vault":{"source":"iana"},"application/vnd.ctc-posml":{"source":"iana","extensions":["pml"]},"application/vnd.ctct.ws+xml":{"source":"iana","compressible":true},"application/vnd.cups-pdf":{"source":"iana"},"application/vnd.cups-postscript":{"source":"iana"},"application/vnd.cups-ppd":{"source":"iana","extensions":["ppd"]},"application/vnd.cups-raster":{"source":"iana"},"application/vnd.cups-raw":{"source":"iana"},"application/vnd.curl":{"source":"iana"},"application/vnd.curl.car":{"source":"apache","extensions":["car"]},"application/vnd.curl.pcurl":{"source":"apache","extensions":["pcurl"]},"application/vnd.cyan.dean.root+xml":{"source":"iana","compressible":true},"application/vnd.cybank":{"source":"iana"},"application/vnd.cyclonedx+json":{"source":"iana","compressible":true},"application/vnd.cyclonedx+xml":{"source":"iana","compressible":true},"application/vnd.d2l.coursepackage1p0+zip":{"source":"iana","compressible":false},"application/vnd.d3m-dataset":{"source":"iana"},"application/vnd.d3m-problem":{"source":"iana"},"application/vnd.dart":{"source":"iana","compressible":true,"extensions":["dart"]},"application/vnd.data-vision.rdz":{"source":"iana","extensions":["rdz"]},"application/vnd.datapackage+json":{"source":"iana","compressible":true},"application/vnd.dataresource+json":{"source":"iana","compressible":true},"application/vnd.dbf":{"source":"iana","extensions":["dbf"]},"application/vnd.debian.binary-package":{"source":"iana"},"application/vnd.dece.data":{"source":"iana","extensions":["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{"source":"iana","compressible":true,"extensions":["uvt","uvvt"]},"application/vnd.dece.unspecified":{"source":"iana","extensions":["uvx","uvvx"]},"application/vnd.dece.zip":{"source":"iana","extensions":["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{"source":"iana","extensions":["fe_launch"]},"application/vnd.desmume.movie":{"source":"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{"source":"iana"},"application/vnd.dm.delegation+xml":{"source":"iana","compressible":true},"application/vnd.dna":{"source":"iana","extensions":["dna"]},"application/vnd.document+json":{"source":"iana","compressible":true},"application/vnd.dolby.mlp":{"source":"apache","extensions":["mlp"]},"application/vnd.dolby.mobile.1":{"source":"iana"},"application/vnd.dolby.mobile.2":{"source":"iana"},"application/vnd.doremir.scorecloud-binary-document":{"source":"iana"},"application/vnd.dpgraph":{"source":"iana","extensions":["dpg"]},"application/vnd.dreamfactory":{"source":"iana","extensions":["dfac"]},"application/vnd.drive+json":{"source":"iana","compressible":true},"application/vnd.ds-keypoint":{"source":"apache","extensions":["kpxx"]},"application/vnd.dtg.local":{"source":"iana"},"application/vnd.dtg.local.flash":{"source":"iana"},"application/vnd.dtg.local.html":{"source":"iana"},"application/vnd.dvb.ait":{"source":"iana","extensions":["ait"]},"application/vnd.dvb.dvbisl+xml":{"source":"iana","compressible":true},"application/vnd.dvb.dvbj":{"source":"iana"},"application/vnd.dvb.esgcontainer":{"source":"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess2":{"source":"iana"},"application/vnd.dvb.ipdcesgpdd":{"source":"iana"},"application/vnd.dvb.ipdcroaming":{"source":"iana"},"application/vnd.dvb.iptv.alfec-base":{"source":"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{"source":"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-container+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-generic+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-msglist+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-request+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-response+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-init+xml":{"source":"iana","compressible":true},"application/vnd.dvb.pfr":{"source":"iana"},"application/vnd.dvb.service":{"source":"iana","extensions":["svc"]},"application/vnd.dxr":{"source":"iana"},"application/vnd.dynageo":{"source":"iana","extensions":["geo"]},"application/vnd.dzr":{"source":"iana"},"application/vnd.easykaraoke.cdgdownload":{"source":"iana"},"application/vnd.ecdis-update":{"source":"iana"},"application/vnd.ecip.rlp":{"source":"iana"},"application/vnd.eclipse.ditto+json":{"source":"iana","compressible":true},"application/vnd.ecowin.chart":{"source":"iana","extensions":["mag"]},"application/vnd.ecowin.filerequest":{"source":"iana"},"application/vnd.ecowin.fileupdate":{"source":"iana"},"application/vnd.ecowin.series":{"source":"iana"},"application/vnd.ecowin.seriesrequest":{"source":"iana"},"application/vnd.ecowin.seriesupdate":{"source":"iana"},"application/vnd.efi.img":{"source":"iana"},"application/vnd.efi.iso":{"source":"iana"},"application/vnd.emclient.accessrequest+xml":{"source":"iana","compressible":true},"application/vnd.enliven":{"source":"iana","extensions":["nml"]},"application/vnd.enphase.envoy":{"source":"iana"},"application/vnd.eprints.data+xml":{"source":"iana","compressible":true},"application/vnd.epson.esf":{"source":"iana","extensions":["esf"]},"application/vnd.epson.msf":{"source":"iana","extensions":["msf"]},"application/vnd.epson.quickanime":{"source":"iana","extensions":["qam"]},"application/vnd.epson.salt":{"source":"iana","extensions":["slt"]},"application/vnd.epson.ssf":{"source":"iana","extensions":["ssf"]},"application/vnd.ericsson.quickcall":{"source":"iana"},"application/vnd.espass-espass+zip":{"source":"iana","compressible":false},"application/vnd.eszigno3+xml":{"source":"iana","compressible":true,"extensions":["es3","et3"]},"application/vnd.etsi.aoc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.asic-e+zip":{"source":"iana","compressible":false},"application/vnd.etsi.asic-s+zip":{"source":"iana","compressible":false},"application/vnd.etsi.cug+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvcommand+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-bc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-cod+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-npvr+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvservice+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsync+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvueprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mcid+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mheg5":{"source":"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{"source":"iana","compressible":true},"application/vnd.etsi.pstn+xml":{"source":"iana","compressible":true},"application/vnd.etsi.sci+xml":{"source":"iana","compressible":true},"application/vnd.etsi.simservs+xml":{"source":"iana","compressible":true},"application/vnd.etsi.timestamp-token":{"source":"iana"},"application/vnd.etsi.tsl+xml":{"source":"iana","compressible":true},"application/vnd.etsi.tsl.der":{"source":"iana"},"application/vnd.eu.kasparian.car+json":{"source":"iana","compressible":true},"application/vnd.eudora.data":{"source":"iana"},"application/vnd.evolv.ecig.profile":{"source":"iana"},"application/vnd.evolv.ecig.settings":{"source":"iana"},"application/vnd.evolv.ecig.theme":{"source":"iana"},"application/vnd.exstream-empower+zip":{"source":"iana","compressible":false},"application/vnd.exstream-package":{"source":"iana"},"application/vnd.ezpix-album":{"source":"iana","extensions":["ez2"]},"application/vnd.ezpix-package":{"source":"iana","extensions":["ez3"]},"application/vnd.f-secure.mobile":{"source":"iana"},"application/vnd.familysearch.gedcom+zip":{"source":"iana","compressible":false},"application/vnd.fastcopy-disk-image":{"source":"iana"},"application/vnd.fdf":{"source":"iana","extensions":["fdf"]},"application/vnd.fdsn.mseed":{"source":"iana","extensions":["mseed"]},"application/vnd.fdsn.seed":{"source":"iana","extensions":["seed","dataless"]},"application/vnd.ffsns":{"source":"iana"},"application/vnd.ficlab.flb+zip":{"source":"iana","compressible":false},"application/vnd.filmit.zfc":{"source":"iana"},"application/vnd.fints":{"source":"iana"},"application/vnd.firemonkeys.cloudcell":{"source":"iana"},"application/vnd.flographit":{"source":"iana","extensions":["gph"]},"application/vnd.fluxtime.clip":{"source":"iana","extensions":["ftc"]},"application/vnd.font-fontforge-sfd":{"source":"iana"},"application/vnd.framemaker":{"source":"iana","extensions":["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{"source":"iana","extensions":["fnc"]},"application/vnd.frogans.ltf":{"source":"iana","extensions":["ltf"]},"application/vnd.fsc.weblaunch":{"source":"iana","extensions":["fsc"]},"application/vnd.fujifilm.fb.docuworks":{"source":"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{"source":"iana"},"application/vnd.fujifilm.fb.docuworks.container":{"source":"iana"},"application/vnd.fujifilm.fb.jfi+xml":{"source":"iana","compressible":true},"application/vnd.fujitsu.oasys":{"source":"iana","extensions":["oas"]},"application/vnd.fujitsu.oasys2":{"source":"iana","extensions":["oa2"]},"application/vnd.fujitsu.oasys3":{"source":"iana","extensions":["oa3"]},"application/vnd.fujitsu.oasysgp":{"source":"iana","extensions":["fg5"]},"application/vnd.fujitsu.oasysprs":{"source":"iana","extensions":["bh2"]},"application/vnd.fujixerox.art-ex":{"source":"iana"},"application/vnd.fujixerox.art4":{"source":"iana"},"application/vnd.fujixerox.ddd":{"source":"iana","extensions":["ddd"]},"application/vnd.fujixerox.docuworks":{"source":"iana","extensions":["xdw"]},"application/vnd.fujixerox.docuworks.binder":{"source":"iana","extensions":["xbd"]},"application/vnd.fujixerox.docuworks.container":{"source":"iana"},"application/vnd.fujixerox.hbpl":{"source":"iana"},"application/vnd.fut-misnet":{"source":"iana"},"application/vnd.futoin+cbor":{"source":"iana"},"application/vnd.futoin+json":{"source":"iana","compressible":true},"application/vnd.fuzzysheet":{"source":"iana","extensions":["fzs"]},"application/vnd.genomatix.tuxedo":{"source":"iana","extensions":["txd"]},"application/vnd.gentics.grd+json":{"source":"iana","compressible":true},"application/vnd.geo+json":{"source":"iana","compressible":true},"application/vnd.geocube+xml":{"source":"iana","compressible":true},"application/vnd.geogebra.file":{"source":"iana","extensions":["ggb"]},"application/vnd.geogebra.slides":{"source":"iana"},"application/vnd.geogebra.tool":{"source":"iana","extensions":["ggt"]},"application/vnd.geometry-explorer":{"source":"iana","extensions":["gex","gre"]},"application/vnd.geonext":{"source":"iana","extensions":["gxt"]},"application/vnd.geoplan":{"source":"iana","extensions":["g2w"]},"application/vnd.geospace":{"source":"iana","extensions":["g3w"]},"application/vnd.gerber":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt-response":{"source":"iana"},"application/vnd.gmx":{"source":"iana","extensions":["gmx"]},"application/vnd.google-apps.document":{"compressible":false,"extensions":["gdoc"]},"application/vnd.google-apps.presentation":{"compressible":false,"extensions":["gslides"]},"application/vnd.google-apps.spreadsheet":{"compressible":false,"extensions":["gsheet"]},"application/vnd.google-earth.kml+xml":{"source":"iana","compressible":true,"extensions":["kml"]},"application/vnd.google-earth.kmz":{"source":"iana","compressible":false,"extensions":["kmz"]},"application/vnd.gov.sk.e-form+xml":{"source":"iana","compressible":true},"application/vnd.gov.sk.e-form+zip":{"source":"iana","compressible":false},"application/vnd.gov.sk.xmldatacontainer+xml":{"source":"iana","compressible":true},"application/vnd.grafeq":{"source":"iana","extensions":["gqf","gqs"]},"application/vnd.gridmp":{"source":"iana"},"application/vnd.groove-account":{"source":"iana","extensions":["gac"]},"application/vnd.groove-help":{"source":"iana","extensions":["ghf"]},"application/vnd.groove-identity-message":{"source":"iana","extensions":["gim"]},"application/vnd.groove-injector":{"source":"iana","extensions":["grv"]},"application/vnd.groove-tool-message":{"source":"iana","extensions":["gtm"]},"application/vnd.groove-tool-template":{"source":"iana","extensions":["tpl"]},"application/vnd.groove-vcard":{"source":"iana","extensions":["vcg"]},"application/vnd.hal+json":{"source":"iana","compressible":true},"application/vnd.hal+xml":{"source":"iana","compressible":true,"extensions":["hal"]},"application/vnd.handheld-entertainment+xml":{"source":"iana","compressible":true,"extensions":["zmm"]},"application/vnd.hbci":{"source":"iana","extensions":["hbci"]},"application/vnd.hc+json":{"source":"iana","compressible":true},"application/vnd.hcl-bireports":{"source":"iana"},"application/vnd.hdt":{"source":"iana"},"application/vnd.heroku+json":{"source":"iana","compressible":true},"application/vnd.hhe.lesson-player":{"source":"iana","extensions":["les"]},"application/vnd.hl7cda+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.hl7v2+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.hp-hpgl":{"source":"iana","extensions":["hpgl"]},"application/vnd.hp-hpid":{"source":"iana","extensions":["hpid"]},"application/vnd.hp-hps":{"source":"iana","extensions":["hps"]},"application/vnd.hp-jlyt":{"source":"iana","extensions":["jlt"]},"application/vnd.hp-pcl":{"source":"iana","extensions":["pcl"]},"application/vnd.hp-pclxl":{"source":"iana","extensions":["pclxl"]},"application/vnd.httphone":{"source":"iana"},"application/vnd.hydrostatix.sof-data":{"source":"iana","extensions":["sfd-hdstx"]},"application/vnd.hyper+json":{"source":"iana","compressible":true},"application/vnd.hyper-item+json":{"source":"iana","compressible":true},"application/vnd.hyperdrive+json":{"source":"iana","compressible":true},"application/vnd.hzn-3d-crossword":{"source":"iana"},"application/vnd.ibm.afplinedata":{"source":"iana"},"application/vnd.ibm.electronic-media":{"source":"iana"},"application/vnd.ibm.minipay":{"source":"iana","extensions":["mpy"]},"application/vnd.ibm.modcap":{"source":"iana","extensions":["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{"source":"iana","extensions":["irm"]},"application/vnd.ibm.secure-container":{"source":"iana","extensions":["sc"]},"application/vnd.iccprofile":{"source":"iana","extensions":["icc","icm"]},"application/vnd.ieee.1905":{"source":"iana"},"application/vnd.igloader":{"source":"iana","extensions":["igl"]},"application/vnd.imagemeter.folder+zip":{"source":"iana","compressible":false},"application/vnd.imagemeter.image+zip":{"source":"iana","compressible":false},"application/vnd.immervision-ivp":{"source":"iana","extensions":["ivp"]},"application/vnd.immervision-ivu":{"source":"iana","extensions":["ivu"]},"application/vnd.ims.imsccv1p1":{"source":"iana"},"application/vnd.ims.imsccv1p2":{"source":"iana"},"application/vnd.ims.imsccv1p3":{"source":"iana"},"application/vnd.ims.lis.v2.result+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy.id+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings.simple+json":{"source":"iana","compressible":true},"application/vnd.informedcontrol.rms+xml":{"source":"iana","compressible":true},"application/vnd.informix-visionary":{"source":"iana"},"application/vnd.infotech.project":{"source":"iana"},"application/vnd.infotech.project+xml":{"source":"iana","compressible":true},"application/vnd.innopath.wamp.notification":{"source":"iana"},"application/vnd.insors.igm":{"source":"iana","extensions":["igm"]},"application/vnd.intercon.formnet":{"source":"iana","extensions":["xpw","xpx"]},"application/vnd.intergeo":{"source":"iana","extensions":["i2g"]},"application/vnd.intertrust.digibox":{"source":"iana"},"application/vnd.intertrust.nncp":{"source":"iana"},"application/vnd.intu.qbo":{"source":"iana","extensions":["qbo"]},"application/vnd.intu.qfx":{"source":"iana","extensions":["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.conceptitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.knowledgeitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsmessage+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.packageitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.planningitem+xml":{"source":"iana","compressible":true},"application/vnd.ipunplugged.rcprofile":{"source":"iana","extensions":["rcprofile"]},"application/vnd.irepository.package+xml":{"source":"iana","compressible":true,"extensions":["irp"]},"application/vnd.is-xpr":{"source":"iana","extensions":["xpr"]},"application/vnd.isac.fcs":{"source":"iana","extensions":["fcs"]},"application/vnd.iso11783-10+zip":{"source":"iana","compressible":false},"application/vnd.jam":{"source":"iana","extensions":["jam"]},"application/vnd.japannet-directory-service":{"source":"iana"},"application/vnd.japannet-jpnstore-wakeup":{"source":"iana"},"application/vnd.japannet-payment-wakeup":{"source":"iana"},"application/vnd.japannet-registration":{"source":"iana"},"application/vnd.japannet-registration-wakeup":{"source":"iana"},"application/vnd.japannet-setstore-wakeup":{"source":"iana"},"application/vnd.japannet-verification":{"source":"iana"},"application/vnd.japannet-verification-wakeup":{"source":"iana"},"application/vnd.jcp.javame.midlet-rms":{"source":"iana","extensions":["rms"]},"application/vnd.jisp":{"source":"iana","extensions":["jisp"]},"application/vnd.joost.joda-archive":{"source":"iana","extensions":["joda"]},"application/vnd.jsk.isdn-ngn":{"source":"iana"},"application/vnd.kahootz":{"source":"iana","extensions":["ktz","ktr"]},"application/vnd.kde.karbon":{"source":"iana","extensions":["karbon"]},"application/vnd.kde.kchart":{"source":"iana","extensions":["chrt"]},"application/vnd.kde.kformula":{"source":"iana","extensions":["kfo"]},"application/vnd.kde.kivio":{"source":"iana","extensions":["flw"]},"application/vnd.kde.kontour":{"source":"iana","extensions":["kon"]},"application/vnd.kde.kpresenter":{"source":"iana","extensions":["kpr","kpt"]},"application/vnd.kde.kspread":{"source":"iana","extensions":["ksp"]},"application/vnd.kde.kword":{"source":"iana","extensions":["kwd","kwt"]},"application/vnd.kenameaapp":{"source":"iana","extensions":["htke"]},"application/vnd.kidspiration":{"source":"iana","extensions":["kia"]},"application/vnd.kinar":{"source":"iana","extensions":["kne","knp"]},"application/vnd.koan":{"source":"iana","extensions":["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{"source":"iana","extensions":["sse"]},"application/vnd.las":{"source":"iana"},"application/vnd.las.las+json":{"source":"iana","compressible":true},"application/vnd.las.las+xml":{"source":"iana","compressible":true,"extensions":["lasxml"]},"application/vnd.laszip":{"source":"iana"},"application/vnd.leap+json":{"source":"iana","compressible":true},"application/vnd.liberty-request+xml":{"source":"iana","compressible":true},"application/vnd.llamagraphics.life-balance.desktop":{"source":"iana","extensions":["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{"source":"iana","compressible":true,"extensions":["lbe"]},"application/vnd.logipipe.circuit+zip":{"source":"iana","compressible":false},"application/vnd.loom":{"source":"iana"},"application/vnd.lotus-1-2-3":{"source":"iana","extensions":["123"]},"application/vnd.lotus-approach":{"source":"iana","extensions":["apr"]},"application/vnd.lotus-freelance":{"source":"iana","extensions":["pre"]},"application/vnd.lotus-notes":{"source":"iana","extensions":["nsf"]},"application/vnd.lotus-organizer":{"source":"iana","extensions":["org"]},"application/vnd.lotus-screencam":{"source":"iana","extensions":["scm"]},"application/vnd.lotus-wordpro":{"source":"iana","extensions":["lwp"]},"application/vnd.macports.portpkg":{"source":"iana","extensions":["portpkg"]},"application/vnd.mapbox-vector-tile":{"source":"iana","extensions":["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.conftoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.license+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.mdcf":{"source":"iana"},"application/vnd.mason+json":{"source":"iana","compressible":true},"application/vnd.maxar.archive.3tz+zip":{"source":"iana","compressible":false},"application/vnd.maxmind.maxmind-db":{"source":"iana"},"application/vnd.mcd":{"source":"iana","extensions":["mcd"]},"application/vnd.medcalcdata":{"source":"iana","extensions":["mc1"]},"application/vnd.mediastation.cdkey":{"source":"iana","extensions":["cdkey"]},"application/vnd.meridian-slingshot":{"source":"iana"},"application/vnd.mfer":{"source":"iana","extensions":["mwf"]},"application/vnd.mfmp":{"source":"iana","extensions":["mfm"]},"application/vnd.micro+json":{"source":"iana","compressible":true},"application/vnd.micrografx.flo":{"source":"iana","extensions":["flo"]},"application/vnd.micrografx.igx":{"source":"iana","extensions":["igx"]},"application/vnd.microsoft.portable-executable":{"source":"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{"source":"iana"},"application/vnd.miele+json":{"source":"iana","compressible":true},"application/vnd.mif":{"source":"iana","extensions":["mif"]},"application/vnd.minisoft-hp3000-save":{"source":"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{"source":"iana"},"application/vnd.mobius.daf":{"source":"iana","extensions":["daf"]},"application/vnd.mobius.dis":{"source":"iana","extensions":["dis"]},"application/vnd.mobius.mbk":{"source":"iana","extensions":["mbk"]},"application/vnd.mobius.mqy":{"source":"iana","extensions":["mqy"]},"application/vnd.mobius.msl":{"source":"iana","extensions":["msl"]},"application/vnd.mobius.plc":{"source":"iana","extensions":["plc"]},"application/vnd.mobius.txf":{"source":"iana","extensions":["txf"]},"application/vnd.mophun.application":{"source":"iana","extensions":["mpn"]},"application/vnd.mophun.certificate":{"source":"iana","extensions":["mpc"]},"application/vnd.motorola.flexsuite":{"source":"iana"},"application/vnd.motorola.flexsuite.adsi":{"source":"iana"},"application/vnd.motorola.flexsuite.fis":{"source":"iana"},"application/vnd.motorola.flexsuite.gotap":{"source":"iana"},"application/vnd.motorola.flexsuite.kmr":{"source":"iana"},"application/vnd.motorola.flexsuite.ttc":{"source":"iana"},"application/vnd.motorola.flexsuite.wem":{"source":"iana"},"application/vnd.motorola.iprm":{"source":"iana"},"application/vnd.mozilla.xul+xml":{"source":"iana","compressible":true,"extensions":["xul"]},"application/vnd.ms-3mfdocument":{"source":"iana"},"application/vnd.ms-artgalry":{"source":"iana","extensions":["cil"]},"application/vnd.ms-asf":{"source":"iana"},"application/vnd.ms-cab-compressed":{"source":"iana","extensions":["cab"]},"application/vnd.ms-color.iccprofile":{"source":"apache"},"application/vnd.ms-excel":{"source":"iana","compressible":false,"extensions":["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{"source":"iana","extensions":["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{"source":"iana","extensions":["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{"source":"iana","extensions":["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{"source":"iana","extensions":["xltm"]},"application/vnd.ms-fontobject":{"source":"iana","compressible":true,"extensions":["eot"]},"application/vnd.ms-htmlhelp":{"source":"iana","extensions":["chm"]},"application/vnd.ms-ims":{"source":"iana","extensions":["ims"]},"application/vnd.ms-lrm":{"source":"iana","extensions":["lrm"]},"application/vnd.ms-office.activex+xml":{"source":"iana","compressible":true},"application/vnd.ms-officetheme":{"source":"iana","extensions":["thmx"]},"application/vnd.ms-opentype":{"source":"apache","compressible":true},"application/vnd.ms-outlook":{"compressible":false,"extensions":["msg"]},"application/vnd.ms-package.obfuscated-opentype":{"source":"apache"},"application/vnd.ms-pki.seccat":{"source":"apache","extensions":["cat"]},"application/vnd.ms-pki.stl":{"source":"apache","extensions":["stl"]},"application/vnd.ms-playready.initiator+xml":{"source":"iana","compressible":true},"application/vnd.ms-powerpoint":{"source":"iana","compressible":false,"extensions":["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{"source":"iana","extensions":["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{"source":"iana","extensions":["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{"source":"iana","extensions":["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{"source":"iana","extensions":["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{"source":"iana","extensions":["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{"source":"iana","compressible":true},"application/vnd.ms-printing.printticket+xml":{"source":"apache","compressible":true},"application/vnd.ms-printschematicket+xml":{"source":"iana","compressible":true},"application/vnd.ms-project":{"source":"iana","extensions":["mpp","mpt"]},"application/vnd.ms-tnef":{"source":"iana"},"application/vnd.ms-windows.devicepairing":{"source":"iana"},"application/vnd.ms-windows.nwprinting.oob":{"source":"iana"},"application/vnd.ms-windows.printerpairing":{"source":"iana"},"application/vnd.ms-windows.wsd.oob":{"source":"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.lic-resp":{"source":"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.meter-resp":{"source":"iana"},"application/vnd.ms-word.document.macroenabled.12":{"source":"iana","extensions":["docm"]},"application/vnd.ms-word.template.macroenabled.12":{"source":"iana","extensions":["dotm"]},"application/vnd.ms-works":{"source":"iana","extensions":["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{"source":"iana","extensions":["wpl"]},"application/vnd.ms-xpsdocument":{"source":"iana","compressible":false,"extensions":["xps"]},"application/vnd.msa-disk-image":{"source":"iana"},"application/vnd.mseq":{"source":"iana","extensions":["mseq"]},"application/vnd.msign":{"source":"iana"},"application/vnd.multiad.creator":{"source":"iana"},"application/vnd.multiad.creator.cif":{"source":"iana"},"application/vnd.music-niff":{"source":"iana"},"application/vnd.musician":{"source":"iana","extensions":["mus"]},"application/vnd.muvee.style":{"source":"iana","extensions":["msty"]},"application/vnd.mynfc":{"source":"iana","extensions":["taglet"]},"application/vnd.nacamar.ybrid+json":{"source":"iana","compressible":true},"application/vnd.ncd.control":{"source":"iana"},"application/vnd.ncd.reference":{"source":"iana"},"application/vnd.nearst.inv+json":{"source":"iana","compressible":true},"application/vnd.nebumind.line":{"source":"iana"},"application/vnd.nervana":{"source":"iana"},"application/vnd.netfpx":{"source":"iana"},"application/vnd.neurolanguage.nlu":{"source":"iana","extensions":["nlu"]},"application/vnd.nimn":{"source":"iana"},"application/vnd.nintendo.nitro.rom":{"source":"iana"},"application/vnd.nintendo.snes.rom":{"source":"iana"},"application/vnd.nitf":{"source":"iana","extensions":["ntf","nitf"]},"application/vnd.noblenet-directory":{"source":"iana","extensions":["nnd"]},"application/vnd.noblenet-sealer":{"source":"iana","extensions":["nns"]},"application/vnd.noblenet-web":{"source":"iana","extensions":["nnw"]},"application/vnd.nokia.catalogs":{"source":"iana"},"application/vnd.nokia.conml+wbxml":{"source":"iana"},"application/vnd.nokia.conml+xml":{"source":"iana","compressible":true},"application/vnd.nokia.iptv.config+xml":{"source":"iana","compressible":true},"application/vnd.nokia.isds-radio-presets":{"source":"iana"},"application/vnd.nokia.landmark+wbxml":{"source":"iana"},"application/vnd.nokia.landmark+xml":{"source":"iana","compressible":true},"application/vnd.nokia.landmarkcollection+xml":{"source":"iana","compressible":true},"application/vnd.nokia.n-gage.ac+xml":{"source":"iana","compressible":true,"extensions":["ac"]},"application/vnd.nokia.n-gage.data":{"source":"iana","extensions":["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{"source":"iana","extensions":["n-gage"]},"application/vnd.nokia.ncd":{"source":"iana"},"application/vnd.nokia.pcd+wbxml":{"source":"iana"},"application/vnd.nokia.pcd+xml":{"source":"iana","compressible":true},"application/vnd.nokia.radio-preset":{"source":"iana","extensions":["rpst"]},"application/vnd.nokia.radio-presets":{"source":"iana","extensions":["rpss"]},"application/vnd.novadigm.edm":{"source":"iana","extensions":["edm"]},"application/vnd.novadigm.edx":{"source":"iana","extensions":["edx"]},"application/vnd.novadigm.ext":{"source":"iana","extensions":["ext"]},"application/vnd.ntt-local.content-share":{"source":"iana"},"application/vnd.ntt-local.file-transfer":{"source":"iana"},"application/vnd.ntt-local.ogw_remote-access":{"source":"iana"},"application/vnd.ntt-local.sip-ta_remote":{"source":"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{"source":"iana"},"application/vnd.oasis.opendocument.chart":{"source":"iana","extensions":["odc"]},"application/vnd.oasis.opendocument.chart-template":{"source":"iana","extensions":["otc"]},"application/vnd.oasis.opendocument.database":{"source":"iana","extensions":["odb"]},"application/vnd.oasis.opendocument.formula":{"source":"iana","extensions":["odf"]},"application/vnd.oasis.opendocument.formula-template":{"source":"iana","extensions":["odft"]},"application/vnd.oasis.opendocument.graphics":{"source":"iana","compressible":false,"extensions":["odg"]},"application/vnd.oasis.opendocument.graphics-template":{"source":"iana","extensions":["otg"]},"application/vnd.oasis.opendocument.image":{"source":"iana","extensions":["odi"]},"application/vnd.oasis.opendocument.image-template":{"source":"iana","extensions":["oti"]},"application/vnd.oasis.opendocument.presentation":{"source":"iana","compressible":false,"extensions":["odp"]},"application/vnd.oasis.opendocument.presentation-template":{"source":"iana","extensions":["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{"source":"iana","compressible":false,"extensions":["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{"source":"iana","extensions":["ots"]},"application/vnd.oasis.opendocument.text":{"source":"iana","compressible":false,"extensions":["odt"]},"application/vnd.oasis.opendocument.text-master":{"source":"iana","extensions":["odm"]},"application/vnd.oasis.opendocument.text-template":{"source":"iana","extensions":["ott"]},"application/vnd.oasis.opendocument.text-web":{"source":"iana","extensions":["oth"]},"application/vnd.obn":{"source":"iana"},"application/vnd.ocf+cbor":{"source":"iana"},"application/vnd.oci.image.manifest.v1+json":{"source":"iana","compressible":true},"application/vnd.oftn.l10n+json":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessdownload+xml":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessstreaming+xml":{"source":"iana","compressible":true},"application/vnd.oipf.cspg-hexbinary":{"source":"iana"},"application/vnd.oipf.dae.svg+xml":{"source":"iana","compressible":true},"application/vnd.oipf.dae.xhtml+xml":{"source":"iana","compressible":true},"application/vnd.oipf.mippvcontrolmessage+xml":{"source":"iana","compressible":true},"application/vnd.oipf.pae.gem":{"source":"iana"},"application/vnd.oipf.spdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.oipf.spdlist+xml":{"source":"iana","compressible":true},"application/vnd.oipf.ueprofile+xml":{"source":"iana","compressible":true},"application/vnd.oipf.userprofile+xml":{"source":"iana","compressible":true},"application/vnd.olpc-sugar":{"source":"iana","extensions":["xo"]},"application/vnd.oma-scws-config":{"source":"iana"},"application/vnd.oma-scws-http-request":{"source":"iana"},"application/vnd.oma-scws-http-response":{"source":"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.drm-trigger+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.imd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.ltkm":{"source":"iana"},"application/vnd.oma.bcast.notification+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.provisioningtrigger":{"source":"iana"},"application/vnd.oma.bcast.sgboot":{"source":"iana"},"application/vnd.oma.bcast.sgdd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sgdu":{"source":"iana"},"application/vnd.oma.bcast.simple-symbol-container":{"source":"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sprov+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.stkm":{"source":"iana"},"application/vnd.oma.cab-address-book+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-feature-handler+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-pcc+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-subs-invite+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-user-prefs+xml":{"source":"iana","compressible":true},"application/vnd.oma.dcd":{"source":"iana"},"application/vnd.oma.dcdc":{"source":"iana"},"application/vnd.oma.dd2+xml":{"source":"iana","compressible":true,"extensions":["dd2"]},"application/vnd.oma.drm.risd+xml":{"source":"iana","compressible":true},"application/vnd.oma.group-usage-list+xml":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+cbor":{"source":"iana"},"application/vnd.oma.lwm2m+json":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+tlv":{"source":"iana"},"application/vnd.oma.pal+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.detailed-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.final-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.groups+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.invocation-descriptor+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.optimized-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.push":{"source":"iana"},"application/vnd.oma.scidm.messages+xml":{"source":"iana","compressible":true},"application/vnd.oma.xcap-directory+xml":{"source":"iana","compressible":true},"application/vnd.omads-email+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-file+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-folder+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omaloc-supl-init":{"source":"iana"},"application/vnd.onepager":{"source":"iana"},"application/vnd.onepagertamp":{"source":"iana"},"application/vnd.onepagertamx":{"source":"iana"},"application/vnd.onepagertat":{"source":"iana"},"application/vnd.onepagertatp":{"source":"iana"},"application/vnd.onepagertatx":{"source":"iana"},"application/vnd.openblox.game+xml":{"source":"iana","compressible":true,"extensions":["obgx"]},"application/vnd.openblox.game-binary":{"source":"iana"},"application/vnd.openeye.oeb":{"source":"iana"},"application/vnd.openofficeorg.extension":{"source":"apache","extensions":["oxt"]},"application/vnd.openstreetmap.data+xml":{"source":"iana","compressible":true,"extensions":["osm"]},"application/vnd.opentimestamps.ots":{"source":"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawing+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{"source":"iana","compressible":false,"extensions":["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slide":{"source":"iana","extensions":["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{"source":"iana","extensions":["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.template":{"source":"iana","extensions":["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"source":"iana","compressible":false,"extensions":["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{"source":"iana","extensions":["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.theme+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.vmldrawing":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"source":"iana","compressible":false,"extensions":["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{"source":"iana","extensions":["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.core-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.relationships+xml":{"source":"iana","compressible":true},"application/vnd.oracle.resource+json":{"source":"iana","compressible":true},"application/vnd.orange.indata":{"source":"iana"},"application/vnd.osa.netdeploy":{"source":"iana"},"application/vnd.osgeo.mapguide.package":{"source":"iana","extensions":["mgp"]},"application/vnd.osgi.bundle":{"source":"iana"},"application/vnd.osgi.dp":{"source":"iana","extensions":["dp"]},"application/vnd.osgi.subsystem":{"source":"iana","extensions":["esa"]},"application/vnd.otps.ct-kip+xml":{"source":"iana","compressible":true},"application/vnd.oxli.countgraph":{"source":"iana"},"application/vnd.pagerduty+json":{"source":"iana","compressible":true},"application/vnd.palm":{"source":"iana","extensions":["pdb","pqa","oprc"]},"application/vnd.panoply":{"source":"iana"},"application/vnd.paos.xml":{"source":"iana"},"application/vnd.patentdive":{"source":"iana"},"application/vnd.patientecommsdoc":{"source":"iana"},"application/vnd.pawaafile":{"source":"iana","extensions":["paw"]},"application/vnd.pcos":{"source":"iana"},"application/vnd.pg.format":{"source":"iana","extensions":["str"]},"application/vnd.pg.osasli":{"source":"iana","extensions":["ei6"]},"application/vnd.piaccess.application-licence":{"source":"iana"},"application/vnd.picsel":{"source":"iana","extensions":["efif"]},"application/vnd.pmi.widget":{"source":"iana","extensions":["wg"]},"application/vnd.poc.group-advertisement+xml":{"source":"iana","compressible":true},"application/vnd.pocketlearn":{"source":"iana","extensions":["plf"]},"application/vnd.powerbuilder6":{"source":"iana","extensions":["pbd"]},"application/vnd.powerbuilder6-s":{"source":"iana"},"application/vnd.powerbuilder7":{"source":"iana"},"application/vnd.powerbuilder7-s":{"source":"iana"},"application/vnd.powerbuilder75":{"source":"iana"},"application/vnd.powerbuilder75-s":{"source":"iana"},"application/vnd.preminet":{"source":"iana"},"application/vnd.previewsystems.box":{"source":"iana","extensions":["box"]},"application/vnd.proteus.magazine":{"source":"iana","extensions":["mgz"]},"application/vnd.psfs":{"source":"iana"},"application/vnd.publishare-delta-tree":{"source":"iana","extensions":["qps"]},"application/vnd.pvi.ptid1":{"source":"iana","extensions":["ptid"]},"application/vnd.pwg-multiplexed":{"source":"iana"},"application/vnd.pwg-xhtml-print+xml":{"source":"iana","compressible":true},"application/vnd.qualcomm.brew-app-res":{"source":"iana"},"application/vnd.quarantainenet":{"source":"iana"},"application/vnd.quark.quarkxpress":{"source":"iana","extensions":["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{"source":"iana"},"application/vnd.radisys.moml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conn+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-stream+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-base+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-detect+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-group+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-speech+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-transform+xml":{"source":"iana","compressible":true},"application/vnd.rainstor.data":{"source":"iana"},"application/vnd.rapid":{"source":"iana"},"application/vnd.rar":{"source":"iana","extensions":["rar"]},"application/vnd.realvnc.bed":{"source":"iana","extensions":["bed"]},"application/vnd.recordare.musicxml":{"source":"iana","extensions":["mxl"]},"application/vnd.recordare.musicxml+xml":{"source":"iana","compressible":true,"extensions":["musicxml"]},"application/vnd.renlearn.rlprint":{"source":"iana"},"application/vnd.resilient.logic":{"source":"iana"},"application/vnd.restful+json":{"source":"iana","compressible":true},"application/vnd.rig.cryptonote":{"source":"iana","extensions":["cryptonote"]},"application/vnd.rim.cod":{"source":"apache","extensions":["cod"]},"application/vnd.rn-realmedia":{"source":"apache","extensions":["rm"]},"application/vnd.rn-realmedia-vbr":{"source":"apache","extensions":["rmvb"]},"application/vnd.route66.link66+xml":{"source":"iana","compressible":true,"extensions":["link66"]},"application/vnd.rs-274x":{"source":"iana"},"application/vnd.ruckus.download":{"source":"iana"},"application/vnd.s3sms":{"source":"iana"},"application/vnd.sailingtracker.track":{"source":"iana","extensions":["st"]},"application/vnd.sar":{"source":"iana"},"application/vnd.sbm.cid":{"source":"iana"},"application/vnd.sbm.mid2":{"source":"iana"},"application/vnd.scribus":{"source":"iana"},"application/vnd.sealed.3df":{"source":"iana"},"application/vnd.sealed.csf":{"source":"iana"},"application/vnd.sealed.doc":{"source":"iana"},"application/vnd.sealed.eml":{"source":"iana"},"application/vnd.sealed.mht":{"source":"iana"},"application/vnd.sealed.net":{"source":"iana"},"application/vnd.sealed.ppt":{"source":"iana"},"application/vnd.sealed.tiff":{"source":"iana"},"application/vnd.sealed.xls":{"source":"iana"},"application/vnd.sealedmedia.softseal.html":{"source":"iana"},"application/vnd.sealedmedia.softseal.pdf":{"source":"iana"},"application/vnd.seemail":{"source":"iana","extensions":["see"]},"application/vnd.seis+json":{"source":"iana","compressible":true},"application/vnd.sema":{"source":"iana","extensions":["sema"]},"application/vnd.semd":{"source":"iana","extensions":["semd"]},"application/vnd.semf":{"source":"iana","extensions":["semf"]},"application/vnd.shade-save-file":{"source":"iana"},"application/vnd.shana.informed.formdata":{"source":"iana","extensions":["ifm"]},"application/vnd.shana.informed.formtemplate":{"source":"iana","extensions":["itp"]},"application/vnd.shana.informed.interchange":{"source":"iana","extensions":["iif"]},"application/vnd.shana.informed.package":{"source":"iana","extensions":["ipk"]},"application/vnd.shootproof+json":{"source":"iana","compressible":true},"application/vnd.shopkick+json":{"source":"iana","compressible":true},"application/vnd.shp":{"source":"iana"},"application/vnd.shx":{"source":"iana"},"application/vnd.sigrok.session":{"source":"iana"},"application/vnd.simtech-mindmapper":{"source":"iana","extensions":["twd","twds"]},"application/vnd.siren+json":{"source":"iana","compressible":true},"application/vnd.smaf":{"source":"iana","extensions":["mmf"]},"application/vnd.smart.notebook":{"source":"iana"},"application/vnd.smart.teacher":{"source":"iana","extensions":["teacher"]},"application/vnd.snesdev-page-table":{"source":"iana"},"application/vnd.software602.filler.form+xml":{"source":"iana","compressible":true,"extensions":["fo"]},"application/vnd.software602.filler.form-xml-zip":{"source":"iana"},"application/vnd.solent.sdkm+xml":{"source":"iana","compressible":true,"extensions":["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{"source":"iana","extensions":["dxp"]},"application/vnd.spotfire.sfs":{"source":"iana","extensions":["sfs"]},"application/vnd.sqlite3":{"source":"iana"},"application/vnd.sss-cod":{"source":"iana"},"application/vnd.sss-dtf":{"source":"iana"},"application/vnd.sss-ntf":{"source":"iana"},"application/vnd.stardivision.calc":{"source":"apache","extensions":["sdc"]},"application/vnd.stardivision.draw":{"source":"apache","extensions":["sda"]},"application/vnd.stardivision.impress":{"source":"apache","extensions":["sdd"]},"application/vnd.stardivision.math":{"source":"apache","extensions":["smf"]},"application/vnd.stardivision.writer":{"source":"apache","extensions":["sdw","vor"]},"application/vnd.stardivision.writer-global":{"source":"apache","extensions":["sgl"]},"application/vnd.stepmania.package":{"source":"iana","extensions":["smzip"]},"application/vnd.stepmania.stepchart":{"source":"iana","extensions":["sm"]},"application/vnd.street-stream":{"source":"iana"},"application/vnd.sun.wadl+xml":{"source":"iana","compressible":true,"extensions":["wadl"]},"application/vnd.sun.xml.calc":{"source":"apache","extensions":["sxc"]},"application/vnd.sun.xml.calc.template":{"source":"apache","extensions":["stc"]},"application/vnd.sun.xml.draw":{"source":"apache","extensions":["sxd"]},"application/vnd.sun.xml.draw.template":{"source":"apache","extensions":["std"]},"application/vnd.sun.xml.impress":{"source":"apache","extensions":["sxi"]},"application/vnd.sun.xml.impress.template":{"source":"apache","extensions":["sti"]},"application/vnd.sun.xml.math":{"source":"apache","extensions":["sxm"]},"application/vnd.sun.xml.writer":{"source":"apache","extensions":["sxw"]},"application/vnd.sun.xml.writer.global":{"source":"apache","extensions":["sxg"]},"application/vnd.sun.xml.writer.template":{"source":"apache","extensions":["stw"]},"application/vnd.sus-calendar":{"source":"iana","extensions":["sus","susp"]},"application/vnd.svd":{"source":"iana","extensions":["svd"]},"application/vnd.swiftview-ics":{"source":"iana"},"application/vnd.sycle+xml":{"source":"iana","compressible":true},"application/vnd.syft+json":{"source":"iana","compressible":true},"application/vnd.symbian.install":{"source":"apache","extensions":["sis","sisx"]},"application/vnd.syncml+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xsm"]},"application/vnd.syncml.dm+wbxml":{"source":"iana","charset":"UTF-8","extensions":["bdm"]},"application/vnd.syncml.dm+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xdm"]},"application/vnd.syncml.dm.notification":{"source":"iana"},"application/vnd.syncml.dmddf+wbxml":{"source":"iana"},"application/vnd.syncml.dmddf+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{"source":"iana"},"application/vnd.syncml.dmtnds+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.syncml.ds.notification":{"source":"iana"},"application/vnd.tableschema+json":{"source":"iana","compressible":true},"application/vnd.tao.intent-module-archive":{"source":"iana","extensions":["tao"]},"application/vnd.tcpdump.pcap":{"source":"iana","extensions":["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{"source":"iana","compressible":true},"application/vnd.tmd.mediaflex.api+xml":{"source":"iana","compressible":true},"application/vnd.tml":{"source":"iana"},"application/vnd.tmobile-livetv":{"source":"iana","extensions":["tmo"]},"application/vnd.tri.onesource":{"source":"iana"},"application/vnd.trid.tpt":{"source":"iana","extensions":["tpt"]},"application/vnd.triscape.mxs":{"source":"iana","extensions":["mxs"]},"application/vnd.trueapp":{"source":"iana","extensions":["tra"]},"application/vnd.truedoc":{"source":"iana"},"application/vnd.ubisoft.webplayer":{"source":"iana"},"application/vnd.ufdl":{"source":"iana","extensions":["ufd","ufdl"]},"application/vnd.uiq.theme":{"source":"iana","extensions":["utz"]},"application/vnd.umajin":{"source":"iana","extensions":["umj"]},"application/vnd.unity":{"source":"iana","extensions":["unityweb"]},"application/vnd.uoml+xml":{"source":"iana","compressible":true,"extensions":["uoml"]},"application/vnd.uplanet.alert":{"source":"iana"},"application/vnd.uplanet.alert-wbxml":{"source":"iana"},"application/vnd.uplanet.bearer-choice":{"source":"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{"source":"iana"},"application/vnd.uplanet.cacheop":{"source":"iana"},"application/vnd.uplanet.cacheop-wbxml":{"source":"iana"},"application/vnd.uplanet.channel":{"source":"iana"},"application/vnd.uplanet.channel-wbxml":{"source":"iana"},"application/vnd.uplanet.list":{"source":"iana"},"application/vnd.uplanet.list-wbxml":{"source":"iana"},"application/vnd.uplanet.listcmd":{"source":"iana"},"application/vnd.uplanet.listcmd-wbxml":{"source":"iana"},"application/vnd.uplanet.signal":{"source":"iana"},"application/vnd.uri-map":{"source":"iana"},"application/vnd.valve.source.material":{"source":"iana"},"application/vnd.vcx":{"source":"iana","extensions":["vcx"]},"application/vnd.vd-study":{"source":"iana"},"application/vnd.vectorworks":{"source":"iana"},"application/vnd.vel+json":{"source":"iana","compressible":true},"application/vnd.verimatrix.vcas":{"source":"iana"},"application/vnd.veritone.aion+json":{"source":"iana","compressible":true},"application/vnd.veryant.thin":{"source":"iana"},"application/vnd.ves.encrypted":{"source":"iana"},"application/vnd.vidsoft.vidconference":{"source":"iana"},"application/vnd.visio":{"source":"iana","extensions":["vsd","vst","vss","vsw"]},"application/vnd.visionary":{"source":"iana","extensions":["vis"]},"application/vnd.vividence.scriptfile":{"source":"iana"},"application/vnd.vsf":{"source":"iana","extensions":["vsf"]},"application/vnd.wap.sic":{"source":"iana"},"application/vnd.wap.slc":{"source":"iana"},"application/vnd.wap.wbxml":{"source":"iana","charset":"UTF-8","extensions":["wbxml"]},"application/vnd.wap.wmlc":{"source":"iana","extensions":["wmlc"]},"application/vnd.wap.wmlscriptc":{"source":"iana","extensions":["wmlsc"]},"application/vnd.webturbo":{"source":"iana","extensions":["wtb"]},"application/vnd.wfa.dpp":{"source":"iana"},"application/vnd.wfa.p2p":{"source":"iana"},"application/vnd.wfa.wsc":{"source":"iana"},"application/vnd.windows.devicepairing":{"source":"iana"},"application/vnd.wmc":{"source":"iana"},"application/vnd.wmf.bootstrap":{"source":"iana"},"application/vnd.wolfram.mathematica":{"source":"iana"},"application/vnd.wolfram.mathematica.package":{"source":"iana"},"application/vnd.wolfram.player":{"source":"iana","extensions":["nbp"]},"application/vnd.wordperfect":{"source":"iana","extensions":["wpd"]},"application/vnd.wqd":{"source":"iana","extensions":["wqd"]},"application/vnd.wrq-hp3000-labelled":{"source":"iana"},"application/vnd.wt.stf":{"source":"iana","extensions":["stf"]},"application/vnd.wv.csp+wbxml":{"source":"iana"},"application/vnd.wv.csp+xml":{"source":"iana","compressible":true},"application/vnd.wv.ssp+xml":{"source":"iana","compressible":true},"application/vnd.xacml+json":{"source":"iana","compressible":true},"application/vnd.xara":{"source":"iana","extensions":["xar"]},"application/vnd.xfdl":{"source":"iana","extensions":["xfdl"]},"application/vnd.xfdl.webform":{"source":"iana"},"application/vnd.xmi+xml":{"source":"iana","compressible":true},"application/vnd.xmpie.cpkg":{"source":"iana"},"application/vnd.xmpie.dpkg":{"source":"iana"},"application/vnd.xmpie.plan":{"source":"iana"},"application/vnd.xmpie.ppkg":{"source":"iana"},"application/vnd.xmpie.xlim":{"source":"iana"},"application/vnd.yamaha.hv-dic":{"source":"iana","extensions":["hvd"]},"application/vnd.yamaha.hv-script":{"source":"iana","extensions":["hvs"]},"application/vnd.yamaha.hv-voice":{"source":"iana","extensions":["hvp"]},"application/vnd.yamaha.openscoreformat":{"source":"iana","extensions":["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{"source":"iana","compressible":true,"extensions":["osfpvg"]},"application/vnd.yamaha.remote-setup":{"source":"iana"},"application/vnd.yamaha.smaf-audio":{"source":"iana","extensions":["saf"]},"application/vnd.yamaha.smaf-phrase":{"source":"iana","extensions":["spf"]},"application/vnd.yamaha.through-ngn":{"source":"iana"},"application/vnd.yamaha.tunnel-udpencap":{"source":"iana"},"application/vnd.yaoweme":{"source":"iana"},"application/vnd.yellowriver-custom-menu":{"source":"iana","extensions":["cmp"]},"application/vnd.youtube.yt":{"source":"iana"},"application/vnd.zul":{"source":"iana","extensions":["zir","zirz"]},"application/vnd.zzazz.deck+xml":{"source":"iana","compressible":true,"extensions":["zaz"]},"application/voicexml+xml":{"source":"iana","compressible":true,"extensions":["vxml"]},"application/voucher-cms+json":{"source":"iana","compressible":true},"application/vq-rtcpxr":{"source":"iana"},"application/wasm":{"source":"iana","compressible":true,"extensions":["wasm"]},"application/watcherinfo+xml":{"source":"iana","compressible":true,"extensions":["wif"]},"application/webpush-options+json":{"source":"iana","compressible":true},"application/whoispp-query":{"source":"iana"},"application/whoispp-response":{"source":"iana"},"application/widget":{"source":"iana","extensions":["wgt"]},"application/winhlp":{"source":"apache","extensions":["hlp"]},"application/wita":{"source":"iana"},"application/wordperfect5.1":{"source":"iana"},"application/wsdl+xml":{"source":"iana","compressible":true,"extensions":["wsdl"]},"application/wspolicy+xml":{"source":"iana","compressible":true,"extensions":["wspolicy"]},"application/x-7z-compressed":{"source":"apache","compressible":false,"extensions":["7z"]},"application/x-abiword":{"source":"apache","extensions":["abw"]},"application/x-ace-compressed":{"source":"apache","extensions":["ace"]},"application/x-amf":{"source":"apache"},"application/x-apple-diskimage":{"source":"apache","extensions":["dmg"]},"application/x-arj":{"compressible":false,"extensions":["arj"]},"application/x-authorware-bin":{"source":"apache","extensions":["aab","x32","u32","vox"]},"application/x-authorware-map":{"source":"apache","extensions":["aam"]},"application/x-authorware-seg":{"source":"apache","extensions":["aas"]},"application/x-bcpio":{"source":"apache","extensions":["bcpio"]},"application/x-bdoc":{"compressible":false,"extensions":["bdoc"]},"application/x-bittorrent":{"source":"apache","extensions":["torrent"]},"application/x-blorb":{"source":"apache","extensions":["blb","blorb"]},"application/x-bzip":{"source":"apache","compressible":false,"extensions":["bz"]},"application/x-bzip2":{"source":"apache","compressible":false,"extensions":["bz2","boz"]},"application/x-cbr":{"source":"apache","extensions":["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{"source":"apache","extensions":["vcd"]},"application/x-cfs-compressed":{"source":"apache","extensions":["cfs"]},"application/x-chat":{"source":"apache","extensions":["chat"]},"application/x-chess-pgn":{"source":"apache","extensions":["pgn"]},"application/x-chrome-extension":{"extensions":["crx"]},"application/x-cocoa":{"source":"nginx","extensions":["cco"]},"application/x-compress":{"source":"apache"},"application/x-conference":{"source":"apache","extensions":["nsc"]},"application/x-cpio":{"source":"apache","extensions":["cpio"]},"application/x-csh":{"source":"apache","extensions":["csh"]},"application/x-deb":{"compressible":false},"application/x-debian-package":{"source":"apache","extensions":["deb","udeb"]},"application/x-dgc-compressed":{"source":"apache","extensions":["dgc"]},"application/x-director":{"source":"apache","extensions":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{"source":"apache","extensions":["wad"]},"application/x-dtbncx+xml":{"source":"apache","compressible":true,"extensions":["ncx"]},"application/x-dtbook+xml":{"source":"apache","compressible":true,"extensions":["dtb"]},"application/x-dtbresource+xml":{"source":"apache","compressible":true,"extensions":["res"]},"application/x-dvi":{"source":"apache","compressible":false,"extensions":["dvi"]},"application/x-envoy":{"source":"apache","extensions":["evy"]},"application/x-eva":{"source":"apache","extensions":["eva"]},"application/x-font-bdf":{"source":"apache","extensions":["bdf"]},"application/x-font-dos":{"source":"apache"},"application/x-font-framemaker":{"source":"apache"},"application/x-font-ghostscript":{"source":"apache","extensions":["gsf"]},"application/x-font-libgrx":{"source":"apache"},"application/x-font-linux-psf":{"source":"apache","extensions":["psf"]},"application/x-font-pcf":{"source":"apache","extensions":["pcf"]},"application/x-font-snf":{"source":"apache","extensions":["snf"]},"application/x-font-speedo":{"source":"apache"},"application/x-font-sunos-news":{"source":"apache"},"application/x-font-type1":{"source":"apache","extensions":["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{"source":"apache"},"application/x-freearc":{"source":"apache","extensions":["arc"]},"application/x-futuresplash":{"source":"apache","extensions":["spl"]},"application/x-gca-compressed":{"source":"apache","extensions":["gca"]},"application/x-glulx":{"source":"apache","extensions":["ulx"]},"application/x-gnumeric":{"source":"apache","extensions":["gnumeric"]},"application/x-gramps-xml":{"source":"apache","extensions":["gramps"]},"application/x-gtar":{"source":"apache","extensions":["gtar"]},"application/x-gzip":{"source":"apache"},"application/x-hdf":{"source":"apache","extensions":["hdf"]},"application/x-httpd-php":{"compressible":true,"extensions":["php"]},"application/x-install-instructions":{"source":"apache","extensions":["install"]},"application/x-iso9660-image":{"source":"apache","extensions":["iso"]},"application/x-iwork-keynote-sffkey":{"extensions":["key"]},"application/x-iwork-numbers-sffnumbers":{"extensions":["numbers"]},"application/x-iwork-pages-sffpages":{"extensions":["pages"]},"application/x-java-archive-diff":{"source":"nginx","extensions":["jardiff"]},"application/x-java-jnlp-file":{"source":"apache","compressible":false,"extensions":["jnlp"]},"application/x-javascript":{"compressible":true},"application/x-keepass2":{"extensions":["kdbx"]},"application/x-latex":{"source":"apache","compressible":false,"extensions":["latex"]},"application/x-lua-bytecode":{"extensions":["luac"]},"application/x-lzh-compressed":{"source":"apache","extensions":["lzh","lha"]},"application/x-makeself":{"source":"nginx","extensions":["run"]},"application/x-mie":{"source":"apache","extensions":["mie"]},"application/x-mobipocket-ebook":{"source":"apache","extensions":["prc","mobi"]},"application/x-mpegurl":{"compressible":false},"application/x-ms-application":{"source":"apache","extensions":["application"]},"application/x-ms-shortcut":{"source":"apache","extensions":["lnk"]},"application/x-ms-wmd":{"source":"apache","extensions":["wmd"]},"application/x-ms-wmz":{"source":"apache","extensions":["wmz"]},"application/x-ms-xbap":{"source":"apache","extensions":["xbap"]},"application/x-msaccess":{"source":"apache","extensions":["mdb"]},"application/x-msbinder":{"source":"apache","extensions":["obd"]},"application/x-mscardfile":{"source":"apache","extensions":["crd"]},"application/x-msclip":{"source":"apache","extensions":["clp"]},"application/x-msdos-program":{"extensions":["exe"]},"application/x-msdownload":{"source":"apache","extensions":["exe","dll","com","bat","msi"]},"application/x-msmediaview":{"source":"apache","extensions":["mvb","m13","m14"]},"application/x-msmetafile":{"source":"apache","extensions":["wmf","wmz","emf","emz"]},"application/x-msmoney":{"source":"apache","extensions":["mny"]},"application/x-mspublisher":{"source":"apache","extensions":["pub"]},"application/x-msschedule":{"source":"apache","extensions":["scd"]},"application/x-msterminal":{"source":"apache","extensions":["trm"]},"application/x-mswrite":{"source":"apache","extensions":["wri"]},"application/x-netcdf":{"source":"apache","extensions":["nc","cdf"]},"application/x-ns-proxy-autoconfig":{"compressible":true,"extensions":["pac"]},"application/x-nzb":{"source":"apache","extensions":["nzb"]},"application/x-perl":{"source":"nginx","extensions":["pl","pm"]},"application/x-pilot":{"source":"nginx","extensions":["prc","pdb"]},"application/x-pkcs12":{"source":"apache","compressible":false,"extensions":["p12","pfx"]},"application/x-pkcs7-certificates":{"source":"apache","extensions":["p7b","spc"]},"application/x-pkcs7-certreqresp":{"source":"apache","extensions":["p7r"]},"application/x-pki-message":{"source":"iana"},"application/x-rar-compressed":{"source":"apache","compressible":false,"extensions":["rar"]},"application/x-redhat-package-manager":{"source":"nginx","extensions":["rpm"]},"application/x-research-info-systems":{"source":"apache","extensions":["ris"]},"application/x-sea":{"source":"nginx","extensions":["sea"]},"application/x-sh":{"source":"apache","compressible":true,"extensions":["sh"]},"application/x-shar":{"source":"apache","extensions":["shar"]},"application/x-shockwave-flash":{"source":"apache","compressible":false,"extensions":["swf"]},"application/x-silverlight-app":{"source":"apache","extensions":["xap"]},"application/x-sql":{"source":"apache","extensions":["sql"]},"application/x-stuffit":{"source":"apache","compressible":false,"extensions":["sit"]},"application/x-stuffitx":{"source":"apache","extensions":["sitx"]},"application/x-subrip":{"source":"apache","extensions":["srt"]},"application/x-sv4cpio":{"source":"apache","extensions":["sv4cpio"]},"application/x-sv4crc":{"source":"apache","extensions":["sv4crc"]},"application/x-t3vm-image":{"source":"apache","extensions":["t3"]},"application/x-tads":{"source":"apache","extensions":["gam"]},"application/x-tar":{"source":"apache","compressible":true,"extensions":["tar"]},"application/x-tcl":{"source":"apache","extensions":["tcl","tk"]},"application/x-tex":{"source":"apache","extensions":["tex"]},"application/x-tex-tfm":{"source":"apache","extensions":["tfm"]},"application/x-texinfo":{"source":"apache","extensions":["texinfo","texi"]},"application/x-tgif":{"source":"apache","extensions":["obj"]},"application/x-ustar":{"source":"apache","extensions":["ustar"]},"application/x-virtualbox-hdd":{"compressible":true,"extensions":["hdd"]},"application/x-virtualbox-ova":{"compressible":true,"extensions":["ova"]},"application/x-virtualbox-ovf":{"compressible":true,"extensions":["ovf"]},"application/x-virtualbox-vbox":{"compressible":true,"extensions":["vbox"]},"application/x-virtualbox-vbox-extpack":{"compressible":false,"extensions":["vbox-extpack"]},"application/x-virtualbox-vdi":{"compressible":true,"extensions":["vdi"]},"application/x-virtualbox-vhd":{"compressible":true,"extensions":["vhd"]},"application/x-virtualbox-vmdk":{"compressible":true,"extensions":["vmdk"]},"application/x-wais-source":{"source":"apache","extensions":["src"]},"application/x-web-app-manifest+json":{"compressible":true,"extensions":["webapp"]},"application/x-www-form-urlencoded":{"source":"iana","compressible":true},"application/x-x509-ca-cert":{"source":"iana","extensions":["der","crt","pem"]},"application/x-x509-ca-ra-cert":{"source":"iana"},"application/x-x509-next-ca-cert":{"source":"iana"},"application/x-xfig":{"source":"apache","extensions":["fig"]},"application/x-xliff+xml":{"source":"apache","compressible":true,"extensions":["xlf"]},"application/x-xpinstall":{"source":"apache","compressible":false,"extensions":["xpi"]},"application/x-xz":{"source":"apache","extensions":["xz"]},"application/x-zmachine":{"source":"apache","extensions":["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{"source":"iana"},"application/xacml+xml":{"source":"iana","compressible":true},"application/xaml+xml":{"source":"apache","compressible":true,"extensions":["xaml"]},"application/xcap-att+xml":{"source":"iana","compressible":true,"extensions":["xav"]},"application/xcap-caps+xml":{"source":"iana","compressible":true,"extensions":["xca"]},"application/xcap-diff+xml":{"source":"iana","compressible":true,"extensions":["xdf"]},"application/xcap-el+xml":{"source":"iana","compressible":true,"extensions":["xel"]},"application/xcap-error+xml":{"source":"iana","compressible":true},"application/xcap-ns+xml":{"source":"iana","compressible":true,"extensions":["xns"]},"application/xcon-conference-info+xml":{"source":"iana","compressible":true},"application/xcon-conference-info-diff+xml":{"source":"iana","compressible":true},"application/xenc+xml":{"source":"iana","compressible":true,"extensions":["xenc"]},"application/xhtml+xml":{"source":"iana","compressible":true,"extensions":["xhtml","xht"]},"application/xhtml-voice+xml":{"source":"apache","compressible":true},"application/xliff+xml":{"source":"iana","compressible":true,"extensions":["xlf"]},"application/xml":{"source":"iana","compressible":true,"extensions":["xml","xsl","xsd","rng"]},"application/xml-dtd":{"source":"iana","compressible":true,"extensions":["dtd"]},"application/xml-external-parsed-entity":{"source":"iana"},"application/xml-patch+xml":{"source":"iana","compressible":true},"application/xmpp+xml":{"source":"iana","compressible":true},"application/xop+xml":{"source":"iana","compressible":true,"extensions":["xop"]},"application/xproc+xml":{"source":"apache","compressible":true,"extensions":["xpl"]},"application/xslt+xml":{"source":"iana","compressible":true,"extensions":["xsl","xslt"]},"application/xspf+xml":{"source":"apache","compressible":true,"extensions":["xspf"]},"application/xv+xml":{"source":"iana","compressible":true,"extensions":["mxml","xhvml","xvml","xvm"]},"application/yang":{"source":"iana","extensions":["yang"]},"application/yang-data+json":{"source":"iana","compressible":true},"application/yang-data+xml":{"source":"iana","compressible":true},"application/yang-patch+json":{"source":"iana","compressible":true},"application/yang-patch+xml":{"source":"iana","compressible":true},"application/yin+xml":{"source":"iana","compressible":true,"extensions":["yin"]},"application/zip":{"source":"iana","compressible":false,"extensions":["zip"]},"application/zlib":{"source":"iana"},"application/zstd":{"source":"iana"},"audio/1d-interleaved-parityfec":{"source":"iana"},"audio/32kadpcm":{"source":"iana"},"audio/3gpp":{"source":"iana","compressible":false,"extensions":["3gpp"]},"audio/3gpp2":{"source":"iana"},"audio/aac":{"source":"iana"},"audio/ac3":{"source":"iana"},"audio/adpcm":{"source":"apache","extensions":["adp"]},"audio/amr":{"source":"iana","extensions":["amr"]},"audio/amr-wb":{"source":"iana"},"audio/amr-wb+":{"source":"iana"},"audio/aptx":{"source":"iana"},"audio/asc":{"source":"iana"},"audio/atrac-advanced-lossless":{"source":"iana"},"audio/atrac-x":{"source":"iana"},"audio/atrac3":{"source":"iana"},"audio/basic":{"source":"iana","compressible":false,"extensions":["au","snd"]},"audio/bv16":{"source":"iana"},"audio/bv32":{"source":"iana"},"audio/clearmode":{"source":"iana"},"audio/cn":{"source":"iana"},"audio/dat12":{"source":"iana"},"audio/dls":{"source":"iana"},"audio/dsr-es201108":{"source":"iana"},"audio/dsr-es202050":{"source":"iana"},"audio/dsr-es202211":{"source":"iana"},"audio/dsr-es202212":{"source":"iana"},"audio/dv":{"source":"iana"},"audio/dvi4":{"source":"iana"},"audio/eac3":{"source":"iana"},"audio/encaprtp":{"source":"iana"},"audio/evrc":{"source":"iana"},"audio/evrc-qcp":{"source":"iana"},"audio/evrc0":{"source":"iana"},"audio/evrc1":{"source":"iana"},"audio/evrcb":{"source":"iana"},"audio/evrcb0":{"source":"iana"},"audio/evrcb1":{"source":"iana"},"audio/evrcnw":{"source":"iana"},"audio/evrcnw0":{"source":"iana"},"audio/evrcnw1":{"source":"iana"},"audio/evrcwb":{"source":"iana"},"audio/evrcwb0":{"source":"iana"},"audio/evrcwb1":{"source":"iana"},"audio/evs":{"source":"iana"},"audio/flexfec":{"source":"iana"},"audio/fwdred":{"source":"iana"},"audio/g711-0":{"source":"iana"},"audio/g719":{"source":"iana"},"audio/g722":{"source":"iana"},"audio/g7221":{"source":"iana"},"audio/g723":{"source":"iana"},"audio/g726-16":{"source":"iana"},"audio/g726-24":{"source":"iana"},"audio/g726-32":{"source":"iana"},"audio/g726-40":{"source":"iana"},"audio/g728":{"source":"iana"},"audio/g729":{"source":"iana"},"audio/g7291":{"source":"iana"},"audio/g729d":{"source":"iana"},"audio/g729e":{"source":"iana"},"audio/gsm":{"source":"iana"},"audio/gsm-efr":{"source":"iana"},"audio/gsm-hr-08":{"source":"iana"},"audio/ilbc":{"source":"iana"},"audio/ip-mr_v2.5":{"source":"iana"},"audio/isac":{"source":"apache"},"audio/l16":{"source":"iana"},"audio/l20":{"source":"iana"},"audio/l24":{"source":"iana","compressible":false},"audio/l8":{"source":"iana"},"audio/lpc":{"source":"iana"},"audio/melp":{"source":"iana"},"audio/melp1200":{"source":"iana"},"audio/melp2400":{"source":"iana"},"audio/melp600":{"source":"iana"},"audio/mhas":{"source":"iana"},"audio/midi":{"source":"apache","extensions":["mid","midi","kar","rmi"]},"audio/mobile-xmf":{"source":"iana","extensions":["mxmf"]},"audio/mp3":{"compressible":false,"extensions":["mp3"]},"audio/mp4":{"source":"iana","compressible":false,"extensions":["m4a","mp4a"]},"audio/mp4a-latm":{"source":"iana"},"audio/mpa":{"source":"iana"},"audio/mpa-robust":{"source":"iana"},"audio/mpeg":{"source":"iana","compressible":false,"extensions":["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{"source":"iana"},"audio/musepack":{"source":"apache"},"audio/ogg":{"source":"iana","compressible":false,"extensions":["oga","ogg","spx","opus"]},"audio/opus":{"source":"iana"},"audio/parityfec":{"source":"iana"},"audio/pcma":{"source":"iana"},"audio/pcma-wb":{"source":"iana"},"audio/pcmu":{"source":"iana"},"audio/pcmu-wb":{"source":"iana"},"audio/prs.sid":{"source":"iana"},"audio/qcelp":{"source":"iana"},"audio/raptorfec":{"source":"iana"},"audio/red":{"source":"iana"},"audio/rtp-enc-aescm128":{"source":"iana"},"audio/rtp-midi":{"source":"iana"},"audio/rtploopback":{"source":"iana"},"audio/rtx":{"source":"iana"},"audio/s3m":{"source":"apache","extensions":["s3m"]},"audio/scip":{"source":"iana"},"audio/silk":{"source":"apache","extensions":["sil"]},"audio/smv":{"source":"iana"},"audio/smv-qcp":{"source":"iana"},"audio/smv0":{"source":"iana"},"audio/sofa":{"source":"iana"},"audio/sp-midi":{"source":"iana"},"audio/speex":{"source":"iana"},"audio/t140c":{"source":"iana"},"audio/t38":{"source":"iana"},"audio/telephone-event":{"source":"iana"},"audio/tetra_acelp":{"source":"iana"},"audio/tetra_acelp_bb":{"source":"iana"},"audio/tone":{"source":"iana"},"audio/tsvcis":{"source":"iana"},"audio/uemclip":{"source":"iana"},"audio/ulpfec":{"source":"iana"},"audio/usac":{"source":"iana"},"audio/vdvi":{"source":"iana"},"audio/vmr-wb":{"source":"iana"},"audio/vnd.3gpp.iufp":{"source":"iana"},"audio/vnd.4sb":{"source":"iana"},"audio/vnd.audiokoz":{"source":"iana"},"audio/vnd.celp":{"source":"iana"},"audio/vnd.cisco.nse":{"source":"iana"},"audio/vnd.cmles.radio-events":{"source":"iana"},"audio/vnd.cns.anp1":{"source":"iana"},"audio/vnd.cns.inf1":{"source":"iana"},"audio/vnd.dece.audio":{"source":"iana","extensions":["uva","uvva"]},"audio/vnd.digital-winds":{"source":"iana","extensions":["eol"]},"audio/vnd.dlna.adts":{"source":"iana"},"audio/vnd.dolby.heaac.1":{"source":"iana"},"audio/vnd.dolby.heaac.2":{"source":"iana"},"audio/vnd.dolby.mlp":{"source":"iana"},"audio/vnd.dolby.mps":{"source":"iana"},"audio/vnd.dolby.pl2":{"source":"iana"},"audio/vnd.dolby.pl2x":{"source":"iana"},"audio/vnd.dolby.pl2z":{"source":"iana"},"audio/vnd.dolby.pulse.1":{"source":"iana"},"audio/vnd.dra":{"source":"iana","extensions":["dra"]},"audio/vnd.dts":{"source":"iana","extensions":["dts"]},"audio/vnd.dts.hd":{"source":"iana","extensions":["dtshd"]},"audio/vnd.dts.uhd":{"source":"iana"},"audio/vnd.dvb.file":{"source":"iana"},"audio/vnd.everad.plj":{"source":"iana"},"audio/vnd.hns.audio":{"source":"iana"},"audio/vnd.lucent.voice":{"source":"iana","extensions":["lvp"]},"audio/vnd.ms-playready.media.pya":{"source":"iana","extensions":["pya"]},"audio/vnd.nokia.mobile-xmf":{"source":"iana"},"audio/vnd.nortel.vbk":{"source":"iana"},"audio/vnd.nuera.ecelp4800":{"source":"iana","extensions":["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{"source":"iana","extensions":["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{"source":"iana","extensions":["ecelp9600"]},"audio/vnd.octel.sbc":{"source":"iana"},"audio/vnd.presonus.multitrack":{"source":"iana"},"audio/vnd.qcelp":{"source":"iana"},"audio/vnd.rhetorex.32kadpcm":{"source":"iana"},"audio/vnd.rip":{"source":"iana","extensions":["rip"]},"audio/vnd.rn-realaudio":{"compressible":false},"audio/vnd.sealedmedia.softseal.mpeg":{"source":"iana"},"audio/vnd.vmx.cvsd":{"source":"iana"},"audio/vnd.wave":{"compressible":false},"audio/vorbis":{"source":"iana","compressible":false},"audio/vorbis-config":{"source":"iana"},"audio/wav":{"compressible":false,"extensions":["wav"]},"audio/wave":{"compressible":false,"extensions":["wav"]},"audio/webm":{"source":"apache","compressible":false,"extensions":["weba"]},"audio/x-aac":{"source":"apache","compressible":false,"extensions":["aac"]},"audio/x-aiff":{"source":"apache","extensions":["aif","aiff","aifc"]},"audio/x-caf":{"source":"apache","compressible":false,"extensions":["caf"]},"audio/x-flac":{"source":"apache","extensions":["flac"]},"audio/x-m4a":{"source":"nginx","extensions":["m4a"]},"audio/x-matroska":{"source":"apache","extensions":["mka"]},"audio/x-mpegurl":{"source":"apache","extensions":["m3u"]},"audio/x-ms-wax":{"source":"apache","extensions":["wax"]},"audio/x-ms-wma":{"source":"apache","extensions":["wma"]},"audio/x-pn-realaudio":{"source":"apache","extensions":["ram","ra"]},"audio/x-pn-realaudio-plugin":{"source":"apache","extensions":["rmp"]},"audio/x-realaudio":{"source":"nginx","extensions":["ra"]},"audio/x-tta":{"source":"apache"},"audio/x-wav":{"source":"apache","extensions":["wav"]},"audio/xm":{"source":"apache","extensions":["xm"]},"chemical/x-cdx":{"source":"apache","extensions":["cdx"]},"chemical/x-cif":{"source":"apache","extensions":["cif"]},"chemical/x-cmdf":{"source":"apache","extensions":["cmdf"]},"chemical/x-cml":{"source":"apache","extensions":["cml"]},"chemical/x-csml":{"source":"apache","extensions":["csml"]},"chemical/x-pdb":{"source":"apache"},"chemical/x-xyz":{"source":"apache","extensions":["xyz"]},"font/collection":{"source":"iana","extensions":["ttc"]},"font/otf":{"source":"iana","compressible":true,"extensions":["otf"]},"font/sfnt":{"source":"iana"},"font/ttf":{"source":"iana","compressible":true,"extensions":["ttf"]},"font/woff":{"source":"iana","extensions":["woff"]},"font/woff2":{"source":"iana","extensions":["woff2"]},"image/aces":{"source":"iana","extensions":["exr"]},"image/apng":{"compressible":false,"extensions":["apng"]},"image/avci":{"source":"iana","extensions":["avci"]},"image/avcs":{"source":"iana","extensions":["avcs"]},"image/avif":{"source":"iana","compressible":false,"extensions":["avif"]},"image/bmp":{"source":"iana","compressible":true,"extensions":["bmp"]},"image/cgm":{"source":"iana","extensions":["cgm"]},"image/dicom-rle":{"source":"iana","extensions":["drle"]},"image/emf":{"source":"iana","extensions":["emf"]},"image/fits":{"source":"iana","extensions":["fits"]},"image/g3fax":{"source":"iana","extensions":["g3"]},"image/gif":{"source":"iana","compressible":false,"extensions":["gif"]},"image/heic":{"source":"iana","extensions":["heic"]},"image/heic-sequence":{"source":"iana","extensions":["heics"]},"image/heif":{"source":"iana","extensions":["heif"]},"image/heif-sequence":{"source":"iana","extensions":["heifs"]},"image/hej2k":{"source":"iana","extensions":["hej2"]},"image/hsj2":{"source":"iana","extensions":["hsj2"]},"image/ief":{"source":"iana","extensions":["ief"]},"image/jls":{"source":"iana","extensions":["jls"]},"image/jp2":{"source":"iana","compressible":false,"extensions":["jp2","jpg2"]},"image/jpeg":{"source":"iana","compressible":false,"extensions":["jpeg","jpg","jpe"]},"image/jph":{"source":"iana","extensions":["jph"]},"image/jphc":{"source":"iana","extensions":["jhc"]},"image/jpm":{"source":"iana","compressible":false,"extensions":["jpm"]},"image/jpx":{"source":"iana","compressible":false,"extensions":["jpx","jpf"]},"image/jxr":{"source":"iana","extensions":["jxr"]},"image/jxra":{"source":"iana","extensions":["jxra"]},"image/jxrs":{"source":"iana","extensions":["jxrs"]},"image/jxs":{"source":"iana","extensions":["jxs"]},"image/jxsc":{"source":"iana","extensions":["jxsc"]},"image/jxsi":{"source":"iana","extensions":["jxsi"]},"image/jxss":{"source":"iana","extensions":["jxss"]},"image/ktx":{"source":"iana","extensions":["ktx"]},"image/ktx2":{"source":"iana","extensions":["ktx2"]},"image/naplps":{"source":"iana"},"image/pjpeg":{"compressible":false},"image/png":{"source":"iana","compressible":false,"extensions":["png"]},"image/prs.btif":{"source":"iana","extensions":["btif"]},"image/prs.pti":{"source":"iana","extensions":["pti"]},"image/pwg-raster":{"source":"iana"},"image/sgi":{"source":"apache","extensions":["sgi"]},"image/svg+xml":{"source":"iana","compressible":true,"extensions":["svg","svgz"]},"image/t38":{"source":"iana","extensions":["t38"]},"image/tiff":{"source":"iana","compressible":false,"extensions":["tif","tiff"]},"image/tiff-fx":{"source":"iana","extensions":["tfx"]},"image/vnd.adobe.photoshop":{"source":"iana","compressible":true,"extensions":["psd"]},"image/vnd.airzip.accelerator.azv":{"source":"iana","extensions":["azv"]},"image/vnd.cns.inf2":{"source":"iana"},"image/vnd.dece.graphic":{"source":"iana","extensions":["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{"source":"iana","extensions":["djvu","djv"]},"image/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"image/vnd.dwg":{"source":"iana","extensions":["dwg"]},"image/vnd.dxf":{"source":"iana","extensions":["dxf"]},"image/vnd.fastbidsheet":{"source":"iana","extensions":["fbs"]},"image/vnd.fpx":{"source":"iana","extensions":["fpx"]},"image/vnd.fst":{"source":"iana","extensions":["fst"]},"image/vnd.fujixerox.edmics-mmr":{"source":"iana","extensions":["mmr"]},"image/vnd.fujixerox.edmics-rlc":{"source":"iana","extensions":["rlc"]},"image/vnd.globalgraphics.pgb":{"source":"iana"},"image/vnd.microsoft.icon":{"source":"iana","compressible":true,"extensions":["ico"]},"image/vnd.mix":{"source":"iana"},"image/vnd.mozilla.apng":{"source":"iana"},"image/vnd.ms-dds":{"compressible":true,"extensions":["dds"]},"image/vnd.ms-modi":{"source":"iana","extensions":["mdi"]},"image/vnd.ms-photo":{"source":"apache","extensions":["wdp"]},"image/vnd.net-fpx":{"source":"iana","extensions":["npx"]},"image/vnd.pco.b16":{"source":"iana","extensions":["b16"]},"image/vnd.radiance":{"source":"iana"},"image/vnd.sealed.png":{"source":"iana"},"image/vnd.sealedmedia.softseal.gif":{"source":"iana"},"image/vnd.sealedmedia.softseal.jpg":{"source":"iana"},"image/vnd.svf":{"source":"iana"},"image/vnd.tencent.tap":{"source":"iana","extensions":["tap"]},"image/vnd.valve.source.texture":{"source":"iana","extensions":["vtf"]},"image/vnd.wap.wbmp":{"source":"iana","extensions":["wbmp"]},"image/vnd.xiff":{"source":"iana","extensions":["xif"]},"image/vnd.zbrush.pcx":{"source":"iana","extensions":["pcx"]},"image/webp":{"source":"apache","extensions":["webp"]},"image/wmf":{"source":"iana","extensions":["wmf"]},"image/x-3ds":{"source":"apache","extensions":["3ds"]},"image/x-cmu-raster":{"source":"apache","extensions":["ras"]},"image/x-cmx":{"source":"apache","extensions":["cmx"]},"image/x-freehand":{"source":"apache","extensions":["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{"source":"apache","compressible":true,"extensions":["ico"]},"image/x-jng":{"source":"nginx","extensions":["jng"]},"image/x-mrsid-image":{"source":"apache","extensions":["sid"]},"image/x-ms-bmp":{"source":"nginx","compressible":true,"extensions":["bmp"]},"image/x-pcx":{"source":"apache","extensions":["pcx"]},"image/x-pict":{"source":"apache","extensions":["pic","pct"]},"image/x-portable-anymap":{"source":"apache","extensions":["pnm"]},"image/x-portable-bitmap":{"source":"apache","extensions":["pbm"]},"image/x-portable-graymap":{"source":"apache","extensions":["pgm"]},"image/x-portable-pixmap":{"source":"apache","extensions":["ppm"]},"image/x-rgb":{"source":"apache","extensions":["rgb"]},"image/x-tga":{"source":"apache","extensions":["tga"]},"image/x-xbitmap":{"source":"apache","extensions":["xbm"]},"image/x-xcf":{"compressible":false},"image/x-xpixmap":{"source":"apache","extensions":["xpm"]},"image/x-xwindowdump":{"source":"apache","extensions":["xwd"]},"message/cpim":{"source":"iana"},"message/delivery-status":{"source":"iana"},"message/disposition-notification":{"source":"iana","extensions":["disposition-notification"]},"message/external-body":{"source":"iana"},"message/feedback-report":{"source":"iana"},"message/global":{"source":"iana","extensions":["u8msg"]},"message/global-delivery-status":{"source":"iana","extensions":["u8dsn"]},"message/global-disposition-notification":{"source":"iana","extensions":["u8mdn"]},"message/global-headers":{"source":"iana","extensions":["u8hdr"]},"message/http":{"source":"iana","compressible":false},"message/imdn+xml":{"source":"iana","compressible":true},"message/news":{"source":"iana"},"message/partial":{"source":"iana","compressible":false},"message/rfc822":{"source":"iana","compressible":true,"extensions":["eml","mime"]},"message/s-http":{"source":"iana"},"message/sip":{"source":"iana"},"message/sipfrag":{"source":"iana"},"message/tracking-status":{"source":"iana"},"message/vnd.si.simp":{"source":"iana"},"message/vnd.wfa.wsc":{"source":"iana","extensions":["wsc"]},"model/3mf":{"source":"iana","extensions":["3mf"]},"model/e57":{"source":"iana"},"model/gltf+json":{"source":"iana","compressible":true,"extensions":["gltf"]},"model/gltf-binary":{"source":"iana","compressible":true,"extensions":["glb"]},"model/iges":{"source":"iana","compressible":false,"extensions":["igs","iges"]},"model/mesh":{"source":"iana","compressible":false,"extensions":["msh","mesh","silo"]},"model/mtl":{"source":"iana","extensions":["mtl"]},"model/obj":{"source":"iana","extensions":["obj"]},"model/step":{"source":"iana"},"model/step+xml":{"source":"iana","compressible":true,"extensions":["stpx"]},"model/step+zip":{"source":"iana","compressible":false,"extensions":["stpz"]},"model/step-xml+zip":{"source":"iana","compressible":false,"extensions":["stpxz"]},"model/stl":{"source":"iana","extensions":["stl"]},"model/vnd.collada+xml":{"source":"iana","compressible":true,"extensions":["dae"]},"model/vnd.dwf":{"source":"iana","extensions":["dwf"]},"model/vnd.flatland.3dml":{"source":"iana"},"model/vnd.gdl":{"source":"iana","extensions":["gdl"]},"model/vnd.gs-gdl":{"source":"apache"},"model/vnd.gs.gdl":{"source":"iana"},"model/vnd.gtw":{"source":"iana","extensions":["gtw"]},"model/vnd.moml+xml":{"source":"iana","compressible":true},"model/vnd.mts":{"source":"iana","extensions":["mts"]},"model/vnd.opengex":{"source":"iana","extensions":["ogex"]},"model/vnd.parasolid.transmit.binary":{"source":"iana","extensions":["x_b"]},"model/vnd.parasolid.transmit.text":{"source":"iana","extensions":["x_t"]},"model/vnd.pytha.pyox":{"source":"iana"},"model/vnd.rosette.annotated-data-model":{"source":"iana"},"model/vnd.sap.vds":{"source":"iana","extensions":["vds"]},"model/vnd.usdz+zip":{"source":"iana","compressible":false,"extensions":["usdz"]},"model/vnd.valve.source.compiled-map":{"source":"iana","extensions":["bsp"]},"model/vnd.vtu":{"source":"iana","extensions":["vtu"]},"model/vrml":{"source":"iana","compressible":false,"extensions":["wrl","vrml"]},"model/x3d+binary":{"source":"apache","compressible":false,"extensions":["x3db","x3dbz"]},"model/x3d+fastinfoset":{"source":"iana","extensions":["x3db"]},"model/x3d+vrml":{"source":"apache","compressible":false,"extensions":["x3dv","x3dvz"]},"model/x3d+xml":{"source":"iana","compressible":true,"extensions":["x3d","x3dz"]},"model/x3d-vrml":{"source":"iana","extensions":["x3dv"]},"multipart/alternative":{"source":"iana","compressible":false},"multipart/appledouble":{"source":"iana"},"multipart/byteranges":{"source":"iana"},"multipart/digest":{"source":"iana"},"multipart/encrypted":{"source":"iana","compressible":false},"multipart/form-data":{"source":"iana","compressible":false},"multipart/header-set":{"source":"iana"},"multipart/mixed":{"source":"iana"},"multipart/multilingual":{"source":"iana"},"multipart/parallel":{"source":"iana"},"multipart/related":{"source":"iana","compressible":false},"multipart/report":{"source":"iana"},"multipart/signed":{"source":"iana","compressible":false},"multipart/vnd.bint.med-plus":{"source":"iana"},"multipart/voice-message":{"source":"iana"},"multipart/x-mixed-replace":{"source":"iana"},"text/1d-interleaved-parityfec":{"source":"iana"},"text/cache-manifest":{"source":"iana","compressible":true,"extensions":["appcache","manifest"]},"text/calendar":{"source":"iana","extensions":["ics","ifb"]},"text/calender":{"compressible":true},"text/cmd":{"compressible":true},"text/coffeescript":{"extensions":["coffee","litcoffee"]},"text/cql":{"source":"iana"},"text/cql-expression":{"source":"iana"},"text/cql-identifier":{"source":"iana"},"text/css":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["css"]},"text/csv":{"source":"iana","compressible":true,"extensions":["csv"]},"text/csv-schema":{"source":"iana"},"text/directory":{"source":"iana"},"text/dns":{"source":"iana"},"text/ecmascript":{"source":"iana"},"text/encaprtp":{"source":"iana"},"text/enriched":{"source":"iana"},"text/fhirpath":{"source":"iana"},"text/flexfec":{"source":"iana"},"text/fwdred":{"source":"iana"},"text/gff3":{"source":"iana"},"text/grammar-ref-list":{"source":"iana"},"text/html":{"source":"iana","compressible":true,"extensions":["html","htm","shtml"]},"text/jade":{"extensions":["jade"]},"text/javascript":{"source":"iana","compressible":true},"text/jcr-cnd":{"source":"iana"},"text/jsx":{"compressible":true,"extensions":["jsx"]},"text/less":{"compressible":true,"extensions":["less"]},"text/markdown":{"source":"iana","compressible":true,"extensions":["markdown","md"]},"text/mathml":{"source":"nginx","extensions":["mml"]},"text/mdx":{"compressible":true,"extensions":["mdx"]},"text/mizar":{"source":"iana"},"text/n3":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["n3"]},"text/parameters":{"source":"iana","charset":"UTF-8"},"text/parityfec":{"source":"iana"},"text/plain":{"source":"iana","compressible":true,"extensions":["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{"source":"iana","charset":"UTF-8"},"text/prs.fallenstein.rst":{"source":"iana"},"text/prs.lines.tag":{"source":"iana","extensions":["dsc"]},"text/prs.prop.logic":{"source":"iana"},"text/raptorfec":{"source":"iana"},"text/red":{"source":"iana"},"text/rfc822-headers":{"source":"iana"},"text/richtext":{"source":"iana","compressible":true,"extensions":["rtx"]},"text/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"text/rtp-enc-aescm128":{"source":"iana"},"text/rtploopback":{"source":"iana"},"text/rtx":{"source":"iana"},"text/sgml":{"source":"iana","extensions":["sgml","sgm"]},"text/shaclc":{"source":"iana"},"text/shex":{"source":"iana","extensions":["shex"]},"text/slim":{"extensions":["slim","slm"]},"text/spdx":{"source":"iana","extensions":["spdx"]},"text/strings":{"source":"iana"},"text/stylus":{"extensions":["stylus","styl"]},"text/t140":{"source":"iana"},"text/tab-separated-values":{"source":"iana","compressible":true,"extensions":["tsv"]},"text/troff":{"source":"iana","extensions":["t","tr","roff","man","me","ms"]},"text/turtle":{"source":"iana","charset":"UTF-8","extensions":["ttl"]},"text/ulpfec":{"source":"iana"},"text/uri-list":{"source":"iana","compressible":true,"extensions":["uri","uris","urls"]},"text/vcard":{"source":"iana","compressible":true,"extensions":["vcard"]},"text/vnd.a":{"source":"iana"},"text/vnd.abc":{"source":"iana"},"text/vnd.ascii-art":{"source":"iana"},"text/vnd.curl":{"source":"iana","extensions":["curl"]},"text/vnd.curl.dcurl":{"source":"apache","extensions":["dcurl"]},"text/vnd.curl.mcurl":{"source":"apache","extensions":["mcurl"]},"text/vnd.curl.scurl":{"source":"apache","extensions":["scurl"]},"text/vnd.debian.copyright":{"source":"iana","charset":"UTF-8"},"text/vnd.dmclientscript":{"source":"iana"},"text/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"text/vnd.esmertec.theme-descriptor":{"source":"iana","charset":"UTF-8"},"text/vnd.familysearch.gedcom":{"source":"iana","extensions":["ged"]},"text/vnd.ficlab.flt":{"source":"iana"},"text/vnd.fly":{"source":"iana","extensions":["fly"]},"text/vnd.fmi.flexstor":{"source":"iana","extensions":["flx"]},"text/vnd.gml":{"source":"iana"},"text/vnd.graphviz":{"source":"iana","extensions":["gv"]},"text/vnd.hans":{"source":"iana"},"text/vnd.hgl":{"source":"iana"},"text/vnd.in3d.3dml":{"source":"iana","extensions":["3dml"]},"text/vnd.in3d.spot":{"source":"iana","extensions":["spot"]},"text/vnd.iptc.newsml":{"source":"iana"},"text/vnd.iptc.nitf":{"source":"iana"},"text/vnd.latex-z":{"source":"iana"},"text/vnd.motorola.reflex":{"source":"iana"},"text/vnd.ms-mediapackage":{"source":"iana"},"text/vnd.net2phone.commcenter.command":{"source":"iana"},"text/vnd.radisys.msml-basic-layout":{"source":"iana"},"text/vnd.senx.warpscript":{"source":"iana"},"text/vnd.si.uricatalogue":{"source":"iana"},"text/vnd.sosi":{"source":"iana"},"text/vnd.sun.j2me.app-descriptor":{"source":"iana","charset":"UTF-8","extensions":["jad"]},"text/vnd.trolltech.linguist":{"source":"iana","charset":"UTF-8"},"text/vnd.wap.si":{"source":"iana"},"text/vnd.wap.sl":{"source":"iana"},"text/vnd.wap.wml":{"source":"iana","extensions":["wml"]},"text/vnd.wap.wmlscript":{"source":"iana","extensions":["wmls"]},"text/vtt":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["vtt"]},"text/x-asm":{"source":"apache","extensions":["s","asm"]},"text/x-c":{"source":"apache","extensions":["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{"source":"nginx","extensions":["htc"]},"text/x-fortran":{"source":"apache","extensions":["f","for","f77","f90"]},"text/x-gwt-rpc":{"compressible":true},"text/x-handlebars-template":{"extensions":["hbs"]},"text/x-java-source":{"source":"apache","extensions":["java"]},"text/x-jquery-tmpl":{"compressible":true},"text/x-lua":{"extensions":["lua"]},"text/x-markdown":{"compressible":true,"extensions":["mkd"]},"text/x-nfo":{"source":"apache","extensions":["nfo"]},"text/x-opml":{"source":"apache","extensions":["opml"]},"text/x-org":{"compressible":true,"extensions":["org"]},"text/x-pascal":{"source":"apache","extensions":["p","pas"]},"text/x-processing":{"compressible":true,"extensions":["pde"]},"text/x-sass":{"extensions":["sass"]},"text/x-scss":{"extensions":["scss"]},"text/x-setext":{"source":"apache","extensions":["etx"]},"text/x-sfv":{"source":"apache","extensions":["sfv"]},"text/x-suse-ymp":{"compressible":true,"extensions":["ymp"]},"text/x-uuencode":{"source":"apache","extensions":["uu"]},"text/x-vcalendar":{"source":"apache","extensions":["vcs"]},"text/x-vcard":{"source":"apache","extensions":["vcf"]},"text/xml":{"source":"iana","compressible":true,"extensions":["xml"]},"text/xml-external-parsed-entity":{"source":"iana"},"text/yaml":{"compressible":true,"extensions":["yaml","yml"]},"video/1d-interleaved-parityfec":{"source":"iana"},"video/3gpp":{"source":"iana","extensions":["3gp","3gpp"]},"video/3gpp-tt":{"source":"iana"},"video/3gpp2":{"source":"iana","extensions":["3g2"]},"video/av1":{"source":"iana"},"video/bmpeg":{"source":"iana"},"video/bt656":{"source":"iana"},"video/celb":{"source":"iana"},"video/dv":{"source":"iana"},"video/encaprtp":{"source":"iana"},"video/ffv1":{"source":"iana"},"video/flexfec":{"source":"iana"},"video/h261":{"source":"iana","extensions":["h261"]},"video/h263":{"source":"iana","extensions":["h263"]},"video/h263-1998":{"source":"iana"},"video/h263-2000":{"source":"iana"},"video/h264":{"source":"iana","extensions":["h264"]},"video/h264-rcdo":{"source":"iana"},"video/h264-svc":{"source":"iana"},"video/h265":{"source":"iana"},"video/iso.segment":{"source":"iana","extensions":["m4s"]},"video/jpeg":{"source":"iana","extensions":["jpgv"]},"video/jpeg2000":{"source":"iana"},"video/jpm":{"source":"apache","extensions":["jpm","jpgm"]},"video/jxsv":{"source":"iana"},"video/mj2":{"source":"iana","extensions":["mj2","mjp2"]},"video/mp1s":{"source":"iana"},"video/mp2p":{"source":"iana"},"video/mp2t":{"source":"iana","extensions":["ts"]},"video/mp4":{"source":"iana","compressible":false,"extensions":["mp4","mp4v","mpg4"]},"video/mp4v-es":{"source":"iana"},"video/mpeg":{"source":"iana","compressible":false,"extensions":["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{"source":"iana"},"video/mpv":{"source":"iana"},"video/nv":{"source":"iana"},"video/ogg":{"source":"iana","compressible":false,"extensions":["ogv"]},"video/parityfec":{"source":"iana"},"video/pointer":{"source":"iana"},"video/quicktime":{"source":"iana","compressible":false,"extensions":["qt","mov"]},"video/raptorfec":{"source":"iana"},"video/raw":{"source":"iana"},"video/rtp-enc-aescm128":{"source":"iana"},"video/rtploopback":{"source":"iana"},"video/rtx":{"source":"iana"},"video/scip":{"source":"iana"},"video/smpte291":{"source":"iana"},"video/smpte292m":{"source":"iana"},"video/ulpfec":{"source":"iana"},"video/vc1":{"source":"iana"},"video/vc2":{"source":"iana"},"video/vnd.cctv":{"source":"iana"},"video/vnd.dece.hd":{"source":"iana","extensions":["uvh","uvvh"]},"video/vnd.dece.mobile":{"source":"iana","extensions":["uvm","uvvm"]},"video/vnd.dece.mp4":{"source":"iana"},"video/vnd.dece.pd":{"source":"iana","extensions":["uvp","uvvp"]},"video/vnd.dece.sd":{"source":"iana","extensions":["uvs","uvvs"]},"video/vnd.dece.video":{"source":"iana","extensions":["uvv","uvvv"]},"video/vnd.directv.mpeg":{"source":"iana"},"video/vnd.directv.mpeg-tts":{"source":"iana"},"video/vnd.dlna.mpeg-tts":{"source":"iana"},"video/vnd.dvb.file":{"source":"iana","extensions":["dvb"]},"video/vnd.fvt":{"source":"iana","extensions":["fvt"]},"video/vnd.hns.video":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.ttsavc":{"source":"iana"},"video/vnd.iptvforum.ttsmpeg2":{"source":"iana"},"video/vnd.motorola.video":{"source":"iana"},"video/vnd.motorola.videop":{"source":"iana"},"video/vnd.mpegurl":{"source":"iana","extensions":["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{"source":"iana","extensions":["pyv"]},"video/vnd.nokia.interleaved-multimedia":{"source":"iana"},"video/vnd.nokia.mp4vr":{"source":"iana"},"video/vnd.nokia.videovoip":{"source":"iana"},"video/vnd.objectvideo":{"source":"iana"},"video/vnd.radgamettools.bink":{"source":"iana"},"video/vnd.radgamettools.smacker":{"source":"iana"},"video/vnd.sealed.mpeg1":{"source":"iana"},"video/vnd.sealed.mpeg4":{"source":"iana"},"video/vnd.sealed.swf":{"source":"iana"},"video/vnd.sealedmedia.softseal.mov":{"source":"iana"},"video/vnd.uvvu.mp4":{"source":"iana","extensions":["uvu","uvvu"]},"video/vnd.vivo":{"source":"iana","extensions":["viv"]},"video/vnd.youtube.yt":{"source":"iana"},"video/vp8":{"source":"iana"},"video/vp9":{"source":"iana"},"video/webm":{"source":"apache","compressible":false,"extensions":["webm"]},"video/x-f4v":{"source":"apache","extensions":["f4v"]},"video/x-fli":{"source":"apache","extensions":["fli"]},"video/x-flv":{"source":"apache","compressible":false,"extensions":["flv"]},"video/x-m4v":{"source":"apache","extensions":["m4v"]},"video/x-matroska":{"source":"apache","compressible":false,"extensions":["mkv","mk3d","mks"]},"video/x-mng":{"source":"apache","extensions":["mng"]},"video/x-ms-asf":{"source":"apache","extensions":["asf","asx"]},"video/x-ms-vob":{"source":"apache","extensions":["vob"]},"video/x-ms-wm":{"source":"apache","extensions":["wm"]},"video/x-ms-wmv":{"source":"apache","compressible":false,"extensions":["wmv"]},"video/x-ms-wmx":{"source":"apache","extensions":["wmx"]},"video/x-ms-wvx":{"source":"apache","extensions":["wvx"]},"video/x-msvideo":{"source":"apache","extensions":["avi"]},"video/x-sgi-movie":{"source":"apache","extensions":["movie"]},"video/x-smv":{"source":"apache","extensions":["smv"]},"x-conference/x-cooltalk":{"source":"apache","extensions":["ice"]},"x-shader/x-fragment":{"compressible":true},"x-shader/x-vertex":{"compressible":true}}')},function(e,t,n){(function(e){function n(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}t.resolve=function(){for(var t="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var s=o>=0?arguments[o]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(t=s+"/"+t,i="/"===s.charAt(0))}return(i?"/":"")+(t=n(r(t.split("/"),(function(e){return!!e})),!i).join("/"))||"."},t.normalize=function(e){var o=t.isAbsolute(e),s="/"===i(e,-1);return(e=n(r(e.split("/"),(function(e){return!!e})),!o).join("/"))||o||(e="."),e&&s&&(e+="/"),(o?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var i=r(e.split("/")),o=r(n.split("/")),s=Math.min(i.length,o.length),a=s,l=0;l<s;l++)if(i[l]!==o[l]){a=l;break}var c=[];for(l=a;l<i.length;l++)c.push("..");return(c=c.concat(o.slice(a))).join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,r=-1,i=!0,o=e.length-1;o>=1;--o)if(47===(t=e.charCodeAt(o))){if(!i){r=o;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},t.basename=function(e,t){var n=function(e){"string"!=typeof e&&(e+="");var t,n=0,r=-1,i=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!i){n=t+1;break}}else-1===r&&(i=!1,r=t+1);return-1===r?"":e.slice(n,r)}(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,n=0,r=-1,i=!0,o=0,s=e.length-1;s>=0;--s){var a=e.charCodeAt(s);if(47!==a)-1===r&&(i=!1,r=s+1),46===a?-1===t?t=s:1!==o&&(o=1):-1!==t&&(o=-1);else if(!i){n=s+1;break}}return-1===t||-1===r||0===o||1===o&&t===r-1&&t===n+1?"":e.slice(t,r)};var i="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,n(36))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e[e.length-1]}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(69));function o(e){return e&&e.nodeType===i.default.ELEMENT_NODE}function s(e,t){return o(e)?e.getAttribute(t):void 0}function a(e){return e&&e.childNodes}function l(e){return e?e.parentNode:null}t.default={isTag:o,getAttributeValue:s,getName:function(e){return(e&&e.rawTagName||"").toLowerCase()},getChildren:a,getParent:l,getText:function(e){return e.text},removeSubsets:function(e){for(var t,n,r,i=e.length;--i>-1;){for(t=n=e[i],e[i]=null,r=!0;n;){if(e.indexOf(n)>-1){r=!1,e.splice(i,1);break}n=l(n)}r&&(e[i]=t)}return e},existsOne:function e(t,n){return n.some((function(n){return!!o(n)&&(t(n)||e(t,a(n)))}))},getSiblings:function(e){var t=l(e);return t?a(t):[]},hasAttrib:function(e,t){return void 0!==s(e,t)},findOne:function e(t,n){for(var r=null,i=0,o=null==n?void 0:n.length;i<o&&!r;i++){var s=n[i];if(t(s))r=s;else{var l=a(s);l&&l.length>0&&(r=e(t,l))}}return r},findAll:function e(t,n){for(var r=[],i=0,s=n.length;i<s;i++)if(o(n[i])){t(n[i])&&r.push(n[i]);var l=a(n[i]);l&&(r=r.concat(e(t,l)))}return r}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){void 0===e&&(e=!1),this.addClosingSlash=e,Array.isArray(t)?this.voidTags=t.reduce((function(e,t){return e.add(t.toLowerCase())}),new Set):this.voidTags=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"].reduce((function(e,t){return e.add(t)}),new Set)}return e.prototype.formatNode=function(e,t,n){var r=this.addClosingSlash,i=r&&t&&!t.endsWith(" ")?" ":"",o=r?"".concat(i,"/"):"";return this.isVoidElement(e.toLowerCase())?"<".concat(e).concat(t).concat(o,">"):"<".concat(e).concat(t,">").concat(n,"</").concat(e,">")},e.prototype.isVoidElement=function(e){return this.voidTags.has(e)},e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(104);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r.parse}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(104);t.default=function(e,t){void 0===t&&(t={});var n=(0,r.base_parse)(e,t);return Boolean(1===n.length)}},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.run-bar{display:flex;flex-direction:row;justify-content:flex-end;padding:calc(.5rem*var(--scale-factor, 1))}.--light .run-bar{border-block-start:1px solid #d5d7dc}.--dark .run-bar{border-block-start:1px solid #4a4d59}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.save-status{align-items:center;display:flex;gap:calc(.25rem*var(--scale-factor, 1));justify-content:flex-end;margin-block:0;padding-inline:calc(1rem*var(--scale-factor, 1))}.save-status--mobile{margin:unset}.save-status--mobile .save-status__text{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1))}.save-status__icon{display:flex}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.rpf-button--primary * svg{fill:var(--rpf-button-primary-text-color)}.rpf-button--tertiary * svg{fill:var(--rpf-button-secondary-text-color) !important}.rpf-button{flex-direction:row-reverse}.rpf-button--fit{inline-size:fit-content}.rpf-button.rpf-button--fill{justify-content:center;inline-size:100%;box-sizing:border-box}.rpf-button--secondary{justify-content:center;align-items:center}.rpf-button--secondary * svg{fill:#4d575b}.--dark * .rpf-button--secondary{border-color:#89ddd5}.--dark * .rpf-button--secondary span{color:#fff}.--dark * .rpf-button--secondary svg{fill:#fff}.--dark * .rpf-button--secondary::before{background-color:#33353d}.--dark * .rpf-button--secondary:hover{border-color:#89ddd5}.--dark * .rpf-button--secondary:hover::before{background-color:rgba(255,255,255,.1)}.--dark * .rpf-button--secondary:active::before{background-color:rgba(255,255,255,.15)}.--dark * .rpf-button--secondary:disabled{border-color:#d5d7dc;background-color:inherit}.--dark * .rpf-button--secondary:disabled::before{background-color:inherit}.--dark * .rpf-button--secondary:disabled span{color:#d5d7dc}.--dark * .rpf-button--tertiary{color:#fff;border:none}.--dark * .rpf-button--tertiary:hover::before{background-color:rgba(255,255,255,.1)}.--dark * .rpf-button--tertiary:active::before{background-color:rgba(255,255,255,.15)}.--dark * .rpf-button--tertiary:disabled{background-color:inherit}.--dark * .rpf-button--tertiary:disabled::before{background-color:inherit}.--dark * .rpf-button--tertiary:disabled span{color:#d5d7dc}.--light * .rpf-button--secondary span{color:#212121}.--light * .rpf-button--secondary::before{background-color:#fff}.--light * .rpf-button--secondary:hover{border-color:#89ddd5}.--light * .rpf-button--secondary:hover::before{background-color:#e7f8f7}.--light * .rpf-button--secondary:active::before{background-color:#dcf5f3}.--light * .rpf-button--secondary:disabled{border-color:#d5d7dc;background-color:inherit}.--light * .rpf-button--secondary:disabled::before{background-color:inherit}.--light * .rpf-button--secondary:disabled span{color:#d5d7dc}.--light * .rpf-button--tertiary{color:#212121;border:none}.--light * .rpf-button--tertiary::before{background-color:#fff}.--light * .rpf-button--tertiary:hover::before{background-color:#e7f8f7}.--light * .rpf-button--tertiary:active::before{background-color:#dcf5f3}.--light * .rpf-button--tertiary:disabled{background-color:inherit}.--light * .rpf-button--tertiary:disabled::before{background-color:inherit}.--light * .rpf-button--tertiary:disabled span{color:#d5d7dc}.rpf-button__icon{display:flex}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.project-name{align-items:center;display:flex;block-size:100%;padding-inline-start:calc(.5rem*var(--scale-factor, 1))}.project-name .btn--primary{margin:0 calc(.5rem*var(--scale-factor, 1))}.project-name__title{font-size:calc(1.25rem*var(--scale-factor, 1));font-weight:700;margin-block:calc(1rem*var(--scale-factor, 1));margin-inline-start:calc(.5rem*var(--scale-factor, 1));margin-inline-end:calc(1rem*var(--scale-factor, 1));overflow:hidden;text-overflow:ellipsis;text-wrap:nowrap}.project-name__label{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));font-weight:700;margin-block-end:calc(.5rem*var(--scale-factor, 1));display:block}.project-name__input{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));padding:0 calc(1.5rem*var(--scale-factor, 1));block-size:calc(3rem*var(--scale-factor, 1));border-radius:calc(.5rem*var(--scale-factor, 1));border:none;color:inherit;background-color:inherit;text-overflow:ellipsis;inline-size:100%}.project-name__button{margin:calc(.5rem*var(--scale-factor, 1));inline-size:48px;block-size:48px}.project-name__button svg{block-size:calc(1.5rem*var(--scale-factor, 1));inline-size:calc(1.5rem*var(--scale-factor, 1));margin:0}.--dark .project-name__input{background-color:#4a4d59}.--dark .project-name__input:focus-visible{background-color:inherit;outline:2px solid #fff}.--light .project-name__input{background-color:#f1f2f3}.--light .project-name__input:focus-visible{background-color:inherit;outline:2px solid #212121}",""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.kebabKeys=t.pascalKeys=t.snakeKeys=t.camelKeys=t.upperKeys=t.lowerKeys=t.toLowerCase=t.toUpperCase=t.toKebabCase=t.toHeaderCase=t.toSentenceCase=t.toTextCase=t.toPathCase=t.toDotCase=t.toPascalCase=t.toSnakeCase=t.toCamelCase=void 0;var r=n(155);t.toCamelCase=r.default;var i=n(156);t.toSnakeCase=i.default;var o=n(157);t.toPascalCase=o.default;var s=n(375);t.toDotCase=s.default;var a=n(376);t.toPathCase=a.default;var l=n(377);t.toTextCase=l.default;var c=n(378);t.toSentenceCase=c.default;var u=n(379);t.toHeaderCase=u.default;var d=n(158);t.toKebabCase=d.default;var h=n(380);t.lowerKeys=h.default;var p=n(381);t.upperKeys=p.default;var f=n(382);t.camelKeys=f.default;var m=n(383);t.snakeKeys=m.default;var g=n(384);t.pascalKeys=g.default;var b=n(385);t.kebabKeys=b.default;var v=function(e){return String(e||"").toLowerCase()};t.toLowerCase=v;var y=function(e){return String(e||"").toUpperCase()};t.toUpperCase=y;var S={toCamelCase:r.default,toSnakeCase:i.default,toPascalCase:o.default,toDotCase:s.default,toPathCase:a.default,toTextCase:l.default,toSentenceCase:c.default,toHeaderCase:u.default,toKebabCase:d.default,toUpperCase:y,toLowerCase:v,lowerKeys:h.default,upperKeys:p.default,camelKeys:f.default,snakeKeys:m.default,pascalKeys:g.default,kebabKeys:b.default};t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return void 0===e&&(e=""),e?String(e).replace(/^[^A-Za-z0-9]*|[^A-Za-z0-9]*$/g,"").replace(/([a-z])([A-Z])/g,(function(e,t,n){return t+"_"+n.toLowerCase()})).replace(/[^A-Za-z0-9]+|_+/g,".").toLowerCase():""}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return void 0===e&&(e=""),e?String(e).replace(/^[^A-Za-z0-9]*|[^A-Za-z0-9]*$/g,"").replace(/([a-z])([A-Z])/g,(function(e,t,n){return t+"_"+n.toLowerCase()})).replace(/[^A-Za-z0-9]+|_+/g,"/").toLowerCase():""}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return void 0===e&&(e=""),e?String(e).replace(/^[^A-Za-z0-9]*|[^A-Za-z0-9]*$/g,"").replace(/([a-z])([A-Z])/g,(function(e,t,n){return t+"_"+n.toLowerCase()})).replace(/[^A-Za-z0-9]+|_+/g," ").toLowerCase():""}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(void 0===e&&(e=""),!e)return"";var t=String(e).replace(/^[^A-Za-z0-9]*|[^A-Za-z0-9]*$/g,"").replace(/([a-z])([A-Z])/g,(function(e,t,n){return t+"_"+n.toLowerCase()})).replace(/[^A-Za-z0-9]+|_+/g," ").toLowerCase();return t.charAt(0).toUpperCase()+t.slice(1)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return void 0===e&&(e=""),e?String(e).replace(/^[^A-Za-z0-9]*|[^A-Za-z0-9]*$/g,"").replace(/([a-z])([A-Z])/g,(function(e,t,n){return t+"_"+n.toLowerCase()})).replace(/[^A-Za-z0-9]+|_+/g," ").toLowerCase().replace(/( ?)(\w+)( ?)/g,(function(e,t,n,r){return t+n.charAt(0).toUpperCase()+n.slice(1)+r})):""}},function(e,t,n){"use strict";var r=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r};Object.defineProperty(t,"__esModule",{value:!0});var i=n(53);t.default=function e(t,n){if(void 0===n&&(n=i.DefaultOption),!i.isValidObject(t))return null;n=i.validateOptions(n);var o={};return Object.keys(t).forEach((function(s){var a=t[s],l=s.toLowerCase();n.recursive&&(i.isValidObject(a)?i.belongToTypes(a,n.keepTypesOnRecursion)||(a=e(a,n)):n.recursiveInArray&&i.isArrayObject(a)&&(a=r(a).map((function(t){var r=t;if(i.isValidObject(t))i.belongToTypes(r,n.keepTypesOnRecursion)||(r=e(t,n));else if(i.isArrayObject(t)){r=e({key:t},n).key}return r})))),o[l]=a})),o}},function(e,t,n){"use strict";var r=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r};Object.defineProperty(t,"__esModule",{value:!0});var i=n(53);t.default=function e(t,n){if(void 0===n&&(n=i.DefaultOption),!i.isValidObject(t))return null;n=i.validateOptions(n);var o={};return Object.keys(t).forEach((function(s){var a=t[s],l=s.toUpperCase();n.recursive&&(i.isValidObject(a)?i.belongToTypes(a,n.keepTypesOnRecursion)||(a=e(a,n)):n.recursiveInArray&&i.isArrayObject(a)&&(a=r(a).map((function(t){var r=t;if(i.isValidObject(t))i.belongToTypes(r,n.keepTypesOnRecursion)||(r=e(t,n));else if(i.isArrayObject(t)){r=e({key:t},n).key}return r})))),o[l]=a})),o}},function(e,t,n){"use strict";var r=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r};Object.defineProperty(t,"__esModule",{value:!0});var i=n(53),o=n(155);t.default=function e(t,n){if(void 0===n&&(n=i.DefaultOption),!i.isValidObject(t))return null;n=i.validateOptions(n);var s={};return Object.keys(t).forEach((function(a){var l=t[a],c=o.default(a);n.recursive&&(i.isValidObject(l)?i.belongToTypes(l,n.keepTypesOnRecursion)||(l=e(l,n)):n.recursiveInArray&&i.isArrayObject(l)&&(l=r(l).map((function(t){var r=t;if(i.isValidObject(t))i.belongToTypes(r,n.keepTypesOnRecursion)||(r=e(t,n));else if(i.isArrayObject(t)){r=e({key:t},n).key}return r})))),s[c]=l})),s}},function(e,t,n){"use strict";var r=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r};Object.defineProperty(t,"__esModule",{value:!0});var i=n(53),o=n(156);t.default=function e(t,n){if(void 0===n&&(n=i.DefaultOption),!i.isValidObject(t))return null;n=i.validateOptions(n);var s={};return Object.keys(t).forEach((function(a){var l=t[a],c=o.default(a);n.recursive&&(i.isValidObject(l)?i.belongToTypes(l,n.keepTypesOnRecursion)||(l=e(l,n)):n.recursiveInArray&&i.isArrayObject(l)&&(l=r(l).map((function(t){var r=t;if(i.isValidObject(t))i.belongToTypes(r,n.keepTypesOnRecursion)||(r=e(t,n));else if(i.isArrayObject(t)){r=e({key:t},n).key}return r})))),s[c]=l})),s}},function(e,t,n){"use strict";var r=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r};Object.defineProperty(t,"__esModule",{value:!0});var i=n(53),o=n(157);t.default=function e(t,n){if(void 0===n&&(n=i.DefaultOption),!i.isValidObject(t))return null;n=i.validateOptions(n);var s={};return Object.keys(t).forEach((function(a){var l=t[a],c=o.default(a);n.recursive&&(i.isValidObject(l)?i.belongToTypes(l,n.keepTypesOnRecursion)||(l=e(l,n)):n.recursiveInArray&&i.isArrayObject(l)&&(l=r(l).map((function(t){var r=t;if(i.isValidObject(t))i.belongToTypes(r,n.keepTypesOnRecursion)||(r=e(t,n));else if(i.isArrayObject(t)){r=e({key:t},n).key}return r})))),s[c]=l})),s}},function(e,t,n){"use strict";var r=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r};Object.defineProperty(t,"__esModule",{value:!0});var i=n(53),o=n(158);t.default=function e(t,n){if(void 0===n&&(n=i.DefaultOption),!i.isValidObject(t))return null;n=i.validateOptions(n);var s={};return Object.keys(t).forEach((function(a){var l=t[a],c=o.default(a);n.recursive&&(i.isValidObject(l)?i.belongToTypes(l,n.keepTypesOnRecursion)||(l=e(l,n)):n.recursiveInArray&&i.isArrayObject(l)&&(l=r(l).map((function(t){var r=t;if(i.isValidObject(t))i.belongToTypes(r,n.keepTypesOnRecursion)||(r=e(t,n));else if(i.isArrayObject(t)){r=e({key:t},n).key}return r})))),s[c]=l})),s}},function(e,t,n){"use strict";(function(e){
|
||
/*!
|
||
* The buffer module from node.js, for the browser.
|
||
*
|
||
* @author Feross Aboukhadijeh <http://feross.org>
|
||
* @license MIT
|
||
*/
|
||
var r=n(387),i=n(388),o=n(389);function s(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=l.prototype:(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,n){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);l.TYPED_ARRAY_SUPPORT?(e=t).__proto__=l.prototype:e=h(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!l.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|f(t,n),i=(e=a(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(l.isBuffer(t)){var n=0|p(t.length);return 0===(e=a(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?a(e,0):h(e,t);if("Buffer"===t.type&&o(t.data))return h(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(u(t),e=a(e,t<0?0:0|p(t)),!l.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function h(e,t){var n=t.length<0?0:0|p(t.length);e=a(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function f(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return F(e).length;default:if(r)return z(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return C(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return A(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return O(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var o,s=1,a=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,n/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var u=-1;for(o=n;o<a;o++)if(c(e,o)===c(t,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===l)return u*s}else-1!==u&&(o-=o-u),u=-1}else for(n+l>a&&(n=a-l),o=n;o>=0;o--){for(var d=!0,h=0;h<l;h++)if(c(e,o+h)!==c(t,h)){d=!1;break}if(d)return o}return-1}function y(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function S(e,t,n,r){return U(z(t,e.length-n),e,n,r)}function _(e,t,n,r){return U(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function x(e,t,n,r){return _(e,t,n,r)}function w(e,t,n,r){return U(F(t),e,n,r)}function k(e,t,n,r){return U(function(e,t){for(var n,r,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function O(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function E(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,s,a,l,c=e[i],u=null,d=c>239?4:c>223?3:c>191?2:1;if(i+d<=n)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&c)<<6|63&o)>127&&(u=l);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(l=(15&c)<<12|(63&o)<<6|63&s)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(l=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}t.Buffer=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,n){return c(null,e,t,n)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,n){return function(e,t,n,r){return u(t),t<=0?a(e,t):void 0!==n?"string"==typeof r?a(e,t).fill(n,r):a(e,t).fill(n):a(e,t)}(null,e,t,n)},l.allocUnsafe=function(e){return d(null,e)},l.allocUnsafeSlow=function(e){return d(null,e)},l.isBuffer=function(e){return!(null==e||!e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=l.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var s=e[n];if(!l.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},l.byteLength=f,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},l.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?E(this,0,e):m.apply(this,arguments)},l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},l.prototype.compare=function(e,t,n,r,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(o,s),c=this.slice(r,i),u=e.slice(t,n),d=0;d<a;++d)if(c[d]!==u[d]){o=c[d],s=u[d];break}return o<s?-1:s<o?1:0},l.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},l.prototype.indexOf=function(e,t,n){return b(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return b(this,e,t,n,!1)},l.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return S(this,e,t,n);case"ascii":return _(this,e,t,n);case"latin1":case"binary":return x(this,e,t,n);case"base64":return w(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function A(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function T(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function C(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=B(e[o]);return i}function M(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function $(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,n,r,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function R(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function j(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function N(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function D(e,t,n,r,o){return o||N(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function I(e,t,n,r,o){return o||N(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),l.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=l.prototype;else{var i=t-e;n=new l(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},l.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||$(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},l.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||$(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUInt8=function(e,t){return t||$(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||$(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||$(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||$(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||$(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||$(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||$(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return t||$(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||$(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||$(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||$(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||$(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||$(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||$(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||$(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||$(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||P(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},l.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||P(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):j(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):j(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);P(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);P(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):j(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):j(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return D(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return D(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return I(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return I(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},l.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!l.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=l.isBuffer(e)?e:z(new l(e,r).toString()),a=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%a]}return this};var L=/[^+\/0-9A-Za-z-_]/g;function B(e){return e<16?"0"+e.toString(16):e.toString(16)}function z(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function F(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(L,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(28))},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=c(e),s=r[0],a=r[1],l=new o(function(e,t,n){return 3*(t+n)/4-n}(0,s,a)),u=0,d=a>0?s-4:s;for(n=0;n<d;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=255&t;2===a&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,l[u++]=255&t);1===a&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t);return l},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=0,a=n-i;s<a;s+=16383)o.push(u(e,s,s+16383>a?a:s+16383));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,l=s.length;a<l;++a)r[a]=s[a],i[s.charCodeAt(a)]=a;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var i,o,s=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){
|
||
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,l=(1<<a)-1,c=l>>1,u=-7,d=n?i-1:0,h=n?-1:1,p=e[t+d];for(d+=h,o=p&(1<<-u)-1,p>>=-u,u+=a;u>0;o=256*o+e[t+d],d+=h,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=r;u>0;s=256*s+e[t+d],d+=h,u-=8);if(0===o)o=1-c;else{if(o===l)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),o-=c}return(p?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,l,c=8*o-i-1,u=(1<<c)-1,d=u>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,f=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(s++,l/=2),s+d>=u?(a=0,s=u):s+d>=1?(a=(t*l-1)*Math.pow(2,i),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;e[n+p]=255&a,p+=f,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[n+p]=255&s,p+=f,s/=256,c-=8);e[n+p-f]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.project-bar{border-radius:calc(.5rem*var(--scale-factor, 1));display:flex;align-items:center;z-index:1;block-size:calc(4rem*var(--scale-factor, 1));container-type:inline-size;background-color:var(--editor-color-layer-3);border:1px solid var(--editor-color-outline)}@container (max-width: 367px){.project-bar{flex-direction:column;block-size:fit-content;justify-content:left}}.project-bar .project-name{border-inline-end:1px solid var(--editor-color-outline);margin-inline-end:-1px;min-inline-size:0px}@container (max-width: 365px){.project-bar .project-name{inline-size:100%;box-sizing:border-box;border-inline-end:none}}.project-bar .btn--save{border-radius:calc(.5rem*var(--scale-factor, 1))}@container (min-width: 560px){.project-bar .btn--save .icon{display:none}}.project-bar .project-bar__btn-wrapper{block-size:100%}.project-bar .project-bar__btn-wrapper:not(:last-child){border-inline-end:1px solid var(--editor-color-outline)}.project-bar__right{border-inline-start:1px solid var(--editor-color-outline);margin-inline-start:auto;display:flex;align-items:center;block-size:100%;flex-shrink:0;max-inline-size:55%}@container (max-width: 365px){.project-bar__right{margin-inline-start:0;border-inline-start:none;border-block-start:1px solid var(--editor-color-outline);block-size:fit-content;inline-size:100%;max-inline-size:100%}.project-bar__right .save-status{flex:1;justify-content:center}}.project-bar__btn{border-radius:calc(.5rem*var(--scale-factor, 1));justify-content:center;margin:calc(.5rem*var(--scale-factor, 1));gap:calc(.5rem*var(--scale-factor, 1))}.project-bar__btn .text{display:none}.project-bar__btn:hover .project-bar__btn{border-radius:inherit}@container (min-width: 560px){.project-bar__btn .text{min-inline-size:auto;display:block}}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.context-menu__drop{padding:calc(.5rem*var(--scale-factor, 1)) calc(1rem*var(--scale-factor, 1));margin:0}.context-menu__drop svg{margin:0}.context-menu__drop :focus-visible{border:none}.context-menu{list-style-type:none;padding:0;margin-inline:calc(.5rem*var(--scale-factor, 1)) 0;margin-block:0;border-radius:5px;display:flex;flex-direction:column}.context-menu .context-menu__item{margin:0;background-color:inherit;color:var(--rpf-button-secondary-color);padding:calc(.5rem*var(--scale-factor, 1));text-align:start;white-space:nowrap;overflow-x:visible;box-sizing:border-box;inline-size:100%;justify-content:start}.context-menu :focus-visible{border:none}.context-menu svg{inline-size:calc(1.5rem*var(--scale-factor, 1));block-size:auto}.context-menu--dark{background-color:#000;color:#fff;border:1px solid rgba(0,0,0,0)}.context-menu--dark svg{fill:#fff}.context-menu--dark .btn:hover{background-color:#33353d}.context-menu--dark .btn:disabled{color:#4a4d59}.context-menu--light{background-color:#fff;color:#212121;border:1px solid #d5d7dc}.context-menu--light svg{fill:#000}.context-menu--light .btn:hover{background-color:#e3e4e8}.context-menu--light .btn:disabled{color:#babcc5}.context-menu--dark .btn:disabled svg{fill:#4a4d59}.context-menu--light .btn:disabled svg{fill:#e3e4e8}.context-menu .btn:disabled:hover{background-color:inherit}",""])},function(e,t,n){"use strict";
|
||
/**
|
||
* @license React
|
||
* react-jsx-runtime.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var r=n(0),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,o={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)s.call(t,r)&&!l.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:u,props:o,_owner:a.current}}t.Fragment=o,t.jsx=c,t.jsxs=c},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.files-list-item-wrapper{display:flex;position:relative}.files-list-item{inline-size:100%;display:flex;flex-direction:row !important;justify-content:flex-start;position:relative;align-items:center;border-radius:8px;border:3px solid rgba(0,0,0,0);box-sizing:border-box;white-space:nowrap;font-weight:400;min-block-size:44px;padding:calc(.5rem*var(--scale-factor, 1)) calc(2.5rem*var(--scale-factor, 1)) calc(.5rem*var(--scale-factor, 1)) calc(.5rem*var(--scale-factor, 1));margin:0}.files-list-item span{font-weight:700;overflow-x:hidden;text-overflow:ellipsis}.files-list-item__menu{border-radius:8px;position:absolute;inset-inline-end:0}.files-list-item:hover,.files-list-item__menu:hover{background-color:var(--rpf-files-list-item-hover)}.files-list-item:hover::before,.files-list-item__menu:hover::before{background-color:rgba(0,0,0,0) !important}.files-list-item:active,.files-list-item__menu:active{background-color:var(--rpf-files-list-item-active)}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,".resizable-with-handle__handle--right div{inset-inline-end:3px !important}.resizable-with-handle__handle--right div svg{block-size:100%;min-inline-size:0}.resizable-with-handle__handle--bottom div{inset-block-end:3px !important}.resizable-with-handle__handle--bottom div svg{inline-size:100%}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.info-panel{border-radius:calc(.5rem*var(--scale-factor, 1));padding:calc(1rem*var(--scale-factor, 1));margin-block-end:calc(.5rem*var(--scale-factor, 1))}.info-panel p{margin:0}.info-panel__links{display:flex;flex-direction:column}.info-panel__links a{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));font-weight:700;text-decoration:underline}.info-panel__link:last-of-type{margin-block-end:calc(1rem*var(--scale-factor, 1))}.--dark .info-panel{color:#fff;background-color:#4a4d59}.--dark .info-panel__links a{color:#fff}.--light .info-panel{color:#212121;background-color:#f1f2f3}.--light .info-panel__links a{color:#212121}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.select-buttons{border:none;margin:0;padding:0}.select-buttons__legend{padding:0;margin-block-end:calc(1rem*var(--scale-factor, 1))}.select-buttons__options{display:flex;inline-size:100%;gap:calc(1rem*var(--scale-factor, 1));flex-wrap:wrap}.select-buttons__option{flex:1}.select-buttons__button{opacity:0;position:absolute}.select-buttons__label{display:flex;align-items:center;padding:calc(.75rem*var(--scale-factor, 1));gap:calc(.75rem*var(--scale-factor, 1));border-radius:8px;position:relative;box-sizing:border-box;font-weight:700;cursor:pointer}.select-buttons__tick{display:flex;align-items:center;margin-inline-start:auto;visibility:hidden}.select-buttons__tick--selected{visibility:visible}.select-buttons__tick--selected svg rect{fill:var(--editor-color-theme)}.select-buttons__tick--selected svg path{fill:var(--rpf-select-buttons-tick-color)}.--light .select-buttons__label{border:2px solid #d5d7dc}.--light .select-buttons__label--selected{border:2px solid #212121}.--dark .select-buttons__label{border:2px solid #636674}.--dark .select-buttons__label--selected{border:2px solid #babcc5}.select-buttons__button:focus-visible+.select-buttons__label{outline:3px solid #cd2356}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.settings-panel{display:flex;flex-direction:column;gap:calc(1.25rem*var(--scale-factor, 1));padding:calc(.25rem*var(--scale-factor, 1))}.settings-panel .select-buttons__legend{font-size:calc(1.25rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));font-weight:700}.settings-panel .select-buttons__options{flex-direction:column}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.projects-panel-wrapper .sidebar__panel-content{overflow:visible}.projects-panel-wrapper .projects-panel__your-projects-button{display:flex;align-items:center;justify-content:center;inline-size:100%;box-sizing:border-box;margin:0}.projects-panel-wrapper .projects-panel__your-projects-button a{color:#000;text-decoration:none}.projects-panel-wrapper .projects-panel__download-button{inline-size:100%;margin:0;justify-content:center}.projects-panel-wrapper .project-name{block-size:auto;padding-inline-start:0}.projects-panel-wrapper .project-name__label{padding-inline-start:0}.projects-panel-wrapper .project-name__input{padding:0 calc(1rem*var(--scale-factor, 1))}.projects-panel-wrapper .projects-panel__item{margin-block-end:calc(1rem*var(--scale-factor, 1))}.projects-panel-wrapper .projects-panel__save,.projects-panel-wrapper .projects-panel__button{border-block-start:1px solid var(--sidebar-border);padding:calc(1rem*var(--scale-factor, 1)) 0;display:flex}.projects-panel-wrapper .projects-panel__save-button{inline-size:100%;margin-block-end:calc(1rem*var(--scale-factor, 1));justify-content:center}.projects-panel-wrapper .projects-panel__save-button .icon{display:none}.projects-panel-wrapper .projects-panel__save-button .content{margin:auto}.projects-panel-wrapper .projects-panel__save-button span{font-weight:bold}.projects-panel-wrapper .projects-panel__save-status{margin:auto;inline-size:fit-content}.--dark .projects-panel__save-button .content{color:#fff}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.project-info{align-items:inline-start;display:flex;flex-direction:column;padding:calc(1rem*var(--scale-factor, 1));border-radius:calc(.5rem*var(--scale-factor, 1));border:none;background-color:inherit}.project-info .btn--primary{margin:0 calc(.5rem*var(--scale-factor, 1))}.project-type__label{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));font-weight:700;margin-block-end:calc(.5rem*var(--scale-factor, 1));display:block}.project-type__text{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));color:inherit;text-overflow:ellipsis}.--light .project-info{background-color:#f1f2f3}.--dark .project-info{background-color:#4a4d59}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.project-images{display:grid;justify-content:center;gap:calc(1rem*var(--scale-factor, 1))}.project-images__block{display:inline-block;box-sizing:border-box;overflow-wrap:break-word;word-break:break-word;text-align:center;vertical-align:block-start}.project-images__image-wrapper{display:flex;align-items:center;justify-content:center}.project-images__image{block-size:auto;inline-size:100%}.project-images p{margin:0}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.download-panel__login-section{border-block-end:1px solid #d5d7dc;margin-block-end:calc(1.5rem*var(--scale-factor, 1));padding-block-end:calc(1.5rem*var(--scale-factor, 1))}.download-panel__subtitle{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));font-weight:700;margin-block-end:calc(.5rem*var(--scale-factor, 1))}.download-panel__hint{margin:0;margin-block-end:calc(1rem*var(--scale-factor, 1))}.download-panel__button-container{display:flex;flex-direction:column;justify-content:center;align-self:stretch;gap:calc(1rem*var(--scale-factor, 1));align-items:stretch}.download-panel__button{justify-content:center;inline-size:100%;box-sizing:border-box;margin:0}.download-panel__download-section{margin-block-end:calc(1rem*var(--scale-factor, 1))}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,".progress-bar{accent-color:var(--editor-color-theme);display:flex;align-items:center;justify-content:center;max-inline-size:300px;margin:auto}.progress-bar progress{flex:1;min-inline-size:0px}.progress-bar .btn-outer{padding:calc(.5rem*var(--scale-factor, 1))}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(58),s=n.n(o),a=n(82),l=n(83),c=i()(!1),u=s()(a.a),d=s()(l.a);c.push([e.i,':root{--rpf-brand-black: hsla(60, 4%, 11%, 1);--rpf-brand-leaf: hsla(123, 43%, 48%, 1);--rpf-brand-raspberry: hsla(342, 71%, 47%, 1)}:root{--space-0-125: 0.0625rem;--space-0-25: 0.125rem;--space-0-5: 0.25rem;--space-1: 0.5rem;--space-1-5: 0.75rem;--space-2: 1rem;--space-3: 1.5rem;--space-4: 2rem;--space-5: 2.5rem;--space-6: 3rem;--space-7: 3.5rem;--space-8: 4rem;--space-9: 4.5rem;--space-10: 5rem}.rpf-squiggle,.rpf-squiggle-heading::after,.project-instructions .c-project-heading--task::after{--rpf-squiggle-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xml%3Aspace%3D%22preserve%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%3Bstroke-linecap%3Around%3Bstroke-miterlimit%3A10%22%20viewBox%3D%220%200%2029%2013%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M3%2011c7%200%207-8%2014-8%208%200%208%208%2015%208%22%20style%3D%22fill%3Anone%3Bfill-rule%3Anonzero%3Bstroke%3Awhite%3Bstroke-width%3A4px%22%20transform%3D%22translate%28-3%29%22%2F%3E%3C%2Fsvg%3E");--rpf-squiggle-end-cap-l-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xml%3Aspace%3D%22preserve%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%22%20viewBox%3D%220%200%202%2013%22%3E%3Ccircle%20cx%3D%220%22%20cy%3D%2211%22%20r%3D%222%22%20style%3D%22fill%3Awhite%22%2F%3E%3C%2Fsvg%3E");--rpf-squiggle-end-cap-r-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xml%3Aspace%3D%22preserve%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%22%20viewBox%3D%220%200%202%2013%22%3E%3Ccircle%20cx%3D%222%22%20cy%3D%2211%22%20r%3D%222%22%20style%3D%22fill%3Awhite%22%2F%3E%3C%2Fsvg%3E");background-color:var(--rpf-squiggle-color, var(--rpf-brand-raspberry));border:2px solid rgba(0,0,0,0);border-block:none;height:13px;mask-clip:content-box,border-box,border-box;mask-image:var(--rpf-squiggle-mask),var(--rpf-squiggle-end-cap-l-mask),var(--rpf-squiggle-end-cap-r-mask);mask-origin:content-box,border-box,border-box;mask-position:top left,top right,top left;mask-repeat:round,no-repeat,no-repeat;mask-size:29px 13px,2px 13px,2px 13px;-webkit-mask-clip:content-box,border-box,border-box;-webkit-mask-image:var(--rpf-squiggle-mask),var(--rpf-squiggle-end-cap-l-mask),var(--rpf-squiggle-end-cap-r-mask);-webkit-mask-origin:content-box,border-box,border-box;-webkit-mask-position:top left,top right,top left;-webkit-mask-repeat:round,no-repeat,no-repeat;-webkit-mask-size:29px 13px,2px 13px,2px 13px}.rpf-squiggle-heading,.project-instructions .c-project-heading--task{display:inline-block;position:relative;padding-bottom:calc(13px + var(--space-1))}.rpf-squiggle-heading::after,.project-instructions .c-project-heading--task::after{content:"";display:block;position:absolute;left:0;right:0;margin-top:var(--space-1)}:root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.project-instructions h2{font-size:calc(1.25rem*var(--scale-factor, 1));margin:0}.project-instructions strong{font-weight:700}.project-instructions img{max-inline-size:100%}.project-instructions table{border-collapse:collapse;margin-block-end:calc(1.5rem*var(--scale-factor, 1));inline-size:100%}.project-instructions table tr{border-block-end:1px solid #000}.project-instructions table td{padding:calc(.5rem*var(--scale-factor, 1)) calc(1.5rem*var(--scale-factor, 1))}.project-instructions pre{background-color:#33353d;border-radius:8px;padding:calc(.5rem*var(--scale-factor, 1));overflow:auto;margin:calc(1rem*var(--scale-factor, 1)) 0}.project-instructions code{color:#fff;background-color:#33353d;border-radius:8px;padding:calc(.75*.125rem*var(--scale-factor, 1)) calc(.5rem*var(--scale-factor, 1))}.project-instructions .c-project-code{margin:calc(1rem*var(--scale-factor, 1)) 0 calc(1.5rem*var(--scale-factor, 1)) 0;border-radius:8px;background-color:#33353d}.project-instructions .c-project-code pre{margin:0}.project-instructions .c-project-code code{padding-inline-start:0}.project-instructions .c-code-filename{font-family:monospace;margin:0;padding:calc(.5rem*var(--scale-factor, 1)) calc(1rem*var(--scale-factor, 1));color:#fff;background-color:#2a2b32;border-start-start-radius:8px;border-start-end-radius:8px;border-block-end:1px solid #4a4d59}.project-instructions .line-numbers{padding-inline-start:calc(3rem*var(--scale-factor, 1));padding-inline-end:calc(1rem*var(--scale-factor, 1))}.project-instructions .line-numbers-rows{border-color:#ccc}.project-instructions .line-numbers-rows span::before{padding-inline-end:calc(.5rem*var(--scale-factor, 1));color:#ccc}.project-instructions .line-highlight{margin-block-start:.5rem;background-color:#fff;mix-blend-mode:difference;min-inline-size:100%}.project-instructions .language-python .number,.project-instructions .language-python .boolean,.project-instructions .language-python .function{color:#9ee8ff}.project-instructions .language-python .keyword{color:#ecf}.project-instructions .language-python .string,.project-instructions .language-python .char{color:#94f9af}.project-instructions .language-python .comment{color:#ffca99}.project-instructions .language-python .keyword-print{color:#fff}.project-instructions .language-css{color:#9ee8ff}.project-instructions .language-css .comment{color:#ffca99}.project-instructions .language-css .selector{color:#ecf}.project-instructions .language-css .function{color:#ecf}.project-instructions .language-css .property,.project-instructions .language-css .punctuation{color:#fff}.project-instructions .language-html .tag{color:#ecf}.project-instructions .language-html .tag .punctuation,.project-instructions .language-html .tag .attr-name{color:#fff}.project-instructions .language-html .tag .attr-value{color:#94f9af}.project-instructions .language-html .tag .attr-value .punctuation{color:inherit}.project-instructions .language-html .tag .attr-value .attr-equals{color:#fff}.project-instructions .language-html .comment{color:#ffca99}.project-instructions .c-project-heading--task{--rpf-squiggle-color: var(--rpf-blue-800);background-color:#e5f4fd;padding:calc(1rem*var(--scale-factor, 1));inline-size:100%;box-sizing:border-box;border-start-start-radius:8px;border-start-end-radius:8px}.project-instructions .c-project-heading--task::after{margin-inline:calc(1rem*var(--scale-factor, 1));margin-block-start:calc(.25rem*var(--scale-factor, 1))}.project-instructions .c-project-task{background-color:#e5f4fd;padding:calc(1rem*var(--scale-factor, 1));display:flex;flex-direction:column;gap:calc(1rem*var(--scale-factor, 1));border-end-start-radius:8px;border-end-end-radius:8px;margin-block-end:calc(1.5rem*var(--scale-factor, 1))}.project-instructions .c-project-task p{margin:0}.project-instructions .c-project-task__checkbox{display:none}.project-instructions .c-project-callout{background-color:#e5f4fd;border-inline-start:4px solid #0090f0;padding:calc(.5rem*var(--scale-factor, 1)) calc(1rem*var(--scale-factor, 1));display:flex;flex-direction:column;gap:calc(.5rem*var(--scale-factor, 1));margin:calc(1.5rem*var(--scale-factor, 1)) 0}.project-instructions .c-project-callout h3{margin:0;padding-inline-start:calc(2rem*var(--scale-factor, 1));font-size:calc(1rem*var(--scale-factor, 1));background-repeat:no-repeat;background-position:inline-start calc(.5rem*var(--scale-factor, 1)) center}.project-instructions .c-project-callout p{margin:0}.project-instructions .c-project-callout--tip{background-color:#ecf7ed;border-inline-start:4px solid #46af4b}.project-instructions .c-project-callout--tip h3{background-image:url('+u+")}.project-instructions .c-project-callout--debug{background-color:#feeeed;border-inline-start:4px solid #f3514f}.project-instructions .c-project-callout--debug h3{background-image:url("+d+")}.project-instructions .c-project-output{display:flex;align-items:flex-start;align-self:stretch;padding:calc(1rem*var(--scale-factor, 1));border-radius:8px;border:1px solid var(--rpf-grey-150);margin-block-end:calc(1.5rem*var(--scale-factor, 1))}.project-instructions .c-project-output pre{padding:0;margin:0;inline-size:100%;background-color:#fff}.project-instructions .c-project-output code{background-color:#fff;color:#212121;padding:0;white-space:pre-wrap}",""])},function(e,t){"undefined"!=typeof Prism&&Prism.hooks.add("wrap",(function(e){"keyword"===e.type&&e.classes.push("keyword-"+e.content)}))},function(e,t){!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document&&document.querySelector){var e,t=/\n(?!$)/g,n=function(){if(void 0===e){var t=document.createElement("div");t.style.fontSize="13px",t.style.lineHeight="1.5",t.style.padding="0",t.style.border="0",t.innerHTML=" <br /> ",document.body.appendChild(t),e=38===t.offsetHeight,document.body.removeChild(t)}return e},r=!0;Prism.plugins.lineHighlight={highlightLines:function(e,i,l){var c=(i="string"==typeof i?i:e.getAttribute("data-line")||"").replace(/\s+/g,"").split(",").filter(Boolean),u=+e.getAttribute("data-line-offset")||0,d=(n()?parseInt:parseFloat)(getComputedStyle(e).lineHeight),h=Prism.util.isActive(e,"line-numbers"),p=e.querySelector("code"),f=h?e:p||e,m=[],g=p.textContent.match(t),b=g?g.length+1:1,v=p&&f!=p?function(e,t){var n=getComputedStyle(e),r=getComputedStyle(t);function i(e){return+e.substr(0,e.length-2)}return t.offsetTop+i(r.borderTopWidth)+i(r.paddingTop)-i(n.paddingTop)}(e,p):0;c.forEach((function(t){var n=t.split("-"),r=+n[0],i=+n[1]||r;if(!((i=Math.min(b+u,i))<r)){var o=e.querySelector('.line-highlight[data-range="'+t+'"]')||document.createElement("div");if(m.push((function(){o.setAttribute("aria-hidden","true"),o.setAttribute("data-range",t),o.className=(l||"")+" line-highlight"})),h&&Prism.plugins.lineNumbers){var s=Prism.plugins.lineNumbers.getLine(e,r),a=Prism.plugins.lineNumbers.getLine(e,i);if(s){var c=s.offsetTop+v+"px";m.push((function(){o.style.top=c}))}if(a){var p=a.offsetTop-s.offsetTop+a.offsetHeight+"px";m.push((function(){o.style.height=p}))}}else m.push((function(){o.setAttribute("data-start",String(r)),i>r&&o.setAttribute("data-end",String(i)),o.style.top=(r-u-1)*d+v+"px",o.textContent=new Array(i-r+2).join(" \n")}));m.push((function(){o.style.width=e.scrollWidth+"px"})),m.push((function(){f.appendChild(o)}))}}));var y=e.id;if(h&&Prism.util.isActive(e,"linkable-line-numbers")&&y){s(e,"linkable-line-numbers")||m.push((function(){e.classList.add("linkable-line-numbers")}));var S=parseInt(e.getAttribute("data-start")||"1");o(".line-numbers-rows > span",e).forEach((function(e,t){var n=t+S;e.onclick=function(){var e=y+"."+n;r=!1,location.hash=e,setTimeout((function(){r=!0}),1)}}))}return function(){m.forEach(a)}}};var i=0;Prism.hooks.add("before-sanity-check",(function(e){var t=e.element.parentElement;if(l(t)){var n=0;o(".line-highlight",t).forEach((function(e){n+=e.textContent.length,e.parentNode.removeChild(e)})),n&&/^(?: \n)+$/.test(e.code.slice(-n))&&(e.code=e.code.slice(0,-n))}})),Prism.hooks.add("complete",(function e(t){var n=t.element.parentElement;if(l(n)){clearTimeout(i);var r=Prism.plugins.lineNumbers,o=t.plugins&&t.plugins.lineNumbers;if(s(n,"line-numbers")&&r&&!o)Prism.hooks.add("line-numbers",e);else Prism.plugins.lineHighlight.highlightLines(n)(),i=setTimeout(c,1)}})),window.addEventListener("hashchange",c),window.addEventListener("resize",(function(){o("pre").filter(l).map((function(e){return Prism.plugins.lineHighlight.highlightLines(e)})).forEach(a)}))}function o(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function s(e,t){return e.classList.contains(t)}function a(e){e()}function l(e){return!(!e||!/pre/i.test(e.nodeName))&&(!!e.hasAttribute("data-line")||!(!e.id||!Prism.util.isActive(e,"linkable-line-numbers")))}function c(){var e=location.hash.slice(1);o(".temporary.line-highlight").forEach((function(e){e.parentNode.removeChild(e)}));var t=(e.match(/\.([\d,-]+)$/)||[,""])[1];if(t&&!document.getElementById(e)){var n=e.slice(0,e.lastIndexOf(".")),i=document.getElementById(n);if(i)i.hasAttribute("data-line")||i.setAttribute("data-line",""),Prism.plugins.lineHighlight.highlightLines(i,t,"temporary ")(),r&&document.querySelector(".temporary.line-highlight").scrollIntoView()}}}()},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,'pre[class*="language-"].line-numbers {\n\tposition: relative;\n\tpadding-left: 3.8em;\n\tcounter-reset: linenumber;\n}\n\npre[class*="language-"].line-numbers > code {\n\tposition: relative;\n\twhite-space: inherit;\n}\n\n.line-numbers .line-numbers-rows {\n\tposition: absolute;\n\tpointer-events: none;\n\ttop: 0;\n\tfont-size: 100%;\n\tleft: -3.8em;\n\twidth: 3em; /* works for line-numbers below 1000 lines */\n\tletter-spacing: -1px;\n\tborder-right: 1px solid #999;\n\n\t-webkit-user-select: none;\n\t-moz-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none;\n\n}\n\n\t.line-numbers-rows > span {\n\t\tdisplay: block;\n\t\tcounter-increment: linenumber;\n\t}\n\n\t\t.line-numbers-rows > span:before {\n\t\t\tcontent: counter(linenumber);\n\t\t\tcolor: #999;\n\t\t\tdisplay: block;\n\t\t\tpadding-right: 0.8em;\n\t\t\ttext-align: right;\n\t\t}\n',""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,"pre[data-line] {\n\tposition: relative;\n\tpadding: 1em 0 1em 3em;\n}\n\n.line-highlight {\n\tposition: absolute;\n\tleft: 0;\n\tright: 0;\n\tpadding: inherit 0;\n\tmargin-top: 1em; /* Same as .prism’s padding-top */\n\n\tbackground: hsla(24, 20%, 50%,.08);\n\tbackground: linear-gradient(to right, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0));\n\n\tpointer-events: none;\n\n\tline-height: inherit;\n\twhite-space: pre;\n}\n\n@media print {\n\t.line-highlight {\n\t\t/*\n\t\t * This will prevent browsers from replacing the background color with white.\n\t\t * It's necessary because the element is layered on top of the displayed code.\n\t\t */\n\t\t-webkit-print-color-adjust: exact;\n\t\tcolor-adjust: exact;\n\t}\n}\n\n\t.line-highlight:before,\n\t.line-highlight[data-end]:after {\n\t\tcontent: attr(data-start);\n\t\tposition: absolute;\n\t\ttop: .4em;\n\t\tleft: .6em;\n\t\tmin-width: 1em;\n\t\tpadding: 0 .5em;\n\t\tbackground-color: hsla(24, 20%, 50%,.4);\n\t\tcolor: hsl(24, 20%, 95%);\n\t\tfont: bold 65%/1.5 sans-serif;\n\t\ttext-align: center;\n\t\tvertical-align: .3em;\n\t\tborder-radius: 999px;\n\t\ttext-shadow: none;\n\t\tbox-shadow: 0 1px white;\n\t}\n\n\t.line-highlight[data-end]:after {\n\t\tcontent: attr(data-end);\n\t\ttop: auto;\n\t\tbottom: .4em;\n\t}\n\n.line-numbers .line-highlight:before,\n.line-numbers .line-highlight:after {\n\tcontent: none;\n}\n\npre[id].linkable-line-numbers span.line-numbers-rows {\n\tpointer-events: all;\n}\npre[id].linkable-line-numbers span.line-numbers-rows > span:before {\n\tcursor: pointer;\n}\npre[id].linkable-line-numbers span.line-numbers-rows > span:hover:before {\n\tbackground-color: rgba(128, 128, 128, .2);\n}\n",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,".editor{display:flex;flex-flow:column;flex:1;overflow:hidden}.editor .cm-editor{flex:1;overflow:hidden}.editor .cm-editor:focus{outline:none}.editor .cm-editor .cm-scroller{overflow:auto;overscroll-behavior-x:none}.editor .cm-editor .cm-scroller .cm-content{flex:1;padding-block-start:calc(.5rem*var(--scale-factor, 1));margin-inline-end:calc(.5rem*var(--scale-factor, 1))}.editor--small{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1))}.editor--medium{font-size:calc(1.5rem*var(--scale-factor, 1));line-height:calc(2rem*var(--scale-factor, 1))}.editor--large{font-size:calc(2rem*var(--scale-factor, 1));line-height:calc(2.5rem*var(--scale-factor, 1))}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,"",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,"",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,"",""])},function(e,t,n){"use strict";
|
||
/**
|
||
* @license React
|
||
* use-sync-external-store-shim.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var r=n(0);var i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,s=r.useEffect,a=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,u=r[1];return a((function(){i.value=n,i.getSnapshot=t,c(i)&&u({inst:i})}),[e,n,t]),s((function(){return c(i)&&u({inst:i}),e((function(){c(i)&&u({inst:i})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},function(e,t,n){"use strict";
|
||
/**
|
||
* @license React
|
||
* use-sync-external-store-shim/with-selector.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var r=n(0),i=n(108);var o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=i.useSyncExternalStore,a=r.useRef,l=r.useEffect,c=r.useMemo,u=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=a(null);if(null===d.current){var h={hasValue:!1,value:null};d.current=h}else h=d.current;d=c((function(){function e(e){if(!l){if(l=!0,s=e,e=r(e),void 0!==i&&h.hasValue){var t=h.value;if(i(t,e))return a=t}return a=e}if(t=a,o(s,e))return t;var n=r(e);return void 0!==i&&i(t,n)?t:(s=e,a=n)}var s,a,l=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]}),[t,n,r,i]);var p=s(e,d[0],d[1]);return l((function(){h.hasValue=!0,h.value=p}),[p]),u(p),p}},function(e,t,n){"use strict";
|
||
/**
|
||
* @license React
|
||
* react-is.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var r,i=Symbol.for("react.element"),o=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),u=Symbol.for("react.context"),d=Symbol.for("react.server_context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen");function v(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case s:case l:case a:case p:case f:return e;default:switch(e=e&&e.$$typeof){case d:case u:case h:case g:case m:case c:return e;default:return t}}case o:return t}}}r=Symbol.for("react.module.reference"),t.ContextConsumer=u,t.ContextProvider=c,t.Element=i,t.ForwardRef=h,t.Fragment=s,t.Lazy=g,t.Memo=m,t.Portal=o,t.Profiler=l,t.StrictMode=a,t.Suspense=p,t.SuspenseList=f,t.isAsyncMode=function(){return!1},t.isConcurrentMode=function(){return!1},t.isContextConsumer=function(e){return v(e)===u},t.isContextProvider=function(e){return v(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return v(e)===h},t.isFragment=function(e){return v(e)===s},t.isLazy=function(e){return v(e)===g},t.isMemo=function(e){return v(e)===m},t.isPortal=function(e){return v(e)===o},t.isProfiler=function(e){return v(e)===l},t.isStrictMode=function(e){return v(e)===a},t.isSuspense=function(e){return v(e)===p},t.isSuspenseList=function(e){return v(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===s||e===l||e===a||e===p||e===f||e===b||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===c||e.$$typeof===u||e.$$typeof===h||e.$$typeof===r||void 0!==e.getModuleId)},t.typeOf=v},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.editor-input{display:flex;flex-direction:column;block-size:100%;inline-size:100%}.editor-input__view-only-banner{font-weight:700;padding:var(--space-0-5) var(--space-1);border-bottom:1px solid var(--editor-color-outline)}.--light .editor-input__view-only-banner{background-color:#e3e4e8}.--dark .editor-input__view-only-banner{background-color:#babcc5;color:#000}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.mobile-project-bar{background-color:#fff;border-block-start:1px solid #d5d7dc;display:flex;block-size:25px;justify-content:space-between;padding:0 calc(.5rem*var(--scale-factor, 1))}.mobile-project-bar__name{font-size:calc(.75rem*var(--scale-factor, 1));line-height:calc(1rem*var(--scale-factor, 1));font-weight:700;margin:auto 0}.--dark .mobile-project-bar{background-color:#2a2b32;border-block-start:1px solid #4a4d59}.--dark .mobile-project-bar__name{color:#fff}.--light .mobile-project-bar{background-color:#fff;border-block-start:1px solid #d5d7dc}.--light .mobile-project-bar__name{color:#4d575b}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.proj-container--mobile{margin:0;gap:0}#app .proj-container--mobile .react-tabs{border-radius:0}#wc .proj-container--mobile{border-radius:8px}#app .mobile-nav,#wc .mobile-nav{display:flex;inline-size:100%}#app .mobile-nav .react-tabs__tab-list,#wc .mobile-nav .react-tabs__tab-list{padding:0}#app .mobile-nav .react-tabs__tab,#wc .mobile-nav .react-tabs__tab{flex:1;display:flex;block-size:calc(4rem*var(--scale-factor, 1))}#app .mobile-nav .react-tabs__tab:last-of-type,#wc .mobile-nav .react-tabs__tab:last-of-type{border-inline-end:none}.mobile-nav__menu{margin:0;border-radius:0;border:none;display:flex;align-items:center;justify-content:center;inline-size:calc(4rem*var(--scale-factor, 1))}.--dark .proj-container--mobile .runner-controls{border-inline-start:1px solid #4a4d59}.--dark .proj-container--mobile .mobile-nav{background-color:#2a2b32;border-block-start:1px solid #4a4d59}.--dark .proj-container--mobile .mobile-nav__menu{border-inline-end:1px solid #4a4d59}.--light .proj-container--mobile .runner-controls{border-inline-start:1px solid #d5d7dc}.--light .proj-container--mobile .mobile-nav{background-color:#f5f6f9;border-block-start:1px solid #d5d7dc}.--light .proj-container--mobile .mobile-nav__menu{border-inline-end:1px solid #d5d7dc}#app.--light .mobile-nav,#app.--dark .mobile-nav,#wc.--light .mobile-nav,#wc.--dark .mobile-nav{border-block-end:none}#app.--light .mobile-nav .react-tabs__tab--selected,#app.--dark .mobile-nav .react-tabs__tab--selected,#wc.--light .mobile-nav .react-tabs__tab--selected,#wc.--dark .mobile-nav .react-tabs__tab--selected{background-color:inherit}#wc.--light .proj-container--mobile{border:1px solid #d5d7dc}#wc.--dark .proj-container--mobile{border:1px solid #4a4d59}",""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(0),s=f(o),a=f(n(14)),l=f(n(30)),c=f(n(419)),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(162)),d=n(105),h=f(d),p=n(426);function f(e){return e&&e.__esModule?e:{default:e}}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var b=t.portalClassName="ReactModalPortal",v=t.bodyOpenClassName="ReactModal__Body--open",y=d.canUseDOM&&void 0!==a.default.createPortal,S=function(e){return document.createElement(e)},_=function(){return y?a.default.createPortal:a.default.unstable_renderSubtreeIntoContainer};function x(e){return e()}var w=function(e){function t(){var e,n,i;m(this,t);for(var o=arguments.length,l=Array(o),u=0;u<o;u++)l[u]=arguments[u];return n=i=g(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),i.removePortal=function(){!y&&a.default.unmountComponentAtNode(i.node);var e=x(i.props.parentSelector);e&&e.contains(i.node)?e.removeChild(i.node):console.warn('React-Modal: "parentSelector" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.')},i.portalRef=function(e){i.portal=e},i.renderPortal=function(e){var n=_()(i,s.default.createElement(c.default,r({defaultStyles:t.defaultStyles},e)),i.node);i.portalRef(n)},g(i,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){d.canUseDOM&&(y||(this.node=S("div")),this.node.className=this.props.portalClassName,x(this.props.parentSelector).appendChild(this.node),!y&&this.renderPortal(this.props))}},{key:"getSnapshotBeforeUpdate",value:function(e){return{prevParent:x(e.parentSelector),nextParent:x(this.props.parentSelector)}}},{key:"componentDidUpdate",value:function(e,t,n){if(d.canUseDOM){var r=this.props,i=r.isOpen,o=r.portalClassName;e.portalClassName!==o&&(this.node.className=o);var s=n.prevParent,a=n.nextParent;a!==s&&(s.removeChild(this.node),a.appendChild(this.node)),(e.isOpen||i)&&!y&&this.renderPortal(this.props)}}},{key:"componentWillUnmount",value:function(){if(d.canUseDOM&&this.node&&this.portal){var e=this.portal.state,t=Date.now(),n=e.isOpen&&this.props.closeTimeoutMS&&(e.closesAt||t+this.props.closeTimeoutMS);n?(e.beforeClose||this.portal.closeWithTimeout(),setTimeout(this.removePortal,n-t)):this.removePortal()}}},{key:"render",value:function(){return d.canUseDOM&&y?(!this.node&&y&&(this.node=S("div")),_()(s.default.createElement(c.default,r({ref:this.portalRef,defaultStyles:t.defaultStyles},this.props)),this.node)):null}}],[{key:"setAppElement",value:function(e){u.setElement(e)}}]),t}(o.Component);w.propTypes={isOpen:l.default.bool.isRequired,style:l.default.shape({content:l.default.object,overlay:l.default.object}),portalClassName:l.default.string,bodyOpenClassName:l.default.string,htmlOpenClassName:l.default.string,className:l.default.oneOfType([l.default.string,l.default.shape({base:l.default.string.isRequired,afterOpen:l.default.string.isRequired,beforeClose:l.default.string.isRequired})]),overlayClassName:l.default.oneOfType([l.default.string,l.default.shape({base:l.default.string.isRequired,afterOpen:l.default.string.isRequired,beforeClose:l.default.string.isRequired})]),appElement:l.default.oneOfType([l.default.instanceOf(h.default),l.default.instanceOf(d.SafeHTMLCollection),l.default.instanceOf(d.SafeNodeList),l.default.arrayOf(l.default.instanceOf(h.default))]),onAfterOpen:l.default.func,onRequestClose:l.default.func,closeTimeoutMS:l.default.number,ariaHideApp:l.default.bool,shouldFocusAfterRender:l.default.bool,shouldCloseOnOverlayClick:l.default.bool,shouldReturnFocusAfterClose:l.default.bool,preventScroll:l.default.bool,parentSelector:l.default.func,aria:l.default.object,data:l.default.object,role:l.default.string,contentLabel:l.default.string,shouldCloseOnEsc:l.default.bool,overlayRef:l.default.func,contentRef:l.default.func,id:l.default.string,overlayElement:l.default.func,contentElement:l.default.func},w.defaultProps={isOpen:!1,portalClassName:b,bodyOpenClassName:v,role:"dialog",ariaHideApp:!0,closeTimeoutMS:0,shouldFocusAfterRender:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,shouldReturnFocusAfterClose:!0,preventScroll:!1,parentSelector:function(){return document.body},overlayElement:function(e,t){return s.default.createElement("div",e,t)},contentElement:function(e,t){return s.default.createElement("div",e,t)}},w.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}},(0,p.polyfill)(w),t.default=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),a=g(n(30)),l=m(n(420)),c=g(n(421)),u=m(n(162)),d=m(n(424)),h=n(105),p=g(h),f=g(n(163));function m(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function g(e){return e&&e.__esModule?e:{default:e}}n(425);var b={overlay:"ReactModal__Overlay",content:"ReactModal__Content"},v=0,y=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.setOverlayRef=function(e){n.overlay=e,n.props.overlayRef&&n.props.overlayRef(e)},n.setContentRef=function(e){n.content=e,n.props.contentRef&&n.props.contentRef(e)},n.afterClose=function(){var e=n.props,t=e.appElement,r=e.ariaHideApp,i=e.htmlOpenClassName,o=e.bodyOpenClassName,s=e.parentSelector,a=s&&s().ownerDocument||document;o&&d.remove(a.body,o),i&&d.remove(a.getElementsByTagName("html")[0],i),r&&v>0&&0===(v-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(l.returnFocus(n.props.preventScroll),l.teardownScopedFocus()):l.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),f.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(l.setupScopedFocus(n.node),l.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var r="object"===(void 0===t?"undefined":i(t))?t:{base:b[e],afterOpen:b[e]+"--after-open",beforeClose:b[e]+"--before-close"},o=r.base;return n.state.afterOpen&&(o=o+" "+r.afterOpen),n.state.beforeClose&&(o=o+" "+r.beforeClose),"string"==typeof t&&t?o+" "+t:o},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,r){return n[e+"-"+r]=t[r],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,r=e.htmlOpenClassName,i=e.bodyOpenClassName,o=e.parentSelector,s=o&&o().ownerDocument||document;i&&d.add(s.body,i),r&&d.add(s.getElementsByTagName("html")[0],r),n&&(v+=1,u.hide(t)),f.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,i=e.overlayClassName,o=e.defaultStyles,s=e.children,a=n?{}:o.content,l=i?{}:o.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",i),style:r({},l,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=r({id:t,ref:this.setContentRef,style:r({},a,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",r({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(u,s);return this.props.overlayElement(c,d)}}]),t}(s.Component);y.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},y.propTypes={isOpen:a.default.bool.isRequired,defaultStyles:a.default.shape({content:a.default.object,overlay:a.default.object}),style:a.default.shape({content:a.default.object,overlay:a.default.object}),className:a.default.oneOfType([a.default.string,a.default.object]),overlayClassName:a.default.oneOfType([a.default.string,a.default.object]),parentSelector:a.default.func,bodyOpenClassName:a.default.string,htmlOpenClassName:a.default.string,ariaHideApp:a.default.bool,appElement:a.default.oneOfType([a.default.instanceOf(p.default),a.default.instanceOf(h.SafeHTMLCollection),a.default.instanceOf(h.SafeNodeList),a.default.arrayOf(a.default.instanceOf(p.default))]),onAfterOpen:a.default.func,onAfterClose:a.default.func,onRequestClose:a.default.func,closeTimeoutMS:a.default.number,shouldFocusAfterRender:a.default.bool,shouldCloseOnOverlayClick:a.default.bool,shouldReturnFocusAfterClose:a.default.bool,preventScroll:a.default.bool,role:a.default.string,contentLabel:a.default.string,aria:a.default.object,data:a.default.object,children:a.default.node,shouldCloseOnEsc:a.default.bool,overlayRef:a.default.func,contentRef:a.default.func,id:a.default.string,overlayElement:a.default.func,contentElement:a.default.func,testId:a.default.string},t.default=y,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){s=[]},t.log=function(){0},t.handleBlur=c,t.handleFocus=u,t.markForFocusLater=function(){s.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==s.length&&(t=s.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){s.length>0&&s.pop()},t.setupScopedFocus=function(e){a=e,window.addEventListener?(window.addEventListener("blur",c,!1),document.addEventListener("focus",u,!0)):(window.attachEvent("onBlur",c),document.attachEvent("onFocus",u))},t.teardownScopedFocus=function(){a=null,window.addEventListener?(window.removeEventListener("blur",c),document.removeEventListener("focus",u)):(window.detachEvent("onBlur",c),document.detachEvent("onFocus",u))};var r,i=n(161),o=(r=i)&&r.__esModule?r:{default:r};var s=[],a=null,l=!1;function c(){l=!0}function u(){if(l){if(l=!1,!a)return;setTimeout((function(){a.contains(document.activeElement)||((0,o.default)(a)[0]||a).focus()}),0)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,o.default)(e);if(!n.length)return void t.preventDefault();var r=void 0,i=t.shiftKey,s=n[0],a=n[n.length-1],l=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return t.activeElement.shadowRoot?e(t.activeElement.shadowRoot):t.activeElement}();if(e===l){if(!i)return;r=a}a!==l||i||(r=s);s===l&&i&&(r=a);if(r)return t.preventDefault(),void r.focus();var c=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null==c||"Chrome"==c[1]||null!=/\biPod\b|\biPad\b/g.exec(navigator.userAgent))return;var u=n.indexOf(l);u>-1&&(u+=i?-1:1);if(void 0===(r=n[u]))return t.preventDefault(),void(r=i?a:s).focus();t.preventDefault(),r.focus()};var r,i=n(161),o=(r=i)&&r.__esModule?r:{default:r};e.exports=t.default},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){var r;
|
||
/*!
|
||
Copyright (c) 2015 Jed Watson.
|
||
Based on code that is Copyright 2013-2015, Facebook, Inc.
|
||
All rights reserved.
|
||
*/!function(){"use strict";var i=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:i,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:i&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:i&&!!window.screen};void 0===(r=function(){return o}.call(t,n,t,e))||(e.exports=r)}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in r)o(e,r[t]);var n=document.body;for(var s in i)o(n,i[s]);r={},i={}},t.log=function(){0};var r={},i={};function o(e,t){e.classList.remove(t)}t.add=function(e,t){return n=e.classList,o="html"==e.nodeName.toLowerCase()?r:i,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(o,e),n.add(e)}));var n,o},t.remove=function(e,t){return n=e.classList,o="html"==e.nodeName.toLowerCase()?r:i,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(o,e),0===o[e]&&n.remove(e)}));var n,o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[s,a],t=0;t<e.length;t++){var n=e[t];n&&(n.parentNode&&n.parentNode.removeChild(n))}s=a=null,l=[]},t.log=function(){console.log("bodyTrap ----------"),console.log(l.length);for(var e=[s,a],t=0;t<e.length;t++){var n=e[t]||{};console.log(n.nodeName,n.className,n.id)}console.log("edn bodyTrap ----------")};var r,i=n(163),o=(r=i)&&r.__esModule?r:{default:r};var s=void 0,a=void 0,l=[];function c(){0!==l.length&&l[l.length-1].focusContent()}o.default.subscribe((function(e,t){s||a||((s=document.createElement("div")).setAttribute("data-react-modal-body-trap",""),s.style.position="absolute",s.style.opacity="0",s.setAttribute("tabindex","0"),s.addEventListener("focus",c),(a=s.cloneNode()).addEventListener("focus",c)),(l=t).length>0?(document.body.firstChild!==s&&document.body.insertBefore(s,document.body.firstChild),document.body.lastChild!==a&&document.body.appendChild(a)):(s.parentElement&&s.parentElement.removeChild(s),a.parentElement&&a.parentElement.removeChild(a))}))},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function i(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function o(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function s(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,s=null,a=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?s="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(s="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?a="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(a="UNSAFE_componentWillUpdate"),null!==n||null!==s||null!==a){var l=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==s?"\n "+s:"")+(null!==a?"\n "+a:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=i),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=o;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",(function(){return s})),r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}#app .toast--bottom-center__message,#app .toast--top-center__message,#wc .toast--bottom-center__message,#wc .toast--top-center__message{min-block-size:fit-content;padding:calc(.25rem*var(--scale-factor, 1)) calc(.5rem*var(--scale-factor, 1));margin:0}#app .toast--bottom-center,#wc .toast--bottom-center{font-size:calc(.75rem*var(--scale-factor, 1));line-height:calc(1rem*var(--scale-factor, 1));inline-size:fit-content;max-inline-size:100%;inset-block-end:1em;padding:4px;inset-inline-start:50%;transform:translateX(-50%);white-space:nowrap}#app .toast--bottom-center .Toastify__toast-icon,#wc .toast--bottom-center .Toastify__toast-icon{margin-block:0;margin-inline:calc(.25rem*var(--scale-factor, 1)) 0}#app .toast--bottom-center__message,#wc .toast--bottom-center__message{border-radius:20px}#app .toast--top-center,#wc .toast--top-center{max-inline-size:fit-content;inline-size:100%;font-weight:700;inset-block-start:20%;z-index:1}#app .toast--top-center .Toastify__toast-icon,#wc .toast--top-center .Toastify__toast-icon{inline-size:fit-content}#app .toast--top-center__message,#wc .toast--top-center__message{background-color:#fff;border-radius:25px}#app .toast--info,#wc .toast--info{color:#1e398a;border:2px solid #1e398a}#app .toast--info svg,#wc .toast--info svg{fill:#17181c}#app .toast--info .Toastify__toast-icon svg,#wc .toast--info .Toastify__toast-icon svg{fill:#1e398a}#app.--dark .toast--bottom-center__message,#wc.--dark .toast--bottom-center__message{background-color:#fff;color:#17181c}#app.--dark .toast--bottom-center__message svg,#wc.--dark .toast--bottom-center__message svg{fill:#17181c}#app.--light .toast--bottom-center__message,#wc.--light .toast--bottom-center__message{background-color:#17181c;color:#fff}#app.--light .toast--bottom-center__message svg,#wc.--light .toast--bottom-center__message svg{fill:#fff}",""])},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"FunctionToString",(function(){return c})),n.d(r,"InboundFilters",(function(){return k}));var i=n(0),o=n.n(i),s=n(164);var a=n(26);let l;class c{constructor(){c.prototype.__init.call(this)}static __initStatic(){this.id="FunctionToString"}__init(){this.name=c.id}setupOnce(){l=Function.prototype.toString,Function.prototype.toString=function(...e){const t=Object(a.f)(this)||this;return l.apply(t,e)}}}c.__initStatic();var u=n(39);const d=["debug","info","warn","error","log","assert","trace"];function h(e){if(!("console"in u.a))return e();const t=u.a.console,n={};d.forEach(e=>{const r=t[e]&&t[e].__sentry_original__;e in t&&r&&(n[e]=t[e],t[e]=r)});try{return e()}finally{Object.keys(n).forEach(e=>{t[e]=n[e]})}}function p(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1}};return"undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?d.forEach(n=>{t[n]=(...t)=>{e&&h(()=>{u.a.console[n](`Sentry Logger [${n}]:`,...t)})}}):d.forEach(e=>{t[e]=()=>{}}),t}let f;f="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?Object(u.b)("logger",p):p();var m=n(51);function g(){const e=u.a,t=e.crypto||e.msCrypto;if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");const n=t&&t.getRandomValues?()=>t.getRandomValues(new Uint8Array(1))[0]:()=>16*Math.random();return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,e=>(e^(15&n())>>e/4).toString(16))}function b(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function v(e){const{message:t,event_id:n}=e;if(t)return t;const r=b(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function y(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")}function S(e,t){const n=b(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r&&r.data,...t.data};n.mechanism.data=e}}function _(e){if(e&&e.__sentry_captured__)return!0;try{Object(a.a)(e,"__sentry_captured__",!0)}catch(e){}return!1}function x(e){return Array.isArray(e)?e:[e]}const w=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/];class k{static __initStatic(){this.id="InboundFilters"}__init(){this.name=k.id}constructor(e={}){this._options=e,k.prototype.__init.call(this)}setupOnce(e,t){const n=e=>{const n=t();if(n){const t=n.getIntegration(k);if(t){const r=n.getClient(),i=r?r.getOptions():{};return function(e,t){if(t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1}(e))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.warn("Event dropped due to being internal Sentry Error.\nEvent: "+v(e)),!0;if(function(e,t){if(!t||!t.length)return!1;return function(e){if(e.message)return[e.message];if(e.exception)try{const{type:t="",value:n=""}=e.exception.values&&e.exception.values[0]||{};return[""+n,`${t}: ${n}`]}catch(t){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.error("Cannot extract message for event "+v(e)),[]}return[]}(e).some(e=>t.some(t=>Object(m.a)(e,t)))}(e,t.ignoreErrors))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: "+v(e)),!0;if(function(e,t){if(!t||!t.length)return!1;const n=O(e);return!!n&&t.some(e=>Object(m.a)(n,e))}(e,t.denyUrls))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${v(e)}.\nUrl: ${O(e)}`),!0;if(!function(e,t){if(!t||!t.length)return!0;const n=O(e);return!n||t.some(e=>Object(m.a)(n,e))}(e,t.allowUrls))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${v(e)}.\nUrl: ${O(e)}`),!0;return!1}(e,function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...w],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(t._options,i))?null:e}}return e};n.id=this.name,e(n)}}function O(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch(e){}return t?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(t):null}catch(t){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.error("Cannot extract url for event "+v(e)),null}}k.__initStatic();var E,A=n(189),T=n(113),C=n(18);function M(e){return new P(t=>{t(e)})}function $(e){return new P((t,n)=>{n(e)})}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(E||(E={}));class P{__init(){this._state=E.PENDING}__init2(){this._handlers=[]}constructor(e){P.prototype.__init.call(this),P.prototype.__init2.call(this),P.prototype.__init3.call(this),P.prototype.__init4.call(this),P.prototype.__init5.call(this),P.prototype.__init6.call(this);try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new P((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new P((t,n)=>{let r,i;return this.then(t=>{i=!1,r=t,e&&e()},t=>{i=!0,r=t,e&&e()}).then(()=>{i?n(r):t(r)})})}__init3(){this._resolve=e=>{this._setResult(E.RESOLVED,e)}}__init4(){this._reject=e=>{this._setResult(E.REJECTED,e)}}__init5(){this._setResult=(e,t)=>{this._state===E.PENDING&&(Object(C.n)(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init6(){this._executeHandlers=()=>{if(this._state===E.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(this._state===E.RESOLVED&&e[1](this._value),this._state===E.REJECTED&&e[2](this._value),e[0]=!0)})}}}function R(e){const t=Object(A.b)(),n={sid:g(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return Object(a.c)({sid:""+e.sid,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?""+e.did:void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&j(n,e),n}function j(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Object(A.b)(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:g()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=""+t.did),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}class N{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(e){const t=new N;return e&&(t._breadcrumbs=[...e._breadcrumbs],t._tags={...e._tags},t._extra={...e._extra},t._contexts={...e._contexts},t._user=e._user,t._level=e._level,t._span=e._span,t._session=e._session,t._transactionName=e._transactionName,t._fingerprint=e._fingerprint,t._eventProcessors=[...e._eventProcessors],t._requestSession=e._requestSession,t._attachments=[...e._attachments]),t}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&j(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts={...this._contexts,[e]:t},this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if("function"==typeof e){const t=e(this);return t instanceof N?t:this}return e instanceof N?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession)):Object(C.i)(e)&&(e=e,this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:Object(A.a)(),...e};return this._breadcrumbs=[...this._breadcrumbs,r].slice(-n),this._notifyScopeListeners(),this}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,t={}){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};const t=this._span.transaction&&this._span.transaction.name;t&&(e.tags={transaction:t,...e.tags})}return this._applyFingerprint(e),e.breadcrumbs=[...e.breadcrumbs||[],...this._breadcrumbs],e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...D(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}_notifyEventProcessors(e,t,n,r=0){return new P((i,o)=>{const s=e[r];if(null===t||"function"!=typeof s)i(t);else{const a=s({...t},n);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.id&&null===a&&f.log(`Event processor "${s.id}" dropped event`),Object(C.n)(a)?a.then(t=>this._notifyEventProcessors(e,t,n,r+1).then(i)).then(null,o):this._notifyEventProcessors(e,a,n,r+1).then(i).then(null,o)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?x(e.fingerprint):[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}}function D(){return Object(u.b)("globalEventProcessors",()=>[])}function I(e){D().push(e)}const L=100;class B{__init(){this._stack=[{}]}constructor(e,t=new N,n=4){this._version=n,B.prototype.__init.call(this),this.getStackTop().scope=t,e&&this.bindClient(e)}isOlderThan(e){return this._version<e}bindClient(e){this.getStackTop().client=e,e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){const e=N.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(e){const t=this.pushScope();try{e(t)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){const n=this._lastEventId=t&&t.event_id?t.event_id:g(),r=new Error("Sentry syntheticException");return this._withClient((i,o)=>{i.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},o)}),n}captureMessage(e,t,n){const r=this._lastEventId=n&&n.event_id?n.event_id:g(),i=new Error(e);return this._withClient((o,s)=>{o.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},s)}),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:g();return"transaction"!==e.type&&(this._lastEventId=n),this._withClient((r,i)=>{r.captureEvent(e,{...t,event_id:n},i)}),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:n,client:r}=this.getStackTop();if(!n||!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=L}=r.getOptions&&r.getOptions()||{};if(o<=0)return;const s={timestamp:Object(A.a)(),...e},a=i?h(()=>i(s,t)):s;null!==a&&n.addBreadcrumb(a,o)}setUser(e){const t=this.getScope();t&&t.setUser(e)}setTags(e){const t=this.getScope();t&&t.setTags(e)}setExtras(e){const t=this.getScope();t&&t.setExtras(e)}setTag(e,t){const n=this.getScope();n&&n.setTag(e,t)}setExtra(e,t){const n=this.getScope();n&&n.setExtra(e,t)}setContext(e,t){const n=this.getScope();n&&n.setContext(e,t)}configureScope(e){const{scope:t,client:n}=this.getStackTop();t&&n&&e(t)}run(e){const t=F(this);try{e(this)}finally{F(t)}}getIntegration(e){const t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(t){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){return this._callExtensionMethod("startTransaction",e,t)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){const e=this.getStackTop(),t=e&&e.scope,n=t&&t.getSession();n&&function(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),j(e,n)}(n),this._sendSessionUpdate(),t&&t.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:r,environment:i}=n&&n.getOptions()||{},{userAgent:o}=u.a.navigator||{},s=R({release:r,environment:i,...t&&{user:t.getUser()},...o&&{userAgent:o},...e});if(t){const e=t.getSession&&t.getSession();e&&"ok"===e.status&&j(e,{status:"exited"}),this.endSession(),t.setSession(s)}return s}shouldSendDefaultPii(){const e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop();if(!e)return;const n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}_withClient(e){const{scope:t,client:n}=this.getStackTop();n&&e(n,t)}_callExtensionMethod(e,...t){const n=z().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[e])return n.extensions[e].apply(this,t);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function z(){return u.a.__SENTRY__=u.a.__SENTRY__||{extensions:{},hub:void 0},u.a}function F(e){const t=z(),n=q(t);return G(t,e),n}function U(){const e=z();return Q(e)&&!q(e).isOlderThan(4)||G(e,new B),Object(T.b)()?function(e){try{const t=z().__SENTRY__,n=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active;if(!n)return q(e);if(!Q(n)||q(n).isOlderThan(4)){const t=q(e).getStackTop();G(n,new B(t.client,N.clone(t.scope)))}return q(n)}catch(t){return q(e)}}(e):q(e)}function Q(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function q(e){return Object(u.b)("hub",()=>new B,e)}function G(e,t){if(!e)return!1;return(e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0}const H=[];function V(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;t.forEach(e=>{e.isDefaultInstance=!0}),r=Array.isArray(n)?[...t,...n]:"function"==typeof n?x(n(t)):t;const i=function(e){const t={};return e.forEach(e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}(r),o=i.findIndex(e=>"Debug"===e.name);if(-1!==o){const[e]=i.splice(o,1);i.push(e)}return i}class W extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}const X=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Y(e,t=!1){const{host:n,path:r,pass:i,port:o,projectId:s,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&i?":"+i:""}@${n}${o?":"+o:""}/${r?r+"/":r}${s}`}function Z(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function J(e){const t="string"==typeof e?function(e){const t=X.exec(e);if(!t)throw new W("Invalid Sentry Dsn: "+e);const[n,r,i="",o,s="",a]=t.slice(1);let l="",c=a;const u=c.split("/");if(u.length>1&&(l=u.slice(0,-1).join("/"),c=u.pop()),c){const e=c.match(/^\d+/);e&&(c=e[0])}return Z({host:o,pass:i,path:l,projectId:c,port:s,protocol:n,publicKey:r})}(e):Z(e);return function(e){if("undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__)return;const{port:t,projectId:n,protocol:r}=e;if(["protocol","publicKey","host","projectId"].forEach(t=>{if(!e[t])throw new W(`Invalid Sentry Dsn: ${t} missing`)}),!n.match(/^\d+$/))throw new W("Invalid Sentry Dsn: Invalid projectId "+n);if(!function(e){return"http"===e||"https"===e}(r))throw new W("Invalid Sentry Dsn: Invalid protocol "+r);if(t&&isNaN(parseInt(t,10)))throw new W("Invalid Sentry Dsn: Invalid port "+t)}(t),t}function K(e){const t=e.protocol?e.protocol+":":"",n=e.port?":"+e.port:"";return`${t}//${e.host}${n}${e.path?"/"+e.path:""}/api/`}function ee(e,t={}){const n="string"==typeof t?t:t.tunnel,r="string"!=typeof t&&t._metadata?t._metadata.sdk:void 0;return n||`${function(e){return`${K(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){return Object(a.h)({sentry_key:e.publicKey,sentry_version:"7",...t&&{sentry_client:`${t.name}/${t.version}`}})}(e,r)}`}var te=n(8),ne=n(86);function re(){if(!("fetch"in te.a))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function ie(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}const oe={},se={};function ae(e){if(!se[e])switch(se[e]=!0,e){case"console":!function(){if(!("console"in te.a))return;d.forEach((function(e){e in te.a.console&&Object(a.e)(te.a.console,e,(function(t){return function(...n){ce("console",{args:n,level:e}),t&&t.apply(te.a.console,n)}}))}))}();break;case"dom":!function(){if(!("document"in te.a))return;const e=ce.bind(null,"dom"),t=me(e,!0);te.a.document.addEventListener("click",t,!1),te.a.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=te.a[t]&&te.a[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(Object(a.e)(n,"addEventListener",(function(t){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this,o=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},s=o[n]=o[n]||{refCount:0};if(!s.handler){const r=me(e);s.handler=r,t.call(this,n,r,i)}s.refCount+=1}catch(e){}return t.call(this,n,r,i)}})),Object(a.e)(n,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this,i=n.__sentry_instrumentation_handlers__||{},o=i[t];o&&(o.refCount-=1,o.refCount<=0&&(e.call(this,t,o.handler,r),o.handler=void 0,delete i[t]),0===Object.keys(i).length&&delete n.__sentry_instrumentation_handlers__)}catch(e){}return e.call(this,t,n,r)}})))})}();break;case"xhr":!function(){if(!("XMLHttpRequest"in te.a))return;const e=XMLHttpRequest.prototype;Object(a.e)(e,"open",(function(e){return function(...t){const n=this,r=t[1],i=n.__sentry_xhr__={method:Object(C.l)(t[0])?t[0].toUpperCase():t[0],url:t[1]};Object(C.l)(r)&&"POST"===i.method&&r.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const o=function(){if(4===n.readyState){try{i.status_code=n.status}catch(e){}ce("xhr",{args:t,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:n})}};return"onreadystatechange"in n&&"function"==typeof n.onreadystatechange?Object(a.e)(n,"onreadystatechange",(function(e){return function(...t){return o(),e.apply(n,t)}})):n.addEventListener("readystatechange",o),e.apply(n,t)}})),Object(a.e)(e,"send",(function(e){return function(...t){return this.__sentry_xhr__&&void 0!==t[0]&&(this.__sentry_xhr__.body=t[0]),ce("xhr",{args:t,startTimestamp:Date.now(),xhr:this}),e.apply(this,t)}}))}();break;case"fetch":!function(){if(!function(){if(!re())return!1;if(ie(te.a.fetch))return!0;let e=!1;const t=te.a.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=ie(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}())return;Object(a.e)(te.a,"fetch",(function(e){return function(...t){const n={args:t,fetchData:{method:ue(t),url:de(t)},startTimestamp:Date.now()};return ce("fetch",{...n}),e.apply(te.a,t).then(e=>(ce("fetch",{...n,endTimestamp:Date.now(),response:e}),e),e=>{throw ce("fetch",{...n,endTimestamp:Date.now(),error:e}),e})}}))}();break;case"history":!function(){if(!function(){const e=te.a.chrome,t=e&&e.app&&e.app.runtime,n="history"in te.a&&!!te.a.history.pushState&&!!te.a.history.replaceState;return!t&&n}())return;const e=te.a.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=he,t=String(n);he=t,ce("history",{from:e,to:t})}return e.apply(this,t)}}te.a.onpopstate=function(...t){const n=te.a.location.href,r=he;if(he=n,ce("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch(e){}},Object(a.e)(te.a.history,"pushState",t),Object(a.e)(te.a.history,"replaceState",t)}();break;case"error":ge=te.a.onerror,te.a.onerror=function(e,t,n,r,i){return ce("error",{column:r,error:i,line:n,msg:e,url:t}),!!ge&&ge.apply(this,arguments)};break;case"unhandledrejection":be=te.a.onunhandledrejection,te.a.onunhandledrejection=function(e){return ce("unhandledrejection",e),!be||be.apply(this,arguments)};break;default:return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.warn("unknown instrumentation type:",e))}}function le(e,t){oe[e]=oe[e]||[],oe[e].push(t),ae(e)}function ce(e,t){if(e&&oe[e])for(const n of oe[e]||[])try{n(t)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Object(ne.b)(n)}\nError:`,t)}}function ue(e=[]){return"Request"in te.a&&Object(C.g)(e[0],Request)&&e[0].method?String(e[0].method).toUpperCase():e[1]&&e[1].method?String(e[1].method).toUpperCase():"GET"}function de(e=[]){return"string"==typeof e[0]?e[0]:"Request"in te.a&&Object(C.g)(e[0],Request)?e[0].url:String(e[0])}let he;let pe,fe;function me(e,t=!1){return n=>{if(!n||fe===n)return;if(function(e){if("keypress"!==e.type)return!1;try{const t=e.target;if(!t||!t.tagName)return!0;if("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable)return!1}catch(e){}return!0}(n))return;const r="keypress"===n.type?"input":n.type;(void 0===pe||function(e,t){if(!e)return!0;if(e.type!==t.type)return!0;try{if(e.target!==t.target)return!0}catch(e){}return!1}(fe,n))&&(e({event:n,name:r,global:t}),fe=n),clearTimeout(pe),pe=te.a.setTimeout(()=>{pe=void 0},1e3)}}let ge=null;let be=null;var ve=n(191);function ye(e,t=[]){return[e,t]}function Se(e,t){const[n,r]=e;return[n,[...r,t]]}function _e(e,t){e[1].forEach(e=>{const n=e[0].type;t(e,n)})}function xe(e,t){return(t||new TextEncoder).encode(e)}function we(e,t){const[n,r]=e;let i=JSON.stringify(n);function o(e){"string"==typeof i?i="string"==typeof e?i+e:[xe(i,t),e]:i.push("string"==typeof e?xe(e,t):e)}for(const e of r){const[t,n]=e;if(o(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)o(n);else{let e;try{e=JSON.stringify(n)}catch(t){e=JSON.stringify(Object(ve.a)(n))}o(e)}}return"string"==typeof i?i:function(e){const t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}(i)}function ke(e,t){const n="string"==typeof e.data?xe(e.data,t):e.data;return[Object(a.c)({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}const Oe={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default"};function Ee(e){return Oe[e]}function Ae(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Te(e,t,n,r){const i=Ae(n),o=e.type||"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,n&&n.sdk);const s=function(e,t,n,r){const i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&{dsn:Y(r)},..."transaction"===e.type&&i&&{trace:Object(a.c)({...i})}}}(e,i,r,t);delete e.sdkProcessingMetadata;return ye(s,[[{type:o},e]])}const Ce="Not capturing exception because it's already been captured.";class Me{__init(){this._integrations={}}__init2(){this._integrationsInitialized=!1}__init3(){this._numProcessing=0}__init4(){this._outcomes={}}constructor(e){if(Me.prototype.__init.call(this),Me.prototype.__init2.call(this),Me.prototype.__init3.call(this),Me.prototype.__init4.call(this),this._options=e,e.dsn){this._dsn=J(e.dsn);const t=ee(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.warn("No DSN provided, client will not do anything.")}captureException(e,t,n){if(_(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.log(Ce));let r=t&&t.event_id;return this._process(this.eventFromException(e,t).then(e=>this._captureEvent(e,t,n)).then(e=>{r=e})),r}captureMessage(e,t,n,r){let i=n&&n.event_id;const o=Object(C.j)(e)?this.eventFromMessage(String(e),t,n):this.eventFromException(e,n);return this._process(o.then(e=>this._captureEvent(e,n,r)).then(e=>{i=e})),i}captureEvent(e,t,n){if(t&&t.originalException&&_(t.originalException))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.log(Ce));let r=t&&t.event_id;return this._process(this._captureEvent(e,t,n).then(e=>{r=e})),r}captureSession(e){this._isEnabled()?"string"!=typeof e.release?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),j(e,{init:!1})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.warn("SDK not enabled, will not capture session.")}getDsn(){return this._dsn}getOptions(){return this._options}getTransport(){return this._transport}flush(e){const t=this._transport;return t?this._isClientDoneProcessing(e).then(n=>t.flush(e).then(e=>n&&e)):M(!0)}close(e){return this.flush(e).then(e=>(this.getOptions().enabled=!1,e))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=function(e){const t={};return e.forEach(e=>{t[e.name]=e,-1===H.indexOf(e.name)&&(e.setupOnce(I,U),H.push(e.name),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.log("Integration installed: "+e.name))}),t}(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch(t){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}sendEvent(e,t={}){if(this._dsn){let n=Te(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=Se(n,ke(e,this._options.transportOptions&&this._options.transportOptions.textEncoder));this._sendEnvelope(n)}}sendSession(e){if(this._dsn){const t=function(e,t,n,r){const i=Ae(n);return ye({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&{dsn:Y(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}}recordDroppedEvent(e,t){if(this._options.sendClientReports){const n=`${e}:${t}`;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.log(`Adding outcome: "${n}"`),this._outcomes[n]=this._outcomes[n]+1||1}}_updateSessionFromEvent(e,t){let n=!1,r=!1;const i=t.exception&&t.exception.values;if(i){r=!0;for(const e of i){const t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}const o="ok"===e.status;(o&&0===e.errors||o&&n)&&(j(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new P(t=>{let n=0;const r=setInterval(()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._dsn}_prepareEvent(e,t,n){const{normalizeDepth:r=3,normalizeMaxBreadth:i=1e3}=this.getOptions(),o={...e,event_id:e.event_id||t.event_id||g(),timestamp:e.timestamp||Object(A.a)()};this._applyClientOptions(o),this._applyIntegrationsMetadata(o);let s=n;t.captureContext&&(s=N.clone(s).update(t.captureContext));let a=M(o);if(s){const e=[...t.attachments||[],...s.getAttachments()];e.length&&(t.attachments=e),a=s.applyToEvent(o,t)}return a.then(e=>"number"==typeof r&&r>0?this._normalizeEvent(e,r,i):e)}_normalizeEvent(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:Object(ve.a)(e.data,t,n)}}))},...e.user&&{user:Object(ve.a)(e.user,t,n)},...e.contexts&&{contexts:Object(ve.a)(e.contexts,t,n)},...e.extra&&{extra:Object(ve.a)(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Object(ve.a)(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>(e.data&&(e.data=Object(ve.a)(e.data,t,n)),e))),r}_applyClientOptions(e){const t=this.getOptions(),{environment:n,release:r,dist:i,maxValueLength:o=250}=t;"environment"in e||(e.environment="environment"in t?n:"production"),void 0===e.release&&void 0!==r&&(e.release=r),void 0===e.dist&&void 0!==i&&(e.dist=i),e.message&&(e.message=Object(m.d)(e.message,o));const s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=Object(m.d)(s.value,o));const a=e.request;a&&a.url&&(a.url=Object(m.d)(a.url,o))}_applyIntegrationsMetadata(e){const t=Object.keys(this._integrations);t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(e=>e.event_id,e=>{if("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__){const t=e;"log"===t.logLevel?f.log(t.message):f.warn(t)}})}_processEvent(e,t,n){const{beforeSend:r,sampleRate:i}=this.getOptions();if(!this._isEnabled())return $(new W("SDK not enabled, will not capture event.","log"));const o="transaction"===e.type;return!o&&"number"==typeof i&&Math.random()>i?(this.recordDroppedEvent("sample_rate","error"),$(new W(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"))):this._prepareEvent(e,t,n).then(n=>{if(null===n)throw this.recordDroppedEvent("event_processor",e.type||"error"),new W("An event processor returned null, will not send event.","log");if(t.data&&!0===t.data.__sentry__||o||!r)return n;return function(e){const t="`beforeSend` method has to return `null` or a valid event.";if(Object(C.n)(e))return e.then(e=>{if(!Object(C.i)(e)&&null!==e)throw new W(t);return e},e=>{throw new W("beforeSend rejected with "+e)});if(!Object(C.i)(e)&&null!==e)throw new W(t);return e}(r(n,t))}).then(r=>{if(null===r)throw this.recordDroppedEvent("before_send",e.type||"error"),new W("`beforeSend` returned `null`, will not send event.","log");const i=n&&n.getSession();!o&&i&&this._updateSessionFromEvent(i,r);const s=r.transaction_info;if(o&&s&&r.transaction!==e.transaction){const e="custom";r.transaction_info={...s,source:e,changes:[...s.changes,{source:e,timestamp:r.timestamp,propagations:s.propagations}]}}return this.sendEvent(r,t),r}).then(null,e=>{if(e instanceof W)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new W("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: "+e)})}_process(e){this._numProcessing+=1,e.then(e=>(this._numProcessing-=1,e),e=>(this._numProcessing-=1,e))}_sendEnvelope(e){this._transport&&this._dsn?this._transport.send(e).then(null,e=>{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.error("Error while sending event:",e)}):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.error("Transport disabled")}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.keys(e).map(t=>{const[n,r]=t.split(":");return{reason:n,category:r,quantity:e[t]}})}}function $e(e,t){const n=Re(e,t),r={type:t&&t.name,value:Ne(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Pe(e,t){return{exception:{values:[$e(e,t)]}}}function Re(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e){if("number"==typeof e.framesToPop)return e.framesToPop;if(je.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch(e){}return[]}const je=/Minified React error #\d+;/i;function Ne(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function De(e,t,n,r,i){let o;if(Object(C.e)(t)&&t.error){return Pe(e,t.error)}if(Object(C.a)(t)||Object(C.b)(t)){const i=t;if("stack"in t)o=Pe(e,t);else{const t=i.name||(Object(C.a)(i)?"DOMError":"DOMException"),s=i.message?`${t}: ${i.message}`:t;o=Ie(e,s,n,r),y(o,s)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":""+i.code}),o}if(Object(C.d)(t))return Pe(e,t);if(Object(C.i)(t)||Object(C.f)(t)){return o=function(e,t,n,r){const i=U().getClient(),o=i&&i.getOptions().normalizeDepth,s={exception:{values:[{type:Object(C.f)(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${Object(a.d)(t)}`}]},extra:{__serialized__:Object(ve.b)(t,o)}};if(n){const t=Re(e,n);t.length&&(s.exception.values[0].stacktrace={frames:t})}return s}(e,t,n,i),S(o,{synthetic:!0}),o}return o=Ie(e,t,n,r),y(o,""+t,void 0),S(o,{synthetic:!0}),o}function Ie(e,t,n,r){const i={message:t};if(r&&n){const r=Re(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]})}return i}const Le=["fatal","error","warning","log","info","debug"];function Be(e){return"warn"===e?"warning":Le.includes(e)?e:"log"}function ze(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+n+r}}class Fe{static __initStatic(){this.id="Breadcrumbs"}__init(){this.name=Fe.id}constructor(e){Fe.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){var e;this.options.console&&le("console",Ue),this.options.dom&&le("dom",(e=this.options.dom,function(t){let n,r="object"==typeof e?e.serializeAttribute:void 0;"string"==typeof r&&(r=[r]);try{n=t.event.target?Object(te.c)(t.event.target,r):Object(te.c)(t.event,r)}catch(e){n="<unknown>"}0!==n.length&&U().addBreadcrumb({category:"ui."+t.name,message:n},{event:t.event,name:t.name,global:t.global})})),this.options.xhr&&le("xhr",Qe),this.options.fetch&&le("fetch",qe),this.options.history&&le("history",Ge)}}function Ue(e){const t={category:"console",data:{arguments:e.args,logger:"console"},level:Be(e.level),message:Object(m.b)(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;t.message="Assertion failed: "+(Object(m.b)(e.args.slice(1)," ")||"console.assert"),t.data.arguments=e.args.slice(1)}U().addBreadcrumb(t,{input:e.args,level:e.level})}function Qe(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;const{method:t,url:n,status_code:r,body:i}=e.xhr.__sentry_xhr__||{};U().addBreadcrumb({category:"xhr",data:{method:t,url:n,status_code:r},type:"http"},{xhr:e.xhr,input:i})}else;}function qe(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method||(e.error?U().addBreadcrumb({category:"fetch",data:e.fetchData,level:"error",type:"http"},{data:e.error,input:e.args}):U().addBreadcrumb({category:"fetch",data:{...e.fetchData,status_code:e.response.status},type:"http"},{input:e.args,response:e.response})))}function Ge(e){let t=e.from,n=e.to;const r=ze(te.a.location.href);let i=ze(t);const o=ze(n);i.path||(i=r),r.protocol===o.protocol&&r.host===o.host&&(n=o.relative),r.protocol===i.protocol&&r.host===i.host&&(t=i.relative),U().addBreadcrumb({category:"navigation",data:{from:t,to:n}})}Fe.__initStatic();class He extends Me{constructor(e){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:"7.16.0"}],version:"7.16.0"},super(e),e.sendClientReports&&te.a.document&&te.a.document.addEventListener("visibilitychange",()=>{"hidden"===te.a.document.visibilityState&&this._flushOutcomes()})}eventFromException(e,t){return function(e,t,n,r){const i=De(e,t,n&&n.syntheticException||void 0,r);return S(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),M(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,i){const o=Ie(e,t,r&&r.syntheticException||void 0,i);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),M(o)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}sendEvent(e,t){const n=this.getIntegrationById("Breadcrumbs");n&&n.options&&n.options.sentry&&U().addBreadcrumb({category:"sentry."+("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:v(e)},{event:e}),super.sendEvent(e,t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){const e=this._clearOutcomes();if(0===e.length)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.log("No outcomes to send"));if(!this._dsn)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.log("No dsn provided, will not send outcomes"));("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.log("Sending outcomes:",e);const t=ee(this._dsn,this._options),n=(r=e,ye((i=this._options.tunnel&&Y(this._dsn))?{dsn:i}:{},[[{type:"client_report"},{timestamp:o||Object(A.a)(),discarded_events:r}]]));var r,i,o;try{const e="[object Navigator]"===Object.prototype.toString.call(te.a&&te.a.navigator);if(e&&"function"==typeof te.a.navigator.sendBeacon&&!this._options.transportOptions){te.a.navigator.sendBeacon.bind(te.a.navigator)(t,we(n))}else this._sendEnvelope(n)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.error(e)}}}function Ve(e,t){return U().captureException(e,{captureContext:t})}function We(e){U().withScope(e)}let Xe=0;function Ye(){return Xe>0}function Ze(){Xe+=1,setTimeout(()=>{Xe-=1})}function Je(e,t={},n){if("function"!=typeof e)return e;try{const t=e.__sentry_wrapped__;if(t)return t;if(Object(a.f)(e))return e}catch(t){return e}const r=function(){const r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const i=r.map(e=>Je(e,t));return e.apply(this,i)}catch(e){throw Ze(),We(n=>{n.addEventProcessor(e=>(t.mechanism&&(y(e,void 0,void 0),S(e,t.mechanism)),e.extra={...e.extra,arguments:r},e)),Ve(e)}),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch(e){}Object(a.g)(r,e),Object(a.a)(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>e.name})}catch(e){}return r}function Ke(e,t,n,r){const i={filename:e,function:t,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}const et=/^\s*at (?:(.*\).*?|.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,tt=/\((\S*)(?::(\d+))(?::(\d+))\)/,nt=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|safari-extension|safari-web-extension|capacitor)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,rt=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,it=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,ot=[[30,e=>{const t=et.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){const e=tt.exec(t[2]);e&&(t[2]=e[1],t[3]=e[2],t[4]=e[3])}const[e,n]=at(t[1]||"?",t[2]);return Ke(n,e,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],[50,e=>{const t=nt.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=rt.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||"?";return[n,e]=at(n,e),Ke(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],[40,e=>{const t=it.exec(e);return t?Ke(t[2],t[1]||"?",+t[3],t[4]?+t[4]:void 0):void 0}]],st=Object(ne.a)(...ot),at=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:"?",n?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},lt=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class ct{static __initStatic(){this.id="TryCatch"}__init(){this.name=ct.id}constructor(e){ct.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){this._options.setTimeout&&Object(a.e)(te.a,"setTimeout",ut),this._options.setInterval&&Object(a.e)(te.a,"setInterval",ut),this._options.requestAnimationFrame&&Object(a.e)(te.a,"requestAnimationFrame",dt),this._options.XMLHttpRequest&&"XMLHttpRequest"in te.a&&Object(a.e)(XMLHttpRequest.prototype,"send",ht);const e=this._options.eventTarget;if(e){(Array.isArray(e)?e:lt).forEach(pt)}}}function ut(e){return function(...t){const n=t[0];return t[0]=Je(n,{mechanism:{data:{function:Object(ne.b)(e)},handled:!0,type:"instrument"}}),e.apply(this,t)}}function dt(e){return function(t){return e.apply(this,[Je(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Object(ne.b)(e)},handled:!0,type:"instrument"}})])}}function ht(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&Object(a.e)(n,e,(function(t){const n={mechanism:{data:{function:e,handler:Object(ne.b)(t)},handled:!0,type:"instrument"}},r=Object(a.f)(t);return r&&(n.mechanism.data.handler=Object(ne.b)(r)),Je(t,n)}))}),e.apply(this,t)}}function pt(e){const t=te.a,n=t[e]&&t[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(Object(a.e)(n,"addEventListener",(function(t){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=Je(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Object(ne.b)(r),target:e},handled:!0,type:"instrument"}}))}catch(e){}return t.apply(this,[n,Je(r,{mechanism:{data:{function:"addEventListener",handler:Object(ne.b)(r),target:e},handled:!0,type:"instrument"}}),i])}})),Object(a.e)(n,"removeEventListener",(function(e){return function(t,n,r){const i=n;try{const n=i&&i.__sentry_wrapped__;n&&e.call(this,t,n,r)}catch(e){}return e.call(this,t,i,r)}})))}ct.__initStatic();class ft{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=ft.id}__init2(){this._installFunc={onerror:mt,onunhandledrejection:gt}}constructor(e){ft.prototype.__init.call(this),ft.prototype.__init2.call(this),this._options={onerror:!0,onunhandledrejection:!0,...e}}setupOnce(){Error.stackTraceLimit=50;const e=this._options;for(const n in e){const r=this._installFunc[n];r&&e[n]&&(t=n,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.log("Global Handler attached: "+t),r(),this._installFunc[n]=void 0)}var t}}function mt(){le("error",e=>{const[t,n,r]=yt();if(!t.getIntegration(ft))return;const{msg:i,url:o,line:s,column:a,error:l}=e;if(Ye()||l&&l.__sentry_own_request__)return;const c=void 0===l&&Object(C.l)(i)?function(e,t,n,r){let i=Object(C.e)(e)?e.message:e,o="Error";const s=i.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i);s&&(o=s[1],i=s[2]);return bt({exception:{values:[{type:o,value:i}]}},t,n,r)}(i,o,s,a):bt(De(n,l||i,void 0,r,!1),o,s,a);c.level="error",vt(t,l,c,"onerror")})}function gt(){le("unhandledrejection",e=>{const[t,n,r]=yt();if(!t.getIntegration(ft))return;let i=e;try{"reason"in e?i=e.reason:"detail"in e&&"reason"in e.detail&&(i=e.detail.reason)}catch(e){}if(Ye()||i&&i.__sentry_own_request__)return!0;const o=Object(C.j)(i)?{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(i)}]}}:De(n,i,void 0,r,!0);o.level="error",vt(t,i,o,"onunhandledrejection")})}function bt(e,t,n,r){const i=e.exception=e.exception||{},o=i.values=i.values||[],s=o[0]=o[0]||{},a=s.stacktrace=s.stacktrace||{},l=a.frames=a.frames||[],c=isNaN(parseInt(r,10))?void 0:r,u=isNaN(parseInt(n,10))?void 0:n,d=Object(C.l)(t)&&t.length>0?t:Object(te.b)();return 0===l.length&&l.push({colno:c,filename:d,function:"?",in_app:!0,lineno:u}),e}function vt(e,t,n,r){S(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function yt(){const e=U(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}ft.__initStatic();class St{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=St.id}constructor(e={}){St.prototype.__init.call(this),this._key=e.key||"cause",this._limit=e.limit||5}setupOnce(){const e=U().getClient();e&&I((t,n)=>{const r=U().getIntegration(St);return r?function(e,t,n,r,i){if(!(r.exception&&r.exception.values&&i&&Object(C.g)(i.originalException,Error)))return r;const o=function e(t,n,r,i,o=[]){if(!Object(C.g)(r[i],Error)||o.length+1>=n)return o;const s=$e(t,r[i]);return e(t,n,r[i],i,[s,...o])}(e,n,i.originalException,t);return r.exception.values=[...o,...r.exception.values],r}(e.getOptions().stackParser,r._key,r._limit,t,n):t})}}St.__initStatic();class _t{constructor(){_t.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=_t.id}setupOnce(e,t){const n=e=>{const n=t().getIntegration(_t);if(n){try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!wt(e,t))return!1;if(!xt(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){const n=kt(t),r=kt(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!wt(e,t))return!1;if(!xt(e,t))return!1;return!0}(e,t))return!0;return!1}(e,n._previousEvent))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(t){return n._previousEvent=e}return n._previousEvent=e}return e};n.id=this.name,e(n)}}function xt(e,t){let n=Ot(e),r=Ot(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(n=n,r=r,r.length!==n.length)return!1;for(let e=0;e<r.length;e++){const t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function wt(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return!(n.join("")!==r.join(""))}catch(e){return!1}}function kt(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Ot(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch(e){return}}_t.__initStatic();class Et{constructor(){Et.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=Et.id}setupOnce(){I(e=>{if(U().getIntegration(Et)){if(!te.a.navigator&&!te.a.location&&!te.a.document)return e;const t=e.request&&e.request.url||te.a.location&&te.a.location.href,{referrer:n}=te.a.document||{},{userAgent:r}=te.a.navigator||{},i={...t&&{url:t},headers:{...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}}};return{...e,request:i}}return e})}}function At(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return $(new W("Not adding Promise because buffer limit was reached."));const i=r();return-1===t.indexOf(i)&&t.push(i),i.then(()=>n(i)).then(null,()=>n(i).then(null,()=>{})),i},drain:function(e){return new P((n,r)=>{let i=t.length;if(!i)return n(!0);const o=setTimeout(()=>{e&&e>0&&n(!1)},e);t.forEach(e=>{M(e).then(()=>{--i||(clearTimeout(o),n(!0))},r)})})}}}Et.__initStatic();function Tt(e,{statusCode:t,headers:n},r=Date.now()){const i={...e},o=n&&n["x-sentry-rate-limits"],s=n&&n["retry-after"];if(o)for(const e of o.trim().split(",")){const[t,n]=e.split(":",2),o=parseInt(t,10),s=1e3*(isNaN(o)?60:o);if(n)for(const e of n.split(";"))i[e]=r+s;else i.all=r+s}else s?i.all=r+function(e,t=Date.now()){const n=parseInt(""+e,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(""+e);return isNaN(r)?6e4:r-t}(s,r):429===t&&(i.all=r+6e4);return i}function Ct(e,t,n=At(e.bufferSize||30)){let r={};return{send:function(i){const o=[];if(_e(i,(t,n)=>{const i=Ee(n);!function(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,i)?o.push(t):e.recordDroppedEvent("ratelimit_backoff",i)}),0===o.length)return M();const s=ye(i[0],o),a=t=>{_e(s,(n,r)=>{e.recordDroppedEvent(t,Ee(r))})};return n.add(()=>t({body:we(s,e.textEncoder)}).then(e=>{void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=Tt(r,e)},e=>{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.error("Failed while sending event:",e),a("network_error")})).then(e=>e,e=>{if(e instanceof W)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.error("Skipped sending event because buffer is full."),a("queue_overflow"),M();throw e})},flush:e=>n.drain(e)}}let Mt;function $t(e,t=function(){if(Mt)return Mt;if(ie(te.a.fetch))return Mt=te.a.fetch.bind(te.a);const e=te.a.document;let t=te.a.fetch;if(e&&"function"==typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return Mt=t.bind(te.a)}()){return Ct(e,(function(n){const r={body:n.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n.body.length<=65536,...e.fetchOptions};return t(e.url,r).then(e=>({statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}}))}))}function Pt(e){return Ct(e,(function(t){return new P((n,r)=>{const i=new XMLHttpRequest;i.onerror=r,i.onreadystatechange=()=>{4===i.readyState&&n({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",e.url);for(const t in e.headers)Object.prototype.hasOwnProperty.call(e.headers,t)&&i.setRequestHeader(t,e.headers[t]);i.send(t.body)})}))}const Rt=[new r.InboundFilters,new r.FunctionToString,new ct,new Fe,new ft,new St,new _t,new Et];function jt(e={}){void 0===e.defaultIntegrations&&(e.defaultIntegrations=Rt),void 0===e.release&&te.a.SENTRY_RELEASE&&te.a.SENTRY_RELEASE.id&&(e.release=te.a.SENTRY_RELEASE.id),void 0===e.autoSessionTracking&&(e.autoSessionTracking=!0),void 0===e.sendClientReports&&(e.sendClientReports=!0);const t={...e,stackParser:Object(ne.c)(e.stackParser||st),integrations:V(e),transport:e.transport||(re()?$t:Pt)};!function(e,t){!0===t.debug&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?f.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));const n=U(),r=n.getScope();r&&r.update(t.initialScope);const i=new e(t);n.bindClient(i)}(He,t),e.autoSessionTracking&&function(){if(void 0===te.a.document)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&f.warn("Session tracking in non-browser environment with @sentry/browser is not supported."));const e=U();if(!e.captureSession)return;Nt(e),le("history",({from:e,to:t})=>{void 0!==e&&e!==t&&Nt(U())})}()}function Nt(e){e.startSession({ignoreDuration:!0}),e.captureSession()}var Dt=n(49),It=n(439),Lt=n(11),Bt=n(115),zt=n(17);const Ft=/^sentry-/;function Ut(e){return function(e){if(0===Object.keys(e).length)return;return Object.entries(e).reduce((e,[t,n],r)=>{const i=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,o=0===r?i:`${e},${i}`;return o.length>8192?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Lt.c.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):o},"")}(Object.entries(e).reduce((e,[t,n])=>(n&&(e["sentry-"+t]=n),e),{}))}function Qt(e){return e.split(",").map(e=>e.split("=").map(e=>decodeURIComponent(e.trim()))).reduce((e,[t,n])=>(e[t]=n,e),{})}var qt=n(7),Gt=n(43),Ht=n(10);var Vt=n(61),Wt=n(60);const Xt=(e,t,n)=>{let r;return i=>{t.value>=0&&(i||n)&&(t.delta=t.value-(r||0),(t.delta||void 0===r)&&(r=t.value,e(t)))}},Yt=(e,t)=>({name:e,value:Object(Vt.a)(t,()=>-1),delta:0,entries:[],id:`v2-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`}),Zt=(e,t)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if("first-input"===e&&!("PerformanceEventTiming"in self))return;const n=new PerformanceObserver(e=>e.getEntries().map(t));return n.observe({type:e,buffered:!0}),n}}catch(e){}},Jt=(e,t)=>{const n=r=>{"pagehide"!==r.type&&"hidden"!==qt.a.document.visibilityState||(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)};let Kt=-1;const en=()=>(Kt<0&&(Kt="hidden"===qt.a.document.visibilityState?0:1/0,Jt(({timeStamp:e})=>{Kt=e},!0)),{get firstHiddenTime(){return Kt}}),tn={};function nn(e){return"number"==typeof e&&isFinite(e)}function rn(e,{startTimestamp:t,...n}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...n})}function on(){return qt.a&&qt.a.addEventListener&&qt.a.performance}let sn,an,ln=0,cn={};function un(e=!1){const t=on();t&&Wt.a&&(t.mark&&qt.a.performance.mark("sentry-tracing-init"),((e,t)=>{const n=Yt("CLS",0);let r,i=0,o=[];const s=e=>{if(e&&!e.hadRecentInput){const t=o[0],s=o[o.length-1];i&&0!==o.length&&e.startTime-s.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,o.push(e)):(i=e.value,o=[e]),i>n.value&&(n.value=i,n.entries=o,r&&r())}},a=Zt("layout-shift",s);a&&(r=Xt(e,n,t),Jt(()=>{a.takeRecords().map(s),r(!0)}))})(e=>{const t=e.entries.pop();t&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Lt.c.log("[Measurements] Adding CLS"),cn.cls={value:e.value,unit:""},an=t)}),function(e){((e,t)=>{const n=en(),r=Yt("LCP");let i;const o=e=>{const t=e.startTime;t<n.firstHiddenTime&&(r.value=t,r.entries.push(e)),i&&i()},s=Zt("largest-contentful-paint",o);if(s){i=Xt(e,r,t);const n=()=>{tn[r.id]||(s.takeRecords().map(o),s.disconnect(),tn[r.id]=!0,i(!0))};["keydown","click"].forEach(e=>{addEventListener(e,n,{once:!0,capture:!0})}),Jt(n,!0)}})(e=>{const t=e.entries.pop();t&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Lt.c.log("[Measurements] Adding LCP"),cn.lcp={value:e.value,unit:"millisecond"},sn=t)},e)}(e),((e,t)=>{const n=en(),r=Yt("FID");let i;const o=e=>{i&&e.startTime<n.firstHiddenTime&&(r.value=e.processingStart-e.startTime,r.entries.push(e),i(!0))},s=Zt("first-input",o);s&&(i=Xt(e,r,t),Jt(()=>{s.takeRecords().map(o),s.disconnect()},!0))})(e=>{const t=e.entries.pop();if(!t)return;const n=Object(Ht.c)(Wt.a),r=Object(Ht.c)(t.startTime);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Lt.c.log("[Measurements] Adding FID"),cn.fid={value:e.value,unit:"millisecond"},cn["mark.fid"]={value:n+r,unit:"second"}}))}function dn(e){const t=on();if(!t||!qt.a.performance.getEntries||!Wt.a)return;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Lt.c.log("[Tracing] Adding & adjusting spans using Performance API");const n=Object(Ht.c)(Wt.a),r=t.getEntries();let i,o;if(r.slice(ln).forEach(t=>{const r=Object(Ht.c)(t.startTime),s=Object(Ht.c)(t.duration);if(!("navigation"===e.op&&n+r<e.startTimestamp))switch(t.entryType){case"navigation":!function(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{hn(e,t,r,n)}),hn(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),hn(e,t,"fetch",n,"cache","domainLookupStart"),hn(e,t,"domainLookup",n,"DNS"),function(e,t,n){rn(e,{op:"browser",description:"request",startTimestamp:n+Object(Ht.c)(t.requestStart),endTimestamp:n+Object(Ht.c)(t.responseEnd)}),rn(e,{op:"browser",description:"response",startTimestamp:n+Object(Ht.c)(t.responseStart),endTimestamp:n+Object(Ht.c)(t.responseEnd)})}(e,t,n)}(e,t,n),i=n+Object(Ht.c)(t.responseStart),o=n+Object(Ht.c)(t.requestStart);break;case"mark":case"paint":case"measure":{!function(e,t,n,r,i){const o=i+n,s=o+r;rn(e,{description:t.name,endTimestamp:s,op:t.entryType,startTimestamp:o})}(e,t,r,s,n);const i=en(),o=t.startTime<i.firstHiddenTime;"first-paint"===t.name&&o&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Lt.c.log("[Measurements] Adding FP"),cn.fp={value:t.startTime,unit:"millisecond"}),"first-contentful-paint"===t.name&&o&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Lt.c.log("[Measurements] Adding FCP"),cn.fcp={value:t.startTime,unit:"millisecond"});break}case"resource":{const i=t.name.replace(qt.a.location.origin,"");!function(e,t,n,r,i,o){if("xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType)return;const s={};"transferSize"in t&&(s["Transfer Size"]=t.transferSize);"encodedBodySize"in t&&(s["Encoded Body Size"]=t.encodedBodySize);"decodedBodySize"in t&&(s["Decoded Body Size"]=t.decodedBodySize);const a=o+r;rn(e,{description:n,endTimestamp:a+i,op:t.initiatorType?"resource."+t.initiatorType:"resource.other",startTimestamp:a,data:s})}(e,t,i,r,s,n);break}}}),ln=Math.max(r.length-1,0),function(e){const t=qt.a.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setTag("effectiveConnectionType",n.effectiveType),n.type&&e.setTag("connectionType",n.type),nn(n.rtt)&&(cn["connection.rtt"]={value:n.rtt,unit:"millisecond"}));nn(t.deviceMemory)&&e.setTag("deviceMemory",t.deviceMemory+" GB");nn(t.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(t.hardwareConcurrency))}(e),"pageload"===e.op){"number"==typeof i&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Lt.c.log("[Measurements] Adding TTFB"),cn.ttfb={value:1e3*(i-e.startTimestamp),unit:"millisecond"},"number"==typeof o&&o<=i&&(cn["ttfb.requestTime"]={value:1e3*(i-o),unit:"millisecond"})),["fcp","fp","lcp"].forEach(t=>{if(!cn[t]||n>=e.startTimestamp)return;const r=cn[t].value,i=n+Object(Ht.c)(r),o=Math.abs(1e3*(i-e.startTimestamp)),s=o-r;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Lt.c.log(`[Measurements] Normalized ${t} from ${r} to ${o} (${s})`),cn[t].value=o});const t=cn["mark.fid"];t&&cn.fid&&(rn(e,{description:"first input delay",endTimestamp:t.value+Object(Ht.c)(cn.fid.value),op:"ui.action",startTimestamp:t.value}),delete cn["mark.fid"]),"fcp"in cn||delete cn.cls,Object.keys(cn).forEach(t=>{e.setMeasurement(t,cn[t].value,cn[t].unit)}),function(e){sn&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Lt.c.log("[Measurements] Adding LCP Data"),sn.element&&e.setTag("lcp.element",Object(qt.c)(sn.element)),sn.id&&e.setTag("lcp.id",sn.id),sn.url&&e.setTag("lcp.url",sn.url.trim().slice(0,200)),e.setTag("lcp.size",sn.size));an&&an.sources&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Lt.c.log("[Measurements] Adding CLS Data"),an.sources.forEach((t,n)=>e.setTag("cls.source."+(n+1),Object(qt.c)(t.node))))}(e)}sn=void 0,an=void 0,cn={}}function hn(e,t,n,r,i,o){const s=o?t[o]:t[n+"End"],a=t[n+"Start"];a&&s&&rn(e,{op:"browser",description:Object(Vt.a)(i,()=>n),startTimestamp:r+Object(Ht.c)(a),endTimestamp:r+Object(Ht.c)(s)})}var pn=n(50),fn=n(195);const mn={traceFetch:!0,traceXHR:!0,tracingOrigins:["localhost",/^\//]};function gn(e){const{traceFetch:t,traceXHR:n,tracingOrigins:r,shouldCreateSpanForRequest:i}={...mn,...e},o={},s=e=>{if(o[e])return o[e];const t=r;return o[e]=t.some(t=>Object(pn.a)(e,t))&&!Object(pn.a)(e,"sentry_key"),o[e]};let a=s;"function"==typeof i&&(a=e=>s(e)&&i(e));const l={};t&&Object(fn.a)("fetch",e=>{!function(e,t,n){if(!Object(Ht.b)()||!e.fetchData||!t(e.fetchData.url))return;if(e.endTimestamp){const t=e.fetchData.__span;if(!t)return;const r=n[t];return void(r&&(e.response?r.setHttpStatus(e.response.status):e.error&&r.setStatus("internal_error"),r.finish(),delete n[t]))}const r=Object(Ht.a)();if(r){const t=r.startChild({data:{...e.fetchData,type:"fetch"},description:`${e.fetchData.method} ${e.fetchData.url}`,op:"http.client"});e.fetchData.__span=t.spanId,n[t.spanId]=t;const i=e.args[0];e.args[1]=e.args[1]||{};const o=e.args[1];o.headers=function(e,t,n,r){const i=Ut(t),o=n.toTraceparent(),s="undefined"!=typeof Request&&Object(zt.d)(e,Request)?e.headers:r.headers;if(s){if("undefined"!=typeof Headers&&Object(zt.d)(s,Headers)){const e=new Headers(s);return e.append("sentry-trace",o),i&&e.append("baggage",i),e}if(Array.isArray(s)){const e=[...s,["sentry-trace",o]];return i&&e.push(["baggage",i]),e}{const e="baggage"in s?s.baggage:void 0,t=[];return Array.isArray(e)?t.push(...e):e&&t.push(e),i&&t.push(i),{...s,"sentry-trace":o,baggage:t.length>0?t.join(","):void 0}}}return{"sentry-trace":o,baggage:i}}(i,r.getDynamicSamplingContext(),t,o),r.metadata.propagations+=1}}(e,a,l)}),n&&Object(fn.a)("xhr",e=>{!function(e,t,n){if(!Object(Ht.b)()||e.xhr&&e.xhr.__sentry_own_request__||!(e.xhr&&e.xhr.__sentry_xhr__&&t(e.xhr.__sentry_xhr__.url)))return;const r=e.xhr.__sentry_xhr__;if(e.endTimestamp){const t=e.xhr.__sentry_xhr_span_id__;if(!t)return;const i=n[t];return void(i&&(i.setHttpStatus(r.status_code),i.finish(),delete n[t]))}const i=Object(Ht.a)();if(i){const t=i.startChild({data:{...r.data,type:"xhr",method:r.method,url:r.url},description:`${r.method} ${r.url}`,op:"http.client"});if(e.xhr.__sentry_xhr_span_id__=t.spanId,n[e.xhr.__sentry_xhr_span_id__]=t,e.xhr.setRequestHeader)try{e.xhr.setRequestHeader("sentry-trace",t.toTraceparent());const n=Ut(i.getDynamicSamplingContext());n&&e.xhr.setRequestHeader("baggage",n),i.metadata.propagations+=1}catch(e){}}}(e,a,l)})}const bn={idleTimeout:Gt.c,finalTimeout:Gt.a,heartbeatInterval:Gt.b,markBackgroundTransactions:!0,routingInstrumentation:function(e,t=!0,n=!0){if(!qt.a||!qt.a.location)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Lt.c.warn("Could not initialize routing instrumentation due to invalid location"));let r,i=qt.a.location.href;t&&(r=e({name:qt.a.location.pathname,op:"pageload",metadata:{source:"url"}})),n&&Object(fn.a)("history",({to:t,from:n})=>{void 0===n&&i&&-1!==i.indexOf(t)?i=void 0:n!==t&&(i=void 0,r&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Lt.c.log("[Tracing] Finishing current transaction with op: "+r.op),r.finish()),r=e({name:qt.a.location.pathname,op:"navigation",metadata:{source:"url"}}))})},startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,_experiments:{enableLongTask:!0},...mn};class vn{__init(){this.name="BrowserTracing"}constructor(e){vn.prototype.__init.call(this);let t=mn.tracingOrigins;e&&(e.tracingOrigins&&Array.isArray(e.tracingOrigins)?t=e.tracingOrigins:("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&(this._emitOptionsWarning=!0)),this.options={...bn,...e,tracingOrigins:t};const{_metricOptions:n}=this.options;un(n&&n._reportAllChanges),Object(It.a)([this,"access",e=>e.options,"access",e=>e._experiments,"optionalAccess",e=>e.enableLongTask])&&Zt("longtask",e=>{const t=Object(Ht.a)();if(!t)return;const n=Object(Ht.c)(Wt.a+e.startTime),r=Object(Ht.c)(e.duration);t.startChild({description:"Main UI thread blocked",op:"ui.long-task",startTimestamp:n,endTimestamp:n+r})})}setupOnce(e,t){this._getCurrentHub=t,this._emitOptionsWarning&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Lt.c.warn("[Tracing] You need to define `tracingOrigins` in the options. Set an array of urls or patterns to trace."),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Lt.c.warn("[Tracing] We added a reasonable default for you: "+mn.tracingOrigins));const{routingInstrumentation:n,startTransactionOnLocationChange:r,startTransactionOnPageLoad:i,markBackgroundTransactions:o,traceFetch:s,traceXHR:a,tracingOrigins:l,shouldCreateSpanForRequest:c}=this.options;n(e=>this._createRouteTransaction(e),i,r),o&&(qt.a&&qt.a.document?qt.a.document.addEventListener("visibilitychange",()=>{const e=Object(Ht.a)();if(qt.a.document.hidden&&e){const t="cancelled";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Lt.c.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${e.op}`),e.status||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.finish()}}):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Lt.c.warn("[Tracing] Could not set up background tab detection due to lack of global document")),gn({traceFetch:s,traceXHR:a,tracingOrigins:l,shouldCreateSpanForRequest:c})}_createRouteTransaction(e){if(!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Lt.c.warn(`[Tracing] Did not create ${e.op} transaction because _getCurrentHub is invalid.`));const{beforeNavigate:t,idleTimeout:n,finalTimeout:r,heartbeatInterval:i}=this.options,o="pageload"===e.op,s=o?yn("sentry-trace"):null,a=o?yn("baggage"):null,l=s?Object(Bt.a)(s):void 0,c=a?function(e){if(!Object(zt.i)(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce((e,t)=>({...e,...Qt(t)}),{});else{if(!e)return;t=Qt(e)}const n=Object.entries(t).reduce((e,[t,n])=>{if(t.match(Ft)){e[t.slice("sentry-".length)]=n}return e},{});return Object.keys(n).length>0?n:void 0}(a):void 0,u={...e,...l,metadata:{...e.metadata,dynamicSamplingContext:l&&!c?{}:c},trimEnd:!0},d="function"==typeof t?t(u):u,h=void 0===d?{...u,sampled:!1}:d;h.metadata=h.name!==u.name?{...h.metadata,source:"custom"}:h.metadata,!1===h.sampled&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Lt.c.log(`[Tracing] Will not send ${h.op} transaction because of beforeNavigate.`),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Lt.c.log(`[Tracing] Starting ${h.op} transaction on scope`);const p=this._getCurrentHub(),{location:f}=qt.a,m=Object(Dt.b)(p,h,n,r,!0,{location:f},i);return m.registerBeforeFinishCallback(e=>{dn(e),e.setTag("sentry_reportAllChanges",Boolean(this.options._metricOptions&&this.options._metricOptions._reportAllChanges))}),m}}function yn(e){const t=Object(qt.b)(`meta[name=${e}]`);return t?t.getAttribute("content"):null}("undefined"==typeof __SENTRY_TRACING__||__SENTRY_TRACING__)&&Object(Dt.a)();var Sn=o.a.createContext(null);var _n=function(e){e()};function xn(){var e=_n,t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,i=n={callback:e,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){r&&null!==t&&(r=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}var wn={notify:function(){},get:function(){return[]}};function kn(e,t){var n,r=wn;function i(){s.onStateChange&&s.onStateChange()}function o(){n||(n=t?t.addNestedSub(i):e.subscribe(i),r=xn())}var s={addNestedSub:function(e){return o(),r.subscribe(e)},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:i,isSubscribed:function(){return Boolean(n)},trySubscribe:o,tryUnsubscribe:function(){n&&(n(),n=void 0,r.clear(),r=wn)},getListeners:function(){return r}};return s}var On="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?i.useLayoutEffect:i.useEffect;var En=function(e){var t=e.store,n=e.context,r=e.children,s=Object(i.useMemo)((function(){var e=kn(t);return{store:t,subscription:e}}),[t]),a=Object(i.useMemo)((function(){return t.getState()}),[t]);On((function(){var e=s.subscription;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),a!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[s,a]);var l=n||Sn;return o.a.createElement(l.Provider,{value:s},r)},An=n(15);function Tn(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var Cn=n(56),Mn=n.n(Cn);n(167);function $n(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function Pn(e,t){if($n(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!$n(e[n[i]],t[n[i]]))return!1;return!0}function Rn(){return Object(i.useContext)(Sn)}function jn(e){void 0===e&&(e=Sn);var t=e===Sn?Rn:function(){return Object(i.useContext)(e)};return function(){return t().store}}var Nn=jn();function Dn(e){void 0===e&&(e=Sn);var t=e===Sn?Nn:jn(e);return function(){return t().dispatch}}var In=Dn(),Ln=function(e,t){return e===t};function Bn(e){void 0===e&&(e=Sn);var t=e===Sn?Rn:function(){return Object(i.useContext)(e)};return function(e,n){void 0===n&&(n=Ln);var r=t(),o=function(e,t,n,r){var o,s=Object(i.useReducer)((function(e){return e+1}),0)[1],a=Object(i.useMemo)((function(){return kn(n,r)}),[n,r]),l=Object(i.useRef)(),c=Object(i.useRef)(),u=Object(i.useRef)(),d=Object(i.useRef)(),h=n.getState();try{if(e!==c.current||h!==u.current||l.current){var p=e(h);o=void 0!==d.current&&t(p,d.current)?d.current:p}else o=d.current}catch(e){throw l.current&&(e.message+="\nThe error may be correlated with this previous error:\n"+l.current.stack+"\n\n"),e}return On((function(){c.current=e,u.current=h,d.current=o,l.current=void 0})),On((function(){function e(){try{var e=n.getState();if(e===u.current)return;var r=c.current(e);if(t(r,d.current))return;d.current=r,u.current=e}catch(e){l.current=e}s()}return a.onStateChange=e,a.trySubscribe(),e(),function(){return a.tryUnsubscribe()}}),[n,a]),o}(e,n,r.store,r.subscription);return Object(i.useDebugValue)(o),o}}var zn,Fn=Bn(),Un=n(14),Qn=n.n(Un);zn=Un.unstable_batchedUpdates,_n=zn;var qn=n(33),Gn=n(168),Hn=n.n(Gn);const Vn=(e,t)=>{e.loading="pending",e.remixLoadFailed=!1,e.accessDeniedNoAuthModalShowing=!1,e.modals={},e.currentLoadingRequestId=t.meta.requestId,e.lastSavedTime=null},Wn=(e,t)=>{if("pending"===e.loading&&e.currentLoadingRequestId===t.meta.requestId){e.project=t.payload.project,e.loading="success",e.justLoaded=!0,e.saving="idle",e.currentLoadingRequestId=void 0,e.openFiles=[[]];const n=0;"html"===e.project.project_type?e.openFiles[n].push("index.html"):e.openFiles[n].push("main.py"),e.focussedFileIndices=[0]}},Xn=(e,t)=>{if("pending"===e.loading&&e.currentLoadingRequestId===t.meta.requestId){var n;e.loading="failed",e.saving="idle";const r=t.error.message.split(" "),i=r[r.length-1],o=null===(n=t.meta.arg)||void 0===n?void 0:n.accessToken,s=["401","403","500"];"404"===i?e.notFoundModalShowing=!0:s.includes(i)&&o?e.accessDeniedWithAuthModalShowing=!0:s.includes(i)&&!o&&(e.accessDeniedNoAuthModalShowing=!0,e.modals.accessDenied={identifier:t.meta.arg.identifier,projectType:t.meta.arg.projectType}),e.currentLoadingRequestId=void 0}};var Yn=n(72),Zn=n.n(Yn),Jn=n(169),Kn=n.n(Jn);const er="https://editor-api.raspberrypi.org",tr=async(e,t)=>await Zn.a.get(e,t),nr=async(e,t,n)=>await Zn.a.post(e,t,n),rr=e=>{let t;return t=e?{Accept:"application/json",Authorization:e}:{Accept:"application/json"},{headers:t}},ir=async(e,t)=>{const n=Kn()(e,["user_id"]);return n.identifier?await(async(e,t,n)=>await Zn.a.put(e,t,n))("".concat(er,"/api/projects/").concat(n.identifier),{project:n},rr(t)):await nr("".concat(er,"/api/projects"),{project:n},rr(t))},or=async function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!r)return;const{errorMessage:i,errorType:o}=n;return await nr("".concat(er,"/api/project_errors"),{error:i,error_type:o,project_id:e,user_id:t})},sr=e=>Object(qn.b)("editor/".concat(e,"Project"),async(t,n)=>{let r,{project:i,identifier:o,locale:s,accessToken:a,autosave:l,assetsOnly:c}=t,{rejectWithValue:u}=n;switch(e){case"load":r=c?await(async(e,t,n)=>{const r=t?"?locale=".concat(t):"";return await tr("".concat(er,"/api/projects/").concat(e,"/images").concat(r),rr(n))})(o,s,a):await(async(e,t,n)=>{const r=t?"?locale=".concat(t):"";return await tr("".concat(er,"/api/projects/").concat(e).concat(r),rr(n))})(o,s,a);break;case"loadRemix":r=await(async(e,t)=>await tr("".concat(er,"/api/projects/").concat(e,"/remix"),rr(t)))(o,a);break;case"remix":r=await(async(e,t)=>await nr("".concat(er,"/api/projects/").concat(e.identifier,"/remix"),{project:e},rr(t)))(i,a);break;case"save":r=await ir(i,a);break;case"delete":r=await(async(e,t)=>await Zn.a.delete("".concat(er,"/api/projects/").concat(e),rr(t)))(o,a);break;default:u({error:"no such sync action"})}return{project:r.data,autosave:l}},{condition:(t,n)=>{let{getState:r}=n;const{editor:i,auth:o}=r(),s=i.saving,a=i.loading;return!o.isLoadingUser&&(("save"!==e&&"remix"!==e||"pending"!==s)&&(("load"!==e||"pending"!==a)&&void 0))}}),ar=(Object(qn.b)("editor/loadProjectList",async e=>{let{page:t,accessToken:n}=e;const r=await(async(e,t)=>await tr("".concat(er,"/api/projects"),{params:{page:e},...rr(t)}))(t,n);return{projects:r.data,page:t,links:Hn()(r.headers.link)}}),{project:{},readOnly:!1,saveTriggered:!1,saving:"idle",loading:"idle",justLoaded:!1,remixLoadFailed:!1,hasShownSavePrompt:!1,loadError:"",saveError:"",currentLoadingRequestId:void 0,openFiles:[[]],focussedFileIndices:[0],nameError:"",autorunEnabled:!1,codeRunTriggered:!1,codeHasBeenRun:!1,drawTriggered:!1,isEmbedded:!1,isOutputOnly:!1,browserPreview:!1,isSplitView:!0,isThemeable:!0,webComponent:!1,codeRunLoading:!1,codeRunStopped:!1,projectList:[],projectListLoaded:"idle",projectIndexCurrentPage:1,projectIndexTotalPages:1,lastSaveAutosave:!1,lastSavedTime:null,senseHatAlwaysEnabled:!1,senseHatEnabled:!1,loadRemixDisabled:!1,accessDeniedNoAuthModalShowing:!1,accessDeniedWithAuthModalShowing:!1,betaModalShowing:!1,errorModalShowing:!1,loginToSaveModalShowing:!1,notFoundModalShowing:!1,newFileModalShowing:!1,renameFileModalShowing:!1,newProjectModalShowing:!1,renameProjectModalShowing:!1,deleteProjectModalShowing:!1,sidebarShowing:!0,modals:{},errorDetails:{}}),lr=Object(qn.c)({name:"editor",initialState:ar,reducers:{closeFile:(e,t)=>{const n=e.openFiles.map(e=>e.includes(t.payload)).indexOf(!0),r=e.openFiles[n].indexOf(t.payload);e.openFiles[n]=e.openFiles[n].filter(e=>e!==t.payload),(e.focussedFileIndices[n]>=e.openFiles[n].length||r<e.focussedFileIndices[n])&&e.focussedFileIndices[n]--},openFile:(e,t)=>{e.openFiles.flat().includes(t.payload)||e.openFiles[0].push(t.payload),e.focussedFileIndices[0]=e.openFiles[0].indexOf(t.payload)},setOpenFiles:(e,t)=>{e.openFiles=t.payload},addFilePanel:e=>{e.openFiles.push([]),e.focussedFileIndices.push(0)},setFocussedFileIndex:(e,t)=>{e.focussedFileIndices[t.payload.panelIndex]=t.payload.fileIndex},updateImages:(e,t)=>{e.project.image_list||(e.project.image_list=[]),e.project.image_list=t.payload},setWebComponent:(e,t)=>{e.webComponent=t.payload},addProjectComponent:(e,t)=>{e.project.components.push({name:t.payload.name,extension:t.payload.extension,content:""}),e.saving="idle"},setPage:(e,t)=>{e.page=t.payload},setEmbedded:(e,t)=>{e.isEmbedded=!0},setIsOutputOnly:(e,t)=>{e.isOutputOnly=t.payload},setBrowserPreview:(e,t)=>{e.browserPreview=!0},setIsSplitView:(e,t)=>{e.isSplitView=t.payload},setNameError:(e,t)=>{e.nameError=t.payload},setHasShownSavePrompt:e=>{e.hasShownSavePrompt=!0},setProject:(e,t)=>{e.project=t.payload,e.project.image_list||(e.project.image_list=[]),e.loading="success",e.openFiles=[[]];"html"===e.project.project_type?e.openFiles[0].push("index.html"):e.openFiles[0].push("main.py"),e.justLoaded=!0},expireJustLoaded:e=>{e.justLoaded=!1},setReadOnly:(e,t)=>{e.readOnly=t.payload},setSenseHatAlwaysEnabled:(e,t)=>{e.senseHatAlwaysEnabled=t.payload},setSenseHatEnabled:(e,t)=>{e.senseHatEnabled=t.payload},setLoadRemixDisabled:(e,t)=>{e.loadRemixDisabled=t.payload},triggerDraw:e=>{e.drawTriggered=!0},triggerSave:e=>{e.saveTriggered=!0},updateProjectComponent:(e,t)=>{const n=t.payload.extension,r=t.payload.name,i=t.payload.code,o=e.project.components.map(e=>e.extension!==n||e.name!==r?e:{...e,content:i});e.project.components=o},updateProjectName:(e,t)=>{e.project.name=t.payload,e.saving="idle"},updateComponentName:(e,t)=>{const n=t.payload.key,r=t.payload.name,i=t.payload.extension,o="".concat(e.project.components[n].name,".").concat(e.project.components[n].extension);if(e.project.components[n].name=r,e.project.components[n].extension=i,e.openFiles.flat().includes(o)){const t=e.openFiles.map(e=>e.includes(o)).indexOf(!0),n=e.openFiles[t].indexOf(o);e.openFiles[t][n]="".concat(r,".").concat(i)}e.saving="idle"},setError:(e,t)=>{e.error=t.payload},triggerCodeRun:e=>{e.codeRunTriggered=!0,e.codeHasBeenRun=!0},stopCodeRun:e=>{e.codeRunStopped=!0},stopDraw:e=>{e.drawTriggered=!1},loadingRunner:e=>{e.codeRunLoading=!0},codeRunHandled:e=>{e.codeRunLoading=!1,e.codeRunTriggered=!1,e.codeRunStopped=!1},closeAccessDeniedNoAuthModal:e=>{e.accessDeniedNoAuthModalShowing=!1,e.modals={}},closeAccessDeniedWithAuthModal:e=>{e.accessDeniedWithAuthModalShowing=!1},showBetaModal:e=>{e.betaModalShowing=!0},closeBetaModal:e=>{e.betaModalShowing=!1},showErrorModal:e=>{e.errorModalShowing=!0},closeErrorModal:e=>{e.errorModalShowing=!1},showLoginToSaveModal:e=>{e.loginToSaveModalShowing=!0},closeLoginToSaveModal:e=>{e.loginToSaveModalShowing=!1,e.saveTriggered=!1},closeNotFoundModal:e=>{e.notFoundModalShowing=!1},showNewFileModal:e=>{e.newFileModalShowing=!0},closeNewFileModal:e=>{e.newFileModalShowing=!1,e.nameError=""},showRenameFileModal:(e,t)=>{e.modals.renameFile=t.payload,e.renameFileModalShowing=!0},closeRenameFileModal:e=>{e.renameFileModalShowing=!1,e.nameError=""},showNewProjectModal:e=>{e.newProjectModalShowing=!0},closeNewProjectModal:e=>{e.newProjectModalShowing=!1},showRenameProjectModal:(e,t)=>{e.modals.renameProject=t.payload,e.renameProjectModalShowing=!0},closeRenameProjectModal:e=>{e.modals.renameProject=null,e.renameProjectModalShowing=!1},showDeleteProjectModal:(e,t)=>{e.modals.deleteProject=t.payload,e.deleteProjectModalShowing=!0},closeDeleteProjectModal:e=>{e.modals.deleteProject=null,e.deleteProjectModalShowing=!1},setProjectIndexPage:(e,t)=>{e.projectIndexCurrentPage=t.payload,e.projectListLoaded="idle"},showSidebar:e=>{e.sidebarShowing=!0},hideSidebar:e=>{e.sidebarShowing=!1},disableTheming:e=>{e.isThemeable=!1},setErrorDetails:(e,t)=>{e.errorDetails=t.payload}},extraReducers:e=>{e.addCase("editor/saveProject/pending",e=>{e.saving="pending",e.saveTriggered=!1}),e.addCase("editor/saveProject/fulfilled",(e,t)=>{localStorage.removeItem(e.project.identifier||"project"),e.lastSaveAutosave=t.payload.autosave,e.saving="success",e.lastSavedTime=Date.now(),e.renameProjectModalShowing?(e.modals.renameProject=null,e.renameProjectModalShowing=!1,e.projectListLoaded="idle"):e.project.identifier!==t.payload.project.identifier&&(e.project.image_list=e.project.image_list||[],e.project=t.payload.project,e.loading="idle")}),e.addCase("editor/saveProject/rejected",e=>{e.saving="failed"}),e.addCase("editor/remixProject/pending",(e,t)=>{e.saving="pending",e.saveTriggered=!1}),e.addCase("editor/remixProject/fulfilled",(e,t)=>{localStorage.removeItem(e.project.identifier),e.lastSaveAutosave=!1,e.saving="success",e.project=t.payload.project,e.loading="idle"}),e.addCase("editor/loadRemixProject/pending",Vn),e.addCase("editor/loadRemixProject/fulfilled",(e,t)=>{Wn(e,t),e.remixLoadFailed=!1}),e.addCase("editor/loadRemixProject/rejected",(e,t)=>{Xn(e,t),e.remixLoadFailed=!0}),e.addCase("editor/loadProject/pending",Vn),e.addCase("editor/loadProject/fulfilled",Wn),e.addCase("editor/loadProject/rejected",Xn),e.addCase("editor/deleteProject/fulfilled",e=>{e.projectListLoaded="idle",e.modals.deleteProject=null,e.deleteProjectModalShowing=!1}),e.addCase("editor/loadProjectList/pending",e=>{e.projectListLoaded="pending"}),e.addCase("editor/loadProjectList/fulfilled",(e,t)=>{if(t.payload.projects.length>0||1===t.payload.page){e.projectListLoaded="success",e.projectList=t.payload.projects;const n=t.payload.links;e.projectIndexTotalPages=n&&n.last?parseInt(n.last.page):t.payload.page}else e.projectIndexCurrentPage=e.projectIndexCurrentPage-1,e.projectListLoaded="idle"}),e.addCase("editor/loadProjectList/rejected",e=>{e.projectListLoaded="failed"})}}),{addProjectComponent:cr,loadingRunner:ur,codeRunHandled:dr,expireJustLoaded:hr,closeFile:pr,openFile:fr,setOpenFiles:mr,addFilePanel:gr,setFocussedFileIndex:br,setPage:vr,setEmbedded:yr,setIsOutputOnly:Sr,setBrowserPreview:_r,setError:xr,setIsSplitView:wr,setNameError:kr,setHasShownSavePrompt:Or,setWebComponent:Er,setProject:Ar,setReadOnly:Tr,setSenseHatAlwaysEnabled:Cr,setSenseHatEnabled:Mr,setLoadRemixDisabled:$r,stopCodeRun:Pr,stopDraw:Rr,triggerCodeRun:jr,triggerDraw:Nr,triggerSave:Dr,updateComponentName:Ir,updateImages:Lr,updateProjectComponent:Br,updateProjectName:zr,closeAccessDeniedNoAuthModal:Fr,closeAccessDeniedWithAuthModal:Ur,showBetaModal:Qr,closeBetaModal:qr,showErrorModal:Gr,closeErrorModal:Hr,showLoginToSaveModal:Vr,closeLoginToSaveModal:Wr,closeNotFoundModal:Xr,showNewFileModal:Yr,closeNewFileModal:Zr,showRenameFileModal:Jr,closeRenameFileModal:Kr,showNewProjectModal:ei,closeNewProjectModal:ti,showRenameProjectModal:ni,closeRenameProjectModal:ri,showDeleteProjectModal:ii,closeDeleteProjectModal:oi,setProjectIndexPage:si,showSidebar:ai,hideSidebar:li,disableTheming:ci,setErrorDetails:ui}=lr.actions;var di=lr.reducer,hi=n(20),pi=(n(323),n(145),n(324),n(325),n(170)),fi=n(12),mi=n.n(fi);var gi=()=>{var e;const t=Fn(e=>e.editor.project),n=document.body;return n?Object(Un.createPortal)(o.a.createElement("div",{id:"file-content",hidden:!0},null===(e=t.components)||void 0===e?void 0:e.map((e,t)=>["csv","txt"].includes(e.extension)?o.a.createElement("div",{id:"".concat(e.name,".").concat(e.extension),key:t},e.content):null)),n):null},bi=(n(150),n(27)),vi=n.n(bi),yi=(n(31),n(34)),Si=n.n(yi);n(171);Object.create(null);function _i(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];"string"==typeof n[0]&&(n[0]="react-i18next:: ".concat(n[0])),(e=console).warn.apply(e,n)}}var xi={};function wi(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];"string"==typeof t[0]&&xi[t[0]]||("string"==typeof t[0]&&(xi[t[0]]=new Date),_i.apply(void 0,t))}function ki(e,t,n){e.loadNamespaces(t,(function(){if(e.isInitialized)n();else{e.on("initialized",(function t(){setTimeout((function(){e.off("initialized",t)}),0),n()}))}}))}function Oi(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.languages[0],i=!!t.options&&t.options.fallbackLng,o=t.languages[t.languages.length-1];if("cimode"===r.toLowerCase())return!0;var s=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};return!(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!s(t.isLanguageChangingTo,e))&&(!!t.hasResourceBundle(r,e)||(!(t.services.backendConnector.backend&&(!t.options.resources||t.options.partialBundledLanguages))||!(!s(r,e)||i&&!s(o,e))))}function Ei(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t.languages||!t.languages.length)return wi("i18n.languages were undefined or empty",t.languages),!0;var r=void 0!==t.options.ignoreJSONStructure;return r?t.hasLoadedNamespace(e,{precheck:function(t,r){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):Oi(e,t,n)}var Ai=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Ti={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Ci=function(e){return Ti[e]};function Mi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mi(Object(n),!0).forEach((function(t){vi()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Pi,Ri={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:function(e){return e.replace(Ai,Ci)}};function ji(){return Ri}function Ni(){return Pi}var Di=n(172),Ii=n.n(Di),Li=n(173),Bi=n.n(Li),zi={type:"3rdParty",init:function(e){!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ri=$i($i({},Ri),e)}(e.options.react),function(e){Pi=e}(e)}};var Fi=Object(i.createContext)(),Ui=function(){function e(){Ii()(this,e),this.usedNamespaces={}}return Bi()(e,[{key:"addUsedNamespaces",value:function(e){var t=this;e.forEach((function(e){t.usedNamespaces[e]||(t.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();var Qi=n(55),qi=n.n(Qi);function Gi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gi(Object(n),!0).forEach((function(t){vi()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Vi=function(e,t){var n=Object(i.useRef)();return Object(i.useEffect)((function(){n.current=t?n.current:e}),[e,t]),n.current};function Wi(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.i18n,r=Object(i.useContext)(Fi)||{},o=r.i18n,s=r.defaultNS,a=n||o||Ni();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new Ui),!a){wi("You will need to pass in an i18next instance by using initReactI18next");var l=function(e,t){return"string"==typeof t?t:t&&"object"===Si()(t)&&"string"==typeof t.defaultValue?t.defaultValue:Array.isArray(e)?e[e.length-1]:e},c=[l,{},!1];return c.t=l,c.i18n={},c.ready=!1,c}a.options.react&&void 0!==a.options.react.wait&&wi("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var u=Hi(Hi(Hi({},ji()),a.options.react),t),d=u.useSuspense,h=u.keyPrefix,p=e||s||a.options&&a.options.defaultNS;p="string"==typeof p?[p]:p||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(p);var f=(a.isInitialized||a.initializedStoreOnce)&&p.every((function(e){return Ei(e,a,u)}));function m(){return a.getFixedT(null,"fallback"===u.nsMode?p:p[0],h)}var g=Object(i.useState)(m),b=qi()(g,2),v=b[0],y=b[1],S=p.join(),_=Vi(S),x=Object(i.useRef)(!0);Object(i.useEffect)((function(){var e=u.bindI18n,t=u.bindI18nStore;function n(){x.current&&y(m)}return x.current=!0,f||d||ki(a,p,(function(){x.current&&y(m)})),f&&_&&_!==S&&x.current&&y(m),e&&a&&a.on(e,n),t&&a&&a.store.on(t,n),function(){x.current=!1,e&&a&&e.split(" ").forEach((function(e){return a.off(e,n)})),t&&a&&t.split(" ").forEach((function(e){return a.store.off(e,n)}))}}),[a,S]);var w=Object(i.useRef)(!0);Object(i.useEffect)((function(){x.current&&!w.current&&y(m),w.current=!1}),[a,h]);var k=[v,a,f];if(k.t=v,k.i18n=a,k.ready=f,f)return k;if(!f&&!d)return k;throw new Promise((function(e){ki(a,p,(function(){e()}))}))}function Xi(e){return function(t){return!!t.type&&t.type.tabsRole===e}}var Yi=Xi("Tab"),Zi=Xi("TabList"),Ji=Xi("TabPanel");function Ki(){return(Ki=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function eo(e,t){return i.Children.map(e,(function(e){return null===e?null:function(e){return Yi(e)||Zi(e)||Ji(e)}(e)?t(e):e.props&&e.props.children&&"object"==typeof e.props.children?Object(i.cloneElement)(e,Ki({},e.props,{children:eo(e.props.children,t)})):e}))}function to(e,t){return i.Children.forEach(e,(function(e){null!==e&&(Yi(e)||Ji(e)?t(e):e.props&&e.props.children&&"object"==typeof e.props.children&&(Zi(e)&&t(e),to(e.props.children,t)))}))}function no(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=no(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}var ro=function(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=no(e))&&(r&&(r+=" "),r+=t);return r},io=0;function oo(){return"react-tabs-"+io++}function so(e){var t=0;return to(e,(function(e){Yi(e)&&t++})),t}var ao,lo=["children","className","disabledTabClassName","domRef","focus","forceRenderTabPanel","onSelect","selectedIndex","selectedTabClassName","selectedTabPanelClassName","environment","disableUpDownKeys"];function co(){return(co=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function uo(e,t){return(uo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ho(e){return e&&"getAttribute"in e}function po(e){return ho(e)&&e.getAttribute("data-rttab")}function fo(e){return ho(e)&&"true"===e.getAttribute("aria-disabled")}var mo=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).tabNodes=[],t.handleKeyDown=function(e){var n=t.props,r=n.direction,i=n.disableUpDownKeys;if(t.isTabFromContainer(e.target)){var o=t.props.selectedIndex,s=!1,a=!1;32!==e.keyCode&&13!==e.keyCode||(s=!0,a=!1,t.handleClick(e)),37===e.keyCode||!i&&38===e.keyCode?(o="rtl"===r?t.getNextTab(o):t.getPrevTab(o),s=!0,a=!0):39===e.keyCode||!i&&40===e.keyCode?(o="rtl"===r?t.getPrevTab(o):t.getNextTab(o),s=!0,a=!0):35===e.keyCode?(o=t.getLastTab(),s=!0,a=!0):36===e.keyCode&&(o=t.getFirstTab(),s=!0,a=!0),s&&e.preventDefault(),a&&t.setSelected(o,e)}},t.handleClick=function(e){var n=e.target;do{if(t.isTabFromContainer(n)){if(fo(n))return;var r=[].slice.call(n.parentNode.children).filter(po).indexOf(n);return void t.setSelected(r,e)}}while(null!=(n=n.parentNode))},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,uo(t,n);var s=r.prototype;return s.setSelected=function(e,t){if(!(e<0||e>=this.getTabsCount())){var n=this.props;(0,n.onSelect)(e,n.selectedIndex,t)}},s.getNextTab=function(e){for(var t=this.getTabsCount(),n=e+1;n<t;n++)if(!fo(this.getTab(n)))return n;for(var r=0;r<e;r++)if(!fo(this.getTab(r)))return r;return e},s.getPrevTab=function(e){for(var t=e;t--;)if(!fo(this.getTab(t)))return t;for(t=this.getTabsCount();t-- >e;)if(!fo(this.getTab(t)))return t;return e},s.getFirstTab=function(){for(var e=this.getTabsCount(),t=0;t<e;t++)if(!fo(this.getTab(t)))return t;return null},s.getLastTab=function(){for(var e=this.getTabsCount();e--;)if(!fo(this.getTab(e)))return e;return null},s.getTabsCount=function(){return so(this.props.children)},s.getPanelsCount=function(){return function(e){var t=0;return to(e,(function(e){Ji(e)&&t++})),t}(this.props.children)},s.getTab=function(e){return this.tabNodes["tabs-"+e]},s.getChildren=function(){var e=this,t=0,n=this.props,r=n.children,s=n.disabledTabClassName,a=n.focus,l=n.forceRenderTabPanel,c=n.selectedIndex,u=n.selectedTabClassName,d=n.selectedTabPanelClassName,h=n.environment;this.tabIds=this.tabIds||[],this.panelIds=this.panelIds||[];for(var p=this.tabIds.length-this.getTabsCount();p++<0;)this.tabIds.push(oo()),this.panelIds.push(oo());return eo(r,(function(n){var r=n;if(Zi(n)){var p=0,f=!1;null==ao&&function(e){var t=e||("undefined"!=typeof window?window:void 0);try{ao=!(void 0===t||!t.document||!t.document.activeElement)}catch(e){ao=!1}}(h),ao&&(f=o.a.Children.toArray(n.props.children).filter(Yi).some((function(t,n){var r=h||("undefined"!=typeof window?window:void 0);return r&&r.document.activeElement===e.getTab(n)}))),r=Object(i.cloneElement)(n,{children:eo(n.props.children,(function(t){var n="tabs-"+p,r=c===p,o={tabRef:function(t){e.tabNodes[n]=t},id:e.tabIds[p],panelId:e.panelIds[p],selected:r,focus:r&&(a||f)};return u&&(o.selectedClassName=u),s&&(o.disabledClassName=s),p++,Object(i.cloneElement)(t,o)}))})}else if(Ji(n)){var m={id:e.panelIds[t],tabId:e.tabIds[t],selected:c===t};l&&(m.forceRender=l),d&&(m.selectedClassName=d),t++,r=Object(i.cloneElement)(n,m)}return r}))},s.isTabFromContainer=function(e){if(!po(e))return!1;var t=e.parentElement;do{if(t===this.node)return!0;if(t.getAttribute("data-rttabs"))break;t=t.parentElement}while(t);return!1},s.render=function(){var e=this,t=this.props,n=(t.children,t.className),r=(t.disabledTabClassName,t.domRef),i=(t.focus,t.forceRenderTabPanel,t.onSelect,t.selectedIndex,t.selectedTabClassName,t.selectedTabPanelClassName,t.environment,t.disableUpDownKeys,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,lo));return o.a.createElement("div",co({},i,{className:ro(n),onClick:this.handleClick,onKeyDown:this.handleKeyDown,ref:function(t){e.node=t,r&&r(t)},"data-rttabs":!0}),this.getChildren())},r}(i.Component);mo.defaultProps={className:"react-tabs",focus:!1},mo.propTypes={};var go=["children","defaultIndex","defaultFocus"];function bo(e,t){return(bo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var vo=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).handleSelected=function(e,t,r){var i=n.props.onSelect,o=n.state.mode;if("function"!=typeof i||!1!==i(e,t,r)){var s={focus:"keydown"===r.type};1===o&&(s.selectedIndex=e),n.setState(s)}},n.state=r.copyPropsToState(n.props,{},t.defaultFocus),n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,bo(t,n),r.getDerivedStateFromProps=function(e,t){return r.copyPropsToState(e,t)},r.getModeFromProps=function(e){return null===e.selectedIndex?1:0},r.copyPropsToState=function(e,t,n){void 0===n&&(n=!1);var i={focus:n,mode:r.getModeFromProps(e)};if(1===i.mode){var o=Math.max(0,so(e.children)-1),s=null;s=null!=t.selectedIndex?Math.min(t.selectedIndex,o):e.defaultIndex||0,i.selectedIndex=s}return i},r.prototype.render=function(){var e=this.props,t=e.children,n=(e.defaultIndex,e.defaultFocus,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,go)),r=this.state,i=r.focus,s=r.selectedIndex;return n.focus=i,n.onSelect=this.handleSelected,null!=s&&(n.selectedIndex=s),o.a.createElement(mo,n,t)},r}(i.Component);vo.defaultProps={defaultFocus:!1,forceRenderTabPanel:!1,selectedIndex:null,defaultIndex:null,environment:null,disableUpDownKeys:!1},vo.propTypes={},vo.tabsRole="Tabs";var yo=["children","className"];function So(){return(So=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function _o(e,t){return(_o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var xo=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,_o(t,n),r.prototype.render=function(){var e=this.props,t=e.children,n=e.className,r=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,yo);return o.a.createElement("ul",So({},r,{className:ro(n),role:"tablist"}),t)},r}(i.Component);xo.defaultProps={className:"react-tabs__tab-list"},xo.propTypes={},xo.tabsRole="TabList";var wo=["children","className","disabled","disabledClassName","focus","id","panelId","selected","selectedClassName","tabIndex","tabRef"];function ko(){return(ko=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Oo(e,t){return(Oo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Eo=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Oo(t,n);var i=r.prototype;return i.componentDidMount=function(){this.checkFocus()},i.componentDidUpdate=function(){this.checkFocus()},i.checkFocus=function(){var e=this.props,t=e.selected,n=e.focus;t&&n&&this.node.focus()},i.render=function(){var e,t=this,n=this.props,r=n.children,i=n.className,s=n.disabled,a=n.disabledClassName,l=(n.focus,n.id),c=n.panelId,u=n.selected,d=n.selectedClassName,h=n.tabIndex,p=n.tabRef,f=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(n,wo);return o.a.createElement("li",ko({},f,{className:ro(i,(e={},e[d]=u,e[a]=s,e)),ref:function(e){t.node=e,p&&p(e)},role:"tab",id:l,"aria-selected":u?"true":"false","aria-disabled":s?"true":"false","aria-controls":c,tabIndex:h||(u?"0":null),"data-rttab":!0}),r)},r}(i.Component);Eo.defaultProps={className:"react-tabs__tab",disabledClassName:"react-tabs__tab--disabled",focus:!1,id:null,panelId:null,selected:!1,selectedClassName:"react-tabs__tab--selected"},Eo.propTypes={},Eo.tabsRole="Tab";var Ao=["children","className","forceRender","id","selected","selectedClassName","tabId"];function To(){return(To=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Co(e,t){return(Co=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Mo=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Co(t,n),r.prototype.render=function(){var e,t=this.props,n=t.children,r=t.className,i=t.forceRender,s=t.id,a=t.selected,l=t.selectedClassName,c=t.tabId,u=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,Ao);return o.a.createElement("div",To({},u,{className:ro(r,(e={},e[l]=a,e)),role:"tabpanel",id:s,"aria-labelledby":c}),i||a?n:null)},r}(i.Component);Mo.defaultProps={className:"react-tabs__tab-panel",forceRender:!1,selectedClassName:"react-tabs__tab-panel--selected"},Mo.propTypes={},Mo.tabsRole="TabPanel";const $o="(max-width: ".concat("600px",")");n(152);const Po=Object(i.createContext)({theme:window.matchMedia("(prefers-color-scheme:dark)").matches?"dark":"light",fontSize:"small"});var Ro,jo=()=>{const e=Fn(e=>e.editor.error),t=Object(i.useContext)(Po);return e?o.a.createElement("div",{className:"error-message error-message--".concat(t.fontSize)},o.a.createElement("pre",{className:"error-message__content"},e)):null},No=(n(37),n(1)),Do=[];!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(Ro||(Ro={}));var Io,Lo=function(e){return Object.freeze(e)},Bo=function(e,t){this.inlineSize=e,this.blockSize=t,Lo(this)},zo=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Lo(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),Fo=function(e){return e instanceof SVGElement&&"getBBox"in e},Uo=function(e){if(Fo(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,o=i.offsetWidth,s=i.offsetHeight;return!(o||s||e.getClientRects().length)},Qo=function(e){var t;if(e instanceof Element)return!0;var n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},qo="undefined"!=typeof window?window:{},Go=new WeakMap,Ho=/auto|scroll/,Vo=/^tb|vertical/,Wo=/msie|trident/i.test(qo.navigator&&qo.navigator.userAgent),Xo=function(e){return parseFloat(e||"0")},Yo=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new Bo((n?t:e)||0,(n?e:t)||0)},Zo=Lo({devicePixelContentBoxSize:Yo(),borderBoxSize:Yo(),contentBoxSize:Yo(),contentRect:new zo(0,0,0,0)}),Jo=function(e,t){if(void 0===t&&(t=!1),Go.has(e)&&!t)return Go.get(e);if(Uo(e))return Go.set(e,Zo),Zo;var n=getComputedStyle(e),r=Fo(e)&&e.ownerSVGElement&&e.getBBox(),i=!Wo&&"border-box"===n.boxSizing,o=Vo.test(n.writingMode||""),s=!r&&Ho.test(n.overflowY||""),a=!r&&Ho.test(n.overflowX||""),l=r?0:Xo(n.paddingTop),c=r?0:Xo(n.paddingRight),u=r?0:Xo(n.paddingBottom),d=r?0:Xo(n.paddingLeft),h=r?0:Xo(n.borderTopWidth),p=r?0:Xo(n.borderRightWidth),f=r?0:Xo(n.borderBottomWidth),m=d+c,g=l+u,b=(r?0:Xo(n.borderLeftWidth))+p,v=h+f,y=a?e.offsetHeight-v-e.clientHeight:0,S=s?e.offsetWidth-b-e.clientWidth:0,_=i?m+b:0,x=i?g+v:0,w=r?r.width:Xo(n.width)-_-S,k=r?r.height:Xo(n.height)-x-y,O=w+m+S+b,E=k+g+y+v,A=Lo({devicePixelContentBoxSize:Yo(Math.round(w*devicePixelRatio),Math.round(k*devicePixelRatio),o),borderBoxSize:Yo(O,E,o),contentBoxSize:Yo(w,k,o),contentRect:new zo(d,l,w,k)});return Go.set(e,A),A},Ko=function(e,t,n){var r=Jo(e,n),i=r.borderBoxSize,o=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(t){case Ro.DEVICE_PIXEL_CONTENT_BOX:return s;case Ro.BORDER_BOX:return i;default:return o}},es=function(e){var t=Jo(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=Lo([t.borderBoxSize]),this.contentBoxSize=Lo([t.contentBoxSize]),this.devicePixelContentBoxSize=Lo([t.devicePixelContentBoxSize])},ts=function(e){if(Uo(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},ns=function(){var e=1/0,t=[];Do.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new es(t.target),i=ts(t.target);r.push(n),t.lastReportedSize=Ko(t.target,t.observedBox),i<e&&(e=i)})),t.push((function(){n.callback.call(n.observer,r,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,r=t;n<r.length;n++){(0,r[n])()}return e},rs=function(e){Do.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(ts(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},is=function(){var e,t=0;for(rs(t);Do.some((function(e){return e.activeTargets.length>0}));)t=ns(),rs(t);return Do.some((function(e){return e.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:"ResizeObserver loop completed with undelivered notifications."}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message="ResizeObserver loop completed with undelivered notifications."),window.dispatchEvent(e)),t>0},os=[],ss=function(e){if(!Io){var t=0,n=document.createTextNode("");new MutationObserver((function(){return os.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),Io=function(){n.textContent="".concat(t?t--:t++)}}os.push(e),Io()},as=0,ls={attributes:!0,characterData:!0,childList:!0,subtree:!0},cs=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],us=function(e){return void 0===e&&(e=0),Date.now()+e},ds=!1,hs=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!ds){ds=!0;var n,r=us(e);n=function(){var n=!1;try{n=is()}finally{if(ds=!1,e=r-us(),!as)return;n?t.run(1e3):e>0?t.run(e):t.start()}},ss((function(){requestAnimationFrame(n)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,ls)};document.body?t():qo.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),cs.forEach((function(t){return qo.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),cs.forEach((function(t){return qo.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),ps=function(e){!as&&e>0&&hs.start(),!(as+=e)&&hs.stop()},fs=function(){function e(e,t){this.target=e,this.observedBox=t||Ro.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e,t=Ko(this.target,this.observedBox,!0);return e=this.target,Fo(e)||function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),ms=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},gs=new WeakMap,bs=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},vs=function(){function e(){}return e.connect=function(e,t){var n=new ms(e,t);gs.set(e,n)},e.observe=function(e,t,n){var r=gs.get(e),i=0===r.observationTargets.length;bs(r.observationTargets,t)<0&&(i&&Do.push(r),r.observationTargets.push(new fs(t,n&&n.box)),ps(1),hs.schedule())},e.unobserve=function(e,t){var n=gs.get(e),r=bs(n.observationTargets,t),i=1===n.observationTargets.length;r>=0&&(i&&Do.splice(Do.indexOf(n),1),n.observationTargets.splice(r,1),ps(-1))},e.disconnect=function(e){var t=this,n=gs.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),ys=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");vs.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Qo(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");vs.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Qo(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");vs.unobserve(this,e)},e.prototype.disconnect=function(){vs.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}(),Ss=n(48),_s=n(9);var xs=function(e){return function(t){e.forEach((function(e){"function"==typeof e?e(t):null!=e&&(e.current=t)}))}};const ws=i.forwardRef(({envMap:e,resolution:t=256,frames:n=1/0,makeDefault:r,children:o,...s},a)=>{const l=Object(_s.m)(({set:e})=>e),c=Object(_s.m)(({camera:e})=>e),u=Object(_s.m)(({size:e})=>e),d=i.useRef(null),h=i.useRef(null),p=function(e,t,n){const r=Object(_s.m)(e=>e.size),o=Object(_s.m)(e=>e.viewport),s="number"==typeof e?e:r.width*o.dpr,a="number"==typeof t?t:r.height*o.dpr,l=("number"==typeof e?n:e)||{},{samples:c=0,depth:u,...d}=l,h=i.useMemo(()=>{const e=new No.WebGLRenderTarget(s,a,{minFilter:No.LinearFilter,magFilter:No.LinearFilter,type:No.HalfFloatType,...d});return u&&(e.depthTexture=new No.DepthTexture(s,a,No.FloatType)),e.samples=c,e},[]);return i.useLayoutEffect(()=>{h.setSize(s,a),c&&(h.samples=c)},[c,h,s,a]),i.useEffect(()=>()=>h.dispose(),[]),h}(t);i.useLayoutEffect(()=>{s.manual||(d.current.aspect=u.width/u.height)},[u,s]),i.useLayoutEffect(()=>{d.current.updateProjectionMatrix()});let f=0,m=null;const g="function"==typeof o;return Object(_s.a)(t=>{g&&(n===1/0||f<n)&&(h.current.visible=!1,t.gl.setRenderTarget(p),m=t.scene.background,e&&(t.scene.background=e),t.gl.render(t.scene,d.current),t.scene.background=m,t.gl.setRenderTarget(null),h.current.visible=!0,f++)}),i.useLayoutEffect(()=>{if(r){const e=c;return l(()=>({camera:d.current})),()=>l(()=>({camera:e}))}},[d,r,l]),i.createElement(i.Fragment,null,i.createElement("perspectiveCamera",Object(An.a)({ref:xs([d,a])},s),!g&&o),i.createElement("group",{ref:h},g&&o(p.texture)))});var ks=n(5);const Os=(e,t)=>(e%t+t)%t;class Es extends No.EventDispatcher{constructor(e,t){super(),Object(ks.a)(this,"object",void 0),Object(ks.a)(this,"domElement",void 0),Object(ks.a)(this,"enabled",!0),Object(ks.a)(this,"target",new No.Vector3),Object(ks.a)(this,"minDistance",0),Object(ks.a)(this,"maxDistance",1/0),Object(ks.a)(this,"minZoom",0),Object(ks.a)(this,"maxZoom",1/0),Object(ks.a)(this,"minPolarAngle",0),Object(ks.a)(this,"maxPolarAngle",Math.PI),Object(ks.a)(this,"minAzimuthAngle",-1/0),Object(ks.a)(this,"maxAzimuthAngle",1/0),Object(ks.a)(this,"enableDamping",!1),Object(ks.a)(this,"dampingFactor",.05),Object(ks.a)(this,"enableZoom",!0),Object(ks.a)(this,"zoomSpeed",1),Object(ks.a)(this,"enableRotate",!0),Object(ks.a)(this,"rotateSpeed",1),Object(ks.a)(this,"enablePan",!0),Object(ks.a)(this,"panSpeed",1),Object(ks.a)(this,"screenSpacePanning",!0),Object(ks.a)(this,"keyPanSpeed",7),Object(ks.a)(this,"autoRotate",!1),Object(ks.a)(this,"autoRotateSpeed",2),Object(ks.a)(this,"reverseOrbit",!1),Object(ks.a)(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),Object(ks.a)(this,"mouseButtons",{LEFT:No.MOUSE.ROTATE,MIDDLE:No.MOUSE.DOLLY,RIGHT:No.MOUSE.PAN}),Object(ks.a)(this,"touches",{ONE:No.TOUCH.ROTATE,TWO:No.TOUCH.DOLLY_PAN}),Object(ks.a)(this,"target0",void 0),Object(ks.a)(this,"position0",void 0),Object(ks.a)(this,"zoom0",void 0),Object(ks.a)(this,"_domElementKeyEvents",null),Object(ks.a)(this,"getPolarAngle",void 0),Object(ks.a)(this,"getAzimuthalAngle",void 0),Object(ks.a)(this,"setPolarAngle",void 0),Object(ks.a)(this,"setAzimuthalAngle",void 0),Object(ks.a)(this,"getDistance",void 0),Object(ks.a)(this,"listenToKeyEvents",void 0),Object(ks.a)(this,"saveState",void 0),Object(ks.a)(this,"reset",void 0),Object(ks.a)(this,"update",void 0),Object(ks.a)(this,"connect",void 0),Object(ks.a)(this,"dispose",void 0),this.object=e,this.domElement=t,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object instanceof No.PerspectiveCamera?this.object.zoom:1,this.getPolarAngle=()=>c.phi,this.getAzimuthalAngle=()=>c.theta,this.setPolarAngle=e=>{let t=Os(e,2*Math.PI),r=c.phi;r<0&&(r+=2*Math.PI),t<0&&(t+=2*Math.PI);let i=Math.abs(t-r);2*Math.PI-i<i&&(t<r?t+=2*Math.PI:r+=2*Math.PI),u.phi=t-r,n.update()},this.setAzimuthalAngle=e=>{let t=Os(e,2*Math.PI),r=c.theta;r<0&&(r+=2*Math.PI),t<0&&(t+=2*Math.PI);let i=Math.abs(t-r);2*Math.PI-i<i&&(t<r?t+=2*Math.PI:r+=2*Math.PI),u.theta=t-r,n.update()},this.getDistance=()=>n.object.position.distanceTo(n.target),this.listenToKeyEvents=e=>{e.addEventListener("keydown",H),this._domElementKeyEvents=e},this.saveState=()=>{n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object instanceof No.PerspectiveCamera?n.object.zoom:1},this.reset=()=>{n.target.copy(n.target0),n.object.position.copy(n.position0),n.object instanceof No.PerspectiveCamera&&(n.object.zoom=n.zoom0,n.object.updateProjectionMatrix()),n.dispatchEvent(r),n.update(),a=s.NONE},this.update=(()=>{const t=new No.Vector3,i=(new No.Quaternion).setFromUnitVectors(e.up,new No.Vector3(0,1,0)),o=i.clone().invert(),f=new No.Vector3,m=new No.Quaternion,g=2*Math.PI;return function(){const e=n.object.position;t.copy(e).sub(n.target),t.applyQuaternion(i),c.setFromVector3(t),n.autoRotate&&a===s.NONE&&E(2*Math.PI/60/60*n.autoRotateSpeed),n.enableDamping?(c.theta+=u.theta*n.dampingFactor,c.phi+=u.phi*n.dampingFactor):(c.theta+=u.theta,c.phi+=u.phi);let b=n.minAzimuthAngle,v=n.maxAzimuthAngle;return isFinite(b)&&isFinite(v)&&(b<-Math.PI?b+=g:b>Math.PI&&(b-=g),v<-Math.PI?v+=g:v>Math.PI&&(v-=g),c.theta=b<=v?Math.max(b,Math.min(v,c.theta)):c.theta>(b+v)/2?Math.max(b,c.theta):Math.min(v,c.theta)),c.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,c.phi)),c.makeSafe(),c.radius*=d,c.radius=Math.max(n.minDistance,Math.min(n.maxDistance,c.radius)),!0===n.enableDamping?n.target.addScaledVector(h,n.dampingFactor):n.target.add(h),t.setFromSpherical(c),t.applyQuaternion(o),e.copy(n.target).add(t),n.object.lookAt(n.target),!0===n.enableDamping?(u.theta*=1-n.dampingFactor,u.phi*=1-n.dampingFactor,h.multiplyScalar(1-n.dampingFactor)):(u.set(0,0,0),h.set(0,0,0)),d=1,!!(p||f.distanceToSquared(n.object.position)>l||8*(1-m.dot(n.object.quaternion))>l)&&(n.dispatchEvent(r),f.copy(n.object.position),m.copy(n.object.quaternion),p=!1,!0)}})(),this.connect=e=>{e===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),n.domElement=e,n.domElement.style.touchAction="none",n.domElement.addEventListener("contextmenu",V),n.domElement.addEventListener("pointerdown",F),n.domElement.addEventListener("pointercancel",q),n.domElement.addEventListener("wheel",G)},this.dispose=()=>{var e,t,r,i,o,s;null===(e=n.domElement)||void 0===e||e.removeEventListener("contextmenu",V),null===(t=n.domElement)||void 0===t||t.removeEventListener("pointerdown",F),null===(r=n.domElement)||void 0===r||r.removeEventListener("pointercancel",q),null===(i=n.domElement)||void 0===i||i.removeEventListener("wheel",G),null===(o=n.domElement)||void 0===o||o.ownerDocument.removeEventListener("pointermove",U),null===(s=n.domElement)||void 0===s||s.ownerDocument.removeEventListener("pointerup",Q),null!==n._domElementKeyEvents&&n._domElementKeyEvents.removeEventListener("keydown",H)};const n=this,r={type:"change"},i={type:"start"},o={type:"end"},s={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let a=s.NONE;const l=1e-6,c=new No.Spherical,u=new No.Spherical;let d=1;const h=new No.Vector3;let p=!1;const f=new No.Vector2,m=new No.Vector2,g=new No.Vector2,b=new No.Vector2,v=new No.Vector2,y=new No.Vector2,S=new No.Vector2,_=new No.Vector2,x=new No.Vector2,w=[],k={};function O(){return Math.pow(.95,n.zoomSpeed)}function E(e){n.reverseOrbit?u.theta+=e:u.theta-=e}function A(e){n.reverseOrbit?u.phi+=e:u.phi-=e}const T=(()=>{const e=new No.Vector3;return function(t,n){e.setFromMatrixColumn(n,0),e.multiplyScalar(-t),h.add(e)}})(),C=(()=>{const e=new No.Vector3;return function(t,r){!0===n.screenSpacePanning?e.setFromMatrixColumn(r,1):(e.setFromMatrixColumn(r,0),e.crossVectors(n.object.up,e)),e.multiplyScalar(t),h.add(e)}})(),M=(()=>{const e=new No.Vector3;return function(t,r){const i=n.domElement;if(i&&n.object instanceof No.PerspectiveCamera&&n.object.isPerspectiveCamera){const o=n.object.position;e.copy(o).sub(n.target);let s=e.length();s*=Math.tan(n.object.fov/2*Math.PI/180),T(2*t*s/i.clientHeight,n.object.matrix),C(2*r*s/i.clientHeight,n.object.matrix)}else i&&n.object instanceof No.OrthographicCamera&&n.object.isOrthographicCamera?(T(t*(n.object.right-n.object.left)/n.object.zoom/i.clientWidth,n.object.matrix),C(r*(n.object.top-n.object.bottom)/n.object.zoom/i.clientHeight,n.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),n.enablePan=!1)}})();function $(e){n.object instanceof No.PerspectiveCamera&&n.object.isPerspectiveCamera?d/=e:n.object instanceof No.OrthographicCamera&&n.object.isOrthographicCamera?(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom*e)),n.object.updateProjectionMatrix(),p=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function P(e){n.object instanceof No.PerspectiveCamera&&n.object.isPerspectiveCamera?d*=e:n.object instanceof No.OrthographicCamera&&n.object.isOrthographicCamera?(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/e)),n.object.updateProjectionMatrix(),p=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function R(e){f.set(e.clientX,e.clientY)}function j(e){b.set(e.clientX,e.clientY)}function N(){if(1==w.length)f.set(w[0].pageX,w[0].pageY);else{const e=.5*(w[0].pageX+w[1].pageX),t=.5*(w[0].pageY+w[1].pageY);f.set(e,t)}}function D(){if(1==w.length)b.set(w[0].pageX,w[0].pageY);else{const e=.5*(w[0].pageX+w[1].pageX),t=.5*(w[0].pageY+w[1].pageY);b.set(e,t)}}function I(){const e=w[0].pageX-w[1].pageX,t=w[0].pageY-w[1].pageY,n=Math.sqrt(e*e+t*t);S.set(0,n)}function L(e){if(1==w.length)m.set(e.pageX,e.pageY);else{const t=Y(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);m.set(n,r)}g.subVectors(m,f).multiplyScalar(n.rotateSpeed);const t=n.domElement;t&&(E(2*Math.PI*g.x/t.clientHeight),A(2*Math.PI*g.y/t.clientHeight)),f.copy(m)}function B(e){if(1==w.length)v.set(e.pageX,e.pageY);else{const t=Y(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);v.set(n,r)}y.subVectors(v,b).multiplyScalar(n.panSpeed),M(y.x,y.y),b.copy(v)}function z(e){const t=Y(e),r=e.pageX-t.x,i=e.pageY-t.y,o=Math.sqrt(r*r+i*i);_.set(0,o),x.set(0,Math.pow(_.y/S.y,n.zoomSpeed)),$(x.y),S.copy(_)}function F(e){if(!1!==n.enabled){var t,r;if(0===w.length)null===(t=n.domElement)||void 0===t||t.ownerDocument.addEventListener("pointermove",U),null===(r=n.domElement)||void 0===r||r.ownerDocument.addEventListener("pointerup",Q);!function(e){w.push(e)}(e),"touch"===e.pointerType?function(e){switch(X(e),w.length){case 1:switch(n.touches.ONE){case No.TOUCH.ROTATE:if(!1===n.enableRotate)return;N(),a=s.TOUCH_ROTATE;break;case No.TOUCH.PAN:if(!1===n.enablePan)return;D(),a=s.TOUCH_PAN;break;default:a=s.NONE}break;case 2:switch(n.touches.TWO){case No.TOUCH.DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;n.enableZoom&&I(),n.enablePan&&D(),a=s.TOUCH_DOLLY_PAN;break;case No.TOUCH.DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;n.enableZoom&&I(),n.enableRotate&&N(),a=s.TOUCH_DOLLY_ROTATE;break;default:a=s.NONE}break;default:a=s.NONE}a!==s.NONE&&n.dispatchEvent(i)}(e):function(e){let t;switch(e.button){case 0:t=n.mouseButtons.LEFT;break;case 1:t=n.mouseButtons.MIDDLE;break;case 2:t=n.mouseButtons.RIGHT;break;default:t=-1}switch(t){case No.MOUSE.DOLLY:if(!1===n.enableZoom)return;!function(e){S.set(e.clientX,e.clientY)}(e),a=s.DOLLY;break;case No.MOUSE.ROTATE:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enablePan)return;j(e),a=s.PAN}else{if(!1===n.enableRotate)return;R(e),a=s.ROTATE}break;case No.MOUSE.PAN:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enableRotate)return;R(e),a=s.ROTATE}else{if(!1===n.enablePan)return;j(e),a=s.PAN}break;default:a=s.NONE}a!==s.NONE&&n.dispatchEvent(i)}(e)}}function U(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){switch(X(e),a){case s.TOUCH_ROTATE:if(!1===n.enableRotate)return;L(e),n.update();break;case s.TOUCH_PAN:if(!1===n.enablePan)return;B(e),n.update();break;case s.TOUCH_DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;!function(e){n.enableZoom&&z(e),n.enablePan&&B(e)}(e),n.update();break;case s.TOUCH_DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;!function(e){n.enableZoom&&z(e),n.enableRotate&&L(e)}(e),n.update();break;default:a=s.NONE}}(e):function(e){if(!1===n.enabled)return;switch(a){case s.ROTATE:if(!1===n.enableRotate)return;!function(e){m.set(e.clientX,e.clientY),g.subVectors(m,f).multiplyScalar(n.rotateSpeed);const t=n.domElement;t&&(E(2*Math.PI*g.x/t.clientHeight),A(2*Math.PI*g.y/t.clientHeight)),f.copy(m),n.update()}(e);break;case s.DOLLY:if(!1===n.enableZoom)return;!function(e){_.set(e.clientX,e.clientY),x.subVectors(_,S),x.y>0?$(O()):x.y<0&&P(O()),S.copy(_),n.update()}(e);break;case s.PAN:if(!1===n.enablePan)return;!function(e){v.set(e.clientX,e.clientY),y.subVectors(v,b).multiplyScalar(n.panSpeed),M(y.x,y.y),b.copy(v),n.update()}(e)}}(e))}function Q(e){var t,r,i;(W(e),0===w.length)&&(null===(t=n.domElement)||void 0===t||t.releasePointerCapture(e.pointerId),null===(r=n.domElement)||void 0===r||r.ownerDocument.removeEventListener("pointermove",U),null===(i=n.domElement)||void 0===i||i.ownerDocument.removeEventListener("pointerup",Q));n.dispatchEvent(o),a=s.NONE}function q(e){W(e)}function G(e){!1===n.enabled||!1===n.enableZoom||a!==s.NONE&&a!==s.ROTATE||(e.preventDefault(),n.dispatchEvent(i),function(e){e.deltaY<0?P(O()):e.deltaY>0&&$(O()),n.update()}(e),n.dispatchEvent(o))}function H(e){!1!==n.enabled&&!1!==n.enablePan&&function(e){let t=!1;switch(e.code){case n.keys.UP:M(0,n.keyPanSpeed),t=!0;break;case n.keys.BOTTOM:M(0,-n.keyPanSpeed),t=!0;break;case n.keys.LEFT:M(n.keyPanSpeed,0),t=!0;break;case n.keys.RIGHT:M(-n.keyPanSpeed,0),t=!0}t&&(e.preventDefault(),n.update())}(e)}function V(e){!1!==n.enabled&&e.preventDefault()}function W(e){delete k[e.pointerId];for(let t=0;t<w.length;t++)if(w[t].pointerId==e.pointerId)return void w.splice(t,1)}function X(e){let t=k[e.pointerId];void 0===t&&(t=new No.Vector2,k[e.pointerId]=t),t.set(e.pageX,e.pageY)}function Y(e){const t=e.pointerId===w[0].pointerId?w[1]:w[0];return k[t.pointerId]}void 0!==t&&this.connect(t),this.update()}}const As=i.forwardRef(({makeDefault:e,camera:t,regress:n,domElement:r,enableDamping:o=!0,onChange:s,onStart:a,onEnd:l,...c},u)=>{const d=Object(_s.m)(e=>e.invalidate),h=Object(_s.m)(e=>e.camera),p=Object(_s.m)(e=>e.gl),f=Object(_s.m)(e=>e.events),m=Object(_s.m)(e=>e.setEvents),g=Object(_s.m)(e=>e.set),b=Object(_s.m)(e=>e.get),v=Object(_s.m)(e=>e.performance),y=t||h,S=r||f.connected||p.domElement,_=i.useMemo(()=>new Es(y),[y]);return Object(_s.a)(()=>{_.enabled&&_.update()},-1),i.useEffect(()=>(_.connect(S),()=>{_.dispose()}),[S,n,_,d]),i.useEffect(()=>{const e=e=>{d(),n&&v.regress(),s&&s(e)},t=e=>{a&&a(e)},r=e=>{l&&l(e)};return _.addEventListener("change",e),_.addEventListener("start",t),_.addEventListener("end",r),()=>{_.removeEventListener("start",t),_.removeEventListener("end",r),_.removeEventListener("change",e)}},[s,a,l,_,d,m]),i.useEffect(()=>{if(e){const e=b().controls;return g({controls:_}),()=>g({controls:e})}},[e,_]),i.createElement("primitive",Object(An.a)({ref:u,object:_,enableDamping:o},c))});var Ts=()=>o.a.createElement(o.a.Fragment,null,o.a.createElement("ambientLight",{intensity:.25}),o.a.createElement("pointLight",{intensity:.35,angle:28,penumbra:2,position:[.418,16.199,.3],castShadow:!0}),o.a.createElement("pointLight",{position:[-16.116,14.37,8.208],intensity:.5,castShadow:!0}),o.a.createElement("pointLight",{position:[-16.109,18.021,-8.207],intensity:.5,castShadow:!0}),o.a.createElement("pointLight",{position:[14.904,12.198,-1.832],intensity:.17,castShadow:!0}),o.a.createElement("pointLight",{position:[-.462,8.89,14.52],intensity:.43,castShadow:!0}),o.a.createElement("pointLight",{position:[3.235,11.486,-12.541],intensity:.2,castShadow:!0}),o.a.createElement("pointLight",{position:[0,-20,0],intensity:.5,castShadow:!0})),Cs={_Eps:1e-5,Vector:function(e,t,n){this.x=e,this.y=t,this.z=n}};Cs.Vector.prototype={length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},normalize:function(){var e=this.length();e<=Cs._Eps||(this.x/=e,this.y/=e,this.z/=e)}},Cs.transpose3x3Matrix=function(e){var t=[[0,0,0],[0,0,0],[0,0,0]];return t[0][0]=e[0][0],t[0][1]=e[1][0],t[0][2]=e[2][0],t[1][0]=e[0][1],t[1][1]=e[1][1],t[1][2]=e[2][1],t[2][0]=e[0][2],t[2][1]=e[1][2],t[2][2]=e[2][2],t},Cs.dot3x3and3x1=function(e,t){var n=[];return n[0]=e[0][0]*t[0]+e[0][1]*t[1]+e[0][2]*t[2],n[1]=e[1][0]*t[0]+e[1][1]*t[1]+e[1][2]*t[2],n[2]=e[2][0]*t[0]+e[2][1]*t[1]+e[2][2]*t[2],n},Cs.multiplyArrayWithScalar=function(e,t){return[e[0]*t,e[1]*t,e[2]*t]},Cs.divideArrayWithScalar=function(e,t){return[e[0]/t,e[1]/t,e[2]/t]},Cs.Defaults={},Cs.Defaults.O=[0,0,0],Cs.Defaults.X=[1,0,0],Cs.Defaults.Y=[0,1,0],Cs.Defaults.Z=[0,0,1],Cs.Defaults.NORTH=Cs.multiplyArrayWithScalar(Cs.Defaults.X,.33),Cs.Defaults.GRAVITY=Cs.Defaults.Z,Cs.clamp=function(e,t,n){return Math.min(n,Math.max(t,e))},Cs.degToRad=function(e){return e instanceof Array?[e[0]*Math.PI/180,e[1]*Math.PI/180,e[2]*Math.PI/180]:e*Math.PI/180},Cs.radToDeg=function(e){return e instanceof Array?[180*e[0]/Math.PI,180*e[1]/Math.PI,180*e[2]/Math.PI]:180*e/Math.PI};var Ms=n(4),$s=n.n(Ms);function Ps(){return 1e3*Date.now()}window.rotatemodel=function(e,t,n){window.mod.rotation.x=e,window.mod.rotation.y=t,window.mod.rotation.z=n};const Rs=new WeakMap;class js extends No.Loader{constructor(e){super(e),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(e){return this.decoderPath=e,this}setDecoderConfig(e){return this.decoderConfig=e,this}setWorkerLimit(e){return this.workerLimit=e,this}load(e,t,n,r){const i=new No.FileLoader(this.manager);i.setPath(this.path),i.setResponseType("arraybuffer"),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials),i.load(e,e=>{const n={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(e,n).then(t).catch(r)},n,r)}decodeDracoFile(e,t,n,r){const i={attributeIDs:n||this.defaultAttributeIDs,attributeTypes:r||this.defaultAttributeTypes,useUniqueIDs:!!n};this.decodeGeometry(e,i).then(t)}decodeGeometry(e,t){for(const e in t.attributeTypes){const n=t.attributeTypes[e];void 0!==n.BYTES_PER_ELEMENT&&(t.attributeTypes[e]=n.name)}const n=JSON.stringify(t);if(Rs.has(e)){const t=Rs.get(e);if(t.key===n)return t.promise;if(0===e.byteLength)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let r;const i=this.workerNextTaskID++,o=e.byteLength,s=this._getWorker(i,o).then(n=>(r=n,new Promise((n,o)=>{r._callbacks[i]={resolve:n,reject:o},r.postMessage({type:"decode",id:i,taskConfig:t,buffer:e},[e])}))).then(e=>this._createGeometry(e.geometry));return s.catch(()=>!0).then(()=>{r&&i&&this._releaseTask(r,i)}),Rs.set(e,{key:n,promise:s}),s}_createGeometry(e){const t=new No.BufferGeometry;e.index&&t.setIndex(new No.BufferAttribute(e.index.array,1));for(let n=0;n<e.attributes.length;n++){const r=e.attributes[n],i=r.name,o=r.array,s=r.itemSize;t.setAttribute(i,new No.BufferAttribute(o,s))}return t}_loadLibrary(e,t){const n=new No.FileLoader(this.manager);return n.setPath(this.decoderPath),n.setResponseType(t),n.setWithCredentials(this.withCredentials),new Promise((t,r)=>{n.load(e,t,void 0,r)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e="object"!=typeof WebAssembly||"js"===this.decoderConfig.type,t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then(t=>{const n=t[0];e||(this.decoderConfig.wasmBinary=t[1]);const r=Ns.toString(),i=["/* draco decoder */",n,"","/* worker */",r.substring(r.indexOf("{")+1,r.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([i]))}),this.decoderPending}_getWorker(e,t){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){const e=new Worker(this.workerSourceURL);e._callbacks={},e._taskCosts={},e._taskLoad=0,e.postMessage({type:"init",decoderConfig:this.decoderConfig}),e.onmessage=function(t){const n=t.data;switch(n.type){case"decode":e._callbacks[n.id].resolve(n);break;case"error":e._callbacks[n.id].reject(n);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+n.type+'"')}},this.workerPool.push(e)}else this.workerPool.sort((function(e,t){return e._taskLoad>t._taskLoad?-1:1}));const n=this.workerPool[this.workerPool.length-1];return n._taskCosts[e]=t,n._taskLoad+=t,n})}_releaseTask(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]}debug(){console.log("Task load: ",this.workerPool.map(e=>e._taskLoad))}dispose(){for(let e=0;e<this.workerPool.length;++e)this.workerPool[e].terminate();return this.workerPool.length=0,this}}function Ns(){let e,t;function n(e,t,n,r,i,o){const s=o.num_components(),a=n.num_points()*s,l=a*i.BYTES_PER_ELEMENT,c=function(e,t){switch(t){case Float32Array:return e.DT_FLOAT32;case Int8Array:return e.DT_INT8;case Int16Array:return e.DT_INT16;case Int32Array:return e.DT_INT32;case Uint8Array:return e.DT_UINT8;case Uint16Array:return e.DT_UINT16;case Uint32Array:return e.DT_UINT32}}(e,i),u=e._malloc(l);t.GetAttributeDataArrayForAllPoints(n,o,c,l,u);const d=new i(e.HEAPF32.buffer,u,a).slice();return e._free(u),{name:r,array:d,itemSize:s}}onmessage=function(r){const i=r.data;switch(i.type){case"init":e=i.decoderConfig,t=new Promise((function(t){e.onModuleLoaded=function(e){t({draco:e})},DracoDecoderModule(e)}));break;case"decode":const r=i.buffer,o=i.taskConfig;t.then(e=>{const t=e.draco,s=new t.Decoder,a=new t.DecoderBuffer;a.Init(new Int8Array(r),r.byteLength);try{const e=function(e,t,r,i){const o=i.attributeIDs,s=i.attributeTypes;let a,l;const c=t.GetEncodedGeometryType(r);if(c===e.TRIANGULAR_MESH)a=new e.Mesh,l=t.DecodeBufferToMesh(r,a);else{if(c!==e.POINT_CLOUD)throw new Error("THREE.DRACOLoader: Unexpected geometry type.");a=new e.PointCloud,l=t.DecodeBufferToPointCloud(r,a)}if(!l.ok()||0===a.ptr)throw new Error("THREE.DRACOLoader: Decoding failed: "+l.error_msg());const u={index:null,attributes:[]};for(const r in o){const l=self[s[r]];let c,d;if(i.useUniqueIDs)d=o[r],c=t.GetAttributeByUniqueId(a,d);else{if(d=t.GetAttributeId(a,e[o[r]]),-1===d)continue;c=t.GetAttribute(a,d)}u.attributes.push(n(e,t,a,r,l,c))}c===e.TRIANGULAR_MESH&&(u.index=function(e,t,n){const r=3*n.num_faces(),i=4*r,o=e._malloc(i);t.GetTrianglesUInt32Array(n,i,o);const s=new Uint32Array(e.HEAPF32.buffer,o,r).slice();return e._free(o),{array:s,itemSize:1}}(e,t,a));return e.destroy(a),u}(t,s,a,o),r=e.attributes.map(e=>e.array.buffer);e.index&&r.push(e.index.array.buffer),self.postMessage({type:"decode",id:i.id,geometry:e},r)}catch(e){console.error(e),self.postMessage({type:"error",id:i.id,error:e.message})}finally{t.destroy(a),t.destroy(s)}})}}}let Ds;const Is=()=>{if(Ds)return Ds;const e=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),t=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]);if("object"!=typeof WebAssembly)return{supported:!1};let n,r="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE6HYy86BBAKCFJAICIJAYJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCGJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCEJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCIJAYAmJHY2BBAI2BFHmCKrHPAPCE6HPy86BBAKCLJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCKJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCOJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCNJAYAmJHY2BBAI2BGHmCKrHPAPCE6HPy86BBAKCVJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCcJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCMJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCSJAYAmJHm2BBAI2BEHICKrHYAYCE6HYy86BBAKCQJAmAYJHm2BBAICIrCEZHYAYCE6HYy86BBAKCfJAmAYJHm2BBAICGrCEZHYAYCE6HYy86BBAKCbJAmAYJHK2BBAICEZHIAICE6HIy86BBAKAIJRISGMAKAI2BNAI2BBHmCIrHYAYCb6HYy86BBAKCFJAICNJAYJHY2BBAmCbZHmAmCb6Hmy86BBAKCGJAYAmJHm2BBAI2BFHYCIrHPAPCb6HPy86BBAKCEJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCIJAmAYJHm2BBAI2BGHYCIrHPAPCb6HPy86BBAKCLJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCKJAmAYJHm2BBAI2BEHYCIrHPAPCb6HPy86BBAKCOJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCNJAmAYJHm2BBAI2BIHYCIrHPAPCb6HPy86BBAKCVJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCcJAmAYJHm2BBAI2BLHYCIrHPAPCb6HPy86BBAKCMJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCSJAmAYJHm2BBAI2BKHYCIrHPAPCb6HPy86BBAKCQJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCfJAmAYJHm2BBAI2BOHICIrHYAYCb6HYy86BBAKCbJAmAYJHK2BBAICbZHIAICb6HIy86BBAKAIJRISFMAKAI8pBB83BBAKCNJAICNJ8pBB83BBAICTJRIMAtCGJRtAECTJHEAS9JQBMMGXAIQBCBRISEMGXAM9FQBANAbJ2BBRtCBRKAfREEXAEANCU/CBJAKJ2BBHTCFrCBATCFZl9zAtJHt86BBAEAGJREAKCFJHKAM9HQBMMAfCFJRfAIRTAbCFJHbAG9HQBMMABAcAG9sJANCUGJAMAG9sTkUUUBpANANCUGJAMCaJAG9sJAGTkUUUBpMAMCBAIyAcJRcAIQBMC9+RKSFMCBC99AOAIlAGCAAGCA9Ly6yRKMALCU/EBJ8kUUUUBAKM+OmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUFT+JUUUBpALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM+lLKFaF99GaG99FaG99GXGXAGCI9HQBAF9FQFEXGXGX9DBBB8/9DBBB+/ABCGJHG1BB+yAB1BBHE+yHI+L+TABCFJHL1BBHK+yHO+L+THN9DBBBB9gHVyAN9DBB/+hANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE86BBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG86BBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG86BBABCIJRBAFCaJHFQBSGMMAF9FQBEXGXGX9DBBB8/9DBBB+/ABCIJHG8uFB+yAB8uFBHE+yHI+L+TABCGJHL8uFBHK+yHO+L+THN9DBBBB9gHVyAN9DB/+g6ANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE87FBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG87FBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG87FBABCNJRBAFCaJHFQBMMM/SEIEaE99EaF99GXAF9FQBCBREABRIEXGXGX9D/zI818/AICKJ8uFBHLCEq+y+VHKAI8uFB+y+UHO9DB/+g6+U9DBBB8/9DBBB+/AO9DBBBB9gy+SHN+L9DBBB9P9d9FQBAN+oRVSFMCUUUU94RVMAICIJ8uFBRcAICGJ8uFBRMABALCFJCEZAEqCFWJAV87FBGXGXAKAM+y+UHN9DB/+g6+U9DBBB8/9DBBB+/AN9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRMSFMCUUUU94RMMABALCGJCEZAEqCFWJAM87FBGXGXAKAc+y+UHK9DB/+g6+U9DBBB8/9DBBB+/AK9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRcSFMCUUUU94RcMABALCaJCEZAEqCFWJAc87FBGXGX9DBBU8/AOAO+U+TANAN+U+TAKAK+U+THO9DBBBBAO9DBBBB9gy+R9DB/+g6+U9DBBB8/+SHO+L9DBBB9P9d9FQBAO+oRcSFMCUUUU94RcMABALCEZAEqCFWJAc87FBAICNJRIAECIJREAFCaJHFQBMMM9JBGXAGCGrAF9sHF9FQBEXABAB8oGBHGCNWCN91+yAGCi91CnWCUUU/8EJ+++U84GBABCIJRBAFCaJHFQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEM/lFFFaGXGXAFABqCEZ9FQBABRESFMGXGXAGCT9PQBABRESFMABREEXAEAF8oGBjGBAECIJAFCIJ8oGBjGBAECNJAFCNJ8oGBjGBAECSJAFCSJ8oGBjGBAECTJREAFCTJRFAGC9wJHGCb9LQBMMAGCI9JQBEXAEAF8oGBjGBAFCIJRFAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF2BB86BBAECFJREAFCFJRFAGCaJHGQBMMABMoFFGaGXGXABCEZ9FQBABRESFMAFCgFZC+BwsN9sRIGXGXAGCT9PQBABRESFMABREEXAEAIjGBAECSJAIjGBAECNJAIjGBAECIJAIjGBAECTJREAGC9wJHGCb9LQBMMAGCI9JQBEXAEAIjGBAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF86BBAECFJREAGCaJHGQBMMABMMMFBCUNMIT9kBB";WebAssembly.validate(e)&&(r="B9h9z9tFBBBFiI9gBB9gLaaaaaFa9gEaaaB9gFaFaEMcBBFBFFGGGEILF9wFFFLEFBFKNFaFCx/aFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBG8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBIy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBKi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBOn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBNI9z9iqlBVc+N9IcIBTEM9+FLa8jUUUUBCTlRBCBRFEXCBRGCBREEXABCNJAGJAECUaAFAGrCFZHIy86BBAEAIJREAGCFJHGCN9HQBMAFCx+YUUBJAE86BBAFCEWCxkUUBJAB8pEN83EBAFCFJHFCUG9HQBMMk8lLbaE97F9+FaL978jUUUUBCU/KBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAG/8cBBCUoBAG9uC/wgBZHKCUGAKCUG9JyRNAECFJRKCBRVGXEXAVAF9PQFANAFAVlAVANJAF9JyRcGXGXAG9FQBAcCbJHIC9wZHMCE9sRSAMCFWRQAICIrCEJCGrRfCBRbEXAKRTCBRtGXEXGXAOATlAf9PQBCBRKSLMALCU/CBJAtAM9sJRmATAfJRKCBREGXAMCoB9JQBAOAKlC/gB9JQBCBRIEXAmAIJREGXGXGXGXGXATAICKrJ2BBHYCEZfIBFGEBMAECBDtDMIBSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIBAKCTJRKMGXGXGXGXGXAYCGrCEZfIBFGEBMAECBDtDMITSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMITAKCTJRKMGXGXGXGXGXAYCIrCEZfIBFGEBMAECBDtDMIASEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIAAKCTJRKMGXGXGXGXGXAYCKrfIBFGEBMAECBDtDMI8wSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCIJAeDeBJAYCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCNJAeDeBJAYCx+YUUBJ2BBJRKSFMAEAKDBBBDMI8wAKCTJRKMAICoBJREAICUFJAM9LQFAERIAOAKlC/fB9LQBMMGXAEAM9PQBAECErRIEXGXAOAKlCi9PQBCBRKSOMAmAEJRYGXGXGXGXGXATAECKrJ2BBAICKZrCEZfIBFGEBMAYCBDtDMIBSEMAYAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAYAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAYAKDBBBDMIBAKCTJRKMAICGJRIAECTJHEAM9JQBMMGXAK9FQBAKRTAtCFJHtCI6QGSFMMCBRKSEMGXAM9FQBALCUGJAbJREALAbJDBGBReCBRYEXAEALCU/CBJAYJHIDBIBHdCFD9tAdCFDbHPD9OD9hD9RHdAIAMJDBIBH8ZCFD9tA8ZAPD9OD9hD9RH8ZDQBTFtGmEYIPLdKeOnHpAIAQJDBIBHyCFD9tAyAPD9OD9hD9RHyAIASJDBIBH8cCFD9tA8cAPD9OD9hD9RH8cDQBTFtGmEYIPLdKeOnH8dDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGEAeD9uHeDyBjGBAEAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeApA8dDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNiV8ZcpMyS8cQ8df8eb8fHdAyA8cDQNiV8ZcpMyS8cQ8df8eb8fH8ZDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJREAYCTJHYAM9JQBMMAbCIJHbAG9JQBMMABAVAG9sJALCUGJAcAG9s/8cBBALALCUGJAcCaJAG9sJAG/8cBBMAcCBAKyAVJRVAKQBMC9+RKSFMCBC99AOAKlAGCAAGCA9Ly6yRKMALCU/KBJ8kUUUUBAKMNBT+BUUUBM+KmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUF/8MBALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM/dLEK97FaF97GXGXAGCI9HQBAF9FQFCBRGEXABABDBBBHECiD+rFCiD+sFD/6FHIAECND+rFCiD+sFD/6FAID/gFAECTD+rFCiD+sFD/6FHLD/gFD/kFD/lFHKCBDtD+2FHOAICUUUU94DtHND9OD9RD/kFHI9DBB/+hDYAIAID/mFAKAKD/mFALAOALAND9OD9RD/kFHIAID/mFD/kFD/kFD/jFD/nFHLD/mF9DBBX9LDYHOD/kFCgFDtD9OAECUUU94DtD9OD9QAIALD/mFAOD/kFCND+rFCU/+EDtD9OD9QAKALD/mFAOD/kFCTD+rFCUU/8ODtD9OD9QDMBBABCTJRBAGCIJHGAF9JQBSGMMAF9FQBCBRGEXABCTJHVAVDBBBHECBDtHOCUU98D8cFCUU98D8cEHND9OABDBBBHKAEDQILKOSQfbPden8c8d8e8fCggFDtD9OD/6FAKAEDQBFGENVcMTtmYi8ZpyHECTD+sFD/6FHID/gFAECTD+rFCTD+sFD/6FHLD/gFD/kFD/lFHE9DB/+g6DYALAEAOD+2FHOALCUUUU94DtHcD9OD9RD/kFHLALD/mFAEAED/mFAIAOAIAcD9OD9RD/kFHEAED/mFD/kFD/kFD/jFD/nFHID/mF9DBBX9LDYHOD/kFCTD+rFALAID/mFAOD/kFCggEDtD9OD9QHLAEAID/mFAOD/kFCaDbCBDnGCBDnECBDnKCBDnOCBDncCBDnMCBDnfCBDnbD9OHEDQNVi8ZcMpySQ8c8dfb8e8fD9QDMBBABAKAND9OALAEDQBFTtGEmYILPdKOenD9QDMBBABCAJRBAGCIJHGAF9JQBMMM/hEIGaF97FaL978jUUUUBCTlREGXAF9FQBCBRIEXAEABDBBBHLABCTJHKDBBBHODQILKOSQfbPden8c8d8e8fHNCTD+sFHVCID+rFDMIBAB9DBBU8/DY9D/zI818/DYAVCEDtD9QD/6FD/nFHVALAODQBFGENVcMTtmYi8ZpyHLCTD+rFCTD+sFD/6FD/mFHOAOD/mFAVALCTD+sFD/6FD/mFHcAcD/mFAVANCTD+rFCTD+sFD/6FD/mFHNAND/mFD/kFD/kFD/lFCBDtD+4FD/jF9DB/+g6DYHVD/mF9DBBX9LDYHLD/kFCggEDtHMD9OAcAVD/mFALD/kFCTD+rFD9QHcANAVD/mFALD/kFCTD+rFAOAVD/mFALD/kFAMD9OD9QHVDQBFTtGEmYILPdKOenHLD8dBAEDBIBDyB+t+J83EBABCNJALD8dFAEDBIBDyF+t+J83EBAKAcAVDQNVi8ZcMpySQ8c8dfb8e8fHVD8dBAEDBIBDyG+t+J83EBABCiJAVD8dFAEDBIBDyE+t+J83EBABCAJRBAICIJHIAF9JQBMMM9jFF97GXAGCGrAF9sHG9FQBCBRFEXABABDBBBHECND+rFCND+sFD/6FAECiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBABCTJRBAFCIJHFAG9JQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB");const i=WebAssembly.instantiate(function(e){const n=new Uint8Array(e.length);for(let t=0;t<e.length;++t){const r=e.charCodeAt(t);n[t]=r>96?r-71:r>64?r-65:r>47?r+4:r>46?63:62}let r=0;for(let i=0;i<e.length;++i)n[r++]=n[i]<60?t[n[i]]:64*(n[i]-60)+n[++i];return n.buffer.slice(0,r)}(r),{}).then(e=>{n=e.instance,n.exports.__wasm_call_ctors()});function o(e,t,r,i,o,s){const a=n.exports.sbrk,l=r+3&-4,c=a(l*i),u=a(o.length),d=new Uint8Array(n.exports.memory.buffer);d.set(o,u);const h=e(c,r,i,u,o.length);if(0===h&&s&&s(c,l,i),t.set(d.subarray(c,c+r*i)),a(c-a(0)),0!==h)throw new Error("Malformed buffer data: "+h)}const s={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},a={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return Ds={ready:i,supported:!0,decodeVertexBuffer(e,t,r,i,a){o(n.exports.meshopt_decodeVertexBuffer,e,t,r,i,n.exports[s[a]])},decodeIndexBuffer(e,t,r,i){o(n.exports.meshopt_decodeIndexBuffer,e,t,r,i)},decodeIndexSequence(e,t,r,i){o(n.exports.meshopt_decodeIndexSequence,e,t,r,i)},decodeGltfBuffer(e,t,r,i,l,c){o(n.exports[a[l]],e,t,r,i,n.exports[s[c]])}},Ds};function Ls(e,t){if(t===No.TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),e;if(t===No.TriangleFanDrawMode||t===No.TriangleStripDrawMode){let n=e.getIndex();if(null===n){const t=[],r=e.getAttribute("position");if(void 0===r)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e;for(let e=0;e<r.count;e++)t.push(e);e.setIndex(t),n=e.getIndex()}const r=n.count-2,i=[];if(n)if(t===No.TriangleFanDrawMode)for(let e=1;e<=r;e++)i.push(n.getX(0)),i.push(n.getX(e)),i.push(n.getX(e+1));else for(let e=0;e<r;e++)e%2==0?(i.push(n.getX(e)),i.push(n.getX(e+1)),i.push(n.getX(e+2))):(i.push(n.getX(e+2)),i.push(n.getX(e+1)),i.push(n.getX(e)));i.length/3!==r&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const o=e.clone();return o.setIndex(i),o.clearGroups(),o}return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",t),e}class Bs extends No.Loader{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register((function(e){return new Gs(e)})),this.register((function(e){return new Js(e)})),this.register((function(e){return new Ks(e)})),this.register((function(e){return new ea(e)})),this.register((function(e){return new Vs(e)})),this.register((function(e){return new Ws(e)})),this.register((function(e){return new Xs(e)})),this.register((function(e){return new Ys(e)})),this.register((function(e){return new qs(e)})),this.register((function(e){return new Zs(e)})),this.register((function(e){return new Hs(e)})),this.register((function(e){return new Us(e)})),this.register((function(e){return new ta(e)})),this.register((function(e){return new na(e)}))}load(e,t,n,r){const i=this;let o;o=""!==this.resourcePath?this.resourcePath:""!==this.path?this.path:No.LoaderUtils.extractUrlBase(e),this.manager.itemStart(e);const s=function(t){r?r(t):console.error(t),i.manager.itemError(e),i.manager.itemEnd(e)},a=new No.FileLoader(this.manager);a.setPath(this.path),a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,(function(n){try{i.parse(n,o,(function(n){t(n),i.manager.itemEnd(e)}),s)}catch(e){s(e)}}),n,s)}setDRACOLoader(e){return this.dracoLoader=e,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return-1===this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.push(e),this}unregister(e){return-1!==this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,n,r){let i;const o={},s={},a=new TextDecoder;if("string"==typeof e)i=JSON.parse(e);else if(e instanceof ArrayBuffer){if(a.decode(new Uint8Array(e,0,4))===ra){try{o[Fs.KHR_BINARY_GLTF]=new sa(e)}catch(e){return void(r&&r(e))}i=JSON.parse(o[Fs.KHR_BINARY_GLTF].content)}else i=JSON.parse(a.decode(e))}else i=e;if(void 0===i.asset||i.asset.version[0]<2)return void(r&&r(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported.")));const l=new $a(i,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});l.fileLoader.setRequestHeader(this.requestHeader);for(let e=0;e<this.pluginCallbacks.length;e++){const t=this.pluginCallbacks[e](l);s[t.name]=t,o[t.name]=!0}if(i.extensionsUsed)for(let e=0;e<i.extensionsUsed.length;++e){const t=i.extensionsUsed[e],n=i.extensionsRequired||[];switch(t){case Fs.KHR_MATERIALS_UNLIT:o[t]=new Qs;break;case Fs.KHR_DRACO_MESH_COMPRESSION:o[t]=new aa(i,this.dracoLoader);break;case Fs.KHR_TEXTURE_TRANSFORM:o[t]=new la;break;case Fs.KHR_MESH_QUANTIZATION:o[t]=new ca;break;default:n.indexOf(t)>=0&&void 0===s[t]&&console.warn('THREE.GLTFLoader: Unknown extension "'+t+'".')}}l.setExtensions(o),l.setPlugins(s),l.parse(n,r)}parseAsync(e,t){const n=this;return new Promise((function(r,i){n.parse(e,t,r,i)}))}}function zs(){let e={};return{get:function(t){return e[t]},add:function(t,n){e[t]=n},remove:function(t){delete e[t]},removeAll:function(){e={}}}}const Fs={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class Us{constructor(e){this.parser=e,this.name=Fs.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let n=0,r=t.length;n<r;n++){const r=t[n];r.extensions&&r.extensions[this.name]&&void 0!==r.extensions[this.name].light&&e._addNodeRef(this.cache,r.extensions[this.name].light)}}_loadLight(e){const t=this.parser,n="light:"+e;let r=t.cache.get(n);if(r)return r;const i=t.json,o=((i.extensions&&i.extensions[this.name]||{}).lights||[])[e];let s;const a=new No.Color(16777215);void 0!==o.color&&a.fromArray(o.color);const l=void 0!==o.range?o.range:0;switch(o.type){case"directional":s=new No.DirectionalLight(a),s.target.position.set(0,0,-1),s.add(s.target);break;case"point":s=new No.PointLight(a),s.distance=l;break;case"spot":s=new No.SpotLight(a),s.distance=l,o.spot=o.spot||{},o.spot.innerConeAngle=void 0!==o.spot.innerConeAngle?o.spot.innerConeAngle:0,o.spot.outerConeAngle=void 0!==o.spot.outerConeAngle?o.spot.outerConeAngle:Math.PI/4,s.angle=o.spot.outerConeAngle,s.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,s.target.position.set(0,0,-1),s.add(s.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+o.type)}return s.position.set(0,0,0),s.decay=2,Oa(s,o),void 0!==o.intensity&&(s.intensity=o.intensity),s.name=t.createUniqueName(o.name||"light_"+e),r=Promise.resolve(s),t.cache.add(n,r),r}getDependency(e,t){if("light"===e)return this._loadLight(t)}createNodeAttachment(e){const t=this,n=this.parser,r=n.json.nodes[e],i=(r.extensions&&r.extensions[this.name]||{}).light;return void 0===i?null:this._loadLight(i).then((function(e){return n._getNodeRef(t.cache,i,e)}))}}class Qs{constructor(){this.name=Fs.KHR_MATERIALS_UNLIT}getMaterialType(){return No.MeshBasicMaterial}extendParams(e,t,n){const r=[];e.color=new No.Color(1,1,1),e.opacity=1;const i=t.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){const t=i.baseColorFactor;e.color.fromArray(t),e.opacity=t[3]}void 0!==i.baseColorTexture&&r.push(n.assignTexture(e,"map",i.baseColorTexture,No.sRGBEncoding))}return Promise.all(r)}}class qs{constructor(e){this.parser=e,this.name=Fs.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const n=this.parser.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const r=n.extensions[this.name].emissiveStrength;return void 0!==r&&(t.emissiveIntensity=r),Promise.resolve()}}class Gs{constructor(e){this.parser=e,this.name=Fs.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?No.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],o=r.extensions[this.name];if(void 0!==o.clearcoatFactor&&(t.clearcoat=o.clearcoatFactor),void 0!==o.clearcoatTexture&&i.push(n.assignTexture(t,"clearcoatMap",o.clearcoatTexture)),void 0!==o.clearcoatRoughnessFactor&&(t.clearcoatRoughness=o.clearcoatRoughnessFactor),void 0!==o.clearcoatRoughnessTexture&&i.push(n.assignTexture(t,"clearcoatRoughnessMap",o.clearcoatRoughnessTexture)),void 0!==o.clearcoatNormalTexture&&(i.push(n.assignTexture(t,"clearcoatNormalMap",o.clearcoatNormalTexture)),void 0!==o.clearcoatNormalTexture.scale)){const e=o.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new No.Vector2(e,e)}return Promise.all(i)}}class Hs{constructor(e){this.parser=e,this.name=Fs.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?No.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],o=r.extensions[this.name];return void 0!==o.iridescenceFactor&&(t.iridescence=o.iridescenceFactor),void 0!==o.iridescenceTexture&&i.push(n.assignTexture(t,"iridescenceMap",o.iridescenceTexture)),void 0!==o.iridescenceIor&&(t.iridescenceIOR=o.iridescenceIor),void 0===t.iridescenceThicknessRange&&(t.iridescenceThicknessRange=[100,400]),void 0!==o.iridescenceThicknessMinimum&&(t.iridescenceThicknessRange[0]=o.iridescenceThicknessMinimum),void 0!==o.iridescenceThicknessMaximum&&(t.iridescenceThicknessRange[1]=o.iridescenceThicknessMaximum),void 0!==o.iridescenceThicknessTexture&&i.push(n.assignTexture(t,"iridescenceThicknessMap",o.iridescenceThicknessTexture)),Promise.all(i)}}class Vs{constructor(e){this.parser=e,this.name=Fs.KHR_MATERIALS_SHEEN}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?No.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[];t.sheenColor=new No.Color(0,0,0),t.sheenRoughness=0,t.sheen=1;const o=r.extensions[this.name];return void 0!==o.sheenColorFactor&&t.sheenColor.fromArray(o.sheenColorFactor),void 0!==o.sheenRoughnessFactor&&(t.sheenRoughness=o.sheenRoughnessFactor),void 0!==o.sheenColorTexture&&i.push(n.assignTexture(t,"sheenColorMap",o.sheenColorTexture,No.sRGBEncoding)),void 0!==o.sheenRoughnessTexture&&i.push(n.assignTexture(t,"sheenRoughnessMap",o.sheenRoughnessTexture)),Promise.all(i)}}class Ws{constructor(e){this.parser=e,this.name=Fs.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?No.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],o=r.extensions[this.name];return void 0!==o.transmissionFactor&&(t.transmission=o.transmissionFactor),void 0!==o.transmissionTexture&&i.push(n.assignTexture(t,"transmissionMap",o.transmissionTexture)),Promise.all(i)}}class Xs{constructor(e){this.parser=e,this.name=Fs.KHR_MATERIALS_VOLUME}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?No.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],o=r.extensions[this.name];t.thickness=void 0!==o.thicknessFactor?o.thicknessFactor:0,void 0!==o.thicknessTexture&&i.push(n.assignTexture(t,"thicknessMap",o.thicknessTexture)),t.attenuationDistance=o.attenuationDistance||1/0;const s=o.attenuationColor||[1,1,1];return t.attenuationColor=new No.Color(s[0],s[1],s[2]),Promise.all(i)}}class Ys{constructor(e){this.parser=e,this.name=Fs.KHR_MATERIALS_IOR}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?No.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const n=this.parser.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const r=n.extensions[this.name];return t.ior=void 0!==r.ior?r.ior:1.5,Promise.resolve()}}class Zs{constructor(e){this.parser=e,this.name=Fs.KHR_MATERIALS_SPECULAR}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?No.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],o=r.extensions[this.name];t.specularIntensity=void 0!==o.specularFactor?o.specularFactor:1,void 0!==o.specularTexture&&i.push(n.assignTexture(t,"specularIntensityMap",o.specularTexture));const s=o.specularColorFactor||[1,1,1];return t.specularColor=new No.Color(s[0],s[1],s[2]),void 0!==o.specularColorTexture&&i.push(n.assignTexture(t,"specularColorMap",o.specularColorTexture,No.sRGBEncoding)),Promise.all(i)}}class Js{constructor(e){this.parser=e,this.name=Fs.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,n=t.json,r=n.textures[e];if(!r.extensions||!r.extensions[this.name])return null;const i=r.extensions[this.name],o=t.options.ktx2Loader;if(!o){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,i.source,o)}}class Ks{constructor(e){this.parser=e,this.name=Fs.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,r=n.json,i=r.textures[e];if(!i.extensions||!i.extensions[t])return null;const o=i.extensions[t],s=r.images[o.source];let a=n.textureLoader;if(s.uri){const e=n.options.manager.getHandler(s.uri);null!==e&&(a=e)}return this.detectSupport().then((function(i){if(i)return n.loadTextureImage(e,o.source,a);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return n.loadTexture(e)}))}detectSupport(){return this.isSupported||(this.isSupported=new Promise((function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(1===t.height)}}))),this.isSupported}}class ea{constructor(e){this.parser=e,this.name=Fs.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,r=n.json,i=r.textures[e];if(!i.extensions||!i.extensions[t])return null;const o=i.extensions[t],s=r.images[o.source];let a=n.textureLoader;if(s.uri){const e=n.options.manager.getHandler(s.uri);null!==e&&(a=e)}return this.detectSupport().then((function(i){if(i)return n.loadTextureImage(e,o.source,a);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return n.loadTexture(e)}))}detectSupport(){return this.isSupported||(this.isSupported=new Promise((function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(1===t.height)}}))),this.isSupported}}class ta{constructor(e){this.name=Fs.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){const e=n.extensions[this.name],r=this.parser.getDependency("buffer",e.buffer),i=this.parser.options.meshoptDecoder;if(!i||!i.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return r.then((function(t){const n=e.byteOffset||0,r=e.byteLength||0,o=e.count,s=e.byteStride,a=new Uint8Array(t,n,r);return i.decodeGltfBufferAsync?i.decodeGltfBufferAsync(o,s,a,e.mode,e.filter).then((function(e){return e.buffer})):i.ready.then((function(){const t=new ArrayBuffer(o*s);return i.decodeGltfBuffer(new Uint8Array(t),o,s,a,e.mode,e.filter),t}))}))}return null}}class na{constructor(e){this.name=Fs.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,n=t.nodes[e];if(!n.extensions||!n.extensions[this.name]||void 0===n.mesh)return null;const r=t.meshes[n.mesh];for(const e of r.primitives)if(e.mode!==pa.TRIANGLES&&e.mode!==pa.TRIANGLE_STRIP&&e.mode!==pa.TRIANGLE_FAN&&void 0!==e.mode)return null;const i=n.extensions[this.name].attributes,o=[],s={};for(const e in i)o.push(this.parser.getDependency("accessor",i[e]).then(t=>(s[e]=t,s[e])));return o.length<1?null:(o.push(this.parser.createNodeMesh(e)),Promise.all(o).then(e=>{const t=e.pop(),n=t.isGroup?t.children:[t],r=e[0].count,i=[];for(const e of n){const t=new No.Matrix4,n=new No.Vector3,o=new No.Quaternion,a=new No.Vector3(1,1,1),l=new No.InstancedMesh(e.geometry,e.material,r);for(let e=0;e<r;e++)s.TRANSLATION&&n.fromBufferAttribute(s.TRANSLATION,e),s.ROTATION&&o.fromBufferAttribute(s.ROTATION,e),s.SCALE&&a.fromBufferAttribute(s.SCALE,e),l.setMatrixAt(e,t.compose(n,o,a));for(const t in s)"TRANSLATION"!==t&&"ROTATION"!==t&&"SCALE"!==t&&e.geometry.setAttribute(t,s[t]);No.Object3D.prototype.copy.call(l,e),this.parser.assignFinalMaterial(l),i.push(l)}return t.isGroup?(t.clear(),t.add(...i),t):i[0]}))}}const ra="glTF",ia=1313821514,oa=5130562;class sa{constructor(e){this.name=Fs.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,12),n=new TextDecoder;if(this.header={magic:n.decode(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==ra)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const r=this.header.length-12,i=new DataView(e,12);let o=0;for(;o<r;){const t=i.getUint32(o,!0);o+=4;const r=i.getUint32(o,!0);if(o+=4,r===ia){const r=new Uint8Array(e,12+o,t);this.content=n.decode(r)}else if(r===oa){const n=12+o;this.body=e.slice(n,n+t)}o+=t}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class aa{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=Fs.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const n=this.json,r=this.dracoLoader,i=e.extensions[this.name].bufferView,o=e.extensions[this.name].attributes,s={},a={},l={};for(const e in o){const t=va[e]||e.toLowerCase();s[t]=o[e]}for(const t in e.attributes){const r=va[t]||t.toLowerCase();if(void 0!==o[t]){const i=n.accessors[e.attributes[t]],o=fa[i.componentType];l[r]=o.name,a[r]=!0===i.normalized}}return t.getDependency("bufferView",i).then((function(e){return new Promise((function(t){r.decodeDracoFile(e,(function(e){for(const t in e.attributes){const n=e.attributes[t],r=a[t];void 0!==r&&(n.normalized=r)}t(e)}),s,l)}))}))}}class la{constructor(){this.name=Fs.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return void 0!==t.texCoord&&t.texCoord!==e.channel||void 0!==t.offset||void 0!==t.rotation||void 0!==t.scale?(e=e.clone(),void 0!==t.texCoord&&(e.channel=t.texCoord),void 0!==t.offset&&e.offset.fromArray(t.offset),void 0!==t.rotation&&(e.rotation=t.rotation),void 0!==t.scale&&e.repeat.fromArray(t.scale),e.needsUpdate=!0,e):e}}class ca{constructor(){this.name=Fs.KHR_MESH_QUANTIZATION}}class ua extends No.Interpolant{constructor(e,t,n,r){super(e,t,n,r)}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r*3+r;for(let e=0;e!==r;e++)t[e]=n[i+e];return t}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,s=this.valueSize,a=2*s,l=3*s,c=r-t,u=(n-t)/c,d=u*u,h=d*u,p=e*l,f=p-l,m=-2*h+3*d,g=h-d,b=1-m,v=g-d+u;for(let e=0;e!==s;e++){const t=o[f+e+s],n=o[f+e+a]*c,r=o[p+e+s],l=o[p+e]*c;i[e]=b*t+v*n+m*r+g*l}return i}}const da=new No.Quaternion;class ha extends ua{interpolate_(e,t,n,r){const i=super.interpolate_(e,t,n,r);return da.fromArray(i).normalize().toArray(i),i}}const pa={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},fa={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},ma={9728:No.NearestFilter,9729:No.LinearFilter,9984:No.NearestMipmapNearestFilter,9985:No.LinearMipmapNearestFilter,9986:No.NearestMipmapLinearFilter,9987:No.LinearMipmapLinearFilter},ga={33071:No.ClampToEdgeWrapping,33648:No.MirroredRepeatWrapping,10497:No.RepeatWrapping},ba={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},va={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",...No.REVISION.replace(/\D+/g,"")>=152?{TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3"}:{TEXCOORD_0:"uv",TEXCOORD_1:"uv2"},COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},ya={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Sa={CUBICSPLINE:void 0,LINEAR:No.InterpolateLinear,STEP:No.InterpolateDiscrete},_a="OPAQUE",xa="MASK",wa="BLEND";function ka(e,t,n){for(const r in n.extensions)void 0===e[r]&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[r]=n.extensions[r])}function Oa(e,t){void 0!==t.extras&&("object"==typeof t.extras?Object.assign(e.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function Ea(e,t){if(e.updateMorphTargets(),void 0!==t.weights)for(let n=0,r=t.weights.length;n<r;n++)e.morphTargetInfluences[n]=t.weights[n];if(t.extras&&Array.isArray(t.extras.targetNames)){const n=t.extras.targetNames;if(e.morphTargetInfluences.length===n.length){e.morphTargetDictionary={};for(let t=0,r=n.length;t<r;t++)e.morphTargetDictionary[n[t]]=t}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function Aa(e){const t=e.extensions&&e.extensions[Fs.KHR_DRACO_MESH_COMPRESSION];let n;return n=t?"draco:"+t.bufferView+":"+t.indices+":"+Ta(t.attributes):e.indices+":"+Ta(e.attributes)+":"+e.mode,n}function Ta(e){let t="";const n=Object.keys(e).sort();for(let r=0,i=n.length;r<i;r++)t+=n[r]+":"+e[n[r]]+";";return t}function Ca(e){switch(e){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}const Ma=new No.Matrix4;class $a{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new zs,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let n=!1,r=!1,i=-1;"undefined"!=typeof navigator&&(n=!0===/^((?!chrome|android).)*safari/i.test(navigator.userAgent),r=navigator.userAgent.indexOf("Firefox")>-1,i=r?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),"undefined"==typeof createImageBitmap||n||r&&i<98?this.textureLoader=new No.TextureLoader(this.options.manager):this.textureLoader=new No.ImageBitmapLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new No.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const n=this,r=this.json,i=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll((function(e){return e._markDefs&&e._markDefs()})),Promise.all(this._invokeAll((function(e){return e.beforeRoot&&e.beforeRoot()}))).then((function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])})).then((function(t){const o={scene:t[0][r.scene||0],scenes:t[0],animations:t[1],cameras:t[2],asset:r.asset,parser:n,userData:{}};ka(i,o,r),Oa(o,r),Promise.all(n._invokeAll((function(e){return e.afterRoot&&e.afterRoot(o)}))).then((function(){e(o)}))})).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[];for(let n=0,r=t.length;n<r;n++){const r=t[n].joints;for(let t=0,n=r.length;t<n;t++)e[r[t]].isBone=!0}for(let t=0,r=e.length;t<r;t++){const r=e[t];void 0!==r.mesh&&(this._addNodeRef(this.meshCache,r.mesh),void 0!==r.skin&&(n[r.mesh].isSkinnedMesh=!0)),void 0!==r.camera&&this._addNodeRef(this.cameraCache,r.camera)}}_addNodeRef(e,t){void 0!==t&&(void 0===e.refs[t]&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,n){if(e.refs[t]<=1)return n;const r=n.clone(),i=(e,t)=>{const n=this.associations.get(e);null!=n&&this.associations.set(t,n);for(const[n,r]of e.children.entries())i(r,t.children[n])};return i(n,r),r.name+="_instance_"+e.uses[t]++,r}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let n=0;n<t.length;n++){const r=e(t[n]);if(r)return r}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const n=[];for(let r=0;r<t.length;r++){const i=e(t[r]);i&&n.push(i)}return n}getDependency(e,t){const n=e+":"+t;let r=this.cache.get(n);if(!r){switch(e){case"scene":r=this.loadScene(t);break;case"node":r=this._invokeOne((function(e){return e.loadNode&&e.loadNode(t)}));break;case"mesh":r=this._invokeOne((function(e){return e.loadMesh&&e.loadMesh(t)}));break;case"accessor":r=this.loadAccessor(t);break;case"bufferView":r=this._invokeOne((function(e){return e.loadBufferView&&e.loadBufferView(t)}));break;case"buffer":r=this.loadBuffer(t);break;case"material":r=this._invokeOne((function(e){return e.loadMaterial&&e.loadMaterial(t)}));break;case"texture":r=this._invokeOne((function(e){return e.loadTexture&&e.loadTexture(t)}));break;case"skin":r=this.loadSkin(t);break;case"animation":r=this._invokeOne((function(e){return e.loadAnimation&&e.loadAnimation(t)}));break;case"camera":r=this.loadCamera(t);break;default:if(r=this._invokeOne((function(n){return n!=this&&n.getDependency&&n.getDependency(e,t)})),!r)throw new Error("Unknown type: "+e)}this.cache.add(n,r)}return r}getDependencies(e){let t=this.cache.get(e);if(!t){const n=this,r=this.json[e+("mesh"===e?"es":"s")]||[];t=Promise.all(r.map((function(t,r){return n.getDependency(e,r)}))),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],n=this.fileLoader;if(t.type&&"arraybuffer"!==t.type)throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(void 0===t.uri&&0===e)return Promise.resolve(this.extensions[Fs.KHR_BINARY_GLTF].body);const r=this.options;return new Promise((function(e,i){n.load(No.LoaderUtils.resolveURL(t.uri,r.path),e,void 0,(function(){i(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))}))}))}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then((function(e){const n=t.byteLength||0,r=t.byteOffset||0;return e.slice(r,r+n)}))}loadAccessor(e){const t=this,n=this.json,r=this.json.accessors[e];if(void 0===r.bufferView&&void 0===r.sparse){const e=ba[r.type],t=fa[r.componentType],n=!0===r.normalized,i=new t(r.count*e);return Promise.resolve(new No.BufferAttribute(i,e,n))}const i=[];return void 0!==r.bufferView?i.push(this.getDependency("bufferView",r.bufferView)):i.push(null),void 0!==r.sparse&&(i.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(i).then((function(e){const i=e[0],o=ba[r.type],s=fa[r.componentType],a=s.BYTES_PER_ELEMENT,l=a*o,c=r.byteOffset||0,u=void 0!==r.bufferView?n.bufferViews[r.bufferView].byteStride:void 0,d=!0===r.normalized;let h,p;if(u&&u!==l){const e=Math.floor(c/u),n="InterleavedBuffer:"+r.bufferView+":"+r.componentType+":"+e+":"+r.count;let l=t.cache.get(n);l||(h=new s(i,e*u,r.count*u/a),l=new No.InterleavedBuffer(h,u/a),t.cache.add(n,l)),p=new No.InterleavedBufferAttribute(l,o,c%u/a,d)}else h=null===i?new s(r.count*o):new s(i,c,r.count*o),p=new No.BufferAttribute(h,o,d);if(void 0!==r.sparse){const t=ba.SCALAR,n=fa[r.sparse.indices.componentType],a=r.sparse.indices.byteOffset||0,l=r.sparse.values.byteOffset||0,c=new n(e[1],a,r.sparse.count*t),u=new s(e[2],l,r.sparse.count*o);null!==i&&(p=new No.BufferAttribute(p.array.slice(),p.itemSize,p.normalized));for(let e=0,t=c.length;e<t;e++){const t=c[e];if(p.setX(t,u[e*o]),o>=2&&p.setY(t,u[e*o+1]),o>=3&&p.setZ(t,u[e*o+2]),o>=4&&p.setW(t,u[e*o+3]),o>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return p}))}loadTexture(e){const t=this.json,n=this.options,r=t.textures[e].source,i=t.images[r];let o=this.textureLoader;if(i.uri){const e=n.manager.getHandler(i.uri);null!==e&&(o=e)}return this.loadTextureImage(e,r,o)}loadTextureImage(e,t,n){const r=this,i=this.json,o=i.textures[e],s=i.images[t],a=(s.uri||s.bufferView)+":"+o.sampler;if(this.textureCache[a])return this.textureCache[a];const l=this.loadImageSource(t,n).then((function(t){t.flipY=!1,t.name=o.name||s.name||"",""===t.name&&"string"==typeof s.uri&&!1===s.uri.startsWith("data:image/")&&(t.name=s.uri);const n=(i.samplers||{})[o.sampler]||{};return t.magFilter=ma[n.magFilter]||No.LinearFilter,t.minFilter=ma[n.minFilter]||No.LinearMipmapLinearFilter,t.wrapS=ga[n.wrapS]||No.RepeatWrapping,t.wrapT=ga[n.wrapT]||No.RepeatWrapping,r.associations.set(t,{textures:e}),t})).catch((function(){return null}));return this.textureCache[a]=l,l}loadImageSource(e,t){const n=this,r=this.json,i=this.options;if(void 0!==this.sourceCache[e])return this.sourceCache[e].then(e=>e.clone());const o=r.images[e],s=self.URL||self.webkitURL;let a=o.uri||"",l=!1;if(void 0!==o.bufferView)a=n.getDependency("bufferView",o.bufferView).then((function(e){l=!0;const t=new Blob([e],{type:o.mimeType});return a=s.createObjectURL(t),a}));else if(void 0===o.uri)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const c=Promise.resolve(a).then((function(e){return new Promise((function(n,r){let o=n;!0===t.isImageBitmapLoader&&(o=function(e){const t=new No.Texture(e);t.needsUpdate=!0,n(t)}),t.load(No.LoaderUtils.resolveURL(e,i.path),o,void 0,r)}))})).then((function(e){var t;return!0===l&&s.revokeObjectURL(a),e.userData.mimeType=o.mimeType||((t=o.uri).search(/\.jpe?g($|\?)/i)>0||0===t.search(/^data\:image\/jpeg/)?"image/jpeg":t.search(/\.webp($|\?)/i)>0||0===t.search(/^data\:image\/webp/)?"image/webp":"image/png"),e})).catch((function(e){throw console.error("THREE.GLTFLoader: Couldn't load texture",a),e}));return this.sourceCache[e]=c,c}assignTexture(e,t,n,r){const i=this;return this.getDependency("texture",n.index).then((function(o){if(!o)return null;if(void 0!==n.texCoord&&n.texCoord>0&&((o=o.clone()).channel=n.texCoord),i.extensions[Fs.KHR_TEXTURE_TRANSFORM]){const e=void 0!==n.extensions?n.extensions[Fs.KHR_TEXTURE_TRANSFORM]:void 0;if(e){const t=i.associations.get(o);o=i.extensions[Fs.KHR_TEXTURE_TRANSFORM].extendTexture(o,e),i.associations.set(o,t)}}return void 0!==r&&(o.encoding=r),e[t]=o,o}))}assignFinalMaterial(e){const t=e.geometry;let n=e.material;const r=void 0===t.attributes.tangent,i=void 0!==t.attributes.color,o=void 0===t.attributes.normal;if(e.isPoints){const e="PointsMaterial:"+n.uuid;let t=this.cache.get(e);t||(t=new No.PointsMaterial,No.Material.prototype.copy.call(t,n),t.color.copy(n.color),t.map=n.map,t.sizeAttenuation=!1,this.cache.add(e,t)),n=t}else if(e.isLine){const e="LineBasicMaterial:"+n.uuid;let t=this.cache.get(e);t||(t=new No.LineBasicMaterial,No.Material.prototype.copy.call(t,n),t.color.copy(n.color),t.map=n.map,this.cache.add(e,t)),n=t}if(r||i||o){let e="ClonedMaterial:"+n.uuid+":";r&&(e+="derivative-tangents:"),i&&(e+="vertex-colors:"),o&&(e+="flat-shading:");let t=this.cache.get(e);t||(t=n.clone(),i&&(t.vertexColors=!0),o&&(t.flatShading=!0),r&&(t.normalScale&&(t.normalScale.y*=-1),t.clearcoatNormalScale&&(t.clearcoatNormalScale.y*=-1)),this.cache.add(e,t),this.associations.set(t,this.associations.get(n))),n=t}e.material=n}getMaterialType(){return No.MeshStandardMaterial}loadMaterial(e){const t=this,n=this.json,r=this.extensions,i=n.materials[e];let o;const s={},a=[];if((i.extensions||{})[Fs.KHR_MATERIALS_UNLIT]){const e=r[Fs.KHR_MATERIALS_UNLIT];o=e.getMaterialType(),a.push(e.extendParams(s,i,t))}else{const n=i.pbrMetallicRoughness||{};if(s.color=new No.Color(1,1,1),s.opacity=1,Array.isArray(n.baseColorFactor)){const e=n.baseColorFactor;s.color.fromArray(e),s.opacity=e[3]}void 0!==n.baseColorTexture&&a.push(t.assignTexture(s,"map",n.baseColorTexture,No.sRGBEncoding)),s.metalness=void 0!==n.metallicFactor?n.metallicFactor:1,s.roughness=void 0!==n.roughnessFactor?n.roughnessFactor:1,void 0!==n.metallicRoughnessTexture&&(a.push(t.assignTexture(s,"metalnessMap",n.metallicRoughnessTexture)),a.push(t.assignTexture(s,"roughnessMap",n.metallicRoughnessTexture))),o=this._invokeOne((function(t){return t.getMaterialType&&t.getMaterialType(e)})),a.push(Promise.all(this._invokeAll((function(t){return t.extendMaterialParams&&t.extendMaterialParams(e,s)}))))}!0===i.doubleSided&&(s.side=No.DoubleSide);const l=i.alphaMode||_a;if(l===wa?(s.transparent=!0,s.depthWrite=!1):(s.transparent=!1,l===xa&&(s.alphaTest=void 0!==i.alphaCutoff?i.alphaCutoff:.5)),void 0!==i.normalTexture&&o!==No.MeshBasicMaterial&&(a.push(t.assignTexture(s,"normalMap",i.normalTexture)),s.normalScale=new No.Vector2(1,1),void 0!==i.normalTexture.scale)){const e=i.normalTexture.scale;s.normalScale.set(e,e)}return void 0!==i.occlusionTexture&&o!==No.MeshBasicMaterial&&(a.push(t.assignTexture(s,"aoMap",i.occlusionTexture)),void 0!==i.occlusionTexture.strength&&(s.aoMapIntensity=i.occlusionTexture.strength)),void 0!==i.emissiveFactor&&o!==No.MeshBasicMaterial&&(s.emissive=(new No.Color).fromArray(i.emissiveFactor)),void 0!==i.emissiveTexture&&o!==No.MeshBasicMaterial&&a.push(t.assignTexture(s,"emissiveMap",i.emissiveTexture,No.sRGBEncoding)),Promise.all(a).then((function(){const n=new o(s);return i.name&&(n.name=i.name),Oa(n,i),t.associations.set(n,{materials:e}),i.extensions&&ka(r,n,i),n}))}createUniqueName(e){const t=No.PropertyBinding.sanitizeNodeName(e||"");let n=t;for(let e=1;this.nodeNamesUsed[n];++e)n=t+"_"+e;return this.nodeNamesUsed[n]=!0,n}loadGeometries(e){const t=this,n=this.extensions,r=this.primitiveCache;function i(e){return n[Fs.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(e,t).then((function(n){return Pa(n,e,t)}))}const o=[];for(let n=0,s=e.length;n<s;n++){const s=e[n],a=Aa(s),l=r[a];if(l)o.push(l.promise);else{let e;e=s.extensions&&s.extensions[Fs.KHR_DRACO_MESH_COMPRESSION]?i(s):Pa(new No.BufferGeometry,s,t),r[a]={primitive:s,promise:e},o.push(e)}}return Promise.all(o)}loadMesh(e){const t=this,n=this.json,r=this.extensions,i=n.meshes[e],o=i.primitives,s=[];for(let e=0,t=o.length;e<t;e++){const t=void 0===o[e].material?(void 0===(a=this.cache).DefaultMaterial&&(a.DefaultMaterial=new No.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:No.FrontSide})),a.DefaultMaterial):this.getDependency("material",o[e].material);s.push(t)}var a;return s.push(t.loadGeometries(o)),Promise.all(s).then((function(n){const s=n.slice(0,n.length-1),a=n[n.length-1],l=[];for(let n=0,c=a.length;n<c;n++){const c=a[n],u=o[n];let d;const h=s[n];if(u.mode===pa.TRIANGLES||u.mode===pa.TRIANGLE_STRIP||u.mode===pa.TRIANGLE_FAN||void 0===u.mode)d=!0===i.isSkinnedMesh?new No.SkinnedMesh(c,h):new No.Mesh(c,h),!0===d.isSkinnedMesh&&d.normalizeSkinWeights(),u.mode===pa.TRIANGLE_STRIP?d.geometry=Ls(d.geometry,No.TriangleStripDrawMode):u.mode===pa.TRIANGLE_FAN&&(d.geometry=Ls(d.geometry,No.TriangleFanDrawMode));else if(u.mode===pa.LINES)d=new No.LineSegments(c,h);else if(u.mode===pa.LINE_STRIP)d=new No.Line(c,h);else if(u.mode===pa.LINE_LOOP)d=new No.LineLoop(c,h);else{if(u.mode!==pa.POINTS)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+u.mode);d=new No.Points(c,h)}Object.keys(d.geometry.morphAttributes).length>0&&Ea(d,i),d.name=t.createUniqueName(i.name||"mesh_"+e),Oa(d,i),u.extensions&&ka(r,d,u),t.assignFinalMaterial(d),l.push(d)}for(let n=0,r=l.length;n<r;n++)t.associations.set(l[n],{meshes:e,primitives:n});if(1===l.length)return l[0];const c=new No.Group;t.associations.set(c,{meshes:e});for(let e=0,t=l.length;e<t;e++)c.add(l[e]);return c}))}loadCamera(e){let t;const n=this.json.cameras[e],r=n[n.type];if(r)return"perspective"===n.type?t=new No.PerspectiveCamera(No.MathUtils.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):"orthographic"===n.type&&(t=new No.OrthographicCamera(-r.xmag,r.xmag,r.ymag,-r.ymag,r.znear,r.zfar)),n.name&&(t.name=this.createUniqueName(n.name)),Oa(t,n),Promise.resolve(t);console.warn("THREE.GLTFLoader: Missing camera parameters.")}loadSkin(e){const t=this.json.skins[e],n=[];for(let e=0,r=t.joints.length;e<r;e++)n.push(this._loadNodeShallow(t.joints[e]));return void 0!==t.inverseBindMatrices?n.push(this.getDependency("accessor",t.inverseBindMatrices)):n.push(null),Promise.all(n).then((function(e){const n=e.pop(),r=e,i=[],o=[];for(let e=0,s=r.length;e<s;e++){const s=r[e];if(s){i.push(s);const t=new No.Matrix4;null!==n&&t.fromArray(n.array,16*e),o.push(t)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[e])}return new No.Skeleton(i,o)}))}loadAnimation(e){const t=this.json.animations[e],n=t.name?t.name:"animation_"+e,r=[],i=[],o=[],s=[],a=[];for(let e=0,n=t.channels.length;e<n;e++){const n=t.channels[e],l=t.samplers[n.sampler],c=n.target,u=c.node,d=void 0!==t.parameters?t.parameters[l.input]:l.input,h=void 0!==t.parameters?t.parameters[l.output]:l.output;void 0!==c.node&&(r.push(this.getDependency("node",u)),i.push(this.getDependency("accessor",d)),o.push(this.getDependency("accessor",h)),s.push(l),a.push(c))}return Promise.all([Promise.all(r),Promise.all(i),Promise.all(o),Promise.all(s),Promise.all(a)]).then((function(e){const t=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=[];for(let e=0,n=t.length;e<n;e++){const n=t[e],l=r[e],c=i[e],u=o[e],d=s[e];if(void 0===n)continue;let h;switch(n.updateMatrix(),ya[d.path]){case ya.weights:h=No.NumberKeyframeTrack;break;case ya.rotation:h=No.QuaternionKeyframeTrack;break;case ya.position:case ya.scale:default:h=No.VectorKeyframeTrack}const p=n.name?n.name:n.uuid,f=void 0!==u.interpolation?Sa[u.interpolation]:No.InterpolateLinear,m=[];ya[d.path]===ya.weights?n.traverse((function(e){e.morphTargetInfluences&&m.push(e.name?e.name:e.uuid)})):m.push(p);let g=c.array;if(c.normalized){const e=Ca(g.constructor),t=new Float32Array(g.length);for(let n=0,r=g.length;n<r;n++)t[n]=g[n]*e;g=t}for(let e=0,t=m.length;e<t;e++){const t=new h(m[e]+"."+ya[d.path],l.array,g,f);"CUBICSPLINE"===u.interpolation&&(t.createInterpolant=function(e){return new(this instanceof No.QuaternionKeyframeTrack?ha:ua)(this.times,this.values,this.getValueSize()/3,e)},t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),a.push(t)}}return new No.AnimationClip(n,void 0,a)}))}createNodeMesh(e){const t=this.json,n=this,r=t.nodes[e];return void 0===r.mesh?null:n.getDependency("mesh",r.mesh).then((function(e){const t=n._getNodeRef(n.meshCache,r.mesh,e);return void 0!==r.weights&&t.traverse((function(e){if(e.isMesh)for(let t=0,n=r.weights.length;t<n;t++)e.morphTargetInfluences[t]=r.weights[t]})),t}))}loadNode(e){const t=this,n=this.json.nodes[e],r=t._loadNodeShallow(e),i=[],o=n.children||[];for(let e=0,n=o.length;e<n;e++)i.push(t.getDependency("node",o[e]));const s=void 0===n.skin?Promise.resolve(null):t.getDependency("skin",n.skin);return Promise.all([r,Promise.all(i),s]).then((function(e){const t=e[0],n=e[1],r=e[2];null!==r&&t.traverse((function(e){e.isSkinnedMesh&&e.bind(r,Ma)}));for(let e=0,r=n.length;e<r;e++)t.add(n[e]);return t}))}_loadNodeShallow(e){const t=this.json,n=this.extensions,r=this;if(void 0!==this.nodeCache[e])return this.nodeCache[e];const i=t.nodes[e],o=i.name?r.createUniqueName(i.name):"",s=[],a=r._invokeOne((function(t){return t.createNodeMesh&&t.createNodeMesh(e)}));return a&&s.push(a),void 0!==i.camera&&s.push(r.getDependency("camera",i.camera).then((function(e){return r._getNodeRef(r.cameraCache,i.camera,e)}))),r._invokeAll((function(t){return t.createNodeAttachment&&t.createNodeAttachment(e)})).forEach((function(e){s.push(e)})),this.nodeCache[e]=Promise.all(s).then((function(t){let s;if(s=!0===i.isBone?new No.Bone:t.length>1?new No.Group:1===t.length?t[0]:new No.Object3D,s!==t[0])for(let e=0,n=t.length;e<n;e++)s.add(t[e]);if(i.name&&(s.userData.name=i.name,s.name=o),Oa(s,i),i.extensions&&ka(n,s,i),void 0!==i.matrix){const e=new No.Matrix4;e.fromArray(i.matrix),s.applyMatrix4(e)}else void 0!==i.translation&&s.position.fromArray(i.translation),void 0!==i.rotation&&s.quaternion.fromArray(i.rotation),void 0!==i.scale&&s.scale.fromArray(i.scale);return r.associations.has(s)||r.associations.set(s,{}),r.associations.get(s).nodes=e,s})),this.nodeCache[e]}loadScene(e){const t=this.extensions,n=this.json.scenes[e],r=this,i=new No.Group;n.name&&(i.name=r.createUniqueName(n.name)),Oa(i,n),n.extensions&&ka(t,i,n);const o=n.nodes||[],s=[];for(let e=0,t=o.length;e<t;e++)s.push(r.getDependency("node",o[e]));return Promise.all(s).then((function(e){for(let t=0,n=e.length;t<n;t++)i.add(e[t]);return r.associations=(e=>{const t=new Map;for(const[e,n]of r.associations)(e instanceof No.Material||e instanceof No.Texture)&&t.set(e,n);return e.traverse(e=>{const n=r.associations.get(e);null!=n&&t.set(e,n)}),t})(i),i}))}}function Pa(e,t,n){const r=t.attributes,i=[];function o(t,r){return n.getDependency("accessor",t).then((function(t){e.setAttribute(r,t)}))}for(const t in r){const n=va[t]||t.toLowerCase();n in e.attributes||i.push(o(r[t],n))}if(void 0!==t.indices&&!e.index){const r=n.getDependency("accessor",t.indices).then((function(t){e.setIndex(t)}));i.push(r)}return Oa(e,t),function(e,t,n){const r=t.attributes,i=new No.Box3;if(void 0===r.POSITION)return;{const e=n.json.accessors[r.POSITION],t=e.min,o=e.max;if(void 0===t||void 0===o)return void console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");if(i.set(new No.Vector3(t[0],t[1],t[2]),new No.Vector3(o[0],o[1],o[2])),e.normalized){const t=Ca(fa[e.componentType]);i.min.multiplyScalar(t),i.max.multiplyScalar(t)}}const o=t.targets;if(void 0!==o){const e=new No.Vector3,t=new No.Vector3;for(let r=0,i=o.length;r<i;r++){const i=o[r];if(void 0!==i.POSITION){const r=n.json.accessors[i.POSITION],o=r.min,s=r.max;if(void 0!==o&&void 0!==s){if(t.setX(Math.max(Math.abs(o[0]),Math.abs(s[0]))),t.setY(Math.max(Math.abs(o[1]),Math.abs(s[1]))),t.setZ(Math.max(Math.abs(o[2]),Math.abs(s[2]))),r.normalized){const e=Ca(fa[r.componentType]);t.multiplyScalar(e)}e.max(t)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}i.expandByVector(e)}e.boundingBox=i;const s=new No.Sphere;i.getCenter(s.center),s.radius=i.min.distanceTo(i.max)/2,e.boundingSphere=s}(e,t,n),Promise.all(i).then((function(){return void 0!==t.targets?function(e,t,n){let r=!1,i=!1,o=!1;for(let e=0,n=t.length;e<n;e++){const n=t[e];if(void 0!==n.POSITION&&(r=!0),void 0!==n.NORMAL&&(i=!0),void 0!==n.COLOR_0&&(o=!0),r&&i&&o)break}if(!r&&!i&&!o)return Promise.resolve(e);const s=[],a=[],l=[];for(let c=0,u=t.length;c<u;c++){const u=t[c];if(r){const t=void 0!==u.POSITION?n.getDependency("accessor",u.POSITION):e.attributes.position;s.push(t)}if(i){const t=void 0!==u.NORMAL?n.getDependency("accessor",u.NORMAL):e.attributes.normal;a.push(t)}if(o){const t=void 0!==u.COLOR_0?n.getDependency("accessor",u.COLOR_0):e.attributes.color;l.push(t)}}return Promise.all([Promise.all(s),Promise.all(a),Promise.all(l)]).then((function(t){const n=t[0],s=t[1],a=t[2];return r&&(e.morphAttributes.position=n),i&&(e.morphAttributes.normal=s),o&&(e.morphAttributes.color=a),e.morphTargetsRelative=!0,e}))}(e,t.targets,n):e}))}let Ra=null;function ja(e,t,n){return r=>{n&&n(r),e&&(Ra||(Ra=new js),Ra.setDecoderPath("string"==typeof e?e:"https://www.gstatic.com/draco/versioned/decoders/1.5.5/"),r.setDRACOLoader(Ra)),t&&r.setMeshoptDecoder(Is())}}function Na(e,t=!0,n=!0,r){return Object(_s.c)(Bs,e,ja(t,n,r))}Na.preload=(e,t=!0,n=!0,r)=>_s.c.preload(Bs,e,ja(t,n,r)),Na.clear=e=>_s.c.clear(Bs,e);var Da=()=>{const{scene:e}=Na("".concat("https://editor-static.raspberrypi.org/releases/v0.27.1","/models/raspi-compressed.glb"));window.mod=e;var t={"0_0_0":new No.MeshStandardMaterial({color:"rgb(0,0,0)"})};function n(n,r,i,o){var s=n%8,a=Math.floor(n/8);let l;"".concat(r,"_").concat(i,"_").concat(o)in t?l=t["".concat(r,"_").concat(i,"_").concat(o)]:(l=new No.MeshStandardMaterial({color:"rgb(".concat(r,",").concat(i,",").concat(o,")")}),t["".concat(r,"_").concat(i,"_").concat(o)]=l);var c=e.getObjectByName("circle".concat(s,"_").concat(7-a,"-1"));null!=c&&(c.material=l)}return $s.a.sense_hat_emit=function(e,t){if(e&&"setpixel"===e){const e=t,r=$s.a.sense_hat.pixels[e];$s.a.sense_hat.pixels[e]=[-8&r[0],-4&r[1],-8&r[2]],n(e,parseInt(255*r[0]),parseInt(255*r[1]),parseInt(255*r[2]))}else e&&"setpixels"===e&&function(e,t){null==e&&(e=Array.from(Array(64).keys()));var r=0;for(const i of e)n(i,t[r][0],t[r][1],t[r][2]),r+=1}(t,$s.a.sense_hat.pixels);Object(_s.k)()},o.a.createElement("primitive",{object:e,scale:4})},Ia=!1,La=.5,Ba=.2,za=0,Fa=0,Ua=0,Qa=0,qa=window.innerWidth/2,Ga=window.innerHeight/2;var Ha=e=>{const{updateOrientation:t}=e,n=()=>{Ia=!1};return o.a.createElement(Ss.a,{frameloop:"demand",onPointerDown:e=>{Ia=!0,Fa=e.clientX-qa,Qa=e.clientY-Ga},onPointerUp:n,onPointerOut:n,onPointerMove:e=>{var n,r,i;za=e.clientX-qa,La=25e-5*(za-Fa),Ua=e.clientY-Ga,Ba=25e-5*(Ua-Qa),Ia&&(window.mod.rotateOnWorldAxis(new No.Vector3(0,0,-1),La),window.mod.rotateOnWorldAxis(new No.Vector3(1,0,0),Ba),t((n=window.mod.rotation.x,r=window.mod.rotation.y,i=window.mod.rotation.z,[(180*r/Math.PI+360)%360,(180*n/Math.PI+90+360)%360,(180*i/Math.PI+360)%360])),Ba*=.75,La*=.75)},resize:{polyfill:ys}},o.a.createElement(Ts,null),o.a.createElement(i.Suspense,{fallback:null},o.a.createElement(ws,{makeDefault:!0,fov:25,near:1,far:2e4,position:[0,1.5,0]}),o.a.createElement(Da,null),o.a.createElement(As,{enableRotate:!1,enablePan:!1,enableZoom:!1,enabled:!1})))};var Va=e=>{const{name:t,label:n,type:r,defaultValue:s}=e,[a,l]=Object(i.useState)(s);return Object(i.useEffect)(()=>{$s.a.sense_hat&&Object(i.startTransition)(()=>{$s.a.sense_hat[t]=a})},[t,a]),o.a.createElement("div",{className:"sense-hat-controls-panel__container"},o.a.createElement("label",{className:"sense-hat-controls-panel__control-name",htmlFor:"sense_hat_".concat(t)},n),o.a.createElement("input",{type:r,id:"sense_hat_".concat(t),defaultValue:a,onChange:e=>l(e.target.value)}))},Wa=n(174),Xa=n.n(Wa);n(356);var Ya=e=>{const{defaultValue:t}=e,[n,r]=Object(i.useState)(t),s=Fn(e=>e.editor.codeRunTriggered),{t:a}=Wi();return Object(i.useEffect)(()=>{s||($s.a.sense_hat.start_motion_callback=()=>{},$s.a.sense_hat.stop_motion_callback=()=>{})},[s]),Object(i.useEffect)(()=>{$s.a.sense_hat&&Object(i.startTransition)(()=>{$s.a.sense_hat.motion=n}),n?$s.a.sense_hat.start_motion_callback():$s.a.sense_hat.stop_motion_callback()},[n]),o.a.createElement("div",{className:"sense-hat-controls-panel__container"},o.a.createElement("label",{className:"sense-hat-controls-panel__control-name",htmlFor:"sense_hat_motion"},a("output.senseHat.controls.motion")),o.a.createElement("div",{className:"sense-hat-controls-panel__control-toggle"},o.a.createElement("label",{htmlFor:"sense_hat_motion"},a("output.senseHat.controls.motionSensorOptions.no")),o.a.createElement(Xa.a,{id:"sense_hat_motion",icons:!1,checked:n,onChange:e=>r(e.target.checked)}),o.a.createElement("label",{htmlFor:"sense_hat_motion"},a("output.senseHat.controls.motionSensorOptions.yes"))))};var Za=e=>{const{name:t,label:n,unit:r,min:s,max:a,defaultValue:l,Icon:c}=e,[u,d]=Object(i.useState)(l);return Object(i.useEffect)(()=>{$s.a.sense_hat&&Object(i.startTransition)(()=>{$s.a.sense_hat.rtimu[t][1]=u+Math.random()-.5})},[t,u]),o.a.createElement("div",{className:"sense-hat-controls-panel__control"},o.a.createElement("label",{className:"sense-hat-controls-panel__control-name",htmlFor:"sense_hat_".concat(t)},n),o.a.createElement("input",{id:"sense_hat_".concat(t),className:"sense-hat-controls-panel__control-input",type:"range",min:s,max:a,step:"1",defaultValue:u,onChange:e=>d(parseFloat(e.target.value))}),o.a.createElement("div",{className:"sense-hat-controls-panel__control-reading"},c?o.a.createElement(c,null):null,o.a.createElement("span",{className:"sense-hat-controls-panel__control-value"},u,r)))},Ja=n(175);var Ka,el=()=>{const e=Fn(e=>e.editor.codeRunTriggered),{seconds:t,minutes:n,isRunning:r,pause:s,reset:a}=Object(Ja.useStopwatch)({autoStart:!1}),[l,c]=Object(i.useState)(!1),{t:u}=Wi();return Object(i.useEffect)(()=>{window.addEventListener("blur",()=>{c(!0)})},[]),Object(i.useEffect)(()=>{e&&!r&&(c(!1),a()),!e&&r&&(s(),$s.a.sense_hat.mz_criteria.duration=l?null:60*n+t)},[e,l,n,t,r,s,a]),o.a.createElement("div",{className:"sense-hat-controls-panel__container sense-hat-controls-panel__container-timer"},o.a.createElement("label",{className:"sense-hat-controls-panel__control-name",htmlFor:"sense_hat_timer"},u("output.senseHat.controls.timer")),o.a.createElement("span",{className:"sense-hat-controls-panel__control-reading sense-hat-controls-panel__control-reading-timer",id:"sense_hat_timer"},o.a.createElement("span",null,String(n).padStart(2,"0")),":",o.a.createElement("span",null,String(t).padStart(2,"0"))))};function tl(){return(tl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var nl,rl,il,ol=function(e){return i.createElement("svg",tl({width:16,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Ka||(Ka=i.createElement("path",{d:"M10.5 16c.417 0 .77-.146 1.062-.438.292-.291.438-.645.438-1.062 0-.417-.146-.77-.438-1.062A1.444 1.444 0 0010.5 13c-.417 0-.77.146-1.062.438A1.444 1.444 0 009 14.5c0 .417.146.77.438 1.062.291.292.645.438 1.062.438zm-5.05-.05l6.5-6.5-1.4-1.4-6.5 6.5 1.4 1.4zM5.5 11c.417 0 .77-.146 1.062-.438C6.854 10.271 7 9.917 7 9.5c0-.417-.146-.77-.438-1.062A1.444 1.444 0 005.5 8c-.417 0-.77.146-1.062.438A1.444 1.444 0 004 9.5c0 .417.146.77.438 1.062.291.292.645.438 1.062.438zM8 20c-2.283 0-4.187-.783-5.712-2.35C.763 16.083 0 14.133 0 11.8c0-1.667.663-3.479 1.988-5.437C3.313 4.404 5.317 2.283 8 0c2.683 2.283 4.688 4.404 6.013 6.363C15.338 8.321 16 10.133 16 11.8c0 2.333-.763 4.283-2.288 5.85C12.187 19.217 10.283 20 8 20zm0-2c1.733 0 3.167-.587 4.3-1.762S14 13.583 14 11.8c0-1.217-.504-2.592-1.512-4.125C11.479 6.142 9.983 4.467 8 2.65 6.017 4.467 4.521 6.142 3.513 7.675 2.504 9.208 2 10.583 2 11.8c0 1.783.567 3.263 1.7 4.438C4.833 17.413 6.267 18 8 18z"})))};function sl(){return(sl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var al,ll=function(e){return i.createElement("svg",sl({transform:"scale(1.6)",width:15,height:15,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),nl||(nl=i.createElement("path",{d:"M8.752 7.001a1 1 0 01-1.971.237c-.062-.252-.123-.52-.307-.704L5.411 5.471a.5.5 0 11.707-.707l.957.957c.207.207.52.25.81.29a1 1 0 01.867.99z"})),rl||(rl=i.createElement("path",{d:"M11.75 6.75a4.25 4.25 0 11-8.5 0 4.25 4.25 0 018.5 0zm-1 0a3.25 3.25 0 11-6.5 0 3.25 3.25 0 016.5 0z"})),il||(il=i.createElement("path",{d:"M6.252 10.5h2.5v.75a1.25 1.25 0 11-2.5 0z"})))};function cl(){return(cl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ul=function(e){return i.createElement("svg",cl({width:10,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),al||(al=i.createElement("path",{d:"M5 20c-1.383 0-2.562-.487-3.537-1.462C.488 17.563 0 16.383 0 15c0-.8.175-1.546.525-2.238A5.083 5.083 0 012 11V3c0-.833.292-1.542.875-2.125A2.893 2.893 0 015 0c.833 0 1.542.292 2.125.875S8 2.167 8 3v8a5.083 5.083 0 011.475 1.762C9.825 13.454 10 14.2 10 15c0 1.383-.487 2.563-1.462 3.538C7.563 19.513 6.383 20 5 20zM4 9h2V8H5V7h1V5H5V4h1V3a.97.97 0 00-.287-.713A.97.97 0 005 2a.967.967 0 00-.712.287A.968.968 0 004 3v6z"})))};var dl=e=>{const{temperature:t,pressure:n,humidity:r,colour:i,motion:s}=e,{t:a}=Wi();return o.a.createElement("div",{className:"sense-hat-controls"},o.a.createElement("h2",{className:"sense-hat-controls-heading"},a("output.senseHat.controls.name")),o.a.createElement("div",{className:"sense-hat-controls-panel"},o.a.createElement("div",{className:"sense-hat-controls-panel__sliders"},o.a.createElement(Za,{name:"temperature",label:a("output.senseHat.controls.temperature"),unit:"°C",min:-40,max:120,defaultValue:t,Icon:ul}),o.a.createElement(Za,{name:"pressure",label:a("output.senseHat.controls.pressure"),unit:"hPa",min:260,max:1260,defaultValue:n,Icon:ll}),o.a.createElement(Za,{name:"humidity",label:a("output.senseHat.controls.humidity"),unit:"%",min:0,max:100,defaultValue:r,Icon:ol})),o.a.createElement("div",{className:"sense-hat-controls-panel__control sense-hat-controls-panel__control-last"},o.a.createElement(Va,{name:"colour",label:a("output.senseHat.controls.colour"),type:"color",defaultValue:i}),o.a.createElement(Ya,{defaultValue:s}),o.a.createElement(el,null))))};var hl,pl=e=>{const{name:t,value:n}=e;return o.a.createElement("span",{className:"sense-hat-model-orientation__reading"},t,": ",Math.round(n))};function fl(){return(fl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ml=function(e){return i.createElement("svg",fl({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),hl||(hl=i.createElement("path",{d:"M10 0h6v2h-2.75l.4.35c.817.817 1.413 1.704 1.788 2.662.375.959.562 1.938.562 2.938 0 1.85-.554 3.496-1.663 4.937-1.108 1.442-2.554 2.396-4.337 2.863v-2.1a5.93 5.93 0 002.9-2.212A5.92 5.92 0 0014 7.95c0-.75-.142-1.48-.425-2.188-.283-.708-.725-1.362-1.325-1.962L12 3.55V6h-2V0zM6 16H0v-2h2.75l-.4-.35c-.867-.767-1.475-1.642-1.825-2.625A8.816 8.816 0 010 8.05C0 6.2.554 4.554 1.662 3.112 2.771 1.671 4.217.717 6 .25v2.1a5.93 5.93 0 00-2.9 2.212A5.92 5.92 0 002 8.05c0 .75.142 1.479.425 2.187.283.709.725 1.363 1.325 1.963l.25.25V10h2v6z"})))};var gl=e=>{const{resetOrientation:t}=e;return o.a.createElement("button",{onClick:e=>t(e)},o.a.createElement(ml,null))};var bl=e=>{const{t:t}=Wi(),{orientation:n,resetOrientation:r}=e;return o.a.createElement("div",{className:"sense-hat-model-orientation"},o.a.createElement("div",{className:"sense-hat-model-orientation__spacing"}),o.a.createElement("div",{className:"sense-hat-model-orientation__values"},o.a.createElement(pl,{name:t("output.senseHat.model.roll"),value:n[0]}),o.a.createElement(pl,{name:t("output.senseHat.model.pitch"),value:n[1]}),o.a.createElement(pl,{name:t("output.senseHat.model.yaw"),value:n[2]})),o.a.createElement("div",{className:"sense-hat-model-orientation__reset-btn"},o.a.createElement(gl,{resetOrientation:r})))};const vl={duration:null,noInputEvents:!0,readColour:!1,readHumidity:!1,readPressure:!1,readTemperature:!1,usedLEDs:!1};var yl=()=>{const e=Fn(e=>e.editor.project),[t,n]=Object(i.useState)([0,90,0]);if(!$s.a.sense_hat){$s.a.sense_hat={colour:"#FF00A4",gamma:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],low_light:!1,motion:!1,mz_criteria:{...vl},pixels:[],rtimu:{pressure:[1,1013+Math.random()-.5],temperature:[1,13+Math.random()-.5],humidity:[1,45+Math.random()-.5],gyro:[0,0,0],accel:[0,0,0],compass:[0,0,33],raw_orientation:[0,90,0]},sensestick:{_eventQueue:[],off:()=>{},once:()=>{}},start_motion_callback:()=>{},stop_motion_callback:()=>{}};for(var r=0;r<64;r++)$s.a.sense_hat.pixels.push([0,0,0])}return Object(i.useEffect)(()=>{$s.a.sense_hat.mz_criteria={...vl}},[e]),Object(i.useEffect)(()=>{$s.a.sense_hat.rtimu.raw_orientation=t,function(){var e=$s.a.sense_hat.rtimu.timestamp;null==e&&(e=Ps());var t=Ps(),n=(t-e)/1e6;0===n&&(n=1);var r=$s.a.sense_hat.rtimu.raw_old_orientation;null==r&&(r=[0,90,0]);var i=Cs.degToRad($s.a.sense_hat.rtimu.raw_orientation),o=[i[0]-r[0],i[1]-r[1],i[2]-r[2]];o=Cs.divideArrayWithScalar(o,n);var s=i[0],a=i[1],l=i[2],c=Math.cos(l),u=Math.cos(a),d=Math.cos(s),h=Math.sin(l),p=Math.sin(a),f=Math.sin(s),m=[[c*u,c*p*f-d*h,h*f+c*d*p],[u*h,c*d+h*p*f,d*h*p-c*f],[-p,u*f,u*d]],g=Cs.transpose3x3Matrix(m),b=Cs.dot3x3and3x1(g,Cs.Defaults.GRAVITY),v=Cs.dot3x3and3x1(g,Cs.Defaults.NORTH);$s.a.sense_hat.rtimu.raw_old_orientation=i,$s.a.sense_hat.rtimu.fusionPose=i,$s.a.sense_hat.rtimu.timestamp=t,$s.a.sense_hat.rtimu.accel=[Cs.clamp(b[0],-8,8),Cs.clamp(b[1],-8,8),Cs.clamp(b[2],-8,8)],$s.a.sense_hat.rtimu.gyro=[o[0],o[1],o[2]],$s.a.sense_hat.rtimu.compass=[100*v[0],100*v[1],100*v[2]]}()},[t]),o.a.createElement("div",{className:"sense-hat"},o.a.createElement("div",{className:"sense-hat-model"},o.a.createElement(Ha,{updateOrientation:n}),o.a.createElement(bl,{orientation:t,resetOrientation:e=>{e.preventDefault(),window.rotatemodel(Cs.degToRad(0),Cs.degToRad(0),Cs.degToRad(0)),n([0,90,0])}})),o.a.createElement(dl,{pressure:1013,temperature:13,humidity:45,colour:$s.a.sense_hat.colour,motion:$s.a.sense_hat.motion}))},Sl=n(176),_l=n.n(Sl);const xl=(e,t)=>e.map(e=>e.showing?e:wl(e,t)),wl=(e,t)=>{switch(e.origin){case"sense_hat":t.current.textContent=JSON.stringify(e.content);break;case"pygal":const n={...e.content,chart:{...e.content.chart,events:{...e.content.chart.events,load:function(){this.renderTo.style.overflow="visible"}}}};_l.a.chart(t.current,n);break;case"turtle":t.current.innerHTML=kl(e.content).outerHTML;break;default:throw new Error("Unsupported origin: ".concat(e.origin))}return e.showing=!0,e},kl=e=>{const t=e.get("tag");if(!t)return document.createTextNode(e.get("text"));const n=document.createElement(t);for(const[t,r]of e.get("props"))n.setAttribute(t,r);for(const t of e.get("children"))n.appendChild(kl(t));return n};var Ol,El=e=>{let{visuals:t,setVisuals:n}=e;const r=Fn(e=>e.editor.senseHatEnabled),s=Fn(e=>e.editor.senseHatAlwaysEnabled),a=Object(i.useRef)();return Object(i.useEffect)(()=>{0===t.length?a.current.innerHTML="":t.some(e=>!e.showing)&&n(e=>xl(e,a))},[t,n]),o.a.createElement("div",{className:"visual-output"},o.a.createElement("div",{ref:a,className:"pythonrunner-graphic"}),r||s?o.a.createElement(yl,null):null)};function Al(){return(Al=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Tl,Cl,Ml=function(e){return i.createElement("svg",Al({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Ol||(Ol=i.createElement("path",{d:"M2.5 17.5V9.167h15V17.5h-15zm1.667-1.667h11.666v-5H4.167v5zM2.5 9.167V2.5h15v6.667h-15zm1.667 0h11.666v-5H4.167v5z"})))};function $l(){return($l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Pl,Rl=function(e){return i.createElement("svg",$l({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Tl||(Tl=i.createElement("path",{d:"M17.5 17.5v-15h-15v15h15zm-1.667-1.667H4.167V9.167h11.666v6.666zm0-8.333H4.167V4.167h11.666V7.5zm-7.5-.833H5V5h3.333v1.667z"})),Cl||(Cl=i.createElement("path",{d:"M9.167 6.667H12.5V5H9.167v1.667z"})))},jl=n(177);n(357);
|
||
/**
|
||
* @remix-run/router v1.6.1
|
||
*
|
||
* Copyright (c) Remix Software Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE.md file in the root directory of this source tree.
|
||
*
|
||
* @license MIT
|
||
*/
|
||
function Nl(){return(Nl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(Pl||(Pl={}));function Dl(e){return void 0===e&&(e={}),Ul((function(e,t){let{pathname:n,search:r,hash:i}=e.location;return Bl("",{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"==typeof t?t:zl(t)}),null,e)}function Il(e,t){if(!1===e||null==e)throw new Error(t)}function Ll(e,t){return{usr:e.state,key:e.key,idx:t}}function Bl(e,t,n,r){return void 0===n&&(n=null),Nl({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?Fl(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function zl(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function Fl(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Ul(e,t,n,r){void 0===r&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=Pl.Pop,l=null,c=u();function u(){return(s.state||{idx:null}).idx}function d(){a=Pl.Pop;let e=u(),t=null==e?null:e-c;c=e,l&&l({action:a,location:p.location,delta:t})}function h(e){let t="null"!==i.location.origin?i.location.origin:i.location.href,n="string"==typeof e?e:zl(e);return Il(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==c&&(c=0,s.replaceState(Nl({},s.state,{idx:c}),""));let p={get action(){return a},get location(){return e(i,s)},listen(e){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener("popstate",d),l=e,()=>{i.removeEventListener("popstate",d),l=null}},createHref:e=>t(i,e),createURL:h,encodeLocation(e){let t=h(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){a=Pl.Push;let r=Bl(p.location,e,t);n&&n(r,e),c=u()+1;let d=Ll(r,c),h=p.createHref(r);try{s.pushState(d,"",h)}catch(e){i.location.assign(h)}o&&l&&l({action:a,location:p.location,delta:1})},replace:function(e,t){a=Pl.Replace;let r=Bl(p.location,e,t);n&&n(r,e),c=u();let i=Ll(r,c),d=p.createHref(r);s.replaceState(i,"",d),o&&l&&l({action:a,location:p.location,delta:0})},go:e=>s.go(e)};return p}var Ql;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(Ql||(Ql={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function ql(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function Gl(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function Hl(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function Vl(e,t,n,r){let i;void 0===r&&(r=!1),"string"==typeof e?i=Fl(e):(i=Nl({},e),Il(!i.pathname||!i.pathname.includes("?"),Gl("?","pathname","search",i)),Il(!i.pathname||!i.pathname.includes("#"),Gl("#","pathname","hash",i)),Il(!i.search||!i.search.includes("#"),Gl("#","search","hash",i)));let o,s=""===e||""===i.pathname,a=s?"/":i.pathname;if(r||null==a)o=n;else{let e=t.length-1;if(a.startsWith("..")){let t=a.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:i=""}="string"==typeof e?Fl(e):e;return{pathname:n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}(n,t):t,search:Xl(r),hash:Yl(i)}}(i,o),c=a&&"/"!==a&&a.endsWith("/"),u=(s||"."===a)&&n.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}const Wl=e=>e.join("/").replace(/\/\/+/g,"/"),Xl=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Yl=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;const Zl=["post","put","patch","delete"],Jl=(new Set(Zl),["get",...Zl]);new Set(Jl),new Set([301,302,303,307,308]),new Set([307,308]),"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement;Symbol("deferred");
|
||
/**
|
||
* React Router v6.11.1
|
||
*
|
||
* Copyright (c) Remix Software Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE.md file in the root directory of this source tree.
|
||
*
|
||
* @license MIT
|
||
*/
|
||
function Kl(){return(Kl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}const ec=i.createContext(null);const tc=i.createContext(null);const nc=i.createContext(null);const rc=i.createContext({outlet:null,matches:[],isDataRoute:!1});function ic(){return null!=i.useContext(nc)}function oc(){return ic()||Il(!1),i.useContext(nc).location}function sc(e){i.useContext(tc).static||i.useLayoutEffect(e)}function ac(){let{isDataRoute:e}=i.useContext(rc);return e?function(){let{router:e}=dc(cc.UseNavigateStable),t=hc(uc.UseNavigateStable),n=i.useRef(!1);return sc(()=>{n.current=!0}),i.useCallback((function(r,i){void 0===i&&(i={}),n.current&&("number"==typeof r?e.navigate(r):e.navigate(r,Kl({fromRouteId:t},i)))}),[e,t])}():function(){ic()||Il(!1);let{basename:e,navigator:t}=i.useContext(tc),{matches:n}=i.useContext(rc),{pathname:r}=oc(),o=JSON.stringify(Hl(n).map(e=>e.pathnameBase)),s=i.useRef(!1);return sc(()=>{s.current=!0}),i.useCallback((function(n,i){if(void 0===i&&(i={}),!s.current)return;if("number"==typeof n)return void t.go(n);let a=Vl(n,JSON.parse(o),r,"path"===i.relative);"/"!==e&&(a.pathname="/"===a.pathname?e:Wl([e,a.pathname])),(i.replace?t.replace:t.push)(a,i.state,i)}),[e,t,o,r])}()}function lc(e,t){let{relative:n}=void 0===t?{}:t,{matches:r}=i.useContext(rc),{pathname:o}=oc(),s=JSON.stringify(Hl(r).map(e=>e.pathnameBase));return i.useMemo(()=>Vl(e,JSON.parse(s),o,"path"===n),[e,s,o,n])}i.Component;var cc,uc;function dc(e){let t=i.useContext(ec);return t||Il(!1),t}function hc(e){let t=function(e){let t=i.useContext(rc);return t||Il(!1),t}(),n=t.matches[t.matches.length-1];return n.route.id||Il(!1),n.route.id}!function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"}(cc||(cc={})),function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"}(uc||(uc={}));function pc(e){let{basename:t="/",children:n=null,location:r,navigationType:o=Pl.Pop,navigator:s,static:a=!1}=e;ic()&&Il(!1);let l=t.replace(/^\/*/,"/"),c=i.useMemo(()=>({basename:l,navigator:s,static:a}),[l,s,a]);"string"==typeof r&&(r=Fl(r));let{pathname:u="/",search:d="",hash:h="",state:p=null,key:f="default"}=r,m=i.useMemo(()=>{let e=ql(u,l);return null==e?null:{location:{pathname:e,search:d,hash:h,state:p,key:f},navigationType:o}},[l,u,d,h,p,f,o]);return null==m?null:i.createElement(tc.Provider,{value:c},i.createElement(nc.Provider,{children:n,value:m}))}var fc;!function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(fc||(fc={}));new Promise(()=>{});i.Component;
|
||
/**
|
||
* React Router DOM v6.11.1
|
||
*
|
||
* Copyright (c) Remix Software Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE.md file in the root directory of this source tree.
|
||
*
|
||
* @license MIT
|
||
*/
|
||
function mc(){return(mc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function gc(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}const bc=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function vc(e){let{basename:t,children:n,window:r}=e,o=i.useRef();null==o.current&&(o.current=Dl({window:r,v5Compat:!0}));let s=o.current,[a,l]=i.useState({action:s.action,location:s.location});return i.useLayoutEffect(()=>s.listen(l),[s]),i.createElement(pc,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s})}const yc="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Sc=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_c=i.forwardRef((function(e,t){let n,{onClick:r,relative:o,reloadDocument:s,replace:a,state:l,target:c,to:u,preventScrollReset:d}=e,h=gc(e,bc),{basename:p}=i.useContext(tc),f=!1;if("string"==typeof u&&Sc.test(u)&&(n=u,yc))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),n=ql(t.pathname,p);t.origin===e.origin&&null!=n?u=n+t.search+t.hash:f=!0}catch(e){}let m=function(e,t){let{relative:n}=void 0===t?{}:t;ic()||Il(!1);let{basename:r,navigator:o}=i.useContext(tc),{hash:s,pathname:a,search:l}=lc(e,{relative:n}),c=a;return"/"!==r&&(c="/"===a?r:Wl([r,a])),o.createHref({pathname:c,search:l,hash:s})}(u,{relative:o}),g=function(e,t){let{target:n,replace:r,state:o,preventScrollReset:s,relative:a}=void 0===t?{}:t,l=ac(),c=oc(),u=lc(e,{relative:a});return i.useCallback(t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let n=void 0!==r?r:zl(c)===zl(u);l(e,{replace:n,state:o,preventScrollReset:s,relative:a})}},[c,l,u,r,o,n,e,s,a])}(u,{replace:a,state:l,target:c,preventScrollReset:d,relative:o});return i.createElement("a",mc({},h,{href:n||m,onClick:f||s?r:function(e){r&&r(e),e.defaultPrevented||g(e)},ref:t,target:c}))}));var xc,wc;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(xc||(xc={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(wc||(wc={}));n(358);var kc=e=>{const{className:t,onClickHandler:n,ButtonIcon:r,buttonImage:i,buttonImageAltText:s,buttonText:a,buttonOuter:l,buttonOuterClassName:c,buttonRef:u,disabled:d,confirmText:h,href:p,text:f,title:m,label:g,buttonIconPosition:b="left"}=e,v=mi()("btn",t,{"btn--svg-only":!a}),y=e=>{h?Object(jl.confirmAlert)({message:h,buttons:[{label:"Yes",onClick:()=>n(e)},{label:"No"}]}):n(e)},S=e=>{e.stopPropagation()},_=p?o.a.createElement(_c,{ref:u,className:v,disabled:d,"aria-label":g,title:m,to:p,onClick:l?null:y,onKeyDown:S},i&&o.a.createElement("img",{src:i,alt:s,crossOrigin:"true"}),r&&"left"===b&&o.a.createElement(r,null),f&&o.a.createElement("span",null,f),r&&"right"===b&&o.a.createElement(r,null)):o.a.createElement("button",{ref:u,className:v,disabled:d,"aria-label":g,title:m,text:f,onClick:l?null:y,onKeyDown:S},i&&o.a.createElement("img",{src:i,alt:s,crossOrigin:"true"}),r&&"left"===b&&o.a.createElement(r,null),a&&o.a.createElement("span",null,a),r&&"right"===b&&o.a.createElement(r,null));return l?o.a.createElement("div",{className:mi()("btn-outer",{buttonOuterClassName:c}),onClick:y},_):_};n(359);var Oc=()=>{const e=Fn(e=>e.editor.isSplitView),t=Fn(e=>e.editor.codeRunTriggered),n=Fn(e=>e.editor.drawTriggered),r=Object(hi.useMediaQuery)({query:$o}),i=In(),{t:s}=Wi();return o.a.createElement("div",{className:"output-view-toggle"},o.a.createElement(kc,{className:"btn--tertiary output-view-toggle__button",buttonText:r?null:s(e?"outputViewToggle.buttonTabLabel":"outputViewToggle.buttonSplitLabel"),disabled:t||n,label:s(e?"outputViewToggle.buttonTabLabel":"outputViewToggle.buttonSplitLabel"),title:s(e?"outputViewToggle.buttonTabTitle":"outputViewToggle.buttonSplitTitle"),ButtonIcon:e?Rl:Ml,buttonIconPosition:"right",onClickHandler:e?()=>{i(wr(!1))}:()=>{i(wr(!0))}}))};var Ec=e=>{let{embedded:t=!1,className:n,...r}=e;const i=Fn(e=>e.editor.codeRunLoading),s=In();return o.a.createElement(kc,Object.assign({disabled:i,className:"btn--primary btn--run".concat(n?" ".concat(n):""),onClickHandler:()=>{window.plausible&&window.plausible("Run button".concat(t?" embedded":"")),s(jr())}},r))};var Ac,Tc=e=>{let{embedded:t=!1,className:n,...r}=e;const s=Fn(e=>e.editor.codeRunStopped),a=Fn(e=>e.editor.codeRunTriggered),l=In(),{t:c}=Wi(),u=o.a.createElement(kc,Object.assign({className:"btn--primary btn--stop".concat(n?" ".concat(n):""),onClickHandler:()=>{window.plausible&&window.plausible("Stop button".concat(t?" embedded":"")),a&&l(Pr()),l(Rr())}},r)),[d,h]=Object(i.useState)(u);return Object(i.useEffect)(()=>{if(s){const e=o.a.createElement(kc,{className:"".concat(n?" ".concat(n):""),buttonText:c("runButton.stopping"),disabled:!0});setTimeout(()=>{h(e)},100)}},[n,s,c]),d};function Cc(){return(Cc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Mc,$c=function(e){return i.createElement("svg",Cc({width:11,height:14,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Ac||(Ac=i.createElement("path",{d:"M0 14V0l11 7-11 7z"})))};function Pc(){return(Pc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Rc=function(e){return i.createElement("svg",Pc({width:12,height:12,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Mc||(Mc=i.createElement("path",{d:"M0 12V0h12v12H0z"})))};n(360);var jc=e=>{let{embedded:t=!1,skinny:n=!1}=e;const r=Fn(e=>e.editor.codeRunTriggered),i=Fn(e=>e.editor.drawTriggered),{t:s}=Wi();return o.a.createElement("div",{className:"runner-controls"},r||i?o.a.createElement(Tc,{embedded:t,buttonText:s("runButton.stop"),ButtonIcon:Rc,buttonIconPosition:"right",buttonOuter:n,className:"btn--stop btn--primary".concat(n?" btn--small":"")}):o.a.createElement(Ec,{embedded:t,buttonText:s("runButton.run"),ButtonIcon:$c,buttonIconPosition:"right",buttonOuter:n,className:n?"btn--small":""}))};var Nc=()=>{var e;const t=Object(i.useMemo)(()=>new Worker("./PyodideWorker.js",{type:"module"}),[]),n=Object(i.useRef)(),r=Object(i.useRef)(),s=Object(i.useRef)(),a=Fn(e=>e.editor.project.image_list),l=Fn(e=>e.editor.project.components),c=Fn(e=>e.editor.project.identifier),u=Fn(e=>e.auth.user),d=null==u||null===(e=u.profile)||void 0===e?void 0:e.user,h=Fn(e=>e.editor.isSplitView),p=Fn(e=>e.editor.isEmbedded),f=Fn(e=>e.editor.codeRunTriggered),m=Fn(e=>e.editor.codeRunStopped),g=Object(i.useRef)(),b=In(),{t:v}=Wi(),y=Object(i.useContext)(Po),S=Object(hi.useMediaQuery)({query:$o}),_=Fn(e=>e.editor.senseHatAlwaysEnabled),x="true"===new URLSearchParams(window.location.search).get("show_visual_tab"),[w,k]=Object(i.useState)(x||_),[O,E]=Object(i.useState)([]);Object(i.useEffect)(()=>{t.onmessage=e=>{let{data:t}=e;switch(t.method){case"handleLoading":A();break;case"handleLoaded":T(t.stdinBuffer,t.interruptBuffer);break;case"handleInput":C();break;case"handleOutput":M(t.stream,t.content);break;case"handleError":$(t.file,t.line,t.mistake,t.type,t.info);break;case"handleVisual":P(t.origin,t.content);break;case"handleSenseHatEvent":R(t.type);break;default:throw new Error("Unsupported method: ".concat(t.method))}}},[]),Object(i.useEffect)(()=>{f&&j()},[f]),Object(i.useEffect)(()=>{m&&N()},[m]);const A=()=>{b(ur())},T=(e,t)=>{r.current=e,n.current=t,b(dr()),F()},C=async()=>{if(s.current)return void(r.current[0]=-1);g.current.appendChild(I());const e=L(),{content:t,ctrlD:n}=await B(e),i=(new TextEncoder).encode(t+"\r\n"),o=r.current[0];r.current.set(i,o);const a=o+i.length;r.current[0]=a,n&&(s.current=!0)},M=(e,t)=>{const n=g.current,r=document.createElement("span");r.classList.add("pythonrunner-console-output-line"),r.classList.add(e),r.innerHTML=new Option(t||" ").innerHTML+"\n",n.appendChild(r),n.scrollTop=n.scrollHeight},$=(e,t,n,r,i)=>{let o;if("KeyboardInterrupt"===r)o=v("output.errors.interrupted");else{o=[[r,i].filter(e=>e).join(": "),"on line ".concat(t," of ").concat(e)].join(" "),n&&(o+=":\n".concat(n)),or(c,d,{errorType:r,errorMessage:o})}b(xr(o)),F()},P=(e,t)=>{k(!0),E(n=>[...n,{origin:e,content:t}])},R=e=>{console.log("handleSenseHatEvent")},j=async()=>{g.current.innerHTML="",b(xr("")),E([]),s.current=!1,await Promise.allSettled(a.map(e=>{let{filename:t,url:n}=e;return fetch(n).then(e=>e.arrayBuffer()).then(e=>D(t,e))}));for(const{name:e,extension:t,content:n}of l)D([e,t].join("."),n);const e=l[0].content;n.current&&(n.current[0]=0),t.postMessage({method:"runPython",python:e})},N=()=>{n.current&&(n.current[0]=2),t.postMessage({method:"stopPython"}),F()},D=(e,n)=>{t.postMessage({method:"writeFile",filename:e,content:n})},I=()=>{const e=document.createElement("span");return e.setAttribute("id","input"),e.setAttribute("spellCheck","false"),e.setAttribute("class","pythonrunner-input"),e.setAttribute("contentEditable","true"),e},L=()=>document.querySelector("editor-wc")?document.querySelector("editor-wc").shadowRoot.getElementById("input"):document.getElementById("input"),B=async e=>(e.focus(),new Promise((function(t,n){e.addEventListener("keydown",(function n(r){const i=r.ctrlKey&&"d"===r.key.toLowerCase(),o="Enter"===r.key||i;if(o){e.removeEventListener(r.type,n);const s=e.innerText;e.removeAttribute("id"),e.removeAttribute("contentEditable"),e.innerText=s+"\n",document.addEventListener("keyup",(function e(n){o&&(document.removeEventListener(n.type,e),t({content:s,ctrlD:i}))}))}}))}))),z=e=>{if(document.getSelection().toString().length>0)return;const t=L();if(t&&e.target!==t){const e=L(),t=window.getSelection();if(t.removeAllRanges(),e.innerText&&e.innerText.length>0){const n=document.createRange();n.setStart(e,1),n.collapse(!0),t.addRange(n)}e.focus()}},F=()=>{const e=L();e&&(e.removeAttribute("id"),e.removeAttribute("contentEditable"))};return o.a.createElement("div",{className:"pythonrunner-container"},h?o.a.createElement(o.a.Fragment,null,w&&o.a.createElement("div",{className:"output-panel output-panel--visual"},o.a.createElement(vo,{forceRenderTabPanel:!0},o.a.createElement("div",{className:"react-tabs__tab-container"},o.a.createElement(xo,null,o.a.createElement(Eo,{key:0},o.a.createElement("span",{className:"react-tabs__tab-text"},v("output.visualOutput")))),!p&&w&&o.a.createElement(Oc,null),!p&&S&&o.a.createElement(jc,{skinny:!0})),o.a.createElement(Mo,{key:0},o.a.createElement(El,{visuals:O,setVisuals:E})))),o.a.createElement("div",{className:"output-panel output-panel--text"},o.a.createElement(vo,{forceRenderTabPanel:!0},o.a.createElement("div",{className:"react-tabs__tab-container"},o.a.createElement(xo,null,o.a.createElement(Eo,{key:0},o.a.createElement("span",{className:"react-tabs__tab-text"},v("output.textOutput")))),!w&&!p&&S&&o.a.createElement(jc,{skinny:!0})),o.a.createElement(jo,null),o.a.createElement(Mo,{key:0},o.a.createElement("pre",{className:"pythonrunner-console pythonrunner-console--".concat(y.fontSize),onClick:z,ref:g}))))):o.a.createElement(vo,{forceRenderTabPanel:!0,defaultIndex:w?0:1},o.a.createElement("div",{className:"react-tabs__tab-container"},o.a.createElement(xo,null,w&&o.a.createElement(Eo,{key:0},o.a.createElement("span",{className:"react-tabs__tab-text"},v("output.visualOutput"))),o.a.createElement(Eo,{key:1},o.a.createElement("span",{className:"react-tabs__tab-text"},v("output.textOutput")))),!p&&w&&o.a.createElement(Oc,null),!p&&S&&o.a.createElement(jc,{skinny:!0})),o.a.createElement(jo,null),w&&o.a.createElement(Mo,{key:0},o.a.createElement(El,{visuals:O,setVisuals:E})),o.a.createElement(Mo,{key:1},o.a.createElement("pre",{className:"pythonrunner-console pythonrunner-console--".concat(y.fontSize),onClick:z,ref:g}))))};const Dc={setInstructions:(e,t)=>({...e,...t.payload}),setCurrentStepPosition:(e,t)=>{e.currentStepPosition=t.payload}},Ic=Object(qn.c)({name:"instructions",initialState:{currentStepPosition:0,project:{}},reducers:Dc}),{setCurrentStepPosition:Lc,setInstructions:Bc}=Ic.actions;var zc=Ic.reducer;const Fc={setUser:(e,t)=>{e.user=t.payload},removeUser:e=>{e.user=null}},Uc=Object(qn.c)({name:"auth",initialState:{},reducers:Fc}),{setUser:Qc,removeUser:qc}=Uc.actions;var Gc=Uc.reducer;var Hc=e=>t=>n=>r=>{if(r.type.startsWith("editor")){const n=localStorage.getItem("authKey");if(n){const r=JSON.parse(localStorage.getItem(n));JSON.stringify(t.getState().auth.user)!==JSON.stringify(r)&&t.dispatch(e(r))}}n(r)};var Vc=Object(qn.a)({reducer:{editor:di,instructions:zc,auth:Gc},middleware:e=>e({serializableCheck:{ignoredActions:["redux-oidc/USER_FOUND","redux-odic/SILENT_RENEW_ERROR"],ignoredPaths:["auth.user"]}}).concat(Hc(Qc))});var Wc=()=>{const e=Fn(e=>e.editor.codeRunTriggered),t=Fn(e=>e.editor.drawTriggered),n=Fn(e=>e.editor.senseHatAlwaysEnabled),r=Fn(e=>e.editor.senseHatEnabled),s=Fn(e=>e.editor.project.image_list),a=Fn(e=>e.editor.error),l=Object(i.useRef)(),c=Object(i.useRef)(),u=Object(i.useRef)(),d=In(),{t:h}=Wi();return Object(i.useEffect)(()=>{e&&(l.current.innerHTML="",c.current.innerHTML="",u.current.innerHTML="",window.py5||(window.py5={}),window.py5.sketch="p5Sketch",window.p5||(window.p5={}),window.p5.sketch="p5Sketch",window.assets=s,($s.a.pygal||($s.a.pygal={})).outputCanvas=c.current,($s.a.TurtleGraphics||($s.a.TurtleGraphics={})).target=l.current,$s.a.TurtleGraphics.assets=Object.assign({},...s.map(e=>({["".concat(e.name,".").concat(e.extension)]:e.url}))))},[e,s]),Object(i.useEffect)(()=>{var e,n;!t&&u.current&&""!==u.current.innerHTML&&(null!==(e=window.p5)&&void 0!==e&&e.stop?window.p5.stop():null!==(n=window.py5)&&void 0!==n&&n.stop&&window.py5.stop(),""===a&&d(xr(h("output.errors.interrupted"))),d(dr()))},[t,d,h,a]),o.a.createElement("div",{className:"visual-output"},o.a.createElement("div",{id:"p5Sketch",ref:u}),o.a.createElement("div",{id:"pygalOutput",ref:c}),o.a.createElement("div",{className:"pythonrunner-canvas-container"},o.a.createElement("div",{id:"turtleOutput",ref:l,className:"pythonrunner-graphic"})),r||n?o.a.createElement(yl,null):null)};const Xc={"./pygal/__init__.js":{path:"".concat("https://editor-static.raspberrypi.org/releases/v0.27.1","/shims/pygal/pygal.js"),dependencies:["https://cdnjs.cloudflare.com/ajax/libs/highcharts/6.0.2/highcharts.js","https://cdnjs.cloudflare.com/ajax/libs/highcharts/6.0.2/js/highcharts-more.js"]},"./py5/__init__.js":{path:"".concat("https://editor-static.raspberrypi.org/releases/v0.27.1","/shims/processing/py5/py5-shim.js"),dependencies:["".concat("https://editor-static.raspberrypi.org/releases/v0.27.1","/libraries/processing/p5/p5.js")]},"./py5_imported/__init__.js":{path:"".concat("https://editor-static.raspberrypi.org/releases/v0.27.1","/shims/processing/py5_imported_mode/py5_imported.js")},"./py5_imported_mode.py":{path:"".concat("https://editor-static.raspberrypi.org/releases/v0.27.1","/shims/processing/py5_imported_mode/py5_imported_mode.py")},"./p5/__init__.js":{path:"".concat("https://editor-static.raspberrypi.org/releases/v0.27.1","/shims/processing/p5/p5-shim.js"),dependencies:["".concat("https://editor-static.raspberrypi.org/releases/v0.27.1","/libraries/processing/p5/p5.js")]},"./_internal_sense_hat/__init__.js":{path:"".concat("https://editor-static.raspberrypi.org/releases/v0.27.1","/shims/sense_hat/_internal_sense_hat.js")},"./sense_hat.py":{path:"".concat("https://editor-static.raspberrypi.org/releases/v0.27.1","/shims/sense_hat/sense_hat_blob.py")}};var Yc=e=>{let{outputPanels:t=["text","visual"]}=e;const n=Fn(e=>e.editor.project.components),r=null==n?void 0:n.find(e=>"main"===e.name&&"py"===e.extension),s=Fn(e=>e.editor.project.identifier),a=Fn(e=>e.auth.user),l=Fn(e=>e.editor.isSplitView),c=Fn(e=>e.editor.isEmbedded),u=Fn(e=>e.editor.isOutputOnly),d=Fn(e=>e.editor.codeRunTriggered),h=Fn(e=>e.editor.codeRunStopped),p=Fn(e=>e.editor.drawTriggered),f=Fn(e=>e.editor.senseHatAlwaysEnabled),m=Object(i.useRef)(),g=In(),{t:b}=Wi(),v=Object(i.useContext)(Po),y=Object(hi.useMediaQuery)({query:$o}),S=new URLSearchParams(window.location.search),[_,x]=Object(i.useState)("true"===S.get("show_visual_tab")||f),w=()=>{const e=document.getElementById("input"),t=document.querySelector("editor-wc")?document.querySelector("editor-wc").shadowRoot.getElementById("input"):null;return e||t};Object(i.useEffect)(()=>{d&&C()},[d]),Object(i.useEffect)(()=>{if(h&&w()){const e=w();e.removeAttribute("id"),e.removeAttribute("contentEditable"),g(xr(b("output.errors.interrupted"))),g(dr())}},[h]),Object(i.useEffect)(()=>{if(!d&&!p&&w()){const e=w();e.removeAttribute("id"),e.removeAttribute("contentEditable")}},[p,d]);const k=["./pygal/__init__.js","./py5/__init__.js","./py5_imported/__init__.js","./p5/__init__.js","./_internal_sense_hat/__init__.js","src/builtin/turtle/__init__.js"],O=e=>{if(""!==e){const t=m.current;if(t){const n=document.createElement("span");n.classList.add("pythonrunner-console-output-line"),n.innerHTML=new Option(e).innerHTML,t.appendChild(n),t.scrollTop=t.scrollHeight}}},E=e=>{if("./_internal_sense_hat/__init__.js"===e&&g(Mr(!0)),"./p5/__init__.js"!==e&&"./py5/__init__.js"!==e||g(Nr()),k.includes(e)&&x(!0),n.filter(e=>"main"!==e.name).map(e=>"./".concat(e.name,".py")).includes(e)){let t=e.slice(2,-3),r=n.find(e=>e.name===t);if(r)return r.content}if(void 0!==$s.a.builtinFiles&&void 0!==$s.a.builtinFiles.files[e])return $s.a.builtinFiles.files[e];if(Xc[e]){var t=Xc[e];return Xc[e].code||$s.a.misceval.promiseToSuspension(fetch(t.path).then(e=>e.text()).then(n=>{if(!n)throw new $s.a.builtin.ImportError("Failed to load remote module");function r(e){if(!document.querySelector('script[src="'.concat(e,'"]')))return new Promise((function(t,n){let r=document.createElement("script");r.type="text/javascript",r.src=e,r.async=!0,r.onload=function(){t(!0)},document.body.appendChild(r)}))}return Xc[e].code=n,(t.loadDepsSynchronously?(t.dependencies||[]).reduce((e,t)=>e.then(()=>r(t)),Promise.resolve()):Promise.all((t.dependencies||[]).map(r))).then((function(){return n})).catch((function(){throw new $s.a.builtin.ImportError("Failed to load dependencies required")}))}))}throw new Error("File not found: '"+e+"'")},A=function(){$s.a.sense_hat&&($s.a.sense_hat.mz_criteria.noInputEvents=!1);m.current.appendChild((()=>{const e=document.createElement("span");return e.setAttribute("id","input"),e.setAttribute("spellCheck","false"),e.setAttribute("class","pythonrunner-input"),e.setAttribute("contentEditable","true"),e})());const e=w();return e.focus(),new Promise((function(t,n){e.addEventListener("keydown",(function n(r){if("Enter"===r.key){e.removeEventListener(r.type,n);const i=e.innerText;e.removeAttribute("id"),e.removeAttribute("contentEditable"),e.innerText=i+"\n",document.addEventListener("keyup",(function e(n){"Enter"===n.key&&(document.removeEventListener(n.type,e),t(i))}))}}))}))},T=e=>{let t,n={};if(e.message===b("output.errors.interrupted"))t=e.message,n={type:"Interrupted",message:t};else{const i=(e.tp$str&&e.tp$str().v).replace(/\[(.*?)\]/,"").replace(/\.$/,""),o=e.tp$name||e.constructor.name,l=e.traceback[0].lineno,c=e.traceback[0].filename.replace(/^\.\//,"");let u;var r;if(null!=a&&a.profile)u=null===(r=a.profile)||void 0===r?void 0:r.user;t="".concat(o,": ").concat(i," on line ").concat(l," of ").concat(c),or(s,u,{errorType:o,errorMessage:t}),n={type:o,line:l,file:c,description:i,message:t}}if(g(xr(t)),g(ui(n)),g(Rr()),w()){const e=w();e.removeAttribute("id"),e.removeAttribute("contentEditable")}},C=()=>{g(xr("")),g(ui({})),m.current&&(m.current.innerHTML=""),g(Mr(!1));var e=(null==r?void 0:r.content)||"";e.includes("# ".concat(b("input.comment.py5")))&&((e=e.replace("# ".concat(b("input.comment.py5")),"from py5_imported_mode import *")).match(/(\nrun_sketch)/)||(e=e.concat("\nrun_sketch()"))),$s.a.configure({inputfun:A,output:O,read:E,debugging:!0,inputTakesPrompt:!0,uncaughtException:T}),$s.a.misceval.asyncToPromise(()=>$s.a.importMainWithBody("main",!1,e,!0),{"*":()=>{if(Vc.getState().editor.codeRunStopped)throw new Error(b("output.errors.interrupted"))}}).catch(e=>{T(e)}).finally(()=>{g(dr())}).then((function(e){}))};function M(e){if(document.getSelection().toString().length>0)return;const t=w();if(t&&e.target!==t){const e=w(),t=window.getSelection();if(t.removeAllRanges(),e.innerText&&e.innerText.length>0){const n=document.createRange();n.setStart(e,1),n.collapse(!0),t.addRange(n)}e.focus()}}const $=1===t.length,P=t.includes("visual"),R=t.includes("text"),j=e=>mi()("output-panel","output-panel--".concat(e),{"output-panel--single":$});return o.a.createElement("div",{className:"pythonrunner-container"},l||$?o.a.createElement(o.a.Fragment,null,_&&P&&o.a.createElement("div",{className:j("visual")},o.a.createElement(vo,{forceRenderTabPanel:!0},o.a.createElement("div",{className:mi()("react-tabs__tab-container",{"react-tabs__tab-container--hidden":$})},o.a.createElement(xo,null,o.a.createElement(Eo,{key:0},o.a.createElement("span",{className:"react-tabs__tab-text"},b("output.visualOutput")))),!c&&_&&o.a.createElement(Oc,null),!c&&y&&o.a.createElement(jc,{skinny:!0})),o.a.createElement(Mo,{key:0},o.a.createElement(Wc,null)))),R&&o.a.createElement("div",{className:j("text")},o.a.createElement(vo,{forceRenderTabPanel:!0},o.a.createElement("div",{className:mi()("react-tabs__tab-container",{"react-tabs__tab-container--hidden":$})},o.a.createElement(xo,null,o.a.createElement(Eo,{key:0},o.a.createElement("span",{className:"react-tabs__tab-text"},b("output.textOutput")))),!_&&!c&&y&&o.a.createElement(jc,{skinny:!0})),o.a.createElement(jo,null),o.a.createElement(Mo,{key:0},o.a.createElement("pre",{className:"pythonrunner-console pythonrunner-console--".concat(v.fontSize),onClick:M,ref:m}))))):o.a.createElement(vo,{forceRenderTabPanel:!0,defaultIndex:_?0:1},o.a.createElement("div",{className:"react-tabs__tab-container"},o.a.createElement(xo,null,_?o.a.createElement(Eo,{key:0},o.a.createElement("span",{className:"react-tabs__tab-text"},b("output.visualOutput"))):null,o.a.createElement(Eo,{key:1},o.a.createElement("span",{className:"react-tabs__tab-text"},b("output.textOutput")))),!c&&_&&o.a.createElement(Oc,null),!c&&y&&o.a.createElement(jc,{skinny:!0})),!u&&o.a.createElement(jo,null),_?o.a.createElement(Mo,{key:0},o.a.createElement(Wc,null)):null,o.a.createElement(Mo,{key:1},o.a.createElement("pre",{className:"pythonrunner-console pythonrunner-console--".concat(v.fontSize),onClick:M,ref:m}))))},Zc=(n(361),n(112)),Jc=n(111),Kc=n.n(Jc);const eu=new RegExp("^".concat("https://rpf.io/")),tu=new RegExp("^".concat("https://editor.raspberrypi.org//releases/v0.27.1")),nu=[new RegExp("^#[a-zA-Z0-9]+")],ru=[eu,tu],iu=(e,t)=>e.some(e=>e.test(t));var ou;function su(){return(su=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var au=function(e){return i.createElement("svg",su({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),ou||(ou=i.createElement("path",{d:"M2.167.5A1.68 1.68 0 00.5 2.167v11.666c0 .911.756 1.667 1.667 1.667h11.666a1.68 1.68 0 001.667-1.667V8h-1.667v5.833H2.167V2.167H8V.5H2.167zm7.5 0v1.667h2.988L4.91 9.91l1.178 1.178 7.744-7.744v2.988H15.5V.5H9.667z"})))};var lu=function(){const e=Fn(e=>e.editor.project),t=e.components,n=e.image_list,r=Fn(e=>e.editor.focussedFileIndices)[0],s=Fn(e=>e.editor.openFiles)[0],a=Fn(e=>e.editor.codeRunTriggered),l=Fn(e=>e.editor.justLoaded),c=Fn(e=>e.editor.isEmbedded),u=Fn(e=>e.editor.autorunEnabled),d=Fn(e=>e.editor.codeHasBeenRun),h=Fn(e=>e.editor.browserPreview),p=Fn(e=>e.editor.page),{t:f,i18n:m}=Wi(),g=m.language,b=In(),v=Object(i.useRef)(null),y=Object(hi.useMediaQuery)({query:$o}),S=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.endsWith(".html")};let _="index.html";c&&p&&S(p)&&(e=>t.some(t=>"".concat(t.name,".").concat(t.extension)===e))(p)?_=p:!c&&S(s[r])&&(_=s[r]);const[x,w]=Object(i.useState)(_),[k,O]=Object(i.useState)(x),E=()=>{b(Gr()),j()},{externalLink:A,setExternalLink:T,handleAllowedExternalLink:C,handleRegularExternalLink:M,handleExternalLinkError:$}=(e=>{const t=In(),[n,r]=Object(i.useState)();return{externalLink:n,setExternalLink:r,handleAllowedExternalLink:e=>{r(e),t(jr())},handleRegularExternalLink:(e,n)=>{r(null),n("".concat(e,".html")),t(jr())},handleExternalLinkError:()=>{t(xr("externalLink")),e()}}})(E),P=(e,t)=>{const n=new Blob([e],{type:t});return URL.createObjectURL(n)},R=(e,t)=>{var n;return(null===(n=e.parentNode)||void 0===n?void 0:n.tagName)&&e.parentNode.tagName.toLowerCase()===t},j=()=>{window.addEventListener("message",e=>{var t,n,r;"string"==typeof(null===(t=e.data)||void 0===t?void 0:t.msg)&&("ERROR: External link"===(null===(n=e.data)||void 0===n?void 0:n.msg)?$(E):"Allowed external link"===(null===(r=e.data)||void 0===r?void 0:r.msg)?C(e.data.payload.linkTo):M(e.data.payload.linkTo,w))})};let N;Object(i.useEffect)(()=>{j()},[]),Object(i.useEffect)(()=>{if(l&&c)b(jr());else if(!l&&u)return N=setTimeout(()=>{b(jr())},2e3),()=>clearTimeout(N)},[x]),Object(i.useEffect)(()=>{a&&L()},[a]),Object(i.useEffect)(()=>{A||c||!S(s[r])||w(s[r])},[r,s]),Object(i.useEffect)(()=>{c&&h&&b(vr(k))},[k]);const D=(e,t)=>{e.querySelectorAll("[href]").forEach(e=>{var r;const i=t.find(t=>"".concat(t.name,".").concat(t.extension)===e.attrs.href);let o;if("_blank"===(null===(r=e.attrs)||void 0===r?void 0:r.target)&&e.removeAttribute("target"),i)if(R(e,"head")){const t=P((e=>{var t={...e};return"css"===e.extension&&n.forEach(e=>{const n=new RegExp("['\"]".concat(e.filename,"['\"]"),"g"),r='"'.concat(e.url,'"');t.content=t.content.replaceAll(n,r)}),t})(i).content,Kc.a.lookup("".concat(i.name,".").concat(i.extension)));e.setAttribute("href",t)}else e.setAttribute("href","javascript:void(0)"),o="window.parent.postMessage({msg: 'RELOAD', payload: { linkTo: '".concat(i.name,"' }})");else{const t=iu(ru,e.attrs.href);iu(nu,e.attrs.href)||t||R(e,"head")?t&&(o="window.parent.postMessage({msg: 'Allowed external link', payload: { linkTo: '".concat(e.attrs.href,"' }})")):(e.setAttribute("href","javascript:void(0)"),o="window.parent.postMessage({msg: 'ERROR: External link'})")}o&&(e.removeAttribute("target"),e.setAttribute("onclick",o))})},I=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"src";const i=e.querySelectorAll("[".concat(r,"]"));i.forEach(e=>{const i=t.find(t=>t.filename===e.attrs[r]),o=n.find(t=>"".concat(t.name,".").concat(t.extension)===e.attrs[r]);let s="";i?s=i.url:o?s=P(o.content,Kc.a.lookup("".concat(o.name,".").concat(o.extension))):iu(ru,e.attrs[r])&&(s=e.attrs[r]),e.setAttribute(r,s),e.setAttribute("crossorigin",!0)})},L=()=>{if(O(x),A)v.current.src=A,b(dr());else{const e=Object(Zc.parse)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"index.html";return t.filter(t=>"".concat(t.name,".").concat(t.extension)===e)[0]}(x).content),r=e.querySelector("body")||e,i="\n <script>\n (function() {\n const originalGetItem = window.localStorage.getItem.bind(window.localStorage);\n const originalSetItem = window.localStorage.setItem.bind(window.localStorage);\n const originalRemoveItem = window.localStorage.removeItem.bind(window.localStorage);\n const originalClear = window.localStorage.clear.bind(window.localStorage);\n\n const isDisallowedKey = (key) => key === 'authKey' || key.startsWith('oidc.');\n\n Object.defineProperty(window, 'localStorage', {\n value: {\n getItem: function(key) {\n if (isDisallowedKey(key)) {\n console.log(`localStorage.getItem for \"${key}\" is disabled`);\n return null;\n }\n return originalGetItem(key);\n },\n setItem: function(key, value) {\n if (isDisallowedKey(key)) {\n console.log(`localStorage.setItem for \"${key}\" is disabled`);\n return;\n }\n return originalSetItem(key, value);\n },\n removeItem: function(key) {\n if (isDisallowedKey(key)) {\n console.log(`localStorage.removeItem for \"${key}\" is disabled`);\n return;\n }\n return originalRemoveItem(key);\n },\n clear: function() {\n console.log('localStorage.clear is disabled');\n return;\n }\n },\n writable: false,\n configurable: false\n });\n })();\n <\/script>\n ";r.insertAdjacentHTML("afterbegin",i),D(e,t),I(e,n,t),I(e,n,t,"data-src"),r.appendChild(Object(Zc.parse)('<meta filename="'.concat(x,'" />')));const o=P(e.toString(),"text/html");v.current.src=o,a&&b(dr())}};return o.a.createElement("div",{className:"htmlrunner-container"},c||u||d?o.a.createElement(vo,null,o.a.createElement("div",{className:"react-tabs__tab-container"},o.a.createElement(xo,null,o.a.createElement(Eo,null,o.a.createElement("span",{className:"react-tabs__tab-text"},"".concat(k," ").concat(f("output.preview")))),!c&&o.a.createElement("a",{className:"btn btn--tertiary htmlrunner-link",target:"_blank",href:"/".concat(g,"/embed/viewer/").concat(e.identifier,"?browserPreview=true&page=").concat(encodeURI(k)),rel:"noreferrer"},o.a.createElement("span",{className:"htmlrunner-link__text"},f("output.newTab")),o.a.createElement(au,null))),!c&&y?o.a.createElement(jc,{skinny:!0}):null),o.a.createElement(Mo,null,o.a.createElement("iframe",{className:"htmlrunner-iframe",id:"output-frame",title:f("runners.HtmlOutput"),ref:v,onLoad:()=>{const e=v.current.contentDocument;let t=(e=>{let t;return t=e&&e.querySelectorAll("meta[filename]")[0]?e.querySelectorAll("meta[filename]")[0].getAttribute("filename"):A,t})(e);if(k!==t&&O(t),e){const t=e.querySelector("a");t&&t.addEventListener("click",e=>{e.preventDefault(),v.current.contentDocument.href=t.getAttribute("href")})}T(null)}}))):null)};var cu=e=>{let{projectType:t,usePyodide:n,outputPanels:r=["text","visual"]}=e;const i="html"===t?lu:n?Nc:Yc,s="html"===t?{}:{outputPanels:r};return o.a.createElement(i,s)};n(370);var uu=e=>{let{embedded:t=!1}=e;return o.a.createElement("div",{className:"run-bar"},o.a.createElement(jc,{embedded:t}))};var du=e=>{let{outputPanels:t=["text","visual"]}=e;const n=Fn(e=>e.editor.project),r=Fn(e=>e.editor.isEmbedded),i=new URLSearchParams(window.location.search),s="true"===i.get("browserPreview"),a="true"===i.get("pyodide");return o.a.createElement(o.a.Fragment,null,o.a.createElement(gi,null),o.a.createElement("div",{className:"proj-runner-container","data-testid":"output"},o.a.createElement(cu,{projectType:n.project_type,usePyodide:a,outputPanels:t}),r&&!s&&o.a.createElement(uu,{embedded:!0})))};function hu(){return(hu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function pu(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function fu(e){return"number"==typeof e&&!isNaN(e)}function mu(e){return"boolean"==typeof e}function gu(e){return"string"==typeof e}function bu(e){return"function"==typeof e}function vu(e){return gu(e)||bu(e)?e:null}function yu(e){return 0===e||e}var Su=!("undefined"==typeof window||!window.document||!window.document.createElement);function _u(e){return Object(i.isValidElement)(e)||gu(e)||bu(e)||fu(e)}var xu={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},wu={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"};function ku(e){var t=e.enter,n=e.exit,r=e.appendPosition,s=void 0!==r&&r,a=e.collapse,l=void 0===a||a,c=e.collapseDuration,u=void 0===c?300:c;return function(e){var r=e.children,a=e.position,c=e.preventExitTransition,d=e.done,h=e.nodeRef,p=e.isIn,f=s?t+"--"+a:t,m=s?n+"--"+a:n,g=Object(i.useRef)(),b=Object(i.useRef)(0);function v(e){if(e.target===h.current){var t=h.current;t.dispatchEvent(new Event("d")),t.removeEventListener("animationend",v),t.removeEventListener("animationcancel",v),0===b.current&&(t.className=g.current)}}function y(){var e=h.current;e.removeEventListener("animationend",y),l?function(e,t,n){void 0===n&&(n=300);var r=e.scrollHeight,i=e.style;requestAnimationFrame((function(){i.minHeight="initial",i.height=r+"px",i.transition="all "+n+"ms",requestAnimationFrame((function(){i.height="0",i.padding="0",i.margin="0",setTimeout(t,n)}))}))}(e,d,u):d()}return Object(i.useLayoutEffect)((function(){var e;e=h.current,g.current=e.className,e.className+=" "+f,e.addEventListener("animationend",v),e.addEventListener("animationcancel",v)}),[]),Object(i.useEffect)((function(){p||(c?y():function(){b.current=1;var e=h.current;e.className+=" "+m,e.addEventListener("animationend",y)}())}),[p]),o.a.createElement(o.a.Fragment,null,r)}}var Ou={list:new Map,emitQueue:new Map,on:function(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off:function(e,t){if(t){var n=this.list.get(e).filter((function(e){return e!==t}));return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit:function(e){var t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.list.has(e)&&this.list.get(e).forEach((function(n){var i=setTimeout((function(){n.apply(void 0,r)}),0);t.emitQueue.has(e)||t.emitQueue.set(e,[]),t.emitQueue.get(e).push(i)}))}},Eu=["delay","staleId"];function Au(e){var t=Object(i.useReducer)((function(e){return e+1}),0)[1],n=Object(i.useState)([]),r=n[0],o=n[1],s=Object(i.useRef)(null),a=Object(i.useRef)(new Map).current,l=function(e){return-1!==r.indexOf(e)},c=Object(i.useRef)({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:l,getToast:function(e){return a.get(e)}}).current;function u(e){var t=e.containerId;!c.props.limit||t&&c.containerId!==t||(c.count-=c.queue.length,c.queue=[])}function d(e){o((function(t){return yu(e)?t.filter((function(t){return t!==e})):[]}))}function h(){var e=c.queue.shift();f(e.toastContent,e.toastProps,e.staleId)}function p(e,n){var r=n.delay,o=n.staleId,l=pu(n,Eu);if(_u(e)&&!function(e){return!s.current||c.props.enableMultiContainer&&e.containerId!==c.props.containerId||a.has(e.toastId)&&null==e.updateId}(l)){var u=l.toastId,p=l.updateId,m=l.data,g=c.props,b=function(){return d(u)},v=null==p;v&&c.count++;var y,S,_={toastId:u,updateId:p,isLoading:l.isLoading,theme:l.theme||g.theme,icon:null!=l.icon?l.icon:g.icon,isIn:!1,key:l.key||c.toastKey++,type:l.type,closeToast:b,closeButton:l.closeButton,rtl:g.rtl,position:l.position||g.position,transition:l.transition||g.transition,className:vu(l.className||g.toastClassName),bodyClassName:vu(l.bodyClassName||g.bodyClassName),style:l.style||g.toastStyle,bodyStyle:l.bodyStyle||g.bodyStyle,onClick:l.onClick||g.onClick,pauseOnHover:mu(l.pauseOnHover)?l.pauseOnHover:g.pauseOnHover,pauseOnFocusLoss:mu(l.pauseOnFocusLoss)?l.pauseOnFocusLoss:g.pauseOnFocusLoss,draggable:mu(l.draggable)?l.draggable:g.draggable,draggablePercent:l.draggablePercent||g.draggablePercent,draggableDirection:l.draggableDirection||g.draggableDirection,closeOnClick:mu(l.closeOnClick)?l.closeOnClick:g.closeOnClick,progressClassName:vu(l.progressClassName||g.progressClassName),progressStyle:l.progressStyle||g.progressStyle,autoClose:!l.isLoading&&(y=l.autoClose,S=g.autoClose,!1===y||fu(y)&&y>0?y:S),hideProgressBar:mu(l.hideProgressBar)?l.hideProgressBar:g.hideProgressBar,progress:l.progress,role:l.role||g.role,deleteToast:function(){a.delete(u);var e=c.queue.length;if(c.count=yu(u)?c.count-1:c.count-c.displayedToast,c.count<0&&(c.count=0),e>0){var n=yu(u)?1:c.props.limit;if(1===e||1===n)c.displayedToast++,h();else{var r=n>e?e:n;c.displayedToast=r;for(var i=0;i<r;i++)h()}}else t()}};bu(l.onOpen)&&(_.onOpen=l.onOpen),bu(l.onClose)&&(_.onClose=l.onClose),_.closeButton=g.closeButton,!1===l.closeButton||_u(l.closeButton)?_.closeButton=l.closeButton:!0===l.closeButton&&(_.closeButton=!_u(g.closeButton)||g.closeButton);var x=e;Object(i.isValidElement)(e)&&!gu(e.type)?x=Object(i.cloneElement)(e,{closeToast:b,toastProps:_,data:m}):bu(e)&&(x=e({closeToast:b,toastProps:_,data:m})),g.limit&&g.limit>0&&c.count>g.limit&&v?c.queue.push({toastContent:x,toastProps:_,staleId:o}):fu(r)&&r>0?setTimeout((function(){f(x,_,o)}),r):f(x,_,o)}}function f(e,t,n){var r=t.toastId;n&&a.delete(n),a.set(r,{content:e,props:t}),o((function(e){return[].concat(e,[r]).filter((function(e){return e!==n}))}))}return Object(i.useEffect)((function(){return c.containerId=e.containerId,Ou.cancelEmit(3).on(0,p).on(1,(function(e){return s.current&&d(e)})).on(5,u).emit(2,c),function(){return Ou.emit(3,c)}}),[]),Object(i.useEffect)((function(){c.isToastActive=l,c.displayedToast=r.length,Ou.emit(4,r.length,e.containerId)}),[r]),Object(i.useEffect)((function(){c.props=e})),{getToastToRender:function(t){var n=new Map,r=Array.from(a.values());return e.newestOnTop&&r.reverse(),r.forEach((function(e){var t=e.props.position;n.has(t)||n.set(t,[]),n.get(t).push(e)})),Array.from(n,(function(e){return t(e[0],e[1])}))},containerRef:s,isToastActive:l}}function Tu(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function Cu(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function Mu(e){var t=Object(i.useState)(!1),n=t[0],r=t[1],o=Object(i.useState)(!1),s=o[0],a=o[1],l=Object(i.useRef)(null),c=Object(i.useRef)({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,u=Object(i.useRef)(e),d=e.autoClose,h=e.pauseOnHover,p=e.closeToast,f=e.onClick,m=e.closeOnClick;function g(t){if(e.draggable){c.didMove=!1,document.addEventListener("mousemove",S),document.addEventListener("mouseup",_),document.addEventListener("touchmove",S),document.addEventListener("touchend",_);var n=l.current;c.canCloseOnClick=!0,c.canDrag=!0,c.boundingRect=n.getBoundingClientRect(),n.style.transition="",c.x=Tu(t.nativeEvent),c.y=Cu(t.nativeEvent),"x"===e.draggableDirection?(c.start=c.x,c.removalDistance=n.offsetWidth*(e.draggablePercent/100)):(c.start=c.y,c.removalDistance=n.offsetHeight*(80===e.draggablePercent?1.5*e.draggablePercent:e.draggablePercent/100))}}function b(){if(c.boundingRect){var t=c.boundingRect,n=t.top,r=t.bottom,i=t.left,o=t.right;e.pauseOnHover&&c.x>=i&&c.x<=o&&c.y>=n&&c.y<=r?y():v()}}function v(){r(!0)}function y(){r(!1)}function S(t){var r=l.current;c.canDrag&&r&&(c.didMove=!0,n&&y(),c.x=Tu(t),c.y=Cu(t),"x"===e.draggableDirection?c.delta=c.x-c.start:c.delta=c.y-c.start,c.start!==c.x&&(c.canCloseOnClick=!1),r.style.transform="translate"+e.draggableDirection+"("+c.delta+"px)",r.style.opacity=""+(1-Math.abs(c.delta/c.removalDistance)))}function _(){document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",_),document.removeEventListener("touchmove",S),document.removeEventListener("touchend",_);var t=l.current;if(c.canDrag&&c.didMove&&t){if(c.canDrag=!1,Math.abs(c.delta)>c.removalDistance)return a(!0),void e.closeToast();t.style.transition="transform 0.2s, opacity 0.2s",t.style.transform="translate"+e.draggableDirection+"(0)",t.style.opacity="1"}}Object(i.useEffect)((function(){u.current=e})),Object(i.useEffect)((function(){return l.current&&l.current.addEventListener("d",v,{once:!0}),bu(e.onOpen)&&e.onOpen(Object(i.isValidElement)(e.children)&&e.children.props),function(){var e=u.current;bu(e.onClose)&&e.onClose(Object(i.isValidElement)(e.children)&&e.children.props)}}),[]),Object(i.useEffect)((function(){return e.pauseOnFocusLoss&&function(){document.hasFocus()||y();window.addEventListener("focus",v),window.addEventListener("blur",y)}(),function(){e.pauseOnFocusLoss&&(window.removeEventListener("focus",v),window.removeEventListener("blur",y))}}),[e.pauseOnFocusLoss]);var x={onMouseDown:g,onTouchStart:g,onMouseUp:b,onTouchEnd:b};return d&&h&&(x.onMouseEnter=y,x.onMouseLeave=v),m&&(x.onClick=function(e){f&&f(e),c.canCloseOnClick&&p()}),{playToast:v,pauseToast:y,isRunning:n,preventExitTransition:s,toastRef:l,eventHandlers:x}}function $u(e){var t=e.closeToast,n=e.theme,r=e.ariaLabel,o=void 0===r?"close":r;return Object(i.createElement)("button",{className:"Toastify__close-button Toastify__close-button--"+n,type:"button",onClick:function(e){e.stopPropagation(),t(e)},"aria-label":o},Object(i.createElement)("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},Object(i.createElement)("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function Pu(e){var t,n,r=e.delay,o=e.isRunning,s=e.closeToast,a=e.type,l=e.hide,c=e.className,u=e.style,d=e.controlledProgress,h=e.progress,p=e.rtl,f=e.isIn,m=e.theme,g=hu({},u,{animationDuration:r+"ms",animationPlayState:o?"running":"paused",opacity:l?0:1});d&&(g.transform="scaleX("+h+")");var b=ro("Toastify__progress-bar",d?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar-theme--"+m,"Toastify__progress-bar--"+a,((t={})["Toastify__progress-bar--rtl"]=p,t)),v=bu(c)?c({rtl:p,type:a,defaultClassName:b}):ro(b,c),y=((n={})[d&&h>=1?"onTransitionEnd":"onAnimationEnd"]=d&&h<1?null:function(){f&&s()},n);return Object(i.createElement)("div",Object.assign({role:"progressbar","aria-hidden":l?"true":"false","aria-label":"notification timer",className:v,style:g},y))}Pu.defaultProps={type:wu.DEFAULT,hide:!1};var Ru=["theme","type"],ju=function(e){var t=e.theme,n=e.type,r=pu(e,Ru);return Object(i.createElement)("svg",Object.assign({viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===t?"currentColor":"var(--toastify-icon-color-"+n+")"},r))};var Nu={info:function(e){return Object(i.createElement)(ju,Object.assign({},e),Object(i.createElement)("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return Object(i.createElement)(ju,Object.assign({},e),Object(i.createElement)("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return Object(i.createElement)(ju,Object.assign({},e),Object(i.createElement)("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return Object(i.createElement)(ju,Object.assign({},e),Object(i.createElement)("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return Object(i.createElement)("div",{className:"Toastify__spinner"})}},Du=function(e){var t,n,r=Mu(e),o=r.isRunning,s=r.preventExitTransition,a=r.toastRef,l=r.eventHandlers,c=e.closeButton,u=e.children,d=e.autoClose,h=e.onClick,p=e.type,f=e.hideProgressBar,m=e.closeToast,g=e.transition,b=e.position,v=e.className,y=e.style,S=e.bodyClassName,_=e.bodyStyle,x=e.progressClassName,w=e.progressStyle,k=e.updateId,O=e.role,E=e.progress,A=e.rtl,T=e.toastId,C=e.deleteToast,M=e.isIn,$=e.isLoading,P=e.icon,R=e.theme,j=ro("Toastify__toast","Toastify__toast-theme--"+R,"Toastify__toast--"+p,((t={})["Toastify__toast--rtl"]=A,t)),N=bu(v)?v({rtl:A,position:b,type:p,defaultClassName:j}):ro(j,v),D=!!E,I=Nu[p],L={theme:R,type:p},B=I&&I(L);return!1===P?B=void 0:bu(P)?B=P(L):Object(i.isValidElement)(P)?B=Object(i.cloneElement)(P,L):gu(P)?B=P:$&&(B=Nu.spinner()),Object(i.createElement)(g,{isIn:M,done:C,position:b,preventExitTransition:s,nodeRef:a},Object(i.createElement)("div",Object.assign({id:T,onClick:h,className:N},l,{style:y,ref:a}),Object(i.createElement)("div",Object.assign({},M&&{role:O},{className:bu(S)?S({type:p}):ro("Toastify__toast-body",S),style:_}),B&&Object(i.createElement)("div",{className:ro("Toastify__toast-icon",(n={},n["Toastify--animate-icon Toastify__zoom-enter"]=!$,n))},B),Object(i.createElement)("div",null,u)),function(e){if(e){var t={closeToast:m,type:p,theme:R};return bu(e)?e(t):Object(i.isValidElement)(e)?Object(i.cloneElement)(e,t):void 0}}(c),(d||D)&&Object(i.createElement)(Pu,Object.assign({},k&&!D?{key:"pb-"+k}:{},{rtl:A,theme:R,delay:d,isRunning:o,isIn:M,closeToast:m,hide:f,type:p,style:w,className:x,controlledProgress:D,progress:E}))))},Iu=ku({enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0}),Lu=function(e){var t=Au(e),n=t.getToastToRender,r=t.containerRef,o=t.isToastActive,s=e.className,a=e.style,l=e.rtl,c=e.containerId;function u(e){var t,n=ro("Toastify__toast-container","Toastify__toast-container--"+e,((t={})["Toastify__toast-container--rtl"]=l,t));return bu(s)?s({position:e,rtl:l,defaultClassName:n}):ro(n,vu(s))}return Object(i.createElement)("div",{ref:r,className:"Toastify",id:c},n((function(e,t){var n=t.length?hu({},a):hu({},a,{pointerEvents:"none"});return Object(i.createElement)("div",{className:u(e),style:n,key:"container-"+e},t.map((function(e){var t=e.content,n=e.props;return Object(i.createElement)(Du,Object.assign({},n,{isIn:o(n.toastId),key:"toast-"+n.key,closeButton:!0===n.closeButton?$u:n.closeButton}),t)})))})))};Lu.defaultProps={position:xu.TOP_RIGHT,transition:Iu,rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:$u,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};var Bu,zu,Fu,Uu,Qu=new Map,qu=[],Gu=!1;function Hu(){return Math.random().toString(36).substring(2,9)}function Vu(e){return e&&(gu(e.toastId)||fu(e.toastId))?e.toastId:Hu()}function Wu(e,t){return Qu.size>0?Ou.emit(0,e,t):(qu.push({content:e,options:t}),Gu&&Su&&(Gu=!1,zu=document.createElement("div"),document.body.appendChild(zu),Object(Un.render)(Object(i.createElement)(Lu,Object.assign({},Fu)),zu))),t.toastId}function Xu(e,t){return hu({},t,{type:t&&t.type||e,toastId:Vu(t)})}function Yu(e){return function(t,n){return Wu(t,Xu(e,n))}}function Zu(e,t){return Wu(e,Xu(wu.DEFAULT,t))}function Ju(){return(Ju=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}Zu.loading=function(e,t){return Wu(e,Xu(wu.DEFAULT,hu({isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1},t)))},Zu.promise=function(e,t,n){var r,i=t.pending,o=t.error,s=t.success;i&&(r=gu(i)?Zu.loading(i,n):Zu.loading(i.render,hu({},n,i)));var a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=function(e,t,i){if(null!=t){var o=hu({type:e},a,n,{data:i}),s=gu(t)?{render:t}:t;return r?Zu.update(r,hu({},o,s)):Zu(s.render,hu({},o,s)),i}Zu.dismiss(r)},c=bu(e)?e():e;return c.then((function(e){return l("success",s,e)})).catch((function(e){return l("error",o,e)})),c},Zu.success=Yu(wu.SUCCESS),Zu.info=Yu(wu.INFO),Zu.error=Yu(wu.ERROR),Zu.warning=Yu(wu.WARNING),Zu.warn=Zu.warning,Zu.dark=function(e,t){return Wu(e,Xu(wu.DEFAULT,hu({theme:"dark"},t)))},Zu.dismiss=function(e){return Ou.emit(1,e)},Zu.clearWaitingQueue=function(e){return void 0===e&&(e={}),Ou.emit(5,e)},Zu.isActive=function(e){var t=!1;return Qu.forEach((function(n){n.isToastActive&&n.isToastActive(e)&&(t=!0)})),t},Zu.update=function(e,t){void 0===t&&(t={}),setTimeout((function(){var n=function(e,t){var n=t.containerId,r=Qu.get(n||Bu);return r?r.getToast(e):null}(e,t);if(n){var r=n.props,i=n.content,o=hu({},r,t,{toastId:t.toastId||e,updateId:Hu()});o.toastId!==e&&(o.staleId=e);var s=o.render||i;delete o.render,Wu(s,o)}}),0)},Zu.done=function(e){Zu.update(e,{progress:1})},Zu.onChange=function(e){return bu(e)&&Ou.on(4,e),function(){bu(e)&&Ou.off(4,e)}},Zu.configure=function(e){void 0===e&&(e={}),Gu=!0,Fu=e},Zu.POSITION=xu,Zu.TYPE=wu,Ou.on(2,(function(e){Bu=e.containerId||e,Qu.set(Bu,e),qu.forEach((function(e){Ou.emit(0,e.content,e.options)})),qu=[]})).on(3,(function(e){Qu.delete(e.containerId||e),0===Qu.size&&Ou.off(0).off(1).off(5),Su&&zu&&document.body.removeChild(zu)}));var Ku,ed=function(e){return i.createElement("svg",Ju({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Uu||(Uu=i.createElement("path",{d:"M11 17h2v-6h-2v6zm1-8a.968.968 0 00.713-.288A.967.967 0 0013 8a.97.97 0 00-.287-.713A.97.97 0 0012 7a.967.967 0 00-.712.287A.968.968 0 0011 8c0 .283.096.52.288.712A.965.965 0 0012 9zm0 13a9.733 9.733 0 01-3.9-.788 10.092 10.092 0 01-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.733 9.733 0 012 12c0-1.383.263-2.683.788-3.9a10.092 10.092 0 012.137-3.175c.9-.9 1.958-1.613 3.175-2.138A9.743 9.743 0 0112 2c1.383 0 2.683.262 3.9.787a10.105 10.105 0 013.175 2.138c.9.9 1.612 1.958 2.137 3.175A9.733 9.733 0 0122 12a9.733 9.733 0 01-.788 3.9 10.092 10.092 0 01-2.137 3.175c-.9.9-1.958 1.612-3.175 2.137A9.733 9.733 0 0112 22zm0-2c2.217 0 4.104-.779 5.663-2.337C19.221 16.104 20 14.217 20 12s-.779-4.104-2.337-5.663C16.104 4.779 14.217 4 12 4s-4.104.779-5.662 2.337C4.779 7.896 4 9.783 4 12s.78 4.104 2.338 5.663C7.896 19.221 9.783 20 12 20z"})))};function td(){return(td=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var nd=function(e){return i.createElement("svg",td({width:18,height:13,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Ku||(Ku=i.createElement("path",{d:"M6.55 13L.85 7.3l1.425-1.425L6.55 10.15 15.725.975 17.15 2.4 6.55 13z"})))},rd=n(24);function id(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var od=n(85);function sd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Object(od.a)(r.key),r)}}function ad(e,t,n){return t&&sd(e.prototype,t),n&&sd(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var ld=n(35);function cd(e,t){return(cd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ud(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cd(e,t)}var dd=n(59),hd=n(41);var pd=n(193);function fd(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Object(pd.a)(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function md(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?md(Object(n),!0).forEach((function(t){Object(ks.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):md(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var bd={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},vd=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};id(this,e),this.init(t,n)}return ad(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||bd,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,gd(gd({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}()),yd=function(){function e(){id(this,e),this.observers={}}return ad(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){var i=[].concat(this.observers[e]);i.forEach((function(e){e.apply(void 0,n)}))}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach((function(t){t.apply(t,[e].concat(n))}))}}}]),e}();function Sd(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function _d(e){return null==e?"":""+e}function xd(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))}function wd(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var s=r(o.shift());!e[s]&&n&&(e[s]=new n),e=Object.prototype.hasOwnProperty.call(e,s)?e[s]:{}}return i()?{}:{obj:e,k:r(o.shift())}}function kd(e,t,n){var r=wd(e,t,Object);r.obj[r.k]=n}function Od(e,t){var n=wd(e,t),r=n.obj,i=n.k;if(r)return r[i]}function Ed(e,t,n){var r=Od(e,n);return void 0!==r?r:Od(t,n)}function Ad(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):Ad(e[r],t[r],n):e[r]=t[r]);return e}function Td(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Cd={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function Md(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return Cd[e]})):e}var $d="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,Pd=[" ",",","?","!",";"];function Rd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),i=e,o=0;o<r.length;++o){if(!i)return;if("string"==typeof i[r[o]]&&o+1<r.length)return;if(void 0===i[r[o]]){for(var s=2,a=r.slice(o,o+s).join(n),l=i[a];void 0===l&&r.length>o+s;)s++,l=i[a=r.slice(o,o+s).join(n)];if(void 0===l)return;if(null===l)return null;if(t.endsWith(a)){if("string"==typeof l)return l;if(a&&"string"==typeof l[a])return l[a]}var c=r.slice(o+s).join(n);return c?Rd(l,c,n):void 0}i=i[r[o]]}return i}}function jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Nd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jd(Object(n),!0).forEach((function(t){Object(ks.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Dd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(hd.a)(e);if(t){var i=Object(hd.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(dd.a)(this,n)}}var Id=function(e){ud(n,e);var t=Dd(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return id(this,n),r=t.call(this),$d&&yd.call(Object(ld.a)(r)),r.data=e||{},r.options=i,void 0===r.options.keySeparator&&(r.options.keySeparator="."),void 0===r.options.ignoreJSONStructure&&(r.options.ignoreJSONStructure=!0),r}return ad(n,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,s=[e,t];n&&"string"!=typeof n&&(s=s.concat(n)),n&&"string"==typeof n&&(s=s.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(s=e.split("."));var a=Od(this.data,s);return a||!o||"string"!=typeof n?a:Rd(this.data&&this.data[e]&&this.data[e][t],n,i)}},{key:"addResource",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var s=[e,t];n&&(s=s.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(r=t,t=(s=e.split("."))[1]),this.addNamespaces(t),kd(this.data,s,r),i.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in n)"string"!=typeof n[i]&&"[object Array]"!==Object.prototype.toString.apply(n[i])||this.addResource(e,t,i,n[i],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(s=e.split("."))[1]),this.addNamespaces(t);var a=Od(this.data,s)||{};r?Ad(a,n,i):a=Nd(Nd({},a),n),kd(this.data,s,a),o.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?Nd(Nd({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((function(e){return t[e]&&Object.keys(t[e]).length>0}))}},{key:"toJSON",value:function(){return this.data}}]),n}(yd),Ld={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,i){var o=this;return e.forEach((function(e){o.processors[e]&&(t=o.processors[e].process(t,n,r,i))})),t}};function Bd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bd(Object(n),!0).forEach((function(t){Object(ks.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Fd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(hd.a)(e);if(t){var i=Object(hd.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(dd.a)(this,n)}}var Ud={},Qd=function(e){ud(n,e);var t=Fd(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return id(this,n),r=t.call(this),$d&&yd.call(Object(ld.a)(r)),xd(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,Object(ld.a)(r)),r.options=i,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=vd.create("translator"),r}return ad(n,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS||[],o=n&&e.indexOf(n)>-1,s=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";var r=Pd.filter((function(e){return t.indexOf(e)<0&&n.indexOf(e)<0}));if(0===r.length)return!0;var i=new RegExp("(".concat(r.map((function(e){return"?"===e?"\\?":e})).join("|"),")")),o=!i.test(e);if(!o){var s=e.indexOf(n);s>0&&!i.test(e.substring(0,s))&&(o=!0)}return o}(e,n,r));if(o&&!s){var a=e.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:e,namespaces:i};var l=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(l[0])>-1)&&(i=l.shift()),e=l.join(r)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t,r){var i=this;if("object"!==Object(rd.a)(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"===Object(rd.a)(t)&&(t=zd({},t)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var o=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,s=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,a=this.extractFromKey(e[e.length-1],t),l=a.key,c=a.namespaces,u=c[c.length-1],d=t.lng||this.language,h=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(h){var p=t.nsSeparator||this.options.nsSeparator;return o?{res:"".concat(u).concat(p).concat(l),usedKey:l,exactUsedKey:l,usedLng:d,usedNS:u}:"".concat(u).concat(p).concat(l)}return o?{res:l,usedKey:l,exactUsedKey:l,usedLng:d,usedNS:u}:l}var f=this.resolve(e,t),m=f&&f.res,g=f&&f.usedKey||l,b=f&&f.exactUsedKey||l,v=Object.prototype.toString.apply(m),y=["[object Number]","[object Function]","[object RegExp]"],S=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,_=!this.i18nFormat||this.i18nFormat.handleAsObject,x="string"!=typeof m&&"boolean"!=typeof m&&"number"!=typeof m;if(_&&m&&x&&y.indexOf(v)<0&&("string"!=typeof S||"[object Array]"!==v)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var w=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,m,zd(zd({},t),{},{ns:c})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");return o?(f.res=w,f):w}if(s){var k="[object Array]"===v,O=k?[]:{},E=k?b:g;for(var A in m)if(Object.prototype.hasOwnProperty.call(m,A)){var T="".concat(E).concat(s).concat(A);O[A]=this.translate(T,zd(zd({},t),{joinArrays:!1,ns:c})),O[A]===T&&(O[A]=m[A])}m=O}}else if(_&&"string"==typeof S&&"[object Array]"===v)(m=m.join(S))&&(m=this.extendTranslation(m,e,t,r));else{var C=!1,M=!1,$=void 0!==t.count&&"string"!=typeof t.count,P=n.hasDefaultValue(t),R=$?this.pluralResolver.getSuffix(d,t.count,t):"",j=t["defaultValue".concat(R)]||t.defaultValue;!this.isValidLookup(m)&&P&&(C=!0,m=j),this.isValidLookup(m)||(M=!0,m=l);var N=t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,D=N&&M?void 0:m,I=P&&j!==m&&this.options.updateMissing;if(M||C||I){if(this.logger.log(I?"updateKey":"missingKey",d,u,l,I?j:m),s){var L=this.resolve(l,zd(zd({},t),{},{keySeparator:!1}));L&&L.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var B=[],z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&z&&z[0])for(var F=0;F<z.length;F++)B.push(z[F]);else"all"===this.options.saveMissingTo?B=this.languageUtils.toResolveHierarchy(t.lng||this.language):B.push(t.lng||this.language);var U=function(e,n,r){var o=P&&r!==m?r:D;i.options.missingKeyHandler?i.options.missingKeyHandler(e,u,n,o,I,t):i.backendConnector&&i.backendConnector.saveMissing&&i.backendConnector.saveMissing(e,u,n,o,I,t),i.emit("missingKey",e,u,n,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&$?B.forEach((function(e){i.pluralResolver.getSuffixes(e,t).forEach((function(n){U([e],l+n,t["defaultValue".concat(n)]||j)}))})):U(B,l,j))}m=this.extendTranslation(m,e,t,f,r),M&&m===l&&this.options.appendNamespaceToMissingKey&&(m="".concat(u,":").concat(l)),(M||C)&&this.options.parseMissingKeyHandler&&(m="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(u,":").concat(l):l,C?m:void 0):this.options.parseMissingKeyHandler(m))}return o?(f.res=m,f):m}},{key:"extendTranslation",value:function(e,t,n,r,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,zd(zd({},this.options.interpolation.defaultVariables),n),r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(zd(zd({},n),{interpolation:zd(zd({},this.options.interpolation),n.interpolation)}));var s,a="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(a){var l=e.match(this.interpolator.nestingRegexp);s=l&&l.length}var c=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(c=zd(zd({},this.options.interpolation.defaultVariables),c)),e=this.interpolator.interpolate(e,c,n.lng||this.language,n),a){var u=e.match(this.interpolator.nestingRegexp);s<(u&&u.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),s=0;s<e;s++)r[s]=arguments[s];return i&&i[0]===r[0]&&!n.context?(o.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):o.translate.apply(o,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var d=n.postProcess||this.options.postProcess,h="string"==typeof d?[d]:d;return null!=e&&h&&h.length&&!1!==n.applyPostProcessor&&(e=Ld.handle(h,e,t,this.options&&this.options.postProcessPassResolved?zd({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,i,o,s=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!s.isValidLookup(t)){var l=s.extractFromKey(e,a),c=l.key;n=c;var u=l.namespaces;s.options.fallbackNS&&(u=u.concat(s.options.fallbackNS));var d=void 0!==a.count&&"string"!=typeof a.count,h=d&&!a.ordinal&&0===a.count&&s.pluralResolver.shouldUseIntlApi(),p=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,f=a.lngs?a.lngs:s.languageUtils.toResolveHierarchy(a.lng||s.language,a.fallbackLng);u.forEach((function(e){s.isValidLookup(t)||(o=e,!Ud["".concat(f[0],"-").concat(e)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(o)&&(Ud["".concat(f[0],"-").concat(e)]=!0,s.logger.warn('key "'.concat(n,'" for languages "').concat(f.join(", "),'" won\'t get resolved as namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach((function(n){if(!s.isValidLookup(t)){i=n;var o,l=[c];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(l,c,n,e,a);else{var u;d&&(u=s.pluralResolver.getSuffix(n,a.count,a));var f="".concat(s.options.pluralSeparator,"zero");if(d&&(l.push(c+u),h&&l.push(c+f)),p){var m="".concat(c).concat(s.options.contextSeparator).concat(a.context);l.push(m),d&&(l.push(m+u),h&&l.push(m+f))}}for(;o=l.pop();)s.isValidLookup(t)||(r=o,t=s.getResource(n,e,o,a))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,"defaultValue".length)&&void 0!==e[t])return!0;return!1}}]),n}(yd);function qd(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Gd=function(){function e(t){id(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=vd.create("languageUtils")}return ad(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=qd(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=qd(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=qd(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){return e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:0===e.indexOf(r)?e:void 0}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(n.isSupportedCode(e)?i.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),r.forEach((function(e){i.indexOf(e)<0&&o(n.formatLanguageCode(e))})),i}}]),e}(),Hd=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Vd={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},Wd=["v1","v2","v3"],Xd={zero:0,one:1,two:2,few:3,many:4,other:5};function Yd(){var e={};return Hd.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:Vd[t.fc]}}))})),e}var Zd=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};id(this,e),this.languageUtils=t,this.options=n,this.logger=vd.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Yd()}return ad(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((function(e){return"".concat(t).concat(e)}))}},{key:"getSuffixes",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((function(e,t){return Xd[e]-Xd[t]})).map((function(e){return"".concat(t.options.prepend).concat(e)})):r.numbers.map((function(r){return t.getSuffix(e,r,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(r.select(t)):this.getSuffixRetroCompatible(r,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var n=this,r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),i=e.numbers[r];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var o=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}},{key:"shouldUseIntlApi",value:function(){return!Wd.includes(this.options.compatibilityJSON)}}]),e}();function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jd(Object(n),!0).forEach((function(t){Object(ks.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function eh(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=Ed(e,t,n);return!o&&i&&"string"==typeof n&&void 0===(o=Rd(e,n,r))&&(o=Rd(t,n,r)),o}var th=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};id(this,e),this.logger=vd.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return ad(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:Md,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?Td(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?Td(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?Td(t.nestingPrefix):t.nestingPrefixEscaped||Td("$t("),this.nestingSuffix=t.nestingSuffix?Td(t.nestingSuffix):t.nestingSuffixEscaped||Td(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var i,o,s,a=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(e.indexOf(a.formatSeparator)<0){var i=eh(t,l,e,a.options.keySeparator,a.options.ignoreJSONStructure);return a.alwaysFormat?a.format(i,void 0,n,Kd(Kd(Kd({},r),t),{},{interpolationkey:e})):i}var o=e.split(a.formatSeparator),s=o.shift().trim(),c=o.join(a.formatSeparator).trim();return a.format(eh(t,l,s,a.options.keySeparator,a.options.ignoreJSONStructure),c,n,Kd(Kd(Kd({},r),t),{},{interpolationkey:s}))};this.resetRegExp();var d=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,h=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return c(e)}},{regex:this.regexp,safeValue:function(e){return a.escapeValue?c(a.escape(e)):c(e)}}].forEach((function(t){for(s=0;i=t.regex.exec(e);){var n=i[1].trim();if(void 0===(o=u(n)))if("function"==typeof d){var l=d(e,i,r);o="string"==typeof l?l:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))o="";else{if(h){o=i[0];continue}a.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),o=""}else"string"==typeof o||a.useRawValueToEscape||(o=_d(o));var c=t.safeValue(o);if(e=e.replace(i[0],c),h?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,++s>=a.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,i,o=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function a(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0];var s=(o=this.interpolate(o,i)).match(/'/g),a=o.match(/"/g);(s&&s.length%2==0&&!a||a.length%2!=0)&&(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i=Kd(Kd({},t),i))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(o)}return delete i.defaultValue,e}for(;n=this.nestingRegexp.exec(e);){var l=[];(i=(i=Kd({},s)).replace&&"string"!=typeof i.replace?i.replace:i).applyPostProcessor=!1,delete i.defaultValue;var c=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var u=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=u.shift(),l=u,c=!0}if((r=t(a.call(this,n[1].trim(),i),i))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=_d(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),c&&(r=l.reduce((function(e,t){return o.format(e,t,s.lng,Kd(Kd({},s),{},{interpolationkey:n[1].trim()}))}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}();function nh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nh(Object(n),!0).forEach((function(t){Object(ks.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ih(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);if("currency"===t&&i.indexOf(":")<0)n.currency||(n.currency=i.trim());else if("relativetime"===t&&i.indexOf(":")<0)n.range||(n.range=i.trim());else{i.split(";").forEach((function(e){if(e){var t=fd(e.split(":")),r=t[0],i=t.slice(1).join(":").trim().replace(/^'+|'+$/g,"");n[r.trim()]||(n[r.trim()]=i),"false"===i&&(n[r.trim()]=!1),"true"===i&&(n[r.trim()]=!0),isNaN(i)||(n[r.trim()]=parseInt(i,10))}}))}}return{formatName:t,formatOptions:n}}function oh(e){var t={};return function(n,r,i){var o=r+JSON.stringify(i),s=t[o];return s||(s=e(r,i),t[o]=s),s(n)}}var sh=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};id(this,e),this.logger=vd.create("formatter"),this.options=t,this.formats={number:oh((function(e,t){var n=new Intl.NumberFormat(e,rh({},t));return function(e){return n.format(e)}})),currency:oh((function(e,t){var n=new Intl.NumberFormat(e,rh(rh({},t),{},{style:"currency"}));return function(e){return n.format(e)}})),datetime:oh((function(e,t){var n=new Intl.DateTimeFormat(e,rh({},t));return function(e){return n.format(e)}})),relativetime:oh((function(e,t){var n=new Intl.RelativeTimeFormat(e,rh({},t));return function(e){return n.format(e,t.range||"day")}})),list:oh((function(e,t){var n=new Intl.ListFormat(e,rh({},t));return function(e){return n.format(e)}}))},this.init(t)}return ad(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=t.interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=oh(t)}},{key:"format",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=t.split(this.formatSeparator),s=o.reduce((function(e,t){var o=ih(t),s=o.formatName,a=o.formatOptions;if(r.formats[s]){var l=e;try{var c=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},u=c.locale||c.lng||i.locale||i.lng||n;l=r.formats[s](e,u,rh(rh(rh({},a),i),c))}catch(e){r.logger.warn(e)}return l}return r.logger.warn("there was no format function for ".concat(s)),e}),e);return s}}]),e}();function ah(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ah(Object(n),!0).forEach((function(t){Object(ks.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ah(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ch(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(hd.a)(e);if(t){var i=Object(hd.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(dd.a)(this,n)}}var uh=function(e){ud(n,e);var t=ch(n);function n(e,r,i){var o,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return id(this,n),o=t.call(this),$d&&yd.call(Object(ld.a)(o)),o.backend=e,o.store=r,o.services=i,o.languageUtils=i.languageUtils,o.options=s,o.logger=vd.create("backendConnector"),o.waitingReads=[],o.maxParallelReads=s.maxParallelReads||10,o.readingCalls=0,o.maxRetries=s.maxRetries>=0?s.maxRetries:5,o.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(i,s.backend,s),o}return ad(n,[{key:"queueLoad",value:function(e,t,n,r){var i=this,o={},s={},a={},l={};return e.forEach((function(e){var r=!0;t.forEach((function(t){var a="".concat(e,"|").concat(t);!n.reload&&i.store.hasResourceBundle(e,t)?i.state[a]=2:i.state[a]<0||(1===i.state[a]?void 0===s[a]&&(s[a]=!0):(i.state[a]=1,r=!1,void 0===s[a]&&(s[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===l[t]&&(l[t]=!0)))})),r||(a[e]=!0)})),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),n&&this.store.addResourceBundle(i,o,n),this.state[e]=t?-1:2;var s={};this.queue.forEach((function(n){var r,a,l,c,u,d;r=n.loaded,a=o,c=wd(r,[i],Object),u=c.obj,d=c.k,u[d]=u[d]||[],l&&(u[d]=u[d].concat(a)),l||u[d].push(a),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((function(e){s[e]||(s[e]={});var t=n.loaded[e];t.length&&t.forEach((function(t){void 0===s[e][t]&&(s[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",s),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads)this.waitingReads.push({lng:e,ns:t,fcName:n,tried:i,wait:o,callback:s});else{this.readingCalls++;var a=function(a,l){if(r.readingCalls--,r.waitingReads.length>0){var c=r.waitingReads.shift();r.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}a&&l&&i<r.maxRetries?setTimeout((function(){r.read.call(r,e,t,n,i+1,2*o,s)}),o):s(a,l)},l=this.backend[n].bind(this.backend);if(2!==l.length)return l(e,t,a);try{var c=l(e,t);c&&"function"==typeof c.then?c.then((function(e){return a(null,e)})).catch(a):a(null,c)}catch(e){a(e)}}}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(function(r,s){r&&t.logger.warn("".concat(n,"loading namespace ").concat(o," for language ").concat(i," failed"),r),!r&&s&&t.logger.log("".concat(n,"loaded namespace ").concat(o," for language ").concat(i),s),t.loaded(e,r,s)}))}},{key:"saveMissing",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){var a=lh(lh({},o),{},{isUpdate:i}),l=this.backend.create.bind(this.backend);if(l.length<6)try{var c;(c=5===l.length?l(e,t,n,r,a):l(e,t,n,r))&&"function"==typeof c.then?c.then((function(e){return s(null,e)})).catch(s):s(null,c)}catch(e){s(e)}else l(e,t,n,r,s,a)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}]),n}(yd);function dh(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===Object(rd.a)(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===Object(rd.a)(e[2])||"object"===Object(rd.a)(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function hh(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ph(Object(n),!0).forEach((function(t){Object(ks.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ph(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function mh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(hd.a)(e);if(t){var i=Object(hd.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(dd.a)(this,n)}}function gh(){}function bh(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((function(t){"function"==typeof e[t]&&(e[t]=e[t].bind(e))}))}var vh=function(e){ud(n,e);var t=mh(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(id(this,n),e=t.call(this),$d&&yd.call(Object(ld.a)(e)),e.options=hh(r),e.services={},e.logger=vd,e.modules={external:[]},bh(Object(ld.a)(e)),i&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,i),Object(dd.a)(e,Object(ld.a)(e));setTimeout((function(){e.init(r,i)}),0)}return e}return ad(n,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var r=dh();function i(e){return e?"function"==typeof e?new e:e:null}if(this.options=fh(fh(fh({},r),this.options),hh(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=fh(fh({},r.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){var o;this.modules.logger?vd.init(i(this.modules.logger),this.options):vd.init(null,this.options),this.modules.formatter?o=this.modules.formatter:"undefined"!=typeof Intl&&(o=sh);var s=new Gd(this.options);this.store=new Id(this.options.resources,this.options);var a=this.services;a.logger=vd,a.resourceStore=this.store,a.languageUtils=s,a.pluralResolver=new Zd(s,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!o||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(a.formatter=i(o),a.formatter.init(a,this.options),this.options.interpolation.format=a.formatter.format.bind(a.formatter)),a.interpolator=new th(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new uh(i(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit.apply(e,[t].concat(r))})),this.modules.languageDetector&&(a.languageDetector=i(this.modules.languageDetector),a.languageDetector.init&&a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=i(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new Qd(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit.apply(e,[t].concat(r))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.format=this.options.interpolation.format,n||(n=gh),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&"dev"!==l[0]&&(this.options.lng=l[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var c=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];c.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}));var u=["addResource","addResources","addResourceBundle","removeResourceBundle"];u.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var d=Sd(),h=function(){var t=function(t,r){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),d.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?h():setTimeout(h,0),d}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:gh,r=n,i="string"==typeof e?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&"cimode"===i.toLowerCase())return r();var o=[],s=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};if(i)s(i);else{var a=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);a.forEach((function(e){return s(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return s(e)})),this.services.backendConnector.load(o,this.options.ns,(function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),r(e)}))}else r(null)}},{key:"reloadResources",value:function(e,t,n){var r=Sd();return e||(e=this.languages),t||(t=this.options.ns),n||(n=gh),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&Ld.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=Sd();this.emit("languageChanging",e);var i=function(e){n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e),n.resolvedLanguage=void 0,n.setResolvedLanguage(e)},o=function(o){e||o||!n.services.languageDetector||(o=[]);var s="string"==typeof o?o:n.services.languageUtils.getBestMatchFromCodes(o);s&&(n.language||i(s),n.translator.language||n.translator.changeLanguage(s),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage&&n.services.languageDetector.cacheUserLanguage(s)),n.loadResources(s,(function(e){!function(e,o){o?(i(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,s)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t,n){var r=this,i=function e(t,i){var o;if("object"!==Object(rd.a)(i)){for(var s=arguments.length,a=new Array(s>2?s-2:0),l=2;l<s;l++)a[l-2]=arguments[l];o=r.options.overloadTranslationOptionHandler([t,i].concat(a))}else o=fh({},i);o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,o.keyPrefix=o.keyPrefix||n||e.keyPrefix;var c,u=r.options.keySeparator||".";return c=o.keyPrefix&&Array.isArray(t)?t.map((function(e){return"".concat(o.keyPrefix).concat(u).concat(e)})):o.keyPrefix?"".concat(o.keyPrefix).concat(u).concat(t):t,r.t(c,o)};return"string"==typeof e?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var s=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var a=n.precheck(this,s);if(void 0!==a)return a}return!!this.hasResourceBundle(r,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!s(r,e)||i&&!s(o,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=Sd();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=Sd();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],i=e.filter((function(e){return r.indexOf(e)<0}));return i.length?(this.options.preload=r.concat(i),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";var t=this.services&&this.services.languageUtils||new Gd(dh());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:gh,i=fh(fh(fh({},this.options),t),{isClone:!0}),o=new n(i);void 0===t.debug&&void 0===t.prefix||(o.logger=o.logger.clone(t));var s=["store","services","language"];return s.forEach((function(t){o[t]=e[t]})),o.services=fh({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o.translator=new Qd(o.services,o.options),o.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o.emit.apply(o,[e].concat(n))})),o.init(i,r),o.translator.options=o.options,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(yd);Object(ks.a)(vh,"createInstance",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new vh(e,t)}));var yh=vh.createInstance();yh.createInstance=vh.createInstance;yh.createInstance,yh.dir,yh.init,yh.loadResources,yh.reloadResources,yh.use,yh.changeLanguage,yh.getFixedT,yh.t,yh.exists,yh.setDefaultNamespace,yh.hasLoadedNamespace,yh.loadNamespaces,yh.loadLanguages;var Sh=[],_h=Sh.forEach,xh=Sh.slice;function wh(e){return _h.call(xh.call(arguments,1),(function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])})),e}var kh=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Oh=function(e,t,n){var r=n||{};r.path=r.path||"/";var i=encodeURIComponent(t),o="".concat(e,"=").concat(i);if(r.maxAge>0){var s=r.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");o+="; Max-Age=".concat(Math.floor(s))}if(r.domain){if(!kh.test(r.domain))throw new TypeError("option domain is invalid");o+="; Domain=".concat(r.domain)}if(r.path){if(!kh.test(r.path))throw new TypeError("option path is invalid");o+="; Path=".concat(r.path)}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");o+="; Expires=".concat(r.expires.toUTCString())}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o},Eh=function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+60*n*1e3)),r&&(i.domain=r),document.cookie=Oh(e,encodeURIComponent(t),i)},Ah=function(e){for(var t="".concat(e,"="),n=document.cookie.split(";"),r=0;r<n.length;r++){for(var i=n[r];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return i.substring(t.length,i.length)}return null},Th={name:"cookie",lookup:function(e){var t;if(e.lookupCookie&&"undefined"!=typeof document){var n=Ah(e.lookupCookie);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupCookie&&"undefined"!=typeof document&&Eh(t.lookupCookie,e,t.cookieMinutes,t.cookieDomain,t.cookieOptions)}},Ch={name:"querystring",lookup:function(e){var t;if("undefined"!=typeof window){var n=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));for(var r=n.substring(1).split("&"),i=0;i<r.length;i++){var o=r[i].indexOf("=");if(o>0)r[i].substring(0,o)===e.lookupQuerystring&&(t=r[i].substring(o+1))}}return t}},Mh=null,$h=function(){if(null!==Mh)return Mh;try{Mh="undefined"!==window&&null!==window.localStorage;window.localStorage.setItem("i18next.translate.boo","foo"),window.localStorage.removeItem("i18next.translate.boo")}catch(e){Mh=!1}return Mh},Ph={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&$h()){var n=window.localStorage.getItem(e.lookupLocalStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&$h()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},Rh=null,jh=function(){if(null!==Rh)return Rh;try{Rh="undefined"!==window&&null!==window.sessionStorage;window.sessionStorage.setItem("i18next.translate.boo","foo"),window.sessionStorage.removeItem("i18next.translate.boo")}catch(e){Rh=!1}return Rh},Nh={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&jh()){var n=window.sessionStorage.getItem(e.lookupSessionStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&jh()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},Dh={name:"navigator",lookup:function(e){var t=[];if("undefined"!=typeof navigator){if(navigator.languages)for(var n=0;n<navigator.languages.length;n++)t.push(navigator.languages[n]);navigator.userLanguage&&t.push(navigator.userLanguage),navigator.language&&t.push(navigator.language)}return t.length>0?t:void 0}},Ih={name:"htmlTag",lookup:function(e){var t,n=e.htmlTag||("undefined"!=typeof document?document.documentElement:null);return n&&"function"==typeof n.getAttribute&&(t=n.getAttribute("lang")),t}},Lh={name:"path",lookup:function(e){var t;if("undefined"!=typeof window){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(n instanceof Array)if("number"==typeof e.lookupFromPathIndex){if("string"!=typeof n[e.lookupFromPathIndex])return;t=n[e.lookupFromPathIndex].replace("/","")}else t=n[0].replace("/","")}return t}},Bh={name:"subdomain",lookup:function(e){var t="number"==typeof e.lookupFromSubdomainIndex?e.lookupFromSubdomainIndex+1:1,n="undefined"!=typeof window&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[t]}};var zh=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};id(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return ad(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=wh(t,this.options||{},{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Th),this.addDetector(Ch),this.addDetector(Ph),this.addDetector(Nh),this.addDetector(Dh),this.addDetector(Ih),this.addDetector(Lh),this.addDetector(Bh)}},{key:"addDetector",value:function(e){this.detectors[e.name]=e}},{key:"detect",value:function(e){var t=this;e||(e=this.options.order);var n=[];return e.forEach((function(e){if(t.detectors[e]){var r=t.detectors[e].lookup(t.options);r&&"string"==typeof r&&(r=[r]),r&&(n=n.concat(r))}})),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}},{key:"cacheUserLanguage",value:function(e,t){var n=this;t||(t=this.options.caches),t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach((function(t){n.detectors[t]&&n.detectors[t].cacheUserLanguage(e,n.options)})))}}]),e}();zh.type="languageDetector",yh.use(zh).use(zi).init({debug:!0,fallbackLng:"en",locales:["en","ar-SA","ca-ES","cs-CZ","me-ME","cy-GB","da-DK","de-DE","el-GR","et-EE","es-ES","es-LA","fr-FR","he-IL","hi-IN","hr-HR","it-IT","ja-JP","kn-IN","ko-KR","mr-IN","hu-HU","nl-NL","no-NO","pl-PL","pt-BR","pt-PT","ro-RO","ru-RU","sk-SK","sl-SI","fi-FI","sv-SE","vls-BE","sr-SP","tr-TR","uk-UA","zh-CN","zh-TW"],supportedLngs:["en","ar-SA","ca-ES","cs-CZ","me-ME","cy-GB","da-DK","de-DE","el-GR","et-EE","es-ES","es-LA","fr-FR","he-IL","hi-IN","hr-HR","it-IT","ja-JP","kn-IN","ko-KR","mr-IN","hu-HU","nl-NL","no-NO","pl-PL","pt-BR","pt-PT","ro-RO","ru-RU","sk-SK","sl-SI","fi-FI","sv-SE","vls-BE","sr-SP","tr-TR","uk-UA","zh-CN","zh-TW"],load:"currentOnly",detection:{order:["path"]},interpolation:{escapeValue:!1},resources:{en:{translation:{modal:{close:"Close",error:{heading:"An error has occurred",externalLink:{message:"Unfortunately links to external sites are not available in the Editor."}}},betaBanner:{buttonLabel:"close",buttonTitle:"close",message:"The Code Editor is in",feedbackText:"Give us your",feedback:"feedback",feedbackImprove:"to help us improve.",modal:{close:"Close",heading:"Code Editor is in beta",meaningHeading:"What does beta mean?",meaningText:"Beta means that we are not quite finished yet, and some things might not look or work as well as we’d like. However, it also means you are one of the first people to use our new Code Editor!"},modalLink:"beta"},editorPanel:{ariaLabel:"editor text input",viewOnly:"View only"},filePanel:{errors:{containsSpaces:"File names must not contain spaces.",generalError:"Error",notUnique:"File names must be unique.",or:"or",unsupportedExtension:"File names must end in {{allowedExtensions}}."},files:"Project files",images:"Image gallery",newFileButton:"Add file",newFileModal:{cancel:"Cancel",heading:"Add a new file to your project",helpText:"Remember to add the file extension at the end of your file name, for example, {{examples}}",helpTextExample:{html:"'file.html', 'file.css' or 'file.js'",python:"'file.py'"},inputLabel:"Name your file",addFile:"Add file"},renameFileModal:{cancel:"Cancel",heading:"Rename file",inputLabel:"Name your file",save:"Save"},fileMenu:{label:"Open file menu",renameItem:"Rename file"}},downloadPanel:{heading:"Save & download",logInTitle:"Log in to save your progress",logInHint:"With a Raspberry Pi Account you can save your code and project steps progress.",logInButton:"Log in to save",signUpButton:"Sign up",downloadHint:"Download your project files so you can use them offline and in a different code editor.",downloadButton:"Download project"},landingPage:{title:"Code Editor",subtitle:"Start coding, no setup required!",python:"Start coding Python",html:"Start coding HTML/CSS",login:"Log in",start:"Not sure where to start?",projectPython:"Python path",projectHtml:"Web path"},footer:{accessibility:"Accessibility",charityNameAndNumber:"Raspberry Pi Foundation UK registered charity 1129409",cookies:"Cookies",privacy:"Privacy",safeguarding:"Safeguarding"},globalNav:{accountMenu:{login:"Log in",logout:"Log out",profile:"My profile",projects:"My projects"},accountMenuDefaultAltText:"Account menu",accountMenuProfileAltText:"{{name}}'s account",raspberryPiLogoAltText:"Raspberry Pi logo"},projectName:{label:"Project name",newProject:"New Project"},header:{download:"Download",downloadFileNameDefault:"my {{project_type}} project",editorLogoAltText:"Editor logo",projects:"Your projects",renameProject:"Edit project name",renameSave:"Save project name",save:"Save",loginToSave:"Log in to save",settings:"Settings"},imagePanel:{gallery:"Image Gallery"},infoPanel:{info:"Information"},instructionsPanel:{nextStep:"Next step",previousStep:"Previous step",projectSteps:"Project steps"},projectsPanel:{projects:"Projects",yourProjectsButton:"Go to your projects",projectTypeLabel:"Project type"},settingsPanel:{info:"Settings"},input:{comment:{py5:"Py5: imported mode"}},loginToSaveModal:{cancel:"Cancel",downloadButtonText:"Download",downloadText:"Or you can download your project and save it on your computer.",heading:"Save your project",loginButtonText:"Log in to save",loginText:"Log in to your Raspberry Pi account to save your work, and you'll be able to access and edit your project whenever you need to."},mobile:{code:"Code",menu:"Menu",output:"Output",preview:"Preview",steps:"Steps"},modals:{close:"Close"},newProjectModal:{cancel:"Cancel",createProject:"Create project",heading:"Create a new project",projectName:{default:"Untitled",helpText:"You can always rename your project later",inputLabel:"Project name"},projectType:{html:"HTML",inputLabel:"What kind of project do you want to make?",python:"Python"}},notifications:{close:"close",loginPrompt:"To save this project and access it later, don't forget to log in or sign up!",projectRemixed:"Your remixed project has been saved",projectRenamed:"You have renamed your project.",projectSaved:"Your project has been saved",savePrompt:'Save this project to access it later under "Your projects".'},output:{errors:{interrupted:"Execution interrupted"},newTab:"Preview in new tab",preview:"preview",senseHat:{controls:{colour:"colour",humidity:"humidity",motion:"motion",motionSensorOptions:{no:"No",yes:"Yes"},name:"Space Station Control Panel",pressure:"pressure",temperature:"temperature",timer:"timer"},model:{pitch:"pitch",roll:"roll",yaw:"yaw"}},textOutput:"Text output",visualOutput:"Visual output"},outputViewToggle:{buttonTabLabel:"Tabbed view",buttonTabTitle:"Tabbed view",buttonSplitLabel:"Split view",buttonSplitTitle:"Split view"},project:{accessDeniedNoAuthModal:{embedded:{text:"Visit the Projects site for cool project ideas"},heading:"You are not able to see this project",loginButtonText:"Log in to your account",newProject:"Create a new code project",projectsSiteLinkText:"Explore Projects site",text:"If this is your project, log in to see it. If this is not your project you can visit the Projects site for cool project ideas or to start coding in a new project."},accessDeniedWithAuthModal:{embedded:{text:"Visit the Projects site for cool project ideas"},heading:"You can't access this project",newProject:"Create a new code project",projectsSiteLinkText:"Explore Projects site",text:"Visit the Projects site for cool project ideas or start coding in a new project."},loading:"Loading",notFoundModal:{embedded:{text:"Visit the Projects site for cool project ideas"},heading:"This project does not exist",newProject:"Start new code project",projectsSiteLinkText:"Explore Projects site",text:"You can start coding in a new project, or visit the Projects site for cool project ideas."},untitled:"Untitled project"},projectHeader:{subTitle:"Code Editor",title:"Your projects",text:"Select a project to continue coding, view, or edit it."},projectList:{delete:"Delete",deleteLabel:"Delete project",deleteProjectModal:{cancel:"Cancel",delete:"Delete",heading:"Delete project",text:"Are you sure you want to delete this project?"},empty:"No projects created yet",label:"Open project menu",loading:"Loading",loadingFailed:"Failed to load projects",newProject:"Create a new project",pagination:{first:"First page",last:"Last page",next:"Next page",previous:"Previous page",more:"Load more projects"},rename:"Rename",renameLabel:"Rename project",renameProjectModal:{cancel:"Do not save",heading:"Rename project",inputLabel:"Change the name of your project",save:"Save"},updated:"Edited",python_type:"Python",html_type:"HTML"},projectTypes:{html:"HTML/CSS",python:"Python"},runButton:{run:"Run",stop:"Stop",stopping:"Stopping..."},saveStatus:{saving:"Saving",saved:"Saved"},runners:{HtmlOutput:"HTML Output Preview"},sidebar:{collapse:"Collapse sidebar",download:"Download project",expand:"Expand sidebar",file:"Project files",images:"Image gallery",settings:"Settings",projects:"Projects",information:"Information",information_text:"Our Code Editor is a tool to help young people learn to code. We have only included functions that are simple and safe to use. That's why, for example, links to other websites are not allowed.",instructions:"Project steps",feedback:"Feedback",privacy:"Privacy",cookies:"Cookies",accessibility:"Accessibility",safeguarding:"Safeguarding",charity:"Raspberry Pi Foundation - UK registered charity 1129409",settingsMenu:{heading:"Settings",textSize:"Text size",theme:"Theme",textSizeOptions:{large:"Large",medium:"Medium",small:"Small"},themeOptions:{dark:"Dark",light:"Light"}}},webComponent:{loading:"Loading",failed:"Load failed"}}}}});var Fh=yh;var Uh=e=>{const{scaleFactor:t}=e,n=t||1;return o.a.createElement("svg",{transform:"scale(".concat(n,", ").concat(n,")"),width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.a.createElement("path",{d:"M1.4 14L0 12.6L5.6 7L0 1.4L1.4 0L7 5.6L12.6 0L14 1.4L8.4 7L14 12.6L12.6 14L7 8.4L1.4 14Z"}))};const Qh={position:Zu.POSITION.BOTTOM_CENTER,autoClose:3e3,className:"toast--bottom-center__message",closeButton:!1,containerId:"bottom-center",hideProgressBar:!0},qh={position:Zu.POSITION.TOP_CENTER,autoClose:6e3,className:"toast--top-center__message",closeButton:e=>{let{closeToast:t}=e;return o.a.createElement(kc,{ButtonIcon:Uh,onClickHandler:t,title:Fh.t("notifications.close"),label:Fh.t("notifications.close")})},containerId:"top-center",hideProgressBar:!0};Math.pow(10,8);function Gh(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Hh(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function Vh(e){Hh(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===Object(rd.a)(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function Wh(e){Hh(1,arguments);var t=Vh(e);return t.setHours(0,0,0,0),t}function Xh(e,t){Hh(2,arguments);var n=Wh(e),r=Wh(t),i=n.getTime()-Gh(n),o=r.getTime()-Gh(r);return Math.round((i-o)/864e5)}function Yh(e,t){Hh(2,arguments);var n=Vh(e),r=Vh(t),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return 12*i+o}function Zh(e){Hh(1,arguments);var t=Vh(e),n=Math.floor(t.getMonth()/3)+1;return n}function Jh(e,t){Hh(2,arguments);var n=Vh(e),r=Vh(t),i=n.getFullYear()-r.getFullYear(),o=Zh(n)-Zh(r);return 4*i+o}function Kh(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}var ep={};function tp(){return ep}function np(e,t){var n,r,i,o,s,a,l,c;Hh(1,arguments);var u=tp(),d=Kh(null!==(n=null!==(r=null!==(i=null!==(o=null==t?void 0:t.weekStartsOn)&&void 0!==o?o:null==t||null===(s=t.locale)||void 0===s||null===(a=s.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==i?i:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=Vh(e),p=h.getDay(),f=(p<d?7:0)+p-d;return h.setDate(h.getDate()-f),h.setHours(0,0,0,0),h}function rp(e,t,n){Hh(2,arguments);var r=np(e,n),i=np(t,n),o=r.getTime()-Gh(r),s=i.getTime()-Gh(i);return Math.round((o-s)/6048e5)}function ip(e,t){Hh(2,arguments);var n=Vh(e),r=Vh(t);return n.getFullYear()-r.getFullYear()}function op(e,t){return Hh(2,arguments),Vh(e).getTime()-Vh(t).getTime()}var sp,ap,lp={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function cp(e){return e?lp[e]:lp.trunc}function up(e,t,n){Hh(2,arguments);var r=op(e,t)/36e5;return cp(null==n?void 0:n.roundingMethod)(r)}function dp(e,t,n){Hh(2,arguments);var r=op(e,t)/6e4;return cp(null==n?void 0:n.roundingMethod)(r)}function hp(e,t,n){Hh(2,arguments);var r=op(e,t)/1e3;return cp(null==n?void 0:n.roundingMethod)(r)}function pp(){return(pp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var fp,mp,gp=function(e){return i.createElement("svg",pp({width:25,height:25,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),sp||(sp=i.createElement("path",{d:"M7.78 19.607h2.029v-2.03h-2.03a3.049 3.049 0 01-3.044-3.047c0-1.425 1.217-2.798 2.713-3.06l.59-.104.194-.567c.713-2.082 2.485-3.375 4.621-3.375a5.08 5.08 0 015.074 5.076v1.015h1.014c1.12 0 2.03.91 2.03 2.03 0 1.12-.91 2.031-2.03 2.031h-3.044v2.03h3.044A4.064 4.064 0 0023 15.547a4.073 4.073 0 00-3.1-3.948c-.444-3.494-3.435-6.205-7.047-6.205-2.796 0-5.226 1.636-6.335 4.214-2.18.651-3.812 2.71-3.812 4.923a5.08 5.08 0 005.074 5.077z"})),ap||(ap=i.createElement("path",{d:"M16.184 11.856l-4.502 4.923-2.506-2.345 1.181-1.262 1.23 1.15 3.321-3.632 1.276 1.166z"})))};function bp(){return(bp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var vp=function(e){return i.createElement("svg",bp({width:25,height:25,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),fp||(fp=i.createElement("path",{d:"M14.014 19.607v-4.061h3.044l-4.059-5.076-4.059 5.076h3.045v4.06h2.029z"})),mp||(mp=i.createElement("path",{d:"M7.78 19.606h2.029v-2.03h-2.03a3.049 3.049 0 01-3.043-3.046c0-1.425 1.216-2.798 2.712-3.06l.59-.104.194-.567c.714-2.082 2.485-3.375 4.621-3.375a5.08 5.08 0 015.074 5.076v1.015h1.014c1.12 0 2.03.91 2.03 2.03 0 1.12-.91 2.03-2.03 2.03h-3.044v2.031h3.044A4.064 4.064 0 0023 15.546a4.073 4.073 0 00-3.1-3.948c-.444-3.494-3.435-6.205-7.047-6.205-2.796 0-5.226 1.636-6.335 4.213-2.18.652-3.812 2.711-3.812 4.924a5.08 5.08 0 005.074 5.076z"})))};n(371);var yp,Sp=e=>{let{isMobile:t=!1}=e;const{t:n}=Wi(),r=Fn(e=>e.editor.lastSavedTime),s=Fn(e=>e.editor.saving),[a,l]=Object(i.useState)(Date.now()),c=Fn(e=>e.editor.loading),u="pending"===s;return Object(i.useEffect)(()=>{l(Date.now());const e=setInterval(()=>{l(Date.now())},1e4);return()=>clearInterval(e)},[r]),r&&"success"===c&&o.a.createElement("div",{className:mi()("save-status",{"save-status--mobile":t})},u?o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"save-status__icon"},o.a.createElement(vp,null)),o.a.createElement("div",{className:"save-status__status"},n("saveStatus.saving"),"…")):o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"save-status__icon"},o.a.createElement(gp,null)),o.a.createElement("div",{className:"save-status__text"},n("saveStatus.saved")," ",function(e,t,n){Hh(2,arguments);var r,i=0,o=Vh(e),s=Vh(t);if(null!=n&&n.unit)"second"===(r=null==n?void 0:n.unit)?i=hp(o,s):"minute"===r?i=dp(o,s):"hour"===r?i=up(o,s):"day"===r?i=Xh(o,s):"week"===r?i=rp(o,s):"month"===r?i=Yh(o,s):"quarter"===r?i=Jh(o,s):"year"===r&&(i=ip(o,s));else{var a=hp(o,s);Math.abs(a)<60?(i=hp(o,s),r="second"):Math.abs(a)<3600?(i=dp(o,s),r="minute"):Math.abs(a)<86400&&Math.abs(Xh(o,s))<1?(i=up(o,s),r="hour"):Math.abs(a)<604800&&(i=Xh(o,s))&&Math.abs(i)<7?r="day":Math.abs(a)<2629746?(i=rp(o,s),r="week"):Math.abs(a)<7889238?(i=Yh(o,s),r="month"):Math.abs(a)<31556952&&Jh(o,s)<4?(i=Jh(o,s),r="quarter"):(i=ip(o,s),r="year")}var l=new Intl.RelativeTimeFormat(null==n?void 0:n.locale,{localeMatcher:null==n?void 0:n.localeMatcher,numeric:(null==n?void 0:n.numeric)||"auto",style:null==n?void 0:n.style});return l.format(i,r)}(r,a,{style:"narrow"}))))};function _p(){return(_p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var xp,wp=function(e){return i.createElement("svg",_p({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),yp||(yp=i.createElement("path",{d:"M12 16l-5-5 1.4-1.45 2.6 2.6V4h2v8.15l2.6-2.6L17 11l-5 5zm-8 4v-5h2v3h12v-3h2v5H4z"})))};function kp(){return(kp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Op=function(e){return i.createElement("svg",kp({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),xp||(xp=i.createElement("path",{d:"M5 19h1.4l8.625-8.625-1.4-1.4L5 17.6V19zM19.3 8.925l-4.25-4.2 1.4-1.4a1.92 1.92 0 011.413-.575 1.92 1.92 0 011.412.575l1.4 1.4c.383.383.583.846.6 1.388a1.806 1.806 0 01-.55 1.387L19.3 8.925zM17.85 10.4L7.25 21H3v-4.25l10.6-10.6 4.25 4.25zm-3.525-.725l-.7-.7 1.4 1.4-.7-.7z"})))};function Ep(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ap={exports:{}};
|
||
/*!
|
||
Copyright (c) 2018 Jed Watson.
|
||
Licensed under the MIT License (MIT), see
|
||
http://jedwatson.github.io/classnames
|
||
*/!function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e=[],r=0;r<arguments.length;r++){var i=arguments[r];if(i){var o=typeof i;if("string"===o||"number"===o)e.push(i);else if(Array.isArray(i)){if(i.length){var s=n.apply(null,i);s&&e.push(s)}}else if("object"===o){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){e.push(i.toString());continue}for(var a in i)t.call(i,a)&&i[a]&&e.push(a)}}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(Ap);var Tp=Ep(Ap.exports),Cp={exports:{}},Mp={exports:{}},$p={};!function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:var m=e.type;switch(m){case l:case c:case r:case o:case i:case d:return m;default:var g=m&&m.$$typeof;switch(g){case a:case u:case f:case p:case s:return g;default:return h}}case n:return h}}}var S=l,_=c,x=a,w=s,k=t,O=u,E=r,A=f,T=p,C=n,M=o,$=i,P=d,R=!1;function j(e){return y(e)===c}$p.AsyncMode=S,$p.ConcurrentMode=_,$p.ContextConsumer=x,$p.ContextProvider=w,$p.Element=k,$p.ForwardRef=O,$p.Fragment=E,$p.Lazy=A,$p.Memo=T,$p.Portal=C,$p.Profiler=M,$p.StrictMode=$,$p.Suspense=P,$p.isAsyncMode=function(e){return R||(R=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),j(e)||y(e)===l},$p.isConcurrentMode=j,$p.isContextConsumer=function(e){return y(e)===a},$p.isContextProvider=function(e){return y(e)===s},$p.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},$p.isForwardRef=function(e){return y(e)===u},$p.isFragment=function(e){return y(e)===r},$p.isLazy=function(e){return y(e)===f},$p.isMemo=function(e){return y(e)===p},$p.isPortal=function(e){return y(e)===n},$p.isProfiler=function(e){return y(e)===o},$p.isStrictMode=function(e){return y(e)===i},$p.isSuspense=function(e){return y(e)===d},$p.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===o||e===i||e===d||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===s||e.$$typeof===a||e.$$typeof===u||e.$$typeof===g||e.$$typeof===b||e.$$typeof===v||e.$$typeof===m)},$p.typeOf=y}(),Mp.exports=$p;var Pp=Mp.exports,Rp=Object.getOwnPropertySymbols,jp=Object.prototype.hasOwnProperty,Np=Object.prototype.propertyIsEnumerable;
|
||
/*
|
||
object-assign
|
||
(c) Sindre Sorhus
|
||
@license MIT
|
||
*/function Dp(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var Ip,Lp=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,i=Dp(e),o=1;o<arguments.length;o++){for(var s in n=Object(arguments[o]))jp.call(n,s)&&(i[s]=n[s]);if(Rp){r=Rp(n);for(var a=0;a<r.length;a++)Np.call(n,r[a])&&(i[r[a]]=n[r[a]])}}return i},Bp=Function.call.bind(Object.prototype.hasOwnProperty),zp={},Fp=Bp;function Up(e,t,n,r,i){for(var o in e)if(Fp(e,o)){var s;try{if("function"!=typeof e[o]){var a=Error((r||"React class")+": "+n+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw a.name="Invariant Violation",a}s=e[o](t,o,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){s=e}if(!s||s instanceof Error||Ip((r||"React class")+": type specification of "+n+" `"+o+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof s+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),s instanceof Error&&!(s.message in zp)){zp[s.message]=!0;var l=i?i():"";Ip("Failed "+n+" type: "+s.message+(null!=l?l:""))}}}Ip=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}},Up.resetWarningCache=function(){zp={}};var Qp,qp=Pp,Gp=Lp,Hp="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Vp=Bp,Wp=Up;function Xp(){return null}Qp=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}};var Yp=Pp;Cp.exports=function(e,t){var n="function"==typeof Symbol&&Symbol.iterator;var r={array:a("array"),bigint:a("bigint"),bool:a("boolean"),func:a("function"),number:a("number"),object:a("object"),string:a("string"),symbol:a("symbol"),any:s(Xp),arrayOf:function(e){return s((function(t,n,r,i,s){if("function"!=typeof e)return new o("Property `"+s+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a))return new o("Invalid "+i+" `"+s+"` of type `"+u(a)+"` supplied to `"+r+"`, expected an array.");for(var l=0;l<a.length;l++){var c=e(a,l,r,i,s+"["+l+"]",Hp);if(c instanceof Error)return c}return null}))},element:s((function(t,n,r,i,s){var a=t[n];return e(a)?null:new o("Invalid "+i+" `"+s+"` of type `"+u(a)+"` supplied to `"+r+"`, expected a single ReactElement.")})),elementType:s((function(e,t,n,r,i){var s=e[t];return qp.isValidElementType(s)?null:new o("Invalid "+r+" `"+i+"` of type `"+u(s)+"` supplied to `"+n+"`, expected a single ReactElement type.")})),instanceOf:function(e){return s((function(t,n,r,i,s){if(!(t[n]instanceof e)){var a=e.name||"<<anonymous>>";return new o("Invalid "+i+" `"+s+"` of type `"+function(e){if(!e.constructor||!e.constructor.name)return"<<anonymous>>";return e.constructor.name}(t[n])+"` supplied to `"+r+"`, expected instance of `"+a+"`.")}return null}))},node:s((function(e,t,n,r,i){return c(e[t])?null:new o("Invalid "+r+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return s((function(t,n,r,i,s){if("function"!=typeof e)return new o("Property `"+s+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var a=t[n],l=u(a);if("object"!==l)return new o("Invalid "+i+" `"+s+"` of type `"+l+"` supplied to `"+r+"`, expected an object.");for(var c in a)if(Vp(a,c)){var d=e(a,c,r,i,s+"."+c,Hp);if(d instanceof Error)return d}return null}))},oneOf:function(e){if(!Array.isArray(e))return Qp(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),Xp;function t(t,n,r,s,a){for(var l=t[n],c=0;c<e.length;c++)if(i(l,e[c]))return null;var u=JSON.stringify(e,(function(e,t){return"symbol"===d(t)?String(t):t}));return new o("Invalid "+s+" `"+a+"` of value `"+String(l)+"` supplied to `"+r+"`, expected one of "+u+".")}return s(t)},oneOfType:function(e){if(!Array.isArray(e))return Qp("Invalid argument supplied to oneOfType, expected an instance of array."),Xp;for(var t=0;t<e.length;t++){var n=e[t];if("function"!=typeof n)return Qp("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+h(n)+" at index "+t+"."),Xp}return s((function(t,n,r,i,s){for(var a=[],l=0;l<e.length;l++){var c=(0,e[l])(t,n,r,i,s,Hp);if(null==c)return null;c.data&&Vp(c.data,"expectedType")&&a.push(c.data.expectedType)}return new o("Invalid "+i+" `"+s+"` supplied to `"+r+"`"+(a.length>0?", expected one of type ["+a.join(", ")+"]":"")+".")}))},shape:function(e){return s((function(t,n,r,i,s){var a=t[n],c=u(a);if("object"!==c)return new o("Invalid "+i+" `"+s+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");for(var h in e){var p=e[h];if("function"!=typeof p)return l(r,i,s,h,d(p));var f=p(a,h,r,i,s+"."+h,Hp);if(f)return f}return null}))},exact:function(e){return s((function(t,n,r,i,s){var a=t[n],c=u(a);if("object"!==c)return new o("Invalid "+i+" `"+s+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var h=Gp({},t[n],e);for(var p in h){var f=e[p];if(Vp(e,p)&&"function"!=typeof f)return l(r,i,s,p,d(f));if(!f)return new o("Invalid "+i+" `"+s+"` key `"+p+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=f(a,p,r,i,s+"."+p,Hp);if(m)return m}return null}))}};function i(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function o(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function s(e){var n={},r=0;function i(i,s,a,l,c,u,d){if(l=l||"<<anonymous>>",u=u||a,d!==Hp){if(t){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}if("undefined"!=typeof console){var p=l+":"+a;!n[p]&&r<3&&(Qp("You are manually calling a React.PropTypes validation function for the `"+u+"` prop on `"+l+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[p]=!0,r++)}}return null==s[a]?i?null===s[a]?new o("The "+c+" `"+u+"` is marked as required in `"+l+"`, but its value is `null`."):new o("The "+c+" `"+u+"` is marked as required in `"+l+"`, but its value is `undefined`."):null:e(s,a,l,c,u)}var s=i.bind(null,!1);return s.isRequired=i.bind(null,!0),s}function a(e){return s((function(t,n,r,i,s,a){var l=t[n];return u(l)!==e?new o("Invalid "+i+" `"+s+"` of type `"+d(l)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function l(e,t,n,r,i){return new o((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function c(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(c);if(null===t||e(t))return!0;var r=function(e){var t=e&&(n&&e[n]||e["@@iterator"]);if("function"==typeof t)return t}(t);if(!r)return!1;var i,o=r.call(t);if(r!==t.entries){for(;!(i=o.next()).done;)if(!c(i.value))return!1}else for(;!(i=o.next()).done;){var s=i.value;if(s&&!c(s[1]))return!1}return!0;default:return!1}}function u(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function d(e){if(null==e)return""+e;var t=u(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function h(e){var t=d(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return o.prototype=Error.prototype,r.checkPropTypes=Wp,r.resetWarningCache=Wp.resetWarningCache,r.PropTypes=r,r}(Yp.isElement,!0);var Zp=Ep(Cp.exports),Jp={exports:{}},Kp={exports:{}};!function(e,t){!function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),m=Symbol.iterator;function g(e){if(null===e||"object"!=typeof e)return null;var t=m&&e[m]||e["@@iterator"];return"function"==typeof t?t:null}var b={current:null},v={transition:null},y={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},S={current:null},_={},x=null;function w(e){x=e}_.setExtraStackFrame=function(e){x=e},_.getCurrentStack=null,_.getStackAddendum=function(){var e="";x&&(e+=x);var t=_.getCurrentStack;return t&&(e+=t()||""),e};var k={ReactCurrentDispatcher:b,ReactCurrentBatchConfig:v,ReactCurrentOwner:S};function O(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];A("warn",e,n)}function E(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];A("error",e,n)}function A(e,t,n){var r=k.ReactDebugCurrentFrame.getStackAddendum();""!==r&&(t+="%s",n=n.concat([r]));var i=n.map((function(e){return String(e)}));i.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,i)}k.ReactDebugCurrentFrame=_,k.ReactCurrentActQueue=y;var T={};function C(e,t){var n=e.constructor,r=n&&(n.displayName||n.name)||"ReactClass",i=r+"."+t;T[i]||(E("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",t,r),T[i]=!0)}var M={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,n){C(e,"forceUpdate")},enqueueReplaceState:function(e,t,n,r){C(e,"replaceState")},enqueueSetState:function(e,t,n,r){C(e,"setState")}},$=Object.assign,P={};function R(e,t,n){this.props=e,this.context=t,this.refs=P,this.updater=n||M}Object.freeze(P),R.prototype.isReactComponent={},R.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},R.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var j={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},N=function(e,t){Object.defineProperty(R.prototype,e,{get:function(){O("%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})};for(var D in j)j.hasOwnProperty(D)&&N(D,j[D]);function I(){}function L(e,t,n){this.props=e,this.context=t,this.refs=P,this.updater=n||M}I.prototype=R.prototype;var B=L.prototype=new I;B.constructor=L,$(B,R.prototype),B.isPureReactComponent=!0;var z=Array.isArray;function F(e){return z(e)}function U(e){return""+e}function Q(e){if(function(e){try{return U(e),!1}catch(e){return!0}}(e))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),U(e)}function q(e){return e.displayName||"Context"}function G(e){if(null==e)return null;if("number"==typeof e.tag&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case i:return"Fragment";case r:return"Portal";case s:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case d:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case l:return q(e)+".Consumer";case a:return q(e._context)+".Provider";case c:return function(e,t,n){var r=e.displayName;if(r)return r;var i=t.displayName||t.name||"";return""!==i?n+"("+i+")":n}(e,e.render,"ForwardRef");case h:var t=e.displayName||null;return null!==t?t:G(e.type)||"Memo";case p:var n=e,f=n._payload,m=n._init;try{return G(m(f))}catch(e){return null}}return null}var H,V,W,X=Object.prototype.hasOwnProperty,Y={key:!0,ref:!0,__self:!0,__source:!0};function Z(e){if(X.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}function J(e){if(X.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}function K(e,t){var n=function(){H||(H=!0,E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}function ee(e,t){var n=function(){V||(V=!0,E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}function te(e){if("string"==typeof e.ref&&S.current&&e.__self&&S.current.stateNode!==e.__self){var t=G(S.current.type);W[t]||(E('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',t,e.ref),W[t]=!0)}}W={};var ne=function(e,t,r,i,o,s,a){var l={$$typeof:n,type:e,key:t,ref:r,props:a,_owner:s,_store:{}};return Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l};function re(e,t,n){var r,i={},o=null,s=null,a=null,l=null;if(null!=t)for(r in Z(t)&&(s=t.ref,te(t)),J(t)&&(Q(t.key),o=""+t.key),a=void 0===t.__self?null:t.__self,l=void 0===t.__source?null:t.__source,t)X.call(t,r)&&!Y.hasOwnProperty(r)&&(i[r]=t[r]);var c=arguments.length-2;if(1===c)i.children=n;else if(c>1){for(var u=Array(c),d=0;d<c;d++)u[d]=arguments[d+2];Object.freeze&&Object.freeze(u),i.children=u}if(e&&e.defaultProps){var h=e.defaultProps;for(r in h)void 0===i[r]&&(i[r]=h[r])}if(o||s){var p="function"==typeof e?e.displayName||e.name||"Unknown":e;o&&K(i,p),s&&ee(i,p)}return ne(e,o,s,a,l,S.current,i)}function ie(e,t,n){if(null==e)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r,i,o=$({},e.props),s=e.key,a=e.ref,l=e._self,c=e._source,u=e._owner;if(null!=t)for(r in Z(t)&&(a=t.ref,u=S.current),J(t)&&(Q(t.key),s=""+t.key),e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)X.call(t,r)&&!Y.hasOwnProperty(r)&&(void 0===t[r]&&void 0!==i?o[r]=i[r]:o[r]=t[r]);var d=arguments.length-2;if(1===d)o.children=n;else if(d>1){for(var h=Array(d),p=0;p<d;p++)h[p]=arguments[p+2];o.children=h}return ne(e.type,s,a,l,c,u,o)}function oe(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var se=!1,ae=/\/+/g;function le(e){return e.replace(ae,"$&/")}function ce(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(Q(e.key),n=""+e.key,r={"=":"=0",":":"=2"},"$"+n.replace(/[=:]/g,(function(e){return r[e]}))):t.toString(36);var n,r}function ue(e,t,i,o,s){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var l,c,u,d=!1;if(null===e)d=!0;else switch(a){case"string":case"number":d=!0;break;case"object":switch(e.$$typeof){case n:case r:d=!0}}if(d){var h=e,p=s(h),f=""===o?"."+ce(h,0):o;if(F(p)){var m="";null!=f&&(m=le(f)+"/"),ue(p,t,m,"",(function(e){return e}))}else null!=p&&(oe(p)&&(!p.key||h&&h.key===p.key||Q(p.key),l=p,c=i+(!p.key||h&&h.key===p.key?"":le(""+p.key)+"/")+f,p=ne(l.type,c,l.ref,l._self,l._source,l._owner,l.props)),t.push(p));return 1}var b=0,v=""===o?".":o+":";if(F(e))for(var y=0;y<e.length;y++)b+=ue(u=e[y],t,i,v+ce(u,y),s);else{var S=g(e);if("function"==typeof S){var _=e;S===_.entries&&(se||O("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),se=!0);for(var x,w=S.call(_),k=0;!(x=w.next()).done;)b+=ue(u=x.value,t,i,v+ce(u,k++),s)}else if("object"===a){var E=String(e);throw new Error("Objects are not valid as a React child (found: "+("[object Object]"===E?"object with keys {"+Object.keys(e).join(", ")+"}":E)+"). If you meant to render a collection of children, use an array instead.")}}return b}function de(e,t,n){if(null==e)return e;var r=[],i=0;return ue(e,r,"","",(function(e){return t.call(n,e,i++)})),r}var he;function pe(e){if(-1===e._status){var t=(0,e._result)();if(t.then((function(t){if(0===e._status||-1===e._status){var n=e;n._status=1,n._result=t}}),(function(t){if(0===e._status||-1===e._status){var n=e;n._status=2,n._result=t}})),-1===e._status){var n=e;n._status=0,n._result=t}}if(1===e._status){var r=e._result;return void 0===r&&E("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?",r),"default"in r||E("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",r),r.default}throw e._result}function fe(e){return"string"==typeof e||"function"==typeof e||(e===i||e===s||e===o||e===u||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===h||e.$$typeof===a||e.$$typeof===l||e.$$typeof===c||e.$$typeof===he||void 0!==e.getModuleId))}function me(){var e=b.current;return null===e&&E("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem."),e}he=Symbol.for("react.module.reference");var ge,be,ve,ye,Se,_e,xe,we=0;function ke(){}ke.__reactDisabledLog=!0;var Oe,Ee=k.ReactCurrentDispatcher;function Ae(e,t,n){if(void 0===Oe)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);Oe=r&&r[1]||""}return"\n"+Oe+e}var Te,Ce=!1,Me="function"==typeof WeakMap?WeakMap:Map;function $e(e,t){if(!e||Ce)return"";var n,r=Te.get(e);if(void 0!==r)return r;Ce=!0;var i,o=Error.prepareStackTrace;Error.prepareStackTrace=void 0,i=Ee.current,Ee.current=null,function(){if(0===we){ge=console.log,be=console.info,ve=console.warn,ye=console.error,Se=console.group,_e=console.groupCollapsed,xe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ke,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}we++}();try{if(t){var s=function(){throw Error()};if(Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(s,[])}catch(e){n=e}Reflect.construct(e,[],s)}else{try{s.call()}catch(e){n=e}e.call(s.prototype)}}else{try{throw Error()}catch(e){n=e}e()}}catch(t){if(t&&n&&"string"==typeof t.stack){for(var a=t.stack.split("\n"),l=n.stack.split("\n"),c=a.length-1,u=l.length-1;c>=1&&u>=0&&a[c]!==l[u];)u--;for(;c>=1&&u>=0;c--,u--)if(a[c]!==l[u]){if(1!==c||1!==u)do{if(c--,--u<0||a[c]!==l[u]){var d="\n"+a[c].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),"function"==typeof e&&Te.set(e,d),d}}while(c>=1&&u>=0);break}}}finally{Ce=!1,Ee.current=i,function(){if(0===--we){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:$({},e,{value:ge}),info:$({},e,{value:be}),warn:$({},e,{value:ve}),error:$({},e,{value:ye}),group:$({},e,{value:Se}),groupCollapsed:$({},e,{value:_e}),groupEnd:$({},e,{value:xe})})}we<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=o}var h=e?e.displayName||e.name:"",p=h?Ae(h):"";return"function"==typeof e&&Te.set(e,p),p}function Pe(e,t,n){if(null==e)return"";if("function"==typeof e)return $e(e,function(e){var t=e.prototype;return!(!t||!t.isReactComponent)}(e));if("string"==typeof e)return Ae(e);switch(e){case u:return Ae("Suspense");case d:return Ae("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case c:return $e(e.render,!1);case h:return Pe(e.type,t,n);case p:var r=e,i=r._payload,o=r._init;try{return Pe(o(i),t,n)}catch(e){}}return""}Te=new Me;var Re,je={},Ne=k.ReactDebugCurrentFrame;function De(e){if(e){var t=e._owner,n=Pe(e.type,e._source,t?t.type:null);Ne.setExtraStackFrame(n)}else Ne.setExtraStackFrame(null)}function Ie(e){if(e){var t=e._owner;w(Pe(e.type,e._source,t?t.type:null))}else w(null)}function Le(){if(S.current){var e=G(S.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}function Be(e){return null!=e&&void 0!==(t=e.__source)?"\n\nCheck your code at "+t.fileName.replace(/^.*[\\\/]/,"")+":"+t.lineNumber+".":"";var t}Re=!1;var ze={};function Fe(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=Le();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!ze[n]){ze[n]=!0;var r="";e&&e._owner&&e._owner!==S.current&&(r=" It was passed a child from "+G(e._owner.type)+"."),Ie(e),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),Ie(null)}}}function Ue(e,t){if("object"==typeof e)if(F(e))for(var n=0;n<e.length;n++){var r=e[n];oe(r)&&Fe(r,t)}else if(oe(e))e._store&&(e._store.validated=!0);else if(e){var i=g(e);if("function"==typeof i&&i!==e.entries)for(var o,s=i.call(e);!(o=s.next()).done;)oe(o.value)&&Fe(o.value,t)}}function Qe(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==c&&n.$$typeof!==h)return;t=n.propTypes}if(t){var r=G(n);!function(e,t,n,r,i){var o=Function.call.bind(X);for(var s in e)if(o(e,s)){var a=void 0;try{if("function"!=typeof e[s]){var l=Error((r||"React class")+": "+n+" type `"+s+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[s]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}a=e[s](t,s,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){a=e}!a||a instanceof Error||(De(i),E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,s,typeof a),De(null)),a instanceof Error&&!(a.message in je)&&(je[a.message]=!0,De(i),E("Failed %s type: %s",n,a.message),De(null))}}(t,e.props,"prop",r,e)}else if(void 0!==n.PropTypes&&!Re){Re=!0,E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",G(n)||"Unknown")}"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function qe(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){Ie(e),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),Ie(null);break}}null!==e.ref&&(Ie(e),E("Invalid attribute `ref` supplied to `React.Fragment`."),Ie(null))}function Ge(e,t,r){var o=fe(e);if(!o){var s="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(s+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var a,l=Be(t);s+=l||Le(),null===e?a="null":F(e)?a="array":void 0!==e&&e.$$typeof===n?(a="<"+(G(e.type)||"Unknown")+" />",s=" Did you accidentally export a JSX literal instead of a component?"):a=typeof e,E("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",a,s)}var c=re.apply(this,arguments);if(null==c)return c;if(o)for(var u=2;u<arguments.length;u++)Ue(arguments[u],e);return e===i?qe(c):Qe(c),c}var He=!1;var Ve=!1,We=null;var Xe=0,Ye=!1;function Ze(e){e!==Xe-1&&E("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),Xe=e}function Je(t,n,r){var i=y.current;if(null!==i)try{et(i),function(t){if(null===We)try{var n=("require"+Math.random()).slice(0,7);We=(e&&e[n]).call(e,"timers").setImmediate}catch(e){We=function(e){!1===Ve&&(Ve=!0,"undefined"==typeof MessageChannel&&E("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(void 0)}}We(t)}((function(){0===i.length?(y.current=null,n(t)):Je(t,n,r)}))}catch(e){r(e)}else n(t)}var Ke=!1;function et(e){if(!Ke){Ke=!0;var t=0;try{for(;t<e.length;t++){var n=e[t];do{n=n(!0)}while(null!==n)}e.length=0}catch(n){throw e=e.slice(t+1),n}finally{Ke=!1}}}var tt=Ge,nt=function(e,t,n){for(var r=ie.apply(this,arguments),i=2;i<arguments.length;i++)Ue(arguments[i],r.type);return Qe(r),r},rt=function(e){var t=Ge.bind(null,e);return t.type=e,He||(He=!0,O("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(t,"type",{enumerable:!1,get:function(){return O("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t},it={map:de,forEach:function(e,t,n){de(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return de(e,(function(){t++})),t},toArray:function(e){return de(e,(function(e){return e}))||[]},only:function(e){if(!oe(e))throw new Error("React.Children.only expected to receive a single React element child.");return e}};t.Children=it,t.Component=R,t.Fragment=i,t.Profiler=s,t.PureComponent=L,t.StrictMode=o,t.Suspense=u,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=k,t.cloneElement=nt,t.createContext=function(e){var t={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};t.Provider={$$typeof:a,_context:t};var n=!1,r=!1,i=!1,o={$$typeof:l,_context:t};return Object.defineProperties(o,{Provider:{get:function(){return r||(r=!0,E("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),t.Provider},set:function(e){t.Provider=e}},_currentValue:{get:function(){return t._currentValue},set:function(e){t._currentValue=e}},_currentValue2:{get:function(){return t._currentValue2},set:function(e){t._currentValue2=e}},_threadCount:{get:function(){return t._threadCount},set:function(e){t._threadCount=e}},Consumer:{get:function(){return n||(n=!0,E("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),t.Consumer}},displayName:{get:function(){return t.displayName},set:function(e){i||(O("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",e),i=!0)}}}),t.Consumer=o,t._currentRenderer=null,t._currentRenderer2=null,t},t.createElement=tt,t.createFactory=rt,t.createRef=function(){var e={current:null};return Object.seal(e),e},t.forwardRef=function(e){null!=e&&e.$$typeof===h?E("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?E("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&E("forwardRef render functions accept exactly two parameters: props and ref. %s",1===e.length?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),null!=e&&(null==e.defaultProps&&null==e.propTypes||E("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"));var t,n={$$typeof:c,render:e};return Object.defineProperty(n,"displayName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(n){t=n,e.name||e.displayName||(e.displayName=n)}}),n},t.isValidElement=oe,t.lazy=function(e){var t,n,r={$$typeof:p,_payload:{_status:-1,_result:e},_init:pe};return Object.defineProperties(r,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){E("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),t=e,Object.defineProperty(r,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return n},set:function(e){E("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),n=e,Object.defineProperty(r,"propTypes",{enumerable:!0})}}}),r},t.memo=function(e,t){fe(e)||E("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e);var n,r={$$typeof:h,type:e,compare:void 0===t?null:t};return Object.defineProperty(r,"displayName",{enumerable:!1,configurable:!0,get:function(){return n},set:function(t){n=t,e.name||e.displayName||(e.displayName=t)}}),r},t.startTransition=function(e,t){var n=v.transition;v.transition={};var r=v.transition;v.transition._updatedFibers=new Set;try{e()}finally{if(v.transition=n,null===n&&r._updatedFibers)r._updatedFibers.size>10&&O("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),r._updatedFibers.clear()}},t.unstable_act=function(e){var t=Xe;Xe++,null===y.current&&(y.current=[]);var n,r=y.isBatchingLegacy;try{if(y.isBatchingLegacy=!0,n=e(),!r&&y.didScheduleLegacyUpdate){var i=y.current;null!==i&&(y.didScheduleLegacyUpdate=!1,et(i))}}catch(e){throw Ze(t),e}finally{y.isBatchingLegacy=r}if(null!==n&&"object"==typeof n&&"function"==typeof n.then){var o=n,s=!1,a={then:function(e,n){s=!0,o.then((function(r){Ze(t),0===Xe?Je(r,e,n):e(r)}),(function(e){Ze(t),n(e)}))}};return Ye||"undefined"==typeof Promise||Promise.resolve().then((function(){})).then((function(){s||(Ye=!0,E("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))})),a}var l=n;if(Ze(t),0===Xe){var c=y.current;return null!==c&&(et(c),y.current=null),{then:function(e,t){null===y.current?(y.current=[],Je(l,e,t)):e(l)}}}return{then:function(e,t){e(l)}}},t.useCallback=function(e,t){return me().useCallback(e,t)},t.useContext=function(e){var t=me();if(void 0!==e._context){var n=e._context;n.Consumer===e?E("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):n.Provider===e&&E("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return t.useContext(e)},t.useDebugValue=function(e,t){return me().useDebugValue(e,t)},t.useDeferredValue=function(e){return me().useDeferredValue(e)},t.useEffect=function(e,t){return me().useEffect(e,t)},t.useId=function(){return me().useId()},t.useImperativeHandle=function(e,t,n){return me().useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return me().useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return me().useLayoutEffect(e,t)},t.useMemo=function(e,t){return me().useMemo(e,t)},t.useReducer=function(e,t,n){return me().useReducer(e,t,n)},t.useRef=function(e){return me().useRef(e)},t.useState=function(e){return me().useState(e)},t.useSyncExternalStore=function(e,t,n){return me().useSyncExternalStore(e,t,n)},t.useTransition=function(){return me().useTransition()},t.version="18.2.0","undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()}(Kp,Kp.exports);var ef=Kp.exports;Jp.exports=ef;var tf=Ep(Jp.exports);!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(':root {\n --rpf-brand-black: hsla(60, 4%, 11%, 1);\n --rpf-brand-leaf: hsla(123, 43%, 48%, 1);\n --rpf-brand-raspberry: hsla(342, 71%, 47%, 1);\n}\n\n:root {\n --rpf-red-100: hsla(4, 89%, 96%, 1);\n --rpf-red-200: hsla(1, 87%, 91%, 1);\n --rpf-red-400: hsla(1, 87%, 82%, 1);\n --rpf-red-600: hsla(1, 87%, 72%, 1);\n --rpf-red-800: hsla(1, 87%, 63%, 1);\n --rpf-red-900: hsla(1, 52%, 50%, 1);\n --rpf-green-100: hsla(125, 41%, 95%, 1);\n --rpf-green-200: hsla(122, 39%, 87%, 1);\n --rpf-green-400: hsla(123, 40%, 74%, 1);\n --rpf-green-600: hsla(123, 40%, 61%, 1);\n --rpf-green-800: hsla(123, 43%, 48%, 1);\n --rpf-green-900: hsla(123, 43%, 36%, 1);\n --rpf-teal-100: hsla(176, 55%, 94%, 1);\n --rpf-teal-200: hsla(174, 55%, 85%, 1);\n --rpf-teal-400: hsla(174, 55%, 70%, 1);\n --rpf-teal-600: hsla(174, 56%, 56%, 1);\n --rpf-teal-800: hsla(174, 81%, 41%, 1);\n --rpf-teal-900: hsla(174, 81%, 29%, 1);\n --rpf-orange-100: hsla(31, 100%, 95%, 1);\n --rpf-orange-200: hsla(32, 100%, 88%, 1);\n --rpf-orange-400: hsla(31, 100%, 77%, 1);\n --rpf-orange-600: hsla(31, 99%, 65%, 1);\n --rpf-orange-800: hsla(31, 99%, 54%, 1);\n --rpf-orange-900: hsla(31, 85%, 37%, 1);\n --rpf-yellow-100: hsla(51, 100%, 95%, 1);\n --rpf-yellow-200: hsla(52, 100%, 87%, 1);\n --rpf-yellow-400: hsla(51, 100%, 75%, 1);\n --rpf-yellow-600: hsla(52, 100%, 63%, 1);\n --rpf-yellow-800: hsla(52, 100%, 50%, 1);\n --rpf-yellow-900: hsla(52, 100%, 26%, 1);\n --rpf-purple-100: hsla(282, 36%, 95%, 1);\n --rpf-purple-200: hsla(279, 38%, 87%, 1);\n --rpf-purple-400: hsla(279, 38%, 73%, 1);\n --rpf-purple-600: hsla(279, 37%, 60%, 1);\n --rpf-purple-800: hsla(279, 43%, 47%, 1);\n --rpf-purple-900: hsla(280, 43%, 37%, 1);\n --rpf-navy-100: hsla(235, 38%, 94%, 1);\n --rpf-navy-200: hsla(234, 38%, 84%, 1);\n --rpf-navy-400: hsla(235, 38%, 69%, 1);\n --rpf-navy-600: hsla(235, 38%, 53%, 1);\n --rpf-navy-800: hsla(235, 63%, 37%, 1);\n --rpf-navy-900: hsla(234, 63%, 30%, 1);\n --rpf-blue-100: hsla(203, 86%, 95%, 1);\n --rpf-blue-200: hsla(204, 88%, 87%, 1);\n --rpf-blue-400: hsla(204, 88%, 74%, 1);\n --rpf-blue-600: hsla(204, 89%, 60%, 1);\n --rpf-blue-800: hsla(204, 100%, 47%, 1);\n --rpf-blue-900: hsla(204, 100%, 38%, 1);\n}\n\n:root {\n --rpf-white: hsla(0, 0%, 100%, 1);\n --rpf-off-white: hsla(225, 25%, 97%, 1);\n --rpf-grey-50: hsla(210, 8%, 95%, 1);\n --rpf-grey-100: hsla(228, 10%, 90%, 1);\n --rpf-grey-150: hsla(223, 9%, 85%, 1);\n --rpf-grey-200: hsla(228, 10%, 80%, 1);\n --rpf-grey-300: hsla(229, 9%, 75%, 1);\n --rpf-grey-400: hsla(229, 8%, 61%, 1);\n --rpf-grey-500: hsla(229, 9%, 42%, 1);\n --rpf-grey-600: hsla(228, 9%, 32%, 1);\n --rpf-grey-700: hsla(228, 9%, 22%, 1);\n --rpf-grey-800: hsla(232, 9%, 18%, 1);\n --rpf-grey-850: hsla(228, 9%, 15%, 1);\n --rpf-grey-900: hsla(228, 9%, 10%, 1);\n --rpf-grey-950: hsla(228, 8%, 5%, 1);\n --rpf-black: hsla(0, 0%, 0%, 1);\n}\n\n:root {\n --font-size-0-5: 0.5rem;\n --font-size-0-75: 0.75rem;\n --font-size-1: 1rem;\n --font-size-1-5: 1.25rem;\n --font-size-2: 1.5rem;\n --font-size-3: 2rem;\n --font-size-4: 2.5rem;\n --font-size-5: 3rem;\n --font-size-6: 3.5rem;\n --font-size-7: 4rem;\n --font-size-8: 4.5rem;\n --font-size-9: 5rem;\n}\n\n:root {\n --font-weight-regular: 400;\n --font-weight-bold: 700;\n}\n\n:root {\n --border-radius: var(--space-1);\n --input-border-width: 2px;\n --alert-border-width: 2px;\n}\n\n:root {\n --space-0-125: 0.0625rem;\n --space-0-25: 0.125rem;\n --space-0-5: 0.25rem;\n --space-1: 0.5rem;\n --space-1-5: 0.75rem;\n --space-2: 1rem;\n --space-3: 1.5rem;\n --space-4: 2rem;\n --space-5: 2.5rem;\n --space-6: 3rem;\n --space-7: 3.5rem;\n --space-8: 4rem;\n --space-9: 4.5rem;\n --space-10: 5rem;\n}\n\n:root {\n --rpf-button-primary-background-color: var(--rpf-navy-800);\n --rpf-button-primary-background-color-hover: var(--rpf-navy-900);\n --rpf-button-primary-background-color-active: var(--rpf-navy-600);\n --rpf-button-primary-background-color-disabled: var(--rpf-grey-600);\n --rpf-button-primary-text-color: var(--rpf-white);\n --rpf-button-border-radius: var(--border-radius);\n --rpf-button-lg-height: 48px;\n --rpf-button-sm-height: 32px;\n /* 44px min-height to meet WCAG AAA target size requirements */\n --rpf-button-min-target-size: 44px;\n}\n\n.rpf-button {\n all: unset;\n align-items: center;\n color: var(--rpf-button-primary-text-color);\n /*\n * We\'ve decided to follow the masses on this and have a pointer on buttons.\n * Google, Facebook, Twitter, Mozilla, and Microsoft amongst many others have a pointer on buttons.\n */\n cursor: pointer;\n display: flex;\n font-size: var(--font-size-1-5);\n font-weight: var(--font-weight-bold);\n gap: var(--space-1);\n min-height: calc(var(--rpf-button-lg-height) - var(--space-1) - var(--space-1));\n padding: var(--space-1) var(--space-2);\n position: relative;\n text-align: center;\n text-decoration: none;\n /* Fixes a rendering error that sometimes occurs due to negative z-index */\n transform: scale(1);\n width: fit-content;\n /* A bit of a hack to allow for separate visual and target heights */\n}\n.rpf-button::before {\n background-color: var(--rpf-button-primary-background-color);\n border-color: var(--rpf-button-primary-background-color);\n border-radius: var(--rpf-button-border-radius);\n border-style: solid;\n border-width: 2px;\n content: "";\n display: block;\n inset: 0;\n position: absolute;\n /* To ensure it renders under its siblings */\n z-index: -1;\n}\n.rpf-button:hover::before {\n background-color: var(--rpf-button-primary-background-color-hover);\n border-color: var(--rpf-button-primary-background-color-hover);\n}\n.rpf-button:active::before {\n background-color: var(--rpf-button-primary-background-color-active);\n border-color: var(--rpf-button-primary-background-color-active);\n}\n.rpf-button:focus-visible::before {\n outline: 3px solid var(--rpf-brand-raspberry);\n}\n.rpf-button:disabled, .rpf-button--disabled {\n cursor: default;\n}\n.rpf-button:disabled:hover::before, .rpf-button:disabled::before, .rpf-button--disabled:hover::before, .rpf-button--disabled::before {\n border-color: var(--rpf-button-primary-background-color-disabled);\n background-color: var(--rpf-button-primary-background-color-disabled);\n}\n.rpf-button--secondary {\n color: var(--rpf-button-primary-background-color);\n}\n.rpf-button--secondary::before {\n background-color: var(--rpf-button-primary-text-color);\n}\n.rpf-button--secondary:hover {\n color: var(--rpf-button-primary-background-color-hover);\n}\n.rpf-button--secondary:hover::before {\n background-color: var(--rpf-button-primary-text-color);\n border-color: var(--rpf-button-primary-background-color-hover);\n}\n.rpf-button--secondary:active {\n color: var(--rpf-button-primary-background-color-active);\n}\n.rpf-button--secondary:active::before {\n background-color: var(--rpf-button-primary-text-color);\n border-color: var(--rpf-button-primary-background-color-active);\n}\n.rpf-button--secondary:disabled, .rpf-button--secondary.rpf-button--disabled {\n color: var(--rpf-button-primary-background-color-disabled);\n}\n.rpf-button--secondary:disabled:hover::before, .rpf-button--secondary:disabled:before, .rpf-button--secondary.rpf-button--disabled:hover::before, .rpf-button--secondary.rpf-button--disabled:before {\n background-color: var(--rpf-button-primary-text-color);\n border-color: var(--rpf-button-primary-background-color-disabled);\n}\n.rpf-button--tertiary {\n color: var(--rpf-button-primary-background-color);\n}\n.rpf-button--tertiary::before {\n background-color: transparent;\n border-color: transparent;\n}\n.rpf-button--tertiary:hover {\n color: var(--rpf-button-primary-background-color-hover);\n}\n.rpf-button--tertiary:hover::before {\n background-color: transparent;\n border-color: transparent;\n}\n.rpf-button--tertiary:active {\n color: var(--rpf-button-primary-background-color-active);\n}\n.rpf-button--tertiary:active::before {\n background-color: transparent;\n}\n.rpf-button--tertiary:disabled, .rpf-button--tertiary.rpf-button--disabled {\n color: var(--rpf-button-primary-background-color-disabled);\n}\n.rpf-button--tertiary:disabled:hover::before, .rpf-button--tertiary:disabled::before, .rpf-button--tertiary.rpf-button--disabled:hover::before, .rpf-button--tertiary.rpf-button--disabled::before {\n background-color: transparent;\n border-color: transparent;\n}\n.rpf-button--icon-only {\n height: var(--rpf-button-lg-height);\n line-height: var(--rpf-button-lg-height);\n padding: 0;\n text-align: center;\n width: var(--rpf-button-lg-height);\n}\n.rpf-button--icon-only .rpf-button__icon {\n margin: 0 auto;\n}\n.rpf-button--sm {\n font-size: var(--font-size-1);\n min-height: calc(var(--rpf-button-min-target-size) - var(--space-1) - var(--space-1));\n padding: var(--space-1) var(--space-1);\n /* To account for 32px visual height and 44px target height */\n}\n.rpf-button--sm::before {\n inset: calc((var(--rpf-button-min-target-size) - var(--rpf-button-sm-height)) / 2) 0;\n}\n.rpf-button--sm.rpf-button--icon-only {\n height: var(--rpf-button-min-target-size);\n line-height: var(--rpf-button-min-target-size);\n padding: 0;\n width: var(--rpf-button-min-target-size);\n}\n.rpf-button--sm.rpf-button--icon-only::before {\n inset: calc((var(--rpf-button-min-target-size) - var(--rpf-button-sm-height)) / 2);\n}\n.rpf-button--sm .material-symbols-sharp {\n font-size: 20px;\n font-variation-settings: "OPSZ" 20;\n}\n');const nf=({type:e="primary",className:t,enabled:n=!0,active:r,icon:i,small:o=!1,onClick:s=(()=>{}),href:a,text:l,title:c,"aria-label":u="",textOnHover:d=!1,textAlways:h=!1})=>{const p=i&&!h,f=Tp("rpf-button",{active:r,disabled:!n,"rpf-button--sm":o,"rpf-button--icon-only":p,text_on_hover:d,["rpf-button--"+e]:e},t),m=Tp("icon","rpf-button__icon",{icon_with_text:!d,icon_without_text:d,icon_only:!d&&!l}),g=tf.createElement(tf.Fragment,null,i&&tf.createElement("div",{className:m},i),l&&!p&&tf.createElement("span",{className:"text"},l));return a?tf.createElement("a",{className:f,"aria-label":u,href:a,onClick:s},g):tf.createElement("button",{className:f,title:c,"aria-label":u,onClick:s,disabled:!n},g)};nf.propTypes={type:Zp.string,className:Zp.string,enabled:Zp.bool,active:Zp.bool,icon:Zp.element,href:Zp.string,onClick:Zp.func,text:Zp.string,title:Zp.string,textAlways:Zp.bool,"aria-label":Zp.string,textOnHover:Zp.bool};n(372);var rf=e=>{let{className:t,fill:n=!1,...r}=e;return o.a.createElement(nf,Object.assign({className:mi()("btn",t,{"rpf-button--fill":n,"rpf-button--fit":!n})},r))};n(373);var of=e=>{let{className:t=null,showLabel:n=!1,editable:r=!0,isHeading:s=!1}=e;const a=Fn(e=>e.editor.project,Pn),l=In(),{t:c}=Wi(),u=Object(i.useRef)(),d=Object(i.useRef)(),[h,p]=Object(i.useState)(!1),[f,m]=Object(i.useState)(a.name||c("projectName.newProject"));Object(i.useEffect)(()=>{m(a.name)},[a.name]);const g=e=>{e.stopPropagation(),e.preventDefault(),p(!1),l(zr(u.current.value))},b=Object(i.useCallback)(e=>{e.preventDefault(),p(!1),m(a.name)},[a.name]);return Object(i.useEffect)(()=>{h&&u.current.focus()}),Object(i.useEffect)(()=>{const e=e=>{h&&u.current&&!u.current.contains(e.target)&&d.current&&!d.current.contains(e.target)&&b(e)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[h,u,d,a,b]),o.a.createElement(o.a.Fragment,null,n&&o.a.createElement("label",{htmlFor:"project_name",className:"project-name__label"},c("projectName.label")),o.a.createElement("div",{className:mi()("project-name",t)},o.a.createElement("h1",{style:{height:0,width:0,overflow:"hidden"}},a.name||c("header.newProject")),r||!s?o.a.createElement("input",{className:"project-name__input",id:"project_name",ref:u,type:"text",onFocus:()=>{u.current.select()},onScroll:()=>{h||(u.current.scrollLeft=0)},onKeyDown:e=>{"Enter"===e.key?g(e):"Escape"===e.key&&b(e)},value:f,disabled:!h,onChange:()=>{m(u.current.value)}}):o.a.createElement("div",{className:"project-name__title"},f),r&&o.a.createElement("div",{ref:d},o.a.createElement(rf,{className:"project-name__button","aria-label":c(h?"header.renameSave":"header.renameProject"),title:c(h?"header.renameSave":"header.renameProject"),icon:h?o.a.createElement(nd,null):o.a.createElement(Op,null),onClick:h?g:()=>{p(!0)},type:h?"primary":"tertiary"}))))},sf=n(178),af=n.n(sf),lf=n(179),cf=n(180),uf=n.n(cf),df=n(181),hf=n.n(df);var pf=e=>{const{buttonText:t,className:n,Icon:r,type:i="secondary",...s}=e,{t:a}=Wi(),l=Fn(e=>e.editor.project),c=Fn(e=>e.editor.loginToSaveModalShowing),u=In();return o.a.createElement(rf,Object.assign({className:n,onClick:async()=>{window.plausible&&window.plausible("Download"),c&&u(Wr());const e=new uf.a;l.components.forEach(t=>{e.file("".concat(t.name,".").concat(t.extension),t.content)}),l.image_list.forEach(t=>{var n;e.file(t.filename,(n=t.url,new Promise((function(e,t){hf.a.getBinaryContent(n,(function(n,r){n?t(n):e(r)}))}))),{binary:!0})});const t=await e.generateAsync({type:"blob"});af.a.saveAs(t,"".concat(Object(lf.toSnakeCase)(l.name||a("header.downloadFileNameDefault",{project_type:l.project_type}))))},text:t,textAlways:!0,icon:r?o.a.createElement(r,null):null,type:i},s))};const ff=(e,t)=>new CustomEvent(e,{bubbles:!0,cancelable:!1,composed:!0,detail:t}),mf=ff("editor-codeChanged"),gf=ff("editor-runStarted"),bf=ff("editor-logIn"),vf=ff("editor-signUp"),yf=ff("editor-quizReady"),Sf=(e,t)=>e&&e.profile&&(e.profile.user===t.user_id||!t.identifier);var _f;function xf(){return(xf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var wf=function(e){return i.createElement("svg",xf({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_f||(_f=i.createElement("path",{d:"M3 21V3h14l4 4v14H3zm2-2h14V7.85L16.15 5H5v14zm7-1c.833 0 1.542-.292 2.125-.875A2.893 2.893 0 0015 15c0-.833-.292-1.542-.875-2.125A2.893 2.893 0 0012 12c-.833 0-1.542.292-2.125.875A2.893 2.893 0 009 15c0 .833.292 1.542.875 2.125A2.893 2.893 0 0012 18zm-6-8h9V6H6v4zm-1 9V5v14z"})))};var kf=e=>{let{className:t,type:n,fill:r=!1}=e;const s=In(),{t:a}=Wi(),[l,c]=Object(i.useState)(n),u=Fn(e=>e.editor.loading),d=Fn(e=>e.editor.webComponent),h=Fn(e=>e.auth.user),p=Fn(e=>e.editor.project);Object(i.useEffect)(()=>{n||c(d?"primary":"secondary")},[d,n]);const f=Object(i.useCallback)(async()=>{window.plausible&&window.plausible("Save button"),document.dispatchEvent(bf),s(Dr())},[s]),m=Sf(h,p);return"success"===u&&!m&&l&&o.a.createElement(rf,{className:mi()(t,{"btn--primary":"primary"===l,"btn--secondary":"secondary"===l,"btn--tertiary":"tertiary"===l}),onClick:f,text:a(h?"header.save":"header.loginToSave"),textAlways:!0,icon:o.a.createElement(wf,null),type:l,fill:r})};n(390);var Of,Ef=e=>{let{nameEditable:t=!0}=e;const{t:n}=Wi(),r=Fn(e=>e.editor.project),i=Fn(e=>e.auth.user),s=Fn(e=>e.editor.loading),a=Fn(e=>e.editor.saving),l=Fn(e=>e.editor.lastSavedTime),c=Sf(i,r),u=Fn(e=>e.editor.readOnly);return"success"===s&&o.a.createElement("div",{className:"project-bar"},"success"===s&&o.a.createElement(of,{editable:!u&&t,isHeading:!0}),o.a.createElement("div",{className:"project-bar__right"},"success"===s&&o.a.createElement("div",{className:"project-bar__btn-wrapper"},o.a.createElement(pf,{buttonText:n("header.download"),className:"btn btn--tertiary project-bar__btn",Icon:wp,type:"tertiary"})),"success"===s&&!c&&!u&&o.a.createElement("div",{className:"project-bar__btn-wrapper"},o.a.createElement(kf,{className:"project-bar__btn btn--save"})),l&&i&&!u&&o.a.createElement(Sp,{saving:a,lastSavedTime:l})))};function Af(){return(Af=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Tf=function(e){return i.createElement("svg",Af({width:4,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Of||(Of=i.createElement("path",{d:"M2 16c-.55 0-1.02-.196-1.412-.587A1.927 1.927 0 010 14c0-.55.196-1.021.588-1.413A1.925 1.925 0 012 12c.55 0 1.021.196 1.413.587.391.392.587.863.587 1.413s-.196 1.021-.587 1.413A1.928 1.928 0 012 16zm0-6c-.55 0-1.02-.196-1.412-.588A1.923 1.923 0 010 8c0-.55.196-1.021.588-1.413A1.925 1.925 0 012 6c.55 0 1.021.196 1.413.587C3.804 6.979 4 7.45 4 8s-.196 1.02-.587 1.412A1.927 1.927 0 012 10zm0-6C1.45 4 .98 3.804.588 3.412A1.923 1.923 0 010 2C0 1.45.196.98.588.588A1.923 1.923 0 012 0c.55 0 1.021.196 1.413.588C3.804.979 4 1.45 4 2c0 .55-.196 1.02-.587 1.412A1.927 1.927 0 012 4z"})))};function Cf(){return(Cf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Mf(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var $f=n(21),Pf=Un.unstable_batchedUpdates||function(e){return e()},Rf=(Object.values,function(e,t,n){return void 0===n&&(n=1e-4),Math.abs(e-t)<n}),jf=function(e,t){return!0===e||!(!e||!e[t])},Nf=function(e,t){return"function"==typeof e?e(t):e},Df=function(e,t){return t&&Object.keys(t).forEach((function(n){var r=e[n],i=t[n];e[n]="function"==typeof i&&r?function(){i.apply(void 0,arguments),r.apply(void 0,arguments)}:i})),e},If=function(e){for(;e;){if(!(e=e.parentNode)||e===document.body||!e.parentNode)return;var t=getComputedStyle(e),n=t.overflow,r=t.overflowX,i=t.overflowY;if(/auto|scroll|overlay|hidden/.test(n+i+r))return e}};function Lf(e,t){return{"aria-disabled":e||void 0,tabIndex:t?0:-1}}function Bf(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}var zf=function(e){var t=e.block,n=e.element,r=e.modifiers,o=e.className;return Object(i.useMemo)((function(){var e=n?t+"__"+n:t,i=e;r&&Object.keys(r).forEach((function(t){var n=r[t];n&&(i+=" "+e+"--"+(!0===n?t:t+"-"+n))}));var s="function"==typeof o?o(r):o;return"string"==typeof s&&(s=s.trim())&&(i+=" "+s),i}),[t,n,r,o])},Ff=Object(i.createContext)(),Uf=Object(i.createContext)({}),Qf=Object(i.createContext)({}),qf=Object(i.createContext)({}),Gf=Object(i.createContext)({}),Hf=Object(i.createContext)({}),Vf=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),Wf=Object.freeze({RESET:0,SET:1,UNSET:2,INCREASE:3,DECREASE:4,FIRST:5,LAST:6,SET_INDEX:7}),Xf=Object.freeze({CLICK:"click",CANCEL:"cancel",BLUR:"blur",SCROLL:"scroll"}),Yf=Object.freeze({FIRST:"first",LAST:"last"}),Zf={"aria-hidden":!0,role:"menuitem"},Jf=function(e){var t=e.className,n=e.containerRef,r=e.containerProps,o=e.children,s=e.isOpen,a=e.skipOpen,l=e.theming,c=e.transition,u=e.onClose,d=jf(c,"item");return Object($f.jsx)("div",Cf({},Df({onKeyDown:function(e){var t=e.key;switch(t){case Vf.ESC:Nf(u,{key:t,reason:Xf.CANCEL})}},onBlur:function(e){s&&!e.currentTarget.contains(e.relatedTarget||document.activeElement)&&(Nf(u,{reason:Xf.BLUR}),a&&(a.current=!0,setTimeout((function(){return a.current=!1}),300)))}},r),{className:zf({block:"szh-menu-container",modifiers:Object(i.useMemo)((function(){return{theme:l,itemTransition:d}}),[l,d]),className:t}),style:Cf({position:"absolute"},null==r?void 0:r.style),ref:n,children:o}))},Kf=function(){var e,t=0;return{toggle:function(e){e?t++:t--,t=Math.max(t,0)},on:function(n,r,i){t?e||(e=setTimeout((function(){e=0,r()}),n)):null==i||i()},off:function(){e&&(clearTimeout(e),e=0)}}},em=function(e,t,n,r){var i=t.current.getBoundingClientRect(),o=e.current.getBoundingClientRect(),s=n===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:n.getBoundingClientRect(),a=function(e){if("string"!=typeof e)return{top:0,right:0,bottom:0,left:0};var t=e.trim().split(/\s+/,4).map(parseFloat),n=isNaN(t[0])?0:t[0],r=isNaN(t[1])?n:t[1];return{top:n,right:r,bottom:isNaN(t[2])?n:t[2],left:isNaN(t[3])?r:t[3]}}(r),l=function(e){return e+o.left-s.left-a.left},c=function(e){return e+o.left+i.width-s.right+a.right},u=function(e){return e+o.top-s.top-a.top},d=function(e){return e+o.top+i.height-s.bottom+a.bottom};return{menuRect:i,containerRect:o,getLeftOverflow:l,getRightOverflow:c,getTopOverflow:u,getBottomOverflow:d,confineHorizontally:function(e){var t=l(e);if(t<0)e-=t;else{var n=c(e);n>0&&(t=l(e-=n))<0&&(e-=t)}return e},confineVertically:function(e){var t=u(e);if(t<0)e-=t;else{var n=d(e);n>0&&(t=u(e-=n))<0&&(e-=t)}return e}}},tm=function(e){var t,n,r,i=e.anchorRect,o=e.containerRect,s=e.menuRect,a=e.placeLeftorRightY,l=e.placeLeftX,c=e.placeRightX,u=e.getLeftOverflow,d=e.getRightOverflow,h=e.confineHorizontally,p=e.confineVertically,f=e.arrowRef,m=e.arrow,g=e.direction,b=e.position,v=g,y=a;return"initial"!==b&&(y=p(y),"anchor"===b&&(y=Math.min(y,i.bottom-o.top),y=Math.max(y,i.top-o.top-s.height))),"left"===v?(t=l,"initial"!==b&&(n=u(t))<0&&((r=d(c))<=0||-n>r)&&(t=c,v="right")):(t=c,"initial"!==b&&(r=d(t))>0&&((n=u(l))>=0||-n<r)&&(t=l,v="left")),"auto"===b&&(t=h(t)),{arrowY:m?function(e){var t=e.arrowRef,n=e.menuY,r=e.anchorRect,i=e.containerRect,o=e.menuRect,s=r.top-i.top-n+r.height/2,a=1.25*t.current.offsetHeight;return s=Math.max(a,s),s=Math.min(s,o.height-a)}({menuY:y,arrowRef:f,anchorRect:i,containerRect:o,menuRect:s}):void 0,x:t,y:y,computedDirection:v}},nm=function(e){var t,n,r,i=e.anchorRect,o=e.containerRect,s=e.menuRect,a=e.placeToporBottomX,l=e.placeTopY,c=e.placeBottomY,u=e.getTopOverflow,d=e.getBottomOverflow,h=e.confineHorizontally,p=e.confineVertically,f=e.arrowRef,m=e.arrow,g=e.direction,b=e.position,v="top"===g?"top":"bottom",y=a;return"initial"!==b&&(y=h(y),"anchor"===b&&(y=Math.min(y,i.right-o.left),y=Math.max(y,i.left-o.left-s.width))),"top"===v?(t=l,"initial"!==b&&(n=u(t))<0&&((r=d(c))<=0||-n>r)&&(t=c,v="bottom")):(t=c,"initial"!==b&&(r=d(t))>0&&((n=u(l))>=0||-n<r)&&(t=l,v="top")),"auto"===b&&(t=p(t)),{arrowX:m?function(e){var t=e.arrowRef,n=e.menuX,r=e.anchorRect,i=e.containerRect,o=e.menuRect,s=r.left-i.left-n+r.width/2,a=1.25*t.current.offsetWidth;return s=Math.max(a,s),s=Math.min(s,o.width-a)}({menuX:y,arrowRef:f,anchorRect:i,containerRect:o,menuRect:s}):void 0,x:y,y:t,computedDirection:v}},rm="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?i.useLayoutEffect:i.useEffect;function im(e,t){"function"==typeof e?e(t):e.current=t}var om=function(e,t){return Object(i.useMemo)((function(){return e?t?function(n){im(e,n),im(t,n)}:e:t}),[e,t])},sm=["ariaLabel","menuClassName","menuStyle","arrowClassName","arrowStyle","anchorPoint","anchorRef","containerRef","containerProps","focusProps","externalRef","parentScrollingRef","arrow","align","direction","position","overflow","setDownOverflow","repositionFlag","captureFocus","state","endTransition","isDisabled","menuItemFocus","offsetX","offsetY","children","onClose"],am=function(e){var t=e.ariaLabel,n=e.menuClassName,r=e.menuStyle,o=e.arrowClassName,s=e.arrowStyle,a=e.anchorPoint,l=e.anchorRef,c=e.containerRef,u=e.containerProps,d=e.focusProps,h=e.externalRef,p=e.parentScrollingRef,f=e.arrow,m=e.align,g=void 0===m?"start":m,b=e.direction,v=void 0===b?"bottom":b,y=e.position,S=void 0===y?"auto":y,_=e.overflow,x=void 0===_?"visible":_,w=e.setDownOverflow,k=e.repositionFlag,O=e.captureFocus,E=void 0===O||O,A=e.state,T=e.endTransition,C=e.isDisabled,M=e.menuItemFocus,$=e.offsetX,P=void 0===$?0:$,R=e.offsetY,j=void 0===R?0:R,N=e.children,D=e.onClose,I=Mf(e,sm),L=Object(i.useState)({x:0,y:0}),B=L[0],z=L[1],F=Object(i.useState)({}),U=F[0],Q=F[1],q=Object(i.useState)(),G=q[0],H=q[1],V=Object(i.useState)(v),W=V[0],X=V[1],Y=Object(i.useState)(Kf)[0],Z=Object(i.useReducer)((function(e){return e+1}),1),J=Z[0],K=Z[1],ee=Object(i.useContext)(Hf),te=ee.transition,ne=ee.boundingBoxRef,re=ee.boundingBoxPadding,ie=ee.rootMenuRef,oe=ee.rootAnchorRef,se=ee.scrollNodesRef,ae=ee.reposition,le=ee.viewScroll,ce=ee.submenuCloseDelay,ue=Object(i.useContext)(Qf),de=ue.submenuCtx,he=ue.reposSubmenu,pe=void 0===he?k:he,fe=Object(i.useRef)(null),me=Object(i.useRef)(),ge=Object(i.useRef)(),be=Object(i.useRef)(!1),ve=Object(i.useRef)({width:0,height:0}),ye=Object(i.useRef)((function(){})),Se=function(e,t){var n=Object(i.useState)(),r=n[0],o=n[1],s=Object(i.useRef)({items:[],hoverIndex:-1,sorted:!1}).current,a=Object(i.useCallback)((function(e,n){var r=s.items;if(e)if(n)r.push(e);else{var i=r.indexOf(e);i>-1&&(r.splice(i,1),e.contains(document.activeElement)&&(t.current.focus(),o()))}else s.items=[];s.hoverIndex=-1,s.sorted=!1}),[s,t]);return{hoverItem:r,dispatch:Object(i.useCallback)((function(t,n,r){var i=s.items,a=s.hoverIndex,l=function(){if(!s.sorted){var t=e.current.querySelectorAll(".szh-menu__item");i.sort((function(e,n){return Bf(t,e)-Bf(t,n)})),s.sorted=!0}},c=-1,u=void 0;switch(t){case Wf.RESET:break;case Wf.SET:u=n;break;case Wf.UNSET:u=function(e){return e===n?void 0:e};break;case Wf.FIRST:l(),u=i[c=0];break;case Wf.LAST:l(),c=i.length-1,u=i[c];break;case Wf.SET_INDEX:l(),u=i[c=r];break;case Wf.INCREASE:l(),(c=a)<0&&(c=i.indexOf(n)),++c>=i.length&&(c=0),u=i[c];break;case Wf.DECREASE:l(),(c=a)<0&&(c=i.indexOf(n)),--c<0&&(c=i.length-1),u=i[c];break;default:0}u||(c=-1),o(u),s.hoverIndex=c}),[e,s]),updateItems:a}}(fe,me),_e=Se.hoverItem,xe=Se.dispatch,we=Se.updateItems,ke=function(e){return!!e&&"o"===e[0]}(A),Oe=jf(te,"open"),Ee=jf(te,"close"),Ae=se.current,Te=Object(i.useCallback)((function(e){var t,n=l?null==(t=l.current)?void 0:t.getBoundingClientRect():a?{left:a.x,right:a.x,top:a.y,bottom:a.y,width:0,height:0}:null;if(n){Ae.menu||(Ae.menu=(ne?ne.current:If(ie.current))||window);var r=em(c,fe,Ae.menu,re),i=function(e){var t=e.arrow,n=e.align,r=e.direction,i=e.offsetX,o=e.offsetY,s=e.position,a=e.anchorRect,l=e.arrowRef,c=e.positionHelpers,u=c.menuRect,d=c.containerRect,h=i,p=o;t&&("left"===r||"right"===r?h+=l.current.offsetWidth:p+=l.current.offsetHeight);var f,m,g=a.left-d.left-u.width-h,b=a.right-d.left+h,v=a.top-d.top-u.height-p,y=a.bottom-d.top+p;"end"===n?(f=a.right-d.left-u.width,m=a.bottom-d.top-u.height):"center"===n?(f=a.left-d.left-(u.width-a.width)/2,m=a.top-d.top-(u.height-a.height)/2):(f=a.left-d.left,m=a.top-d.top);var S=Cf({},c,{anchorRect:a,placeLeftX:g,placeRightX:b,placeLeftorRightY:m+=p,placeTopY:v,placeBottomY:y,placeToporBottomX:f+=h,arrowRef:l,arrow:t,direction:r,position:s});switch(r){case"left":case"right":return tm(S);case"top":case"bottom":default:return nm(S)}}({arrow:f,align:g,direction:v,offsetX:P,offsetY:j,position:S,anchorRect:n,arrowRef:ge,positionHelpers:r}),o=i.arrowX,s=i.arrowY,u=i.x,d=i.y,h=i.computedDirection,p=r.menuRect,m=p.height;if(!e&&"visible"!==x){var b,y,_=r.getTopOverflow,w=r.getBottomOverflow,k=ve.current.height,O=w(d);if(O>0||Rf(O,0)&&Rf(m,k))b=m-O,y=O;else{var E=_(d);(E<0||Rf(E,0)&&Rf(m,k))&&(y=0-E,(b=m+E)>=0&&(d-=E))}b>=0?(m=b,H({height:b,overflowAmt:y})):H()}f&&Q({x:o,y:s}),z({x:u,y:d}),X(h),ve.current={width:p.width,height:m}}}),[f,g,re,v,P,j,S,x,a,l,c,ne,ie,Ae]);rm((function(){ke&&(Te(),be.current&&K()),be.current=ke,ye.current=Te}),[ke,Te,pe]),rm((function(){G&&!w&&(fe.current.scrollTop=0)}),[G,w]),rm((function(){return we}),[we]),Object(i.useEffect)((function(){var e=Ae.menu;if(ke&&e){if(e=e.addEventListener?e:window,!Ae.anchors){Ae.anchors=[];for(var t=If(oe&&oe.current);t&&t!==e;)Ae.anchors.push(t),t=If(t)}var n=le;if(Ae.anchors.length&&"initial"===n&&(n="auto"),"initial"!==n){var r=function(){"auto"===n?Pf((function(){return Te(!0)})):Nf(D,{reason:Xf.SCROLL})},i=Ae.anchors.concat("initial"!==le?e:[]);return i.forEach((function(e){return e.addEventListener("scroll",r)})),function(){return i.forEach((function(e){return e.removeEventListener("scroll",r)}))}}}}),[oe,Ae,ke,D,le,Te]);var Ce=!!G&&G.overflowAmt>0;Object(i.useEffect)((function(){if(!Ce&&ke&&p){var e=function(){return Pf(Te)},t=p.current;return t.addEventListener("scroll",e),function(){return t.removeEventListener("scroll",e)}}}),[ke,Ce,p,Te]),Object(i.useEffect)((function(){if("function"==typeof ResizeObserver&&"initial"!==ae){var e=new ResizeObserver((function(e){var t,n,r=e[0],i=r.borderBoxSize,o=r.target;if(i){var s=i[0]||i;t=s.inlineSize,n=s.blockSize}else{var a=o.getBoundingClientRect();t=a.width,n=a.height}0!==t&&0!==n&&(Rf(t,ve.current.width,1)&&Rf(n,ve.current.height,1)||Object(Un.flushSync)((function(){ye.current(),K()})))})),t=fe.current;return e.observe(t,{box:"border-box"}),function(){return e.unobserve(t)}}}),[ae]),Object(i.useEffect)((function(){if(!ke)return xe(Wf.RESET),void(Ee||H());var e=M||{},t=e.position,n=e.alwaysUpdate,r=function(){t===Yf.FIRST?xe(Wf.FIRST):t===Yf.LAST?xe(Wf.LAST):t>=-1&&xe(Wf.SET_INDEX,void 0,t)};if(n)r();else if(E){var i=setTimeout((function(){fe.current.contains(document.activeElement)||(me.current.focus(),r())}),Oe?170:100);return function(){return clearTimeout(i)}}}),[ke,Oe,Ee,E,M,xe]);var Me,$e,Pe=Object(i.useMemo)((function(){return{isParentOpen:ke,submenuCtx:Y,dispatch:xe,updateItems:we}}),[ke,Y,xe,we]);G&&(w?$e=G.overflowAmt:Me=G.height);var Re=Object(i.useMemo)((function(){return{reposSubmenu:J,submenuCtx:Y,overflow:x,overflowAmt:$e,parentMenuRef:fe,parentDir:W}}),[J,Y,x,$e,W]),je=Me>=0?{maxHeight:Me,overflow:x}:void 0,Ne=Object(i.useMemo)((function(){return{state:A,dir:W}}),[A,W]),De=Object(i.useMemo)((function(){return{dir:W}}),[W]),Ie=zf({block:"szh-menu",element:"arrow",modifiers:De,className:o}),Le=Object($f.jsxs)("ul",Cf({role:"menu","aria-label":t},Lf(C),Df({onPointerEnter:null==de?void 0:de.off,onPointerMove:function(e){e.stopPropagation(),Y.on(ce,(function(){xe(Wf.RESET),me.current.focus()}))},onPointerLeave:function(e){e.target===e.currentTarget&&Y.off()},onKeyDown:function(e){switch(e.key){case Vf.HOME:xe(Wf.FIRST);break;case Vf.END:xe(Wf.LAST);break;case Vf.UP:xe(Wf.DECREASE,_e);break;case Vf.DOWN:xe(Wf.INCREASE,_e);break;case Vf.SPACE:return void(e.target&&-1!==e.target.className.indexOf("szh-menu")&&e.preventDefault());default:return}e.preventDefault(),e.stopPropagation()},onAnimationEnd:function(){"closing"===A&&H(),Nf(T)}},I),{ref:om(h,fe),className:zf({block:"szh-menu",modifiers:Ne,className:n}),style:Cf({},r,je,{margin:0,display:"closed"===A?"none":void 0,position:"absolute",left:B.x,top:B.y}),children:[Object($f.jsx)("li",Cf({tabIndex:-1,style:{position:"absolute",left:0,top:0,display:"block",outline:"none"},ref:me},Zf,d)),f&&Object($f.jsx)("li",Cf({className:Ie,style:Cf({display:"block",position:"absolute",left:U.x,top:U.y},s),ref:ge},Zf)),Object($f.jsx)(Qf.Provider,{value:Re,children:Object($f.jsx)(Uf.Provider,{value:Pe,children:Object($f.jsx)(Ff.Provider,{value:_e,children:Nf(N,Ne)})})})]}));return u?Object($f.jsx)(Jf,Cf({},u,{isOpen:ke,children:Le})):Le},lm=["aria-label","className","containerProps","initialMounted","unmountOnClose","transition","transitionTimeout","boundingBoxRef","boundingBoxPadding","reposition","submenuOpenDelay","submenuCloseDelay","skipOpen","viewScroll","portal","theming","onItemClick"],cm=Object(i.forwardRef)((function(e,t){var n=e["aria-label"],r=e.className,o=e.containerProps,s=e.initialMounted,a=e.unmountOnClose,l=e.transition,c=e.transitionTimeout,u=e.boundingBoxRef,d=e.boundingBoxPadding,h=e.reposition,p=void 0===h?"auto":h,f=e.submenuOpenDelay,m=void 0===f?300:f,g=e.submenuCloseDelay,b=void 0===g?150:g,v=e.skipOpen,y=e.viewScroll,S=void 0===y?"initial":y,_=e.portal,x=e.theming,w=e.onItemClick,k=Mf(e,lm),O=Object(i.useRef)(null),E=Object(i.useRef)({}),A=k.anchorRef,T=k.state,C=k.onClose,M=Object(i.useMemo)((function(){return{initialMounted:s,unmountOnClose:a,transition:l,transitionTimeout:c,boundingBoxRef:u,boundingBoxPadding:d,rootMenuRef:O,rootAnchorRef:A,scrollNodesRef:E,reposition:p,viewScroll:S,submenuOpenDelay:m,submenuCloseDelay:b}}),[s,a,l,c,A,u,d,p,S,m,b]),$=Object(i.useMemo)((function(){return{handleClick:function(e,t){e.stopPropagation||Nf(w,e);var n=e.keepOpen;void 0===n&&(n=t&&e.key===Vf.SPACE),n||Nf(C,{value:e.value,key:e.key,reason:Xf.CLICK})},handleClose:function(e){Nf(C,{key:e,reason:Xf.CLICK})}}}),[w,C]);if(!T)return null;var P=Object($f.jsx)(Hf.Provider,{value:M,children:Object($f.jsx)(qf.Provider,{value:$,children:Object($f.jsx)(am,Cf({},k,{ariaLabel:n||"Menu",externalRef:t,containerRef:O,containerProps:{className:r,containerRef:O,containerProps:o,skipOpen:v,theming:x,transition:l,onClose:C}}))})});return!0===_&&"undefined"!=typeof document?Object(Un.createPortal)(P,document.body):_?_.target?Object(Un.createPortal)(P,_.target):_.stablePosition?null:P:P})),um=function(e,t,n,r){var o=Object(i.useContext)(Hf).submenuCloseDelay,s=Object(i.useContext)(Uf),a=s.isParentOpen,l=s.submenuCtx,c=s.dispatch,u=s.updateItems,d=function(){!n&&!r&&c(Wf.SET,e.current)},h=function(){!r&&c(Wf.UNSET,e.current)};return function(e,t,n){rm((function(){if(!e){var r=t.current;return n(r,!0),function(){n(r)}}}),[e,t,n])}(r,e,u),Object(i.useEffect)((function(){n&&a&&t.current&&t.current.focus()}),[t,n,a]),{setHover:d,onBlur:function(e){n&&!e.currentTarget.contains(e.relatedTarget)&&h()},onPointerMove:function(e){r||(e.stopPropagation(),l.on(o,d,d))},onPointerLeave:function(e,t){l.off(),!t&&h()}}},dm=["className","value","href","type","checked","disabled","children","onClick","isHovering","itemRef","externalRef"],hm=["setHover"],pm=function(e,t){var n=Object(i.memo)(t),r=Object(i.forwardRef)((function(e,t){var r=Object(i.useRef)(null);return Object($f.jsx)(n,Cf({},e,{itemRef:r,externalRef:t,isHovering:Object(i.useContext)(Ff)===r.current}))}));return r.displayName="WithHovering("+e+")",r}("MenuItem",(function(e){var t=e.className,n=e.value,r=e.href,o=e.type,s=e.checked,a=e.disabled,l=e.children,c=e.onClick,u=e.isHovering,d=e.itemRef,h=e.externalRef,p=Mf(e,dm),f=!!a,m=um(d,d,u,f),g=m.setHover,b=Mf(m,hm),v=Object(i.useContext)(qf),y=Object(i.useContext)(Gf),S="radio"===o,_="checkbox"===o,x=!(!r||f||S||_),w=S?y.value===n:!!_&&!!s,k=function(e){if(f)return e.stopPropagation(),void e.preventDefault();var t={value:n,syntheticEvent:e};void 0!==e.key&&(t.key=e.key),_&&(t.checked=!w),S&&(t.name=y.name),Nf(c,t),S&&Nf(y.onRadioChange,t),v.handleClick(t,_||S)},O=Object(i.useMemo)((function(){return{type:o,disabled:f,hover:u,checked:w,anchor:x}}),[o,f,u,w,x]),E=Df(Cf({},b,{onPointerDown:g,onKeyDown:function(e){if(u)switch(e.key){case Vf.ENTER:case Vf.SPACE:x?e.key===Vf.SPACE&&d.current.click():k(e)}},onClick:k}),p),A=Cf({role:S?"menuitemradio":_?"menuitemcheckbox":"menuitem","aria-checked":S||_?w:void 0},Lf(f,u),E,{ref:om(h,d),className:zf({block:"szh-menu",element:"item",modifiers:O,className:t}),children:Object(i.useMemo)((function(){return Nf(l,O)}),[l,O])});return x?Object($f.jsx)("li",{role:"presentation",children:Object($f.jsx)("a",Cf({href:r},A))}):Object($f.jsx)("li",Cf({},A))}));n(391);var fm=e=>{const{align:t,direction:n,menuButtonLabel:r,menuButtonClassName:s,MenuButtonIcon:a,menuOptions:l,offsetX:c,offsetY:u}=e,d=Object(i.useContext)(Po),h=Object(i.useRef)(null),p=Object(i.useRef)(),[f,m]=Object(i.useState)(!1),g=e=>{if(m(e),e){const e=p.current.firstChild;e.setAttribute("role","menuitem"),e.setAttribute("aria-hidden","true")}else h.current.focus()},b=document.querySelector("editor-wc");return o.a.createElement(o.a.Fragment,null,o.a.createElement("button",{"aria-haspopup":"menu","aria-label":r,className:"btn context-menu__drop".concat(s?" ".concat(s):""),title:r,type:"button",ref:h,onClick:()=>g(!0)},o.a.createElement(a,null)),o.a.createElement(cm,{transition:!0,align:t,direction:n,menuStyle:{padding:"5px"},offsetX:c,offsetY:u,position:"anchor",viewScroll:"initial",portal:{target:b?b.shadowRoot.querySelector("#wc"):document.querySelector("#app")},menuClassName:"context-menu context-menu--".concat(d.theme),menuItemFocus:{position:"first"},state:f?"open":"closed",anchorRef:h,ref:p,onClose:()=>g(!1)},l.map((e,t)=>o.a.createElement(pm,{key:t,className:"btn context-menu__item",onClick:e.action},o.a.createElement(e.icon,null)," ",e.text))))};var mm,gm=e=>{const t=In(),{t:n}=Wi();return o.a.createElement("div",{onClick:e=>e.stopPropagation()},o.a.createElement(fm,{align:"start",direction:"right",menuButtonLabel:n("filePanel.fileMenu.label"),MenuButtonIcon:Tf,menuOptions:[{icon:Op,text:n("filePanel.fileMenu.renameItem"),action:()=>{t(Jr(e))}}],offsetX:16,offsetY:-8}))};function bm(){return(bm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var vm=function(e){return i.createElement("svg",bm({width:14,height:14,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),mm||(mm=i.createElement("path",{d:"M6 14V8H0V6h6V0h2v6h6v2H8v6H6z"})))};var ym,Sm=()=>{const{t:e}=Wi(),t=In();return o.a.createElement(rf,{text:e("filePanel.newFileButton"),textAlways:!0,icon:o.a.createElement(vm,null),onClick:()=>{t(Yr())},className:"btn--primary",fill:!0})},_m=(n(393),n(159),ym=function(e,t){return(ym=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}ym(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),xm=function(){return(xm=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},wm={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},km={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},Om={width:"20px",height:"20px",position:"absolute"},Em={top:xm(xm({},wm),{top:"-5px"}),right:xm(xm({},km),{left:void 0,right:"-5px"}),bottom:xm(xm({},wm),{top:void 0,bottom:"-5px"}),left:xm(xm({},km),{left:"-5px"}),topRight:xm(xm({},Om),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:xm(xm({},Om),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:xm(xm({},Om),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:xm(xm({},Om),{left:"-10px",top:"-10px",cursor:"nw-resize"})},Am=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return _m(t,e),t.prototype.render=function(){return i.createElement("div",{className:this.props.className||"",style:xm(xm({position:"absolute",userSelect:"none"},Em[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(i.PureComponent),Tm=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Cm=function(){return(Cm=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Mm={width:"auto",height:"auto"},$m=function(e,t,n){return Math.max(Math.min(e,n),t)},Pm=function(e,t){return Math.round(e/t)*t},Rm=function(e,t){return new RegExp(e,"i").test(t)},jm=function(e){return Boolean(e.touches&&e.touches.length)},Nm=function(e,t,n){void 0===n&&(n=0);var r=t.reduce((function(n,r,i){return Math.abs(r-e)<Math.abs(t[n]-e)?i:n}),0),i=Math.abs(t[r]-e);return 0===n||i<n?t[r]:e},Dm=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},Im=function(e,t,n,r){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return n*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return r*(Number(e.replace("vh",""))/100)}return e},Lm=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],Bm=function(e){function t(t){var n=e.call(this,t)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add("__resizable_base__"):t.className+="__resizable_base__",e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.ref=function(e){e&&(n.resizable=e)},n.state={isResizing:!1,width:void 0===(n.propsSize&&n.propsSize.width)?"auto":n.propsSize&&n.propsSize.width,height:void 0===(n.propsSize&&n.propsSize.height)?"auto":n.propsSize&&n.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return Tm(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||Mm},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,r=this.resizable.offsetHeight,i=this.resizable.style.position;"relative"!==i&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:r,this.resizable.style.position=i}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&e.propsSize[t].toString().endsWith("%")){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var n=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/n[t]*100+"%"}return Dm(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?Dm(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?Dm(t.height):n("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),r},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==n&&"auto"!==n?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var n,r,i=this.props.boundsByDirection,o=this.state.direction,s=i&&Rm("left",o),a=i&&Rm("top",o);if("parent"===this.props.bounds){var l=this.parentNode;l&&(n=s?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),r=a?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(n=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,r=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(n=s?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),r=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),r&&Number.isFinite(r)&&(t=t&&t<r?t:r),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,r=this.props.resizeRatio||1,i=this.state,o=i.direction,s=i.original,a=this.props,l=a.lockAspectRatio,c=a.lockAspectRatioExtraHeight,u=a.lockAspectRatioExtraWidth,d=s.width,h=s.height,p=c||0,f=u||0;return Rm("right",o)&&(d=s.width+(e-s.x)*r/n,l&&(h=(d-f)/this.ratio+p)),Rm("left",o)&&(d=s.width-(e-s.x)*r/n,l&&(h=(d-f)/this.ratio+p)),Rm("bottom",o)&&(h=s.height+(t-s.y)*r/n,l&&(d=(h-p)*this.ratio+f)),Rm("top",o)&&(h=s.height-(t-s.y)*r/n,l&&(d=(h-p)*this.ratio+f)),{newWidth:d,newHeight:h}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,r){var i=this.props,o=i.lockAspectRatio,s=i.lockAspectRatioExtraHeight,a=i.lockAspectRatioExtraWidth,l=void 0===r.width?10:r.width,c=void 0===n.width||n.width<0?e:n.width,u=void 0===r.height?10:r.height,d=void 0===n.height||n.height<0?t:n.height,h=s||0,p=a||0;if(o){var f=(u-h)*this.ratio+p,m=(d-h)*this.ratio+p,g=(l-p)/this.ratio+h,b=(c-p)/this.ratio+h,v=Math.max(l,f),y=Math.min(c,m),S=Math.max(u,g),_=Math.min(d,b);e=$m(e,v,y),t=$m(t,S,_)}else e=$m(e,l,c),t=$m(t,u,d);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left,this.targetTop=n.top}if(this.resizable){var r=this.resizable.getBoundingClientRect(),i=r.left,o=r.top,s=r.right,a=r.bottom;this.resizableLeft=i,this.resizableRight=s,this.resizableTop=o,this.resizableBottom=a}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,r=0,i=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(r=e.nativeEvent.clientX,i=e.nativeEvent.clientY):e.nativeEvent&&jm(e.nativeEvent)&&(r=e.nativeEvent.touches[0].clientX,i=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var o=this.window.getComputedStyle(this.resizable);if("auto"!==o.flexBasis){var s=this.parentNode;if(s){var a=this.window.getComputedStyle(s).flexDirection;this.flexDir=a.startsWith("row")?"row":"column",n=o.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:r,y:i,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:Cm(Cm({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:n};this.setState(l)}},t.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&jm(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var n=this.props,r=n.maxWidth,i=n.maxHeight,o=n.minWidth,s=n.minHeight,a=jm(e)?e.touches[0].clientX:e.clientX,l=jm(e)?e.touches[0].clientY:e.clientY,c=this.state,u=c.direction,d=c.original,h=c.width,p=c.height,f=this.getParentSize(),m=function(e,t,n,r,i,o,s){return r=Im(r,e.width,t,n),i=Im(i,e.height,t,n),o=Im(o,e.width,t,n),s=Im(s,e.height,t,n),{maxWidth:void 0===r?void 0:Number(r),maxHeight:void 0===i?void 0:Number(i),minWidth:void 0===o?void 0:Number(o),minHeight:void 0===s?void 0:Number(s)}}(f,this.window.innerWidth,this.window.innerHeight,r,i,o,s);r=m.maxWidth,i=m.maxHeight,o=m.minWidth,s=m.minHeight;var g=this.calculateNewSizeFromDirection(a,l),b=g.newHeight,v=g.newWidth,y=this.calculateNewMaxFromBoundary(r,i);this.props.snap&&this.props.snap.x&&(v=Nm(v,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(b=Nm(b,this.props.snap.y,this.props.snapGap));var S=this.calculateNewSizeFromAspectRatio(v,b,{width:y.maxWidth,height:y.maxHeight},{width:o,height:s});if(v=S.newWidth,b=S.newHeight,this.props.grid){var _=Pm(v,this.props.grid[0]),x=Pm(b,this.props.grid[1]),w=this.props.snapGap||0;v=0===w||Math.abs(_-v)<=w?_:v,b=0===w||Math.abs(x-b)<=w?x:b}var k={width:v-d.width,height:b-d.height};if(h&&"string"==typeof h)if(h.endsWith("%"))v=v/f.width*100+"%";else if(h.endsWith("vw")){v=v/this.window.innerWidth*100+"vw"}else if(h.endsWith("vh")){v=v/this.window.innerHeight*100+"vh"}if(p&&"string"==typeof p)if(p.endsWith("%"))b=b/f.height*100+"%";else if(p.endsWith("vw")){b=b/this.window.innerWidth*100+"vw"}else if(p.endsWith("vh")){b=b/this.window.innerHeight*100+"vh"}var O={width:this.createSizeForCssProperty(v,"width"),height:this.createSizeForCssProperty(b,"height")};"row"===this.flexDir?O.flexBasis=O.width:"column"===this.flexDir&&(O.flexBasis=O.height),Object(Un.flushSync)((function(){t.setState(O)})),this.props.onResize&&this.props.onResize(e,u,this.resizable,k)}},t.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,r=t.direction,i=t.original;if(n&&this.resizable){var o={width:this.size.width-i.width,height:this.size.height-i.height};this.props.onResizeStop&&this.props.onResizeStop(e,r,this.resizable,o),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:Cm(Cm({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,n=t.enable,r=t.handleStyles,o=t.handleClasses,s=t.handleWrapperStyle,a=t.handleWrapperClass,l=t.handleComponent;if(!n)return null;var c=Object.keys(n).map((function(t){return!1!==n[t]?i.createElement(Am,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:r&&r[t],className:o&&o[t]},l&&l[t]?l[t]:null):null}));return i.createElement("div",{className:a,style:s},c)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,n){return-1!==Lm.indexOf(n)||(t[n]=e.props[n]),t}),{}),n=Cm(Cm(Cm({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(n.flexBasis=this.state.flexBasis);var r=this.props.as||"div";return i.createElement(r,Cm({ref:this.ref,style:n,className:this.props.className},t),this.state.isResizing&&i.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(i.PureComponent);n(394);const zm=()=>o.a.createElement("svg",{"data-testid":"verticalHandle",width:"44",height:"56",viewBox:"0 0 44 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.a.createElement("rect",{x:"20",width:"4",height:"56",rx:"2",fill:"#616575"})),Fm=()=>o.a.createElement("svg",{"data-testid":"horizontalHandle",width:"56",height:"44",viewBox:"0 0 56 44",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.a.createElement("rect",{x:"56",y:"20",width:"4",height:"56",rx:"2",transform:"rotate(90 56 20)",fill:"#616575"}));var Um=e=>{const{children:t,defaultWidth:n,defaultHeight:r,handleDirection:s,...a}=e,[l,c]=Object(i.useState)("auto"),[u,d]=Object(i.useState)("auto");Object(i.useMemo)(()=>c(n),[n]),Object(i.useMemo)(()=>d(r),[r]);let h=["right","left"].includes(s)?{[s]:o.a.createElement(zm,null)}:["top","bottom"].includes(s)?{[s]:o.a.createElement(Fm,null)}:{},p="resizable-with-handle__handle resizable-with-handle__handle--".concat(s);return o.a.createElement(Bm,Object.assign({enable:{top:!1,right:!1,bottom:!1,left:!1,[s]:!0},handleComponent:h,handleWrapperClass:p,onResizeStop:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];let[,,,r]=t;c(l+r.width),d(u+r.height)},size:{width:l,height:u},handleStyles:{right:{height:"96%",top:"2%"}}},a),t)};var Qm,qm=e=>{const{children:t,heading:n,Footer:r,className:i,Button:s,defaultWidth:a="225px"}=e,l=Object(hi.useMediaQuery)({query:$o}),c=o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"sidebar__panel-header"},o.a.createElement("h2",{className:"sidebar__panel-heading"},n),s?o.a.createElement(s,null):null),o.a.createElement("div",{className:"sidebar__panel-content"},t),r&&o.a.createElement("div",{className:"sidebar__panel-footer"},o.a.createElement(r,null)));return l?o.a.createElement("div",{"data-testid":"sidebar__panel",className:mi()("sidebar__panel",i,r&&"sidebar__panel--with-footer")},c):o.a.createElement(Um,{"data-testid":"sidebar__panel",className:mi()("sidebar__panel",i,r&&"sidebar__panel--with-footer"),defaultWidth:a,defaultHeight:"100%",handleDirection:"right",minWidth:"180px",maxWidth:"600px"},c)};function Gm(){return(Gm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Hm,Vm=function(e){return i.createElement("svg",Gm({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Qm||(Qm=i.createElement("path",{d:"M8 18h8v-2H8v2zm0-4h8v-2H8v2zm-4 8V2h10l6 6v14H4zm9-13V4H6v16h12V9h-5zM6 4v5-5 16V4z"})))};function Wm(){return(Wm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Xm,Ym=function(e){return i.createElement("svg",Wm({"data-testid":"pythonIcon",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Hm||(Hm=i.createElement("path",{d:"M11.527 11.626H9.162c-1.656 0-2.72 1.065-2.72 2.72v2.129c0 .236-.119.355-.355.355H5.022c-1.064 0-1.892-.473-2.365-1.42-.355-.709-.591-1.419-.591-2.128-.119-1.301-.119-2.602.355-3.903.354-1.064 1.064-1.892 2.247-2.129h6.859c.118 0 .355 0 .355-.118v-.591s-.237-.119-.355-.119H7.506c-.355 0-.473-.118-.473-.473V4.412c0-.828.355-1.42 1.064-1.656.592-.236 1.183-.473 1.774-.591 1.42-.237 2.839-.237 4.258.118.591.118 1.182.355 1.655.71.474.473.828.946.71 1.655v4.258c0 1.656-.946 2.602-2.602 2.602-.828.118-1.655.118-2.365.118zM8.216 4.53c0 .473.354.946.946.946.473 0 .946-.473.946-.946s-.473-.828-.946-.946c-.592 0-.946.473-.946.946zm4.257 8.279h2.365c1.656 0 2.72-1.065 2.72-2.72v-2.13c0-.236.119-.354.355-.354h1.065c1.064 0 1.892.473 2.365 1.42.355.709.591 1.418.591 2.128.119 1.3.119 2.602-.355 3.903-.354 1.064-1.064 1.892-2.247 2.129h-6.859c-.118 0-.355 0-.355.118v.591s.237.118.355.118h4.021c.355 0 .473.119.473.473v1.538c0 .828-.355 1.42-1.064 1.656-.592.236-1.183.473-1.774.591-1.42.236-2.839.236-4.258-.118-.591-.119-1.182-.355-1.655-.71-.474-.473-.828-.946-.71-1.656V15.53c0-1.656.946-2.602 2.602-2.602.828-.118 1.655-.118 2.365-.118zm3.311 7.096c0-.473-.354-.947-.946-.947-.473 0-.946.474-.946.947s.473.828.946.946c.592 0 .947-.473.947-.946z"})))};function Zm(){return(Zm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Jm,Km=function(e){return i.createElement("svg",Zm({"data-testid":"htmlIcon",width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Xm||(Xm=i.createElement("path",{d:"M2 11.125l7.5-7v3.25l-5.625 5 5.625 5v3.25l-7.5-7v-2.5zm20 2.625l-7.5 7v-3.375l5.75-5-5.75-5V4l7.5 7v2.75z"})))};function eg(){return(eg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var tg,ng=function(e){return i.createElement("svg",eg({"data-testid":"cssIcon",width:18,height:18,viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Jm||(Jm=i.createElement("path",{d:"M2.053 17.638l.967-4.833H0v-2.537h3.624l.604-3.02h-3.14V4.711h3.744L5.798 0h3.383l-.966 4.711h3.382L12.564 0h3.382l-.966 4.711H18v2.537h-3.504l-.724 3.02h3.14v2.537h-3.624l-.966 4.833H8.939l.967-4.833H6.523l-.966 4.833H2.053zm8.336-7.37l.604-3.02H7.611l-.604 3.02h3.382z"})))};function rg(){return(rg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ig=function(e){return i.createElement("svg",rg({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),tg||(tg=i.createElement("path",{d:"M3 3v17.8h18V3H3zm2.9 3.7H11V8H5.9V6.7zm7 0H18V8h-5.1V6.7zm-7 3H11V11H5.9V9.7zm7 0H18V11h-5.1V9.7zm-7 3H11V14H5.9v-1.3zm7 0H18V14h-5.1v-1.3zm-7 3H11V17H5.9v-1.3zm7 0H18V17h-5.1v-1.3z"})))};var og=e=>{let{ext:t}=e;switch(t){case"py":return o.a.createElement(Ym,{"data-testid":"pythonIcon"});case"html":return o.a.createElement(Km,{"data-testid":"htmlIcon"});case"css":return o.a.createElement(ng,{"data-testid":"cssIcon"});case"csv":return o.a.createElement(ig,{"data-testid":"csvIcon"});default:return o.a.createElement(Vm,{"data-testid":"defaultFileIcon"})}};var sg=e=>{let{isMobile:t}=e;const n=Fn(e=>e.editor.project),r=Fn(e=>e.editor.openFiles),i=Fn(e=>e.editor.readOnly),s=In(),a=(e,t)=>{s(br({panelIndex:e,fileIndex:t}))},{t:l}=Wi(),c=i?null:Sm;return n&&n.components?o.a.createElement(qm,{heading:l("filePanel.files"),Button:c},n.components.map((e,n)=>o.a.createElement("div",{className:"files-list-item-wrapper",key:n},o.a.createElement(rf,{className:"files-list-item",onClick:()=>(e=>{if(r.flat().includes(e)){const t=r.map(t=>t.includes(e)).indexOf(!0),n=r[t].indexOf(e);a(t,n)}else s(fr(e)),a(0,r[0].length);t&&s(li())})("".concat(e.name,".").concat(e.extension)),text:"".concat(e.name,".").concat(e.extension),icon:o.a.createElement(og,{ext:e.extension}),type:"tertiary",textAlways:!0,small:!0}),i||"main"===e.name&&"py"===e.extension||"index"===e.name&&"html"===e.extension?null:o.a.createElement("div",{className:"files-list-item__menu"},o.a.createElement(gm,{fileKey:n,name:e.name,ext:e.extension}))))):null};n(395);var ag,lg=()=>{const{t:e}=Wi(),t=[{id:"feedback",text:e("sidebar.feedback"),href:"https://form.raspberrypi.org/f/code-editor-feedback"},{id:"privacy",text:e("sidebar.privacy"),href:"https://www.raspberrypi.org/privacy/child-friendly/"},{id:"cookies",text:e("sidebar.cookies"),href:"https://www.raspberrypi.org/cookies/"},{id:"accessibility",text:e("sidebar.accessibility"),href:"https://www.raspberrypi.org/accessibility/"},{id:"safeguarding",text:e("sidebar.safeguarding"),href:"https://www.raspberrypi.org/safeguarding/"}];return o.a.createElement(qm,{heading:e("infoPanel.info")},o.a.createElement("div",{className:"info-panel"},o.a.createElement("p",null,e("sidebar.information_text"))),o.a.createElement("div",{className:"info-panel info-panel__links"},t.map((e,t)=>o.a.createElement("a",{key:t,className:"info-panel__link",href:e.href,target:"_blank",rel:"noreferrer"},e.text)),o.a.createElement("p",null,e("sidebar.charity"))))};function cg(){return(cg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ug,dg=function(e){return i.createElement("svg",cg({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),ag||(ag=i.createElement("path",{d:"M11 18l-6-6 6-6 1.4 1.4L7.825 12l4.575 4.6L11 18zm6.6 0l-6-6 6-6L19 7.4 14.425 12 19 16.6 17.6 18z"})))};function hg(){return(hg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var pg=function(e){return i.createElement("svg",hg({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),ug||(ug=i.createElement("path",{d:"M6.4 18L5 16.6 9.575 12 5 7.4 6.4 6l6 6-6 6zm6.6 0l-1.4-1.4 4.575-4.6L11.6 7.4 13 6l6 6-6 6z"})))};var fg=e=>{const{Icon:t,isActive:n,name:r,title:i,toggleOption:s}=e;return o.a.createElement("div",{className:mi()("sidebar__bar-option-wrapper",{"sidebar__bar-option-wrapper--selected":n})},o.a.createElement(kc,{className:mi()("sidebar__bar-option",{"sidebar__bar-option--selected":n}),ButtonIcon:t,title:i,onClickHandler:()=>{s(r),"file"===r&&window.plausible&&window.plausible("Side menu open project files")}}))};var mg=e=>{const{menuOptions:t,option:n,toggleOption:r,instructions:i=!1}=e,s=Fn(e=>e.editor.project),{t:a}=Wi(),l=t.filter(e=>"top"===e.position),c=t.filter(e=>"bottom"===e.position),u=Object(hi.useMediaQuery)({query:$o});return o.a.createElement("div",{className:mi()("sidebar__bar",{"sidebar__bar--selected":n})},o.a.createElement("div",{className:"sidebar__bar-options--top"},o.a.createElement("img",{className:"editor-logo",src:"python"===s.project_type?"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjQwIiBoZWlnaHQ9IjQwIiByeD0iNCIgZmlsbD0iIzEwMUIyOSIvPgo8cGF0aCBkPSJNMTkuNTAwMSAxOS4zNzVIMTcuMDAwMUMxNS4yNTAxIDE5LjM3NSAxNC4xMjUxIDIwLjUgMTQuMTI1MSAyMi4yNVYyNC41QzE0LjEyNTEgMjQuNzUgMTQuMDAwMSAyNC44NzUgMTMuNzUwMSAyNC44NzVIMTIuNjI1MUMxMS41MDAxIDI0Ljg3NSAxMC42MjUxIDI0LjM3NSAxMC4xMjUxIDIzLjM3NUM5Ljc1MDExIDIyLjYyNSA5LjUwMDExIDIxLjg3NSA5LjUwMDExIDIxLjEyNUM5LjM3NTExIDE5Ljc1IDkuMzc1MTEgMTguMzc1IDkuODc1MTEgMTdDMTAuMjUwMSAxNS44NzUgMTEuMDAwMSAxNSAxMi4yNTAxIDE0Ljc1SDE5LjUwMDFDMTkuNjI1MSAxNC43NSAxOS44NzUxIDE0Ljc1IDE5Ljg3NTEgMTQuNjI1VjE0QzE5Ljg3NTEgMTQgMTkuNjI1MSAxMy44NzUgMTkuNTAwMSAxMy44NzVIMTUuMjUwMUMxNC44NzUxIDEzLjg3NSAxNC43NTAxIDEzLjc1IDE0Ljc1MDEgMTMuMzc1VjExLjc1QzE0Ljc1MDEgMTAuODc1IDE1LjEyNTEgMTAuMjUgMTUuODc1MSA5Ljk5OTk4QzE2LjUwMDEgOS43NDk5OCAxNy4xMjUxIDkuNDk5OTggMTcuNzUwMSA5LjM3NDk4QzE5LjI1MDEgOS4xMjQ5OCAyMC43NTAxIDkuMTI0OTggMjIuMjUwMSA5LjQ5OTk4QzIyLjg3NTEgOS42MjQ5OCAyMy41MDAxIDkuODc0OTggMjQuMDAwMSAxMC4yNUMyNC41MDAxIDEwLjc1IDI0Ljg3NTEgMTEuMjUgMjQuNzUwMSAxMlYxNi41QzI0Ljc1MDEgMTguMjUgMjMuNzUwMSAxOS4yNSAyMi4wMDAxIDE5LjI1QzIxLjEyNTEgMTkuMzc1IDIwLjI1MDEgMTkuMzc1IDE5LjUwMDEgMTkuMzc1Wk0xNi4wMDAxIDExLjg3NUMxNi4wMDAxIDEyLjM3NSAxNi4zNzUxIDEyLjg3NSAxNy4wMDAxIDEyLjg3NUMxNy41MDAxIDEyLjg3NSAxOC4wMDAxIDEyLjM3NSAxOC4wMDAxIDExLjg3NUMxOC4wMDAxIDExLjM3NSAxNy41MDAxIDExIDE3LjAwMDEgMTAuODc1QzE2LjM3NTEgMTAuODc1IDE2LjAwMDEgMTEuMzc1IDE2LjAwMDEgMTEuODc1Wk0yMC41MDAxIDIwLjYyNUgyMy4wMDAxQzI0Ljc1MDEgMjAuNjI1IDI1Ljg3NTEgMTkuNSAyNS44NzUxIDE3Ljc1VjE1LjVDMjUuODc1MSAxNS4yNSAyNi4wMDAxIDE1LjEyNSAyNi4yNTAxIDE1LjEyNUgyNy4zNzUxQzI4LjUwMDEgMTUuMTI1IDI5LjM3NTEgMTUuNjI1IDI5Ljg3NTEgMTYuNjI1QzMwLjI1MDEgMTcuMzc1IDMwLjUwMDEgMTguMTI1IDMwLjUwMDEgMTguODc1QzMwLjYyNTEgMjAuMjUgMzAuNjI1MSAyMS42MjUgMzAuMTI1MSAyM0MyOS43NTAxIDI0LjEyNSAyOS4wMDAxIDI1IDI3Ljc1MDEgMjUuMjVIMjAuNTAwMUMyMC4zNzUxIDI1LjI1IDIwLjEyNTEgMjUuMjUgMjAuMTI1MSAyNS4zNzVWMjZDMjAuMTI1MSAyNiAyMC4zNzUxIDI2LjEyNSAyMC41MDAxIDI2LjEyNUgyNC43NTAxQzI1LjEyNTEgMjYuMTI1IDI1LjI1MDEgMjYuMjUgMjUuMjUwMSAyNi42MjVWMjguMjVDMjUuMjUwMSAyOS4xMjUgMjQuODc1MSAyOS43NSAyNC4xMjUxIDMwQzIzLjUwMDEgMzAuMjUgMjIuODc1MSAzMC41IDIyLjI1MDEgMzAuNjI1QzIwLjc1MDEgMzAuODc1IDE5LjI1MDEgMzAuODc1IDE3Ljc1MDEgMzAuNUMxNy4xMjUxIDMwLjM3NSAxNi41MDAxIDMwLjEyNSAxNi4wMDAxIDI5Ljc1QzE1LjUwMDEgMjkuMjUgMTUuMTI1MSAyOC43NSAxNS4yNTAxIDI4VjIzLjVDMTUuMjUwMSAyMS43NSAxNi4yNTAxIDIwLjc1IDE4LjAwMDEgMjAuNzVDMTguODc1MSAyMC42MjUgMTkuNzUwMSAyMC42MjUgMjAuNTAwMSAyMC42MjVaTTI0LjAwMDEgMjguMTI1QzI0LjAwMDEgMjcuNjI1IDIzLjYyNTEgMjcuMTI1IDIzLjAwMDEgMjcuMTI1QzIyLjUwMDEgMjcuMTI1IDIyLjAwMDEgMjcuNjI1IDIyLjAwMDEgMjguMTI1QzIyLjAwMDEgMjguNjI1IDIyLjUwMDEgMjkgMjMuMDAwMSAyOS4xMjVDMjMuNjI1MSAyOS4xMjUgMjQuMDAwMSAyOC42MjUgMjQuMDAwMSAyOC4xMjVaIiBmaWxsPSIjODlEREQ1Ii8+Cjwvc3ZnPgo=":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjQwIiBoZWlnaHQ9IjQwIiByeD0iNCIgZmlsbD0iIzEwMUIyOSIvPgo8cGF0aCBkPSJNMTAgMTguNzVMMTcuNSAxMS43NVYxNUwxMS44NzUgMjBMMTcuNSAyNVYyOC4yNUwxMCAyMS4yNVYxOC43NVpNMzAgMjEuMzc1TDIyLjUgMjguMzc1VjI1TDI4LjI1IDIwTDIyLjUgMTVWMTEuNjI1TDMwIDE4LjYyNVYyMS4zNzVaIiBmaWxsPSIjODhEREQ0Ii8+Cjwvc3ZnPgo=",alt:a("header.editorLogoAltText")}),l.map((e,t)=>o.a.createElement(fg,{key:t,Icon:e.icon,title:e.title,isActive:n===e.name,toggleOption:r,name:e.name}))),o.a.createElement("div",{className:"sidebar__bar-options--bottom"},c.map((e,t)=>o.a.createElement(fg,{key:t,Icon:e.icon,title:e.title,isActive:n===e.name,toggleOption:r,name:e.name})),!u&&(n?o.a.createElement("div",{className:"sidebar__bar-option-wrapper"},o.a.createElement(kc,{className:"sidebar__bar-option",ButtonIcon:dg,title:a("sidebar.collapse"),onClickHandler:()=>{r(n),window.plausible&&window.plausible("Collapse file pane")}})):o.a.createElement("div",{className:"sidebar__bar-option-wrapper"},o.a.createElement(kc,{className:"sidebar__bar-option",ButtonIcon:pg,title:a("sidebar.expand"),onClickHandler:()=>{r(i?"instructions":"file"),window.plausible&&window.plausible("Expand file pane")}})))))},gg=n(57);function bg(e,t){void 0===t&&(t={});var n=function(e){if(e&&"j"===e[0]&&":"===e[1])return e.substr(2);return e}(e);if(function(e,t){return void 0===t&&(t=!e||"{"!==e[0]&&"["!==e[0]&&'"'!==e[0]),!t}(n,t.doNotParse))try{return JSON.parse(n)}catch(e){}return e}var vg=function(){return(vg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},yg=function(){function e(e,t){var n=this;this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.cookies=function(e,t){return"string"==typeof e?gg.parse(e,t):"object"==typeof e&&null!==e?e:{}}(e,t),new Promise((function(){n.HAS_DOCUMENT_COOKIE="object"==typeof document&&"string"==typeof document.cookie})).catch((function(){}))}return e.prototype._updateBrowserValues=function(e){this.HAS_DOCUMENT_COOKIE&&(this.cookies=gg.parse(document.cookie,e))},e.prototype._emitChange=function(e){for(var t=0;t<this.changeListeners.length;++t)this.changeListeners[t](e)},e.prototype.get=function(e,t,n){return void 0===t&&(t={}),this._updateBrowserValues(n),bg(this.cookies[e],t)},e.prototype.getAll=function(e,t){void 0===e&&(e={}),this._updateBrowserValues(t);var n={};for(var r in this.cookies)n[r]=bg(this.cookies[r],e);return n},e.prototype.set=function(e,t,n){var r;"object"==typeof t&&(t=JSON.stringify(t)),this.cookies=vg(vg({},this.cookies),((r={})[e]=t,r)),this.HAS_DOCUMENT_COOKIE&&(document.cookie=gg.serialize(e,t,n)),this._emitChange({name:e,value:t,options:n})},e.prototype.remove=function(e,t){var n=t=vg(vg({},t),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=vg({},this.cookies),delete this.cookies[e],this.HAS_DOCUMENT_COOKIE&&(document.cookie=gg.serialize(e,"",n)),this._emitChange({name:e,value:void 0,options:t})},e.prototype.addChangeListener=function(e){this.changeListeners.push(e)},e.prototype.removeChangeListener=function(e){var t=this.changeListeners.indexOf(e);t>=0&&this.changeListeners.splice(t,1)},e}(),Sg=i.createContext(new yg),_g=(Sg.Provider,Sg.Consumer,Sg);function xg(e){var t=Object(i.useContext)(_g);if(!t)throw new Error("Missing <CookiesProvider>");var n=t.getAll(),r=Object(i.useState)(n),o=r[0],s=r[1],a=Object(i.useRef)(o);return"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement&&Object(i.useLayoutEffect)((function(){function n(){var n=t.getAll();(function(e,t,n){if(!e)return!0;for(var r=0,i=e;r<i.length;r++){var o=i[r];if(t[o]!==n[o])return!0}return!1})(e||null,n,a.current)&&s(n),a.current=n}return t.addChangeListener(n),function(){t.removeChangeListener(n)}}),[t]),[o,Object(i.useMemo)((function(){return t.set.bind(t)}),[t]),Object(i.useMemo)((function(){return t.remove.bind(t)}),[t])]}var wg,kg;n(396);function Og(){return(Og=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Eg=function(e){return i.createElement("svg",Og({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),wg||(wg=i.createElement("rect",{width:24,height:24,rx:12})),kg||(kg=i.createElement("path",{d:"M9.958 17l-4.75-4.75 1.188-1.187 3.562 3.562 7.646-7.646 1.188 1.188L9.958 17z"})))};var Ag=e=>{let{label:t,options:n,value:r,setValue:i}=e;return o.a.createElement("fieldset",{className:"select-buttons"},o.a.createElement("legend",{className:"select-buttons__legend"},t),o.a.createElement("div",{className:"select-buttons__options"},n.map((e,n)=>o.a.createElement("div",{className:"select-buttons__option",key:n},o.a.createElement("input",{className:"select-buttons__button",type:"radio",id:"".concat(t,"-option").concat(n),value:e.value,onChange:e=>i(e.target.value),checked:e.value===r}),o.a.createElement("label",{className:"select-buttons__label".concat(e.value===r?" select-buttons__label--selected":""),htmlFor:"".concat(t,"-option").concat(n)},e.Icon?o.a.createElement(e.Icon,null):null,e.label,o.a.createElement("div",{className:"select-buttons__tick".concat(e.value===r?" select-buttons__tick--selected":"")},o.a.createElement(Eg,null)))))))};const Tg=["/","/projects","/python"];var Cg,Mg=()=>{const[e,t,n]=xg(["theme"]),r="dark"===e.theme||!e.theme&&window.matchMedia("(prefers-color-scheme:dark)").matches,{t:s}=Wi();return o.a.createElement(Ag,{label:s("sidebar.settingsMenu.theme"),options:[{value:"light",label:s("sidebar.settingsMenu.themeOptions.light")},{value:"dark",label:s("sidebar.settingsMenu.themeOptions.dark")}],value:r?"dark":"light",setValue:r=>{e.theme&&Tg.forEach(e=>{n("theme",{path:e})}),Object(i.startTransition)(()=>{t("theme",r,{path:"/"})}),document.dispatchEvent(ff("editor-themeUpdated",r))}})};function $g(){return($g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Pg,Rg=function(e){return i.createElement("svg",$g({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Cg||(Cg=i.createElement("path",{d:"M7.307 3c.465 0 .882.285 1.05.72l2.34 6.079-1.205 3.108a1.132 1.132 0 01-.052-.116l-.456-1.183H5.63l-.456 1.183a1.126 1.126 0 11-2.1-.81L6.26 3.72A1.126 1.126 0 017.309 3h-.002zm-.81 6.356h1.62l-.81-2.102-.81 2.102zm8.791-2.649a1.125 1.125 0 00-2.1 0L8.59 18.74a1.124 1.124 0 00-1.111 1.14 1.127 1.127 0 001.138 1.113h.68c.047.002.093.002.139 0l1.432-.005a1.124 1.124 0 001.123-1.06A1.127 1.127 0 0011 18.742l.574-1.501h5.332l.578 1.513a1.124 1.124 0 00-.993 1.185A1.127 1.127 0 0017.615 21l2.25-.006A1.124 1.124 0 0021 19.878a1.128 1.128 0 00-1.114-1.136l-1.122-2.936a1.14 1.14 0 00-.07-.184L15.29 6.709l-.002-.002zm.756 8.28h-3.611l1.805-4.726 1.806 4.726z"})))};function jg(){return(jg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ng,Dg=function(e){return i.createElement("svg",jg({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Pg||(Pg=i.createElement("path",{d:"M8.35 5c.362 0 .686.222.816.56l1.821 4.728-.938 2.417a.888.888 0 01-.04-.09l-.355-.92H7.046l-.354.92a.875.875 0 11-1.633-.63L7.535 5.56A.876.876 0 018.35 5zm-.63 4.943h1.26l-.63-1.635-.63 1.635zm6.837-2.06a.876.876 0 00-1.634 0l-3.575 9.36a.874.874 0 00-.864.886.877.877 0 00.885.865h.53a.874.874 0 00.107 0l1.114-.003a.874.874 0 00.67-1.44.875.875 0 00-.568-.306l.446-1.168h4.147l.45 1.177a.875.875 0 00-.499 1.508.874.874 0 00.601.238l1.75-.005a.874.874 0 00.633-1.49.874.874 0 00-.617-.261l-.872-2.284a.87.87 0 00-.055-.143L14.56 7.885l-.002-.002zm.588 6.44h-2.808l1.404-3.675 1.404 3.675z"})))};function Ig(){return(Ig=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Lg=function(e){return i.createElement("svg",Ig({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Ng||(Ng=i.createElement("path",{d:"M9.393 7c.258 0 .49.158.583.4l1.3 3.377-.67 1.727a.628.628 0 01-.028-.064l-.254-.658H8.461l-.253.658a.625.625 0 11-1.166-.45L8.81 7.4a.626.626 0 01.583-.4h-.001zm-.45 3.531h.9l-.45-1.168-.45 1.168zm4.884-1.471a.626.626 0 00-1.168 0l-2.553 6.685a.625.625 0 00.015 1.25h.378a.612.612 0 00.077 0l.795-.002a.624.624 0 00.073-1.247l.32-.834h2.96l.322.84A.624.624 0 0015.12 17l1.25-.003a.624.624 0 00.451-1.064.625.625 0 00-.44-.188l-.623-1.63a.627.627 0 00-.04-.103l-1.89-4.952h-.001zm.42 4.6H12.24l1.003-2.626 1.004 2.625z"})))};const Bg=["/","/projects","/python"];var zg=()=>{const[e,t,n]=xg(["fontSize"]),r=e.fontSize||"small",{t:i}=Wi();return o.a.createElement(Ag,{label:i("sidebar.settingsMenu.textSize"),options:[{value:"small",label:i("sidebar.settingsMenu.textSizeOptions.small"),Icon:Lg},{value:"medium",label:i("sidebar.settingsMenu.textSizeOptions.medium"),Icon:Dg},{value:"large",label:i("sidebar.settingsMenu.textSizeOptions.large"),Icon:Rg}],value:r,setValue:r=>{e.fontSize&&Bg.forEach(e=>{n("fontSize",{path:e})}),t("fontSize",r,{path:"/"})}})};n(397);var Fg,Ug=()=>{const{t:e}=Wi(),t=Fn(e=>e.editor.isThemeable);return o.a.createElement(qm,{heading:e("settingsPanel.info")},o.a.createElement("div",{className:"settings-panel"},t&&o.a.createElement(Mg,null),o.a.createElement(zg,null)))};function Qg(){return(Qg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var qg,Gg=function(e){return i.createElement("svg",Qg({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Fg||(Fg=i.createElement("path",{d:"M6 19h3v-6h6v6h3v-9l-6-4.5L6 10v9zm-2 2V9l8-6 8 6v12h-7v-6h-2v6H4z"})))};function Hg(){return(Hg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Vg,Wg=function(e){return i.createElement("svg",Hg({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),qg||(qg=i.createElement("path",{d:"M5 22a2.893 2.893 0 01-2.125-.875A2.893 2.893 0 012 19V5c0-.833.292-1.542.875-2.125A2.893 2.893 0 015 2h14c.833 0 1.542.292 2.125.875S22 4.167 22 5v14c0 .833-.292 1.542-.875 2.125A2.893 2.893 0 0119 22H5zm0-2h14c.283 0 .52-.096.712-.288A.965.965 0 0020 19V5a.968.968 0 00-.288-.713A.967.967 0 0019 4H5a.97.97 0 00-.713.287A.97.97 0 004 5v14c0 .283.096.52.287.712.192.192.43.288.713.288zm1-2l4-4 1.8 1.775L14 13l4 5H6zm2-8c-.55 0-1.02-.196-1.412-.588A1.923 1.923 0 016 8c0-.55.196-1.02.588-1.412A1.923 1.923 0 018 6c.55 0 1.021.196 1.413.588C9.804 6.979 10 7.45 10 8c0 .55-.196 1.02-.587 1.412A1.927 1.927 0 018 10z"})))};function Xg(){return(Xg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Yg,Zg=function(e){return i.createElement("svg",Xg({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Vg||(Vg=i.createElement("path",{d:"M9.25 22l-.4-3.2a3.79 3.79 0 01-.613-.3 8.266 8.266 0 01-.562-.375L4.7 19.375l-2.75-4.75 2.575-1.95a2.387 2.387 0 01-.025-.338v-.675c0-.108.008-.22.025-.337L1.95 9.375l2.75-4.75 2.975 1.25c.183-.133.375-.258.575-.375.2-.117.4-.217.6-.3l.4-3.2h5.5l.4 3.2c.217.083.42.183.612.3.192.117.38.242.563.375l2.975-1.25 2.75 4.75-2.575 1.95c.017.117.025.23.025.338v.675c0 .108-.017.22-.05.337l2.575 1.95-2.75 4.75-2.95-1.25a6.842 6.842 0 01-.575.375c-.2.117-.4.217-.6.3l-.4 3.2h-5.5zm2.8-6.5c.967 0 1.792-.342 2.475-1.025A3.372 3.372 0 0015.55 12c0-.967-.342-1.792-1.025-2.475A3.373 3.373 0 0012.05 8.5c-.983 0-1.813.342-2.488 1.025A3.393 3.393 0 008.55 12c0 .967.337 1.792 1.012 2.475.676.683 1.505 1.025 2.488 1.025zm0-2c-.417 0-.77-.146-1.063-.438A1.446 1.446 0 0110.55 12c0-.417.146-.77.438-1.063a1.446 1.446 0 011.062-.437c.417 0 .77.146 1.063.438.291.291.437.645.437 1.062 0 .417-.146.77-.438 1.063a1.447 1.447 0 01-1.062.437zM11 20h1.975l.35-2.65c.517-.133.996-.33 1.438-.588.441-.258.845-.57 1.212-.937l2.475 1.025.975-1.7-2.15-1.625c.083-.233.142-.48.175-.738a6.153 6.153 0 000-1.575 3.535 3.535 0 00-.175-.737l2.15-1.625-.975-1.7-2.475 1.05a5.556 5.556 0 00-1.213-.962 5.607 5.607 0 00-1.437-.588L13 4h-1.975l-.35 2.65c-.517.133-.996.33-1.438.587-.441.259-.845.571-1.212.938L5.55 7.15l-.975 1.7 2.15 1.6c-.083.25-.142.5-.175.75s-.05.517-.05.8c0 .267.017.525.05.775s.092.5.175.75l-2.15 1.625.975 1.7 2.475-1.05c.367.383.77.704 1.212.962.442.259.921.455 1.438.588L11 20z"})))};function Jg(){return(Jg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Kg=function(e){return i.createElement("svg",Jg({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Yg||(Yg=i.createElement("path",{d:"M3 22v-1.5h2.5v-.75H4v-1.5h1.5v-.75H3V16h4v2.25L6 19l1 .75V22H3zm0-7v-3.75h2.5v-.75H3V9h4v3.75H4.5v.75H7V15H3zm1.5-7V3.5H3V2h3v6H4.5zM9 19v-2h12v2H9zm0-6v-2h12v2H9zm0-6V5h12v2H9z"})))};n(398),n(399);var eb=e=>{let{className:t}=e;const n=Fn(e=>e.editor.project.project_type),{t:r}=Wi();return o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:mi()("project-info",t)},o.a.createElement("label",{htmlFor:"project_type",className:"project-type__label"},r("projectsPanel.projectTypeLabel")),o.a.createElement("div",{className:"project-type__text"},r("projectTypes.".concat(n)))))};var tb=()=>{const{t:e,i18n:{language:t}}=Wi(),n=Fn(e=>{var t;return null==e||null===(t=e.auth)||void 0===t?void 0:t.user}),r=Object(hi.useMediaQuery)({query:$o}),i=Fn(e=>e.editor.readOnly),s=o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"projects-panel__save"},o.a.createElement(kf,{className:"projects-panel__save-button"})),o.a.createElement("div",{className:"projects-panel__save-status"},o.a.createElement(Sp,{isMobile:r})));return o.a.createElement(qm,{heading:e("projectsPanel.projects"),Button:()=>n&&o.a.createElement(rf,{className:"btn--primary projects-panel__your-projects-button",href:"/".concat(t,"/projects"),text:e("projectsPanel.yourProjectsButton")}),className:"projects-panel-wrapper"},o.a.createElement(of,{showLabel:!0,className:"projects-panel__item",editable:!i}),o.a.createElement(eb,{className:"projects-panel__item"}),o.a.createElement("div",{className:"projects-panel__button"},o.a.createElement(pf,{buttonText:e("header.download"),className:"projects-panel__download-button",Icon:wp})),r&&s)};n(400);var nb=()=>{const e=Fn(e=>e.editor.project.image_list);return o.a.createElement("div",{className:"project-images"},e.map((e,t)=>o.a.createElement("div",{key:t,className:"project-images__block"},o.a.createElement("div",{className:"project-images__image-wrapper"},o.a.createElement("img",{crossOrigin:"true",className:"project-images__image",src:e.url,alt:e.filename})),o.a.createElement("p",null,e.filename))))};var rb=()=>{const{t:e}=Wi();return o.a.createElement(qm,{heading:e("imagePanel.gallery")},o.a.createElement(nb,null))};n(401);var ib,ob=()=>{const{t:e}=Wi(),t=Fn(e=>e.auth.user),n=Fn(e=>e.editor.project),r=Sf(t,n);return o.a.createElement(qm,{heading:e("downloadPanel.heading")},!t&&o.a.createElement("div",{className:"download-panel__login-section"},o.a.createElement("div",{className:"download-panel__subtitle"},e("downloadPanel.logInTitle")),o.a.createElement("p",{className:"download-panel__hint"},e("downloadPanel.logInHint")),o.a.createElement("div",{className:"download-panel__button-container"},o.a.createElement(rf,{className:"btn btn--primary download-panel__button",text:e("downloadPanel.logInButton"),type:"primary",onClick:()=>{window.plausible&&window.plausible("Login button"),document.dispatchEvent(bf)},fill:!0}),o.a.createElement(rf,{className:"btn btn--secondary download-panel__button",text:e("downloadPanel.signUpButton"),type:"secondary",onClick:()=>{document.dispatchEvent(vf)},fill:!0}))),o.a.createElement("div",{className:"download-panel__download-section"},o.a.createElement("p",{className:"download-panel__hint"},e("downloadPanel.downloadHint")),o.a.createElement(pf,{buttonText:e("downloadPanel.downloadButton"),className:"btn btn--secondary download-panel__button",Icon:wp,fill:!0})),t&&!r&&o.a.createElement(kf,{fill:!0}))};function sb(){return(sb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ab,lb=function(e){return i.createElement("svg",sb({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),ib||(ib=i.createElement("path",{d:"M11.666 15l-5-5 5-5 1.167 1.167L9 10l3.833 3.833L11.666 15z"})))};function cb(){return(cb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ub=function(e){return i.createElement("svg",cb({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),ab||(ab=i.createElement("path",{d:"M7.833 15l-1.167-1.167L10.5 10 6.667 6.167 7.832 5l5 5-5 5z"})))};n(402);var db=()=>{const e=Fn(e=>e.instructions.project.steps.length),t=Fn(e=>e.instructions.currentStepPosition),n=In(),{t:r}=Wi();return o.a.createElement("div",{className:"progress-bar"},o.a.createElement(kc,{className:"btn--primary btn--small",buttonOuter:!0,onClickHandler:()=>{n(Lc(Math.max(t-1,0)))},ButtonIcon:lb,disabled:0===t,title:r("instructionsPanel.previousStep")}),o.a.createElement("progress",{max:e-1,value:t}),o.a.createElement(kc,{className:"btn--primary btn--small",buttonOuter:!0,onClickHandler:()=>{n(Lc(Math.min(t+1,e-1)))},ButtonIcon:ub,disabled:t===e-1,title:r("instructionsPanel.nextStep")}))};n(403),n(404),n(405),n(406),n(407);var hb=()=>{const e=Fn(e=>{var t;return null===(t=e.instructions.project)||void 0===t?void 0:t.steps}),t=Fn(e=>{var t;return null===(t=e.instructions)||void 0===t?void 0:t.quiz}),n=In(),r=Fn(e=>e.instructions.currentStepPosition),{t:s}=Wi(),a=Object(i.useRef)(),[l,c]=Object(i.useState)(!1),u=Object(i.useMemo)(()=>(null==t?void 0:t.currentQuestion)===(null==t?void 0:t.questionCount),[t]),d=Fn(e=>e.instructions.project.steps.length);return Object(i.useEffect)(()=>{var n;!u&&null!=t&&t.questionCount&&"string"==typeof(null===(n=e[r])||void 0===n?void 0:n.knowledgeQuiz)?c(!0):c(!1)},[t,e,r,u]),Object(i.useEffect)(()=>{const n=e=>{a.current.parentElement.scrollTo({top:0}),a.current.innerHTML=e,a.current.querySelectorAll(".language-python, .language-html, .language-css").forEach(e=>{window.Prism.highlightElement(e)})};l&&!u?(n(t.questions[t.currentQuestion]),document.dispatchEvent(yf)):e[r]&&n(e[r].content)},[e,r,t,u,l]),Object(i.useEffect)(()=>{u&&l&&n(Lc(Math.min(r+1,d-1)))},[u,r,d,n,l]),o.a.createElement(qm,{defaultWidth:"30vw",heading:s("instructionsPanel.projectSteps"),Footer:db},o.a.createElement("div",{className:"project-instructions",ref:a}))};var pb=e=>{let{options:t=[]}=e;const{t:n}=Wi();let r=[{name:"projects",icon:Gg,title:n("sidebar.projects"),position:"top",panel:tb},{name:"instructions",icon:Kg,title:n("sidebar.instructions"),position:"top",panel:hb},{name:"file",icon:og,title:n("sidebar.file"),position:"top",panel:sg},{name:"images",icon:Wg,title:n("sidebar.images"),position:"top",panel:rb},{name:"download",icon:wf,title:n("sidebar.download"),position:"top",panel:ob},{name:"settings",icon:Zg,title:n("sidebar.settings"),position:"bottom",panel:Ug},{name:"info",icon:ed,title:n("sidebar.information"),position:"bottom",panel:lg}].filter(e=>t.includes(e.name));const s=Object(hi.useMediaQuery)({query:$o}),a=Fn(e=>e.editor.project.image_list),l=Fn(e=>{var t,n;return null===(t=e.instructions)||void 0===t||null===(n=t.project)||void 0===n?void 0:n.steps}),c=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];n&&0!==n.length||!t.includes(e)||r.splice(r.findIndex(t=>t.name===e),1)};c("images",a),c("instructions",l);const[u,d]=Object(i.useState)(l?"instructions":"file"),h=r.find(e=>e.name===u),p=h&&h.panel?h.panel:()=>{};return o.a.createElement("div",{className:mi()("sidebar",{"sidebar--mobile":s})},o.a.createElement(mg,{menuOptions:r,option:u,toggleOption:e=>{u!==e?d(e):s||d(null)},instructions:l}),u&&o.a.createElement(p,{isMobile:s}))},fb=n(25),mb=n(108),gb=n(182);let bb=function(e){e()};const vb=Object(i.createContext)(null);const yb=()=>{throw new Error("uSES not initialized!")};let Sb=yb;var _b=n(183);const xb=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function wb(e,t,n,r,{areStatesEqual:i,areOwnPropsEqual:o,areStatePropsEqual:s}){let a,l,c,u,d,h=!1;function p(h,p){const f=!o(p,l),m=!i(h,a,p,l);return a=h,l=p,f&&m?(c=e(a,l),t.dependsOnOwnProps&&(u=t(r,l)),d=n(c,u,l),d):f?(e.dependsOnOwnProps&&(c=e(a,l)),t.dependsOnOwnProps&&(u=t(r,l)),d=n(c,u,l),d):m?function(){const t=e(a,l),r=!s(t,c);return c=t,r&&(d=n(c,u,l)),d}():d}return function(i,o){return h?p(i,o):(a=i,l=o,c=e(a,l),u=t(r,l),d=n(c,u,l),h=!0,d)}}function kb(e){return function(t){const n=e(t);function r(){return n}return r.dependsOnOwnProps=!1,r}}function Ob(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function Eb(e,t){return function(t,{displayName:n}){const r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e,void 0)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=Ob(e);let i=r(t,n);return"function"==typeof i&&(r.mapToProps=i,r.dependsOnOwnProps=Ob(i),i=r(t,n)),i},r}}function Ab(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function Tb(e,t,n){return Object(An.a)({},n,e,t)}function Cb(){const e=bb;let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let e=t;for(;e;)e.callback(),e=e.next})},get(){let e=[],n=t;for(;n;)e.push(n),n=n.next;return e},subscribe(e){let r=!0,i=n={callback:e,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){r&&null!==t&&(r=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}const Mb={notify(){},get:()=>[]};function $b(e,t){let n,r=Mb;function i(){s.onStateChange&&s.onStateChange()}function o(){n||(n=t?t.addNestedSub(i):e.subscribe(i),r=Cb())}const s={addNestedSub:function(e){return o(),r.subscribe(e)},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:i,isSubscribed:function(){return Boolean(n)},trySubscribe:o,tryUnsubscribe:function(){n&&(n(),n=void 0,r.clear(),r=Mb)},getListeners:()=>r};return s}const Pb=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)?i.useLayoutEffect:i.useEffect;function Rb(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function jb(e,t){if(Rb(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Rb(e[n[r]],t[n[r]]))return!1;return!0}const Nb=["reactReduxForwardedRef"];let Db=yb;const Ib=[null,null];function Lb(e,t,n,r,i,o){e.current=r,n.current=!1,i.current&&(i.current=null,o())}function Bb(e,t){return e===t}var zb=function(e,t,n,{pure:r,areStatesEqual:s=Bb,areOwnPropsEqual:a=jb,areStatePropsEqual:l=jb,areMergedPropsEqual:c=jb,forwardRef:u=!1,context:d=vb}={}){const h=d,p=function(e){return e?"function"==typeof e?Eb(e):Ab(e,"mapStateToProps"):kb(()=>({}))}(e),f=function(e){return e&&"object"==typeof e?kb(t=>function(e,t){const n={};for(const r in e){const i=e[r];"function"==typeof i&&(n[r]=(...e)=>t(i(...e)))}return n}(e,t)):e?"function"==typeof e?Eb(e):Ab(e,"mapDispatchToProps"):kb(e=>({dispatch:e}))}(t),m=function(e){return e?"function"==typeof e?function(e){return function(t,{displayName:n,areMergedPropsEqual:r}){let i,o=!1;return function(t,n,s){const a=e(t,n,s);return o?r(a,i)||(i=a):(o=!0,i=a),i}}}(e):Ab(e,"mergeProps"):()=>Tb}(n),g=Boolean(e);return e=>{const t=e.displayName||e.name||"Component",n=`Connect(${t})`,r={shouldHandleStateChanges:g,displayName:n,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:p,initMapDispatchToProps:f,initMergeProps:m,areStatesEqual:s,areStatePropsEqual:l,areOwnPropsEqual:a,areMergedPropsEqual:c};function d(t){const[n,s,a]=Object(i.useMemo)(()=>{const{reactReduxForwardedRef:e}=t,n=Tn(t,Nb);return[t.context,e,n]},[t]),l=Object(i.useMemo)(()=>n&&n.Consumer&&Object(_b.isContextConsumer)(o.a.createElement(n.Consumer,null))?n:h,[n,h]),c=Object(i.useContext)(l),u=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),d=Boolean(c)&&Boolean(c.store);const p=u?t.store:c.store,f=d?c.getServerState:p.getState,m=Object(i.useMemo)(()=>function(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:i}=t,o=Tn(t,xb);return wb(n(e,o),r(e,o),i(e,o),e,o)}(p.dispatch,r),[p]),[b,v]=Object(i.useMemo)(()=>{if(!g)return Ib;const e=$b(p,u?void 0:c.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[p,u,c]),y=Object(i.useMemo)(()=>u?c:Object(An.a)({},c,{subscription:b}),[u,c,b]),S=Object(i.useRef)(),_=Object(i.useRef)(a),x=Object(i.useRef)(),w=Object(i.useRef)(!1),k=(Object(i.useRef)(!1),Object(i.useRef)(!1)),O=Object(i.useRef)();Pb(()=>(k.current=!0,()=>{k.current=!1}),[]);const E=Object(i.useMemo)(()=>()=>x.current&&a===_.current?x.current:m(p.getState(),a),[p,a]),A=Object(i.useMemo)(()=>e=>b?function(e,t,n,r,i,o,s,a,l,c,u){if(!e)return()=>{};let d=!1,h=null;const p=()=>{if(d||!a.current)return;const e=t.getState();let n,p;try{n=r(e,i.current)}catch(e){p=e,h=e}p||(h=null),n===o.current?s.current||c():(o.current=n,l.current=n,s.current=!0,u())};return n.onStateChange=p,n.trySubscribe(),p(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,h)throw h}}(g,p,b,m,_,S,w,k,x,v,e):()=>{},[b]);var T,C,M;let $;T=Lb,C=[_,S,w,a,x,v],Pb(()=>T(...C),M);try{$=Db(A,E,f?()=>m(f(),a):E)}catch(e){throw O.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${O.current.stack}\n\n`),e}Pb(()=>{O.current=void 0,x.current=void 0,S.current=$});const P=Object(i.useMemo)(()=>o.a.createElement(e,Object(An.a)({},$,{ref:s})),[s,e,$]);return Object(i.useMemo)(()=>g?o.a.createElement(l.Provider,{value:y},P):P,[l,P,y])}const b=o.a.memo(d);if(b.WrappedComponent=e,b.displayName=d.displayName=n,u){const t=o.a.forwardRef((function(e,t){return o.a.createElement(b,Object(An.a)({},e,{reactReduxForwardedRef:t}))}));return t.displayName=n,t.WrappedComponent=e,Mn()(t,e)}return Mn()(b,e)}};var Fb=function({store:e,context:t,children:n,serverState:r}){const s=Object(i.useMemo)(()=>{const t=$b(e);return{store:e,subscription:t,getServerState:r?()=>r:void 0}},[e,r]),a=Object(i.useMemo)(()=>e.getState(),[e]);Pb(()=>{const{subscription:t}=s;return t.onStateChange=t.notifyNestedSubs,t.trySubscribe(),a!==e.getState()&&t.notifyNestedSubs(),()=>{t.tryUnsubscribe(),t.onStateChange=void 0}},[s,a]);const l=t||vb;return o.a.createElement(l.Provider,{value:s},n)};var Ub;function Qb(e,t){var n=Object(i.useState)((function(){return{inputs:t,result:e()}}))[0],r=Object(i.useRef)(!0),o=Object(i.useRef)(n),s=r.current||Boolean(t&&o.current.inputs&&function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,o.current.inputs))?o.current:{inputs:t,result:e()};return Object(i.useEffect)((function(){r.current=!1,o.current=s}),[s]),s.result}Ub=gb.useSyncExternalStoreWithSelector,Sb=Ub,(e=>{Db=e})(mb.useSyncExternalStore),(e=>{bb=e})(Un.unstable_batchedUpdates);var qb=Qb,Gb=function(e,t){return Qb((function(){return e}),t)};var Hb=function(e){var t=e.top,n=e.right,r=e.bottom,i=e.left;return{top:t,right:n,bottom:r,left:i,width:n-i,height:r-t,x:i,y:t,center:{x:(n+i)/2,y:(r+t)/2}}},Vb=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},Wb=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},Xb={top:0,right:0,bottom:0,left:0},Yb=function(e){var t=e.borderBox,n=e.margin,r=void 0===n?Xb:n,i=e.border,o=void 0===i?Xb:i,s=e.padding,a=void 0===s?Xb:s,l=Hb(Vb(t,r)),c=Hb(Wb(t,o)),u=Hb(Wb(c,a));return{marginBox:l,borderBox:Hb(t),paddingBox:c,contentBox:u,margin:r,border:o,padding:a}},Zb=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var n=Number(t);return isNaN(n)&&function(e,t){if(!e)throw new Error("Invariant failed")}(!1),n},Jb=function(e,t){var n,r,i=e.borderBox,o=e.border,s=e.margin,a=e.padding,l=(r=t,{top:(n=i).top+r.y,left:n.left+r.x,bottom:n.bottom+r.y,right:n.right+r.x});return Yb({borderBox:l,border:o,margin:s,padding:a})},Kb=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),Jb(e,t)},ev=function(e,t){var n={top:Zb(t.marginTop),right:Zb(t.marginRight),bottom:Zb(t.marginBottom),left:Zb(t.marginLeft)},r={top:Zb(t.paddingTop),right:Zb(t.paddingRight),bottom:Zb(t.paddingBottom),left:Zb(t.paddingLeft)},i={top:Zb(t.borderTopWidth),right:Zb(t.borderRightWidth),bottom:Zb(t.borderBottomWidth),left:Zb(t.borderLeftWidth)};return Yb({borderBox:e,margin:n,padding:r,border:i})},tv=function(e){var t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return ev(t,n)},nv=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function rv(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],i=t[n],!(r===i||nv(r)&&nv(i)))return!1;var r,i;return!0}function iv(e,t){void 0===t&&(t=rv);var n=null;function r(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var o=e.apply(this,r);return n={lastResult:o,lastArgs:r,lastThis:this},o}return r.clear=function(){n=null},r}var ov=function(e){var t=[],n=null,r=function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];t=i,n||(n=requestAnimationFrame((function(){n=null,e.apply(void 0,t)})))};return r.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},r};function sv(e,t){}sv.bind(null,"warn"),sv.bind(null,"error");function av(){}function lv(e,t,n){const r=t.map(t=>{const r=function(e,t){return{...e,...t}}(n,t.options);return e.addEventListener(t.eventName,t.fn,r),function(){e.removeEventListener(t.eventName,t.fn,r)}});return function(){r.forEach(e=>{e()})}}class cv extends Error{}function uv(e,t){if(!e)throw new cv("Invariant failed")}cv.prototype.toString=function(){return this.message};class dv extends o.a.Component{constructor(){super(...arguments),this.callbacks=null,this.unbind=av,this.onWindowError=e=>{const t=this.getCallbacks();t.isDragging()&&t.tryAbort();e.error instanceof cv&&e.preventDefault()},this.getCallbacks=()=>{if(!this.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return this.callbacks},this.setCallbacks=e=>{this.callbacks=e}}componentDidMount(){this.unbind=lv(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(e){if(!(e instanceof cv))throw e;this.setState({})}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const hv=e=>e+1,pv=(e,t)=>{const n=e.droppableId===t.droppableId,r=hv(e.index),i=hv(t.index);return n?`\n You have moved the item from position ${r}\n to position ${i}\n `:`\n You have moved the item from position ${r}\n in list ${e.droppableId}\n to list ${t.droppableId}\n in position ${i}\n `},fv=(e,t,n)=>t.droppableId===n.droppableId?`\n The item ${e}\n has been combined with ${n.draggableId}`:`\n The item ${e}\n in list ${t.droppableId}\n has been combined with ${n.draggableId}\n in list ${n.droppableId}\n `,mv=e=>`\n The item has returned to its starting position\n of ${hv(e.index)}\n`;var gv={dragHandleUsageInstructions:"\n Press space bar to start a drag.\n When dragging you can use the arrow keys to move the item around and escape to cancel.\n Some screen readers may require you to be in focus mode or to use your pass through key\n",onDragStart:e=>`\n You have lifted an item in position ${hv(e.source.index)}\n`,onDragUpdate:e=>{const t=e.destination;if(t)return pv(e.source,t);const n=e.combine;return n?fv(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},onDragEnd:e=>{if("CANCEL"===e.reason)return`\n Movement cancelled.\n ${mv(e.source)}\n `;const t=e.destination,n=e.combine;return t?`\n You have dropped the item.\n ${pv(e.source,t)}\n `:n?`\n You have dropped the item.\n ${fv(e.draggableId,e.source,n)}\n `:`\n The item has been dropped while not over a drop area.\n ${mv(e.source)}\n `}};const bv={x:0,y:0},vv=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),yv=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),Sv=(e,t)=>e.x===t.x&&e.y===t.y,_v=e=>({x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}),xv=function(e,t,n){return void 0===n&&(n=0),"x"===e?{x:t,y:n}:{x:n,y:t}},wv=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),kv=(e,t)=>Math.min(...t.map(t=>wv(e,t))),Ov=e=>t=>({x:e(t.x),y:e(t.y)});const Ev=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),Av=e=>[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}],Tv=(e,t)=>t&&t.shouldClipSubject?((e,t)=>{const n=Hb({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n})(t.pageMarginBox,e):Hb(e);var Cv=e=>{let{page:t,withPlaceholder:n,axis:r,frame:i}=e;const o=((e,t,n)=>n&&n.increasedBy?{...e,[t.end]:e[t.end]+n.increasedBy[t.line]}:e)(((e,t)=>t?Ev(e,t.scroll.diff.displacement):e)(t.marginBox,i),r,n);return{page:t,withPlaceholder:n,active:Tv(o,i)}},Mv=(e,t)=>{e.frame||uv(!1);const n=e.frame,r=yv(t,n.scroll.initial),i=_v(r),o={...n,scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:i},max:n.scroll.max}},s=Cv({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:o});return{...e,frame:o,subject:s}};const $v=iv(e=>e.reduce((e,t)=>(e[t.descriptor.id]=t,e),{})),Pv=iv(e=>e.reduce((e,t)=>(e[t.descriptor.id]=t,e),{})),Rv=iv(e=>Object.values(e)),jv=iv(e=>Object.values(e));var Nv=iv((e,t)=>jv(t).filter(t=>e===t.descriptor.droppableId).sort((e,t)=>e.descriptor.index-t.descriptor.index));function Dv(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function Iv(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var Lv=iv((e,t)=>t.filter(t=>t.descriptor.id!==e.descriptor.id)),Bv=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const zv={point:bv,value:0},Fv={invisible:{},visible:{},all:[]};var Uv={displaced:Fv,displacedBy:zv,at:null},Qv=(e,t)=>n=>e<=n&&n<=t,qv=e=>{const t=Qv(e.top,e.bottom),n=Qv(e.left,e.right);return r=>{if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;const i=t(r.top)||t(r.bottom),o=n(r.left)||n(r.right);if(i&&o)return!0;const s=r.top<e.top&&r.bottom>e.bottom,a=r.left<e.left&&r.right>e.right;if(s&&a)return!0;return s&&o||a&&i}},Gv=e=>{const t=Qv(e.top,e.bottom),n=Qv(e.left,e.right);return e=>t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)};const Hv={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Vv={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"};const Wv=e=>{let{target:t,destination:n,viewport:r,withDroppableDisplacement:i,isVisibleThroughFrameFn:o}=e;const s=i?((e,t)=>{const n=t.frame?t.frame.scroll.diff.displacement:bv;return Ev(e,n)})(t,n):t;return((e,t,n)=>!!t.subject.active&&n(t.subject.active)(e))(s,n,o)&&((e,t,n)=>n(t)(e))(s,r,o)},Xv=e=>Wv({...e,isVisibleThroughFrameFn:Gv});function Yv(e){let{afterDragging:t,destination:n,displacedBy:r,viewport:i,forceShouldAnimate:o,last:s}=e;return t.reduce((function(e,t){const a=function(e,t){const n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return Hb(Vb(n,r))}(t,r),l=t.descriptor.id;e.all.push(l);var c;if(!(c={target:a,destination:n,viewport:i,withDroppableDisplacement:!0},Wv({...c,isVisibleThroughFrameFn:qv})))return e.invisible[t.descriptor.id]=!0,e;const u={draggableId:l,shouldAnimate:((e,t,n)=>{if("boolean"==typeof n)return n;if(!t)return!0;const{invisible:r,visible:i}=t;if(r[e])return!1;const o=i[e];return!o||o.shouldAnimate})(l,s,o)};return e.visible[l]=u,e}),{all:[],visible:{},invisible:{}})}function Zv(e){let{insideDestination:t,inHomeList:n,displacedBy:r,destination:i}=e;const o=function(e,t){if(!e.length)return 0;const n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}(t,{inHomeList:n});return{displaced:Fv,displacedBy:r,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:o}}}}function Jv(e){let{draggable:t,insideDestination:n,destination:r,viewport:i,displacedBy:o,last:s,index:a,forceShouldAnimate:l}=e;const c=Bv(t,r);if(null==a)return Zv({insideDestination:n,inHomeList:c,displacedBy:o,destination:r});const u=n.find(e=>e.descriptor.index===a);if(!u)return Zv({insideDestination:n,inHomeList:c,displacedBy:o,destination:r});const d=Lv(t,n),h=n.indexOf(u);return{displaced:Yv({afterDragging:d.slice(h),destination:r,displacedBy:o,last:s,viewport:i.frame,forceShouldAnimate:l}),displacedBy:o,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:a}}}}function Kv(e,t){return Boolean(t.effected[e])}var ey=e=>{let{isMovingForward:t,isInHomeList:n,draggable:r,draggables:i,destination:o,insideDestination:s,previousImpact:a,viewport:l,afterCritical:c}=e;const u=a.at;if(u||uv(!1),"REORDER"===u.type){const e=(e=>{let{isMovingForward:t,isInHomeList:n,insideDestination:r,location:i}=e;if(!r.length)return null;const o=i.index,s=t?o+1:o-1,a=r[0].descriptor.index,l=r[r.length-1].descriptor.index;return s<a||s>(n?l:l+1)?null:s})({isMovingForward:t,isInHomeList:n,location:u.destination,insideDestination:s});return null==e?null:Jv({draggable:r,insideDestination:s,destination:o,viewport:l,last:a.displaced,displacedBy:a.displacedBy,index:e})}const d=(e=>{let{isMovingForward:t,destination:n,draggables:r,combine:i,afterCritical:o}=e;if(!n.isCombineEnabled)return null;const s=i.draggableId,a=r[s].descriptor.index;return Kv(s,o)?t?a:a-1:t?a+1:a})({isMovingForward:t,destination:o,displaced:a.displaced,draggables:i,combine:u.combine,afterCritical:c});return null==d?null:Jv({draggable:r,insideDestination:s,destination:o,viewport:l,last:a.displaced,displacedBy:a.displacedBy,index:d})},ty=e=>{let{afterCritical:t,impact:n,draggables:r}=e;const i=Iv(n);i||uv(!1);const o=i.draggableId,s=r[o].page.borderBox.center,a=(e=>{let{displaced:t,afterCritical:n,combineWith:r,displacedBy:i}=e;const o=Boolean(t.visible[r]||t.invisible[r]);return Kv(r,n)?o?bv:_v(i.point):o?i.point:bv})({displaced:n.displaced,afterCritical:t,combineWith:o,displacedBy:n.displacedBy});return vv(s,a)};const ny=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,ry=(e,t,n)=>t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2,iy=e=>{let{axis:t,moveRelativeTo:n,isMoving:r}=e;return xv(t.line,n.marginBox[t.end]+ny(t,r),ry(t,n.marginBox,r))},oy=e=>{let{axis:t,moveRelativeTo:n,isMoving:r}=e;return xv(t.line,n.marginBox[t.start]-((e,t)=>t.margin[e.end]+t.borderBox[e.size]/2)(t,r),ry(t,n.marginBox,r))};var sy=e=>{let{impact:t,draggable:n,draggables:r,droppable:i,afterCritical:o}=e;const s=Nv(i.descriptor.id,r),a=n.page,l=i.axis;if(!s.length)return(e=>{let{axis:t,moveInto:n,isMoving:r}=e;return xv(t.line,n.contentBox[t.start]+ny(t,r),ry(t,n.contentBox,r))})({axis:l,moveInto:i.page,isMoving:a});const{displaced:c,displacedBy:u}=t,d=c.all[0];if(d){const e=r[d];if(Kv(d,o))return oy({axis:l,moveRelativeTo:e.page,isMoving:a});const t=Jb(e.page,u.point);return oy({axis:l,moveRelativeTo:t,isMoving:a})}const h=s[s.length-1];if(h.descriptor.id===n.descriptor.id)return a.borderBox.center;if(Kv(h.descriptor.id,o)){const e=Jb(h.page,_v(o.displacedBy.point));return iy({axis:l,moveRelativeTo:e,isMoving:a})}return iy({axis:l,moveRelativeTo:h.page,isMoving:a})},ay=(e,t)=>{const n=e.frame;return n?vv(t,n.scroll.diff.displacement):t};var ly=e=>{const t=(e=>{let{impact:t,draggable:n,droppable:r,draggables:i,afterCritical:o}=e;const s=n.page.borderBox.center,a=t.at;return r&&a?"REORDER"===a.type?sy({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:o}):ty({impact:t,draggables:i,afterCritical:o}):s})(e),n=e.droppable;return n?ay(n,t):t},cy=(e,t)=>{const n=yv(t,e.scroll.initial),r=_v(n);return{frame:Hb({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}};function uy(e,t){return e.map(e=>t[e])}var dy=e=>{let{pageBorderBoxCenter:t,draggable:n,viewport:r}=e;const i=((e,t)=>vv(e.scroll.diff.displacement,t))(r,t),o=yv(i,n.page.borderBox.center);return vv(n.client.borderBox.center,o)},hy=e=>{let{draggable:t,destination:n,newPageBorderBoxCenter:r,viewport:i,withDroppableDisplacement:o,onlyOnMainAxis:s=!1}=e;const a=yv(r,t.page.borderBox.center),l={target:Ev(t.page.borderBox,a),destination:n,withDroppableDisplacement:o,viewport:i};return s?(e=>{return Wv({...e,isVisibleThroughFrameFn:(t=e.destination.axis,e=>{const n=Qv(e.top,e.bottom),r=Qv(e.left,e.right);return e=>t===Hv?n(e.top)&&n(e.bottom):r(e.left)&&r(e.right)})});var t})(l):Xv(l)},py=e=>{let{isMovingForward:t,draggable:n,destination:r,draggables:i,previousImpact:o,viewport:s,previousPageBorderBoxCenter:a,previousClientSelection:l,afterCritical:c}=e;if(!r.isEnabled)return null;const u=Nv(r.descriptor.id,i),d=Bv(n,r),h=(e=>{let{isMovingForward:t,draggable:n,destination:r,insideDestination:i,previousImpact:o}=e;if(!r.isCombineEnabled)return null;if(!Dv(o))return null;function s(e){const t={type:"COMBINE",combine:{draggableId:e,droppableId:r.descriptor.id}};return{...o,at:t}}const a=o.displaced.all,l=a.length?a[0]:null;if(t)return l?s(l):null;const c=Lv(n,i);if(!l){if(!c.length)return null;return s(c[c.length-1].descriptor.id)}const u=c.findIndex(e=>e.descriptor.id===l);-1===u&&uv(!1);const d=u-1;if(d<0)return null;return s(c[d].descriptor.id)})({isMovingForward:t,draggable:n,destination:r,insideDestination:u,previousImpact:o})||ey({isMovingForward:t,isInHomeList:d,draggable:n,draggables:i,destination:r,insideDestination:u,previousImpact:o,viewport:s,afterCritical:c});if(!h)return null;const p=ly({impact:h,draggable:n,droppable:r,draggables:i,afterCritical:c});if(hy({draggable:n,destination:r,newPageBorderBoxCenter:p,viewport:s.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})){return{clientSelection:dy({pageBorderBoxCenter:p,draggable:n,viewport:s}),impact:h,scrollJumpRequest:null}}const f=yv(p,a);return{clientSelection:l,impact:(e=>{let{impact:t,viewport:n,destination:r,draggables:i,maxScrollChange:o}=e;const s=cy(n,vv(n.scroll.current,o)),a=r.frame?Mv(r,vv(r.frame.scroll.current,o)):r,l=t.displaced,c=Yv({afterDragging:uy(l.all,i),destination:r,displacedBy:t.displacedBy,viewport:s.frame,last:l,forceShouldAnimate:!1}),u=Yv({afterDragging:uy(l.all,i),destination:a,displacedBy:t.displacedBy,viewport:n.frame,last:l,forceShouldAnimate:!1}),d={},h={},p=[l,c,u];l.all.forEach(e=>{const t=function(e,t){for(let n=0;n<t.length;n++){const r=t[n].visible[e];if(r)return r}return null}(e,p);t?h[e]=t:d[e]=!0});return{...t,displaced:{all:l.all,invisible:d,visible:h}}})({impact:h,viewport:s,destination:r,draggables:i,maxScrollChange:f}),scrollJumpRequest:f}};const fy=e=>{const t=e.subject.active;return t||uv(!1),t};const my=(e,t)=>{const n=e.page.borderBox.center;return Kv(e.descriptor.id,t)?yv(n,t.displacedBy.point):n},gy=(e,t)=>{const n=e.page.borderBox;return Kv(e.descriptor.id,t)?Ev(n,_v(t.displacedBy.point)):n};var by=iv((function(e,t){const n=t[e.line];return{value:n,point:xv(e.line,n)}}));const vy=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),yy=(e,t,n)=>{const r=e.frame;Bv(t,e)&&uv(!1),e.subject.withPlaceholder&&uv(!1);const i=by(e.axis,t.displaceBy).point,o=((e,t,n)=>{const r=e.axis;if("virtual"===e.descriptor.mode)return xv(r.line,t[r.line]);const i=e.subject.page.contentBox[r.size],o=Nv(e.descriptor.id,n).reduce((e,t)=>e+t.client.marginBox[r.size],0)+t[r.line]-i;return o<=0?null:xv(r.line,o)})(e,i,n),s={placeholderSize:i,increasedBy:o,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){const t=Cv({page:e.subject.page,withPlaceholder:s,axis:e.axis,frame:e.frame});return{...e,subject:t}}const a=o?vv(r.scroll.max,o):r.scroll.max,l=vy(r,a),c=Cv({page:e.subject.page,withPlaceholder:s,axis:e.axis,frame:l});return{...e,subject:c,frame:l}};var Sy=e=>{let{isMovingForward:t,previousPageBorderBoxCenter:n,draggable:r,isOver:i,draggables:o,droppables:s,viewport:a,afterCritical:l}=e;const c=(e=>{let{isMovingForward:t,pageBorderBoxCenter:n,source:r,droppables:i,viewport:o}=e;const s=r.subject.active;if(!s)return null;const a=r.axis,l=Qv(s[a.start],s[a.end]),c=Rv(i).filter(e=>e!==r).filter(e=>e.isEnabled).filter(e=>Boolean(e.subject.active)).filter(e=>qv(o.frame)(fy(e))).filter(e=>{const n=fy(e);return t?s[a.crossAxisEnd]<n[a.crossAxisEnd]:n[a.crossAxisStart]<s[a.crossAxisStart]}).filter(e=>{const t=fy(e),n=Qv(t[a.start],t[a.end]);return l(t[a.start])||l(t[a.end])||n(s[a.start])||n(s[a.end])}).sort((e,n)=>{const r=fy(e)[a.crossAxisStart],i=fy(n)[a.crossAxisStart];return t?r-i:i-r}).filter((e,t,n)=>fy(e)[a.crossAxisStart]===fy(n[0])[a.crossAxisStart]);if(!c.length)return null;if(1===c.length)return c[0];const u=c.filter(e=>Qv(fy(e)[a.start],fy(e)[a.end])(n[a.line]));return 1===u.length?u[0]:u.length>1?u.sort((e,t)=>fy(e)[a.start]-fy(t)[a.start])[0]:c.sort((e,t)=>{const r=kv(n,Av(fy(e))),i=kv(n,Av(fy(t)));return r!==i?r-i:fy(e)[a.start]-fy(t)[a.start]})[0]})({isMovingForward:t,pageBorderBoxCenter:n,source:i,droppables:s,viewport:a});if(!c)return null;const u=Nv(c.descriptor.id,o),d=(e=>{let{previousPageBorderBoxCenter:t,moveRelativeTo:n,insideDestination:r,draggable:i,draggables:o,destination:s,viewport:a,afterCritical:l}=e;if(!n){if(r.length)return null;const e={displaced:Fv,displacedBy:zv,at:{type:"REORDER",destination:{droppableId:s.descriptor.id,index:0}}},t=ly({impact:e,draggable:i,droppable:s,draggables:o,afterCritical:l}),n=Bv(i,s)?s:yy(s,i,o);return hy({draggable:i,destination:n,newPageBorderBoxCenter:t,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?e:null}const c=Boolean(t[s.axis.line]<=n.page.borderBox.center[s.axis.line]),u=(()=>{const e=n.descriptor.index;return n.descriptor.id===i.descriptor.id||c?e:e+1})(),d=by(s.axis,i.displaceBy);return Jv({draggable:i,insideDestination:r,destination:s,viewport:a,displacedBy:d,last:Fv,index:u})})({previousPageBorderBoxCenter:n,destination:c,draggable:r,draggables:o,moveRelativeTo:(e=>{let{pageBorderBoxCenter:t,viewport:n,destination:r,insideDestination:i,afterCritical:o}=e;return i.filter(e=>Xv({target:gy(e,o),destination:r,viewport:n.frame,withDroppableDisplacement:!0})).sort((e,n)=>{const i=wv(t,ay(r,my(e,o))),s=wv(t,ay(r,my(n,o)));return i<s?-1:s<i?1:e.descriptor.index-n.descriptor.index})[0]||null})({pageBorderBoxCenter:n,viewport:a,destination:c,insideDestination:u,afterCritical:l}),insideDestination:u,viewport:a,afterCritical:l});if(!d)return null;const h=ly({impact:d,draggable:r,droppable:c,draggables:o,afterCritical:l});return{clientSelection:dy({pageBorderBoxCenter:h,draggable:r,viewport:a}),impact:d,scrollJumpRequest:null}},_y=e=>{const t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null};var xy=e=>{let{state:t,type:n}=e;const r=((e,t)=>{const n=_y(e);return n?t[n]:null})(t.impact,t.dimensions.droppables),i=Boolean(r),o=t.dimensions.droppables[t.critical.droppable.id],s=r||o,a=s.axis.direction,l="vertical"===a&&("MOVE_UP"===n||"MOVE_DOWN"===n)||"horizontal"===a&&("MOVE_LEFT"===n||"MOVE_RIGHT"===n);if(l&&!i)return null;const c="MOVE_DOWN"===n||"MOVE_RIGHT"===n,u=t.dimensions.draggables[t.critical.draggable.id],d=t.current.page.borderBoxCenter,{draggables:h,droppables:p}=t.dimensions;return l?py({isMovingForward:c,previousPageBorderBoxCenter:d,draggable:u,destination:s,draggables:h,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):Sy({isMovingForward:c,previousPageBorderBoxCenter:d,draggable:u,isOver:s,draggables:h,droppables:p,viewport:t.viewport,afterCritical:t.afterCritical})};function wy(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function ky(e){const t=Qv(e.top,e.bottom),n=Qv(e.left,e.right);return function(e){return t(e.y)&&n(e.x)}}function Oy(e){let{pageBorderBox:t,draggable:n,droppables:r}=e;const i=Rv(r).filter(e=>{if(!e.isEnabled)return!1;const n=e.subject.active;if(!n)return!1;if(i=n,!((r=t).left<i.right&&r.right>i.left&&r.top<i.bottom&&r.bottom>i.top))return!1;var r,i;if(ky(n)(t.center))return!0;const o=e.axis,s=n.center[o.crossAxisLine],a=t[o.crossAxisStart],l=t[o.crossAxisEnd],c=Qv(n[o.crossAxisStart],n[o.crossAxisEnd]),u=c(a),d=c(l);return!u&&!d||(u?a<s:l>s)});return i.length?1===i.length?i[0].descriptor.id:function(e){let{pageBorderBox:t,draggable:n,candidates:r}=e;const i=n.page.borderBox.center,o=r.map(e=>{const n=e.axis,r=xv(e.axis.line,t.center[n.line],e.page.borderBox.center[n.crossAxisLine]);return{id:e.descriptor.id,distance:wv(i,r)}}).sort((e,t)=>t.distance-e.distance);return o[0]?o[0].id:null}({pageBorderBox:t,draggable:n,candidates:i}):null}const Ey=(e,t)=>Hb(Ev(e,t));function Ay(e){let{displaced:t,id:n}=e;return Boolean(t.visible[n]||t.invisible[n])}var Ty=e=>{let{pageOffset:t,draggable:n,draggables:r,droppables:i,previousImpact:o,viewport:s,afterCritical:a}=e;const l=Ey(n.page.borderBox,t),c=Oy({pageBorderBox:l,draggable:n,droppables:i});if(!c)return Uv;const u=i[c],d=Nv(u.descriptor.id,r),h=((e,t)=>{const n=e.frame;return n?Ey(t,n.scroll.diff.value):t})(u,l);return(e=>{let{draggable:t,pageBorderBoxWithDroppableScroll:n,previousImpact:r,destination:i,insideDestination:o,afterCritical:s}=e;if(!i.isCombineEnabled)return null;const a=i.axis,l=by(i.axis,t.displaceBy),c=l.value,u=n[a.start],d=n[a.end],h=Lv(t,o).find(e=>{const t=e.descriptor.id,n=e.page.borderBox,i=n[a.size]/4,o=Kv(t,s),l=Ay({displaced:r.displaced,id:t});return o?l?d>n[a.start]+i&&d<n[a.end]-i:u>n[a.start]-c+i&&u<n[a.end]-c-i:l?d>n[a.start]+c+i&&d<n[a.end]+c-i:u>n[a.start]+i&&u<n[a.end]-i});if(!h)return null;return{displacedBy:l,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:h.descriptor.id,droppableId:i.descriptor.id}}}})({pageBorderBoxWithDroppableScroll:h,draggable:n,previousImpact:o,destination:u,insideDestination:d,afterCritical:a})||(e=>{let{pageBorderBoxWithDroppableScroll:t,draggable:n,destination:r,insideDestination:i,last:o,viewport:s,afterCritical:a}=e;const l=r.axis,c=by(r.axis,n.displaceBy),u=c.value,d=t[l.start],h=t[l.end],p=function(e){let{draggable:t,closest:n,inHomeList:r}=e;return n?r&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}({draggable:n,closest:Lv(n,i).find(e=>{const t=e.descriptor.id,n=e.page.borderBox.center[l.line],r=Kv(t,a),i=Ay({displaced:o,id:t});return r?i?h<=n:d<n-u:i?h<=n+u:d<n})||null,inHomeList:Bv(n,r)});return Jv({draggable:n,insideDestination:i,destination:r,viewport:s,last:o,displacedBy:c,index:p})})({pageBorderBoxWithDroppableScroll:h,draggable:n,destination:u,insideDestination:d,last:o.displaced,viewport:s,afterCritical:a})},Cy=(e,t)=>({...e,[t.descriptor.id]:t});const My=e=>{let{previousImpact:t,impact:n,droppables:r}=e;const i=_y(t),o=_y(n);if(!i)return r;if(i===o)return r;const s=r[i];if(!s.subject.withPlaceholder)return r;const a=(e=>{const t=e.subject.withPlaceholder;t||uv(!1);const n=e.frame;if(!n){const t=Cv({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:t}}const r=t.oldFrameMaxScroll;r||uv(!1);const i=vy(n,r),o=Cv({page:e.subject.page,axis:e.axis,frame:i,withPlaceholder:null});return{...e,subject:o,frame:i}})(s);return Cy(r,a)};var $y=e=>{let{state:t,clientSelection:n,dimensions:r,viewport:i,impact:o,scrollJumpRequest:s}=e;const a=i||t.viewport,l=r||t.dimensions,c=n||t.current.client.selection,u=yv(c,t.initial.client.selection),d={offset:u,selection:c,borderBoxCenter:vv(t.initial.client.borderBoxCenter,u)},h={selection:vv(d.selection,a.scroll.current),borderBoxCenter:vv(d.borderBoxCenter,a.scroll.current),offset:vv(d.offset,a.scroll.diff.value)},p={client:d,page:h};if("COLLECTING"===t.phase)return{...t,dimensions:l,viewport:a,current:p};const f=l.draggables[t.critical.draggable.id],m=o||Ty({pageOffset:h.offset,draggable:f,draggables:l.draggables,droppables:l.droppables,previousImpact:t.impact,viewport:a,afterCritical:t.afterCritical}),g=(e=>{let{draggable:t,draggables:n,droppables:r,previousImpact:i,impact:o}=e;const s=My({previousImpact:i,impact:o,droppables:r}),a=_y(o);if(!a)return s;const l=r[a];if(Bv(t,l))return s;if(l.subject.withPlaceholder)return s;const c=yy(l,t,n);return Cy(s,c)})({draggable:f,impact:m,previousImpact:t.impact,draggables:l.draggables,droppables:l.droppables});return{...t,current:p,dimensions:{draggables:l.draggables,droppables:g},impact:m,viewport:a,scrollJumpRequest:s||null,forceShouldAnimate:!s&&null}};var Py=e=>{let{impact:t,viewport:n,draggables:r,destination:i,forceShouldAnimate:o}=e;const s=t.displaced,a=Yv({afterDragging:function(e,t){return e.map(e=>t[e])}(s.all,r),destination:i,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:o,last:s});return{...t,displaced:a}},Ry=e=>{let{impact:t,draggable:n,droppable:r,draggables:i,viewport:o,afterCritical:s}=e;const a=ly({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:s});return dy({pageBorderBoxCenter:a,draggable:n,viewport:o})},jy=e=>{let{state:t,dimensions:n,viewport:r}=e;"SNAP"!==t.movementMode&&uv(!1);const i=t.impact,o=r||t.viewport,s=n||t.dimensions,{draggables:a,droppables:l}=s,c=a[t.critical.draggable.id],u=_y(i);u||uv(!1);const d=l[u],h=Py({impact:i,viewport:o,destination:d,draggables:a}),p=Ry({impact:h,draggable:c,droppable:d,draggables:a,viewport:o,afterCritical:t.afterCritical});return $y({impact:h,clientSelection:p,state:t,dimensions:s,viewport:o})},Ny=e=>{let{draggable:t,home:n,draggables:r,viewport:i}=e;const o=by(n.axis,t.displaceBy),s=Nv(n.descriptor.id,r),a=s.indexOf(t);-1===a&&uv(!1);const l=s.slice(a+1),c=l.reduce((e,t)=>(e[t.descriptor.id]=!0,e),{}),u={inVirtualList:"virtual"===n.descriptor.mode,displacedBy:o,effected:c};var d;return{impact:{displaced:Yv({afterDragging:l,destination:n,displacedBy:o,last:null,viewport:i.frame,forceShouldAnimate:!1}),displacedBy:o,at:{type:"REORDER",destination:(d=t.descriptor,{index:d.index,droppableId:d.droppableId})}},afterCritical:u}};const Dy=e=>{0},Iy=e=>{0};var Ly=e=>{let{additions:t,updatedDroppables:n,viewport:r}=e;const i=r.scroll.diff.value;return t.map(e=>{const t=e.descriptor.droppableId,o=(e=>{const t=e.frame;return t||uv(!1),t})(n[t]).scroll.diff.value;return(e=>{let{draggable:t,offset:n,initialWindowScroll:r}=e;const i=Jb(t.client,n),o=Kb(i,r);return{...t,placeholder:{...t.placeholder,client:i},client:i,page:o}})({draggable:e,offset:vv(i,o),initialWindowScroll:r.scroll.initial})})};const By=e=>"SNAP"===e.movementMode,zy=(e,t,n)=>{const r=((e,t)=>({draggables:e.draggables,droppables:Cy(e.droppables,t)}))(e.dimensions,t);return!By(e)||n?$y({state:e,dimensions:r}):jy({state:e,dimensions:r})};function Fy(e){return e.isDragging&&"SNAP"===e.movementMode?{...e,scrollJumpRequest:null}:e}const Uy={phase:"IDLE",completed:null,shouldFlush:!1};var Qy=function(e,t){if(void 0===e&&(e=Uy),"FLUSH"===t.type)return{...Uy,shouldFlush:!0};if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&uv(!1);const{critical:n,clientSelection:r,viewport:i,dimensions:o,movementMode:s}=t.payload,a=o.draggables[n.draggable.id],l=o.droppables[n.droppable.id],c={selection:r,borderBoxCenter:a.client.borderBox.center,offset:bv},u={client:c,page:{selection:vv(c.selection,i.scroll.initial),borderBoxCenter:vv(c.selection,i.scroll.initial),offset:vv(c.selection,i.scroll.diff.value)}},d=Rv(o.droppables).every(e=>!e.isFixedOnPage),{impact:h,afterCritical:p}=Ny({draggable:a,home:l,draggables:o.draggables,viewport:i});return{phase:"DRAGGING",isDragging:!0,critical:n,movementMode:s,dimensions:o,initial:u,current:u,isWindowScrollAllowed:d,impact:h,afterCritical:p,onLiftImpact:h,viewport:i,scrollJumpRequest:null,forceShouldAnimate:null}}if("COLLECTION_STARTING"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&uv(!1);return{...e,phase:"COLLECTING"}}if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&uv(!1),(e=>{let{state:t,published:n}=e;Dy();const r=n.modified.map(e=>{const n=t.dimensions.droppables[e.droppableId];return Mv(n,e.scroll)}),i={...t.dimensions.droppables,...$v(r)},o=Pv(Ly({additions:n.additions,updatedDroppables:i,viewport:t.viewport})),s={...t.dimensions.draggables,...o};n.removals.forEach(e=>{delete s[e]});const a={droppables:i,draggables:s},l=_y(t.impact),c=l?a.droppables[l]:null,u=a.draggables[t.critical.draggable.id],d=a.droppables[t.critical.droppable.id],{impact:h,afterCritical:p}=Ny({draggable:u,home:d,draggables:s,viewport:t.viewport}),f=c&&c.isCombineEnabled?t.impact:h,m=Ty({pageOffset:t.current.page.offset,draggable:a.draggables[t.critical.draggable.id],draggables:a.draggables,droppables:a.droppables,previousImpact:f,viewport:t.viewport,afterCritical:p});Iy();const g={...t,phase:"DRAGGING",impact:m,onLiftImpact:h,dimensions:a,afterCritical:p,forceShouldAnimate:!1};if("COLLECTING"===t.phase)return g;return{...g,phase:"DROP_PENDING",reason:t.reason,isWaiting:!1}})({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;wy(e)||uv(!1);const{client:n}=t.payload;return Sv(n,e.current.client.selection)?e:$y({state:e,clientSelection:n,impact:By(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return Fy(e);if("COLLECTING"===e.phase)return Fy(e);wy(e)||uv(!1);const{id:n,newScroll:r}=t.payload,i=e.dimensions.droppables[n];if(!i)return e;const o=Mv(i,r);return zy(e,o,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;wy(e)||uv(!1);const{id:n,isEnabled:r}=t.payload,i=e.dimensions.droppables[n];i||uv(!1),i.isEnabled===r&&uv(!1);const o={...i,isEnabled:r};return zy(e,o,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;wy(e)||uv(!1);const{id:n,isCombineEnabled:r}=t.payload,i=e.dimensions.droppables[n];i||uv(!1),i.isCombineEnabled===r&&uv(!1);const o={...i,isCombineEnabled:r};return zy(e,o,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;wy(e)||uv(!1),e.isWindowScrollAllowed||uv(!1);const n=t.payload.newScroll;if(Sv(e.viewport.scroll.current,n))return Fy(e);const r=cy(e.viewport,n);return By(e)?jy({state:e,viewport:r}):$y({state:e,viewport:r})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!wy(e))return e;const n=t.payload.maxScroll;if(Sv(n,e.viewport.scroll.max))return e;const r={...e.viewport,scroll:{...e.viewport.scroll,max:n}};return{...e,viewport:r}}if("MOVE_UP"===t.type||"MOVE_DOWN"===t.type||"MOVE_LEFT"===t.type||"MOVE_RIGHT"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&uv(!1);const n=xy({state:e,type:t.type});return n?$y({state:e,impact:n.impact,clientSelection:n.clientSelection,scrollJumpRequest:n.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){const n=t.payload.reason;"COLLECTING"!==e.phase&&uv(!1);return{...e,phase:"DROP_PENDING",isWaiting:!0,reason:n}}if("DROP_ANIMATE"===t.type){const{completed:n,dropDuration:r,newHomeClientOffset:i}=t.payload;"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&uv(!1);return{phase:"DROP_ANIMATING",completed:n,dropDuration:r,newHomeClientOffset:i,dimensions:e.dimensions}}if("DROP_COMPLETE"===t.type){const{completed:e}=t.payload;return{phase:"IDLE",completed:e,shouldFlush:!1}}return e};const qy=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),Gy=()=>({type:"COLLECTION_STARTING",payload:null}),Hy=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),Vy=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),Wy=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),Xy=e=>({type:"MOVE",payload:e}),Yy=()=>({type:"MOVE_UP",payload:null}),Zy=()=>({type:"MOVE_DOWN",payload:null}),Jy=()=>({type:"MOVE_RIGHT",payload:null}),Ky=()=>({type:"MOVE_LEFT",payload:null}),eS=e=>({type:"DROP_COMPLETE",payload:e}),tS=e=>({type:"DROP",payload:e}),nS=()=>({type:"DROP_ANIMATION_FINISHED",payload:null});const rS="cubic-bezier(.2,1,.1,1)",iS={drop:0,combining:.7},oS={drop:.75},sS={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},aS=`${sS.outOfTheWay}s ${"cubic-bezier(0.2, 0, 0, 1)"}`,lS={fluid:"opacity "+aS,snap:`transform ${aS}, opacity ${aS}`,drop:e=>{const t=`${e}s ${rS}`;return`transform ${t}, opacity ${t}`},outOfTheWay:"transform "+aS,placeholder:`height ${aS}, width ${aS}, margin ${aS}`},cS=e=>Sv(e,bv)?void 0:`translate(${e.x}px, ${e.y}px)`,uS=cS,dS=(e,t)=>{const n=cS(e);if(n)return t?`${n} scale(${oS.drop})`:n},{minDropTime:hS,maxDropTime:pS}=sS,fS=pS-hS;var mS=e=>{let{getState:t,dispatch:n}=e;return e=>r=>{if("DROP"!==r.type)return void e(r);const i=t(),o=r.payload.reason;if("COLLECTING"===i.phase)return void n((e=>({type:"DROP_PENDING",payload:e}))({reason:o}));if("IDLE"===i.phase)return;"DROP_PENDING"===i.phase&&i.isWaiting&&uv(!1),"DRAGGING"!==i.phase&&"DROP_PENDING"!==i.phase&&uv(!1);const s=i.critical,a=i.dimensions,l=a.draggables[i.critical.draggable.id],{impact:c,didDropInsideDroppable:u}=(e=>{let{draggables:t,reason:n,lastImpact:r,home:i,viewport:o,onLiftImpact:s}=e;if(!r.at||"DROP"!==n){return{impact:Py({draggables:t,impact:s,destination:i,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1}}if("REORDER"===r.at.type)return{impact:r,didDropInsideDroppable:!0};return{impact:{...r,displaced:Fv},didDropInsideDroppable:!0}})({reason:o,lastImpact:i.impact,afterCritical:i.afterCritical,onLiftImpact:i.onLiftImpact,home:i.dimensions.droppables[i.critical.droppable.id],viewport:i.viewport,draggables:i.dimensions.draggables}),d=u?Dv(c):null,h=u?Iv(c):null,p={index:s.draggable.index,droppableId:s.droppable.id},f={draggableId:l.descriptor.id,type:l.descriptor.type,source:p,reason:o,mode:i.movementMode,destination:d,combine:h},m=(e=>{let{impact:t,draggable:n,dimensions:r,viewport:i,afterCritical:o}=e;const{draggables:s,droppables:a}=r,l=_y(t),c=l?a[l]:null,u=a[n.descriptor.droppableId],d=Ry({impact:t,draggable:n,draggables:s,afterCritical:o,droppable:c||u,viewport:i});return yv(d,n.client.borderBox.center)})({impact:c,draggable:l,dimensions:a,viewport:i.viewport,afterCritical:i.afterCritical}),g={critical:i.critical,afterCritical:i.afterCritical,result:f,impact:c};if(!(!Sv(i.current.client.offset,m)||Boolean(f.combine)))return void n(eS({completed:g}));const b=(e=>{let{current:t,destination:n,reason:r}=e;const i=wv(t,n);if(i<=0)return hS;if(i>=1500)return pS;const o=hS+fS*(i/1500);return Number(("CANCEL"===r?.6*o:o).toFixed(2))})({current:i.current.client.offset,destination:m,reason:o});n((e=>({type:"DROP_ANIMATE",payload:e}))({newHomeClientOffset:m,dropDuration:b,completed:g}))}},gS=()=>({x:window.pageXOffset,y:window.pageYOffset});function bS(e){let{onWindowScroll:t}=e;const n=ov((function(){t(gS())})),r=(i=n,{eventName:"scroll",options:{passive:!0,capture:!1},fn:e=>{e.target!==window&&e.target!==window.document||i()}});var i;let o=av;function s(){return o!==av}return{start:function(){s()&&uv(!1),o=lv(window,[r])},stop:function(){s()||uv(!1),n.cancel(),o(),o=av},isActive:s}}var vS=e=>{const t=bS({onWindowScroll:t=>{e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return e=>n=>{t.isActive()||"INITIAL_PUBLISH"!==n.type||t.start(),t.isActive()&&(e=>"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type)(n)&&t.stop(),e(n)}},yS=()=>{const e=[];return{add:t=>{const n=setTimeout(()=>(t=>{const n=e.findIndex(e=>e.timerId===t);-1===n&&uv(!1);const[r]=e.splice(n,1);r.callback()})(n)),r={timerId:n,callback:t};e.push(r)},flush:()=>{if(!e.length)return;const t=[...e];e.length=0,t.forEach(e=>{clearTimeout(e.timerId),e.callback()})}}};const SS=(e,t)=>{Dy(),t(),Iy()},_S=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function xS(e,t,n,r){if(!e)return void n(r(t));const i=(e=>{let t=!1,n=!1;const r=setTimeout(()=>{n=!0}),i=i=>{t||n||(t=!0,e(i),clearTimeout(r))};return i.wasCalled=()=>t,i})(n);e(t,{announce:i}),i.wasCalled()||n(r(t))}var wS=(e,t)=>{const n=((e,t)=>{const n=yS();let r=null;const i=n=>{r||uv(!1),r=null,SS(0,()=>xS(e().onDragEnd,n,t,gv.onDragEnd))};return{beforeCapture:(t,n)=>{r&&uv(!1),SS(0,()=>{const r=e().onBeforeCapture;if(r){r({draggableId:t,mode:n})}})},beforeStart:(t,n)=>{r&&uv(!1),SS(0,()=>{const r=e().onBeforeDragStart;r&&r(_S(t,n))})},start:(i,o)=>{r&&uv(!1);const s=_S(i,o);r={mode:o,lastCritical:i,lastLocation:s.source,lastCombine:null},n.add(()=>{SS(0,()=>xS(e().onDragStart,s,t,gv.onDragStart))})},update:(i,o)=>{const s=Dv(o),a=Iv(o);r||uv(!1);const l=!((e,t)=>{if(e===t)return!0;const n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r})(i,r.lastCritical);l&&(r.lastCritical=i);const c=(u=r.lastLocation,d=s,!(null==u&&null==d||null!=u&&null!=d&&u.droppableId===d.droppableId&&u.index===d.index));var u,d;c&&(r.lastLocation=s);const h=!((e,t)=>null==e&&null==t||null!=e&&null!=t&&(e.draggableId===t.draggableId&&e.droppableId===t.droppableId))(r.lastCombine,a);if(h&&(r.lastCombine=a),!l&&!c&&!h)return;const p={..._S(i,r.mode),combine:a,destination:s};n.add(()=>{SS(0,()=>xS(e().onDragUpdate,p,t,gv.onDragUpdate))})},flush:()=>{r||uv(!1),n.flush()},drop:i,abort:()=>{if(!r)return;const e={..._S(r.lastCritical,r.mode),combine:null,destination:null,reason:"CANCEL"};i(e)}}})(e,t);return e=>t=>r=>{if("BEFORE_INITIAL_CAPTURE"===r.type)return void n.beforeCapture(r.payload.draggableId,r.payload.movementMode);if("INITIAL_PUBLISH"===r.type){const e=r.payload.critical;return n.beforeStart(e,r.payload.movementMode),t(r),void n.start(e,r.payload.movementMode)}if("DROP_COMPLETE"===r.type){const e=r.payload.completed.result;return n.flush(),t(r),void n.drop(e)}if(t(r),"FLUSH"===r.type)return void n.abort();const i=e.getState();"DRAGGING"===i.phase&&n.update(i.critical,i.impact)}};var kS=e=>t=>n=>{if("DROP_ANIMATION_FINISHED"!==n.type)return void t(n);const r=e.getState();"DROP_ANIMATING"!==r.phase&&uv(!1),e.dispatch(eS({completed:r.completed}))};var OS=e=>{let t=null,n=null;return r=>i=>{if("FLUSH"!==i.type&&"DROP_COMPLETE"!==i.type&&"DROP_ANIMATION_FINISHED"!==i.type||(n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)),r(i),"DROP_ANIMATE"!==i.type)return;const o={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch({type:"DROP_ANIMATION_FINISHED",payload:null})}};n=requestAnimationFrame(()=>{n=null,t=lv(window,[o])})}};var ES=e=>t=>n=>{if(t(n),"PUBLISH_WHILE_DRAGGING"!==n.type)return;const r=e.getState();"DROP_PENDING"===r.phase&&(r.isWaiting||e.dispatch(tS({reason:r.reason})))};const AS=fb.d;var TS=e=>{let{dimensionMarshal:t,focusMarshal:n,styleMarshal:r,getResponders:i,announce:o,autoScroller:s}=e;return Object(fb.e)(Qy,AS(Object(fb.a)((a=r,()=>e=>t=>{"INITIAL_PUBLISH"===t.type&&a.dragging(),"DROP_ANIMATE"===t.type&&a.dropping(t.payload.completed.result.reason),"FLUSH"!==t.type&&"DROP_COMPLETE"!==t.type||a.resting(),e(t)}),(e=>()=>t=>n=>{"DROP_COMPLETE"!==n.type&&"FLUSH"!==n.type&&"DROP_ANIMATE"!==n.type||e.stopPublishing(),t(n)})(t),(e=>t=>{let{getState:n,dispatch:r}=t;return t=>i=>{if("LIFT"!==i.type)return void t(i);const{id:o,clientSelection:s,movementMode:a}=i.payload,l=n();"DROP_ANIMATING"===l.phase&&r(eS({completed:l.completed})),"IDLE"!==n().phase&&uv(!1),r({type:"FLUSH",payload:null}),r({type:"BEFORE_INITIAL_CAPTURE",payload:{draggableId:o,movementMode:a}});const c={draggableId:o,scrollOptions:{shouldPublishImmediately:"SNAP"===a}},{critical:u,dimensions:d,viewport:h}=e.startPublishing(c);r((e=>({type:"INITIAL_PUBLISH",payload:e}))({critical:u,dimensions:d,clientSelection:s,movementMode:a,viewport:h}))}})(t),mS,kS,OS,ES,(e=>t=>n=>r=>{if((e=>"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type)(r))return e.stop(),void n(r);if("INITIAL_PUBLISH"===r.type){n(r);const i=t.getState();return"DRAGGING"!==i.phase&&uv(!1),void e.start(i)}n(r),e.scroll(t.getState())})(s),vS,(e=>{let t=!1;return()=>n=>r=>{if("INITIAL_PUBLISH"===r.type)return t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),void e.tryRestoreFocusRecorded();if(n(r),t){if("FLUSH"===r.type)return t=!1,void e.tryRestoreFocusRecorded();if("DROP_COMPLETE"===r.type){t=!1;const n=r.payload.completed.result;n.combine&&e.tryShiftRecord(n.draggableId,n.combine.draggableId),e.tryRestoreFocusRecorded()}}}})(n),wS(i,o))));var a};var CS=e=>{let{scrollHeight:t,scrollWidth:n,height:r,width:i}=e;const o=yv({x:n,y:t},{x:i,y:r});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},MS=()=>{const e=document.documentElement;return e||uv(!1),e},$S=()=>{const e=MS();return CS({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},PS=e=>{let{critical:t,scrollOptions:n,registry:r}=e;Dy();const i=(()=>{const e=gS(),t=$S(),n=e.y,r=e.x,i=MS(),o=i.clientWidth,s=i.clientHeight;return{frame:Hb({top:n,left:r,right:r+o,bottom:n+s}),scroll:{initial:e,current:e,max:t,diff:{value:bv,displacement:bv}}}})(),o=i.scroll.current,s=t.droppable,a=r.droppable.getAllByType(s.type).map(e=>e.callbacks.getDimensionAndWatchScroll(o,n)),l=r.draggable.getAllByType(t.draggable.type).map(e=>e.getDimension(o)),c={draggables:Pv(l),droppables:$v(a)};Iy();return{dimensions:c,critical:t,viewport:i}};function RS(e,t,n){if(n.descriptor.id===t.id)return!1;if(n.descriptor.type!==t.type)return!1;return"virtual"===e.droppable.getById(n.descriptor.droppableId).descriptor.mode}var jS=(e,t)=>{let n=null;const r=function(e){let{registry:t,callbacks:n}=e,r={additions:{},removals:{},modified:{}},i=null;const o=()=>{i||(n.collectionStarting(),i=requestAnimationFrame(()=>{i=null,Dy();const{additions:e,removals:o,modified:s}=r,a=Object.keys(e).map(e=>t.draggable.getById(e).getDimension(bv)).sort((e,t)=>e.descriptor.index-t.descriptor.index),l=Object.keys(s).map(e=>({droppableId:e,scroll:t.droppable.getById(e).callbacks.getScrollWhileDragging()})),c={additions:a,removals:Object.keys(o),modified:l};r={additions:{},removals:{},modified:{}},Iy(),n.publish(c)}))};return{add:e=>{const t=e.descriptor.id;r.additions[t]=e,r.modified[e.descriptor.droppableId]=!0,r.removals[t]&&delete r.removals[t],o()},remove:e=>{const t=e.descriptor;r.removals[t.id]=!0,r.modified[t.droppableId]=!0,r.additions[t.id]&&delete r.additions[t.id],o()},stop:()=>{i&&(cancelAnimationFrame(i),i=null,r={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=t=>{n||uv(!1);const i=n.critical.draggable;"ADDITION"===t.type&&RS(e,i,t.value)&&r.add(t.value),"REMOVAL"===t.type&&RS(e,i,t.value)&&r.remove(t.value)};return{updateDroppableIsEnabled:(r,i)=>{e.droppable.exists(r)||uv(!1),n&&t.updateDroppableIsEnabled({id:r,isEnabled:i})},updateDroppableIsCombineEnabled:(r,i)=>{n&&(e.droppable.exists(r)||uv(!1),t.updateDroppableIsCombineEnabled({id:r,isCombineEnabled:i}))},scrollDroppable:(t,r)=>{n&&e.droppable.getById(t).callbacks.scroll(r)},updateDroppableScroll:(r,i)=>{n&&(e.droppable.exists(r)||uv(!1),t.updateDroppableScroll({id:r,newScroll:i}))},startPublishing:t=>{n&&uv(!1);const r=e.draggable.getById(t.draggableId),o=e.droppable.getById(r.descriptor.droppableId),s={draggable:r.descriptor,droppable:o.descriptor},a=e.subscribe(i);return n={critical:s,unsubscribe:a},PS({critical:s,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:()=>{if(!n)return;r.stop();const t=n.critical.droppable;e.droppable.getAllByType(t.type).forEach(e=>e.callbacks.dragStopped()),n.unsubscribe(),n=null}}},NS=(e,t)=>"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&(e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason),DS=e=>{window.scrollBy(e.x,e.y)};const IS=iv(e=>Rv(e).filter(e=>!!e.isEnabled&&!!e.frame));var LS=e=>{let{center:t,destination:n,droppables:r}=e;if(n){const e=r[n];return e.frame?e:null}return((e,t)=>IS(t).find(t=>(t.frame||uv(!1),ky(t.frame.pageMarginBox)(e)))||null)(t,r)};const BS={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var zS=e=>{let{startOfRange:t,endOfRange:n,current:r}=e;const i=n-t;if(0===i)return 0;return(r-t)/i},FS=e=>{let{distanceToEdge:t,thresholds:n,dragStartTime:r,shouldUseTimeDampening:i,getAutoScrollerOptions:o}=e;const s=function(e,t,n){void 0===n&&(n=()=>BS);const r=n();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return r.maxPixelScroll;if(e===t.startScrollingFrom)return 1;const i=1-zS({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),o=r.maxPixelScroll*r.ease(i);return Math.ceil(o)}(t,n,o);return 0===s?0:i?Math.max(((e,t,n)=>{const r=n(),i=r.durationDampening.accelerateAt,o=r.durationDampening.stopDampeningAt,s=t,a=o,l=Date.now()-s;if(l>=o)return e;if(l<i)return 1;const c=zS({startOfRange:i,endOfRange:a,current:l}),u=e*r.ease(c);return Math.ceil(u)})(s,r,o),1):s},US=e=>{let{container:t,distanceToEdges:n,dragStartTime:r,axis:i,shouldUseTimeDampening:o,getAutoScrollerOptions:s}=e;const a=function(e,t,n){void 0===n&&(n=()=>BS);const r=n();return{startScrollingFrom:e[t.size]*r.startFromPercentage,maxScrollValueAt:e[t.size]*r.maxScrollAtPercentage}}(t,i,s);return n[i.end]<n[i.start]?FS({distanceToEdge:n[i.end],thresholds:a,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:s}):-1*FS({distanceToEdge:n[i.start],thresholds:a,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:s})};const QS=Ov(e=>0===e?0:e);var qS=e=>{let{dragStartTime:t,container:n,subject:r,center:i,shouldUseTimeDampening:o,getAutoScrollerOptions:s}=e;const a={top:i.y-n.top,right:n.right-i.x,bottom:n.bottom-i.y,left:i.x-n.left},l=US({container:n,distanceToEdges:a,dragStartTime:t,axis:Hv,shouldUseTimeDampening:o,getAutoScrollerOptions:s}),c=US({container:n,distanceToEdges:a,dragStartTime:t,axis:Vv,shouldUseTimeDampening:o,getAutoScrollerOptions:s}),u=QS({x:c,y:l});if(Sv(u,bv))return null;const d=(e=>{let{container:t,subject:n,proposedScroll:r}=e;const i=n.height>t.height,o=n.width>t.width;return o||i?o&&i?null:{x:o?0:r.x,y:i?0:r.y}:r})({container:n,subject:r,proposedScroll:u});return d?Sv(d,bv)?null:d:null};const GS=Ov(e=>0===e?0:e>0?1:-1),HS=(()=>{const e=(e,t)=>e<0?e:e>t?e-t:0;return t=>{let{current:n,max:r,change:i}=t;const o=vv(n,i),s={x:e(o.x,r.x),y:e(o.y,r.y)};return Sv(s,bv)?null:s}})(),VS=e=>{let{max:t,current:n,change:r}=e;const i={x:Math.max(n.x,t.x),y:Math.max(n.y,t.y)},o=GS(r),s=HS({max:i,current:n,change:o});return!s||(0!==o.x&&0===s.x||0!==o.y&&0===s.y)},WS=(e,t)=>VS({current:e.scroll.current,max:e.scroll.max,change:t}),XS=(e,t)=>{const n=e.frame;return!!n&&VS({current:n.scroll.current,max:n.scroll.max,change:t})};var YS=e=>{let{state:t,dragStartTime:n,shouldUseTimeDampening:r,scrollWindow:i,scrollDroppable:o,getAutoScrollerOptions:s}=e;const a=t.current.page.borderBoxCenter,l=t.dimensions.draggables[t.critical.draggable.id].page.marginBox;if(t.isWindowScrollAllowed){const e=(e=>{let{viewport:t,subject:n,center:r,dragStartTime:i,shouldUseTimeDampening:o,getAutoScrollerOptions:s}=e;const a=qS({dragStartTime:i,container:t.frame,subject:n,center:r,shouldUseTimeDampening:o,getAutoScrollerOptions:s});return a&&WS(t,a)?a:null})({dragStartTime:n,viewport:t.viewport,subject:l,center:a,shouldUseTimeDampening:r,getAutoScrollerOptions:s});if(e)return void i(e)}const c=LS({center:a,destination:_y(t.impact),droppables:t.dimensions.droppables});if(!c)return;const u=(e=>{let{droppable:t,subject:n,center:r,dragStartTime:i,shouldUseTimeDampening:o,getAutoScrollerOptions:s}=e;const a=t.frame;if(!a)return null;const l=qS({dragStartTime:i,container:a.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:o,getAutoScrollerOptions:s});return l&&XS(t,l)?l:null})({dragStartTime:n,droppable:c,subject:l,center:a,shouldUseTimeDampening:r,getAutoScrollerOptions:s});u&&o(c.descriptor.id,u)},ZS=e=>{let{move:t,scrollDroppable:n,scrollWindow:r}=e;const i=(e,t)=>{if(!XS(e,t))return t;const r=((e,t)=>{const n=e.frame;return n&&XS(e,t)?HS({current:n.scroll.current,max:n.scroll.max,change:t}):null})(e,t);if(!r)return n(e.descriptor.id,t),null;const i=yv(t,r);n(e.descriptor.id,i);return yv(t,i)},o=(e,t,n)=>{if(!e)return n;if(!WS(t,n))return n;const i=((e,t)=>{if(!WS(e,t))return null;const n=e.scroll.max,r=e.scroll.current;return HS({current:r,max:n,change:t})})(t,n);if(!i)return r(n),null;const o=yv(n,i);r(o);return yv(n,o)};return e=>{const n=e.scrollJumpRequest;if(!n)return;const r=_y(e.impact);r||uv(!1);const s=i(e.dimensions.droppables[r],n);if(!s)return;const a=e.viewport,l=o(e.isWindowScrollAllowed,a,s);l&&((e,n)=>{const r=vv(e.current.client.selection,n);t({client:r})})(e,l)}},JS=e=>{let{scrollDroppable:t,scrollWindow:n,move:r,getAutoScrollerOptions:i}=e;const o=(e=>{let{scrollWindow:t,scrollDroppable:n,getAutoScrollerOptions:r=(()=>BS)}=e;const i=ov(t),o=ov(n);let s=null;const a=e=>{s||uv(!1);const{shouldUseTimeDampening:t,dragStartTime:n}=s;YS({state:e,scrollWindow:i,scrollDroppable:o,dragStartTime:n,shouldUseTimeDampening:t,getAutoScrollerOptions:r})};return{start:e=>{Dy(),s&&uv(!1);const t=Date.now();let n=!1;const i=()=>{n=!0};YS({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:i,scrollDroppable:i,getAutoScrollerOptions:r}),s={dragStartTime:t,shouldUseTimeDampening:n},Iy(),n&&a(e)},stop:()=>{s&&(i.cancel(),o.cancel(),s=null)},scroll:a}})({scrollWindow:n,scrollDroppable:t,getAutoScrollerOptions:i}),s=ZS({move:r,scrollWindow:n,scrollDroppable:t});return{scroll:e=>{i().disabled||"DRAGGING"!==e.phase||("FLUID"!==e.movementMode?e.scrollJumpRequest&&s(e):o.scroll(e))},start:o.start,stop:o.stop}};const KS=(()=>{const e="data-rfd-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}})(),e_=(()=>{const e="data-rfd-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}})(),t_=(()=>{const e="data-rfd-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}})(),n_={contextId:"data-rfd-scroll-container-context-id"},r_=(e,t)=>e.map(e=>{const n=e.styles[t];return n?`${e.selector} { ${n} }`:""}).join(" ");var i_="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?i.useLayoutEffect:i.useEffect;const o_=()=>{const e=document.querySelector("head");return e||uv(!1),e},s_=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function a_(e,t){const n=qb(()=>(e=>{const t=(n=e,e=>`[${e}="${n}"]`);var n;const r=(()=>{const e="\n cursor: -webkit-grab;\n cursor: grab;\n ";return{selector:t(KS.contextId),styles:{always:"\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n ",resting:e,dragging:"pointer-events: none;",dropAnimating:e}}})(),i=[(()=>{const e=`\n transition: ${lS.outOfTheWay};\n `;return{selector:t(e_.contextId),styles:{dragging:e,dropAnimating:e,userCancel:e}}})(),r,{selector:t(t_.contextId),styles:{always:"overflow-anchor: none;"}},{selector:"body",styles:{dragging:"\n cursor: grabbing;\n cursor: -webkit-grabbing;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n overflow-anchor: none;\n "}}];return{always:r_(i,"always"),resting:r_(i,"resting"),dragging:r_(i,"dragging"),dropAnimating:r_(i,"dropAnimating"),userCancel:r_(i,"userCancel")}})(e),[e]),r=Object(i.useRef)(null),o=Object(i.useRef)(null),s=Gb(iv(e=>{const t=o.current;t||uv(!1),t.textContent=e}),[]),a=Gb(e=>{const t=r.current;t||uv(!1),t.textContent=e},[]);i_(()=>{(r.current||o.current)&&uv(!1);const i=s_(t),l=s_(t);return r.current=i,o.current=l,i.setAttribute("data-rfd-always",e),l.setAttribute("data-rfd-dynamic",e),o_().appendChild(i),o_().appendChild(l),a(n.always),s(n.resting),()=>{const e=e=>{const t=e.current;t||uv(!1),o_().removeChild(t),e.current=null};e(r),e(o)}},[t,a,s,n.always,n.resting,e]);const l=Gb(()=>s(n.dragging),[s,n.dragging]),c=Gb(e=>{s("DROP"!==e?n.userCancel:n.dropAnimating)},[s,n.dropAnimating,n.userCancel]),u=Gb(()=>{o.current&&s(n.resting)},[s,n.resting]);return qb(()=>({dragging:l,dropping:c,resting:u}),[l,c,u])}function l_(e,t){return Array.from(e.querySelectorAll(t))}var c_=e=>{var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window};function u_(e){return e instanceof c_(e).HTMLElement}function d_(e,t){const n=`[${KS.contextId}="${e}"]`,r=l_(document,n);if(!r.length)return null;const i=r.find(e=>e.getAttribute(KS.draggableId)===t);return i&&u_(i)?i:null}function h_(){const e={draggables:{},droppables:{}},t=[];function n(e){t.length&&t.forEach(t=>t(e))}function r(t){return e.draggables[t]||null}function i(t){return e.droppables[t]||null}return{draggable:{register:t=>{e.draggables[t.descriptor.id]=t,n({type:"ADDITION",value:t})},update:(t,n)=>{const r=e.draggables[n.descriptor.id];r&&r.uniqueId===t.uniqueId&&(delete e.draggables[n.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:t=>{const i=t.descriptor.id,o=r(i);o&&t.uniqueId===o.uniqueId&&(delete e.draggables[i],e.droppables[t.descriptor.droppableId]&&n({type:"REMOVAL",value:t}))},getById:function(e){const t=r(e);return t||uv(!1),t},findById:r,exists:e=>Boolean(r(e)),getAllByType:t=>Object.values(e.draggables).filter(e=>e.descriptor.type===t)},droppable:{register:t=>{e.droppables[t.descriptor.id]=t},unregister:t=>{const n=i(t.descriptor.id);n&&t.uniqueId===n.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){const t=i(e);return t||uv(!1),t},findById:i,exists:e=>Boolean(i(e)),getAllByType:t=>Object.values(e.droppables).filter(e=>e.descriptor.type===t)},subscribe:function(e){return t.push(e),function(){const n=t.indexOf(e);-1!==n&&t.splice(n,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var p_=o.a.createContext(null),f_=()=>{const e=document.body;return e||uv(!1),e};var m_={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"};let g_=0;const b_={separator:"::"};var v_="useId"in o.a?function(e,t){void 0===t&&(t=b_);const n=o.a.useId();return qb(()=>`${e}${t.separator}${n}`,[t.separator,e,n])}:function(e,t){return void 0===t&&(t=b_),qb(()=>`${e}${t.separator}${g_++}`,[t.separator,e])};var y_=o.a.createContext(null);function S_(e){0}function __(e,t){S_()}function x_(){__()}function w_(e){const t=Object(i.useRef)(e);return Object(i.useEffect)(()=>{t.current=e}),t}function k_(e){return"IDLE"!==e.phase&&"DROP_ANIMATING"!==e.phase&&e.isDragging}const O_={13:!0,9:!0};var E_=e=>{O_[e.keyCode]&&e.preventDefault()};var A_=(()=>{const e="visibilitychange";if("undefined"==typeof document)return e;return[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e].find(e=>"on"+e in document)||e})();const T_={type:"IDLE"};function C_(e){let{cancel:t,completed:n,getPhase:r,setPhase:i}=e;return[{eventName:"mousemove",fn:e=>{const{button:t,clientX:n,clientY:o}=e;if(0!==t)return;const s={x:n,y:o},a=r();if("DRAGGING"===a.type)return e.preventDefault(),void a.actions.move(s);"PENDING"!==a.type&&uv(!1);const l=a.point;if(c=l,u=s,!(Math.abs(u.x-c.x)>=5||Math.abs(u.y-c.y)>=5))return;var c,u;e.preventDefault();const d=a.actions.fluidLift(s);i({type:"DRAGGING",actions:d})}},{eventName:"mouseup",fn:e=>{const i=r();"DRAGGING"===i.type?(e.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"mousedown",fn:e=>{"DRAGGING"===r().type&&e.preventDefault(),t()}},{eventName:"keydown",fn:e=>{if("PENDING"!==r().type)return 27===e.keyCode?(e.preventDefault(),void t()):void E_(e);t()}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{"PENDING"===r().type&&t()}},{eventName:"webkitmouseforcedown",fn:e=>{const n=r();"IDLE"===n.type&&uv(!1),n.actions.shouldRespectForcePress()?t():e.preventDefault()}},{eventName:A_,fn:t}]}function M_(){}const $_={34:!0,33:!0,36:!0,35:!0};function P_(e,t){function n(){t(),e.cancel()}return[{eventName:"keydown",fn:r=>27===r.keyCode?(r.preventDefault(),void n()):32===r.keyCode?(r.preventDefault(),t(),void e.drop()):40===r.keyCode?(r.preventDefault(),void e.moveDown()):38===r.keyCode?(r.preventDefault(),void e.moveUp()):39===r.keyCode?(r.preventDefault(),void e.moveRight()):37===r.keyCode?(r.preventDefault(),void e.moveLeft()):void($_[r.keyCode]?r.preventDefault():E_(r))},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:A_,fn:n}]}const R_={type:"IDLE"};const j_=["input","button","textarea","select","option","optgroup","video","audio"];function N_(e,t){const n=t.target;return!!u_(n)&&function e(t,n){if(null==n)return!1;if(j_.includes(n.tagName.toLowerCase()))return!0;const r=n.getAttribute("contenteditable");return"true"===r||""===r||n!==t&&e(t,n.parentElement)}(e,n)}var D_=e=>Hb(e.getBoundingClientRect()).center;const I_=(()=>{if("undefined"==typeof document)return"matches";return["matches","msMatchesSelector","webkitMatchesSelector"].find(e=>e in Element.prototype)||"matches"})();function L_(e,t){return e.closest?e.closest(t):function e(t,n){return null==t?null:t[I_](n)?t:e(t.parentElement,n)}(e,t)}function B_(e,t){const n=t.target;if(!((r=n)instanceof c_(r).Element))return null;var r;const i=L_(n,function(e){return`[${KS.contextId}="${e}"]`}(e));return i&&u_(i)?i:null}function z_(e){e.preventDefault()}function F_(e){let{expected:t,phase:n,isLockActive:r,shouldWarn:i}=e;return!!r()&&t===n}function U_(e){let{lockAPI:t,store:n,registry:r,draggableId:i}=e;if(t.isClaimed())return!1;const o=r.draggable.findById(i);return!!o&&(!!o.options.isEnabled&&!!NS(n.getState(),i))}function Q_(e){let{lockAPI:t,contextId:n,store:r,registry:i,draggableId:o,forceSensorStop:s,sourceEvent:a}=e;if(!U_({lockAPI:t,store:r,registry:i,draggableId:o}))return null;const l=i.draggable.getById(o),c=function(e,t){const n=`[${e_.contextId}="${e}"]`,r=l_(document,n).find(e=>e.getAttribute(e_.id)===t);return r&&u_(r)?r:null}(n,l.descriptor.id);if(!c)return null;if(a&&!l.options.canDragInteractiveElements&&N_(c,a))return null;const u=t.claim(s||av);let d="PRE_DRAG";function h(){return l.options.shouldRespectForcePress}function p(){return t.isActive(u)}const f=function(e,t){F_({expected:e,phase:d,isLockActive:p,shouldWarn:!0})&&r.dispatch(t())}.bind(null,"DRAGGING");function m(e){function n(){t.release(),d="COMPLETED"}function i(t,i){if(void 0===i&&(i={shouldBlockNextClick:!1}),e.cleanup(),i.shouldBlockNextClick){const e=lv(window,[{eventName:"click",fn:z_,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(e)}n(),r.dispatch(tS({reason:t}))}return"PRE_DRAG"!==d&&(n(),uv(!1)),r.dispatch((e=>({type:"LIFT",payload:e}))(e.liftActionArgs)),d="DRAGGING",{isActive:()=>F_({expected:"DRAGGING",phase:d,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:h,drop:e=>i("DROP",e),cancel:e=>i("CANCEL",e),...e.actions}}return{isActive:()=>F_({expected:"PRE_DRAG",phase:d,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:h,fluidLift:function(e){const t=ov(e=>{f(()=>Xy({client:e}))});return{...m({liftActionArgs:{id:o,clientSelection:e,movementMode:"FLUID"},cleanup:()=>t.cancel(),actions:{move:t}}),move:t}},snapLift:function(){const e={moveUp:()=>f(Yy),moveRight:()=>f(Jy),moveDown:()=>f(Zy),moveLeft:()=>f(Ky)};return m({liftActionArgs:{id:o,clientSelection:D_(c),movementMode:"SNAP"},cleanup:av,actions:e})},abort:function(){F_({expected:"PRE_DRAG",phase:d,isLockActive:p,shouldWarn:!0})&&t.release()}}}const q_=[function(e){const t=Object(i.useRef)(T_),n=Object(i.useRef)(av),r=qb(()=>({eventName:"mousedown",fn:function(t){if(t.defaultPrevented)return;if(0!==t.button)return;if(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)return;const r=e.findClosestDraggableId(t);if(!r)return;const i=e.tryGetLock(r,a,{sourceEvent:t});if(!i)return;t.preventDefault();const o={x:t.clientX,y:t.clientY};n.current(),u(i,o)}}),[e]),o=qb(()=>({eventName:"webkitmouseforcewillbegin",fn:t=>{if(t.defaultPrevented)return;const n=e.findClosestDraggableId(t);if(!n)return;const r=e.findOptionsForDraggable(n);r&&(r.shouldRespectForcePress||e.canGetLock(n)&&t.preventDefault())}}),[e]),s=Gb((function(){n.current=lv(window,[o,r],{passive:!1,capture:!0})}),[o,r]),a=Gb(()=>{"IDLE"!==t.current.type&&(t.current=T_,n.current(),s())},[s]),l=Gb(()=>{const e=t.current;a(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[a]),c=Gb((function(){const e=C_({cancel:l,completed:a,getPhase:()=>t.current,setPhase:e=>{t.current=e}});n.current=lv(window,e,{capture:!0,passive:!1})}),[l,a]),u=Gb((function(e,n){"IDLE"!==t.current.type&&uv(!1),t.current={type:"PENDING",point:n,actions:e},c()}),[c]);i_((function(){return s(),function(){n.current()}}),[s])},function(e){const t=Object(i.useRef)(M_),n=qb(()=>({eventName:"keydown",fn:function(n){if(n.defaultPrevented)return;if(32!==n.keyCode)return;const i=e.findClosestDraggableId(n);if(!i)return;const o=e.tryGetLock(i,l,{sourceEvent:n});if(!o)return;n.preventDefault();let s=!0;const a=o.snapLift();function l(){s||uv(!1),s=!1,t.current(),r()}t.current(),t.current=lv(window,P_(a,l),{capture:!0,passive:!1})}}),[e]),r=Gb((function(){t.current=lv(window,[n],{passive:!1,capture:!0})}),[n]);i_((function(){return r(),function(){t.current()}}),[r])},function(e){const t=Object(i.useRef)(R_),n=Object(i.useRef)(av),r=Gb((function(){return t.current}),[]),o=Gb((function(e){t.current=e}),[]),s=qb(()=>({eventName:"touchstart",fn:function(t){if(t.defaultPrevented)return;const r=e.findClosestDraggableId(t);if(!r)return;const i=e.tryGetLock(r,l,{sourceEvent:t});if(!i)return;const o=t.touches[0],{clientX:s,clientY:a}=o,c={x:s,y:a};n.current(),h(i,c)}}),[e]),a=Gb((function(){n.current=lv(window,[s],{capture:!0,passive:!1})}),[s]),l=Gb(()=>{const e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),o(R_),n.current(),a())},[a,o]),c=Gb(()=>{const e=t.current;l(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[l]),u=Gb((function(){const e={capture:!0,passive:!1},t={cancel:c,completed:l,getPhase:r},i=lv(window,function(e){let{cancel:t,completed:n,getPhase:r}=e;return[{eventName:"touchmove",options:{capture:!1},fn:e=>{const n=r();if("DRAGGING"!==n.type)return void t();n.hasMoved=!0;const{clientX:i,clientY:o}=e.touches[0],s={x:i,y:o};e.preventDefault(),n.actions.move(s)}},{eventName:"touchend",fn:e=>{const i=r();"DRAGGING"===i.type?(e.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"touchcancel",fn:e=>{"DRAGGING"===r().type?(e.preventDefault(),t()):t()}},{eventName:"touchforcechange",fn:e=>{const n=r();"IDLE"===n.type&&uv(!1);const i=e.touches[0];if(!i)return;if(!(i.force>=.15))return;const o=n.actions.shouldRespectForcePress();if("PENDING"!==n.type)return o?n.hasMoved?void e.preventDefault():void t():void e.preventDefault();o&&t()}},{eventName:A_,fn:t}]}(t),e),o=lv(window,function(e){let{cancel:t,getPhase:n}=e;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:e=>{e.preventDefault()}},{eventName:"keydown",fn:e=>{"DRAGGING"===n().type?(27===e.keyCode&&e.preventDefault(),t()):t()}},{eventName:A_,fn:t}]}(t),e);n.current=function(){i(),o()}}),[c,r,l]),d=Gb((function(){const e=r();"PENDING"!==e.type&&uv(!1);const t=e.actions.fluidLift(e.point);o({type:"DRAGGING",actions:t,hasMoved:!1})}),[r,o]),h=Gb((function(e,t){"IDLE"!==r().type&&uv(!1);const n=setTimeout(d,120);o({type:"PENDING",point:t,actions:e,longPressTimerId:n}),u()}),[u,r,o,d]);i_((function(){return a(),function(){n.current();const e=r();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),o(R_))}}),[r,a,o]),i_((function(){return lv(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])}),[])}];function G_(e){let{contextId:t,store:n,registry:r,customSensors:o,enableDefaultSensors:s}=e;const a=[...s?q_:[],...o||[]],l=Object(i.useState)(()=>function(){let e=null;function t(){e||uv(!1),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&uv(!1);const n={abandon:t};return e=n,n},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}())[0],c=Gb((function(e,t){k_(e)&&!k_(t)&&l.tryAbandon()}),[l]);i_((function(){let e=n.getState();return n.subscribe(()=>{const t=n.getState();c(e,t),e=t})}),[l,n,c]),i_(()=>l.tryAbandon,[l.tryAbandon]);const u=Gb(e=>U_({lockAPI:l,registry:r,store:n,draggableId:e}),[l,r,n]),d=Gb((e,i,o)=>Q_({lockAPI:l,registry:r,contextId:t,store:n,draggableId:e,forceSensorStop:i||null,sourceEvent:o&&o.sourceEvent?o.sourceEvent:null}),[t,l,r,n]),h=Gb(e=>function(e,t){const n=B_(e,t);return n?n.getAttribute(KS.draggableId):null}(t,e),[t]),p=Gb(e=>{const t=r.draggable.findById(e);return t?t.options:null},[r.draggable]),f=Gb((function(){l.isClaimed()&&(l.tryAbandon(),"IDLE"!==n.getState().phase&&n.dispatch({type:"FLUSH",payload:null}))}),[l,n]),m=Gb(()=>l.isClaimed(),[l]),g=qb(()=>({canGetLock:u,tryGetLock:d,findClosestDraggableId:h,findOptionsForDraggable:p,tryReleaseLock:f,isLockClaimed:m}),[u,d,h,p,f,m]);S_();for(let e=0;e<a.length;e++)a[e](g)}function H_(e){return e.current||uv(!1),e.current}function V_(e){const{contextId:t,setCallbacks:n,sensors:r,nonce:s,dragHandleUsageInstructions:a}=e,l=Object(i.useRef)(null);x_();const c=w_(e),u=Gb(()=>(e=>({onBeforeCapture:t=>{const n=()=>{e.onBeforeCapture&&e.onBeforeCapture(t)};o.a.version.startsWith("16")||o.a.version.startsWith("17")?n():Object(Un.flushSync)(n)},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}))(c.current),[c]),d=Gb(()=>(e=>({...BS,...e.autoScrollerOptions,durationDampening:{...BS.durationDampening,...e.autoScrollerOptions}}))(c.current),[c]),h=function(e){const t=qb(()=>(e=>"rfd-announcement-"+e)(e),[e]),n=Object(i.useRef)(null);return Object(i.useEffect)((function(){const e=document.createElement("div");return n.current=e,e.id=t,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),Object(An.a)(e.style,m_),f_().appendChild(e),function(){setTimeout((function(){const t=f_();t.contains(e)&&t.removeChild(e),e===n.current&&(n.current=null)}))}}),[t]),Gb(e=>{const t=n.current;t&&(t.textContent=e)},[])}(t),p=function(e){let{contextId:t,text:n}=e;const r=v_("hidden-text",{separator:"-"}),o=qb(()=>function(e){let{contextId:t,uniqueId:n}=e;return`rfd-hidden-text-${t}-${n}`}({contextId:t,uniqueId:r}),[r,t]);return Object(i.useEffect)((function(){const e=document.createElement("div");return e.id=o,e.textContent=n,e.style.display="none",f_().appendChild(e),function(){const t=f_();t.contains(e)&&t.removeChild(e)}}),[o,n]),o}({contextId:t,text:a}),f=a_(t,s),m=Gb(e=>{H_(l).dispatch(e)},[]),g=qb(()=>Object(fb.b)({publishWhileDragging:qy,updateDroppableScroll:Hy,updateDroppableIsEnabled:Vy,updateDroppableIsCombineEnabled:Wy,collectionStarting:Gy},m),[m]),b=function(){const e=qb(h_,[]);return Object(i.useEffect)(()=>function(){o.a.version.startsWith("16")||o.a.version.startsWith("17")?requestAnimationFrame(e.clean):e.clean()},[e]),e}(),v=qb(()=>jS(b,g),[b,g]),y=qb(()=>JS({scrollWindow:DS,scrollDroppable:v.scrollDroppable,getAutoScrollerOptions:d,...Object(fb.b)({move:Xy},m)}),[v.scrollDroppable,m,d]),S=function(e){const t=Object(i.useRef)({}),n=Object(i.useRef)(null),r=Object(i.useRef)(null),o=Object(i.useRef)(!1),s=Gb((function(e,n){const r={id:e,focus:n};return t.current[e]=r,function(){const n=t.current;n[e]!==r&&delete n[e]}}),[]),a=Gb((function(t){const n=d_(e,t);n&&n!==document.activeElement&&n.focus()}),[e]),l=Gb((function(e,t){n.current===e&&(n.current=t)}),[]),c=Gb((function(){r.current||o.current&&(r.current=requestAnimationFrame(()=>{r.current=null;const e=n.current;e&&a(e)}))}),[a]),u=Gb((function(e){n.current=null;const t=document.activeElement;t&&t.getAttribute(KS.draggableId)===e&&(n.current=e)}),[]);return i_(()=>(o.current=!0,function(){o.current=!1;const e=r.current;e&&cancelAnimationFrame(e)}),[]),qb(()=>({register:s,tryRecordFocus:u,tryRestoreFocusRecorded:c,tryShiftRecord:l}),[s,u,c,l])}(t),_=qb(()=>TS({announce:h,autoScroller:y,dimensionMarshal:v,focusMarshal:S,getResponders:u,styleMarshal:f}),[h,y,v,S,u,f]);l.current=_;const x=Gb(()=>{const e=H_(l);"IDLE"!==e.getState().phase&&e.dispatch({type:"FLUSH",payload:null})},[]),w=Gb(()=>{const e=H_(l).getState();return"DROP_ANIMATING"===e.phase||"IDLE"!==e.phase&&e.isDragging},[]);n(qb(()=>({isDragging:w,tryAbort:x}),[w,x]));const k=Gb(e=>NS(H_(l).getState(),e),[]),O=Gb(()=>wy(H_(l).getState()),[]),E=qb(()=>({marshal:v,focus:S,contextId:t,canLift:k,isMovementAllowed:O,dragHandleUsageInstructionsId:p,registry:b}),[t,v,p,S,k,O,b]);return G_({contextId:t,store:_,registry:b,customSensors:r||null,enableDefaultSensors:!1!==e.enableDefaultSensors}),Object(i.useEffect)(()=>x,[x]),o.a.createElement(y_.Provider,{value:E},o.a.createElement(Fb,{context:p_,store:_},e.children))}let W_=0;var X_="useId"in o.a?function(){return o.a.useId()}:function(){return qb(()=>""+W_++,[])};function Y_(e){const t=X_(),n=e.dragHandleUsageInstructions||gv.dragHandleUsageInstructions;return o.a.createElement(dv,null,r=>o.a.createElement(V_,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,autoScrollerOptions:e.autoScrollerOptions},e.children))}const Z_=5e3,J_=4500,K_=(e,t)=>t?lS.drop(t.duration):e?lS.snap:lS.fluid,ex=(e,t)=>{if(e)return t?iS.drop:iS.combining};function tx(e){return"DRAGGING"===e.type?function(e){const t=e.dimension.client,{offset:n,combineWith:r,dropping:i}=e,o=Boolean(r),s=(e=>null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode)(e),a=Boolean(i),l=a?dS(n,o):uS(n);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:K_(s,i),transform:l,opacity:ex(o,a),zIndex:a?J_:Z_,pointerEvents:"none"}}(e):{transform:uS((t=e).offset),transition:t.shouldAnimateDisplacement?void 0:"none"};var t}function nx(e){const t=v_("draggable"),{descriptor:n,registry:r,getDraggableRef:o,canDragInteractiveElements:s,shouldRespectForcePress:a,isEnabled:l}=e,c=qb(()=>({canDragInteractiveElements:s,shouldRespectForcePress:a,isEnabled:l}),[s,l,a]),u=Gb(e=>{const t=o();return t||uv(!1),function(e,t,n){void 0===n&&(n=bv);const r=window.getComputedStyle(t),i=t.getBoundingClientRect(),o=ev(i,r),s=Kb(o,n);return{descriptor:e,placeholder:{client:o,tagName:t.tagName.toLowerCase(),display:r.display},displaceBy:{x:o.marginBox.width,y:o.marginBox.height},client:o,page:s}}(n,t,e)},[n,o]),d=qb(()=>({uniqueId:t,descriptor:n,options:c,getDimension:u}),[n,u,c,t]),h=Object(i.useRef)(d),p=Object(i.useRef)(!0);i_(()=>(r.draggable.register(h.current),()=>r.draggable.unregister(h.current)),[r.draggable]),i_(()=>{if(p.current)return void(p.current=!1);const e=h.current;h.current=d,r.draggable.update(d,e)},[d,r.draggable])}var rx=o.a.createContext(null);function ix(e){const t=Object(i.useContext)(e);return t||uv(!1),t}function ox(e){e.preventDefault()}var sx=e=>{const t=Object(i.useRef)(null),n=Gb((function(e){void 0===e&&(e=null),t.current=e}),[]),r=Gb(()=>t.current,[]),{contextId:s,dragHandleUsageInstructionsId:a,registry:l}=ix(y_),{type:c,droppableId:u}=ix(rx),d=qb(()=>({id:e.draggableId,index:e.index,type:c,droppableId:u}),[e.draggableId,e.index,c,u]),{children:h,draggableId:p,isEnabled:f,shouldRespectForcePress:m,canDragInteractiveElements:g,isClone:b,mapped:v,dropAnimationFinished:y}=e;if(__(),S_(),!b){nx(qb(()=>({descriptor:d,registry:l,getDraggableRef:r,canDragInteractiveElements:g,shouldRespectForcePress:m,isEnabled:f}),[d,l,r,g,m,f]))}const S=qb(()=>f?{tabIndex:0,role:"button","aria-describedby":a,"data-rfd-drag-handle-draggable-id":p,"data-rfd-drag-handle-context-id":s,draggable:!1,onDragStart:ox}:null,[s,a,p,f]),_=Gb(e=>{"DRAGGING"===v.type&&v.dropping&&"transform"===e.propertyName&&(o.a.version.startsWith("16")||o.a.version.startsWith("17")?y():Object(Un.flushSync)(y))},[y,v]),x=qb(()=>{const e=tx(v),t="DRAGGING"===v.type&&v.dropping?_:void 0;return{innerRef:n,draggableProps:{"data-rfd-draggable-context-id":s,"data-rfd-draggable-id":p,style:e,onTransitionEnd:t},dragHandleProps:S}},[s,S,p,v,_,n]),w=qb(()=>({draggableId:d.id,type:d.type,source:{index:d.index,droppableId:d.droppableId}}),[d.droppableId,d.id,d.index,d.type]);return o.a.createElement(o.a.Fragment,null,h(x,v.snapshot,w))},ax=(e,t)=>e===t,lx=e=>{const{combine:t,destination:n}=e;return n?n.droppableId:t?t.droppableId:null};function cx(e){return void 0===e&&(e=null),{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const ux={mapped:{type:"SECONDARY",offset:bv,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:cx(null)}};var dx=zb(()=>{const e=function(){const e=iv((e,t)=>({x:e,y:t})),t=iv((function(e,t,n,r,i){return void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=null),{isDragging:!0,isClone:t,isDropAnimating:Boolean(i),dropAnimation:i,mode:e,draggingOver:n,combineWith:r,combineTargetFor:null}})),n=iv((function(e,n,r,i,o,s,a){return void 0===o&&(o=null),void 0===s&&(s=null),void 0===a&&(a=null),{mapped:{type:"DRAGGING",dropping:null,draggingOver:o,combineWith:s,mode:n,offset:e,dimension:r,forceShouldAnimate:a,snapshot:t(n,i,o,s,null)}}}));return(r,i)=>{if(k_(r)){if(r.critical.draggable.id!==i.draggableId)return null;const t=r.current.client.offset,s=r.dimensions.draggables[i.draggableId],a=_y(r.impact),l=(o=r.impact).at&&"COMBINE"===o.at.type?o.at.combine.draggableId:null,c=r.forceShouldAnimate;return n(e(t.x,t.y),r.movementMode,s,i.isClone,a,l,c)}var o;if("DROP_ANIMATING"===r.phase){const e=r.completed;if(e.result.draggableId!==i.draggableId)return null;const n=i.isClone,o=r.dimensions.draggables[i.draggableId],s=e.result,a=s.mode,l=lx(s),c=(e=>e.combine?e.combine.draggableId:null)(s),u={duration:r.dropDuration,curve:rS,moveTo:r.newHomeClientOffset,opacity:c?iS.drop:null,scale:c?oS.drop:null};return{mapped:{type:"DRAGGING",offset:r.newHomeClientOffset,dimension:o,dropping:u,draggingOver:l,combineWith:c,mode:a,forceShouldAnimate:null,snapshot:t(a,n,l,c,u)}}}return null}}(),t=function(){const e=iv((e,t)=>({x:e,y:t})),t=iv(cx),n=iv((function(e,n,r){return void 0===n&&(n=null),{mapped:{type:"SECONDARY",offset:e,combineTargetFor:n,shouldAnimateDisplacement:r,snapshot:t(n)}}})),r=e=>e?n(bv,e,!0):null,i=(t,i,o,s)=>{const a=o.displaced.visible[t],l=Boolean(s.inVirtualList&&s.effected[t]),c=Iv(o),u=c&&c.draggableId===t?i:null;if(!a){if(!l)return r(u);if(o.displaced.invisible[t])return null;const i=_v(s.displacedBy.point),a=e(i.x,i.y);return n(a,u,!0)}if(l)return r(u);const d=o.displacedBy.point,h=e(d.x,d.y);return n(h,u,a.shouldAnimate)};return(e,t)=>{if(k_(e))return e.critical.draggable.id===t.draggableId?null:i(t.draggableId,e.critical.draggable.id,e.impact,e.afterCritical);if("DROP_ANIMATING"===e.phase){const n=e.completed;return n.result.draggableId===t.draggableId?null:i(t.draggableId,n.result.draggableId,n.impact,n.afterCritical)}return null}}();return(n,r)=>e(n,r)||t(n,r)||ux},{dropAnimationFinished:nS},null,{context:p_,areStatePropsEqual:ax})(sx);function hx(e){return ix(rx).isUsingCloneFor!==e.draggableId||e.isClone?o.a.createElement(dx,e):null}function px(e){const t="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,n=Boolean(e.disableInteractiveElementBlocking),r=Boolean(e.shouldRespectForcePress);return o.a.createElement(hx,Object(An.a)({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}const fx=e=>t=>e===t,mx=fx("scroll"),gx=fx("auto"),bx=(fx("visible"),(e,t)=>t(e.overflowX)||t(e.overflowY)),vx=e=>{const t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return bx(n,mx)||bx(n,gx)},yx=e=>null==e||e===document.body||e===document.documentElement?null:vx(e)?e:yx(e.parentElement);var Sx=yx,_x=e=>({x:e.scrollLeft,y:e.scrollTop});const xx=e=>{if(!e)return!1;return"fixed"===window.getComputedStyle(e).position||xx(e.parentElement)};var wx=e=>{let{ref:t,descriptor:n,env:r,windowScroll:i,direction:o,isDropDisabled:s,isCombineEnabled:a,shouldClipSubject:l}=e;const c=r.closestScrollable,u=((e,t)=>{const n=tv(e);if(!t)return n;if(e!==t)return n;const r=n.paddingBox.top-t.scrollTop,i=n.paddingBox.left-t.scrollLeft,o=r+t.scrollHeight,s=i+t.scrollWidth,a=Vb({top:r,right:s,bottom:o,left:i},n.border);return Yb({borderBox:a,margin:n.margin,border:n.border,padding:n.padding})})(t,c),d=Kb(u,i),h=(()=>{if(!c)return null;const e=tv(c),t={scrollHeight:c.scrollHeight,scrollWidth:c.scrollWidth};return{client:e,page:Kb(e,i),scroll:_x(c),scrollSize:t,shouldClipSubject:l}})();return(e=>{let{descriptor:t,isEnabled:n,isCombineEnabled:r,isFixedOnPage:i,direction:o,client:s,page:a,closest:l}=e;const c=(()=>{if(!l)return null;const{scrollSize:e,client:t}=l,n=CS({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:t.paddingBox.height,width:t.paddingBox.width});return{pageMarginBox:l.page.marginBox,frameClient:t,scrollSize:e,shouldClipSubject:l.shouldClipSubject,scroll:{initial:l.scroll,current:l.scroll,max:n,diff:{value:bv,displacement:bv}}}})(),u="vertical"===o?Hv:Vv;return{descriptor:t,isCombineEnabled:r,isFixedOnPage:i,axis:u,isEnabled:n,client:s,page:a,frame:c,subject:Cv({page:a,withPlaceholder:null,axis:u,frame:c})}})({descriptor:n,isEnabled:!s,isCombineEnabled:a,isFixedOnPage:r.isFixedOnPage,direction:o,client:u,page:d,closest:h})};const kx={passive:!1},Ox={passive:!0};var Ex=e=>e.shouldPublishImmediately?kx:Ox;const Ax=e=>e&&e.env.closestScrollable||null;function Tx(e){const t=Object(i.useRef)(null),n=ix(y_),r=v_("droppable"),{registry:o,marshal:s}=n,a=w_(e),l=qb(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),c=Object(i.useRef)(l),u=qb(()=>iv((e,n)=>{t.current||uv(!1);const r={x:e,y:n};s.updateDroppableScroll(l.id,r)}),[l.id,s]),d=Gb(()=>{const e=t.current;return e&&e.env.closestScrollable?_x(e.env.closestScrollable):bv},[]),h=Gb(()=>{const e=d();u(e.x,e.y)},[d,u]),p=qb(()=>ov(h),[h]),f=Gb(()=>{const e=t.current,n=Ax(e);e&&n||uv(!1);e.scrollOptions.shouldPublishImmediately?h():p()},[p,h]),m=Gb((e,r)=>{t.current&&uv(!1);const i=a.current,o=i.getDroppableRef();o||uv(!1);const s={closestScrollable:Sx(c=o),isFixedOnPage:xx(c)};var c;const u={ref:o,descriptor:l,env:s,scrollOptions:r};t.current=u;const d=wx({ref:o,descriptor:l,env:s,windowScroll:e,direction:i.direction,isDropDisabled:i.isDropDisabled,isCombineEnabled:i.isCombineEnabled,shouldClipSubject:!i.ignoreContainerClipping}),h=s.closestScrollable;return h&&(h.setAttribute(n_.contextId,n.contextId),h.addEventListener("scroll",f,Ex(u.scrollOptions))),d},[n.contextId,l,f,a]),g=Gb(()=>{const e=t.current,n=Ax(e);return e&&n||uv(!1),_x(n)},[]),b=Gb(()=>{const e=t.current;e||uv(!1);const n=Ax(e);t.current=null,n&&(p.cancel(),n.removeAttribute(n_.contextId),n.removeEventListener("scroll",f,Ex(e.scrollOptions)))},[f,p]),v=Gb(e=>{const n=t.current;n||uv(!1);const r=Ax(n);r||uv(!1),r.scrollTop+=e.y,r.scrollLeft+=e.x},[]),y=qb(()=>({getDimensionAndWatchScroll:m,getScrollWhileDragging:g,dragStopped:b,scroll:v}),[b,m,g,v]),S=qb(()=>({uniqueId:r,descriptor:l,callbacks:y}),[y,l,r]);i_(()=>(c.current=S.descriptor,o.droppable.register(S),()=>{t.current&&b(),o.droppable.unregister(S)}),[y,l,b,S,s,o.droppable]),i_(()=>{t.current&&s.updateDroppableIsEnabled(c.current.id,!e.isDropDisabled)},[e.isDropDisabled,s]),i_(()=>{t.current&&s.updateDroppableIsCombineEnabled(c.current.id,e.isCombineEnabled)},[e.isCombineEnabled,s])}function Cx(){}const Mx={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}},$x=e=>{let{isAnimatingOpenOnMount:t,placeholder:n,animate:r}=e;const i=(e=>{let{isAnimatingOpenOnMount:t,placeholder:n,animate:r}=e;return t||"close"===r?Mx:{height:n.client.borderBox.height,width:n.client.borderBox.width,margin:n.client.margin}})({isAnimatingOpenOnMount:t,placeholder:n,animate:r});return{display:n.display,boxSizing:"border-box",width:i.width,height:i.height,marginTop:i.margin.top,marginRight:i.margin.right,marginBottom:i.margin.bottom,marginLeft:i.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==r?lS.placeholder:null}};var Px=o.a.memo(e=>{const t=Object(i.useRef)(null),n=Gb(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:r,onTransitionEnd:s,onClose:a,contextId:l}=e,[c,u]=Object(i.useState)("open"===e.animate);Object(i.useEffect)(()=>c?"open"!==r?(n(),u(!1),Cx):t.current?Cx:(t.current=setTimeout(()=>{t.current=null,u(!1)}),n):Cx,[r,c,n]);const d=Gb(e=>{"height"===e.propertyName&&(s(),"close"===r&&a())},[r,a,s]),h=$x({isAnimatingOpenOnMount:c,animate:e.animate,placeholder:e.placeholder});return o.a.createElement(e.placeholder.tagName,{style:h,"data-rfd-placeholder-context-id":l,onTransitionEnd:d,ref:e.innerRef})});class Rx extends o.a.PureComponent{constructor(){super(...arguments),this.state={isVisible:Boolean(this.props.on),data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{"close"===this.state.animate&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)}}var jx=e=>{const t=Object(i.useContext)(y_);t||uv(!1);const{contextId:n,isMovementAllowed:r}=t,s=Object(i.useRef)(null),a=Object(i.useRef)(null),{children:l,droppableId:c,type:u,mode:d,direction:h,ignoreContainerClipping:p,isDropDisabled:f,isCombineEnabled:m,snapshot:g,useClone:b,updateViewportMaxScroll:v,getContainerForClone:y}=e,S=Gb(()=>s.current,[]),_=Gb((function(e){void 0===e&&(e=null),s.current=e}),[]),x=(Gb(()=>a.current,[]),Gb((function(e){void 0===e&&(e=null),a.current=e}),[]));__();const w=Gb(()=>{r()&&v({maxScroll:$S()})},[r,v]);Tx({droppableId:c,type:u,mode:d,direction:h,isDropDisabled:f,isCombineEnabled:m,ignoreContainerClipping:p,getDroppableRef:S});const k=qb(()=>o.a.createElement(Rx,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},e=>{let{onClose:t,data:r,animate:i}=e;return o.a.createElement(Px,{placeholder:r,onClose:t,innerRef:x,animate:i,contextId:n,onTransitionEnd:w})}),[n,w,e.placeholder,e.shouldAnimatePlaceholder,x]),O=qb(()=>({innerRef:_,placeholder:k,droppableProps:{"data-rfd-droppable-id":c,"data-rfd-droppable-context-id":n}}),[n,c,k,_]),E=b?b.dragging.draggableId:null,A=qb(()=>({droppableId:c,type:u,isUsingCloneFor:E}),[c,E,u]);return o.a.createElement(rx.Provider,{value:A},l(O,g),function(){if(!b)return null;const{dragging:e,render:t}=b,n=o.a.createElement(hx,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(n,r)=>t(n,r,e));return Qn.a.createPortal(n,y())}())};const Nx=(e,t)=>e===t.droppable.type,Dx=(e,t)=>t.draggables[e.draggable.id];const Ix={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||uv(!1),document.body}},Lx=zb(()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=iv(e=>({draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}})),r=iv((r,i,o,s,a,l)=>{const c=a.descriptor.id;if(a.descriptor.droppableId===r){const e=l?{render:l,dragging:n(a.descriptor)}:null,t={isDraggingOver:o,draggingOverWith:o?c:null,draggingFromThisWith:c,isUsingPlaceholder:!0};return{placeholder:a.placeholder,shouldAnimatePlaceholder:!1,snapshot:t,useClone:e}}if(!i)return t;if(!s)return e;const u={isDraggingOver:o,draggingOverWith:c,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:a.placeholder,shouldAnimatePlaceholder:!0,snapshot:u,useClone:null}});return(n,i)=>{const o=i.droppableId,s=i.type,a=!i.isDropDisabled,l=i.renderClone;if(k_(n)){const e=n.critical;if(!Nx(s,e))return t;const i=Dx(e,n.dimensions),c=_y(n.impact)===o;return r(o,a,c,c,i,l)}if("DROP_ANIMATING"===n.phase){const e=n.completed;if(!Nx(s,e.critical))return t;const i=Dx(e.critical,n.dimensions);return r(o,a,lx(e.result)===o,_y(e.impact)===o,i,l)}if("IDLE"===n.phase&&n.completed&&!n.shouldFlush){const r=n.completed;if(!Nx(s,r.critical))return t;const i=_y(r.impact)===o,a=Boolean(r.impact.at&&"COMBINE"===r.impact.at.type),l=r.critical.droppable.id===o;return i?a?e:t:l?e:t}return t}},{updateViewportMaxScroll:e=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e})},null,{context:p_,areStatePropsEqual:ax})(jx);Lx.defaultProps=Ix;var Bx=Lx;n(408);class zx{constructor(){}lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),Ux.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){let n=[];return this.decompose(e,t,n,0),Ux.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new Gx(this),i=new Gx(e);for(let e=t,o=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(o+=r.value.length,r.done||o>=n)return!0}}iter(e=1){return new Gx(this,e)}iterRange(e,t=this.length){return new Hx(this,e,t)}iterLines(e,t){let n;if(null==e)n=this.iter();else{null==t&&(t=this.lines+1);let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Vx(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}static of(e){if(0==e.length)throw new RangeError("A document must have at least one line");return 1!=e.length||e[0]?e.length<=32?new Fx(e):Ux.from(Fx.split(e,[])):zx.empty}}class Fx extends zx{constructor(e,t=function(e){let t=-1;for(let n of e)t+=n.length+1;return t}(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let i=0;;i++){let o=this.text[i],s=r+o.length;if((t?n:s)>=e)return new Wx(r,s,n,o);r=s+1,n++}}decompose(e,t,n,r){let i=e<=0&&t>=this.length?this:new Fx(qx(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(1&r){let e=n.pop(),t=Qx(i.text,e.text.slice(),0,i.length);if(t.length<=32)n.push(new Fx(t,e.length+i.length));else{let e=t.length>>1;n.push(new Fx(t.slice(0,e)),new Fx(t.slice(e)))}}else n.push(i)}replace(e,t,n){if(!(n instanceof Fx))return super.replace(e,t,n);let r=Qx(this.text,Qx(n.text,qx(this.text,0,e)),t),i=this.length+n.length-(t-e);return r.length<=32?new Fx(r,i):Ux.from(Fx.split(r,[]),i)}sliceString(e,t=this.length,n="\n"){let r="";for(let i=0,o=0;i<=t&&o<this.text.length;o++){let s=this.text[o],a=i+s.length;i>e&&o&&(r+=n),e<a&&t>i&&(r+=s.slice(Math.max(0,e-i),t-i)),i=a+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],r=-1;for(let i of e)n.push(i),r+=i.length+1,32==n.length&&(t.push(new Fx(n,r)),n=[],r=-1);return r>-1&&t.push(new Fx(n,r)),t}}class Ux extends zx{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,r){for(let i=0;;i++){let o=this.children[i],s=r+o.length,a=n+o.lines-1;if((t?a:s)>=e)return o.lineInner(e,t,n,r);r=s+1,n=a+1}}decompose(e,t,n,r){for(let i=0,o=0;o<=t&&i<this.children.length;i++){let s=this.children[i],a=o+s.length;if(e<=a&&t>=o){let i=r&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!i?n.push(s):s.decompose(e-o,t-o,n,i)}o=a+1}}replace(e,t,n){if(n.lines<this.lines)for(let r=0,i=0;r<this.children.length;r++){let o=this.children[r],s=i+o.length;if(e>=i&&t<=s){let a=o.replace(e-i,t-i,n),l=this.lines-o.lines+a.lines;if(a.lines<l>>4&&a.lines>l>>6){let i=this.children.slice();return i[r]=a,new Ux(i,this.length-(t-e)+n.length)}return super.replace(i,s,a)}i=s+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n="\n"){let r="";for(let i=0,o=0;i<this.children.length&&o<=t;i++){let s=this.children[i],a=o+s.length;o>e&&i&&(r+=n),e<a&&t>o&&(r+=s.sliceString(e-o,t-o,n)),o=a+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Ux))return 0;let n=0,[r,i,o,s]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,i+=t){if(r==o||i==s)return n;let a=this.children[r],l=e.children[i];if(a!=l)return n+a.scanIdentical(l,t);n+=a.length+1}}static from(e,t=e.reduce((e,t)=>e+t.length+1,-1)){let n=0;for(let t of e)n+=t.lines;if(n<32){let n=[];for(let t of e)t.flatten(n);return new Fx(n,t)}let r=Math.max(32,n>>5),i=r<<1,o=r>>1,s=[],a=0,l=-1,c=[];function u(e){let t;if(e.lines>i&&e instanceof Ux)for(let t of e.children)u(t);else e.lines>o&&(a>o||!a)?(d(),s.push(e)):e instanceof Fx&&a&&(t=c[c.length-1])instanceof Fx&&e.lines+t.lines<=32?(a+=e.lines,l+=e.length+1,c[c.length-1]=new Fx(t.text.concat(e.text),t.length+1+e.length)):(a+e.lines>r&&d(),a+=e.lines,l+=e.length+1,c.push(e))}function d(){0!=a&&(s.push(1==c.length?c[0]:Ux.from(c,l)),l=-1,a=c.length=0)}for(let t of e)u(t);return d(),1==s.length?s[0]:new Ux(s,t)}}function Qx(e,t,n=0,r=1e9){for(let i=0,o=0,s=!0;o<e.length&&i<=r;o++){let a=e[o],l=i+a.length;l>=n&&(l>r&&(a=a.slice(0,r-i)),i<n&&(a=a.slice(n-i)),s?(t[t.length-1]+=a,s=!1):t.push(a)),i=l+1}return t}function qx(e,t,n){return Qx(e,[""],t,n)}zx.empty=new Fx([""],0);class Gx{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof Fx?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],o=i>>1,s=r instanceof Fx?r.text.length:r.children.length;if(o==(t>0?s:0)){if(0==n)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&i)==(t>0?0:1)){if(this.offsets[n]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(r instanceof Fx){let i=r.text[o+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=0==e?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=r.children[o+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof Fx?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class Hx{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new Gx(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class Vx{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(zx.prototype[Symbol.iterator]=function(){return this.iter()},Gx.prototype[Symbol.iterator]=Hx.prototype[Symbol.iterator]=Vx.prototype[Symbol.iterator]=function(){return this});class Wx{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}}let Xx="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=1;e<Xx.length;e++)Xx[e]+=Xx[e-1];function Yx(e){for(let t=1;t<Xx.length;t+=2)if(Xx[t]>e)return Xx[t-1]<=e;return!1}function Zx(e){return e>=127462&&e<=127487}function Jx(e,t,n=!0,r=!0){return(n?Kx:ew)(e,t,r)}function Kx(e,t,n){if(t==e.length)return t;t&&tw(e.charCodeAt(t))&&nw(e.charCodeAt(t-1))&&t--;let r=rw(e,t);for(t+=ow(r);t<e.length;){let i=rw(e,t);if(8205==r||8205==i||n&&Yx(i))t+=ow(i),r=i;else{if(!Zx(i))break;{let n=0,r=t-2;for(;r>=0&&Zx(rw(e,r));)n++,r-=2;if(n%2==0)break;t+=2}}}return t}function ew(e,t,n){for(;t>0;){let r=Kx(e,t-2,n);if(r<t)return r;t--}return 0}function tw(e){return e>=56320&&e<57344}function nw(e){return e>=55296&&e<56320}function rw(e,t){let n=e.charCodeAt(t);if(!nw(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return tw(r)?r-56320+(n-55296<<10)+65536:n}function iw(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function ow(e){return e<65536?1:2}const sw=/\r\n?|\n/;var aw=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(aw||(aw={}));class lw{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,r=0;t<this.sections.length;){let i=this.sections[t++],o=this.sections[t++];o<0?(e(n,r,i),r+=i):r+=o,n+=i}}iterChangedRanges(e,t=!1){hw(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];r<0?e.push(n,r):e.push(r,n)}return new lw(e)}composeDesc(e){return this.empty?e:e.empty?this:fw(this,e)}mapDesc(e,t=!1){return e.empty?this:pw(this,e,t)}mapPos(e,t=-1,n=aw.Simple){let r=0,i=0;for(let o=0;o<this.sections.length;){let s=this.sections[o++],a=this.sections[o++],l=r+s;if(a<0){if(l>e)return i+(e-r);i+=s}else{if(n!=aw.Simple&&l>=e&&(n==aw.TrackDel&&r<e&&l>e||n==aw.TrackBefore&&r<e||n==aw.TrackAfter&&l>e))return null;if(l>e||l==e&&t<0&&!s)return e==r||t<0?i:i+a;i+=a}r=l}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,t=e){for(let n=0,r=0;n<this.sections.length&&r<=t;){let i=r+this.sections[n++];if(this.sections[n++]>=0&&r<=t&&i>=e)return!(r<e&&i>t)||"cover";r=i}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];e+=(e?" ":"")+n+(r>=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(e=>"number"!=typeof e))throw new RangeError("Invalid JSON representation of ChangeDesc");return new lw(e)}static create(e){return new lw(e)}}class cw extends lw{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return hw(this,(t,n,r,i,o)=>e=e.replace(r,r+(n-t),o),!1),e}mapDesc(e,t=!1){return pw(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let r=0,i=0;r<t.length;r+=2){let o=t[r],s=t[r+1];if(s>=0){t[r]=s,t[r+1]=o;let a=r>>1;for(;n.length<a;)n.push(zx.empty);n.push(o?e.slice(i,i+o):zx.empty)}i+=o}return new cw(t,n)}compose(e){return this.empty?e:e.empty?this:fw(this,e,!0)}map(e,t=!1){return e.empty?this:pw(this,e,t,!0)}iterChanges(e,t=!1){hw(this,e,t)}get desc(){return lw.create(this.sections)}filter(e){let t=[],n=[],r=[],i=new mw(this);e:for(let o=0,s=0;;){let a=o==e.length?1e9:e[o++];for(;s<a||s==a&&0==i.len;){if(i.done)break e;let e=Math.min(i.len,a-s);uw(r,e,-1);let o=-1==i.ins?-1:0==i.off?i.ins:0;uw(t,e,o),o>0&&dw(n,t,i.text),i.forward(e),s+=e}let l=e[o++];for(;s<l;){if(i.done)break e;let e=Math.min(i.len,l-s);uw(t,e,-1),uw(r,e,-1==i.ins?-1:0==i.off?i.ins:0),i.forward(e),s+=e}}return{changes:new cw(t,n),filtered:lw.create(r)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],r=this.sections[t+1];r<0?e.push(n):0==r?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,n){let r=[],i=[],o=0,s=null;function a(e=!1){if(!e&&!r.length)return;o<t&&uw(r,t-o,-1);let n=new cw(r,i);s=s?s.compose(n.map(s)):n,r=[],i=[],o=0}return function e(l){if(Array.isArray(l))for(let t of l)e(t);else if(l instanceof cw){if(l.length!=t)throw new RangeError(`Mismatched change set length (got ${l.length}, expected ${t})`);a(),s=s?s.compose(l.map(s)):l}else{let{from:e,to:s=e,insert:c}=l;if(e>s||e<0||s>t)throw new RangeError(`Invalid change range ${e} to ${s} (in doc of length ${t})`);let u=c?"string"==typeof c?zx.of(c.split(n||sw)):c:zx.empty,d=u.length;if(e==s&&0==d)return;e<o&&a(),e>o&&uw(r,e-o,-1),uw(r,s-e,d),dw(i,r,u),o=s}}(e),a(!s),s}static empty(e){return new cw(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let r=0;r<e.length;r++){let i=e[r];if("number"==typeof i)t.push(i,-1);else{if(!Array.isArray(i)||"number"!=typeof i[0]||i.some((e,t)=>t&&"string"!=typeof e))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==i.length)t.push(i[0],0);else{for(;n.length<r;)n.push(zx.empty);n[r]=zx.of(i.slice(1)),t.push(i[0],n[r].length)}}}return new cw(t,n)}static createSet(e,t){return new cw(e,t)}}function uw(e,t,n,r=!1){if(0==t&&n<=0)return;let i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:0==t&&0==e[i]?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function dw(e,t,n){if(0==n.length)return;let r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(zx.empty);e.push(n)}}function hw(e,t,n){let r=e.inserted;for(let i=0,o=0,s=0;s<e.sections.length;){let a=e.sections[s++],l=e.sections[s++];if(l<0)i+=a,o+=a;else{let c=i,u=o,d=zx.empty;for(;c+=a,u+=l,l&&r&&(d=d.append(r[s-2>>1])),!(n||s==e.sections.length||e.sections[s+1]<0);)a=e.sections[s++],l=e.sections[s++];t(i,c,o,u,d),i=c,o=u}}}function pw(e,t,n,r=!1){let i=[],o=r?[]:null,s=new mw(e),a=new mw(t);for(let e=-1;;)if(-1==s.ins&&-1==a.ins){let e=Math.min(s.len,a.len);uw(i,e,-1),s.forward(e),a.forward(e)}else if(a.ins>=0&&(s.ins<0||e==s.i||0==s.off&&(a.len<s.len||a.len==s.len&&!n))){let t=a.len;for(uw(i,a.ins,-1);t;){let n=Math.min(s.len,t);s.ins>=0&&e<s.i&&s.len<=n&&(uw(i,0,s.ins),o&&dw(o,i,s.text),e=s.i),s.forward(n),t-=n}a.next()}else{if(!(s.ins>=0)){if(s.done&&a.done)return o?cw.createSet(i,o):lw.create(i);throw new Error("Mismatched change set lengths")}{let t=0,n=s.len;for(;n;)if(-1==a.ins){let e=Math.min(n,a.len);t+=e,n-=e,a.forward(e)}else{if(!(0==a.ins&&a.len<n))break;n-=a.len,a.next()}uw(i,t,e<s.i?s.ins:0),o&&e<s.i&&dw(o,i,s.text),e=s.i,s.forward(s.len-n)}}}function fw(e,t,n=!1){let r=[],i=n?[]:null,o=new mw(e),s=new mw(t);for(let e=!1;;){if(o.done&&s.done)return i?cw.createSet(r,i):lw.create(r);if(0==o.ins)uw(r,o.len,0,e),o.next();else if(0!=s.len||s.done){if(o.done||s.done)throw new Error("Mismatched change set lengths");{let t=Math.min(o.len2,s.len),n=r.length;if(-1==o.ins){let n=-1==s.ins?-1:s.off?0:s.ins;uw(r,t,n,e),i&&n&&dw(i,r,s.text)}else-1==s.ins?(uw(r,o.off?0:o.len,t,e),i&&dw(i,r,o.textBit(t))):(uw(r,o.off?0:o.len,s.off?0:s.ins,e),i&&!s.off&&dw(i,r,s.text));e=(o.ins>t||s.ins>=0&&s.len>t)&&(e||r.length>n),o.forward2(t),s.forward(t)}}else uw(r,0,s.ins,e),i&&dw(i,r,s.text),s.next()}}class mw{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return-2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?zx.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?zx.empty:t[n].slice(this.off,null==e?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){-1==this.ins?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class gw{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return 16&this.flags?this.to:this.from}get head(){return 16&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 4&this.flags?-1:8&this.flags?1:0}get bidiLevel(){let e=3&this.flags;return 3==e?null:e}get goalColumn(){let e=this.flags>>5;return 33554431==e?void 0:e}map(e,t=-1){let n,r;return this.empty?n=r=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),n==this.from&&r==this.to?this:new gw(n,r,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return bw.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return bw.range(this.anchor,n)}eq(e){return this.anchor==e.anchor&&this.head==e.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||"number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid JSON representation for SelectionRange");return bw.range(e.anchor,e.head)}static create(e,t,n){return new gw(e,t,n)}}class bw{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:bw.create(this.ranges.map(n=>n.map(e,t)),this.mainIndex)}eq(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let t=0;t<this.ranges.length;t++)if(!this.ranges[t].eq(e.ranges[t]))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new bw([this.main],0)}addRange(e,t=!0){return bw.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let n=this.ranges.slice();return n[t]=e,bw.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||"number"!=typeof e.main||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new bw(e.ranges.map(e=>gw.fromJSON(e)),e.main)}static single(e,t=e){return new bw([bw.range(e,t)],0)}static create(e,t=0){if(0==e.length)throw new RangeError("A selection needs at least one range");for(let n=0,r=0;r<e.length;r++){let i=e[r];if(i.empty?i.from<=n:i.from<n)return bw.normalized(e.slice(),t);n=i.to}return new bw(e,t)}static cursor(e,t=0,n,r){return gw.create(e,e,(0==t?0:t<0?4:8)|(null==n?3:Math.min(2,n))|(null!=r?r:33554431)<<5)}static range(e,t,n,r){let i=(null!=n?n:33554431)<<5|(null==r?3:Math.min(2,r));return t<e?gw.create(t,e,24|i):gw.create(e,t,(t>e?4:0)|i)}static normalized(e,t=0){let n=e[t];e.sort((e,t)=>e.from-t.from),t=e.indexOf(n);for(let n=1;n<e.length;n++){let r=e[n],i=e[n-1];if(r.empty?r.from<=i.to:r.from<i.to){let o=i.from,s=Math.max(r.to,i.to);n<=t&&t--,e.splice(--n,2,r.anchor>r.head?bw.range(s,o):bw.range(o,s))}}return new bw(e,t)}}function vw(e,t){for(let n of e.ranges)if(n.to>t)throw new RangeError("Selection points outside of document")}let yw=0;class Sw{constructor(e,t,n,r,i){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=yw++,this.default=e([]),this.extensions="function"==typeof i?i(this):i}static define(e={}){return new Sw(e.combine||(e=>e),e.compareInput||((e,t)=>e===t),e.compare||(e.combine?(e,t)=>e===t:_w),!!e.static,e.enables)}of(e){return new xw([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new xw(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new xw(e,this,2,t)}from(e,t){return t||(t=e=>e),this.compute([e],n=>t(n.field(e)))}}function _w(e,t){return e==t||e.length==t.length&&e.every((e,n)=>e===t[n])}class xw{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=yw++}dynamicSlot(e){var t;let n=this.value,r=this.facet.compareInput,i=this.id,o=e[i]>>1,s=2==this.type,a=!1,l=!1,c=[];for(let n of this.dependencies)"doc"==n?a=!0:"selection"==n?l=!0:0==(1&(null!==(t=e[n.id])&&void 0!==t?t:1))&&c.push(e[n.id]);return{create:e=>(e.values[o]=n(e),1),update(e,t){if(a&&t.docChanged||l&&(t.docChanged||t.selection)||kw(e,c)){let t=n(e);if(s?!ww(t,e.values[o],r):!r(t,e.values[o]))return e.values[o]=t,1}return 0},reconfigure:(e,t)=>{let a,l=t.config.address[i];if(null!=l){let i=Bw(t,l);if(this.dependencies.every(n=>n instanceof Sw?t.facet(n)===e.facet(n):!(n instanceof Aw)||t.field(n,!1)==e.field(n,!1))||(s?ww(a=n(e),i,r):r(a=n(e),i)))return e.values[o]=i,0}else a=n(e);return e.values[o]=a,1}}}}function ww(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function kw(e,t){let n=!1;for(let r of t)1&Lw(e,r)&&(n=!0);return n}function Ow(e,t,n){let r=n.map(t=>e[t.id]),i=n.map(e=>e.type),o=r.filter(e=>!(1&e)),s=e[t.id]>>1;function a(e){let n=[];for(let t=0;t<r.length;t++){let o=Bw(e,r[t]);if(2==i[t])for(let e of o)n.push(e);else n.push(o)}return t.combine(n)}return{create(e){for(let t of r)Lw(e,t);return e.values[s]=a(e),1},update(e,n){if(!kw(e,o))return 0;let r=a(e);return t.compare(r,e.values[s])?0:(e.values[s]=r,1)},reconfigure(e,i){let o=kw(e,r),l=i.config.facets[t.id],c=i.facet(t);if(l&&!o&&_w(n,l))return e.values[s]=c,0;let u=a(e);return t.compare(u,c)?(e.values[s]=c,0):(e.values[s]=u,1)}}}const Ew=Sw.define({static:!0});class Aw{constructor(e,t,n,r,i){this.id=e,this.createF=t,this.updateF=n,this.compareF=r,this.spec=i,this.provides=void 0}static define(e){let t=new Aw(yw++,e.create,e.update,e.compare||((e,t)=>e===t),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Ew).find(e=>e.field==this);return((null==t?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let r=e.values[t],i=this.updateF(r,n);return this.compareF(r,i)?0:(e.values[t]=i,1)},reconfigure:(e,n)=>null!=n.config.address[this.id]?(e.values[t]=n.field(this),0):(e.values[t]=this.create(e),1)}}init(e){return[this,Ew.of({field:this,create:e})]}get extension(){return this}}const Tw=4,Cw=3,Mw=2,$w=1;function Pw(e){return t=>new jw(t,e)}const Rw={highest:Pw(0),high:Pw($w),default:Pw(Mw),low:Pw(Cw),lowest:Pw(Tw)};class jw{constructor(e,t){this.inner=e,this.prec=t}}class Nw{of(e){return new Dw(this,e)}reconfigure(e){return Nw.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Dw{constructor(e,t){this.compartment=e,this.inner=t}}class Iw{constructor(e,t,n,r,i,o){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=i,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return null==t?e.default:this.staticValues[t>>1]}static resolve(e,t,n){let r=[],i=Object.create(null),o=new Map;for(let n of function(e,t,n){let r=[[],[],[],[],[]],i=new Map;function o(e,s){let a=i.get(e);if(null!=a){if(a<=s)return;let t=r[a].indexOf(e);t>-1&&r[a].splice(t,1),e instanceof Dw&&n.delete(e.compartment)}if(i.set(e,s),Array.isArray(e))for(let t of e)o(t,s);else if(e instanceof Dw){if(n.has(e.compartment))throw new RangeError("Duplicate use of compartment in extensions");let r=t.get(e.compartment)||e.inner;n.set(e.compartment,r),o(r,s)}else if(e instanceof jw)o(e.inner,e.prec);else if(e instanceof Aw)r[s].push(e),e.provides&&o(e.provides,s);else if(e instanceof xw)r[s].push(e),e.facet.extensions&&o(e.facet.extensions,Mw);else{let t=e.extension;if(!t)throw new Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(t,s)}}return o(e,Mw),r.reduce((e,t)=>e.concat(t))}(e,t,o))n instanceof Aw?r.push(n):(i[n.facet.id]||(i[n.facet.id]=[])).push(n);let s=Object.create(null),a=[],l=[];for(let e of r)s[e.id]=l.length<<1,l.push(t=>e.slot(t));let c=null==n?void 0:n.config.facets;for(let e in i){let t=i[e],r=t[0].facet,o=c&&c[e]||[];if(t.every(e=>0==e.type))if(s[r.id]=a.length<<1|1,_w(o,t))a.push(n.facet(r));else{let e=r.combine(t.map(e=>e.value));a.push(n&&r.compare(e,n.facet(r))?n.facet(r):e)}else{for(let e of t)0==e.type?(s[e.id]=a.length<<1|1,a.push(e.value)):(s[e.id]=l.length<<1,l.push(t=>e.dynamicSlot(t)));s[r.id]=l.length<<1,l.push(e=>Ow(e,r,t))}}let u=l.map(e=>e(s));return new Iw(e,o,u,s,a,i)}}function Lw(e,t){if(1&t)return 2;let n=t>>1,r=e.status[n];if(4==r)throw new Error("Cyclic dependency between fields and/or facets");if(2&r)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function Bw(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}const zw=Sw.define(),Fw=Sw.define({combine:e=>e.some(e=>e),static:!0}),Uw=Sw.define({combine:e=>e.length?e[0]:void 0,static:!0}),Qw=Sw.define(),qw=Sw.define(),Gw=Sw.define(),Hw=Sw.define({combine:e=>!!e.length&&e[0]});class Vw{constructor(e,t){this.type=e,this.value=t}static define(){return new Ww}}class Ww{of(e){return new Vw(this,e)}}class Xw{constructor(e){this.map=e}of(e){return new Yw(this,e)}}class Yw{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return void 0===t?void 0:t==this.value?this:new Yw(this.type,t)}is(e){return this.type==e}static define(e={}){return new Xw(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}}Yw.reconfigure=Yw.define(),Yw.appendConfig=Yw.define();class Zw{constructor(e,t,n,r,i,o){this.startState=e,this.changes=t,this.selection=n,this.effects=r,this.annotations=i,this.scrollIntoView=o,this._doc=null,this._state=null,n&&vw(n,t.newLength),i.some(e=>e.type==Zw.time)||(this.annotations=i.concat(Zw.time.of(Date.now())))}static create(e,t,n,r,i,o){return new Zw(e,t,n,r,i,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(Zw.userEvent);return!(!t||!(t==e||t.length>e.length&&t.slice(0,e.length)==e&&"."==t[e.length]))}}function Jw(e,t){let n=[];for(let r=0,i=0;;){let o,s;if(r<e.length&&(i==t.length||t[i]>=e[r]))o=e[r++],s=e[r++];else{if(!(i<t.length))return n;o=t[i++],s=t[i++]}!n.length||n[n.length-1]<o?n.push(o,s):n[n.length-1]<s&&(n[n.length-1]=s)}}function Kw(e,t,n){var r;let i,o,s;return n?(i=t.changes,o=cw.empty(t.changes.length),s=e.changes.compose(t.changes)):(i=t.changes.map(e.changes),o=e.changes.mapDesc(t.changes,!0),s=e.changes.compose(i)),{changes:s,selection:t.selection?t.selection.map(o):null===(r=e.selection)||void 0===r?void 0:r.map(i),effects:Yw.mapEffects(e.effects,i).concat(Yw.mapEffects(t.effects,o)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function ek(e,t,n){let r=t.selection,i=rk(t.annotations);return t.userEvent&&(i=i.concat(Zw.userEvent.of(t.userEvent))),{changes:t.changes instanceof cw?t.changes:cw.of(t.changes||[],n,e.facet(Uw)),selection:r&&(r instanceof bw?r:bw.single(r.anchor,r.head)),effects:rk(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}function tk(e,t,n){let r=ek(e,t.length?t[0]:{},e.doc.length);t.length&&!1===t[0].filter&&(n=!1);for(let i=1;i<t.length;i++){!1===t[i].filter&&(n=!1);let o=!!t[i].sequential;r=Kw(r,ek(e,t[i],o?r.changes.newLength:e.doc.length),o)}let i=Zw.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return function(e){let t=e.startState,n=t.facet(Gw),r=e;for(let i=n.length-1;i>=0;i--){let o=n[i](e);o&&Object.keys(o).length&&(r=Kw(r,ek(t,o,e.changes.newLength),!0))}return r==e?e:Zw.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}(n?function(e){let t=e.startState,n=!0;for(let r of t.facet(Qw)){let t=r(e);if(!1===t){n=!1;break}Array.isArray(t)&&(n=!0===n?t:Jw(n,t))}if(!0!==n){let r,i;if(!1===n)i=e.changes.invertedDesc,r=cw.empty(t.doc.length);else{let t=e.changes.filter(n);r=t.changes,i=t.filtered.mapDesc(t.changes).invertedDesc}e=Zw.create(t,r,e.selection&&e.selection.map(i),Yw.mapEffects(e.effects,i),e.annotations,e.scrollIntoView)}let r=t.facet(qw);for(let n=r.length-1;n>=0;n--){let i=r[n](e);e=i instanceof Zw?i:Array.isArray(i)&&1==i.length&&i[0]instanceof Zw?i[0]:tk(t,rk(i),!1)}return e}(i):i)}Zw.time=Vw.define(),Zw.userEvent=Vw.define(),Zw.addToHistory=Vw.define(),Zw.remote=Vw.define();const nk=[];function rk(e){return null==e?nk:Array.isArray(e)?e:[e]}var ik=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}(ik||(ik={}));const ok=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let sk;try{sk=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(e){}function ak(e){return t=>{if(!/\S/.test(t))return ik.Space;if(function(e){if(sk)return sk.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>""&&(n.toUpperCase()!=n.toLowerCase()||ok.test(n)))return!0}return!1}(t))return ik.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return ik.Word;return ik.Other}}class lk{constructor(e,t,n,r,i,o){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=i,o&&(o._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)Lw(this,e<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(null!=n)return Lw(this,n),Bw(this,n);if(t)throw new RangeError("Field is not present in this state")}update(...e){return tk(this,e,!0)}applyTransaction(e){let t,n=this.config,{base:r,compartments:i}=n;for(let t of e.effects)t.is(Nw.reconfigure)?(n&&(i=new Map,n.compartments.forEach((e,t)=>i.set(t,e)),n=null),i.set(t.value.compartment,t.value.extension)):t.is(Yw.reconfigure)?(n=null,r=t.value):t.is(Yw.appendConfig)&&(n=null,r=rk(r).concat(t.value));if(n)t=e.startState.values.slice();else{n=Iw.resolve(r,i,this),t=new lk(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values}new lk(n,e.newDoc,e.newSelection,t,(t,n)=>n.update(t,e),e)}replaceSelection(e){return"string"==typeof e&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:bw.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),i=[n.range],o=rk(n.effects);for(let n=1;n<t.ranges.length;n++){let s=e(t.ranges[n]),a=this.changes(s.changes),l=a.map(r);for(let e=0;e<n;e++)i[e]=i[e].map(l);let c=r.mapDesc(a,!0);i.push(s.range.map(c)),r=r.compose(l),o=Yw.mapEffects(o,l).concat(Yw.mapEffects(rk(s.effects),c))}return{changes:r,selection:bw.create(i,t.mainIndex),effects:o}}changes(e=[]){return e instanceof cw?e:cw.of(e,this.doc.length,this.facet(lk.lineSeparator))}toText(e){return zx.of(e.split(this.facet(lk.lineSeparator)||sw))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return null==t?e.default:(Lw(this,t),Bw(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let r=e[n];r instanceof Aw&&null!=this.config.address[r.id]&&(t[n]=r.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(e,t={},n){if(!e||"string"!=typeof e.doc)throw new RangeError("Invalid JSON representation for EditorState");let r=[];if(n)for(let t in n)if(Object.prototype.hasOwnProperty.call(e,t)){let i=n[t],o=e[t];r.push(i.init(e=>i.spec.fromJSON(o,e)))}return lk.create({doc:e.doc,selection:bw.fromJSON(e.selection),extensions:t.extensions?r.concat([t.extensions]):r})}static create(e={}){let t=Iw.resolve(e.extensions||[],new Map),n=e.doc instanceof zx?e.doc:zx.of((e.doc||"").split(t.staticFacet(lk.lineSeparator)||sw)),r=e.selection?e.selection instanceof bw?e.selection:bw.single(e.selection.anchor,e.selection.head):bw.single(0);return vw(r,n.length),t.staticFacet(Fw)||(r=r.asSingle()),new lk(t,n,r,t.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(lk.tabSize)}get lineBreak(){return this.facet(lk.lineSeparator)||"\n"}get readOnly(){return this.facet(Hw)}phrase(e,...t){for(let t of this.facet(lk.phrases))if(Object.prototype.hasOwnProperty.call(t,e)){e=t[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(e,n)=>{if("$"==n)return"$";let r=+(n||1);return!r||r>t.length?e:t[r-1]})),e}languageDataAt(e,t,n=-1){let r=[];for(let i of this.facet(zw))for(let o of i(this,t,n))Object.prototype.hasOwnProperty.call(o,e)&&r.push(o[e]);return r}charCategorizer(e){return ak(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),i=this.charCategorizer(e),o=e-n,s=e-n;for(;o>0;){let e=Jx(t,o,!1);if(i(t.slice(e,o))!=ik.Word)break;o=e}for(;s<r;){let e=Jx(t,s);if(i(t.slice(s,e))!=ik.Word)break;s=e}return o==s?null:bw.range(o+n,s+n)}}function ck(e,t,n={}){let r={};for(let t of e)for(let e of Object.keys(t)){let i=t[e],o=r[e];if(void 0===o)r[e]=i;else if(o===i||void 0===i);else{if(!Object.hasOwnProperty.call(n,e))throw new Error("Config merge conflict for field "+e);r[e]=n[e](o,i)}}for(let e in t)void 0===r[e]&&(r[e]=t[e]);return r}lk.allowMultipleSelections=Fw,lk.tabSize=Sw.define({combine:e=>e.length?e[0]:4}),lk.lineSeparator=Uw,lk.readOnly=Hw,lk.phrases=Sw.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every(n=>e[n]==t[n])}}),lk.languageData=zw,lk.changeFilter=Qw,lk.transactionFilter=qw,lk.transactionExtender=Gw,Nw.reconfigure=Yw.define();class uk{eq(e){return this==e}range(e,t=e){return dk.create(e,t,this)}}uk.prototype.startSide=uk.prototype.endSide=0,uk.prototype.point=!1,uk.prototype.mapMode=aw.TrackDel;class dk{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new dk(e,t,n)}}function hk(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class pk{constructor(e,t,n,r){this.from=e,this.to=t,this.value=n,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,r=0){let i=n?this.to:this.from;for(let o=r,s=i.length;;){if(o==s)return o;let r=o+s>>1,a=i[r]-e||(n?this.value[r].endSide:this.value[r].startSide)-t;if(r==o)return a>=0?o:s;a>=0?s=r:o=r+1}}between(e,t,n,r){for(let i=this.findIndex(t,-1e9,!0),o=this.findIndex(n,1e9,!1,i);i<o;i++)if(!1===r(this.from[i]+e,this.to[i]+e,this.value[i]))return!1}map(e,t){let n=[],r=[],i=[],o=-1,s=-1;for(let a=0;a<this.value.length;a++){let l,c,u=this.value[a],d=this.from[a]+e,h=this.to[a]+e;if(d==h){let e=t.mapPos(d,u.startSide,u.mapMode);if(null==e)continue;if(l=c=e,u.startSide!=u.endSide&&(c=t.mapPos(d,u.endSide),c<l))continue}else if(l=t.mapPos(d,u.startSide),c=t.mapPos(h,u.endSide),l>c||l==c&&u.startSide>0&&u.endSide<=0)continue;(c-l||u.endSide-u.startSide)<0||(o<0&&(o=l),u.point&&(s=Math.max(s,c-l)),n.push(u),r.push(l-o),i.push(c-o))}return{mapped:n.length?new pk(r,i,n,s):null,pos:o}}}class fk{constructor(e,t,n,r){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=r}static create(e,t,n,r){return new fk(e,t,n,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:r=0,filterTo:i=this.length}=e,o=e.filter;if(0==t.length&&!o)return this;if(n&&(t=t.slice().sort(hk)),this.isEmpty)return t.length?fk.of(t):this;let s=new bk(this,null,-1).goto(0),a=0,l=[],c=new mk;for(;s.value||a<t.length;)if(a<t.length&&(s.from-t[a].from||s.startSide-t[a].value.startSide)>=0){let e=t[a++];c.addInner(e.from,e.to,e.value)||l.push(e)}else 1==s.rangeIndex&&s.chunkIndex<this.chunk.length&&(a==t.length||this.chunkEnd(s.chunkIndex)<t[a].from)&&(!o||r>this.chunkEnd(s.chunkIndex)||i<this.chunkPos[s.chunkIndex])&&c.addChunk(this.chunkPos[s.chunkIndex],this.chunk[s.chunkIndex])?s.nextChunk():((!o||r>s.to||i<s.from||o(s.from,s.to,s.value))&&(c.addInner(s.from,s.to,s.value)||l.push(dk.create(s.from,s.to,s.value))),s.next());return c.finishInner(this.nextLayer.isEmpty&&!l.length?fk.empty:this.nextLayer.update({add:l,filter:o,filterFrom:r,filterTo:i}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],n=[],r=-1;for(let i=0;i<this.chunk.length;i++){let o=this.chunkPos[i],s=this.chunk[i],a=e.touchesRange(o,o+s.length);if(!1===a)r=Math.max(r,s.maxPoint),t.push(s),n.push(e.mapPos(o));else if(!0===a){let{mapped:i,pos:a}=s.map(o,e);i&&(r=Math.max(r,i.maxPoint),t.push(i),n.push(a))}}let i=this.nextLayer.map(e);return 0==t.length?i:new fk(n,t,i||fk.empty,r)}between(e,t,n){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let i=this.chunkPos[r],o=this.chunk[r];if(t>=i&&e<=i+o.length&&!1===o.between(i,e-i,t-i,n))return}this.nextLayer.between(e,t,n)}}iter(e=0){return vk.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return vk.from(e).goto(t)}static compare(e,t,n,r,i=-1){let o=e.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),s=t.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),a=gk(o,s,n),l=new Sk(o,a,i),c=new Sk(s,a,i);n.iterGaps((e,t,n)=>_k(l,e,c,t,n,r)),n.empty&&0==n.length&&_k(l,0,c,0,0,r)}static eq(e,t,n=0,r){null==r&&(r=999999999);let i=e.filter(e=>!e.isEmpty&&t.indexOf(e)<0),o=t.filter(t=>!t.isEmpty&&e.indexOf(t)<0);if(i.length!=o.length)return!1;if(!i.length)return!0;let s=gk(i,o),a=new Sk(i,s,0).goto(n),l=new Sk(o,s,0).goto(n);for(;;){if(a.to!=l.to||!xk(a.active,l.active)||a.point&&(!l.point||!a.point.eq(l.point)))return!1;if(a.to>r)return!0;a.next(),l.next()}}static spans(e,t,n,r,i=-1){let o=new Sk(e,null,i).goto(t),s=t,a=o.openStart;for(;;){let e=Math.min(o.to,n);if(o.point){let n=o.activeForPoint(o.to),i=o.pointFrom<t?n.length+1:Math.min(n.length,a);r.point(s,e,o.point,n,i,o.pointRank),a=Math.min(o.openEnd(e),n.length)}else e>s&&(r.span(s,e,o.active,a),a=o.openEnd(e));if(o.to>n)return a+(o.point&&o.to>n?1:0);s=o.to,o.next()}}static of(e,t=!1){let n=new mk;for(let r of e instanceof dk?[e]:t?function(e){if(e.length>1)for(let t=e[0],n=1;n<e.length;n++){let r=e[n];if(hk(t,r)>0)return e.slice().sort(hk);t=r}return e}(e):e)n.add(r.from,r.to,r.value);return n.finish()}}fk.empty=new fk([],[],null,-1),fk.empty.nextLayer=fk.empty;class mk{constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}finishChunk(e){this.chunks.push(new pk(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}add(e,t,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new mk)).add(e,t,n)}addInner(e,t,n){let r=e-this.lastTo||n.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(fk.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;let t=fk.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function gk(e,t,n){let r=new Map;for(let t of e)for(let e=0;e<t.chunk.length;e++)t.chunk[e].maxPoint<=0&&r.set(t.chunk[e],t.chunkPos[e]);let i=new Set;for(let e of t)for(let t=0;t<e.chunk.length;t++){let o=r.get(e.chunk[t]);null==o||(n?n.mapPos(o):o)!=e.chunkPos[t]||(null==n?void 0:n.touchesRange(o,o+e.chunk[t].length))||i.add(e.chunk[t])}return i}class bk{constructor(e,t,n,r=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let t=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(t)||this.layer.chunkEnd(this.chunkIndex)<e||t.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class vk{constructor(e){this.heap=e}static from(e,t=null,n=-1){let r=[];for(let i=0;i<e.length;i++)for(let o=e[i];!o.isEmpty;o=o.nextLayer)o.maxPoint>=n&&r.push(new bk(o,t,n,i));return 1==r.length?r[0]:new vk(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)yk(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)yk(this.heap,e);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),yk(this.heap,0)}}}function yk(e,t){for(let n=e[t];;){let r=1+(t<<1);if(r>=e.length)break;let i=e[r];if(r+1<e.length&&i.compare(e[r+1])>=0&&(i=e[r+1],r++),n.compare(i)<0)break;e[r]=n,e[t]=i,t=r}}class Sk{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=vk.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){wk(this.active,e),wk(this.activeTo,e),wk(this.activeRank,e),this.minActive=Ok(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:i}=this.cursor;for(;t<this.activeRank.length&&this.activeRank[t]<=i;)t++;kk(this.active,t,n),kk(this.activeTo,t,r),kk(this.activeRank,t,i),e&&kk(e,t,this.cursor.from),this.minActive=Ok(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&wk(n,r)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let e=this.cursor.value;if(e.point){if(!(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)){this.point=e,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=e.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(n),this.cursor.next()}}}if(n){this.openStart=0;for(let t=n.length-1;t>=0&&n[t]<e;t--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}function _k(e,t,n,r,i,o){e.goto(t),n.goto(r);let s=r+i,a=r,l=r-t;for(;;){let t=e.to+l-n.to||e.endSide-n.endSide,r=t<0?e.to+l:n.to,i=Math.min(r,s);if(e.point||n.point?e.point&&n.point&&(e.point==n.point||e.point.eq(n.point))&&xk(e.activeForPoint(e.to+l),n.activeForPoint(n.to))||o.comparePoint(a,i,e.point,n.point):i>a&&!xk(e.active,n.active)&&o.compareRange(a,i,e.active,n.active),r>s)break;a=r,t<=0&&e.next(),t>=0&&n.next()}}function xk(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n]&&!e[n].eq(t[n]))return!1;return!0}function wk(e,t){for(let n=t,r=e.length-1;n<r;n++)e[n]=e[n+1];e.pop()}function kk(e,t,n){for(let n=e.length-1;n>=t;n--)e[n+1]=e[n];e[t]=n}function Ok(e,t){let n=-1,r=1e9;for(let i=0;i<t.length;i++)(t[i]-r||e[i].endSide-e[n].endSide)<0&&(n=i,r=t[i]);return n}function Ek(e,t,n=e.length){let r=0;for(let i=0;i<n;)9==e.charCodeAt(i)?(r+=t-r%t,i++):(r++,i=Jx(e,i));return r}function Ak(e,t,n,r){for(let r=0,i=0;;){if(i>=t)return r;if(r==e.length)break;i+=9==e.charCodeAt(r)?n-i%n:1,r=Jx(e,r)}return!0===r?-1:e.length}const Tk="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),Ck="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Mk="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class $k{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function i(e,t,o,s){let a=[],l=/^@(\w+)\b/.exec(e[0]),c=l&&"keyframes"==l[1];if(l&&null==t)return o.push(e[0]+";");for(let n in t){let s=t[n];if(/&/.test(n))i(n.split(/,\s*/).map(t=>e.map(e=>t.replace(/&/,e))).reduce((e,t)=>e.concat(t)),s,o);else if(s&&"object"==typeof s){if(!l)throw new RangeError("The value of a property ("+n+") should be a primitive value.");i(r(n),s,a,c)}else null!=s&&a.push(n.replace(/_.*/,"").replace(/[A-Z]/g,e=>"-"+e.toLowerCase())+": "+s+";")}(a.length||c)&&o.push((!n||l||s?e:e.map(n)).join(", ")+" {"+a.join(" ")+"}")}for(let t in e)i(r(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=Mk[Tk]||1;return Mk[Tk]=e+1,"ͼ"+e.toString(36)}static mount(e,t){(e[Ck]||new Rk(e)).mount(Array.isArray(t)?t:[t])}}let Pk=new Map;class Rk{constructor(e){let t=e.ownerDocument||e,n=t.defaultView;if(!e.head&&e.adoptedStyleSheets&&n.CSSStyleSheet){let r=Pk.get(t);if(r)return e.adoptedStyleSheets=[r.sheet,...e.adoptedStyleSheets],e[Ck]=r;this.sheet=new n.CSSStyleSheet,e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets],Pk.set(t,this)}else{this.styleTag=t.createElement("style");let n=e.head||e;n.insertBefore(this.styleTag,n.firstChild)}this.modules=[],e[Ck]=this}mount(e){let t=this.sheet,n=0,r=0;for(let i=0;i<e.length;i++){let o=e[i],s=this.modules.indexOf(o);if(s<r&&s>-1&&(this.modules.splice(s,1),r--,s=-1),-1==s){if(this.modules.splice(r++,0,o),t)for(let e=0;e<o.rules.length;e++)t.insertRule(o.rules[e],n++)}else{for(;r<s;)n+=this.modules[r++].rules.length;n+=o.rules.length,r++}}if(!t){let e="";for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+"\n";this.styleTag.textContent=e}}}for(var jk={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Nk={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Dk="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),Ik=("undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)),Lk="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Bk=Ik||Dk&&+Dk[1]<57,zk=0;zk<10;zk++)jk[48+zk]=jk[96+zk]=String(zk);for(zk=1;zk<=24;zk++)jk[zk+111]="F"+zk;for(zk=65;zk<=90;zk++)jk[zk]=String.fromCharCode(zk+32),Nk[zk]=String.fromCharCode(zk);for(var Fk in jk)Nk.hasOwnProperty(Fk)||(Nk[Fk]=jk[Fk]);function Uk(e){var t=!(Bk&&(e.ctrlKey||e.altKey||e.metaKey)||Lk&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?Nk:jk)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}function Qk(e){let t;return t=11==e.nodeType?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function qk(e,t){return!!t&&(e==t||e.contains(1!=t.nodeType?t.parentNode:t))}function Gk(e,t){if(!t.anchorNode)return!1;try{return qk(e,t.anchorNode)}catch(e){return!1}}function Hk(e){return 3==e.nodeType?rO(e,0,e.nodeValue.length).getClientRects():1==e.nodeType?e.getClientRects():[]}function Vk(e,t,n,r){return!!n&&(Xk(e,t,n,r,-1)||Xk(e,t,n,r,1))}function Wk(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function Xk(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:Yk(e))){if("DIV"==e.nodeName)return!1;let n=e.parentNode;if(!n||1!=n.nodeType)return!1;t=Wk(e)+(i<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if(1==(e=e.childNodes[t+(i<0?-1:0)]).nodeType&&"false"==e.contentEditable)return!1;t=i<0?Yk(e):0}}}function Yk(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Zk(e,t){let n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function Jk(e){return{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}class Kk{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){this.set(e.anchorNode,e.anchorOffset,e.focusNode,e.focusOffset)}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}}let eO,tO=null;function nO(e){if(e.setActive)return e.setActive();if(tO)return e.focus(tO);let t=[];for(let n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(null==tO?{get preventScroll(){return tO={preventScroll:!0},!0}}:void 0),!tO){tO=!1;for(let e=0;e<t.length;){let n=t[e++],r=t[e++],i=t[e++];n.scrollTop!=r&&(n.scrollTop=r),n.scrollLeft!=i&&(n.scrollLeft=i)}}}function rO(e,t,n=t){let r=eO||(eO=document.createRange());return r.setEnd(e,n),r.setStart(e,t),r}function iO(e,t,n){let r={key:t,code:t,keyCode:n,which:n,cancelable:!0},i=new KeyboardEvent("keydown",r);i.synthetic=!0,e.dispatchEvent(i);let o=new KeyboardEvent("keyup",r);return o.synthetic=!0,e.dispatchEvent(o),i.defaultPrevented||o.defaultPrevented}function oO(e){for(;e.attributes.length;)e.removeAttributeNode(e.attributes[0])}class sO{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(e,t){return new sO(e.parentNode,Wk(e),t)}static after(e,t){return new sO(e.parentNode,Wk(e)+1,t)}}const aO=[];class lO{constructor(){this.parent=null,this.dom=null,this.dirty=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let n of this.children){if(n==e)return t;t+=n.length+n.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,t){if(2&this.dirty){let n,r=this.dom,i=null;for(let o of this.children){if(o.dirty){if(!o.dom&&(n=i?i.nextSibling:r.firstChild)){let e=lO.get(n);(!e||!e.parent&&e.canReuseDOM(o))&&o.reuseDOM(n)}o.sync(e,t),o.dirty=0}if(n=i?i.nextSibling:r.firstChild,t&&!t.written&&t.node==r&&n!=o.dom&&(t.written=!0),o.dom.parentNode==r)for(;n&&n!=o.dom;)n=cO(n);else r.insertBefore(o.dom,n);i=o.dom}for(n=i?i.nextSibling:r.firstChild,n&&t&&t.node==r&&(t.written=!0);n;)n=cO(n)}else if(1&this.dirty)for(let n of this.children)n.dirty&&(n.sync(e,t),n.dirty=0)}reuseDOM(e){}localPosFromDOM(e,t){let n;if(e==this.dom)n=this.dom.childNodes[t];else{let r=0==Yk(e)?0:0==t?-1:1;for(;;){let t=e.parentNode;if(t==this.dom)break;0==r&&t.firstChild!=t.lastChild&&(r=e==t.firstChild?-1:1),e=t}n=r<0?e:e.nextSibling}if(n==this.dom.firstChild)return 0;for(;n&&!lO.get(n);)n=n.nextSibling;if(!n)return this.length;for(let e=0,t=0;;e++){let r=this.children[e];if(r.dom==n)return t;t+=r.length+r.breakAfter}}domBoundsAround(e,t,n=0){let r=-1,i=-1,o=-1,s=-1;for(let a=0,l=n,c=n;a<this.children.length;a++){let n=this.children[a],u=l+n.length;if(l<e&&u>t)return n.domBoundsAround(e,t,l);if(u>=e&&-1==r&&(r=a,i=l),l>t&&n.dom.parentNode==this.dom){o=a,s=c;break}c=u,l=u+n.breakAfter}return{from:i,to:s<0?n+this.length:s,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o<this.children.length&&o>=0?this.children[o].dom:null}}markDirty(e=!1){this.dirty|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.dirty|=2),1&t.dirty)return;t.dirty|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.dirty&&this.markParentsDirty(!0))}setDOM(e){this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,n=aO){this.markDirty();for(let n=e;n<t;n++){let e=this.children[n];e.parent==this&&e.destroy()}this.children.splice(e,t-e,...n);for(let e=0;e<n.length;e++)n[e].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new uO(this.children,e,this.children.length)}childPos(e,t=1){return this.childCursor().findPos(e,t)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==e?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,t,n,r,i,o){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor}getSide(){return 0}destroy(){this.parent=null}}function cO(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}lO.prototype.breakAfter=0;class uO{constructor(e,t,n){this.children=e,this.pos=t,this.i=n,this.off=0}findPos(e,t=1){for(;;){if(e>this.pos||e==this.pos&&(t>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function dO(e,t,n,r,i,o,s,a,l){let{children:c}=e,u=c.length?c[t]:null,d=o.length?o[o.length-1]:null,h=d?d.breakAfter:s;if(!(t==r&&u&&!s&&!h&&o.length<2&&u.merge(n,i,o.length?d:null,0==n,a,l))){if(r<c.length){let e=c[r];e&&i<e.length?(t==r&&(e=e.split(i),i=0),!h&&d&&e.merge(0,i,d,!0,0,l)?o[o.length-1]=e:(i&&e.merge(0,i,null,!1,0,l),o.push(e))):(null==e?void 0:e.breakAfter)&&(d?d.breakAfter=1:s=1),r++}for(u&&(u.breakAfter=s,n>0&&(!s&&o.length&&u.merge(n,u.length,o[0],!1,a,0)?u.breakAfter=o.shift().breakAfter:(n<u.length||u.children.length&&0==u.children[u.children.length-1].length)&&u.merge(n,u.length,null,!1,a,0),t++));t<r&&o.length;)if(c[r-1].become(o[o.length-1]))r--,o.pop(),l=o.length?0:a;else{if(!c[t].become(o[0]))break;t++,o.shift(),a=o.length?0:l}!o.length&&t&&r<c.length&&!c[t-1].breakAfter&&c[r].merge(0,0,c[t-1],!1,a,l)&&t--,(t<r||o.length)&&e.replaceChildren(t,r,o)}}function hO(e,t,n,r,i,o){let s=e.childCursor(),{i:a,off:l}=s.findPos(n,1),{i:c,off:u}=s.findPos(t,-1),d=t-n;for(let e of r)d+=e.length;e.length+=d,dO(e,c,u,a,l,r,0,i,o)}let pO="undefined"!=typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},fO="undefined"!=typeof document?document:{documentElement:{style:{}}};const mO=/Edge\/(\d+)/.exec(pO.userAgent),gO=/MSIE \d/.test(pO.userAgent),bO=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(pO.userAgent),vO=!!(gO||bO||mO),yO=!vO&&/gecko\/(\d+)/i.test(pO.userAgent),SO=!vO&&/Chrome\/(\d+)/.exec(pO.userAgent),_O="webkitFontSmoothing"in fO.documentElement.style,xO=!vO&&/Apple Computer/.test(pO.vendor),wO=xO&&(/Mobile\/\w+/.test(pO.userAgent)||pO.maxTouchPoints>2);var kO={mac:wO||/Mac/.test(pO.platform),windows:/Win/.test(pO.platform),linux:/Linux|X11/.test(pO.platform),ie:vO,ie_version:gO?fO.documentMode||6:bO?+bO[1]:mO?+mO[1]:0,gecko:yO,gecko_version:yO?+(/Firefox\/(\d+)/.exec(pO.userAgent)||[0,0])[1]:0,chrome:!!SO,chrome_version:SO?+SO[1]:0,ios:wO,android:/Android\b/.test(pO.userAgent),webkit:_O,safari:xO,webkit_version:_O?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=fO.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class OO extends lO{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){3==e.nodeType&&this.createDOM(e)}merge(e,t,n){return(!n||n instanceof OO&&!(this.length-(t-e)+n.length>256))&&(this.text=this.text.slice(0,e)+(n?n.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new OO(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new sO(this.dom,e)}domBoundsAround(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return AO(this.dom,e,t)}}class EO extends lO{constructor(e,t=[],n=0){super(),this.mark=e,this.children=t,this.length=n;for(let e of t)e.setParent(this)}setAttrs(e){if(oO(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.dirty|=6)}sync(e,t){this.dom?4&this.dirty&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,n,r,i,o){return(!n||!(!(n instanceof EO&&n.mark.eq(this.mark))||e&&i<=0||t<this.length&&o<=0))&&(hO(this,e,t,n?n.children:[],i-1,o-1),this.markDirty(),!0)}split(e){let t=[],n=0,r=-1,i=0;for(let o of this.children){let s=n+o.length;s>e&&t.push(n<e?o.split(e-n):o),r<0&&n>=e&&(r=i),n=s,i++}let o=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new EO(this.mark,t,o)}domAtPos(e){return jO(this,e)}coordsAt(e,t){return NO(this,e,t)}}function AO(e,t,n){let r=e.nodeValue.length;t>r&&(t=r);let i=t,o=t,s=0;0==t&&n<0||t==r&&n>=0?kO.chrome||kO.gecko||(t?(i--,s=1):o<r&&(o++,s=-1)):n<0?i--:o<r&&o++;let a=rO(e,i,o).getClientRects();if(!a.length)return null;let l=a[(s?s<0:n>=0)?0:a.length-1];return kO.safari&&!s&&0==l.width&&(l=Array.prototype.find.call(a,e=>e.width)||l),s?Zk(l,s<0):l||null}class TO extends lO{constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}static create(e,t,n){return new(e.customView||TO)(e,t,n)}split(e){let t=TO.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}getSide(){return this.side}merge(e,t,n,r,i,o){return!(n&&(!(n instanceof TO&&this.widget.compare(n.widget))||e>0&&i<=0||t<this.length&&o<=0))&&(this.length=e+(n?n.length:0)+(this.length-t),!0)}become(e){return e instanceof TO&&e.side==this.side&&this.widget.constructor==e.widget.constructor&&(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0)}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(0==this.length)return zx.empty;let e=this;for(;e.parent;)e=e.parent;let{view:t}=e,n=t&&t.state.doc,r=this.posAtStart;return n?n.slice(r,r+this.length):zx.empty}domAtPos(e){return(this.length?0==e:this.side>0)?sO.before(this.dom):sO.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);if(n)return n;let r=this.dom.getClientRects(),i=null;if(!r.length)return null;for(let t=e>0?r.length-1:0;i=r[t],!(e>0?0==t:t==r.length-1||i.top<i.bottom);t+=e>0?-1:1);return this.length?i:Zk(i,this.side>0)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class CO extends TO{domAtPos(e){let{topView:t,text:n}=this.widget;return t?MO(e,0,t,n,this.length-t.length,(e,t)=>e.domAtPos(t),(e,t)=>new sO(e,Math.min(t,e.nodeValue.length))):new sO(n,Math.min(e,n.nodeValue.length))}sync(){this.setDOM(this.widget.toDOM())}localPosFromDOM(e,t){let{topView:n,text:r}=this.widget;return n?function e(t,n,r,i,o){if(r instanceof EO){let s=0;for(let a=r.dom.firstChild;a;a=a.nextSibling){let r=lO.get(a);if(r){let l=qk(a,i);if(qk(a,t))return s+(l?e(t,n,r,i,o):r.localPosFromDOM(t,n));s+=r.length+(l?o:0)}else{let e=PO(t,n,a);if(null!=e.result)return s+e.result;s+=e.size}}}else if(r.dom==i)return Math.min(n,i.nodeValue.length);return r.localPosFromDOM(t,n)}(e,t,n,r,this.length-n.length):Math.min(t,this.length)}ignoreMutation(){return!1}get overrideDOMText(){return null}coordsAt(e,t){let{topView:n,text:r}=this.widget;return n?MO(e,t,n,r,this.length-n.length,(e,t,n)=>e.coordsAt(t,n),(e,t,n)=>AO(e,t,n)):AO(r,e,t)}destroy(){var e;super.destroy(),null===(e=this.widget.topView)||void 0===e||e.destroy()}get isEditable(){return!0}canReuseDOM(){return!0}}function MO(e,t,n,r,i,o,s){if(n instanceof EO){for(let a=n.dom.firstChild;a;a=a.nextSibling){let n=lO.get(a);if(n){let l=qk(a,r),c=n.length+(l?i:0);if(e<c||e==c&&n.getSide()<=0)return l?MO(e,t,n,r,i,o,s):o(n,e,t);e-=c}else{let n=$O(e,t,a,s);if("number"!=typeof n)return n;e=n}}return o(n,n.length,-1)}return n.dom==r?s(r,e,t):o(n,e,t)}function $O(e,t,n,r){if(3==n.nodeType){let i=n.nodeValue.length;if(e<=i)return r(n,e,t);e-=i}else if(1==n.nodeType&&"false"!=n.contentEditable)for(let i=n.firstChild;i;i=i.nextSibling){let n=$O(e,t,i,r);if("number"!=typeof n)return n;e=n}return e}function PO(e,t,n){if(3==n.nodeType)return e==n?{result:t}:{size:n.nodeValue.length};if(1!=n.nodeType||"false"==n.contentEditable)return n.contains(e)?{result:0}:{size:0};{let r=0;for(let i=n.firstChild,o=0;;i=i.nextSibling,o++){if(e==n&&o==t)return{result:r};if(!i)return{size:r};let s=PO(e,t,i);if(null!=s.result)return{result:t+s.result};r+=s.size}}}class RO extends lO{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof RO&&e.side==this.side}split(){return new RO(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?sO.before(this.dom):sO.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return zx.empty}get isHidden(){return!0}}function jO(e,t){let n=e.dom,{children:r}=e,i=0;for(let e=0;i<r.length;i++){let o=r[i],s=e+o.length;if(!(s==e&&o.getSide()<=0)){if(t>e&&t<s&&o.dom.parentNode==n)return o.domAtPos(t-e);if(t<=e)break;e=s}}for(let e=i;e>0;e--){let t=r[e-1];if(t.dom.parentNode==n)return t.domAtPos(t.length)}for(let e=i;e<r.length;e++){let t=r[e];if(t.dom.parentNode==n)return t.domAtPos(0)}return new sO(n,0)}function NO(e,t,n){let r=null,i=-1,o=null,s=-1;!function e(t,a){for(let l=0,c=0;l<t.children.length&&c<=a;l++){let u=t.children[l],d=c+u.length;d>=a&&(u.children.length?e(u,a-c):(!o||o.isHidden&&n>0)&&(d>a||c==d&&u.getSide()>0)?(o=u,s=a-c):(c<a||c==d&&u.getSide()<0&&!u.isHidden)&&(r=u,i=a-c)),c=d}}(e,t);let a=(n<0?r:o)||r||o;return a?a.coordsAt(Math.max(0,a==r?i:s),n):function(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=Hk(t);return n[n.length-1]||null}(e)}function DO(e,t){for(let n in e)"class"==n&&t.class?t.class+=" "+e.class:"style"==n&&t.style?t.style+=";"+e.style:t[n]=e[n];return t}function IO(e,t){if(e==t)return!0;if(!e||!t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!=r.length)return!1;for(let i of n)if(-1==r.indexOf(i)||e[i]!==t[i])return!1;return!0}function LO(e,t,n){let r=null;if(t)for(let i in t)n&&i in n||e.removeAttribute(r=i);if(n)for(let i in n)t&&t[i]==n[i]||e.setAttribute(r=i,n[i]);return!!r}OO.prototype.children=TO.prototype.children=RO.prototype.children=aO;class BO{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get customView(){return null}get isHidden(){return!1}destroy(e){}}var zO=function(e){return e[e.Text=0]="Text",e[e.WidgetBefore=1]="WidgetBefore",e[e.WidgetAfter=2]="WidgetAfter",e[e.WidgetRange=3]="WidgetRange",e}(zO||(zO={}));class FO extends uk{constructor(e,t,n,r){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(e){return new UO(e)}static widget(e){let t=e.side||0,n=!!e.block;return t+=n?t>0?3e8:-4e8:t>0?1e8:-1e8,new qO(e,t,t,n,e.widget||null,!1)}static replace(e){let t,n,r=!!e.block;if(e.isBlockGap)t=-5e8,n=4e8;else{let{start:i,end:o}=GO(e,r);t=(i?r?-3e8:-1:5e8)-1,n=1+(o?r?2e8:1:-6e8)}return new qO(e,t,n,r,e.widget||null,!0)}static line(e){return new QO(e)}static set(e,t=!1){return fk.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}FO.none=fk.empty;class UO extends FO{constructor(e){let{start:t,end:n}=GO(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){return this==e||e instanceof UO&&this.tagName==e.tagName&&this.class==e.class&&IO(this.attrs,e.attrs)}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}UO.prototype.point=!1;class QO extends FO{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof QO&&this.spec.class==e.spec.class&&IO(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}QO.prototype.mapMode=aw.TrackBefore,QO.prototype.point=!0;class qO extends FO{constructor(e,t,n,r,i,o){super(t,n,i,e),this.block=r,this.isReplace=o,this.mapMode=r?t<=0?aw.TrackBefore:aw.TrackAfter:aw.TrackDel}get type(){return this.startSide<this.endSide?zO.WidgetRange:this.startSide<=0?zO.WidgetBefore:zO.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&this.widget.estimatedHeight>=5}eq(e){return e instanceof qO&&(t=this.widget,n=e.widget,t==n||!!(t&&n&&t.compare(n)))&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide;var t,n}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}function GO(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return null==n&&(n=e.inclusive),null==r&&(r=e.inclusive),{start:null!=n?n:t,end:null!=r?r:t}}function HO(e,t,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}qO.prototype.point=!0;class VO extends lO{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,n,r,i,o){if(n){if(!(n instanceof VO))return!1;this.dom||n.transferDOM(this)}return r&&this.setDeco(n?n.attrs:null),hO(this,e,t,n?n.children:[],i,o),!0}split(e){let t=new VO;if(t.breakAfter=this.breakAfter,0==this.length)return t;let{i:n,off:r}=this.childPos(e);r&&(t.append(this.children[n].split(r),0),this.children[n].merge(r,this.children[n].length,null,!1,0,0),n++);for(let e=n;e<this.children.length;e++)t.append(this.children[e],0);for(;n>0&&0==this.children[n-1].length;)this.children[--n].destroy();return this.children.length=n,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){IO(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){!function e(t,n,r){let i,{children:o}=t;r>0&&n instanceof EO&&o.length&&(i=o[o.length-1])instanceof EO&&i.mark.eq(n.mark)?e(i,n.children[0],r-1):(o.push(n),n.setParent(t)),t.length+=n.length}(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=DO(t,this.attrs||{})),n&&(this.attrs=DO({class:n},this.attrs||{}))}domAtPos(e){return jO(this,e)}reuseDOM(e){"DIV"==e.nodeName&&(this.setDOM(e),this.dirty|=6)}sync(e,t){var n;this.dom?4&this.dirty&&(oO(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(LO(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let r=this.dom.lastChild;for(;r&&lO.get(r)instanceof EO;)r=r.lastChild;if(!(r&&this.length&&("BR"==r.nodeName||0!=(null===(n=lO.get(r))||void 0===n?void 0:n.isEditable)||kO.ios&&this.children.some(e=>e instanceof OO)))){let e=document.createElement("BR");e.cmIgnore=!0,this.dom.appendChild(e)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let e,t=0;for(let n of this.children){if(!(n instanceof OO)||/[^ -~]/.test(n.text))return null;let r=Hk(n.dom);if(1!=r.length)return null;t+=r[0].width,e=r[0].height}return t?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length,textHeight:e}:null}coordsAt(e,t){let n=NO(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:e}=this.parent.view.viewState,t=n.bottom-n.top;if(Math.abs(t-e.lineHeight)<2&&e.textHeight<t){let r=(t-e.textHeight)/2;return{top:n.top+r,bottom:n.bottom-r,left:n.left,right:n.left}}}return n}become(e){return!1}get type(){return zO.Text}static find(e,t){for(let n=0,r=0;n<e.children.length;n++){let i=e.children[n],o=r+i.length;if(o>=t){if(i instanceof VO)return i;if(o>t)break}r=o+i.breakAfter}return null}}class WO extends lO{constructor(e,t,n){super(),this.widget=e,this.length=t,this.type=n,this.breakAfter=0,this.prevWidget=null}merge(e,t,n,r,i,o){return!(n&&(!(n instanceof WO&&this.widget.compare(n.widget))||e>0&&i<=0||t<this.length&&o<=0))&&(this.length=e+(n?n.length:0)+(this.length-t),!0)}domAtPos(e){return 0==e?sO.before(this.dom):sO.after(this.dom,e==this.length)}split(e){let t=this.length-e;this.length=e;let n=new WO(this.widget,t,this.type);return n.breakAfter=this.breakAfter,n}get children(){return aO}sync(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):zx.empty}domBoundsAround(){return null}become(e){return e instanceof WO&&e.type==this.type&&e.widget.constructor==this.widget.constructor&&(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.breakAfter=e.breakAfter,!0)}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,t){return this.widget.coordsAt(this.dom,e,t)}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class XO{constructor(e,t,n,r){this.doc=e,this.pos=t,this.end=n,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof WO&&e.type==zO.WidgetBefore)}getLine(){return this.curLine||(this.content.push(this.curLine=new VO),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(YO(new RO(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||this.getLine()}buildText(e,t,n){for(;e>0;){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:r}=this.cursor.next(this.skip);if(this.skip=0,r)throw new Error("Ran out of text content when drawing inline views");if(n){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}this.text=t,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(YO(new OO(this.text.slice(this.textOff,this.textOff+r)),t),n),this.atCursorPos=!0,this.textOff+=r,e-=r,n=0}}span(e,t,n,r){this.buildText(t-e,n,r),this.pos=t,this.openStart<0&&(this.openStart=r)}point(e,t,n,r,i,o){if(this.disallowBlockEffectsFor[o]&&n instanceof qO){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let s=t-e;if(n instanceof qO)if(n.block){let{type:e}=n;e!=zO.WidgetAfter||this.posCovered()||this.getLine(),this.addBlockWidget(new WO(n.widget||new ZO("div"),s,e))}else{let o=TO.create(n.widget||new ZO("span"),s,s?0:n.startSide),a=this.atCursorPos&&!o.isEditable&&i<=r.length&&(e<t||n.startSide>0),l=!o.isEditable&&(e<t||i>r.length||n.startSide<=0),c=this.getLine();2!=this.pendingBuffer||a||o.isEditable||(this.pendingBuffer=0),this.flushBuffer(r),a&&(c.append(YO(new RO(1),r),i),i=r.length+Math.max(0,i-r.length)),c.append(YO(o,r),i),this.atCursorPos=l,this.pendingBuffer=l?e<t||i>r.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);s&&(this.textOff+s<=this.text.length?this.textOff+=s:(this.skip+=s-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=i)}static build(e,t,n,r,i){let o=new XO(e,t,n,i);return o.openEnd=fk.spans(r,t,n,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function YO(e,t){for(let n of t)e=new EO(n,[e],e.length);return e}class ZO extends BO{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}const JO=Sw.define(),KO=Sw.define(),eE=Sw.define(),tE=Sw.define(),nE=Sw.define(),rE=Sw.define(),iE=Sw.define(),oE=Sw.define({combine:e=>e.some(e=>e)}),sE=Sw.define({combine:e=>e.some(e=>e)});class aE{constructor(e,t="nearest",n="nearest",r=5,i=5){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=i}map(e){return e.empty?this:new aE(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin)}}const lE=Yw.define({map:(e,t)=>e.map(t)});function cE(e,t,n){let r=e.facet(tE);r.length?r[0](t):window.onerror?window.onerror(String(t),n,void 0,void 0,t):n?console.error(n+":",t):console.error(t)}const uE=Sw.define({combine:e=>!e.length||e[0]});let dE=0;const hE=Sw.define();class pE{constructor(e,t,n,r){this.id=e,this.create=t,this.domEventHandlers=n,this.extension=r(this)}static define(e,t){const{eventHandlers:n,provide:r,decorations:i}=t||{};return new pE(dE++,e,n,e=>{let t=[hE.of(e)];return i&&t.push(bE.of(t=>{let n=t.plugin(e);return n?i(n):FO.none})),r&&t.push(r(e)),t})}static fromClass(e,t){return pE.define(t=>new e(t),t)}}class fE{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(cE(e.state,t,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(e){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){cE(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(null===(t=this.value)||void 0===t?void 0:t.destroy)try{this.value.destroy()}catch(t){cE(e.state,t,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const mE=Sw.define(),gE=Sw.define(),bE=Sw.define(),vE=Sw.define(),yE=Sw.define(),SE=Sw.define();class _E{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(e){return new _E(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>n.toA)){if(r.toA<n.fromA)break;n=n.join(r),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(e,t){if(0==t.length)return e;let n=[];for(let r=0,i=0,o=0,s=0;;r++){let a=r==e.length?null:e[r],l=o-s,c=a?a.fromB:1e9;for(;i<t.length&&t[i]<c;){let e=t[i],r=t[i+1],o=Math.max(s,e),a=Math.min(c,r);if(o<=a&&new _E(o+l,a+l,o,a).addToSet(n),r>c)break;i+=2}if(!a)return n;new _E(a.fromA,a.toA,a.fromB,a.toB).addToSet(n),o=a.toA,s=a.toB}}}class xE{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=cw.empty(this.startState.doc.length);for(let e of n)this.changes=this.changes.compose(e.changes);let r=[];this.changes.iterChangedRanges((e,t,n,i)=>r.push(new _E(e,t,n,i))),this.changedRanges=r}static create(e,t,n){return new xE(e,t,n)}get viewportChanged(){return(4&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(10&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return 0==this.flags&&0==this.transactions.length}}var wE=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(wE||(wE={}));const kE=wE.LTR,OE=wE.RTL;function EE(e){let t=[];for(let n=0;n<e.length;n++)t.push(1<<+e[n]);return t}const AE=EE("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),TE=EE("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),CE=Object.create(null),ME=[];for(let e of["()","[]","{}"]){let t=e.charCodeAt(0),n=e.charCodeAt(1);CE[t]=n,CE[n]=-t}const $E=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class PE{constructor(e,t,n){this.from=e,this.to=t,this.level=n}get dir(){return this.level%2?OE:kE}side(e,t){return this.dir==t==e?this.to:this.from}static find(e,t,n,r){let i=-1;for(let o=0;o<e.length;o++){let s=e[o];if(s.from<=t&&s.to>=t){if(s.level==n)return o;(i<0||(0!=r?r<0?s.from<t:s.to>t:e[i].level>s.level))&&(i=o)}}if(i<0)throw new RangeError("Index out of range");return i}}const RE=[];function jE(e,t){let n=e.length,r=t==kE?1:2,i=t==kE?2:1;if(!e||1==r&&!$E.test(e))return NE(n);for(let t=0,i=r,s=r;t<n;t++){let n=(o=e.charCodeAt(t))<=247?AE[o]:1424<=o&&o<=1524?2:1536<=o&&o<=1785?TE[o-1536]:1774<=o&&o<=2220?4:8192<=o&&o<=8203?256:64336<=o&&o<=65023?4:8204==o?256:1;512==n?n=i:8==n&&4==s&&(n=16),RE[t]=4==n?2:n,7&n&&(s=n),i=n}var o;for(let e=0,t=r,i=r;e<n;e++){let r=RE[e];if(128==r)e<n-1&&t==RE[e+1]&&24&t?r=RE[e]=t:RE[e]=256;else if(64==r){let r=e+1;for(;r<n&&64==RE[r];)r++;let o=e&&8==t||r<n&&8==RE[r]?1==i?1:8:256;for(let t=e;t<r;t++)RE[t]=o;e=r-1}else 8==r&&1==i&&(RE[e]=1);t=r,7&r&&(i=r)}for(let t,o,s,a=0,l=0,c=0;a<n;a++)if(o=CE[t=e.charCodeAt(a)])if(o<0){for(let e=l-3;e>=0;e-=3)if(ME[e+1]==-o){let t=ME[e+2],n=2&t?r:4&t?1&t?i:r:0;n&&(RE[a]=RE[ME[e]]=n),l=e;break}}else{if(189==ME.length)break;ME[l++]=a,ME[l++]=t,ME[l++]=c}else if(2==(s=RE[a])||1==s){let e=s==r;c=e?0:1;for(let t=l-3;t>=0;t-=3){let n=ME[t+2];if(2&n)break;if(e)ME[t+2]|=2;else{if(4&n)break;ME[t+2]|=4}}}for(let e=0;e<n;e++)if(256==RE[e]){let t=e+1;for(;t<n&&256==RE[t];)t++;let i=1==(e?RE[e-1]:r),o=i==(1==(t<n?RE[t]:r))?i?1:2:r;for(let n=e;n<t;n++)RE[n]=o;e=t-1}let s=[];if(1==r)for(let e=0;e<n;){let t=e,r=1!=RE[e++];for(;e<n&&r==(1!=RE[e]);)e++;if(r)for(let n=e;n>t;){let e=n,r=2!=RE[--n];for(;n>t&&r==(2!=RE[n-1]);)n--;s.push(new PE(n,e,r?2:1))}else s.push(new PE(t,e,0))}else for(let e=0;e<n;){let t=e,r=2==RE[e++];for(;e<n&&r==(2==RE[e]);)e++;s.push(new PE(t,e,r?1:2))}return s}function NE(e){return[new PE(0,e,0)]}let DE="";function IE(e,t,n,r,i){var o;let s=r.head-e.from,a=-1;if(0==s){if(!i||!e.length)return null;t[0].level!=n&&(s=t[0].side(!1,n),a=0)}else if(s==e.length){if(i)return null;let e=t[t.length-1];e.level!=n&&(s=e.side(!0,n),a=t.length-1)}a<0&&(a=PE.find(t,s,null!==(o=r.bidiLevel)&&void 0!==o?o:-1,r.assoc));let l=t[a];s==l.side(i,n)&&(l=t[a+=i?1:-1],s=l.side(!i,n));let c=i==(l.dir==n),u=Jx(e.text,s,c);if(DE=e.text.slice(Math.min(s,u),Math.max(s,u)),u!=l.side(i,n))return bw.cursor(u+e.from,c?-1:1,l.level);let d=a==(i?t.length-1:0)?null:t[a+(i?1:-1)];return d||l.level==n?d&&d.level<l.level?bw.cursor(d.side(!i,n)+e.from,i?1:-1,d.level):bw.cursor(u+e.from,i?-1:1,l.level):bw.cursor(i?e.to:e.from,i?-1:1,n)}class LE{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(lk.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=""}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r),this.readNode(r);let e=r.nextSibling;if(e==t)break;let i=lO.get(r),o=lO.get(e);(i&&o?i.breakAfter:(i?i.breakAfter:BE(r))||BE(e)&&("BR"!=r.nodeName||r.cmIgnore))&&this.lineBreak(),r=e}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i,o=-1,s=1;if(this.lineSeparator?(o=t.indexOf(this.lineSeparator,n),s=this.lineSeparator.length):(i=r.exec(t))&&(o=i.index,s=i[0].length),this.append(t.slice(n,o<0?t.length:o)),o<0)break;if(this.lineBreak(),s>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=s-1);n=o+s}}readNode(e){if(e.cmIgnore)return;let t=lO.get(e),n=t&&t.overrideDOMText;if(null!=n){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else 3==e.nodeType?this.readTextNode(e):"BR"==e.nodeName?e.nextSibling&&this.lineBreak():1==e.nodeType&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(3==e.nodeType?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+Math.min(t,n.offset))}}function BE(e){return 1==e.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}class zE{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class FE extends lO{constructor(e){super(),this.view=e,this.compositionDeco=FO.none,this.decorations=[],this.dynamicDecorationMap=[],this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new VO],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new _E(0,0,0,e.state.doc.length)],0)}get length(){return this.view.state.doc.length}update(e){let t=e.changedRanges;this.minWidth>0&&t.length&&(t.every(({fromA:e,toA:t})=>t<this.minWidthFrom||e>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.view.inputState.composing<0?this.compositionDeco=FO.none:(e.transactions.length||this.dirty)&&(this.compositionDeco=function(e,t){let n=QE(e);if(!n)return FO.none;let{from:r,to:i,node:o,text:s}=n,a=t.mapPos(r,1),l=Math.max(a,t.mapPos(i,-1)),{state:c}=e,u=3==o.nodeType?o.nodeValue:new LE([],c).readRange(o.firstChild,null).text;if(u.indexOf("")>-1)return FO.none;if(l-a<u.length)if(c.doc.sliceString(a,Math.min(c.doc.length,a+u.length))==u)l=a+u.length;else{if(c.doc.sliceString(Math.max(0,l-u.length),l)!=u)return FO.none;a=l-u.length}else if(c.doc.sliceString(a,l)!=u)return FO.none;let d=lO.get(o);d instanceof CO?d=d.widget.topView:d&&(d.parent=null);return FO.set(FO.replace({widget:new qE(o,s,d),inclusive:!0}).range(a,l))}(this.view,e.changes)),(kO.ie||kO.chrome)&&!this.compositionDeco.size&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let n=function(e,t,n){let r=new HE;return fk.compare(e,t,n,r),r.changes}(this.decorations,this.updateDeco(),e.changes);return t=_E.extendWithRanges(t,n),(0!=this.dirty||0!=t.length)&&(this.updateInner(t,e.startState.doc.length),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t);let{observer:n}=this.view;n.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let e=kO.chrome||kO.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,e),this.dirty=0,e&&(e.written||n.selectionRange.focusNode!=e.node)&&(this.forceSelection=!0),this.dom.style.height=""});let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let e of this.children)e instanceof WO&&e.widget instanceof UE&&r.push(e.dom);n.updateGaps(r)}updateChildren(e,t){let n=this.childCursor(t);for(let t=e.length-1;;t--){let r=t>=0?e[t]:null;if(!r)break;let{fromA:i,toA:o,fromB:s,toB:a}=r,{content:l,breakAtStart:c,openStart:u,openEnd:d}=XO.build(this.view.state.doc,s,a,this.decorations,this.dynamicDecorationMap),{i:h,off:p}=n.findPos(o,1),{i:f,off:m}=n.findPos(i,-1);dO(this,f,m,h,p,l,c,u,d)}}updateSelection(e=!1,t=!1){!e&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let n=this.view.root.activeElement,r=n==this.dom,i=!r&&Gk(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(!(r||t||i))return;let o=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,a=this.domAtPos(s.anchor),l=s.empty?a:this.domAtPos(s.head);if(kO.gecko&&s.empty&&!this.compositionDeco.size&&(1==(c=a).node.nodeType&&c.node.firstChild&&(0==c.offset||"false"==c.node.childNodes[c.offset-1].contentEditable)&&(c.offset==c.node.childNodes.length||"false"==c.node.childNodes[c.offset].contentEditable))){let e=document.createTextNode("");this.view.observer.ignore(()=>a.node.insertBefore(e,a.node.childNodes[a.offset]||null)),a=l=new sO(e,0),o=!0}var c;let u=this.view.observer.selectionRange;!o&&u.focusNode&&Vk(a.node,a.offset,u.anchorNode,u.anchorOffset)&&Vk(l.node,l.offset,u.focusNode,u.focusOffset)||(this.view.observer.ignore(()=>{kO.android&&kO.chrome&&this.dom.contains(u.focusNode)&&function(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(1==n.nodeType&&"false"==n.contentEditable)return!0;return!1}(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let e=Qk(this.view.root);if(e)if(s.empty){if(kO.gecko){let e=(t=a.node,r=a.offset,1!=t.nodeType?0:(r&&"false"==t.childNodes[r-1].contentEditable?1:0)|(r<t.childNodes.length&&"false"==t.childNodes[r].contentEditable?2:0));if(e&&3!=e){let t=GE(a.node,a.offset,1==e?1:-1);t&&(a=new sO(t,1==e?0:t.nodeValue.length))}}e.collapse(a.node,a.offset),null!=s.bidiLevel&&null!=u.cursorBidiLevel&&(u.cursorBidiLevel=s.bidiLevel)}else if(e.extend){e.collapse(a.node,a.offset);try{e.extend(l.node,l.offset)}catch(e){}}else{let t=document.createRange();s.anchor>s.head&&([a,l]=[l,a]),t.setEnd(l.node,l.offset),t.setStart(a.node,a.offset),e.removeAllRanges(),e.addRange(t)}else;var t,r;i&&this.view.root.activeElement==this.dom&&(this.dom.blur(),n&&n.focus())}),this.view.observer.setSelectionRange(a,l)),this.impreciseAnchor=a.precise?null:new sO(u.anchorNode,u.anchorOffset),this.impreciseHead=l.precise?null:new sO(u.focusNode,u.focusOffset)}enforceCursorAssoc(){if(this.compositionDeco.size)return;let{view:e}=this,t=e.state.selection.main,n=Qk(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!(n&&t.empty&&t.assoc&&n.modify))return;let o=VO.find(this,t.head);if(!o)return;let s=o.posAtStart;if(t.head==s||t.head==s+o.length)return;let a=this.coordsAt(t.head,-1),l=this.coordsAt(t.head,1);if(!a||!l||a.bottom>l.top)return;let c=this.domAtPos(t.head+t.assoc);n.collapse(c.node,c.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let u=e.observer.selectionRange;e.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=t.from&&n.collapse(r,i)}nearest(e){for(let t=e;t;){let e=lO.get(t);if(e&&e.rootView==this)return e;t=t.parentNode}return null}posFromDOM(e,t){let n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}domAtPos(e){let{i:t,off:n}=this.childCursor().findPos(e,-1);for(;t<this.children.length-1;){let e=this.children[t];if(n<e.length||e instanceof VO)break;t++,n=0}return this.children[t].domAtPos(n)}coordsAt(e,t){for(let n=this.length,r=this.children.length-1;;r--){let i=this.children[r],o=n-i.breakAfter-i.length;if(e>o||e==o&&i.type!=zO.WidgetBefore&&i.type!=zO.WidgetAfter&&(!r||2==t||this.children[r-1].breakAfter||this.children[r-1].type==zO.WidgetBefore&&t>-2))return i.coordsAt(e-o,t);n=o}}measureVisibleLineHeights(e){let t=[],{from:n,to:r}=e,i=this.view.contentDOM.clientWidth,o=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,a=this.view.textDirection==wE.LTR;for(let e=0,l=0;l<this.children.length;l++){let c=this.children[l],u=e+c.length;if(u>r)break;if(e>=n){let n=c.dom.getBoundingClientRect();if(t.push(n.height),o){let t=c.dom.lastChild,r=t?Hk(t):[];if(r.length){let t=r[r.length-1],o=a?t.right-n.left:n.right-t.left;o>s&&(s=o,this.minWidth=i,this.minWidthFrom=e,this.minWidthTo=u)}}}e=u+c.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return"rtl"==getComputedStyle(this.children[t].dom).direction?wE.RTL:wE.LTR}measureTextSize(){for(let e of this.children)if(e instanceof VO){let t=e.measureTextSize();if(t)return t}let e,t,n,r=document.createElement("div");return r.className="cm-line",r.style.width="99999px",r.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(r);let i=Hk(r.firstChild)[0];e=r.getBoundingClientRect().height,t=i?i.width/27:7,n=i?i.height:e,r.remove()}),{lineHeight:e,charWidth:t,textHeight:n}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new uO(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let i=r==t.viewports.length?null:t.viewports[r],o=i?i.from-1:this.length;if(o>n){let r=t.lineBlockAt(o).bottom-t.lineBlockAt(n).top;e.push(FO.replace({widget:new UE(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,o))}if(!i)break;n=i.to+1}return FO.set(e)}updateDeco(){let e=this.view.state.facet(bE).map((e,t)=>(this.dynamicDecorationMap[t]="function"==typeof e)?e(this.view):e);for(let t=e.length;t<e.length+3;t++)this.dynamicDecorationMap[t]=!1;return this.decorations=[...e,this.compositionDeco,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco]}scrollIntoView(e){let t,{range:n}=e,r=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1);if(!r)return;!n.empty&&(t=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,t.left),top:Math.min(r.top,t.top),right:Math.max(r.right,t.right),bottom:Math.max(r.bottom,t.bottom)});let i=0,o=0,s=0,a=0;for(let e of this.view.state.facet(yE).map(e=>e(this.view)))if(e){let{left:t,right:n,top:r,bottom:l}=e;null!=t&&(i=Math.max(i,t)),null!=n&&(o=Math.max(o,n)),null!=r&&(s=Math.max(s,r)),null!=l&&(a=Math.max(a,l))}let l={left:r.left-i,top:r.top-s,right:r.right+o,bottom:r.bottom+a};!function(e,t,n,r,i,o,s,a){let l=e.ownerDocument,c=l.defaultView||window;for(let u=e;u;)if(1==u.nodeType){let e,d=u==l.body;if(d)e=Jk(c);else{if(u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let t=u.getBoundingClientRect();e={left:t.left,right:t.left+u.clientWidth,top:t.top,bottom:t.top+u.clientHeight}}let h=0,p=0;if("nearest"==i)t.top<e.top?(p=-(e.top-t.top+s),n>0&&t.bottom>e.bottom+p&&(p=t.bottom-e.bottom+p+s)):t.bottom>e.bottom&&(p=t.bottom-e.bottom+s,n<0&&t.top-p<e.top&&(p=-(e.top+p-t.top+s)));else{let r=t.bottom-t.top,o=e.bottom-e.top;p=("center"==i&&r<=o?t.top+r/2-o/2:"start"==i||"center"==i&&n<0?t.top-s:t.bottom-o+s)-e.top}if("nearest"==r)t.left<e.left?(h=-(e.left-t.left+o),n>0&&t.right>e.right+h&&(h=t.right-e.right+h+o)):t.right>e.right&&(h=t.right-e.right+o,n<0&&t.left<e.left+h&&(h=-(e.left+h-t.left+o)));else{h=("center"==r?t.left+(t.right-t.left)/2-(e.right-e.left)/2:"start"==r==a?t.left-o:t.right-(e.right-e.left)+o)-e.left}if(h||p)if(d)c.scrollBy(h,p);else{let e=0,n=0;if(p){let e=u.scrollTop;u.scrollTop+=p,n=u.scrollTop-e}if(h){let t=u.scrollLeft;u.scrollLeft+=h,e=u.scrollLeft-t}t={left:t.left-e,top:t.top-n,right:t.right-e,bottom:t.bottom-n},e&&Math.abs(e-h)<1&&(r="nearest"),n&&Math.abs(n-p)<1&&(i="nearest")}if(d)break;u=u.assignedSlot||u.parentNode}else{if(11!=u.nodeType)break;u=u.host}}(this.view.scrollDOM,l,n.head<n.anchor?-1:1,e.x,e.y,e.xMargin,e.yMargin,this.view.textDirection==wE.LTR)}}class UE extends BO{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}}function QE(e){let t=e.observer.selectionRange,n=t.focusNode&&GE(t.focusNode,t.focusOffset,0);if(!n)return null;let r=e.docView.nearest(n);if(!r)return null;if(r instanceof VO){let e=n;for(;e.parentNode!=r.dom;)e=e.parentNode;let t=e.previousSibling;for(;t&&!lO.get(t);)t=t.previousSibling;let i=t?lO.get(t).posAtEnd:r.posAtStart;return{from:i,to:i,node:e,text:n}}{for(;;){let{parent:e}=r;if(!e)return null;if(e instanceof VO)break;r=e}let e=r.posAtStart;return{from:e,to:e+r.length,node:r.dom,text:n}}}class qE extends BO{constructor(e,t,n){super(),this.top=e,this.text=t,this.topView=n}eq(e){return this.top==e.top&&this.text==e.text}toDOM(){return this.top}ignoreEvent(){return!1}get customView(){return CO}}function GE(e,t,n){if(n<=0)for(let n=e,r=t;;){if(3==n.nodeType)return n;if(!(1==n.nodeType&&r>0))break;n=n.childNodes[r-1],r=Yk(n)}if(n>=0)for(let r=e,i=t;;){if(3==r.nodeType)return r;if(!(1==r.nodeType&&i<r.childNodes.length&&n>=0))break;r=r.childNodes[i],i=0}return null}class HE{constructor(){this.changes=[]}compareRange(e,t){HO(e,t,this.changes)}comparePoint(e,t){HO(e,t,this.changes)}}function VE(e,t){return t.left>e?t.left-e:Math.max(0,e-t.right)}function WE(e,t){return t.top>e?t.top-e:Math.max(0,e-t.bottom)}function XE(e,t){return e.top<t.bottom-1&&e.bottom>t.top+1}function YE(e,t){return t<e.top?{top:t,left:e.left,right:e.right,bottom:e.bottom}:e}function ZE(e,t){return t>e.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function JE(e,t,n){let r=e.nodeValue.length,i=-1,o=1e9,s=0;for(let a=0;a<r;a++){let r=rO(e,a,a+1).getClientRects();for(let l=0;l<r.length;l++){let c=r[l];if(c.top==c.bottom)continue;s||(s=t-c.left);let u=(c.top>n?c.top-n:n-c.bottom)-1;if(c.left-1<=t&&c.right+1>=t&&u<o){let n=t>=(c.left+c.right)/2,r=n;if(kO.chrome||kO.gecko){rO(e,a).getBoundingClientRect().left==c.right&&(r=!n)}if(u<=0)return{node:e,offset:a+(r?1:0)};i=a+(r?1:0),o=u}}}return{node:e,offset:i>-1?i:s>0?e.nodeValue.length:0}}function KE(e,t,n,r=-1){var i,o;let s,a=e.contentDOM.getBoundingClientRect(),l=a.top+e.viewState.paddingTop,{docHeight:c}=e.viewState,{x:u,y:d}=t,h=d-l;if(h<0)return 0;if(h>c)return e.state.doc.length;for(let t=e.defaultLineHeight/2,i=!1;s=e.elementAtHeight(h),s.type!=zO.Text;)for(;h=r>0?s.bottom+t:s.top-t,!(h>=0&&h<=c);){if(i)return n?null:0;i=!0,r=-r}d=l+h;let p=s.from;if(p<e.viewport.from)return 0==e.viewport.from?0:n?null:eA(e,a,s,u,d);if(p>e.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:n?null:eA(e,a,s,u,d);let f=e.dom.ownerDocument,m=e.root.elementFromPoint?e.root:f,g=m.elementFromPoint(u,d);g&&!e.contentDOM.contains(g)&&(g=null),g||(u=Math.max(a.left+1,Math.min(a.right-1,u)),g=m.elementFromPoint(u,d),g&&!e.contentDOM.contains(g)&&(g=null));let b,v=-1;if(g&&0!=(null===(i=e.docView.nearest(g))||void 0===i?void 0:i.isEditable))if(f.caretPositionFromPoint){let e=f.caretPositionFromPoint(u,d);e&&({offsetNode:b,offset:v}=e)}else if(f.caretRangeFromPoint){let t=f.caretRangeFromPoint(u,d);t&&(({startContainer:b,startOffset:v}=t),(!e.contentDOM.contains(b)||kO.safari&&function(e,t,n){let r;if(3!=e.nodeType||t!=(r=e.nodeValue.length))return!1;for(let t=e.nextSibling;t;t=t.nextSibling)if(1!=t.nodeType||"BR"!=t.nodeName)return!1;return rO(e,r-1,r).getBoundingClientRect().left>n}(b,v,u)||kO.chrome&&function(e,t,n){if(0!=t)return!1;for(let t=e;;){let e=t.parentNode;if(!e||1!=e.nodeType||e.firstChild!=t)return!1;if(e.classList.contains("cm-line"))break;t=e}let r=1==e.nodeType?e.getBoundingClientRect():rO(e,0,Math.max(e.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}(b,v,u))&&(b=void 0))}if(!b||!e.docView.dom.contains(b)){let t=VO.find(e.docView,p);if(!t)return h>s.top+s.height/2?s.to:s.from;({node:b,offset:v}=function e(t,n,r){let i,o,s,a,l,c,u,d,h=!1;for(let p=t.firstChild;p;p=p.nextSibling){let t=Hk(p);for(let f=0;f<t.length;f++){let m=t[f];o&&XE(o,m)&&(m=YE(ZE(m,o.bottom),o.top));let g=VE(n,m),b=WE(r,m);if(0==g&&0==b)return 3==p.nodeType?JE(p,n,r):e(p,n,r);if(!i||a>b||a==b&&s>g){i=p,o=m,s=g,a=b;let e=b?r<m.top?-1:1:g?n<m.left?-1:1:0;h=!e||(e>0?f<t.length-1:f>0)}0==g?r>m.bottom&&(!u||u.bottom<m.bottom)?(l=p,u=m):r<m.top&&(!d||d.top>m.top)&&(c=p,d=m):u&&XE(u,m)?u=ZE(u,m.bottom):d&&XE(d,m)&&(d=YE(d,m.top))}}if(u&&u.bottom>=r?(i=l,o=u):d&&d.top<=r&&(i=c,o=d),!i)return{node:t,offset:0};let p=Math.max(o.left,Math.min(o.right,n));return 3==i.nodeType?JE(i,p,r):h&&"false"!=i.contentEditable?e(i,p,r):{node:t,offset:Array.prototype.indexOf.call(t.childNodes,i)+(n>=(o.left+o.right)/2?1:0)}}(t.dom,u,d))}let y=e.docView.nearest(b);if(!y)return null;if(y.isWidget&&1==(null===(o=y.dom)||void 0===o?void 0:o.nodeType)){let e=y.dom.getBoundingClientRect();return t.y<e.top||t.y<=e.bottom&&t.x<=(e.left+e.right)/2?y.posAtStart:y.posAtEnd}return y.localPosFromDOM(b,v)+y.posAtStart}function eA(e,t,n,r,i){let o=Math.round((r-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>1.5*e.defaultLineHeight){o+=Math.floor((i-n.top)/e.defaultLineHeight)*e.viewState.heightOracle.lineLength}let s=e.state.sliceDoc(n.from,n.to);return n.from+Ak(s,o,e.state.tabSize)}function tA(e,t,n,r){let i=e.state.doc.lineAt(t.head),o=e.bidiSpans(i),s=e.textDirectionAt(i.from);for(let a=t,l=null;;){let t=IE(i,o,s,a,n),c=DE;if(!t){if(i.number==(n?e.state.doc.lines:1))return a;c="\n",i=e.state.doc.line(i.number+(n?1:-1)),o=e.bidiSpans(i),t=bw.cursor(n?i.from:i.to)}if(l){if(!l(c))return a}else{if(!r)return t;l=r(c)}a=t}}function nA(e,t,n){let r=e.state.facet(vE).map(t=>t(e));for(;;){let e=!1;for(let i of r)i.between(n.from-1,n.from+1,(r,i,o)=>{n.from>r&&n.from<i&&(n=t.head>n.from?bw.cursor(r,1):bw.cursor(i,-1),e=!0)});if(!e)return n}}class rA{constructor(e){this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.chromeScrollHack=-1,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null;let t=(t,n)=>{this.ignoreDuringComposition(n)||"keydown"==n.type&&this.keydown(e,n)||(this.mustFlushObserver(n)&&e.observer.forceFlush(),this.runCustomHandlers(n.type,e,n)?n.preventDefault():t(e,n))};for(let n in uA){let r=uA[n];e.contentDOM.addEventListener(n,n=>{cA(e,n)&&t(r,n)},dA[n]),this.registeredEvents.push(n)}e.scrollDOM.addEventListener("mousedown",n=>{if(n.target==e.scrollDOM&&n.clientY>e.contentDOM.getBoundingClientRect().bottom&&(t(uA.mousedown,n),!n.defaultPrevented&&2==n.button)){let t=e.contentDOM.style.minHeight;e.contentDOM.style.minHeight="100%",setTimeout(()=>e.contentDOM.style.minHeight=t,200)}}),e.scrollDOM.addEventListener("drop",n=>{n.target==e.scrollDOM&&n.clientY>e.contentDOM.getBoundingClientRect().bottom&&t(uA.drop,n)}),kO.chrome&&102==kO.chrome_version&&e.scrollDOM.addEventListener("wheel",()=>{this.chromeScrollHack<0?e.contentDOM.style.pointerEvents="none":window.clearTimeout(this.chromeScrollHack),this.chromeScrollHack=setTimeout(()=>{this.chromeScrollHack=-1,e.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=e.hasFocus,kO.safari&&e.contentDOM.addEventListener("input",()=>null)}setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}ensureHandlers(e,t){var n;let r;this.customHandlers=[];for(let i of t)if(r=null===(n=i.update(e).spec)||void 0===n?void 0:n.domEventHandlers){this.customHandlers.push({plugin:i.value,handlers:r});for(let t in r)this.registeredEvents.indexOf(t)<0&&"scroll"!=t&&(this.registeredEvents.push(t),e.contentDOM.addEventListener(t,n=>{cA(e,n)&&this.runCustomHandlers(t,e,n)&&n.preventDefault()}))}}runCustomHandlers(e,t,n){for(let r of this.customHandlers){let i=r.handlers[e];if(i)try{if(i.call(r.plugin,n,t)||n.defaultPrevented)return!0}catch(e){cE(t.state,e)}}return!1}runScrollHandlers(e,t){this.lastScrollTop=e.scrollDOM.scrollTop,this.lastScrollLeft=e.scrollDOM.scrollLeft;for(let n of this.customHandlers){let r=n.handlers.scroll;if(r)try{r.call(n.plugin,t,e)}catch(t){cE(e.state,t)}}}keydown(e,t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),9==t.keyCode&&Date.now()<this.lastEscPress+2e3)return!0;if(27!=t.keyCode&&sA.indexOf(t.keyCode)<0&&(e.inputState.lastEscPress=0),kO.android&&kO.chrome&&!t.synthetic&&(13==t.keyCode||8==t.keyCode))return e.observer.delayAndroidKey(t.key,t.keyCode),!0;let n;return!(!kO.ios||t.synthetic||t.altKey||t.metaKey||!((n=iA.find(e=>e.keyCode==t.keyCode))&&!t.ctrlKey||oA.indexOf(t.key)>-1&&t.ctrlKey&&!t.shiftKey))&&(this.pendingIOSKey=n||t,setTimeout(()=>this.flushIOSKey(e),250),!0)}flushIOSKey(e){let t=this.pendingIOSKey;return!!t&&(this.pendingIOSKey=void 0,iO(e.contentDOM,t.key,t.keyCode))}ignoreDuringComposition(e){return!!/^key/.test(e.type)&&(this.composing>0||!!(kO.safari&&!kO.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}mustFlushObserver(e){return"keydown"==e.type&&229!=e.keyCode}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}const iA=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],oA="dthko",sA=[16,17,18,20,91,92,224,225];function aA(e){return.7*Math.max(0,e)+8}class lA{constructor(e,t,n,r){this.view=e,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParent=function(e){let t=e.ownerDocument;for(let n=e.parentNode;n&&n!=t.body;)if(1==n.nodeType){if(n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)return n;n=n.assignedSlot||n.parentNode}else{if(11!=n.nodeType)break;n=n.host}return null}(e.contentDOM);let i=e.contentDOM.ownerDocument;i.addEventListener("mousemove",this.move=this.move.bind(this)),i.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(lk.allowMultipleSelections)&&function(e,t){let n=e.state.facet(JO);return n.length?n[0](t):kO.mac?t.metaKey:t.ctrlKey}(e,t),this.dragMove=function(e,t){let n=e.state.facet(KO);return n.length?n[0](t):kO.mac?!t.altKey:!t.ctrlKey}(e,t),this.dragging=!(!function(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=Qk(e.root);if(!r||0==r.rangeCount)return!0;let i=r.getRangeAt(0).getClientRects();for(let e=0;e<i.length;e++){let n=i[e];if(n.left<=t.clientX&&n.right>=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}(e,t)||1!=wA(t))&&null}start(e){!1===this.dragging&&(e.preventDefault(),this.select(e))}move(e){var t;if(0==e.buttons)return this.destroy();if(!1!==this.dragging)return;this.select(this.lastEvent=e);let n=0,r=0,i=(null===(t=this.scrollParent)||void 0===t?void 0:t.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight};e.clientX<=i.left+6?n=-aA(i.left-e.clientX):e.clientX>=i.right-6&&(n=aA(e.clientX-i.right)),e.clientY<=i.top+6?r=-aA(i.top-e.clientY):e.clientY>=i.bottom-6&&(r=aA(e.clientY-i.bottom)),this.setScrollSpeed(n,r)}up(e){null==this.dragging&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),!1===this.dragging&&this.select(this.lastEvent)}select(e){let t=this.style.get(e,this.extend,this.multiple);!this.mustSelect&&t.eq(this.view.state.selection)&&t.main.assoc==this.view.state.selection.main.assoc||this.view.dispatch({selection:t,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.docChanged&&this.dragging&&(this.dragging=this.dragging.map(e.changes)),this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function cA(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n,r=t.target;r!=e.contentDOM;r=r.parentNode)if(!r||11==r.nodeType||(n=lO.get(r))&&n.ignoreEvent(t))return!1;return!0}const uA=Object.create(null),dA=Object.create(null),hA=kO.ie&&kO.ie_version<15||kO.ios&&kO.webkit_version<604;function pA(e,t){let n,{state:r}=e,i=1,o=r.toText(t),s=o.lines==r.selection.ranges.length;if(null!=OA&&r.selection.ranges.every(e=>e.empty)&&OA==o.toString()){let e=-1;n=r.changeByRange(n=>{let a=r.doc.lineAt(n.from);if(a.from==e)return{range:n};e=a.from;let l=r.toText((s?o.line(i++).text:t)+r.lineBreak);return{changes:{from:a.from,insert:l},range:bw.cursor(n.from+l.length)}})}else n=s?r.changeByRange(e=>{let t=o.line(i++);return{changes:{from:e.from,to:e.to,insert:t.text},range:bw.cursor(e.from+t.length)}}):r.replaceSelection(o);e.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}function fA(e,t,n,r){if(1==r)return bw.cursor(t,n);if(2==r)return function(e,t,n=1){let r=e.charCategorizer(t),i=e.doc.lineAt(t),o=t-i.from;if(0==i.length)return bw.cursor(t);0==o?n=1:o==i.length&&(n=-1);let s=o,a=o;n<0?s=Jx(i.text,o,!1):a=Jx(i.text,o);let l=r(i.text.slice(s,a));for(;s>0;){let e=Jx(i.text,s,!1);if(r(i.text.slice(e,s))!=l)break;s=e}for(;a<i.length;){let e=Jx(i.text,a);if(r(i.text.slice(a,e))!=l)break;a=e}return bw.range(s+i.from,a+i.from)}(e.state,t,n);{let n=VO.find(e.docView,t),r=e.state.doc.lineAt(n?n.posAtEnd:t),i=n?n.posAtStart:r.from,o=n?n.posAtEnd:r.to;return o<e.state.doc.length&&o==r.to&&o++,bw.range(i,o)}}uA.keydown=(e,t)=>{e.inputState.setSelectionOrigin("select"),27==t.keyCode&&(e.inputState.lastEscPress=Date.now())},uA.touchstart=(e,t)=>{e.inputState.lastTouchTime=Date.now(),e.inputState.setSelectionOrigin("select.pointer")},uA.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")},dA.touchstart=dA.touchmove={passive:!0},uA.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return;let n=null;for(let r of e.state.facet(eE))if(n=r(e,t),n)break;if(n||0!=t.button||(n=function(e,t){let n=vA(e,t),r=wA(t),i=e.state.selection;return{update(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),i=i.map(e.changes))},get(t,o,s){let a,l=vA(e,t),c=fA(e,l.pos,l.bias,r);if(n.pos!=l.pos&&!o){let t=fA(e,n.pos,n.bias,r),i=Math.min(t.from,c.from),o=Math.max(t.to,c.to);c=i<c.from?bw.range(i,o):bw.range(o,i)}return o?i.replaceRange(i.main.extend(c.from,c.to)):s&&1==r&&i.ranges.length>1&&(a=function(e,t){for(let n=0;n<e.ranges.length;n++){let{from:r,to:i}=e.ranges[n];if(r<=t&&i>=t)return bw.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-(e.mainIndex>n?1:0))}return null}(i,l.pos))?a:s?i.addRange(c):bw.create([c])}}}(e,t)),n){let r=e.root.activeElement!=e.contentDOM;e.inputState.startMouseSelection(new lA(e,t,n,r)),r&&e.observer.ignore(()=>nO(e.contentDOM)),e.inputState.mouseSelection&&e.inputState.mouseSelection.start(t)}};let mA=(e,t)=>e>=t.top&&e<=t.bottom,gA=(e,t,n)=>mA(t,n)&&e>=n.left&&e<=n.right;function bA(e,t,n,r){let i=VO.find(e.docView,t);if(!i)return 1;let o=t-i.posAtStart;if(0==o)return 1;if(o==i.length)return-1;let s=i.coordsAt(o,-1);if(s&&gA(n,r,s))return-1;let a=i.coordsAt(o,1);return a&&gA(n,r,a)?1:s&&mA(r,s)?-1:1}function vA(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:n,bias:bA(e,n,t.clientX,t.clientY)}}const yA=kO.ie&&kO.ie_version<=11;let SA=null,_A=0,xA=0;function wA(e){if(!yA)return e.detail;let t=SA,n=xA;return SA=e,xA=Date.now(),_A=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(_A+1)%3:1}function kA(e,t,n,r){if(!n)return;let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1);t.preventDefault();let{mouseSelection:o}=e.inputState,s=r&&o&&o.dragging&&o.dragMove?{from:o.dragging.from,to:o.dragging.to}:null,a={from:i,insert:n},l=e.state.changes(s?[s,a]:a);e.focus(),e.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:s?"move.drop":"input.drop"})}uA.dragstart=(e,t)=>{let{selection:{main:n}}=e.state,{mouseSelection:r}=e.inputState;r&&(r.dragging=n),t.dataTransfer&&(t.dataTransfer.setData("Text",e.state.sliceDoc(n.from,n.to)),t.dataTransfer.effectAllowed="copyMove")},uA.drop=(e,t)=>{if(!t.dataTransfer)return;if(e.state.readOnly)return t.preventDefault();let n=t.dataTransfer.files;if(n&&n.length){t.preventDefault();let r=Array(n.length),i=0,o=()=>{++i==n.length&&kA(e,t,r.filter(e=>null!=e).join(e.state.lineBreak),!1)};for(let e=0;e<n.length;e++){let t=new FileReader;t.onerror=o,t.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),o()},t.readAsText(n[e])}}else kA(e,t,t.dataTransfer.getData("Text"),!0)},uA.paste=(e,t)=>{if(e.state.readOnly)return t.preventDefault();e.observer.flush();let n=hA?null:t.clipboardData;n?(pA(e,n.getData("text/plain")||n.getData("text/uri-text")),t.preventDefault()):function(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{e.focus(),n.remove(),pA(e,n.value)},50)}(e)};let OA=null;uA.copy=uA.cut=(e,t)=>{let{text:n,ranges:r,linewise:i}=function(e){let t=[],n=[],r=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let i=-1;for(let{from:r}of e.selection.ranges){let o=e.doc.lineAt(r);o.number>i&&(t.push(o.text),n.push({from:o.from,to:Math.min(e.doc.length,o.to+1)})),i=o.number}r=!0}return{text:t.join(e.lineBreak),ranges:n,linewise:r}}(e.state);if(!n&&!i)return;OA=i?n:null;let o=hA?null:t.clipboardData;o?(t.preventDefault(),o.clearData(),o.setData("text/plain",n)):function(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout(()=>{r.remove(),e.focus()},50)}(e,n),"cut"!=t.type||e.state.readOnly||e.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"})};const EA=Vw.define();function AA(e,t){let n=[];for(let r of e.facet(iE)){let i=r(e,t);i&&n.push(i)}return n?e.update({effects:n,annotations:EA.of(!0)}):null}function TA(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=AA(e.state,t);n?e.dispatch(n):e.update([])}},10)}uA.focus=e=>{e.inputState.lastFocusTime=Date.now(),e.scrollDOM.scrollTop||!e.inputState.lastScrollTop&&!e.inputState.lastScrollLeft||(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),TA(e)},uA.blur=e=>{e.observer.clearSelectionRange(),TA(e)},uA.compositionstart=uA.compositionupdate=e=>{null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0)},uA.compositionend=e=>{e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,kO.chrome&&kO.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.compositionDeco.size&&e.update([])},50)},uA.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},uA.beforeinput=(e,t)=>{var n;let r;if(kO.chrome&&kO.android&&(r=iA.find(e=>e.inputType==t.inputType))&&(e.observer.delayAndroidKey(r.key,r.keyCode),"Backspace"==r.key||"Delete"==r.key)){let t=(null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0;setTimeout(()=>{var n;((null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}};const CA=["pre-wrap","normal","pre-line","break-spaces"];class MA{constructor(e){this.lineWrapping=e,this.doc=zx.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){if(!this.lineWrapping)return this.lineHeight;return(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return CA.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];r<0?n++:this.heightSamples[Math.floor(10*r)]||(t=!0,this.heightSamples[Math.floor(10*r)]=!0)}return t}refresh(e,t,n,r,i,o){let s=CA.indexOf(e)>-1,a=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=i,a){this.heightSamples={};for(let e=0;e<o.length;e++){let t=o[e];t<0?e++:this.heightSamples[Math.floor(10*t)]=!0}}return a}}class $A{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class PA{constructor(e,t,n,r,i,o){this.from=e,this.length=t,this.top=n,this.height=r,this.children=i,this.deco=o}get type(){var e,t,n;return null!==(n=null!==(e=this.children)&&void 0!==e?e:null===(t=this.deco)||void 0===t?void 0:t.type)&&void 0!==n?n:zO.Text}get widget(){return this.deco&&this.deco.widget}get to(){return this.from+this.length}get bottom(){return this.top+this.height}join(e){let t=(this.children||[this]).concat(e.children||[e]);return new PA(this.from,this.length+e.length,this.top,this.height+e.height,t,null)}}var RA=function(e){return e[e.ByPos=0]="ByPos",e[e.ByHeight=1]="ByHeight",e[e.ByPosNoHeight=2]="ByPosNoHeight",e}(RA||(RA={}));class jA{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(2&this.flags)>0}set outdated(e){this.flags=(e?2:0)|-3&this.flags}setHeight(e,t){this.height!=t&&(Math.abs(this.height-t)>.001&&(e.heightChanged=!0),this.height=t)}replace(e,t,n){return jA.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let i=this,o=n.doc;for(let s=r.length-1;s>=0;s--){let{fromA:a,toA:l,fromB:c,toB:u}=r[s],d=i.lineAt(a,RA.ByPosNoHeight,n.setDoc(t),0,0),h=d.to>=l?d:i.lineAt(l,RA.ByPosNoHeight,n,0,0);for(u+=h.to-l,l=h.to;s>0&&d.from<=r[s-1].toA;)a=r[s-1].fromA,c=r[s-1].fromB,s--,a<d.from&&(d=i.lineAt(a,RA.ByPosNoHeight,n,0,0));c+=d.from-a,a=d.from;let p=zA.build(n.setDoc(o),e,c,u);i=i.replace(a,l,p)}return i.updateHeight(n,0)}static empty(){return new DA(0,0)}static of(e){if(1==e.length)return e[0];let t=0,n=e.length,r=0,i=0;for(;;)if(t==n)if(r>2*i){let i=e[t-1];i.break?e.splice(--t,1,i.left,null,i.right):e.splice(--t,1,i.left,i.right),n+=1+i.break,r-=i.size}else{if(!(i>2*r))break;{let t=e[n];t.break?e.splice(n,1,t.left,null,t.right):e.splice(n,1,t.left,t.right),n+=2+t.break,i-=t.size}}else if(r<i){let n=e[t++];n&&(r+=n.size)}else{let t=e[--n];t&&(i+=t.size)}let o=0;return null==e[t-1]?(o=1,t--):null==e[t]&&(o=1,n++),new LA(jA.of(e.slice(0,t)),o,jA.of(e.slice(n)))}}jA.prototype.size=1;class NA extends jA{constructor(e,t,n){super(e,t),this.deco=n}blockAt(e,t,n,r){return new PA(r,this.length,n,this.height,null,this.deco)}lineAt(e,t,n,r,i){return this.blockAt(0,n,r,i)}forEachLine(e,t,n,r,i,o){e<=i+this.length&&t>=i&&o(this.blockAt(0,n,r,i))}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setHeight(e,r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class DA extends NA{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0}replace(e,t,n){let r=n[0];return 1==n.length&&(r instanceof DA||r instanceof IA&&4&r.flags)&&Math.abs(this.length-r.length)<10?(r instanceof IA?r=new DA(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):jA.of(n)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more?this.setHeight(e,r.heights[r.index++]):(n||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class IA extends jA{constructor(e){super(e,0)}heightMetrics(e,t){let n,r=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,o=i-r+1,s=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*o);n=t/o,this.length>o+1&&(s=(this.height-t)/(this.length-o-1))}else n=this.height/o;return{firstLine:r,lastLine:i,perLine:n,perChar:s}}blockAt(e,t,n,r){let{firstLine:i,lastLine:o,perLine:s,perChar:a}=this.heightMetrics(t,r);if(t.lineWrapping){let i=r+Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length),o=t.doc.lineAt(i),l=s+o.length*a,c=Math.max(n,e-l/2);return new PA(o.from,o.length,c,l,null,null)}{let r=Math.max(0,Math.min(o-i,Math.floor((e-n)/s))),{from:a,length:l}=t.doc.line(i+r);return new PA(a,l,n+s*r,s,null,null)}}lineAt(e,t,n,r,i){if(t==RA.ByHeight)return this.blockAt(e,n,r,i);if(t==RA.ByPosNoHeight){let{from:t,to:r}=n.doc.lineAt(e);return new PA(t,r-t,0,0,null,null)}let{firstLine:o,perLine:s,perChar:a}=this.heightMetrics(n,i),l=n.doc.lineAt(e),c=s+l.length*a,u=l.number-o,d=r+s*u+a*(l.from-i-u);return new PA(l.from,l.length,Math.max(r,Math.min(d,r+this.height-c)),c,null,null)}forEachLine(e,t,n,r,i,o){e=Math.max(e,i),t=Math.min(t,i+this.length);let{firstLine:s,perLine:a,perChar:l}=this.heightMetrics(n,i);for(let c=e,u=r;c<=t;){let t=n.doc.lineAt(c);if(c==e){let n=t.number-s;u+=a*n+l*(e-i-n)}let r=a+l*t.length;o(new PA(t.from,t.length,u,r,null,null)),u+=r,c=t.to+1}}replace(e,t,n){let r=this.length-t;if(r>0){let e=n[n.length-1];e instanceof IA?n[n.length-1]=new IA(e.length+r):n.push(null,new IA(r-1))}if(e>0){let t=n[0];t instanceof IA?n[0]=new IA(e+t.length):n.unshift(new IA(e-1),null)}return jA.of(n)}decomposeLeft(e,t){t.push(new IA(e-1),null)}decomposeRight(e,t){t.push(null,new IA(this.length-e-1))}updateHeight(e,t=0,n=!1,r){let i=t+this.length;if(r&&r.from<=t+this.length&&r.more){let n=[],o=Math.max(t,r.from),s=-1;for(r.from>t&&n.push(new IA(r.from-t-1).updateHeight(e,t));o<=i&&r.more;){let t=e.doc.lineAt(o).length;n.length&&n.push(null);let i=r.heights[r.index++];-1==s?s=i:Math.abs(i-s)>=.001&&(s=-2);let a=new DA(t,i);a.outdated=!1,n.push(a),o+=t+1}o<=i&&n.push(null,new IA(i-o).updateHeight(e,o));let a=jA.of(n);return(s<0||Math.abs(a.height-this.height)>=.001||Math.abs(s-this.heightMetrics(e,t).perLine)>=.001)&&(e.heightChanged=!0),a}return(n||this.outdated)&&(this.setHeight(e,e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class LA extends jA{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return 1&this.flags}blockAt(e,t,n,r){let i=n+this.left.height;return e<i?this.left.blockAt(e,t,n,r):this.right.blockAt(e,t,i,r+this.left.length+this.break)}lineAt(e,t,n,r,i){let o=r+this.left.height,s=i+this.left.length+this.break,a=t==RA.ByHeight?e<o:e<s,l=a?this.left.lineAt(e,t,n,r,i):this.right.lineAt(e,t,n,o,s);if(this.break||(a?l.to<s:l.from>s))return l;let c=t==RA.ByPosNoHeight?RA.ByPosNoHeight:RA.ByPos;return a?l.join(this.right.lineAt(s,c,n,o,s)):this.left.lineAt(s,c,n,r,i).join(l)}forEachLine(e,t,n,r,i,o){let s=r+this.left.height,a=i+this.left.length+this.break;if(this.break)e<a&&this.left.forEachLine(e,t,n,r,i,o),t>=a&&this.right.forEachLine(e,t,n,s,a,o);else{let l=this.lineAt(a,RA.ByPos,n,r,i);e<l.from&&this.left.forEachLine(e,l.from-1,n,r,i,o),l.to>=e&&l.from<=t&&o(l),t>l.to&&this.right.forEachLine(l.to+1,t,n,s,a,o)}}replace(e,t,n){let r=this.left.length+this.break;if(t<r)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let i=[];e>0&&this.decomposeLeft(e,i);let o=i.length;for(let e of n)i.push(e);if(e>0&&BA(i,o-1),t<this.length){let e=i.length;this.decomposeRight(t,i),BA(i,e)}return jA.of(i)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<r&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?jA.of(this.break?[e,null,t]:[e,t]):(this.left=e,this.right=t,this.height=e.height+t.height,this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:i,right:o}=this,s=t+i.length+this.break,a=null;return r&&r.from<=t+i.length&&r.more?a=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=s+o.length&&r.more?a=o=o.updateHeight(e,s,n,r):o.updateHeight(e,s,n),a?this.balanced(i,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function BA(e,t){let n,r;null==e[t]&&(n=e[t-1])instanceof IA&&(r=e[t+1])instanceof IA&&e.splice(t-1,3,new IA(n.length+1+r.length))}class zA{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof DA?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new DA(e-this.pos,-1)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let r=n.widget?n.widget.estimatedHeight:0;r<0&&(r=this.oracle.lineHeight);let i=t-e;n.block?this.addBlock(new NA(i,r,n)):(i||r>=5)&&this.addLineDeco(r,i)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||null==this.nodes[this.nodes.length-1])&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new DA(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new IA(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof DA)return e;let t=new DA(0,-1);return this.nodes.push(t),t}addBlock(e){var t;this.enterLine();let n=null===(t=e.deco)||void 0===t?void 0:t.type;n!=zO.WidgetAfter||this.isCovered||this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n!=zO.WidgetBefore&&(this.covering=e)}addLineDeco(e,t){let n=this.ensureLine();n.length+=t,n.collapsed+=t,n.widgetHeight=Math.max(n.widgetHeight,e),this.writtenTo=this.pos=this.pos+t}finish(e){let t=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof DA||this.isCovered?(this.writtenTo<this.pos||null==t)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new DA(0,-1));let n=e;for(let e of this.nodes)e instanceof DA&&e.updateHeight(this.oracle,n),n+=e?e.length:1;return this.nodes}static build(e,t,n,r){let i=new zA(n,e);return fk.spans(t,n,r,i,0),i.finish(n)}}class FA{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,r){(e<t||n&&n.heightRelevant||r&&r.heightRelevant)&&HO(e,t,this.changes,5)}}function UA(e,t){let n=e.getBoundingClientRect(),r=e.ownerDocument,i=r.defaultView||window,o=Math.max(0,n.left),s=Math.min(i.innerWidth,n.right),a=Math.max(0,n.top),l=Math.min(i.innerHeight,n.bottom);for(let t=e.parentNode;t&&t!=r.body;)if(1==t.nodeType){let n=t,r=window.getComputedStyle(n);if((n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)&&"visible"!=r.overflow){let r=n.getBoundingClientRect();o=Math.max(o,r.left),s=Math.min(s,r.right),a=Math.max(a,r.top),l=t==e.parentNode?r.bottom:Math.min(l,r.bottom)}t="absolute"==r.position||"fixed"==r.position?n.offsetParent:n.parentNode}else{if(11!=t.nodeType)break;t=t.host}return{left:o-n.left,right:Math.max(o,s)-n.left,top:a-(n.top+t),bottom:Math.max(a,l)-(n.top+t)}}function QA(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}class qA{constructor(e,t,n){this.from=e,this.to=t,this.size=n}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}draw(e){return FO.replace({widget:new GA(this.size,e)}).range(this.from,this.to)}}class GA extends BO{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class HA{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaler=ZA,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=wE.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(gE).some(e=>"function"!=typeof e&&"cm-lineWrapping"==e.class);this.heightOracle=new MA(t),this.stateDeco=e.facet(bE).filter(e=>"function"!=typeof e),this.heightMap=jA.empty().applyChanges(this.stateDeco,zx.empty,this.heightOracle.setDoc(e.doc),[new _E(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=FO.set(this.lineGaps.map(e=>e.draw(!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some(({from:e,to:t})=>r>=e&&r<=t)){let{from:t,to:n}=this.lineBlockAt(r);e.push(new VA(t,n))}}this.viewports=e.sort((e,t)=>e.from-t.from),this.scaler=this.heightMap.height<=7e6?ZA:new JA(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(1==this.scaler.scale?e:KA(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=this.state.facet(bE).filter(e=>"function"!=typeof e);let r=e.changedRanges,i=_E.extendWithRanges(r,function(e,t,n){let r=new FA;return fk.compare(e,t,n,r,0),r.changes}(n,this.stateDeco,e?e.changes:cw.empty(this.state.doc.length))),o=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),this.heightMap.height!=o&&(e.flags|=2);let s=i.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<s.from||t.range.head>s.to)||!this.viewportIsAppropriate(s))&&(s=this.getViewport(0,t));let a=!e.changes.empty||2&e.flags||s.from!=this.viewport.from||s.to!=this.viewport.to;this.viewport=s,this.updateForViewport(),a&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(sE)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,i=n.whiteSpace;this.defaultTextDirection="rtl"==n.direction?wE.RTL:wE.LTR;let o=this.heightOracle.mustRefreshForWrapping(i),s=t.getBoundingClientRect(),a=o||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let l=0,c=0,u=parseInt(n.paddingTop)||0,d=parseInt(n.paddingBottom)||0;this.paddingTop==u&&this.paddingBottom==d||(this.paddingTop=u,this.paddingBottom=d,l|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,l|=8);let h=(this.printing?QA:UA)(t,this.paddingTop),p=h.top-this.pixelViewport.top,f=h.bottom-this.pixelViewport.bottom;this.pixelViewport=h;let m=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(m!=this.inView&&(this.inView=m,m&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let g=s.width;if(this.contentDOMWidth==g&&this.editorHeight==e.scrollDOM.clientHeight||(this.contentDOMWidth=s.width,this.editorHeight=e.scrollDOM.clientHeight,l|=8),a){let t=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(t)&&(o=!0),o||r.lineWrapping&&Math.abs(g-this.contentDOMWidth)>r.charWidth){let{lineHeight:n,charWidth:s,textHeight:a}=e.docView.measureTextSize();o=n>0&&r.refresh(i,n,s,a,g/s,t),o&&(e.docView.minWidth=0,l|=8)}p>0&&f>0?c=Math.max(p,f):p<0&&f<0&&(c=Math.min(p,f)),r.heightChanged=!1;for(let n of this.viewports){let i=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(o?jA.empty().applyChanges(this.stateDeco,zx.empty,this.heightOracle,[new _E(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,o,new $A(n.from,i))}r.heightChanged&&(l|=2)}let b=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return b&&(this.viewport=this.getViewport(c,this.scrollTarget)),this.updateForViewport(),(2&l||b)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),l}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:o,visibleBottom:s}=this,a=new VA(r.lineAt(o-1e3*n,RA.ByHeight,i,0,0).from,r.lineAt(s+1e3*(1-n),RA.ByHeight,i,0,0).to);if(t){let{head:e}=t.range;if(e<a.from||e>a.to){let n,o=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),s=r.lineAt(e,RA.ByPos,i,0,0);n="center"==t.y?(s.top+s.bottom)/2-o/2:"start"==t.y||"nearest"==t.y&&e<a.from?s.top:s.bottom-o,a=new VA(r.lineAt(n-500,RA.ByHeight,i,0,0).from,r.lineAt(n+o+500,RA.ByHeight,i,0,0).to)}}return a}mapViewport(e,t){let n=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new VA(this.heightMap.lineAt(n,RA.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,RA.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,RA.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(t,RA.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:s}=this;return(0==e||r<=o-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||i>=s+Math.max(10,Math.min(n,250)))&&r>o-2e3&&i<s+2e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let r of e)t.touchesRange(r.from,r.to)||n.push(new qA(t.mapPos(r.from),t.mapPos(r.to),r.size));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,r=n?1e4:2e3,i=r>>1,o=r<<1;if(this.defaultTextDirection!=wE.LTR&&!n)return[];let s=[],a=(r,o,l,c)=>{if(o-r<i)return;let u=this.state.selection.main,d=[u.from];u.empty||d.push(u.to);for(let e of d)if(e>r&&e<o)return a(r,e-10,l,c),void a(e+10,o,l,c);let h=function(e,t){for(let n of e)if(t(n))return n;return}(e,e=>e.from>=l.from&&e.to<=l.to&&Math.abs(e.from-r)<i&&Math.abs(e.to-o)<i&&!d.some(t=>e.from<t&&e.to>t));if(!h){if(o<l.to&&t&&n&&t.visibleRanges.some(e=>e.from<=o&&e.to>=o)){let e=t.moveToLineBoundary(bw.cursor(o),!1,!0).head;e>r&&(o=e)}h=new qA(r,o,this.gapSize(l,r,o,c))}s.push(h)};for(let e of this.viewportLines){if(e.length<o)continue;let t=WA(e.from,e.to,this.stateDeco);if(t.total<o)continue;let i,s,l=this.scrollTarget?this.scrollTarget.range.head:null;if(n){let n,o,a=r/this.heightOracle.lineLength*this.heightOracle.lineHeight;if(null!=l){let r=YA(t,l),i=((this.visibleBottom-this.visibleTop)/2+a)/e.height;n=r-i,o=r+i}else n=(this.visibleTop-e.top-a)/e.height,o=(this.visibleBottom-e.top+a)/e.height;i=XA(t,n),s=XA(t,o)}else{let e,n,o=t.total*this.heightOracle.charWidth,a=r*this.heightOracle.charWidth;if(null!=l){let r=YA(t,l),i=((this.pixelViewport.right-this.pixelViewport.left)/2+a)/o;e=r-i,n=r+i}else e=(this.pixelViewport.left-a)/o,n=(this.pixelViewport.right+a)/o;i=XA(t,e),s=XA(t,n)}i>e.from&&a(e.from,i,e,t),s<e.to&&a(s,e.to,e,t)}return s}gapSize(e,t,n,r){let i=YA(r,n)-YA(r,t);return this.heightOracle.lineWrapping?e.height*i:r.total*this.heightOracle.charWidth*i}updateLineGaps(e){qA.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=FO.set(e.map(e=>e.draw(this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];fk.spans(e,this.viewport.from,this.viewport.to,{span(e,n){t.push({from:e,to:n})},point(){}},20);let n=t.length!=this.visibleRanges.length||this.visibleRanges.some((e,n)=>e.from!=t[n].from||e.to!=t[n].to);return this.visibleRanges=t,n?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||KA(this.heightMap.lineAt(e,RA.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return KA(this.heightMap.lineAt(this.scaler.fromDOM(e),RA.ByHeight,this.heightOracle,0,0),this.scaler)}elementAtHeight(e){return KA(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class VA{constructor(e,t){this.from=e,this.to=t}}function WA(e,t,n){let r=[],i=e,o=0;return fk.spans(n,e,t,{span(){},point(e,t){e>i&&(r.push({from:i,to:e}),o+=e-i),i=t}},20),i<t&&(r.push({from:i,to:t}),o+=t-i),{total:o,ranges:r}}function XA({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:i}=t[e],o=i-n;if(r<=o)return n+r;r-=o}}function YA(e,t){let n=0;for(let{from:r,to:i}of e.ranges){if(t<=i){n+=t-r;break}n+=i-r}return n/e.total}const ZA={toDOM:e=>e,fromDOM:e=>e,scale:1};class JA{constructor(e,t,n){let r=0,i=0,o=0;this.viewports=n.map(({from:n,to:i})=>{let o=t.lineAt(n,RA.ByPos,e,0,0).top,s=t.lineAt(i,RA.ByPos,e,0,0).bottom;return r+=s-o,{from:n,to:i,top:o,bottom:s,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(t.height-r);for(let e of this.viewports)e.domTop=o+(e.top-i)*this.scale,o=e.domBottom=e.domTop+(e.bottom-e.top),i=e.bottom}toDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.top)return r+(e-n)*this.scale;if(e<=i.bottom)return i.domTop+(e-i.top);n=i.bottom,r=i.domBottom}}fromDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.domTop)return n+(e-r)/this.scale;if(e<=i.domBottom)return i.top+(e-i.domTop);n=i.bottom,r=i.domBottom}}}function KA(e,t){if(1==t.scale)return e;let n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new PA(e.from,e.length,n,r-n,e.children&&e.children.map(e=>KA(e,t)),e.deco)}const eT=Sw.define({combine:e=>e.join(" ")}),tT=Sw.define({combine:e=>e.indexOf(!0)>-1}),nT=$k.newName(),rT=$k.newName(),iT=$k.newName(),oT={"&light":"."+rT,"&dark":"."+iT};function sT(e,t,n){return new $k(t,{finish:t=>/&/.test(t)?t.replace(/&\w*/,t=>{if("&"==t)return e;if(!n||!n[t])throw new RangeError("Unsupported selector: "+t);return n[t]}):e+" "+t})}const aT=sT("."+nT,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",left:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},oT);class lT{constructor(e,t,n,r){this.typeOver=r,this.bounds=null,this.text="";let{impreciseHead:i,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,n,0))){let t=i||o?[]:function(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}=e.observer.selectionRange;n&&(t.push(new zE(n,r)),i==n&&o==r||t.push(new zE(i,o)));return t}(e),n=new LE(t,e.state);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=function(e,t){if(0==e.length)return null;let n=e[0].pos,r=2==e.length?e[1].pos:n;return n>-1&&r>-1?bw.single(n+t,r+t):null}(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=i&&i.node==t.focusNode&&i.offset==t.focusOffset||!qk(e.contentDOM,t.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),r=o&&o.node==t.anchorNode&&o.offset==t.anchorOffset||!qk(e.contentDOM,t.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset);this.newSel=bw.single(r,n)}}}function cT(e,t){let n,{newSel:r}=t,i=e.state.selection.main;if(t.bounds){let{from:r,to:o}=t.bounds,s=i.from,a=null;(8===e.inputState.lastKeyCode&&e.inputState.lastKeyTime>Date.now()-100||kO.android&&t.text.length<o-r)&&(s=i.to,a="end");let l=function(e,t,n,r){let i=Math.min(e.length,t.length),o=0;for(;o<i&&e.charCodeAt(o)==t.charCodeAt(o);)o++;if(o==i&&e.length==t.length)return null;let s=e.length,a=t.length;for(;s>0&&a>0&&e.charCodeAt(s-1)==t.charCodeAt(a-1);)s--,a--;if("end"==r){let e=Math.max(0,o-Math.min(s,a));n-=s+e-o}if(s<o&&e.length<t.length){o-=n<=o&&n>=s?o-n:0,a=o+(a-s),s=o}else if(a<o){o-=n<=o&&n>=a?o-n:0,s=o+(s-a),a=o}return{from:o,toA:s,toB:a}}(e.state.doc.sliceString(r,o,""),t.text,s-r,a);l&&(kO.chrome&&13==e.inputState.lastKeyCode&&l.toB==l.from+2&&""==t.text.slice(l.from,l.toB)&&l.toB--,n={from:r+l.from,to:r+l.toA,insert:zx.of(t.text.slice(l.from,l.toB).split(""))})}else r&&(!e.hasFocus&&e.state.facet(uE)||r.main.eq(i))&&(r=null);if(!n&&!r)return!1;if(!n&&t.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,i.to)}:n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,n.from).append(n.insert).append(e.state.doc.slice(n.to,i.to))}:(kO.mac||kO.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&"off"==e.contentDOM.getAttribute("autocorrect")?(r&&2==n.insert.length&&(r=bw.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:zx.of([" "])}):kO.chrome&&n&&n.from==n.to&&n.from==i.head&&"\n "==n.insert.toString()&&e.lineWrapping&&(r&&(r=bw.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:zx.of([" "])}),n){let t=e.state;if(kO.ios&&e.inputState.flushIOSKey(e))return!0;if(kO.android&&(n.from==i.from&&n.to==i.to&&1==n.insert.length&&2==n.insert.lines&&iO(e.contentDOM,"Enter",13)||n.from==i.from-1&&n.to==i.to&&0==n.insert.length&&iO(e.contentDOM,"Backspace",8)||n.from==i.from&&n.to==i.to+1&&0==n.insert.length&&iO(e.contentDOM,"Delete",46)))return!0;let o,s=n.insert.toString();if(e.state.facet(rE).some(t=>t(e,n.from,n.to,s)))return!0;if(e.inputState.composing>=0&&e.inputState.composing++,n.from>=i.from&&n.to<=i.to&&n.to-n.from>=(i.to-i.from)/3&&(!r||r.main.empty&&r.main.from==n.from+n.insert.length)&&e.inputState.composing<0){let r=i.from<n.from?t.sliceDoc(i.from,n.from):"",s=i.to>n.to?t.sliceDoc(n.to,i.to):"";o=t.replaceSelection(e.state.toText(r+n.insert.sliceString(0,void 0,e.state.lineBreak)+s))}else{let s=t.changes(n),a=r&&r.main.to<=s.newLength?r.main:void 0;if(t.selection.ranges.length>1&&e.inputState.composing>=0&&n.to<=i.to&&n.to>=i.to-10){let r=e.state.sliceDoc(n.from,n.to),l=QE(e)||e.state.doc.lineAt(i.head),c=i.to-n.to,u=i.to-i.from;o=t.changeByRange(o=>{if(o.from==i.from&&o.to==i.to)return{changes:s,range:a||o.map(s)};let d=o.to-c,h=d-r.length;if(o.to-o.from!=u||e.state.sliceDoc(h,d)!=r||l&&o.to>=l.from&&o.from<=l.to)return{range:o};let p=t.changes({from:h,to:d,insert:n.insert}),f=o.to-i.to;return{changes:p,range:a?bw.range(Math.max(0,a.anchor+f),Math.max(0,a.head+f)):o.map(p)}})}else o={changes:s,selection:a&&t.selection.replaceRange(a)}}let a="input.type";return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,a+=".compose",e.inputState.compositionFirstChange&&(a+=".start",e.inputState.compositionFirstChange=!1)),e.dispatch(o,{scrollIntoView:!0,userEvent:a}),!0}if(r&&!r.main.eq(i)){let t=!1,n="select";return e.inputState.lastSelectionTime>Date.now()-50&&("select"==e.inputState.lastSelectionOrigin&&(t=!0),n=e.inputState.lastSelectionOrigin),e.dispatch({selection:r,scrollIntoView:t,userEvent:n}),!0}return!1}const uT={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},dT=kO.ie&&kO.ie_version<=11;class hT{constructor(e){this.view=e,this.active=!1,this.selectionRange=new Kk,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let e of t)this.queue.push(e);(kO.ie&&kO.ie_version<=11||kO.ios&&e.composing)&&t.some(e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),dT&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver(()=>{var e;(null===(e=this.view.docView)||void 0===e?void 0:e.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM),this.resizeContent=new ResizeObserver(()=>this.view.requestMeasure()),this.resizeContent.observe(e.contentDOM)),this.addWindowListeners(this.win=e.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver(e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runScrollHandlers(this.view,e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(uE)?n.root.activeElement!=this.dom:!Gk(n.dom,r))return;let i=r.anchorNode&&n.docView.nearest(r.anchorNode);i&&i.ignoreEvent(e)?t||(this.selectionChanged=!1):(kO.ie&&kO.ie_version<=11||kO.android&&kO.chrome)&&!n.state.selection.main.empty&&r.focusNode&&Vk(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=kO.safari&&11==e.root.nodeType&&function(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom&&function(e){let t=null;function n(e){e.preventDefault(),e.stopImmediatePropagation(),t=e.getTargetRanges()[0]}if(e.contentDOM.addEventListener("beforeinput",n,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",n,!0),!t)return null;let r=t.startContainer,i=t.startOffset,o=t.endContainer,s=t.endOffset,a=e.docView.domAtPos(e.state.selection.main.anchor);Vk(a.node,a.offset,o,s)&&([r,i,o,s]=[o,s,r,i]);return{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s}}(this.view)||Qk(e.root);if(!t||this.selectionRange.eq(t))return!1;let n=Gk(this.dom,t);return n&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&function(e,t){let n=t.focusNode,r=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=r)return!1;for(;;)if(r){if(1!=n.nodeType)return!1;let e=n.childNodes[r-1];"false"==e.contentEditable?r--:(n=e,r=Yk(n))}else{if(n==e)return!0;r=Wk(n),n=n.parentNode}}(this.dom,t)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(t),n&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(1==n.nodeType)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(n),n=n.assignedSlot||n.parentNode;else{if(11!=n.nodeType)break;n=n.host}if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);for(let e of this.scrollTargets=t)e.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,uT),dT&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),dT&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var n;if(!this.delayedAndroidKey){let e=()=>{let e=this.delayedAndroidKey;e&&(this.clearDelayedAndroidKey(),!this.flush()&&e.force&&iO(this.dom,e.key,e.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}this.delayedAndroidKey&&"Enter"!=e||(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(null===(n=this.delayedAndroidKey)||void 0===n?void 0:n.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let i of e){let e=this.readMutation(i);e&&(e.typeOver&&(r=!0),-1==t?({from:t,to:n}=e):(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&Gk(this.dom,this.selectionRange);return e<0&&!r?null:(e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1,new lT(this.view,e,t,n))}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return!1;let n=this.view.state,r=cT(this.view,t);return this.view.state==n&&this.view.update([]),r}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty("attributes"==e.type),"attributes"==e.type&&(t.dirty|=4),"childList"==e.type){let n=pT(t,e.previousSibling||e.target.previousSibling,-1),r=pT(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}return"characterData"==e.type?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,t,n,r;this.stop(),null===(e=this.intersection)||void 0===e||e.disconnect(),null===(t=this.gapIntersection)||void 0===t||t.disconnect(),null===(n=this.resizeScroll)||void 0===n||n.disconnect(),null===(r=this.resizeContent)||void 0===r||r.disconnect();for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function pT(e,t,n){for(;t;){let r=lO.get(t);if(r&&r.parent==e)return r;let i=t.parentNode;t=i!=e.dom?i:n>0?t.nextSibling:t.previousSibling}return null}class fT{constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=e.dispatch||(e=>this.update([e])),this.dispatch=this.dispatch.bind(this),this._root=e.root||function(e){for(;e;){if(e&&(9==e.nodeType||11==e.nodeType&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}(e.parent)||document,this.viewState=new HA(e.state||lk.create(e)),this.plugins=this.state.facet(hE).map(e=>new fE(e));for(let e of this.plugins)e.update(this);this.observer=new hT(this),this.inputState=new rA(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new FE(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}dispatch(...e){this._dispatch(1==e.length&&e[0]instanceof Zw?e[0]:this.state.update(...e))}update(e){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t,n=!1,r=!1,i=this.state;for(let t of e){if(t.startState!=i)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");i=t.state}if(this.destroyed)return void(this.viewState.state=i);let o=this.hasFocus,s=0,a=null;e.some(e=>e.annotation(EA))?(this.inputState.notifiedFocused=o,s=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,a=AA(i,o),a||(s=1));let l=this.observer.delayedAndroidKey,c=null;if(l?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(i.doc)||!this.state.selection.eq(i.selection))&&(c=null)):this.observer.clear(),i.facet(lk.phrases)!=this.state.facet(lk.phrases))return this.setState(i);t=xE.create(this,i,e),t.flags|=s;let u=this.viewState.scrollTarget;try{this.updateState=2;for(let t of e){if(u&&(u=u.map(t.changes)),t.scrollIntoView){let{main:e}=t.state.selection;u=new aE(e.empty?e:bw.cursor(e.head,e.head>e.anchor?-1:1))}for(let e of t.effects)e.is(lE)&&(u=e.value)}this.viewState.update(t,u),this.bidiCache=bT.update(this.bidiCache,t.changes),t.empty||(this.updatePlugins(t),this.inputState.update(t)),n=this.docView.update(t),this.state.facet(SE)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(e=>e.isUserEvent("select.pointer")))}finally{this.updateState=0}if(t.startState.facet(eT)!=t.state.facet(eT)&&(this.viewState.mustMeasureContent=!0),(n||r||u||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!t.empty)for(let e of this.state.facet(nE))e(t);(a||c)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),c&&!cT(this,c)&&l.force&&iO(this.contentDOM,l.key,l.keyCode)})}setState(e){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=e);this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new HA(e),this.plugins=e.facet(hE).map(e=>new fE(e)),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView=new FE(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(hE),n=e.state.facet(hE);if(t!=n){let r=[];for(let i of n){let n=t.indexOf(i);if(n<0)r.push(new fE(i));else{let t=this.plugins[n];t.mustUpdate=e,r.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=r,this.pluginMap.clear(),this.inputState.ensureHandlers(this,this.plugins)}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e<this.plugins.length;e++)this.plugins[e].update(this)}measure(e=!0){if(this.destroyed)return;this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,{scrollHeight:n,scrollTop:r,clientHeight:i}=this.scrollDOM,o=r>n-i-4?n:r;try{for(let e=0;;e++){this.updateState=1;let n=this.viewport,r=this.viewState.lineBlockAtHeight(o),i=this.viewState.measure(this);if(!i&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(e>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let s=[];4&i||([this.measureRequests,s]=[s,this.measureRequests]);let a=s.map(e=>{try{return e.read(this)}catch(e){return cE(this.state,e),gT}}),l=xE.create(this,this.state,[]),c=!1,u=!1;l.flags|=i,t?t.flags|=i:t=l,this.updateState=2,l.empty||(this.updatePlugins(l),this.inputState.update(l),this.updateAttrs(),c=this.docView.update(l));for(let e=0;e<s.length;e++)if(a[e]!=gT)try{let t=s[e];t.write&&t.write(a[e],this)}catch(e){cE(this.state,e)}if(this.viewState.editorHeight)if(this.viewState.scrollTarget)this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,u=!0;else{let e=this.viewState.lineBlockAt(r.from).top-r.top;(e>1||e<-1)&&(this.scrollDOM.scrollTop+=e,u=!0)}if(c&&this.docView.updateSelection(!0),this.viewport.from==n.from&&this.viewport.to==n.to&&!u&&0==this.measureRequests.length)break}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(nE))e(t)}get themeClasses(){return nT+" "+(this.state.facet(tT)?iT:rT)+" "+this.state.facet(eT)}updateAttrs(){let e=vT(this,mE,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(uE)?"true":"false",class:"cm-content",style:`${kO.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),vT(this,gE,t);let n=this.observer.ignore(()=>{let n=LO(this.contentDOM,this.contentAttrs,t),r=LO(this.dom,this.editorAttrs,e);return n||r});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let e of n.effects)if(e.is(fT.announce)){t&&(this.announceDOM.textContent=""),t=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=e.value}}mountStyles(){this.styleModules=this.state.facet(SE),$k.mount(this.root,this.styleModules.concat(aT).reverse())}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(null!=e.key)for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key)return void(this.measureRequests[t]=e);this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(void 0===t||t&&t.spec!=e)&&this.pluginMap.set(e,t=this.plugins.find(t=>t.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return nA(this,e,tA(this,e,t,n))}moveByGroup(e,t){return nA(this,e,tA(this,e,t,t=>function(e,t,n){let r=e.state.charCategorizer(t),i=r(n);return e=>{let t=r(e);return i==ik.Space&&(i=t),i==t}}(this,e.head,t)))}moveToLineBoundary(e,t,n=!0){return function(e,t,n,r){let i=e.state.doc.lineAt(t.head),o=r&&e.lineWrapping?e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head):null;if(o){let t=e.dom.getBoundingClientRect(),r=e.textDirectionAt(i.from),s=e.posAtCoords({x:n==(r==wE.LTR)?t.right-1:t.left+1,y:(o.top+o.bottom)/2});if(null!=s)return bw.cursor(s,n?-1:1)}let s=VO.find(e.docView,t.head),a=s?n?s.posAtEnd:s.posAtStart:n?i.to:i.from;return bw.cursor(a,n?-1:1)}(this,e,t,n)}moveVertically(e,t,n){return nA(this,e,function(e,t,n,r){let i=t.head,o=n?1:-1;if(i==(n?e.state.doc.length:0))return bw.cursor(i,t.assoc);let s,a=t.goalColumn,l=e.contentDOM.getBoundingClientRect(),c=e.coordsAtPos(i),u=e.documentTop;if(c)null==a&&(a=c.left-l.left),s=o<0?c.top:c.bottom;else{let t=e.viewState.lineBlockAt(i);null==a&&(a=Math.min(l.right-l.left,e.defaultCharacterWidth*(i-t.from))),s=(o<0?t.top:t.bottom)+u}let d=l.left+a,h=null!=r?r:e.defaultLineHeight>>1;for(let n=0;;n+=10){let r=s+(h+n)*o,c=KE(e,{x:d,y:r},!1,o);if(r<l.top||r>l.bottom||(o<0?c<i:c>i))return bw.cursor(c,t.assoc,void 0,a)}}(this,e,t,n))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),KE(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;let r=this.state.doc.lineAt(e),i=this.bidiSpans(r);return Zk(n,i[PE.find(i,e-r.from,-1,t)].dir==wE.LTR==t>0)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(oE)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>mT)return NE(e.length);let t=this.textDirectionAt(e.from);for(let n of this.bidiCache)if(n.from==e.from&&n.dir==t)return n.order;let n=jE(e.text,t);return this.bidiCache.push(new bT(e.from,e.to,t,n)),n}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||kO.safari&&(null===(e=this.inputState)||void 0===e?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{nO(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((9==e.nodeType?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return lE.of(new aE("number"==typeof e?bw.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}static domEventHandlers(e){return pE.define(()=>({}),{eventHandlers:e})}static theme(e,t){let n=$k.newName(),r=[eT.of(n),SE.of(sT("."+n,e))];return t&&t.dark&&r.push(tT.of(!0)),r}static baseTheme(e){return Rw.lowest(SE.of(sT("."+nT,e,oT)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),r=n&&lO.get(n)||lO.get(e);return(null===(t=null==r?void 0:r.rootView)||void 0===t?void 0:t.view)||null}}fT.styleModule=SE,fT.inputHandler=rE,fT.focusChangeEffect=iE,fT.perLineTextDirection=oE,fT.exceptionSink=tE,fT.updateListener=nE,fT.editable=uE,fT.mouseSelectionStyle=eE,fT.dragMovesSelection=KO,fT.clickAddsSelectionRange=JO,fT.decorations=bE,fT.atomicRanges=vE,fT.scrollMargins=yE,fT.darkTheme=tT,fT.contentAttributes=gE,fT.editorAttributes=mE,fT.lineWrapping=fT.contentAttributes.of({class:"cm-lineWrapping"}),fT.announce=Yw.define();const mT=4096,gT={};class bT{constructor(e,t,n,r){this.from=e,this.to=t,this.dir=n,this.order=r}static update(e,t){if(t.empty)return e;let n=[],r=e.length?e[e.length-1].dir:wE.LTR;for(let i=Math.max(0,e.length-10);i<e.length;i++){let o=e[i];o.dir!=r||t.touchesRange(o.from,o.to)||n.push(new bT(t.mapPos(o.from,1),t.mapPos(o.to,-1),o.dir,o.order))}return n}}function vT(e,t,n){for(let r=e.state.facet(t),i=r.length-1;i>=0;i--){let t=r[i],o="function"==typeof t?t(e):t;o&&DO(o,n)}return n}const yT=kO.mac?"mac":kO.windows?"win":kO.linux?"linux":"key";function ST(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}const _T=Rw.default(fT.domEventHandlers({keydown:(e,t)=>ET(kT(t.state),e,t,"editor")})),xT=Sw.define({enables:_T}),wT=new WeakMap;function kT(e){let t=e.facet(xT),n=wT.get(t);return n||wT.set(t,n=function(e,t=yT){let n=Object.create(null),r=Object.create(null),i=(e,t)=>{let n=r[e];if(null==n)r[e]=t;else if(n!=t)throw new Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},o=(e,r,o,s)=>{var a,l;let c=n[e]||(n[e]=Object.create(null)),u=r.split(/ (?!$)/).map(e=>function(e,t){const n=e.split(/-(?!$)/);let r,i,o,s,a=n[n.length-1];"Space"==a&&(a=" ");for(let e=0;e<n.length-1;++e){const a=n[e];if(/^(cmd|meta|m)$/i.test(a))s=!0;else if(/^a(lt)?$/i.test(a))r=!0;else if(/^(c|ctrl|control)$/i.test(a))i=!0;else if(/^s(hift)?$/i.test(a))o=!0;else{if(!/^mod$/i.test(a))throw new Error("Unrecognized modifier name: "+a);"mac"==t?s=!0:i=!0}}return r&&(a="Alt-"+a),i&&(a="Ctrl-"+a),s&&(a="Meta-"+a),o&&(a="Shift-"+a),a}(e,t));for(let t=1;t<u.length;t++){let n=u.slice(0,t).join(" ");i(n,!0),c[n]||(c[n]={preventDefault:!0,run:[t=>{let r=OT={view:t,prefix:n,scope:e};return setTimeout(()=>{OT==r&&(OT=null)},4e3),!0}]})}let d=u.join(" ");i(d,!1);let h=c[d]||(c[d]={preventDefault:!1,run:(null===(l=null===(a=c._any)||void 0===a?void 0:a.run)||void 0===l?void 0:l.slice())||[]});o&&h.run.push(o),s&&(h.preventDefault=!0)};for(let r of e){let e=r.scope?r.scope.split(" "):["editor"];if(r.any)for(let t of e){let e=n[t]||(n[t]=Object.create(null));e._any||(e._any={preventDefault:!1,run:[]});for(let t in e)e[t].run.push(r.any)}let i=r[t]||r.key;if(i)for(let t of e)o(t,i,r.run,r.preventDefault),r.shift&&o(t,"Shift-"+i,r.shift,r.preventDefault)}return n}(t.reduce((e,t)=>e.concat(t),[]))),n}let OT=null;function ET(e,t,n,r){let i=Uk(t),o=ow(rw(i,0))==i.length&&" "!=i,s="",a=!1;OT&&OT.view==n&&OT.scope==r&&(s=OT.prefix+" ",(a=sA.indexOf(t.keyCode)<0)&&(OT=null));let l,c,u=new Set,d=e=>{if(e){for(let r of e.run)if(!u.has(r)&&(u.add(r),r(n,t)))return!0;e.preventDefault&&(a=!0)}return!1},h=e[r];if(h){if(d(h[s+ST(i,t,!o)]))return!0;if(o&&(t.altKey||t.metaKey||t.ctrlKey)&&!(kO.windows&&t.ctrlKey&&t.altKey)&&(l=jk[t.keyCode])&&l!=i){if(d(h[s+ST(l,t,!0)]))return!0;if(t.shiftKey&&(c=Nk[t.keyCode])!=i&&c!=l&&d(h[s+ST(c,t,!1)]))return!0}else if(o&&t.shiftKey&&d(h[s+ST(i,t,!0)]))return!0;if(d(h._any))return!0}return a}class AT{constructor(e,t,n,r,i){this.className=e,this.left=t,this.top=n,this.width=r,this.height=i}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className==this.className&&(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",null!=this.width&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,n){if(n.empty){let r=e.coordsAtPos(n.head,n.assoc||1);if(!r)return[];let i=TT(e);return[new AT(t,r.left-i.left,r.top-i.top,null,r.bottom-r.top)]}return function(e,t,n){if(n.to<=e.viewport.from||n.from>=e.viewport.to)return[];let r=Math.max(n.from,e.viewport.from),i=Math.min(n.to,e.viewport.to),o=e.textDirection==wE.LTR,s=e.contentDOM,a=s.getBoundingClientRect(),l=TT(e),c=s.querySelector(".cm-line"),u=c&&window.getComputedStyle(c),d=a.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),h=a.right-(u?parseInt(u.paddingRight):0),p=MT(e,r),f=MT(e,i),m=p.type==zO.Text?p:null,g=f.type==zO.Text?f:null;e.lineWrapping&&(m&&(m=CT(e,r,m)),g&&(g=CT(e,i,g)));if(m&&g&&m.from==g.from)return v(y(n.from,n.to,m));{let t=m?y(n.from,null,m):S(p,!1),r=g?y(null,n.to,g):S(f,!0),i=[];return(m||p).to<(g||f).from-1?i.push(b(d,t.bottom,h,r.top)):t.bottom<r.top&&e.elementAtHeight((t.bottom+r.top)/2).type==zO.Text&&(t.bottom=r.top=(t.bottom+r.top)/2),v(t).concat(i).concat(v(r))}function b(e,n,r,i){return new AT(t,e-l.left,n-l.top-.01,r-e,i-n+.01)}function v({top:e,bottom:t,horizontal:n}){let r=[];for(let i=0;i<n.length;i+=2)r.push(b(n[i],e,n[i+1],t));return r}function y(t,n,r){let i=1e9,s=-1e9,a=[];function l(t,n,l,c,u){let p=e.coordsAtPos(t,t==r.to?-2:2),f=e.coordsAtPos(l,l==r.from?2:-2);p&&f&&(i=Math.min(p.top,f.top,i),s=Math.max(p.bottom,f.bottom,s),u==wE.LTR?a.push(o&&n?d:p.left,o&&c?h:f.right):a.push(!o&&c?d:f.left,!o&&n?h:p.right))}let c=null!=t?t:r.from,u=null!=n?n:r.to;for(let r of e.visibleRanges)if(r.to>c&&r.from<u)for(let i=Math.max(r.from,c),o=Math.min(r.to,u);;){let r=e.state.doc.lineAt(i);for(let s of e.bidiSpans(r)){let e=s.from+r.from,a=s.to+r.from;if(e>=o)break;a>i&&l(Math.max(e,i),null==t&&e<=c,Math.min(a,o),null==n&&a>=u,s.dir)}if(i=r.to+1,i>=o)break}return 0==a.length&&l(c,null==t,u,null==n,e.textDirection),{top:i,bottom:s,horizontal:a}}function S(e,t){let n=a.top+(t?e.top:e.bottom);return{top:n,bottom:n,horizontal:[]}}}(e,t,n)}}function TT(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==wE.LTR?t.left:t.right-e.scrollDOM.clientWidth)-e.scrollDOM.scrollLeft,top:t.top-e.scrollDOM.scrollTop}}function CT(e,t,n){let r=bw.cursor(t);return{from:Math.max(n.from,e.moveToLineBoundary(r,!1,!0).from),to:Math.min(n.to,e.moveToLineBoundary(r,!0,!0).from),type:zO.Text}}function MT(e,t){let n=e.lineBlockAt(t);if(Array.isArray(n.type))for(let e of n.type)if(e.to>t||e.to==t&&(e.to==n.to||e.type==zO.Text))return e;return n}class $T{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(PT)!=e.state.facet(PT)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&e.view.requestMeasure(this.measureReq)}setOrder(e){let t=0,n=e.facet(PT);for(;t<n.length&&n[t]!=this.layer;)t++;this.dom.style.zIndex=String((this.layer.above?150:-1)-t)}measure(){return this.layer.markers(this.view)}draw(e){if(e.length!=this.drawn.length||e.some((e,t)=>{return n=e,r=this.drawn[t],!(n.constructor==r.constructor&&n.eq(r));var n,r})){let t=this.dom.firstChild,n=0;for(let r of e)r.update&&t&&r.constructor&&this.drawn[n].constructor&&r.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(r.draw(),t);for(;t;){let e=t.nextSibling;t.remove(),t=e}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const PT=Sw.define();function RT(e){return[pE.define(t=>new $T(t,e)),PT.of(e)]}const jT=!kO.ios,NT=Sw.define({combine:e=>ck(e,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})});function DT(e={}){return[NT.of(e),LT,zT,UT,sE.of(!0)]}function IT(e){return e.startState.facet(NT)!=e.state.facet(NT)}const LT=RT({above:!0,markers(e){let{state:t}=e,n=t.facet(NT),r=[];for(let i of t.selection.ranges){let o=i==t.selection.main;if(i.empty?!o||jT:n.drawRangeCursor){let t=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",n=i.empty?i:bw.cursor(i.head,i.head>i.anchor?-1:1);for(let i of AT.forRange(e,t,n))r.push(i)}}return r},update(e,t){e.transactions.some(e=>e.selection)&&(t.style.animationName="cm-blink"==t.style.animationName?"cm-blink2":"cm-blink");let n=IT(e);return n&&BT(e.state,t),e.docChanged||e.selectionSet||n},mount(e,t){BT(t.state,e)},class:"cm-cursorLayer"});function BT(e,t){t.style.animationDuration=e.facet(NT).cursorBlinkRate+"ms"}const zT=RT({above:!1,markers:e=>e.state.selection.ranges.map(t=>t.empty?[]:AT.forRange(e,"cm-selectionBackground",t)).reduce((e,t)=>e.concat(t)),update:(e,t)=>e.docChanged||e.selectionSet||e.viewportChanged||IT(e),class:"cm-selectionLayer"}),FT={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};jT&&(FT[".cm-line"].caretColor="transparent !important");const UT=Rw.highest(fT.theme(FT)),QT=Yw.define({map:(e,t)=>null==e?null:t.mapPos(e)}),qT=Aw.define({create:()=>null,update:(e,t)=>(null!=e&&(e=t.changes.mapPos(e)),t.effects.reduce((e,t)=>t.is(QT)?t.value:e,e))}),GT=pE.fromClass(class{constructor(e){this.view=e,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(e){var t;let n=e.state.field(qT);null==n?null!=this.cursor&&(null===(t=this.cursor)||void 0===t||t.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(e.startState.field(qT)!=n||e.docChanged||e.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let e=this.view.state.field(qT),t=null!=e&&this.view.coordsAtPos(e);if(!t)return null;let n=this.view.scrollDOM.getBoundingClientRect();return{left:t.left-n.left+this.view.scrollDOM.scrollLeft,top:t.top-n.top+this.view.scrollDOM.scrollTop,height:t.bottom-t.top}}drawCursor(e){this.cursor&&(e?(this.cursor.style.left=e.left+"px",this.cursor.style.top=e.top+"px",this.cursor.style.height=e.height+"px"):this.cursor.style.left="-100000px")}destroy(){this.cursor&&this.cursor.remove()}setDropPos(e){this.view.state.field(qT)!=e&&this.view.dispatch({effects:QT.of(e)})}},{eventHandlers:{dragover(e){this.setDropPos(this.view.posAtCoords({x:e.clientX,y:e.clientY}))},dragleave(e){e.target!=this.view.contentDOM&&this.view.contentDOM.contains(e.relatedTarget)||this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function HT(e,t,n,r,i){t.lastIndex=0;for(let o,s=e.iterRange(n,r),a=n;!s.next().done;a+=s.value.length)if(!s.lineBreak)for(;o=t.exec(s.value);)i(a+o.index,o)}class VT{constructor(e){const{regexp:t,decoration:n,decorate:r,boundary:i,maxLength:o=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,r)this.addMatch=(e,t,n,i)=>r(i,n,n+e[0].length,e,t);else if("function"==typeof n)this.addMatch=(e,t,r,i)=>{let o=n(e,t,r);o&&i(r,r+e[0].length,o)};else{if(!n)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=(e,t,r,i)=>i(r,r+e[0].length,n)}this.boundary=i,this.maxLength=o}createDeco(e){let t=new mk,n=t.add.bind(t);for(let{from:t,to:r}of function(e,t){let n=e.visibleRanges;if(1==n.length&&n[0].from==e.viewport.from&&n[0].to==e.viewport.to)return n;let r=[];for(let{from:i,to:o}of n)i=Math.max(e.state.doc.lineAt(i).from,i-t),o=Math.min(e.state.doc.lineAt(o).to,o+t),r.length&&r[r.length-1].to>=i?r[r.length-1].to=o:r.push({from:i,to:o});return r}(e,this.maxLength))HT(e.state.doc,this.regexp,t,r,(t,r)=>this.addMatch(r,e,t,n));return t.finish()}updateDeco(e,t){let n=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((t,i,o,s)=>{s>e.view.viewport.from&&o<e.view.viewport.to&&(n=Math.min(o,n),r=Math.max(s,r))}),e.viewportChanged||r-n>1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,t.map(e.changes),n,r):t}updateRange(e,t,n,r){for(let i of e.visibleRanges){let o=Math.max(i.from,n),s=Math.min(i.to,r);if(s>o){let n=e.state.doc.lineAt(o),r=n.to<s?e.state.doc.lineAt(s):n,a=Math.max(i.from,n.from),l=Math.min(i.to,r.to);if(this.boundary){for(;o>n.from;o--)if(this.boundary.test(n.text[o-1-n.from])){a=o;break}for(;s<r.to;s++)if(this.boundary.test(r.text[s-r.from])){l=s;break}}let c,u=[],d=(e,t,n)=>u.push(n.range(e,t));if(n==r)for(this.regexp.lastIndex=a-n.from;(c=this.regexp.exec(n.text))&&c.index<l-n.from;)this.addMatch(c,e,c.index+n.from,d);else HT(e.state.doc,this.regexp,a,l,(t,n)=>this.addMatch(n,e,t,d));t=t.update({filterFrom:a,filterTo:l,filter:(e,t)=>e<a||t>l,add:u})}}return t}}const WT=null!=/x/.unicode?"gu":"g",XT=new RegExp("[\0-\b\n--\u2028\u2029\ufeff-]",WT),YT={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let ZT=null;const JT=Sw.define({combine(e){let t=ck(e,{render:null,specialChars:XT,addSpecialChars:null});return(t.replaceTabs=!function(){var e;if(null==ZT&&"undefined"!=typeof document&&document.body){let t=document.body.style;ZT=null!=(null!==(e=t.tabSize)&&void 0!==e?e:t.MozTabSize)}return ZT||!1}())&&(t.specialChars=new RegExp("\t|"+t.specialChars.source,WT)),t.addSpecialChars&&(t.specialChars=new RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,WT)),t}});function KT(e={}){return[JT.of(e),eC||(eC=pE.fromClass(class{constructor(e){this.view=e,this.decorations=FO.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(e.state.facet(JT)),this.decorations=this.decorator.createDeco(e)}makeDecorator(e){return new VT({regexp:e.specialChars,decoration:(t,n,r)=>{let{doc:i}=n.state,o=rw(t[0],0);if(9==o){let e=i.lineAt(r),t=n.state.tabSize,o=Ek(e.text,t,r-e.from);return FO.replace({widget:new nC((t-o%t)*this.view.defaultCharacterWidth)})}return this.decorationCache[o]||(this.decorationCache[o]=FO.replace({widget:new tC(e,o)}))},boundary:e.replaceTabs?void 0:/[^]/})}update(e){let t=e.state.facet(JT);e.startState.facet(JT)!=t?(this.decorator=this.makeDecorator(t),this.decorations=this.decorator.createDeco(e.view)):this.decorations=this.decorator.updateDeco(e,this.decorations)}},{decorations:e=>e.decorations}))]}let eC=null;class tC extends BO{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=(n=this.code)>=32?"•":10==n?"":String.fromCharCode(9216+n);var n;let r=e.state.phrase("Control character")+" "+(YT[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,t);if(i)return i;let o=document.createElement("span");return o.textContent=t,o.title=r,o.setAttribute("aria-label",r),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class nC extends BO{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent="\t",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}const rC=FO.line({class:"cm-activeLine"}),iC=pE.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=-1,n=[];for(let r of e.state.selection.ranges){let i=e.lineBlockAt(r.head);i.from>t&&(n.push(rC.range(i.from)),t=i.from)}return FO.set(n)}},{decorations:e=>e.decorations});function oC(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1),r=e.state.doc.lineAt(n),i=n-r.from,o=i>2e3?-1:i==r.length?function(e,t){let n=e.coordsAtPos(e.viewport.from);return n?Math.round(Math.abs((n.left-t)/e.defaultCharacterWidth)):-1}(e,t.clientX):Ek(r.text,e.state.tabSize,n-r.from);return{line:r.number,col:o,off:i}}function sC(e,t){let n=oC(e,t),r=e.state.selection;return n?{update(e){if(e.docChanged){let t=e.changes.mapPos(e.startState.doc.line(n.line).from),i=e.state.doc.lineAt(t);n={line:i.number,col:n.col,off:Math.min(n.off,i.length)},r=r.map(e.changes)}},get(t,i,o){let s=oC(e,t);if(!s)return r;let a=function(e,t,n){let r=Math.min(t.line,n.line),i=Math.max(t.line,n.line),o=[];if(t.off>2e3||n.off>2e3||t.col<0||n.col<0){let s=Math.min(t.off,n.off),a=Math.max(t.off,n.off);for(let t=r;t<=i;t++){let n=e.doc.line(t);n.length<=a&&o.push(bw.range(n.from+s,n.to+a))}}else{let s=Math.min(t.col,n.col),a=Math.max(t.col,n.col);for(let t=r;t<=i;t++){let n=e.doc.line(t),r=Ak(n.text,s,e.tabSize,!0);if(r<0)o.push(bw.cursor(n.to));else{let t=Ak(n.text,a,e.tabSize);o.push(bw.range(n.from+r,n.from+t))}}}return o}(e.state,n,s);return a.length?o?bw.create(a.concat(r.ranges)):bw.create(a):r}}:null}function aC(e){let t=(null==e?void 0:e.eventFilter)||(e=>e.altKey&&0==e.button);return fT.mouseSelectionStyle.of((e,n)=>t(n)?sC(e,n):null)}const lC={Alt:[18,e=>e.altKey],Control:[17,e=>e.ctrlKey],Shift:[16,e=>e.shiftKey],Meta:[91,e=>e.metaKey]},cC={style:"cursor: crosshair"};function uC(e={}){let[t,n]=lC[e.key||"Alt"],r=pE.fromClass(class{constructor(e){this.view=e,this.isDown=!1}set(e){this.isDown!=e&&(this.isDown=e,this.view.update([]))}},{eventHandlers:{keydown(e){this.set(e.keyCode==t||n(e))},keyup(e){e.keyCode!=t&&n(e)||this.set(!1)},mousemove(e){this.set(n(e))}}});return[r,fT.contentAttributes.of(e=>{var t;return(null===(t=e.plugin(r))||void 0===t?void 0:t.isDown)?cC:null})]}class dC{constructor(e,t,n){this.facet=t,this.createTooltipView=n,this.input=e.state.facet(t),this.tooltips=this.input.filter(e=>e),this.tooltipViews=this.tooltips.map(n)}update(e){var t;let n=e.state.facet(this.facet),r=n.filter(e=>e);if(n===this.input){for(let t of this.tooltipViews)t.update&&t.update(e);return!1}let i=[];for(let t=0;t<r.length;t++){let n=r[t],o=-1;if(n){for(let e=0;e<this.tooltips.length;e++){let t=this.tooltips[e];t&&t.create==n.create&&(o=e)}if(o<0)i[t]=this.createTooltipView(n);else{let n=i[t]=this.tooltipViews[o];n.update&&n.update(e)}}}for(let e of this.tooltipViews)i.indexOf(e)<0&&(e.dom.remove(),null===(t=e.destroy)||void 0===t||t.call(e));return this.input=n,this.tooltips=r,this.tooltipViews=i,!0}}function hC(e){let{win:t}=e;return{top:0,left:0,bottom:t.innerHeight,right:t.innerWidth}}const pC=Sw.define({combine:e=>{var t,n,r;return{position:kO.ios?"absolute":(null===(t=e.find(e=>e.position))||void 0===t?void 0:t.position)||"fixed",parent:(null===(n=e.find(e=>e.parent))||void 0===n?void 0:n.parent)||null,tooltipSpace:(null===(r=e.find(e=>e.tooltipSpace))||void 0===r?void 0:r.tooltipSpace)||hC}}}),fC=new WeakMap,mC=pE.fromClass(class{constructor(e){this.view=e,this.inView=!0,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(pC);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new dC(e,vC,e=>this.createTooltip(e)),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver(e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let e of this.manager.tooltipViews)this.intersectionObserver.observe(e.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(e){e.transactions.length&&(this.lastTransaction=Date.now());let t=this.manager.update(e);t&&this.observeIntersection();let n=t||e.geometryChanged,r=e.state.facet(pC);if(r.position!=this.position){this.position=r.position;for(let e of this.manager.tooltipViews)e.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let e of this.manager.tooltipViews)this.container.appendChild(e.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(e){let t=e.create(this.view);if(t.dom.classList.add("cm-tooltip"),e.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let e=document.createElement("div");e.className="cm-tooltip-arrow",t.dom.appendChild(e)}return t.dom.style.position=this.position,t.dom.style.top="-10000px",this.container.appendChild(t.dom),t.mount&&t.mount(this.view),t}destroy(){var e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let t of this.manager.tooltipViews)t.dom.remove(),null===(e=t.destroy)||void 0===e||e.call(t);null===(t=this.intersectionObserver)||void 0===t||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let e=this.view.dom.getBoundingClientRect();return{editor:e,parent:this.parent?this.container.getBoundingClientRect():e,pos:this.manager.tooltips.map((e,t)=>{let n=this.manager.tooltipViews[t];return n.getCoords?n.getCoords(e.pos):this.view.coordsAtPos(e.pos)}),size:this.manager.tooltipViews.map(({dom:e})=>e.getBoundingClientRect()),space:this.view.state.facet(pC).tooltipSpace(this.view)}}writeMeasure(e){var t;let{editor:n,space:r}=e,i=[];for(let o=0;o<this.manager.tooltips.length;o++){let s=this.manager.tooltips[o],a=this.manager.tooltipViews[o],{dom:l}=a,c=e.pos[o],u=e.size[o];if(!c||c.bottom<=Math.max(n.top,r.top)||c.top>=Math.min(n.bottom,r.bottom)||c.right<Math.max(n.left,r.left)-.1||c.left>Math.min(n.right,r.right)+.1){l.style.top="-10000px";continue}let d=s.arrow?a.dom.querySelector(".cm-tooltip-arrow"):null,h=d?7:0,p=u.right-u.left,f=null!==(t=fC.get(a))&&void 0!==t?t:u.bottom-u.top,m=a.offset||bC,g=this.view.textDirection==wE.LTR,b=u.width>r.right-r.left?g?r.left:r.right-u.width:g?Math.min(c.left-(d?14:0)+m.x,r.right-p):Math.max(r.left,c.left-p+(d?14:0)-m.x),v=!!s.above;!s.strictSide&&(v?c.top-(u.bottom-u.top)-m.y<r.top:c.bottom+(u.bottom-u.top)+m.y>r.bottom)&&v==r.bottom-c.bottom>c.top-r.top&&(v=!v);let y=(v?c.top-r.top:r.bottom-c.bottom)-h;if(y<f&&!1!==a.resize){if(y<this.view.defaultLineHeight){l.style.top="-10000px";continue}fC.set(a,f),l.style.height=(f=y)+"px"}else l.style.height&&(l.style.height="");let S=v?c.top-f-h-m.y:c.bottom+h+m.y,_=b+p;if(!0!==a.overlap)for(let e of i)e.left<_&&e.right>b&&e.top<S+f&&e.bottom>S&&(S=v?e.top-f-2-h:e.bottom+h+2);"absolute"==this.position?(l.style.top=S-e.parent.top+"px",l.style.left=b-e.parent.left+"px"):(l.style.top=S+"px",l.style.left=b+"px"),d&&(d.style.left=c.left+(g?m.x:-m.x)-(b+14-7)+"px"),!0!==a.overlap&&i.push({left:b,top:S,right:_,bottom:S+f}),l.classList.toggle("cm-tooltip-above",v),l.classList.toggle("cm-tooltip-below",!v),a.positioned&&a.positioned(e.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let e of this.manager.tooltipViews)e.dom.style.top="-10000px"}},{eventHandlers:{scroll(){this.maybeMeasure()}}}),gC=fT.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),bC={x:0,y:0},vC=Sw.define({enables:[mC,gC]}),yC=Sw.define();class SC{constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new dC(e,yC,e=>this.createHostedView(e))}static create(e){return new SC(e)}createHostedView(e){let t=e.create(this.view);return t.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(t.dom),this.mounted&&t.mount&&t.mount(this.view),t}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)null===(e=t.destroy)||void 0===e||e.call(t)}}const _C=vC.compute([yC],e=>{let t=e.facet(yC).filter(e=>e);return 0===t.length?null:{pos:Math.min(...t.map(e=>e.pos)),end:Math.max(...t.filter(e=>null!=e.end).map(e=>e.end)),create:SC.create,above:t[0].above,arrow:t.some(e=>e.arrow)}});class xC{constructor(e,t,n,r,i){this.view=e,this.source=t,this.field=n,this.setHover=r,this.hoverTime=i,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{lastMove:e}=this,t=this.view.contentDOM.contains(e.target)?this.view.posAtCoords(e):null;if(null==t)return;let n=this.view.coordsAtPos(t);if(null==n||e.y<n.top||e.y>n.bottom||e.x<n.left-this.view.defaultCharacterWidth||e.x>n.right+this.view.defaultCharacterWidth)return;let r=this.view.bidiSpans(this.view.state.doc.lineAt(t)).find(e=>e.from<=t&&e.to>=t),i=r&&r.dir==wE.RTL?-1:1,o=this.source(this.view,t,e.x<n.left?-i:i);if(null==o?void 0:o.then){let e=this.pending={pos:t};o.then(t=>{this.pending==e&&(this.pending=null,t&&this.view.dispatch({effects:this.setHover.of(t)}))},e=>cE(this.view.state,e,"hover tooltip"))}else o&&this.view.dispatch({effects:this.setHover.of(o)})}mousemove(e){var t;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let n=this.active;if(n&&!wC(this.lastMove.target)||this.pending){let{pos:r}=n||this.pending,i=null!==(t=null==n?void 0:n.end)&&void 0!==t?t:r;(r==i?this.view.posAtCoords(this.lastMove)==r:function(e,t,n,r,i,o){let s=document.createRange(),a=e.domAtPos(t),l=e.domAtPos(n);s.setEnd(l.node,l.offset),s.setStart(a.node,a.offset);let c=s.getClientRects();s.detach();for(let e=0;e<c.length;e++){let t=c[e];if(Math.max(t.top-i,i-t.bottom,t.left-r,r-t.right)<=o)return!0}return!1}(this.view,r,i,e.clientX,e.clientY,6))||(this.view.dispatch({effects:this.setHover.of(null)}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1,this.active&&!wC(e.relatedTarget)&&this.view.dispatch({effects:this.setHover.of(null)})}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}function wC(e){for(let t=e;t;t=t.parentNode)if(1==t.nodeType&&t.classList.contains("cm-tooltip"))return!0;return!1}function kC(e,t={}){let n=Yw.define(),r=Aw.define({create:()=>null,update(e,r){if(e&&(t.hideOnChange&&(r.docChanged||r.selection)||t.hideOn&&t.hideOn(r,e)))return null;if(e&&r.docChanged){let t=r.changes.mapPos(e.pos,-1,aw.TrackDel);if(null==t)return null;let n=Object.assign(Object.create(null),e);n.pos=t,null!=e.end&&(n.end=r.changes.mapPos(e.end)),e=n}for(let t of r.effects)t.is(n)&&(e=t.value),t.is(EC)&&(e=null);return e},provide:e=>yC.from(e)});return[r,pE.define(i=>new xC(i,e,r,n,t.hoverTime||300)),_C]}function OC(e,t){let n=e.plugin(mC);if(!n)return null;let r=n.manager.tooltips.indexOf(t);return r<0?null:n.manager.tooltipViews[r]}const EC=Yw.define();const AC=Sw.define({combine(e){let t,n;for(let r of e)t=t||r.topContainer,n=n||r.bottomContainer;return{topContainer:t,bottomContainer:n}}});function TC(e,t){let n=e.plugin(CC),r=n?n.specs.indexOf(t):-1;return r>-1?n.panels[r]:null}const CC=pE.fromClass(class{constructor(e){this.input=e.state.facet(PC),this.specs=this.input.filter(e=>e),this.panels=this.specs.map(t=>t(e));let t=e.state.facet(AC);this.top=new MC(e,!0,t.topContainer),this.bottom=new MC(e,!1,t.bottomContainer),this.top.sync(this.panels.filter(e=>e.top)),this.bottom.sync(this.panels.filter(e=>!e.top));for(let e of this.panels)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}update(e){let t=e.state.facet(AC);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new MC(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new MC(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=e.state.facet(PC);if(n!=this.input){let t=n.filter(e=>e),r=[],i=[],o=[],s=[];for(let n of t){let t,a=this.specs.indexOf(n);a<0?(t=n(e.view),s.push(t)):(t=this.panels[a],t.update&&t.update(e)),r.push(t),(t.top?i:o).push(t)}this.specs=t,this.panels=r,this.top.sync(i),this.bottom.sync(o);for(let e of s)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}else for(let t of this.panels)t.update&&t.update(e)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:e=>fT.scrollMargins.of(t=>{let n=t.plugin(e);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class MC{constructor(e,t,n){this.view=e,this.top=t,this.container=n,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let e=this.container||this.view.dom;e.insertBefore(this.dom,this.top?e.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=$C(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=$C(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function $C(e){let t=e.nextSibling;return e.remove(),t}const PC=Sw.define({enables:CC});class RC extends uk{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}RC.prototype.elementClass="",RC.prototype.toDOM=void 0,RC.prototype.mapMode=aw.TrackBefore,RC.prototype.startSide=RC.prototype.endSide=-1,RC.prototype.point=!0;const jC=Sw.define(),NC={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>fk.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},DC=Sw.define();function IC(e){return[BC(),DC.of(Object.assign(Object.assign({},NC),e))]}const LC=Sw.define({combine:e=>e.some(e=>e)});function BC(e){let t=[zC];return e&&!1===e.fixed&&t.push(LC.of(!0)),t}const zC=pE.fromClass(class{constructor(e){this.view=e,this.prevViewport=e.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight+"px",this.gutters=e.state.facet(DC).map(t=>new qC(e,t));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!e.state.facet(LC),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,r=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(r<.8*(n.to-n.from))}e.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(LC)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&this.dom.remove();let n=fk.iter(this.view.state.facet(jC),this.view.viewport.from),r=[],i=this.gutters.map(e=>new QC(e,this.view.viewport,-this.view.documentPadding.top));for(let e of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(e.type)){let t=!0;for(let o of e.type)if(o.type==zO.Text&&t){UC(n,r,o.from);for(let e of i)e.line(this.view,o,r);t=!1}else if(o.widget)for(let e of i)e.widget(this.view,o)}else if(e.type==zO.Text){UC(n,r,e.from);for(let t of i)t.line(this.view,e,r)}for(let e of i)e.finish();e&&this.view.scrollDOM.insertBefore(this.dom,t)}updateGutters(e){let t=e.startState.facet(DC),n=e.state.facet(DC),r=e.docChanged||e.heightChanged||e.viewportChanged||!fk.eq(e.startState.facet(jC),e.state.facet(jC),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let t of this.gutters)t.update(e)&&(r=!0);else{r=!0;let i=[];for(let r of n){let n=t.indexOf(r);n<0?i.push(new qC(this.view,r)):(this.gutters[n].update(e),i.push(this.gutters[n]))}for(let e of this.gutters)e.dom.remove(),i.indexOf(e)<0&&e.destroy();for(let e of i)this.dom.appendChild(e.dom);this.gutters=i}return r}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove()}},{provide:e=>fT.scrollMargins.of(t=>{let n=t.plugin(e);return n&&0!=n.gutters.length&&n.fixed?t.textDirection==wE.LTR?{left:n.dom.offsetWidth}:{right:n.dom.offsetWidth}:null})});function FC(e){return Array.isArray(e)?e:[e]}function UC(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}class QC{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=fk.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:r}=this,i=t.top-this.height;if(this.i==r.elements.length){let o=new GC(e,t.height,i,n);r.elements.push(o),r.dom.appendChild(o.dom)}else r.elements[this.i].update(e,t.height,i,n);this.height=t.bottom,this.i++}line(e,t,n){let r=[];UC(this.cursor,r,t.from),n.length&&(r=r.concat(n));let i=this.gutter.config.lineMarker(e,t,r);i&&r.unshift(i);let o=this.gutter;(0!=r.length||o.config.renderEmptyElements)&&this.addElement(e,t,r)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t);n&&this.addElement(e,t,[n])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class qC{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let n in t.domEventHandlers)this.dom.addEventListener(n,r=>{let i,o=r.target;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let e=o.getBoundingClientRect();i=(e.top+e.bottom)/2}else i=r.clientY;let s=e.lineBlockAtHeight(i-e.documentTop);t.domEventHandlers[n](e,s,r)&&r.preventDefault()});this.markers=FC(t.markers(e)),t.initialSpacer&&(this.spacer=new GC(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=FC(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let n=e.view.viewport;return!fk.eq(this.markers,t,n.from,n.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(e)}destroy(){for(let e of this.elements)e.destroy()}}class GC{constructor(e,t,n,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,r)}update(e,t,n,r){this.height!=t&&(this.dom.style.height=(this.height=t)+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),function(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].compare(t[n]))return!1;return!0}(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,t){let n="cm-gutterElement",r=this.dom.firstChild;for(let i=0,o=0;;){let s=o,a=i<t.length?t[i++]:null,l=!1;if(a){let e=a.elementClass;e&&(n+=" "+e);for(let e=o;e<this.markers.length;e++)if(this.markers[e].compare(a)){s=e,l=!0;break}}else s=this.markers.length;for(;o<s;){let e=this.markers[o++];if(e.toDOM){e.destroy(r);let t=r.nextSibling;r.remove(),r=t}}if(!a)break;a.toDOM&&(l?r=r.nextSibling:this.dom.insertBefore(a.toDOM(e),r)),l&&o++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}}const HC=Sw.define(),VC=Sw.define({combine:e=>ck(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let e in t){let r=n[e],i=t[e];n[e]=r?(e,t,n)=>r(e,t,n)||i(e,t,n):i}return n}})});class WC extends RC{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function XC(e,t){return e.state.facet(VC).formatNumber(t,e.state)}const YC=DC.compute([VC],e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:e=>e.state.facet(HC),lineMarker:(e,t,n)=>n.some(e=>e.toDOM)?null:new WC(XC(e,e.state.doc.lineAt(t.from).number)),widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet(VC)!=e.state.facet(VC),initialSpacer:e=>new WC(XC(e,JC(e.state.doc.lines))),updateSpacer(e,t){let n=XC(t.view,JC(t.view.state.doc.lines));return n==e.number?e:new WC(n)},domEventHandlers:e.facet(VC).domEventHandlers}));function ZC(e={}){return[VC.of(e),BC(),YC]}function JC(e){let t=9;for(;t<e;)t=10*t+9;return t}const KC=new class extends RC{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},eM=jC.compute(["selection"],e=>{let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.head).from;i>n&&(n=i,t.push(KC.range(i)))}return fk.of(t)});var tM=n(3);let nM=0;class rM{constructor(e,t,n){this.set=e,this.base=t,this.modified=n,this.id=nM++}static define(e){if(null==e?void 0:e.base)throw new Error("Can not derive from a modified tag");let t=new rM([],null,[]);if(t.set.push(t),e)for(let n of e.set)t.set.push(n);return t}static defineModifier(){let e=new oM;return t=>t.modified.indexOf(e)>-1?t:oM.get(t.base||t,t.modified.concat(e).sort((e,t)=>e.id-t.id))}}let iM=0;class oM{constructor(){this.instances=[],this.id=iM++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find(n=>{return n.base==e&&(r=t,i=n.modified,r.length==i.length&&r.every((e,t)=>e==i[t]));var r,i});if(n)return n;let r=[],i=new rM(r,e,t);for(let e of t)e.instances.push(i);let o=function(e){let t=[[]];for(let n=0;n<e.length;n++)for(let r=0,i=t.length;r<i;r++)t.push(t[r].concat(e[n]));return t.sort((e,t)=>t.length-e.length)}(t);for(let t of e.set)if(!t.modified.length)for(let e of o)r.push(oM.get(t,e));return i}}function sM(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let e of n.split(" "))if(e){let n=[],i=2,o=e;for(let t=0;;){if("..."==o&&t>0&&t+3==e.length){i=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(o);if(!r)throw new RangeError("Invalid path: "+e);if(n.push("*"==r[0]?"":'"'==r[0][0]?JSON.parse(r[0]):r[0]),t+=r[0].length,t==e.length)break;let s=e[t++];if(t==e.length&&"!"==s){i=0;break}if("/"!=s)throw new RangeError("Invalid path: "+e);o=e.slice(t)}let s=n.length-1,a=n[s];if(!a)throw new RangeError("Invalid path: "+e);let l=new lM(r,i,s>0?n.slice(0,s):null);t[a]=l.sort(t[a])}}return aM.add(t)}const aM=new tM.c;class lM{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}function cM(e,t){let n=Object.create(null);for(let t of e)if(Array.isArray(t.tag))for(let e of t.tag)n[e.id]=t.class;else n[t.tag.id]=t.class;let{scope:r,all:i=null}=t||{};return{style:e=>{let t=i;for(let r of e)for(let e of r.set){let r=n[e.id];if(r){t=t?t+" "+r:r;break}}return t},scope:r}}function uM(e,t,n,r=0,i=e.length){let o=new dM(r,Array.isArray(t)?t:[t],n);o.highlightRange(e.cursor(),r,i,"",o.highlighters),o.flush(i)}lM.empty=new lM([],2,null);class dM{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,r,i){let{type:o,from:s,to:a}=e;if(s>=n||a<=t)return;o.isTop&&(i=this.highlighters.filter(e=>!e.scope||e.scope(o)));let l=r,c=function(e){let t=e.type.prop(aM);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}(e)||lM.empty,u=function(e,t){let n=null;for(let r of e){let e=r.style(t);e&&(n=n?n+" "+e:e)}return n}(i,c.tags);if(u&&(l&&(l+=" "),l+=u,1==c.mode&&(r+=(r?" ":"")+u)),this.startSpan(e.from,l),c.opaque)return;let d=e.tree&&e.tree.prop(tM.c.mounted);if(d&&d.overlay){let o=e.node.enter(d.overlay[0].from+s,1),c=this.highlighters.filter(e=>!e.scope||e.scope(d.tree.type)),u=e.firstChild();for(let h=0,p=s;;h++){let f=h<d.overlay.length?d.overlay[h]:null,m=f?f.from+s:a,g=Math.max(t,p),b=Math.min(n,m);if(g<b&&u)for(;e.from<b&&(this.highlightRange(e,g,b,r,i),this.startSpan(Math.min(b,e.to),l),!(e.to>=m)&&e.nextSibling()););if(!f||m>n)break;p=f.to+s,p>t&&(this.highlightRange(o.cursor(),Math.max(t,f.from+s),Math.min(n,p),r,c),this.startSpan(p,l))}u&&e.parent()}else if(e.firstChild()){do{if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,r,i),this.startSpan(Math.min(n,e.to),l)}}while(e.nextSibling());e.parent()}}}const hM=rM.define,pM=hM(),fM=hM(),mM=hM(fM),gM=hM(fM),bM=hM(),vM=hM(bM),yM=hM(bM),SM=hM(),_M=hM(SM),xM=hM(),wM=hM(),kM=hM(),OM=hM(kM),EM=hM(),AM={comment:pM,lineComment:hM(pM),blockComment:hM(pM),docComment:hM(pM),name:fM,variableName:hM(fM),typeName:mM,tagName:hM(mM),propertyName:gM,attributeName:hM(gM),className:hM(fM),labelName:hM(fM),namespace:hM(fM),macroName:hM(fM),literal:bM,string:vM,docString:hM(vM),character:hM(vM),attributeValue:hM(vM),number:yM,integer:hM(yM),float:hM(yM),bool:hM(bM),regexp:hM(bM),escape:hM(bM),color:hM(bM),url:hM(bM),keyword:xM,self:hM(xM),null:hM(xM),atom:hM(xM),unit:hM(xM),modifier:hM(xM),operatorKeyword:hM(xM),controlKeyword:hM(xM),definitionKeyword:hM(xM),moduleKeyword:hM(xM),operator:wM,derefOperator:hM(wM),arithmeticOperator:hM(wM),logicOperator:hM(wM),bitwiseOperator:hM(wM),compareOperator:hM(wM),updateOperator:hM(wM),definitionOperator:hM(wM),typeOperator:hM(wM),controlOperator:hM(wM),punctuation:kM,separator:hM(kM),bracket:OM,angleBracket:hM(OM),squareBracket:hM(OM),paren:hM(OM),brace:hM(OM),content:SM,heading:_M,heading1:hM(_M),heading2:hM(_M),heading3:hM(_M),heading4:hM(_M),heading5:hM(_M),heading6:hM(_M),contentSeparator:hM(SM),list:hM(SM),quote:hM(SM),emphasis:hM(SM),strong:hM(SM),link:hM(SM),monospace:hM(SM),strikethrough:hM(SM),inserted:hM(),deleted:hM(),changed:hM(),invalid:hM(),meta:EM,documentMeta:hM(EM),annotation:hM(EM),processingInstruction:hM(EM),definition:rM.defineModifier(),constant:rM.defineModifier(),function:rM.defineModifier(),standard:rM.defineModifier(),local:rM.defineModifier(),special:rM.defineModifier()};cM([{tag:AM.link,class:"tok-link"},{tag:AM.heading,class:"tok-heading"},{tag:AM.emphasis,class:"tok-emphasis"},{tag:AM.strong,class:"tok-strong"},{tag:AM.keyword,class:"tok-keyword"},{tag:AM.atom,class:"tok-atom"},{tag:AM.bool,class:"tok-bool"},{tag:AM.url,class:"tok-url"},{tag:AM.labelName,class:"tok-labelName"},{tag:AM.inserted,class:"tok-inserted"},{tag:AM.deleted,class:"tok-deleted"},{tag:AM.literal,class:"tok-literal"},{tag:AM.string,class:"tok-string"},{tag:AM.number,class:"tok-number"},{tag:[AM.regexp,AM.escape,AM.special(AM.string)],class:"tok-string2"},{tag:AM.variableName,class:"tok-variableName"},{tag:AM.local(AM.variableName),class:"tok-variableName tok-local"},{tag:AM.definition(AM.variableName),class:"tok-variableName tok-definition"},{tag:AM.special(AM.variableName),class:"tok-variableName2"},{tag:AM.definition(AM.propertyName),class:"tok-propertyName tok-definition"},{tag:AM.typeName,class:"tok-typeName"},{tag:AM.namespace,class:"tok-namespace"},{tag:AM.className,class:"tok-className"},{tag:AM.macroName,class:"tok-macroName"},{tag:AM.propertyName,class:"tok-propertyName"},{tag:AM.operator,class:"tok-operator"},{tag:AM.comment,class:"tok-comment"},{tag:AM.meta,class:"tok-meta"},{tag:AM.invalid,class:"tok-invalid"},{tag:AM.punctuation,class:"tok-punctuation"}]);var TM;const CM=new tM.c;function MM(e){return Sw.define({combine:e?t=>t.concat(e):void 0})}const $M=new tM.c;class PM{constructor(e,t,n=[],r=""){this.data=e,this.name=r,lk.prototype.hasOwnProperty("tree")||Object.defineProperty(lk.prototype,"tree",{get(){return NM(this)}}),this.parser=t,this.extension=[qM.of(this),lk.languageData.of((e,t,n)=>{let r=RM(e,t,n),i=r.type.prop(CM);if(!i)return[];let o=e.facet(i),s=r.type.prop($M);if(s){let i=r.resolve(t-r.from,n);for(let t of s)if(t.test(i,e)){let n=e.facet(t.facet);return"replace"==t.type?n:n.concat(o)}}return o})].concat(n)}isActiveAt(e,t,n=-1){return RM(e,t,n).type.prop(CM)==this.data}findRegions(e){let t=e.facet(qM);if((null==t?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(e,t)=>{if(e.prop(CM)==this.data)return void n.push({from:t,to:t+e.length});let i=e.prop(tM.c.mounted);if(i){if(i.tree.prop(CM)==this.data){if(i.overlay)for(let e of i.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}if(i.overlay){let e=n.length;if(r(i.tree,i.overlay[0].from+t),n.length>e)return}}for(let n=0;n<e.children.length;n++){let i=e.children[n];i instanceof tM.h&&r(i,e.positions[n]+t)}};return r(NM(e),0),n}get allowsNesting(){return!0}}function RM(e,t,n){let r=e.facet(qM),i=NM(e).topNode;if(!r||r.allowsNesting)for(let e=i;e;e=e.enter(t,n,tM.b.ExcludeBuffers))e.type.isTop&&(i=e);return i}PM.setState=Yw.define();class jM extends PM{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(e){let t=MM(e.languageData);return new jM(t,e.parser.configure({props:[CM.add(e=>e.isTop?t:void 0)]}),e.name)}configure(e,t){return new jM(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function NM(e){let t=e.field(PM.state,!1);return t?t.tree:tM.h.empty}class DM{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let IM=null;class LM{constructor(e,t,n=[],r,i,o,s,a){this.parser=e,this.state=t,this.fragments=n,this.tree=r,this.treeLen=i,this.viewport=o,this.skipped=s,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new LM(e,t,[],tM.h.empty,0,n,[],null)}startParse(){return this.parser.startParse(new DM(this.state.doc),this.fragments)}work(e,t){return null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=tM.h.empty&&this.isDone(null!=t?t:this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var n;if("number"==typeof e){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||(this.parse=this.startParse()),null!=t&&(null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let r=this.parse.advance();if(r){if(this.fragments=this.withoutTempSkipped(tM.i.addTree(r,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!==(n=this.parse.stoppedAt)&&void 0!==n?n:this.state.doc.length,this.tree=r,this.parse=null,!(this.treeLen<(null!=t?t:this.state.doc.length)))return!0;this.parse=this.startParse()}if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(tM.i.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=IM;IM=this;try{return e()}finally{IM=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=BM(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:r,treeLen:i,viewport:o,skipped:s}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges((e,n,r,i)=>t.push({fromA:e,toA:n,fromB:r,toB:i})),n=tM.i.applyChanges(n,t),r=tM.h.empty,i=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){s=[];for(let t of this.skipped){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);n<r&&s.push({from:n,to:r})}}}return new LM(this.parser,t,n,r,i,o,s,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let t=0;t<this.skipped.length;t++){let{from:n,to:r}=this.skipped[t];n<e.to&&r>e.from&&(this.fragments=BM(this.fragments,n,r),this.skipped.splice(t--,1))}return!(this.skipped.length>=t)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends tM.g{createParse(t,n,r){let i=r[0].from,o=r[r.length-1].to;return{parsedPos:i,advance(){let t=IM;if(t){for(let e of r)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=o,new tM.h(tM.e.none,[],[],o-i)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&0==t[0].from&&t[0].to>=e}static get(){return IM}}function BM(e,t,n){return tM.i.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}class zM{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new zM(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=LM.create(e.facet(qM).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new zM(n)}}PM.state=Aw.define({create:zM.init,update(e,t){for(let e of t.effects)if(e.is(PM.setState))return e.value;return t.startState.facet(qM)!=t.state.facet(qM)?zM.init(t.state):e.apply(t)}});let FM=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};"undefined"!=typeof requestIdleCallback&&(FM=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});const UM="undefined"!=typeof navigator&&(null===(TM=navigator.scheduling)||void 0===TM?void 0:TM.isInputPending)?()=>navigator.scheduling.isInputPending():null,QM=pE.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(PM.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),e.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(PM.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=FM(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:r}}=this.view,i=n.field(PM.state);if(i.tree==i.context.tree&&i.context.isDone(r+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!UM?Math.max(25,e.timeRemaining()-5):1e9),s=i.context.treeLen<r&&n.doc.length>r+1e3,a=i.context.work(()=>UM&&UM()||Date.now()>o,r+(s?0:1e5));this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:PM.setState.of(new zM(i.context))})),this.chunkBudget>0&&(!a||s)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(e=>cE(this.view.state,e)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),qM=Sw.define({combine:e=>e.length?e[0]:null,enables:e=>[PM.state,QM,fT.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]});class GM{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const HM=Sw.define(),VM=Sw.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(e=>e!=t[0]))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function WM(e){let t=e.facet(VM);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function XM(e,t){let n="",r=e.tabSize,i=e.facet(VM)[0];if("\t"==i){for(;t>=r;)n+="\t",t-=r;i=" "}for(let e=0;e<t;e++)n+=i;return n}function YM(e,t){e instanceof lk&&(e=new ZM(e));for(let n of e.state.facet(HM)){let r=n(e,t);if(void 0!==r)return r}let n=NM(e.state);return n?function(e,t,n){return e$(t.resolveInner(n).enterUnfinishedNodesBefore(n),n,e)}(e,n,t):null}class ZM{constructor(e,t={}){this.state=e,this.options=t,this.unit=WM(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:i}=this.options;return null!=r&&r>=n.from&&r<=n.to?i&&r==e?{text:"",from:e}:(t<0?r<e:r<=e)?{text:n.text.slice(r-n.from),from:r}:{text:n.text.slice(0,r-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:n,from:r}=this.lineAt(e,t);return n.slice(e-r,Math.min(n.length,e+100-r))}column(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.countColumn(n,e-r),o=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return o>-1&&(i+=o-this.countColumn(n,n.search(/\S|$/))),i}countColumn(e,t=e.length){return Ek(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.options.overrideIndentation;if(i){let e=i(r);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const JM=new tM.c;function KM(e){let t=e.type.prop(JM);if(t)return t;let n,r=e.firstChild;if(r&&(n=r.type.prop(tM.c.closedBy))){let t=e.lastChild,r=t&&n.indexOf(t.name)>-1;return e=>o$(e,!0,1,void 0,r&&!function(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}(e)?t.from:void 0)}return null==e.parent?t$:null}function e$(e,t,n){for(;e;e=e.parent){let r=KM(e);if(r)return r(n$.create(n,t,e))}return null}function t$(){return 0}class n$ extends ZM{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.node=n}static create(e,t,n){return new n$(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){let e=this.state.doc.lineAt(this.node.from);for(;;){let t=this.node.resolve(e.from);for(;t.parent&&t.parent.from==t.from;)t=t.parent;if(r$(t,this.node))break;e=this.state.doc.lineAt(t.from)}return this.lineIndent(e.from)}continue(){let e=this.node.parent;return e?e$(e,this.pos,this.base):0}}function r$(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function i$({closing:e,align:t=!0,units:n=1}){return r=>o$(r,t,n,e)}function o$(e,t,n,r,i){let o=e.textAfter,s=o.match(/^\s*/)[0].length,a=r&&o.slice(s,s+r.length)==r||i==e.pos+s,l=t?function(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let i=e.options.simulateBreak,o=e.state.doc.lineAt(n.from),s=null==i||i<=o.from?o.to:Math.min(o.to,i);for(let e=n.to;;){let i=t.childAfter(e);if(!i||i==r)return null;if(!i.type.isSkipped)return i.from<s?n:null;e=i.to}}(e):null;return l?a?e.column(l.from):e.column(l.to):e.baseIndent+(a?0:e.unit*n)}const s$=e=>e.baseIndent;function a$({except:e,units:t=1}={}){return n=>{let r=e&&e.test(n.textAfter);return n.baseIndent+(r?0:t*n.unit)}}const l$=Sw.define(),c$=new tM.c;function u$(e){let t=e.firstChild,n=e.lastChild;return t&&t.to<n.from?{from:t.to,to:n.type.isError?e.to:n.from}:null}function d$(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function h$(e,t,n){for(let r of e.facet(l$)){let i=r(e,t,n);if(i)return i}return function(e,t,n){let r=NM(e);if(r.length<n)return null;let i=null;for(let o=r.resolveInner(n,1);o;o=o.parent){if(o.to<=n||o.from>n)continue;if(i&&o.from<t)break;let s=o.type.prop(c$);if(s&&(o.to<r.length-50||r.length==e.doc.length||!d$(o))){let r=s(o,e);r&&r.from<=n&&r.from>=t&&r.to>n&&(i=r)}}return i}(e,t,n)}function p$(e,t){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);return n>=r?void 0:{from:n,to:r}}const f$=Yw.define({map:p$}),m$=Yw.define({map:p$});function g$(e){let t=[];for(let{head:n}of e.state.selection.ranges)t.some(e=>e.from<=n&&e.to>=n)||t.push(e.lineBlockAt(n));return t}const b$=Aw.define({create:()=>FO.none,update(e,t){e=e.map(t.changes);for(let n of t.effects)n.is(f$)&&!y$(e,n.value.from,n.value.to)?e=e.update({add:[E$.range(n.value.from,n.value.to)]}):n.is(m$)&&(e=e.update({filter:(e,t)=>n.value.from!=e||n.value.to!=t,filterFrom:n.value.from,filterTo:n.value.to}));if(t.selection){let n=!1,{head:r}=t.selection.main;e.between(r,r,(e,t)=>{e<r&&t>r&&(n=!0)}),n&&(e=e.update({filterFrom:r,filterTo:r,filter:(e,t)=>t<=r||e>=r}))}return e},provide:e=>fT.decorations.from(e),toJSON(e,t){let n=[];return e.between(0,t.doc.length,(e,t)=>{n.push(e,t)}),n},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw new RangeError("Invalid JSON for fold state");let t=[];for(let n=0;n<e.length;){let r=e[n++],i=e[n++];if("number"!=typeof r||"number"!=typeof i)throw new RangeError("Invalid JSON for fold state");t.push(E$.range(r,i))}return FO.set(t,!0)}});function v$(e,t,n){var r;let i=null;return null===(r=e.field(b$,!1))||void 0===r||r.between(t,n,(e,t)=>{(!i||i.from>e)&&(i={from:e,to:t})}),i}function y$(e,t,n){let r=!1;return e.between(t,t,(e,i)=>{e==t&&i==n&&(r=!0)}),r}function S$(e,t){return e.field(b$,!1)?t:t.concat(Yw.appendConfig.of(O$()))}function _$(e,t,n=!0){let r=e.state.doc.lineAt(t.from).number,i=e.state.doc.lineAt(t.to).number;return fT.announce.of(`${e.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${e.state.phrase("to")} ${i}.`)}const x$=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:e=>{for(let t of g$(e)){let n=h$(e.state,t.from,t.to);if(n)return e.dispatch({effects:S$(e.state,[f$.of(n),_$(e,n)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:e=>{if(!e.state.field(b$,!1))return!1;let t=[];for(let n of g$(e)){let r=v$(e.state,n.from,n.to);r&&t.push(m$.of(r),_$(e,r,!1))}return t.length&&e.dispatch({effects:t}),t.length>0}},{key:"Ctrl-Alt-[",run:e=>{let{state:t}=e,n=[];for(let r=0;r<t.doc.length;){let i=e.lineBlockAt(r),o=h$(t,i.from,i.to);o&&n.push(f$.of(o)),r=(o?e.lineBlockAt(o.to):i).to+1}return n.length&&e.dispatch({effects:S$(e.state,n)}),!!n.length}},{key:"Ctrl-Alt-]",run:e=>{let t=e.state.field(b$,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,(e,t)=>{n.push(m$.of({from:e,to:t}))}),e.dispatch({effects:n}),!0}}],w$={placeholderDOM:null,placeholderText:"…"},k$=Sw.define({combine:e=>ck(e,w$)});function O$(e){let t=[b$,M$];return e&&t.push(k$.of(e)),t}const E$=FO.replace({widget:new class extends BO{toDOM(e){let{state:t}=e,n=t.facet(k$),r=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),r=v$(e.state,n.from,n.to);r&&e.dispatch({effects:m$.of(r)}),t.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(e,r);let i=document.createElement("span");return i.textContent=n.placeholderText,i.setAttribute("aria-label",t.phrase("folded code")),i.title=t.phrase("unfold"),i.className="cm-foldPlaceholder",i.onclick=r,i}}}),A$={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class T$ extends RC{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function C$(e={}){let t=Object.assign(Object.assign({},A$),e),n=new T$(t,!0),r=new T$(t,!1),i=pE.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(qM)!=e.state.facet(qM)||e.startState.field(b$,!1)!=e.state.field(b$,!1)||NM(e.startState)!=NM(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new mk;for(let i of e.viewportLineBlocks){let o=v$(e.state,i.from,i.to)?r:h$(e.state,i.from,i.to)?n:null;o&&t.add(i.from,i.from,o)}return t.finish()}}),{domEventHandlers:o}=t;return[i,IC({class:"cm-foldGutter",markers(e){var t;return(null===(t=e.plugin(i))||void 0===t?void 0:t.markers)||fk.empty},initialSpacer:()=>new T$(t,!1),domEventHandlers:Object.assign(Object.assign({},o),{click:(e,t,n)=>{if(o.click&&o.click(e,t,n))return!0;let r=v$(e.state,t.from,t.to);if(r)return e.dispatch({effects:m$.of(r)}),!0;let i=h$(e.state,t.from,t.to);return!!i&&(e.dispatch({effects:f$.of(i)}),!0)}})}),O$()]}const M$=fT.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class $${constructor(e,t){let n;function r(e){let t=$k.newName();return(n||(n=Object.create(null)))["."+t]=e,t}this.specs=e;const i="string"==typeof t.all?t.all:t.all?r(t.all):void 0,o=t.scope;this.scope=o instanceof PM?e=>e.prop(CM)==o.data:o?e=>e==o:void 0,this.style=cM(e.map(e=>({tag:e.tag,class:e.class||r(Object.assign({},e,{tag:null}))})),{all:i}).style,this.module=n?new $k(n):null,this.themeType=t.themeType}static define(e,t){return new $$(e,t||{})}}const P$=Sw.define(),R$=Sw.define({combine:e=>e.length?[e[0]]:null});function j$(e){let t=e.facet(P$);return t.length?t:e.facet(R$)}function N$(e,t){let n,r=[I$];return e instanceof $$&&(e.module&&r.push(fT.styleModule.of(e.module)),n=e.themeType),(null==t?void 0:t.fallback)?r.push(R$.of(e)):n?r.push(P$.computeN([fT.darkTheme],t=>t.facet(fT.darkTheme)==("dark"==n)?[e]:[])):r.push(P$.of(e)),r}class D${constructor(e){this.markCache=Object.create(null),this.tree=NM(e.state),this.decorations=this.buildDeco(e,j$(e.state))}update(e){let t=NM(e.state),n=j$(e.state),r=n!=j$(e.startState);t.length<e.view.viewport.to&&!r&&t.type==this.tree.type?this.decorations=this.decorations.map(e.changes):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n))}buildDeco(e,t){if(!t||!this.tree.length)return FO.none;let n=new mk;for(let{from:r,to:i}of e.visibleRanges)uM(this.tree,t,(e,t,r)=>{n.add(e,t,this.markCache[r]||(this.markCache[r]=FO.mark({class:r})))},r,i);return n.finish()}}const I$=Rw.high(pE.fromClass(D$,{decorations:e=>e.decorations})),L$=$$.define([{tag:AM.meta,color:"#404740"},{tag:AM.link,textDecoration:"underline"},{tag:AM.heading,textDecoration:"underline",fontWeight:"bold"},{tag:AM.emphasis,fontStyle:"italic"},{tag:AM.strong,fontWeight:"bold"},{tag:AM.strikethrough,textDecoration:"line-through"},{tag:AM.keyword,color:"#708"},{tag:[AM.atom,AM.bool,AM.url,AM.contentSeparator,AM.labelName],color:"#219"},{tag:[AM.literal,AM.inserted],color:"#164"},{tag:[AM.string,AM.deleted],color:"#a11"},{tag:[AM.regexp,AM.escape,AM.special(AM.string)],color:"#e40"},{tag:AM.definition(AM.variableName),color:"#00f"},{tag:AM.local(AM.variableName),color:"#30a"},{tag:[AM.typeName,AM.namespace],color:"#085"},{tag:AM.className,color:"#167"},{tag:[AM.special(AM.variableName),AM.macroName],color:"#256"},{tag:AM.definition(AM.propertyName),color:"#00c"},{tag:AM.comment,color:"#940"},{tag:AM.invalid,color:"#f00"}]),B$=fT.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),z$=Sw.define({combine:e=>ck(e,{afterCursor:!0,brackets:"()[]{}",maxScanDistance:1e4,renderMatch:Q$})}),F$=FO.mark({class:"cm-matchingBracket"}),U$=FO.mark({class:"cm-nonmatchingBracket"});function Q$(e){let t=[],n=e.matched?F$:U$;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}const q$=[Aw.define({create:()=>FO.none,update(e,t){if(!t.docChanged&&!t.selection)return e;let n=[],r=t.state.facet(z$);for(let e of t.state.selection.ranges){if(!e.empty)continue;let i=X$(t.state,e.head,-1,r)||e.head>0&&X$(t.state,e.head-1,1,r)||r.afterCursor&&(X$(t.state,e.head,1,r)||e.head<t.state.doc.length&&X$(t.state,e.head+1,-1,r));i&&(n=n.concat(r.renderMatch(i,t.state)))}return FO.set(n,!0)},provide:e=>fT.decorations.from(e)}),B$];function G$(e={}){return[z$.of(e),q$]}const H$=new tM.c;function V$(e,t,n){let r=e.prop(t<0?tM.c.openedBy:tM.c.closedBy);if(r)return r;if(1==e.name.length){let r=n.indexOf(e.name);if(r>-1&&r%2==(t<0?1:0))return[n[r+t]]}return null}function W$(e){let t=e.type.prop(H$);return t?t(e.node):e}function X$(e,t,n,r={}){let i=r.maxScanDistance||1e4,o=r.brackets||"()[]{}",s=NM(e),a=s.resolveInner(t,n);for(let r=a;r;r=r.parent){let i=V$(r.type,n,o);if(i&&r.from<r.to){let s=W$(r);if(s&&(n>0?t>=s.from&&t<s.to:t>s.from&&t<=s.to))return Y$(e,t,n,r,s,i,o)}}return function(e,t,n,r,i,o,s){let a=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),l=s.indexOf(a);if(l<0||l%2==0!=n>0)return null;let c={from:n<0?t-1:t,to:n>0?t+1:t},u=e.doc.iterRange(t,n>0?e.doc.length:0),d=0;for(let e=0;!u.next().done&&e<=o;){let o=u.value;n<0&&(e+=o.length);let a=t+e*n;for(let e=n>0?0:o.length-1,t=n>0?o.length:-1;e!=t;e+=n){let t=s.indexOf(o[e]);if(!(t<0||r.resolveInner(a+e,1).type!=i))if(t%2==0==n>0)d++;else{if(1==d)return{start:c,end:{from:a+e,to:a+e+1},matched:t>>1==l>>1};d--}}n>0&&(e+=o.length)}return u.done?{start:c,matched:!1}:null}(e,t,n,s,a.type,i,o)}function Y$(e,t,n,r,i,o,s){let a=r.parent,l={from:i.from,to:i.to},c=0,u=null==a?void 0:a.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do{if(n<0?u.to<=r.from:u.from>=r.to){if(0==c&&o.indexOf(u.type.name)>-1&&u.from<u.to){let e=W$(u);return{start:l,end:e?{from:e.from,to:e.to}:void 0,matched:!0}}if(V$(u.type,n,s))c++;else if(V$(u.type,-n,s)){if(0==c){let e=W$(u);return{start:l,end:e&&e.from<e.to?{from:e.from,to:e.to}:void 0,matched:!1}}c--}}}while(n<0?u.prevSibling():u.nextSibling());return{start:l,matched:!1}}const Z$=Object.create(null),J$=[tM.e.none],K$=[],eP=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])eP[e]=nP(Z$,t);function tP(e,t){K$.indexOf(e)>-1||(K$.push(e),console.warn(t))}function nP(e,t){let n=null;for(let r of t.split(".")){let t=e[r]||AM[r];t?"function"==typeof t?n?n=t(n):tP(r,`Modifier ${r} used at start of tag`):n?tP(r,`Tag ${r} used as modifier`):n=t:tP(r,"Unknown highlighting tag "+r)}if(!n)return 0;let r=t.replace(/ /g,"_"),i=tM.e.define({id:J$.length,name:r,props:[sM({[r]:n})]});return J$.push(i),i.id}function rP(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return!!i&&(r(n.update(i)),!0)}}const iP=rP(cP,0),oP=rP(lP,0),sP=rP((e,t)=>lP(e,t,function(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to),o=t.length-1;o>=0&&t[o].to>r.from?t[o].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}(t)),0);function aP(e,t){let n=e.languageDataAt("commentTokens",t);return n.length?n[0]:{}}function lP(e,t,n=t.selection.ranges){let r=n.map(e=>aP(t,e.from).block);if(!r.every(e=>e))return null;let i=n.map((e,n)=>function(e,{open:t,close:n},r,i){let o,s,a=e.sliceDoc(r-50,r),l=e.sliceDoc(i,i+50),c=/\s*$/.exec(a)[0].length,u=/^\s*/.exec(l)[0].length,d=a.length-c;if(a.slice(d-t.length,d)==t&&l.slice(u,u+n.length)==n)return{open:{pos:r-c,margin:c&&1},close:{pos:i+u,margin:u&&1}};i-r<=100?o=s=e.sliceDoc(r,i):(o=e.sliceDoc(r,r+50),s=e.sliceDoc(i-50,i));let h=/^\s*/.exec(o)[0].length,p=/\s*$/.exec(s)[0].length,f=s.length-p-n.length;return o.slice(h,h+t.length)==t&&s.slice(f,f+n.length)==n?{open:{pos:r+h+t.length,margin:/\s/.test(o.charAt(h+t.length))?1:0},close:{pos:i-p-n.length,margin:/\s/.test(s.charAt(f-1))?1:0}}:null}(t,r[n],e.from,e.to));if(2!=e&&!i.every(e=>e))return{changes:t.changes(n.map((e,t)=>i[t]?[]:[{from:e.from,insert:r[t].open+" "},{from:e.to,insert:" "+r[t].close}]))};if(1!=e&&i.some(e=>e)){let e=[];for(let t,n=0;n<i.length;n++)if(t=i[n]){let i=r[n],{open:o,close:s}=t;e.push({from:o.pos-i.open.length,to:o.pos+o.margin},{from:s.pos-s.margin,to:s.pos+i.close.length})}return{changes:e}}return null}function cP(e,t,n=t.selection.ranges){let r=[],i=-1;for(let{from:e,to:o}of n){let n=r.length,s=1e9,a=aP(t,e).line;if(a){for(let n=e;n<=o;){let l=t.doc.lineAt(n);if(l.from>i&&(e==o||o>l.from)){i=l.from;let e=/^\s*/.exec(l.text)[0].length,t=e==l.length,n=l.text.slice(e,e+a.length)==a?e:-1;e<l.text.length&&e<s&&(s=e),r.push({line:l,comment:n,token:a,indent:e,empty:t,single:!1})}n=l.to+1}if(s<1e9)for(let e=n;e<r.length;e++)r[e].indent<r[e].line.text.length&&(r[e].indent=s);r.length==n+1&&(r[n].single=!0)}}if(2!=e&&r.some(e=>e.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:i,empty:o,single:s}of r)!s&&o||e.push({from:t.from+i,insert:n+" "});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(1!=e&&r.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:i}of r)if(n>=0){let r=t.from+n,o=r+i.length;" "==t.text[o-t.from]&&o++,e.push({from:r,to:o})}return{changes:e}}return null}const uP=Vw.define(),dP=Vw.define(),hP=Sw.define(),pP=Sw.define({combine:e=>ck(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})});const fP=Aw.define({create:()=>MP.empty,update(e,t){let n=t.state.facet(pP),r=t.annotation(uP);if(r){let i=t.docChanged?bw.single(function(e){let t=0;return e.iterChangedRanges((e,n)=>t=n),t}(t.changes)):void 0,o=_P.fromTransaction(t,i),s=r.side,a=0==s?e.undone:e.done;return a=o?xP(a,a.length,n.minDepth,o):OP(a,t.startState.selection),new MP(0==s?r.rest:a,0==s?a:r.rest)}let i=t.annotation(dP);if("full"!=i&&"before"!=i||(e=e.isolate()),!1===t.annotation(Zw.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let o=_P.fromTransaction(t),s=t.annotation(Zw.time),a=t.annotation(Zw.userEvent);return o?e=e.addChanges(o,s,a,n,t):t.selection&&(e=e.addSelection(t.startState.selection,s,a,n.newGroupDelay)),"full"!=i&&"after"!=i||(e=e.isolate()),e},toJSON:e=>({done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}),fromJSON:e=>new MP(e.done.map(_P.fromJSON),e.undone.map(_P.fromJSON))});function mP(e={}){return[fP,pP.of(e),fT.domEventHandlers({beforeinput(e,t){let n="historyUndo"==e.inputType?bP:"historyRedo"==e.inputType?vP:null;return!!n&&(e.preventDefault(),n(t))}})]}function gP(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(fP,!1);if(!i)return!1;let o=i.pop(e,n,t);return!!o&&(r(o),!0)}}const bP=gP(0,!1),vP=gP(1,!1),yP=gP(0,!0),SP=gP(1,!0);class _P{constructor(e,t,n,r,i){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(e){return new _P(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:null===(e=this.changes)||void 0===e?void 0:e.toJSON(),mapped:null===(t=this.mapped)||void 0===t?void 0:t.toJSON(),startSelection:null===(n=this.startSelection)||void 0===n?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(e){return new _P(e.changes&&cw.fromJSON(e.changes),[],e.mapped&&lw.fromJSON(e.mapped),e.startSelection&&bw.fromJSON(e.startSelection),e.selectionsAfter.map(bw.fromJSON))}static fromTransaction(e,t){let n=kP;for(let t of e.startState.facet(hP)){let r=t(e);r.length&&(n=n.concat(r))}return!n.length&&e.changes.empty?null:new _P(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,kP)}static selection(e){return new _P(void 0,kP,void 0,void 0,e)}}function xP(e,t,n,r){let i=t+1>n+20?t-n-1:0,o=e.slice(i,t);return o.push(r),o}function wP(e,t){return e.length?t.length?e.concat(t):e:t}const kP=[];function OP(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-200));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),xP(e,e.length-1,1e9,n.setSelAfter(r)))}return[_P.selection([t])]}function EP(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function AP(e,t){if(!e.length)return e;let n=e.length,r=kP;for(;n;){let i=TP(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let t=e.slice(0,n);return t[n-1]=i,t}t=i.mapped,n--,r=i.selectionsAfter}return r.length?[_P.selection(r)]:kP}function TP(e,t,n){let r=wP(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):kP,n);if(!e.changes)return _P.selection(r);let i=e.changes.map(t),o=t.mapDesc(e.changes,!0),s=e.mapped?e.mapped.composeDesc(o):o;return new _P(i,Yw.mapEffects(e.effects,t),s,e.startSelection.map(o),r)}const CP=/^(input\.type|delete)($|\.)/;class MP{constructor(e,t,n=0,r){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new MP(this.done,this.undone):this}addChanges(e,t,n,r,i){let o=this.done,s=o[o.length-1];return o=s&&s.changes&&!s.changes.empty&&e.changes&&(!n||CP.test(n))&&(!s.selectionsAfter.length&&t-this.prevTime<r.newGroupDelay&&r.joinToEvent(i,function(e,t){let n=[],r=!1;return e.iterChangedRanges((e,t)=>n.push(e,t)),t.iterChangedRanges((e,t,i,o)=>{for(let e=0;e<n.length;){let t=n[e++],s=n[e++];o>=t&&i<=s&&(r=!0)}}),r}(s.changes,e.changes))||"input.type.compose"==n)?xP(o,o.length-1,r.minDepth,new _P(e.changes.compose(s.changes),wP(e.effects,s.effects),s.mapped,s.startSelection,kP)):xP(o,o.length,r.minDepth,e),new MP(o,kP,t,n)}addSelection(e,t,n,r){let i=this.done.length?this.done[this.done.length-1].selectionsAfter:kP;return i.length>0&&t-this.prevTime<r&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&(o=i[i.length-1],s=e,o.ranges.length==s.ranges.length&&0===o.ranges.filter((e,t)=>e.empty!=s.ranges[t].empty).length)?this:new MP(OP(this.done,e),this.undone,t,n);var o,s}addMapping(e){return new MP(AP(this.done,e),AP(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=0==e?this.done:this.undone;if(0==r.length)return null;let i=r[r.length-1];if(n&&i.selectionsAfter.length)return t.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:uP.of({side:e,rest:EP(r)}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0});if(i.changes){let n=1==r.length?kP:r.slice(0,r.length-1);return i.mapped&&(n=AP(n,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:uP.of({side:e,rest:n}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}return null}}MP.empty=new MP(kP,kP);const $P=[{key:"Mod-z",run:bP,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:vP,preventDefault:!0},{linux:"Ctrl-Shift-z",run:vP,preventDefault:!0},{key:"Mod-u",run:yP,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:SP,preventDefault:!0}];function PP(e,t){return bw.create(e.ranges.map(t),e.mainIndex)}function RP(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function jP({state:e,dispatch:t},n){let r=PP(e.selection,n);return!r.eq(e.selection)&&(t(RP(e,r)),!0)}function NP(e,t){return bw.cursor(t?e.to:e.from)}function DP(e,t){return jP(e,n=>n.empty?e.moveByChar(n,t):NP(n,t))}function IP(e){return e.textDirectionAt(e.state.selection.main.head)==wE.LTR}const LP=e=>DP(e,!IP(e)),BP=e=>DP(e,IP(e));function zP(e,t){return jP(e,n=>n.empty?e.moveByGroup(n,t):NP(n,t))}function FP(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function UP(e,t,n){let r,i,o=NM(e).resolveInner(t.head),s=n?tM.c.closedBy:tM.c.openedBy;for(let r=t.head;;){let t=n?o.childAfter(r):o.childBefore(r);if(!t)break;FP(e,t,s)?o=t:r=n?t.to:t.from}return i=o.type.prop(s)&&(r=n?X$(e,o.from,1):X$(e,o.to,-1))&&r.matched?n?r.end.to:r.end.from:n?o.to:o.from,bw.cursor(i,n?-1:1)}function QP(e,t){return jP(e,n=>{if(!n.empty)return NP(n,t);let r=e.moveVertically(n,t);return r.head!=n.head?r:e.moveToLineBoundary(n,t)})}const qP=e=>QP(e,!1),GP=e=>QP(e,!0);function HP(e){let t,n=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,r=0,i=0;if(n){for(let t of e.state.facet(fT.scrollMargins)){let n=t(e);(null==n?void 0:n.top)&&(r=Math.max(null==n?void 0:n.top,r)),(null==n?void 0:n.bottom)&&(i=Math.max(null==n?void 0:n.bottom,i))}t=e.scrollDOM.clientHeight-r-i}else t=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:r,marginBottom:i,selfScroll:n,height:Math.max(e.defaultLineHeight,t-5)}}function VP(e,t){let n,r=HP(e),{state:i}=e,o=PP(i.selection,n=>n.empty?e.moveVertically(n,t,r.height):NP(n,t));if(o.eq(i.selection))return!1;if(r.selfScroll){let t=e.coordsAtPos(i.selection.main.head),s=e.scrollDOM.getBoundingClientRect(),a=s.top+r.marginTop,l=s.bottom-r.marginBottom;t&&t.top>a&&t.bottom<l&&(n=fT.scrollIntoView(o.main.head,{y:"start",yMargin:t.top-a}))}return e.dispatch(RP(i,o),{effects:n}),!0}const WP=e=>VP(e,!1),XP=e=>VP(e,!0);function YP(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(i=bw.cursor(r.from+n))}return i}function ZP(e,t,n){let r=!1,i=PP(e.selection,t=>{let i=X$(e,t.head,-1)||X$(e,t.head,1)||t.head>0&&X$(e,t.head-1,1)||t.head<e.doc.length&&X$(e,t.head+1,-1);if(!i||!i.end)return t;r=!0;let o=i.start.from==t.head?i.end.to:i.end.from;return n?bw.range(t.anchor,o):bw.cursor(o)});return!!r&&(t(RP(e,i)),!0)}function JP(e,t){let n=PP(e.state.selection,e=>{let n=t(e);return bw.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)});return!n.eq(e.state.selection)&&(e.dispatch(RP(e.state,n)),!0)}function KP(e,t){return JP(e,n=>e.moveByChar(n,t))}const eR=e=>KP(e,!IP(e)),tR=e=>KP(e,IP(e));function nR(e,t){return JP(e,n=>e.moveByGroup(n,t))}function rR(e,t){return JP(e,n=>e.moveVertically(n,t))}const iR=e=>rR(e,!1),oR=e=>rR(e,!0);function sR(e,t){return JP(e,n=>e.moveVertically(n,t,HP(e).height))}const aR=e=>sR(e,!1),lR=e=>sR(e,!0),cR=({state:e,dispatch:t})=>(t(RP(e,{anchor:0})),!0),uR=({state:e,dispatch:t})=>(t(RP(e,{anchor:e.doc.length})),!0),dR=({state:e,dispatch:t})=>(t(RP(e,{anchor:e.selection.main.anchor,head:0})),!0),hR=({state:e,dispatch:t})=>(t(RP(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0);function pR(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:r}=e,i=r.changeByRange(r=>{let{from:i,to:o}=r;if(i==o){let r=t(i);r<i?(n="delete.backward",r=fR(e,r,!1)):r>i&&(n="delete.forward",r=fR(e,r,!0)),i=Math.min(i,r),o=Math.max(o,r)}else i=fR(e,i,!1),o=fR(e,o,!0);return i==o?{range:r}:{changes:{from:i,to:o},range:bw.cursor(i)}});return!i.changes.empty&&(e.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:"delete.selection"==n?fT.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function fR(e,t,n){if(e instanceof fT)for(let r of e.state.facet(fT.atomicRanges).map(t=>t(e)))r.between(t,t,(e,r)=>{e<t&&r>t&&(t=n?r:e)});return t}const mR=(e,t)=>pR(e,n=>{let r,i,{state:o}=e,s=o.doc.lineAt(n);if(!t&&n>s.from&&n<s.from+200&&!/[^ \t]/.test(r=s.text.slice(0,n-s.from))){if("\t"==r[r.length-1])return n-1;let e=Ek(r,o.tabSize)%WM(o)||WM(o);for(let t=0;t<e&&" "==r[r.length-1-t];t++)n--;i=n}else i=Jx(s.text,n-s.from,t,t)+s.from,i==n&&s.number!=(t?o.doc.lines:1)&&(i+=t?1:-1);return i}),gR=e=>mR(e,!1),bR=e=>mR(e,!0),vR=(e,t)=>pR(e,n=>{let r=n,{state:i}=e,o=i.doc.lineAt(r),s=i.charCategorizer(r);for(let e=null;;){if(r==(t?o.to:o.from)){r==n&&o.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}let a=Jx(o.text,r-o.from,t)+o.from,l=o.text.slice(Math.min(r,a)-o.from,Math.max(r,a)-o.from),c=s(l);if(null!=e&&c!=e)break;" "==l&&r==n||(e=c),r=a}return r}),yR=e=>vR(e,!1),SR=e=>pR(e,t=>{let n=e.lineBlockAt(t).to;return t<n?n:Math.min(e.state.doc.length,t+1)});function _R(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),o=e.doc.lineAt(r.to);if(r.empty||r.to!=o.from||(o=e.doc.lineAt(r.to-1)),n>=i.number){let e=t[t.length-1];e.to=o.to,e.ranges.push(r)}else t.push({from:i.from,to:o.to,ranges:[r]});n=o.number+1}return t}function xR(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let t of _R(e)){if(n?t.to==e.doc.length:0==t.from)continue;let o=e.doc.lineAt(n?t.to+1:t.from-1),s=o.length+1;if(n){r.push({from:t.to,to:o.to},{from:t.from,insert:o.text+e.lineBreak});for(let n of t.ranges)i.push(bw.range(Math.min(e.doc.length,n.anchor+s),Math.min(e.doc.length,n.head+s)))}else{r.push({from:o.from,to:t.from},{from:t.to,insert:e.lineBreak+o.text});for(let e of t.ranges)i.push(bw.range(e.anchor-s,e.head-s))}}return!!r.length&&(t(e.update({changes:r,scrollIntoView:!0,selection:bw.create(i,e.selection.mainIndex),userEvent:"move.line"})),!0)}function wR(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of _R(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});return t(e.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const kR=OR(!1);function OR(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange(n=>{let{from:r,to:i}=n,o=t.doc.lineAt(r),s=!e&&r==i&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n,r=NM(e).resolveInner(t),i=r.childBefore(t),o=r.childAfter(t);return i&&o&&i.to<=t&&o.from>=t&&(n=i.type.prop(tM.c.closedBy))&&n.indexOf(o.name)>-1&&e.doc.lineAt(i.to).from==e.doc.lineAt(o.from).from?{from:i.to,to:o.from}:null}(t,r);e&&(r=i=(i<=o.to?o:t.doc.lineAt(i)).to);let a=new ZM(t,{simulateBreak:r,simulateDoubleBreak:!!s}),l=YM(a,r);for(null==l&&(l=/^\s*/.exec(t.doc.lineAt(r).text)[0].length);i<o.to&&/\s/.test(o.text[i-o.from]);)i++;s?({from:r,to:i}=s):r>o.from&&r<o.from+100&&!/\S/.test(o.text.slice(0,r))&&(r=o.from);let c=["",XM(t,l)];return s&&c.push(XM(t,a.lineIndent(o.from,-1))),{changes:{from:r,to:i,insert:zx.of(c)},range:bw.cursor(r+1+c[1].length)}});return n(t.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function ER(e,t){let n=-1;return e.changeByRange(r=>{let i=[];for(let o=r.from;o<=r.to;){let s=e.doc.lineAt(o);s.number>n&&(r.empty||r.to>s.from)&&(t(s,i,r),n=s.number),o=s.to+1}let o=e.changes(i);return{changes:i,range:bw.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}})}const AR=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(ER(e,(t,n)=>{n.push({from:t.from,insert:e.facet(VM)})}),{userEvent:"input.indent"})),!0),TR=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(ER(e,(t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let i=Ek(r,e.tabSize),o=0,s=XM(e,Math.max(0,i-WM(e)));for(;o<r.length&&o<s.length&&r.charCodeAt(o)==s.charCodeAt(o);)o++;n.push({from:t.from+o,to:t.from+r.length,insert:s.slice(o)})}),{userEvent:"delete.dedent"})),!0),CR=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>jP(e,t=>UP(e.state,t,!IP(e))),shift:e=>JP(e,t=>UP(e.state,t,!IP(e)))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>jP(e,t=>UP(e.state,t,IP(e))),shift:e=>JP(e,t=>UP(e.state,t,IP(e)))},{key:"Alt-ArrowUp",run:({state:e,dispatch:t})=>xR(e,t,!1)},{key:"Shift-Alt-ArrowUp",run:({state:e,dispatch:t})=>wR(e,t,!1)},{key:"Alt-ArrowDown",run:({state:e,dispatch:t})=>xR(e,t,!0)},{key:"Shift-Alt-ArrowDown",run:({state:e,dispatch:t})=>wR(e,t,!0)},{key:"Escape",run:({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=bw.create([n.main]):n.main.empty||(r=bw.create([bw.cursor(n.main.head)])),!!r&&(t(RP(e,r)),!0)}},{key:"Mod-Enter",run:OR(!0)},{key:"Alt-l",mac:"Ctrl-l",run:({state:e,dispatch:t})=>{let n=_R(e).map(({from:t,to:n})=>bw.range(t,Math.min(n+1,e.doc.length)));return t(e.update({selection:bw.create(n),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:e,dispatch:t})=>{let n=PP(e.selection,t=>{var n;let r=NM(e).resolveInner(t.head,1);for(;!(r.from<t.from&&r.to>=t.to||r.to>t.to&&r.from<=t.from)&&(null===(n=r.parent)||void 0===n?void 0:n.parent);)r=r.parent;return bw.range(r.to,r.from)});return t(RP(e,n)),!0},preventDefault:!0},{key:"Mod-[",run:TR},{key:"Mod-]",run:AR},{key:"Mod-Alt-\\",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new ZM(e,{overrideIndentation:e=>{let t=n[e];return null==t?-1:t}}),i=ER(e,(t,i,o)=>{let s=YM(r,t.from);if(null==s)return;/\S/.test(t.text)||(s=0);let a=/^\s*/.exec(t.text)[0],l=XM(e,s);(a!=l||o.from<t.from+a.length)&&(n[t.from]=s,i.push({from:t.from,to:t.from+a.length,insert:l}))});return i.changes.empty||t(e.update(i,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(_R(t).map(({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n}))),r=PP(t.selection,t=>e.moveVertically(t,!0)).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:e,dispatch:t})=>ZP(e,t,!1)},{key:"Mod-/",run:e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=aP(e.state,n.from);return r.line?iP(e):!!r.block&&sP(e)}},{key:"Alt-A",run:oP}].concat([{key:"ArrowLeft",run:LP,shift:eR,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:e=>zP(e,!IP(e)),shift:e=>nR(e,!IP(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>jP(e,t=>YP(e,t,!IP(e))),shift:e=>JP(e,t=>YP(e,t,!IP(e))),preventDefault:!0},{key:"ArrowRight",run:BP,shift:tR,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>zP(e,IP(e)),shift:e=>nR(e,IP(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>jP(e,t=>YP(e,t,IP(e))),shift:e=>JP(e,t=>YP(e,t,IP(e))),preventDefault:!0},{key:"ArrowUp",run:qP,shift:iR,preventDefault:!0},{mac:"Cmd-ArrowUp",run:cR,shift:dR},{mac:"Ctrl-ArrowUp",run:WP,shift:aR},{key:"ArrowDown",run:GP,shift:oR,preventDefault:!0},{mac:"Cmd-ArrowDown",run:uR,shift:hR},{mac:"Ctrl-ArrowDown",run:XP,shift:lR},{key:"PageUp",run:WP,shift:aR},{key:"PageDown",run:XP,shift:lR},{key:"Home",run:e=>jP(e,t=>YP(e,t,!1)),shift:e=>JP(e,t=>YP(e,t,!1)),preventDefault:!0},{key:"Mod-Home",run:cR,shift:dR},{key:"End",run:e=>jP(e,t=>YP(e,t,!0)),shift:e=>JP(e,t=>YP(e,t,!0)),preventDefault:!0},{key:"Mod-End",run:uR,shift:hR},{key:"Enter",run:kR},{key:"Mod-a",run:({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:gR,shift:gR},{key:"Delete",run:bR},{key:"Mod-Backspace",mac:"Alt-Backspace",run:yR},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>vR(e,!0)},{mac:"Mod-Backspace",run:e=>pR(e,t=>{let n=e.lineBlockAt(t).from;return t>n?n:Math.max(0,t-1)})},{mac:"Mod-Delete",run:SR}].concat([{key:"Ctrl-b",run:LP,shift:eR,preventDefault:!0},{key:"Ctrl-f",run:BP,shift:tR},{key:"Ctrl-p",run:qP,shift:iR},{key:"Ctrl-n",run:GP,shift:oR},{key:"Ctrl-a",run:e=>jP(e,t=>bw.cursor(e.lineBlockAt(t.head).from,1)),shift:e=>JP(e,t=>bw.cursor(e.lineBlockAt(t.head).from))},{key:"Ctrl-e",run:e=>jP(e,t=>bw.cursor(e.lineBlockAt(t.head).to,-1)),shift:e=>JP(e,t=>bw.cursor(e.lineBlockAt(t.head).to))},{key:"Ctrl-d",run:bR},{key:"Ctrl-h",run:gR},{key:"Ctrl-k",run:SR},{key:"Ctrl-Alt-h",run:yR},{key:"Ctrl-o",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:zx.of(["",""])},range:bw.cursor(e.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(t=>{if(!t.empty||0==t.from||t.from==e.doc.length)return{range:t};let n=t.from,r=e.doc.lineAt(n),i=n==r.from?n-1:Jx(r.text,n-r.from,!1)+r.from,o=n==r.to?n+1:Jx(r.text,n-r.from,!0)+r.from;return{changes:{from:i,to:o,insert:e.doc.slice(n,o).append(e.doc.slice(i,n))},range:bw.cursor(o)}});return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:XP}].map(e=>({mac:e.key,run:e.run,shift:e.shift})))),MR={key:"Tab",run:AR,shift:TR};function $R(){var e=arguments[0];"string"==typeof e&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&"object"==typeof n&&null==n.nodeType&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];"string"==typeof i?e.setAttribute(r,i):null!=i&&(e[r]=i)}t++}for(;t<arguments.length;t++)PR(e,arguments[t]);return e}function PR(e,t){if("string"==typeof t)e.appendChild(document.createTextNode(t));else if(null==t);else if(null!=t.nodeType)e.appendChild(t);else{if(!Array.isArray(t))throw new RangeError("Unsupported child node: "+t);for(var n=0;n<t.length;n++)PR(e,t[n])}}const RR="function"==typeof String.prototype.normalize?e=>e.normalize("NFKD"):e=>e;class jR{constructor(e,t,n=0,r=e.length,i,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?e=>i(RR(e)):RR,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return rw(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=iw(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=ow(e);let r=this.normalize(t);for(let e=0,i=n;;e++){let o=r.charCodeAt(e),s=this.match(o,i);if(s)return this.value=s,this;if(e==r.length-1)break;i==n&&e<t.length&&t.charCodeAt(e)==o&&i++}}}match(e,t){let n=null;for(let r=0;r<this.matches.length;r+=2){let i=this.matches[r],o=!1;this.query.charCodeAt(i)==e&&(i==this.query.length-1?n={from:this.matches[r+1],to:t+1}:(this.matches[r]++,o=!0)),o||(this.matches.splice(r,2),r-=2)}return this.query.charCodeAt(0)==e&&(1==this.query.length?n={from:t,to:t+1}:this.matches.push(1,t)),n&&this.test&&!this.test(n.from,n.to,this.buffer,this.bufferPos)&&(n=null),n}}"undefined"!=typeof Symbol&&(jR.prototype[Symbol.iterator]=function(){return this});const NR={from:-1,to:-1,match:/.*/.exec("")},DR="gm"+(null==/x/.unicode?"":"u");class IR{constructor(e,t,n,r=0,i=e.length){if(this.text=e,this.to=i,this.curLine="",this.done=!1,this.value=NR,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new zR(e,t,n,r,i);this.re=new RegExp(t,DR+((null==n?void 0:n.ignoreCase)?"i":"")),this.test=null==n?void 0:n.test,this.iter=e.iter();let o=e.lineAt(r);this.curLineStart=o.from,this.matchPos=FR(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=FR(this.text,r+(n==r?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<r||n>this.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this;e=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length<this.to))return this.done=!0,this;this.nextLine(),e=0}}}}const LR=new WeakMap;class BR{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,n){let r=LR.get(e);if(!r||r.from>=n||r.to<=t){let r=new BR(t,e.sliceString(t,n));return LR.set(e,r),r}if(r.from==t&&r.to==n)return r;let{text:i,from:o}=r;return o>t&&(i=e.sliceString(t,o)+i,o=t),r.to<n&&(i+=e.sliceString(r.to,n)),LR.set(e,new BR(o,i)),new BR(t,i.slice(t-o,n-o))}}class zR{constructor(e,t,n,r,i){this.text=e,this.to=i,this.done=!1,this.value=NR,this.matchPos=FR(e,r),this.re=new RegExp(t,DR+((null==n?void 0:n.ignoreCase)?"i":"")),this.test=null==n?void 0:n.test,this.flat=BR.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,match:t},this.matchPos=FR(this.text,n+(e==n?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=BR.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function FR(e,t){if(t>=e.length)return t;let n,r=e.lineAt(t);for(;t<r.to&&(n=r.text.charCodeAt(t-r.from))>=56320&&n<57344;)t++;return t}function UR(e){let t=$R("input",{class:"cm-textfield",name:"line"});function n(){let n=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!n)return;let{state:r}=e,i=r.doc.lineAt(r.selection.main.head),[,o,s,a,l]=n,c=a?+a.slice(1):0,u=s?+s:i.number;if(s&&l){let e=u/100;o&&(e=e*("-"==o?-1:1)+i.number/r.doc.lines),u=Math.round(r.doc.lines*e)}else s&&o&&(u=u*("-"==o?-1:1)+i.number);let d=r.doc.line(Math.max(1,Math.min(r.doc.lines,u)));e.dispatch({effects:QR.of(!1),selection:bw.cursor(d.from+Math.max(0,Math.min(c,d.length))),scrollIntoView:!0}),e.focus()}return{dom:$R("form",{class:"cm-gotoLine",onkeydown:t=>{27==t.keyCode?(t.preventDefault(),e.dispatch({effects:QR.of(!1)}),e.focus()):13==t.keyCode&&(t.preventDefault(),n())},onsubmit:e=>{e.preventDefault(),n()}},$R("label",e.state.phrase("Go to line"),": ",t)," ",$R("button",{class:"cm-button",type:"submit"},e.state.phrase("go")))}}"undefined"!=typeof Symbol&&(IR.prototype[Symbol.iterator]=zR.prototype[Symbol.iterator]=function(){return this});const QR=Yw.define(),qR=Aw.define({create:()=>!0,update(e,t){for(let n of t.effects)n.is(QR)&&(e=n.value);return e},provide:e=>PC.from(e,e=>e?UR:null)}),GR=fT.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),HR={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},VR=Sw.define({combine:e=>ck(e,HR,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})});function WR(e){let t=[KR,JR];return e&&t.push(VR.of(e)),t}const XR=FO.mark({class:"cm-selectionMatch"}),YR=FO.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function ZR(e,t,n,r){return!(0!=n&&e(t.sliceDoc(n-1,n))==ik.Word||r!=t.doc.length&&e(t.sliceDoc(r,r+1))==ik.Word)}const JR=pE.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(VR),{state:n}=e,r=n.selection;if(r.ranges.length>1)return FO.none;let i,o=r.main,s=null;if(o.empty){if(!t.highlightWordAroundCursor)return FO.none;let e=n.wordAt(o.head);if(!e)return FO.none;s=n.charCategorizer(o.head),i=n.sliceDoc(e.from,e.to)}else{let e=o.to-o.from;if(e<t.minSelectionLength||e>200)return FO.none;if(t.wholeWords){if(i=n.sliceDoc(o.from,o.to),s=n.charCategorizer(o.head),!ZR(s,n,o.from,o.to)||!function(e,t,n,r){return e(t.sliceDoc(n,n+1))==ik.Word&&e(t.sliceDoc(r-1,r))==ik.Word}(s,n,o.from,o.to))return FO.none}else if(i=n.sliceDoc(o.from,o.to).trim(),!i)return FO.none}let a=[];for(let r of e.visibleRanges){let e=new jR(n.doc,i,r.from,r.to);for(;!e.next().done;){let{from:r,to:i}=e.value;if((!s||ZR(s,n,r,i))&&(o.empty&&r<=o.from&&i>=o.to?a.push(YR.range(r,i)):(r>=o.to||i<=o.from)&&a.push(XR.range(r,i)),a.length>t.maxMatches))return FO.none}}return FO.set(a)}},{decorations:e=>e.decorations}),KR=fT.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}});const ej=Sw.define({combine:e=>ck(e,{top:!1,caseSensitive:!1,literal:!1,wholeWord:!1,createPanel:e=>new Cj(e),scrollToMatch:e=>fT.scrollIntoView(e)})});class tj{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,DR),!0}catch(e){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new lj(this):new ij(this)}getCursor(e,t=0,n){let r=e.doc?e:lk.create({doc:e});return null==n&&(n=r.doc.length),this.regexp?oj(this,r,t,n):rj(this,r,t,n)}}class nj{constructor(e){this.spec=e}}function rj(e,t,n,r){return new jR(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),e.wholeWord?(i=t.doc,o=t.charCategorizer(t.selection.main.head),(e,t,n,r)=>((r>e||r+n.length<t)&&(r=Math.max(0,e-2),n=i.sliceString(r,Math.min(i.length,t+2))),!(o(sj(n,e-r))==ik.Word&&o(aj(n,e-r))==ik.Word||o(aj(n,t-r))==ik.Word&&o(sj(n,t-r))==ik.Word))):void 0);var i,o}class ij extends nj{constructor(e){super(e)}nextMatch(e,t,n){let r=rj(this.spec,e,n,e.doc.length).nextOverlapping();return r.done&&(r=rj(this.spec,e,0,t).nextOverlapping()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=n;;){let n=Math.max(t,r-1e4-this.spec.unquoted.length),i=rj(this.spec,e,n,r),o=null;for(;!i.nextOverlapping().done;)o=i.value;if(o)return o;if(n==t)return null;r-=1e4}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=rj(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=rj(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}}function oj(e,t,n,r){return new IR(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?(i=t.charCategorizer(t.selection.main.head),(e,t,n)=>!n[0].length||(i(sj(n.input,n.index))!=ik.Word||i(aj(n.input,n.index))!=ik.Word)&&(i(aj(n.input,n.index+n[0].length))!=ik.Word||i(sj(n.input,n.index+n[0].length))!=ik.Word)):void 0},n,r);var i}function sj(e,t){return e.slice(Jx(e,t,!1),t)}function aj(e,t){return e.slice(t,Jx(e,t))}class lj extends nj{nextMatch(e,t,n){let r=oj(this.spec,e,n,e.doc.length).next();return r.done&&(r=oj(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-1e4*r),o=oj(this.spec,e,i,n),s=null;for(;!o.next().done;)s=o.value;if(s&&(i==t||s.from>i+10))return s;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,(t,n)=>"$"==n?"$":"&"==n?e.match[0]:"0"!=n&&+n<e.match.length?e.match[n]:t))}matchAll(e,t){let n=oj(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=oj(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}}const cj=Yw.define(),uj=Yw.define(),dj=Aw.define({create:e=>new hj(wj(e).create(),null),update(e,t){for(let n of t.effects)n.is(cj)?e=new hj(n.value.create(),e.panel):n.is(uj)&&(e=new hj(e.query,n.value?xj:null));return e},provide:e=>PC.from(e,e=>e.panel)});class hj{constructor(e,t){this.query=e,this.panel=t}}const pj=FO.mark({class:"cm-searchMatch"}),fj=FO.mark({class:"cm-searchMatch cm-searchMatch-selected"}),mj=pE.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(dj))}update(e){let t=e.state.field(dj);(t!=e.startState.field(dj)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return FO.none;let{view:n}=this,r=new mk;for(let t=0,i=n.visibleRanges,o=i.length;t<o;t++){let{from:s,to:a}=i[t];for(;t<o-1&&a>i[t+1].from-500;)a=i[++t].to;e.highlight(n.state,s,a,(e,t)=>{let i=n.state.selection.ranges.some(n=>n.from==e&&n.to==t);r.add(e,t,i?fj:pj)})}return r.finish()}},{decorations:e=>e.decorations});function gj(e){return t=>{let n=t.state.field(dj,!1);return n&&n.query.spec.valid?e(t,n):Ej(t)}}const bj=gj((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=bw.single(r.from,r.to),o=e.state.facet(ej);return e.dispatch({selection:i,effects:[Pj(e,r),o.scrollToMatch(i.main,e)],userEvent:"select.search"}),Oj(e),!0}),vj=gj((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let o=bw.single(i.from,i.to),s=e.state.facet(ej);return e.dispatch({selection:o,effects:[Pj(e,i),s.scrollToMatch(o.main,e)],userEvent:"select.search"}),Oj(e),!0}),yj=gj((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!(!n||!n.length)&&(e.dispatch({selection:bw.create(n.map(e=>bw.range(e.from,e.to))),userEvent:"select.search.matches"}),!0)}),Sj=gj((e,{query:t})=>{let{state:n}=e,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let o=t.nextMatch(n,r,r);if(!o)return!1;let s,a,l=[],c=[];if(o.from==r&&o.to==i&&(a=n.toText(t.getReplacement(o)),l.push({from:o.from,to:o.to,insert:a}),o=t.nextMatch(n,o.from,o.to),c.push(fT.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+"."))),o){let t=0==l.length||l[0].from>=o.to?0:o.to-o.from-a.length;s=bw.single(o.from-t,o.to-t),c.push(Pj(e,o)),c.push(n.facet(ej).scrollToMatch(s.main,e))}return e.dispatch({changes:l,selection:s,effects:c,userEvent:"input.replace"}),!0}),_j=gj((e,{query:t})=>{if(e.state.readOnly)return!1;let n=t.matchAll(e.state,1e9).map(e=>{let{from:n,to:r}=e;return{from:n,to:r,insert:t.getReplacement(e)}});if(!n.length)return!1;let r=e.state.phrase("replaced $ matches",n.length)+".";return e.dispatch({changes:n,effects:fT.announce.of(r),userEvent:"input.replace.all"}),!0});function xj(e){return e.state.facet(ej).createPanel(e)}function wj(e,t){var n,r,i,o;let s=e.selection.main,a=s.empty||s.to>s.from+100?"":e.sliceDoc(s.from,s.to);if(t&&!a)return t;let l=e.facet(ej);return new tj({search:(null!==(n=null==t?void 0:t.literal)&&void 0!==n?n:l.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:null!==(r=null==t?void 0:t.caseSensitive)&&void 0!==r?r:l.caseSensitive,literal:null!==(i=null==t?void 0:t.literal)&&void 0!==i?i:l.literal,wholeWord:null!==(o=null==t?void 0:t.wholeWord)&&void 0!==o?o:l.wholeWord})}function kj(e){let t=TC(e,xj);return t&&t.dom.querySelector("[main-field]")}function Oj(e){let t=kj(e);t&&t==e.root.activeElement&&t.select()}const Ej=e=>{let t=e.state.field(dj,!1);if(t&&t.panel){let n=kj(e);if(n&&n!=e.root.activeElement){let r=wj(e.state,t.query.spec);r.valid&&e.dispatch({effects:cj.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[uj.of(!0),t?cj.of(wj(e.state,t.query.spec)):Yw.appendConfig.of(jj)]});return!0},Aj=e=>{let t=e.state.field(dj,!1);if(!t||!t.panel)return!1;let n=TC(e,xj);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:uj.of(!1)}),!0},Tj=[{key:"Mod-f",run:Ej,scope:"editor search-panel"},{key:"F3",run:bj,shift:vj,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:bj,shift:vj,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Aj,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,o=[],s=0;for(let t=new jR(e.doc,e.sliceDoc(r,i));!t.next().done;){if(o.length>1e3)return!1;t.value.from==r&&(s=o.length),o.push(bw.range(t.value.from,t.value.to))}return t(e.update({selection:bw.create(o,s),userEvent:"select.search.matches"})),!0}},{key:"Alt-g",run:e=>{let t=TC(e,UR);if(!t){let n=[QR.of(!0)];null==e.state.field(qR,!1)&&n.push(Yw.appendConfig.of([qR,GR])),e.dispatch({effects:n}),t=TC(e,UR)}return t&&t.dom.querySelector("input").focus(),!0}},{key:"Mod-d",run:({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(e=>e.from===e.to))return(({state:e,dispatch:t})=>{let{selection:n}=e,r=bw.create(n.ranges.map(t=>e.wordAt(t.head)||bw.cursor(t.head)),n.mainIndex);return!r.eq(n)&&(t(e.update({selection:r})),!0)})({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(t=>e.sliceDoc(t.from,t.to)!=r))return!1;let i=function(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),o=i&&i.from==n.from&&i.to==n.to;for(let n=!1,i=new jR(e.doc,t,r[r.length-1].to);;){if(i.next(),!i.done){if(n&&r.some(e=>e.from==i.value.from))continue;if(o){let t=e.wordAt(i.value.from);if(!t||t.from!=i.value.from||t.to!=i.value.to)continue}return i.value}if(n)return null;i=new jR(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}}(e,r);return!!i&&(t(e.update({selection:e.selection.addRange(bw.range(i.from,i.to),!1),effects:fT.scrollIntoView(i.to)})),!0)},preventDefault:!0}];class Cj{constructor(e){this.view=e;let t=this.query=e.state.field(dj).query.spec;function n(e,t,n){return $R("button",{class:"cm-button",name:e,onclick:t,type:"button"},n)}this.commit=this.commit.bind(this),this.searchField=$R("input",{value:t.search,placeholder:Mj(e,"Find"),"aria-label":Mj(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=$R("input",{value:t.replace,placeholder:Mj(e,"Replace"),"aria-label":Mj(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=$R("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=$R("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=$R("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit}),this.dom=$R("div",{onkeydown:e=>this.keydown(e),class:"cm-search"},[this.searchField,n("next",()=>bj(e),[Mj(e,"next")]),n("prev",()=>vj(e),[Mj(e,"previous")]),n("select",()=>yj(e),[Mj(e,"all")]),$R("label",null,[this.caseField,Mj(e,"match case")]),$R("label",null,[this.reField,Mj(e,"regexp")]),$R("label",null,[this.wordField,Mj(e,"by word")]),...e.state.readOnly?[]:[$R("br"),this.replaceField,n("replace",()=>Sj(e),[Mj(e,"replace")]),n("replaceAll",()=>_j(e),[Mj(e,"replace all")])],$R("button",{name:"close",onclick:()=>Aj(e),"aria-label":Mj(e,"close"),type:"button"},["×"])])}commit(){let e=new tj({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:cj.of(e)}))}keydown(e){var t,n,r;t=this.view,n=e,r="search-panel",ET(kT(t.state),n,t,r)?e.preventDefault():13==e.keyCode&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?vj:bj)(this.view)):13==e.keyCode&&e.target==this.replaceField&&(e.preventDefault(),Sj(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(cj)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(ej).top}}function Mj(e,t){return e.state.phrase(t)}const $j=/[\s\.,:;?!]/;function Pj(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),i=e.state.doc.lineAt(n).to,o=Math.max(r.from,t-30),s=Math.min(i,n+30),a=e.state.sliceDoc(o,s);if(o!=r.from)for(let e=0;e<30;e++)if(!$j.test(a[e+1])&&$j.test(a[e])){a=a.slice(e);break}if(s!=i)for(let e=a.length-1;e>a.length-30;e--)if(!$j.test(a[e-1])&&$j.test(a[e])){a=a.slice(0,e);break}return fT.announce.of(`${e.state.phrase("current match")}. ${a} ${e.state.phrase("on line")} ${r.number}.`)}const Rj=fT.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),jj=[dj,Rw.lowest(mj),Rj];class Nj{constructor(e,t,n){this.state=e,this.pos=t,this.explicit=n,this.abortListeners=[]}tokenBefore(e){let t=NM(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(zj(e,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return null==this.abortListeners}addEventListener(e,t){"abort"==e&&this.abortListeners&&this.abortListeners.push(t)}}function Dj(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function Ij(e){let t=e.map(e=>"string"==typeof e?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e<r.length;e++)n[r[e]]=!0}let r=Dj(t)+Dj(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}class Lj{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}}function Bj(e){return e.selection.main.from}function zj(e,t){var n;let{source:r}=e,i=t&&"^"!=r[0],o="$"!=r[r.length-1];return i||o?new RegExp(`${i?"^":""}(?:${r})${o?"$":""}`,null!==(n=e.flags)&&void 0!==n?n:e.ignoreCase?"i":""):e}const Fj=Vw.define();const Uj=new WeakMap;function Qj(e){if(!Array.isArray(e))return e;let t=Uj.get(e);return t||Uj.set(e,t=Ij(e)),t}const qj=Yw.define(),Gj=Yw.define();class Hj{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[];for(let t=0;t<e.length;){let n=rw(e,t),r=ow(n);this.chars.push(n);let i=e.slice(t,t+r),o=i.toUpperCase();this.folded.push(rw(o==i?i.toLowerCase():o,0)),t+=r}this.astral=e.length!=this.chars.length}match(e){if(0==this.pattern.length)return[0];if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:r,precise:i,byWord:o}=this;if(1==t.length){let r=rw(e,0),i=ow(r),o=i==e.length?0:-100;if(r==t[0]);else{if(r!=n[0])return null;o+=-200}return[o,0,i]}let s=e.indexOf(this.pattern);if(0==s)return[e.length==this.pattern.length?0:-100,0,this.pattern.length];let a=t.length,l=0;if(s<0){for(let i=0,o=Math.min(e.length,200);i<o&&l<a;){let o=rw(e,i);o!=t[l]&&o!=n[l]||(r[l++]=i),i+=ow(o)}if(l<a)return null}let c=0,u=0,d=!1,h=0,p=-1,f=-1,m=/[a-z]/.test(e),g=!0;for(let r=0,l=Math.min(e.length,200),b=0;r<l&&u<a;){let l=rw(e,r);s<0&&(c<a&&l==t[c]&&(i[c++]=r),h<a&&(l==t[h]||l==n[h]?(0==h&&(p=r),f=r+1,h++):h=0));let v,y=l<255?l>=48&&l<=57||l>=97&&l<=122?2:l>=65&&l<=90?1:0:(v=iw(l))!=v.toLowerCase()?1:v!=v.toUpperCase()?2:0;(!r||1==y&&m||0==b&&0!=y)&&(t[u]==l||n[u]==l&&(d=!0)?o[u++]=r:o.length&&(g=!1)),b=y,r+=ow(l)}return u==a&&0==o[0]&&g?this.result((d?-200:0)-100,o,e):h==a&&0==p?[-200-e.length+(f==e.length?0:-100),0,f]:s>-1?[-700-e.length,s,s+this.pattern.length]:h==a?[-900-e.length,p,f]:u==a?this.result((d?-200:0)-100-700+(g?0:-1100),o,e):2==t.length?null:this.result((r[0]?-700:0)-200-1100,r,e)}result(e,t,n){let r=[e-n.length],i=1;for(let e of t){let t=e+(this.astral?ow(rw(n,e)):1);i>1&&r[i-1]==e?r[i-1]=t:(r[i++]=e,r[i++]=t)}return r}}const Vj=Sw.define({combine:e=>ck(e,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Xj,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>Wj(e(n),t(n)),optionClass:(e,t)=>n=>Wj(e(n),t(n)),addToOptions:(e,t)=>e.concat(t)})});function Wj(e,t){return e?t?e+" "+t:e:t}function Xj(e,t,n,r,i){let o,s,a=e.textDirection==wE.RTL,l=a,c=!1,u="top",d=t.left-i.left,h=i.right-t.right,p=r.right-r.left,f=r.bottom-r.top;if(l&&d<Math.min(p,h)?l=!1:!l&&h<Math.min(p,d)&&(l=!0),p<=(l?d:h))o=Math.max(i.top,Math.min(n.top,i.bottom-f))-t.top,s=Math.min(400,l?d:h);else{c=!0,s=Math.min(400,(a?t.right:i.right-t.left)-30);let e=i.bottom-t.bottom;e>=f||e>t.top?o=n.bottom-t.top:(u="bottom",o=t.bottom-n.top)}return{style:`${u}: ${o}px; max-width: ${s}px`,class:"cm-completionInfo-"+(c?a?"left-narrow":"right-narrow":l?"left":"right")}}function Yj(e,t="option"){return n=>{let r=n.state.field(pN,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(Vj).interactionDelay)return!1;let i,o=1;"page"==t&&(i=OC(n,r.open.tooltip))&&(o=Math.max(2,Math.floor(i.dom.offsetHeight/i.dom.querySelector("li").offsetHeight)-1));let{length:s}=r.open.options,a=r.open.selected>-1?r.open.selected+o*(e?1:-1):e?0:s-1;return a<0?a="page"==t?0:s-1:a>=s&&(a="page"==t?s-1:0),n.dispatch({effects:hN.of(a)}),!0}}class Zj{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const Jj=pE.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let t of e.state.field(pN).active)1==t.state&&this.startQuery(t)}update(e){let t=e.state.field(pN);if(!e.selectionSet&&!e.docChanged&&e.startState.field(pN)==t)return;let n=e.transactions.some(e=>(e.selection||e.docChanged)&&!lN(e));for(let t=0;t<this.running.length;t++){let r=this.running[t];if(n||r.updates.length+e.transactions.length>50&&Date.now()-r.time>1e3){for(let e of r.context.abortListeners)try{e()}catch(e){cE(this.view.state,e)}r.context.abortListeners=null,this.running.splice(t--,1)}else r.updates.push(...e.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=t.active.some(e=>1==e.state&&!this.running.some(t=>t.active.source==e.source))?setTimeout(()=>this.startUpdate(),50):-1,0!=this.composing)for(let t of e.transactions)"input"==lN(t)?this.composing=2:2==this.composing&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:e}=this.view,t=e.field(pN);for(let e of t.active)1!=e.state||this.running.some(t=>t.active.source==e.source)||this.startQuery(e)}startQuery(e){let{state:t}=this.view,n=Bj(t),r=new Nj(t,n,e.explicitPos==n),i=new Zj(e,r);this.running.push(i),Promise.resolve(e.source(r)).then(e=>{i.context.aborted||(i.done=e||null,this.scheduleAccept())},e=>{this.view.dispatch({effects:Gj.of(null)}),cE(this.view.state,e)})}scheduleAccept(){this.running.every(e=>void 0!==e.done)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),50))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],n=this.view.state.facet(Vj);for(let r=0;r<this.running.length;r++){let i=this.running[r];if(void 0===i.done)continue;if(this.running.splice(r--,1),i.done){let r=new uN(i.active.source,i.active.explicitPos,i.done,i.done.from,null!==(e=i.done.to)&&void 0!==e?e:Bj(i.updates.length?i.updates[0].startState:this.view.state));for(let e of i.updates)r=r.update(e,n);if(r.hasResult()){t.push(r);continue}}let o=this.view.state.field(pN).active.find(e=>e.source==i.active.source);if(o&&1==o.state)if(null==i.done){let e=new cN(i.active.source,0);for(let t of i.updates)e=e.update(t,n);1!=e.state&&t.push(e)}else this.startQuery(o)}t.length&&this.view.dispatch({effects:dN.of(t)})}},{eventHandlers:{blur(e){let t=this.view.state.field(pN,!1);if(t&&t.tooltip&&this.view.state.facet(Vj).closeOnBlur){let n=t.open&&OC(this.view,t.open.tooltip);n&&n.dom.contains(e.relatedTarget)||this.view.dispatch({effects:Gj.of(null)})}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout(()=>this.view.dispatch({effects:qj.of(!1)}),20),this.composing=0}}});function Kj(e,t){const n=t.completion.apply||t.completion.label;let r=e.state.field(pN).active.find(e=>e.source==t.source);return r instanceof uN&&("string"==typeof n?e.dispatch(Object.assign(Object.assign({},function(e,t,n,r){let{main:i}=e.selection,o=n-i.from,s=r-i.from;return Object.assign(Object.assign({},e.changeByRange(a=>a!=i&&n!=r&&e.sliceDoc(a.from+o,a.from+s)!=e.sliceDoc(n,r)?{range:a}:{changes:{from:a.from+o,to:r==i.from?a.to:a.from+s,insert:t},range:bw.cursor(a.from+o+t.length)})),{userEvent:"input.complete"})}(e.state,n,r.from,r.to)),{annotations:Fj.of(t.completion)})):n(e,t.completion,r.from,r.to),!0)}function eN(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let r=Math.floor((e-t)/n);return{from:e-(r+1)*n,to:e-r*n}}class tN{constructor(e,t){this.view=e,this.stateField=t,this.info=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass="";let n=e.state.field(t),{options:r,selected:i}=n.open,o=e.state.facet(Vj);this.optionContent=function(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement("div");return t.classList.add("cm-completionIcon"),e.type&&t.classList.add(...e.type.split(/\s+/g).map(e=>"cm-completionIcon-"+e)),t.setAttribute("aria-hidden","true"),t},position:20}),t.push({render(e,t,n){let r=document.createElement("span");r.className="cm-completionLabel";let{label:i}=e,o=0;for(let e=1;e<n.length;){let t=n[e++],s=n[e++];t>o&&r.appendChild(document.createTextNode(i.slice(o,t)));let a=r.appendChild(document.createElement("span"));a.appendChild(document.createTextNode(i.slice(t,s))),a.className="cm-completionMatchedText",o=s}return o<i.length&&r.appendChild(document.createTextNode(i.slice(o))),r},position:50},{render(e){if(!e.detail)return null;let t=document.createElement("span");return t.className="cm-completionDetail",t.textContent=e.detail,t},position:80}),t.sort((e,t)=>e.position-t.position).map(e=>e.render)}(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=eN(r.length,i,o.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",t=>{for(let n,i=t.target;i&&i!=this.dom;i=i.parentNode)if("LI"==i.nodeName&&(n=/-(\d+)$/.exec(i.id))&&+n[1]<r.length)return Kj(e,r[+n[1]]),void t.preventDefault()}),this.dom.addEventListener("focusout",t=>{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(Vj).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:Gj.of(null)})}),this.list=this.dom.appendChild(this.createListBox(r,n.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}mount(){this.updateSel()}update(e){var t,n,r;let i=e.state.field(this.stateField),o=e.startState.field(this.stateField);this.updateTooltipClass(e.state),i!=o&&(this.updateSel(),(null===(t=i.open)||void 0===t?void 0:t.disabled)!=(null===(n=o.open)||void 0===n?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!(null===(r=i.open)||void 0===r?void 0:r.disabled)))}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(" "))e&&this.dom.classList.remove(e);for(let e of t.split(" "))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=eN(t.options.length,t.selected,this.view.state.facet(Vj).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t.options,e.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})),this.updateSelectedOption(t.selected)){this.info&&(this.info.remove(),this.info=null);let{completion:n}=t.options[t.selected],{info:r}=n;if(!r)return;let i="string"==typeof r?document.createTextNode(r):r(n);if(!i)return;"then"in i?i.then(t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t)}).catch(e=>cE(this.view.state,e,"completion info")):this.addInfoPane(i)}}addInfoPane(e){let t=this.info=document.createElement("div");t.className="cm-tooltip cm-completionInfo",t.appendChild(e),this.dom.appendChild(t),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)"LI"==n.nodeName&&n.id?r==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected"):r--;return t&&function(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();r.top<n.top?e.scrollTop-=n.top-r.top:r.bottom>n.bottom&&(e.scrollTop+=r.bottom-n.bottom)}(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),i=this.space;if(!i){let e=this.dom.ownerDocument.defaultView||window;i={left:0,top:0,right:e.innerWidth,bottom:e.innerHeight}}return r.top>Math.min(i.bottom,t.bottom)-10||r.bottom<Math.max(i.top,t.top)+10?null:this.view.state.facet(Vj).positionInfo(this.view,t,r,n,i)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,n){const r=document.createElement("ul");r.id=t,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions"));let i=null;for(let o=n.from;o<n.to;o++){let{completion:s,match:a}=e[o],{section:l}=s;if(l){let e="string"==typeof l?l:l.name;if(e!=i&&(o>n.from||0==n.from))if(i=e,"string"!=typeof l&&l.header)r.appendChild(l.header(l));else{r.appendChild(document.createElement("completion-section")).textContent=e}}const c=r.appendChild(document.createElement("li"));c.id=t+"-"+o,c.setAttribute("role","option");let u=this.optionClass(s);u&&(c.className=u);for(let e of this.optionContent){let t=e(s,this.view.state,a);t&&c.appendChild(t)}}return n.from&&r.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&r.classList.add("cm-completionListIncompleteBottom"),r}}function nN(e){return 100*(e.boost||0)+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}class rN{constructor(e,t,n,r,i,o){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=i,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new rN(this.options,sN(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,r,i){let o=function(e,t){let n=[],r=null,i=e=>{n.push(e);let{section:t}=e.completion;if(t){r||(r=[]);let e="string"==typeof t?t:t.name;r.some(t=>t.name==e)||r.push("string"==typeof t?{name:e}:t)}};for(let r of e)if(r.hasResult())if(!1===r.result.filter){let e=r.result.getMatch;for(let t of r.result.options){let o=[1e9-n.length];if(e)for(let n of e(t))o.push(n);i(new Lj(t,r.source,o,o[0]))}}else{let e,n=new Hj(t.sliceDoc(r.from,r.to));for(let t of r.result.options)(e=n.match(t.label))&&i(new Lj(t,r.source,e,e[0]+(t.boost||0)))}if(r){let e=Object.create(null),t=0,i=(e,t)=>{var n,r;return(null!==(n=e.rank)&&void 0!==n?n:1e9)-(null!==(r=t.rank)&&void 0!==r?r:1e9)||(e.name<t.name?-1:1)};for(let n of r.sort(i))t-=1e5,e[n.name]=t;for(let t of n){let{section:n}=t.completion;n&&(t.score+=e["string"==typeof n?n:n.name])}}let o=[],s=null,a=t.facet(Vj).compareCompletions;for(let e of n.sort((e,t)=>t.score-e.score||a(e.completion,t.completion)))!s||s.label!=e.completion.label||s.detail!=e.completion.detail||null!=s.type&&null!=e.completion.type&&s.type!=e.completion.type||s.apply!=e.completion.apply?o.push(e):nN(e.completion)>nN(s)&&(o[o.length-1]=e),s=e.completion;return o}(e,t);if(!o.length)return r&&e.some(e=>1==e.state)?new rN(r.options,r.attrs,r.tooltip,r.timestamp,r.selected,!0):null;let s=t.facet(Vj).selectOnOpen?0:-1;if(r&&r.selected!=s&&-1!=r.selected){let e=r.options[r.selected].completion;for(let t=0;t<o.length;t++)if(o[t].completion==e){s=t;break}}return new rN(o,sN(n,s),{pos:e.reduce((e,t)=>t.hasResult()?Math.min(e,t.from):e,1e8),create:(a=pN,e=>new tN(e,a)),above:i.aboveCursor},r?r.timestamp:Date.now(),s,!1);var a}map(e){return new rN(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class iN{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new iN(aN,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,n=t.facet(Vj),r=(n.override||t.languageDataAt("autocomplete",Bj(t)).map(Qj)).map(t=>(this.active.find(e=>e.source==t)||new cN(t,this.active.some(e=>0!=e.state)?1:0)).update(e,n));r.length==this.active.length&&r.every((e,t)=>e==this.active[t])&&(r=this.active);let i=this.open;i&&e.docChanged&&(i=i.map(e.changes)),e.selection||r.some(t=>t.hasResult()&&e.changes.touchesRange(t.from,t.to))||!function(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;n<e.length&&!e[n].hasResult;)n++;for(;r<t.length&&!t[r].hasResult;)r++;let i=n==e.length,o=r==t.length;if(i||o)return i==o;if(e[n++].result!=t[r++].result)return!1}}(r,this.active)?i=rN.build(r,t,this.id,i,n):i&&i.disabled&&!r.some(e=>1==e.state)&&(i=null),!i&&r.every(e=>1!=e.state)&&r.some(e=>e.hasResult())&&(r=r.map(e=>e.hasResult()?new cN(e.source,0):e));for(let t of e.effects)t.is(hN)&&(i=i&&i.setSelected(t.value,this.id));return r==this.active&&i==this.open?this:new iN(r,this.id,i)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:oN}}const oN={"aria-autocomplete":"list"};function sN(e,t){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(n["aria-activedescendant"]=e+"-"+t),n}const aN=[];function lN(e){return e.isUserEvent("input.type")?"input":e.isUserEvent("delete.backward")?"delete":null}class cN{constructor(e,t,n=-1){this.source=e,this.state=t,this.explicitPos=n}hasResult(){return!1}update(e,t){let n=lN(e),r=this;n?r=r.handleUserEvent(e,n,t):e.docChanged?r=r.handleChange(e):e.selection&&0!=r.state&&(r=new cN(r.source,0));for(let t of e.effects)if(t.is(qj))r=new cN(r.source,1,t.value?Bj(e.state):-1);else if(t.is(Gj))r=new cN(r.source,0);else if(t.is(dN))for(let e of t.value)e.source==r.source&&(r=e);return r}handleUserEvent(e,t,n){return"delete"!=t&&n.activateOnTyping?new cN(this.source,1):this.map(e.changes)}handleChange(e){return e.changes.touchesRange(Bj(e.startState))?new cN(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new cN(this.source,this.state,e.mapPos(this.explicitPos))}}class uN extends cN{constructor(e,t,n,r,i){super(e,2,t),this.result=n,this.from=r,this.to=i}hasResult(){return!0}handleUserEvent(e,t,n){var r;let i=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),s=Bj(e.state);if((this.explicitPos<0?s<=i:s<this.from)||s>o||"delete"==t&&Bj(e.startState)==this.from)return new cN(this.source,"input"==t&&n.activateOnTyping?1:0);let a,l=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return function(e,t,n,r){if(!e)return!1;let i=t.sliceDoc(n,r);return"function"==typeof e?e(i,n,r,t):zj(e,!0).test(i)}(this.result.validFor,e.state,i,o)?new uN(this.source,l,this.result,i,o):this.result.update&&(a=this.result.update(this.result,i,o,new Nj(e.state,s,l>=0)))?new uN(this.source,l,a,a.from,null!==(r=a.to)&&void 0!==r?r:Bj(e.state)):new cN(this.source,1,l)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new cN(this.source,0):this.map(e.changes)}map(e){return e.empty?this:new uN(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}}const dN=Yw.define({map:(e,t)=>e.map(e=>e.map(t))}),hN=Yw.define(),pN=Aw.define({create:()=>iN.start(),update:(e,t)=>e.update(t),provide:e=>[vC.from(e,e=>e.tooltip),fT.contentAttributes.from(e,e=>e.attrs)]}),fN=fT.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class mN{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}}class gN{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(e){let t=e.mapPos(this.from,-1,aw.TrackDel),n=e.mapPos(this.to,1,aw.TrackDel);return null==t||null==n?null:new gN(this.field,t,n)}}class bN{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],r=[t],i=e.doc.lineAt(t),o=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(n.length){let n=o,s=/^\t*/.exec(i)[0].length;for(let t=0;t<s;t++)n+=e.facet(VM);r.push(t+n.length-s),i=n+i.slice(s)}n.push(i),t+=i.length+1}return{text:n,ranges:this.fieldPositions.map(e=>new gN(e.field,r[e.line]+e.from,r[e.line]+e.to))}}static parse(e){let t,n=[],r=[],i=[];for(let o of e.split(/\r\n?|\n/)){for(;t=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(o);){let e=t[1]?+t[1]:null,s=t[2]||t[3]||"",a=-1;for(let t=0;t<n.length;t++)(null!=e?n[t].seq==e:s&&n[t].name==s)&&(a=t);if(a<0){let t=0;for(;t<n.length&&(null==e||null!=n[t].seq&&n[t].seq<e);)t++;n.splice(t,0,{seq:e,name:s}),a=t;for(let e of i)e.field>=a&&e.field++}i.push(new mN(a,r.length,t.index,t.index+s.length)),o=o.slice(0,t.index)+s+o.slice(t.index+t[0].length)}for(let e;e=/\\([{}])/.exec(o);){o=o.slice(0,e.index)+e[1]+o.slice(e.index+e[0].length);for(let t of i)t.line==r.length&&t.from>e.index&&(t.from--,t.to--)}r.push(o)}return new bN(r,i)}}let vN=FO.widget({widget:new class extends BO{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),yN=FO.mark({class:"cm-snippetField"});class SN{constructor(e,t){this.ranges=e,this.active=t,this.deco=FO.set(e.map(e=>(e.from==e.to?vN:yN).range(e.from,e.to)))}map(e){let t=[];for(let n of this.ranges){let r=n.map(e);if(!r)return null;t.push(r)}return new SN(t,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}}const _N=Yw.define({map:(e,t)=>e&&e.map(t)}),xN=Yw.define(),wN=Aw.define({create:()=>null,update(e,t){for(let n of t.effects){if(n.is(_N))return n.value;if(n.is(xN)&&e)return new SN(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>fT.decorations.from(e,e=>e?e.deco:FO.none)});function kN(e,t){return bw.create(e.filter(e=>e.field==t).map(e=>bw.range(e.from,e.to)))}function ON(e){let t=bN.parse(e);return(e,n,r,i)=>{let{text:o,ranges:s}=t.instantiate(e.state,r),a={changes:{from:r,to:i,insert:zx.of(o)},scrollIntoView:!0,annotations:n?Fj.of(n):void 0};if(s.length&&(a.selection=kN(s,0)),s.length>1){let t=new SN(s,0),n=a.effects=[_N.of(t)];void 0===e.state.field(wN,!1)&&n.push(Yw.appendConfig.of([wN,CN,$N,fN]))}e.dispatch(e.state.update(a))}}function EN(e){return({state:t,dispatch:n})=>{let r=t.field(wN,!1);if(!r||e<0&&0==r.active)return!1;let i=r.active+e,o=e>0&&!r.ranges.some(t=>t.field==i+e);return n(t.update({selection:kN(r.ranges,i),effects:_N.of(o?null:new SN(r.ranges,i))})),!0}}const AN=[{key:"Tab",run:EN(1),shift:EN(-1)},{key:"Escape",run:({state:e,dispatch:t})=>!!e.field(wN,!1)&&(t(e.update({effects:_N.of(null)})),!0)}],TN=Sw.define({combine:e=>e.length?e[0]:AN}),CN=Rw.highest(xT.compute([TN],e=>e.facet(TN)));function MN(e,t){return Object.assign(Object.assign({},t),{apply:ON(e)})}const $N=fT.domEventHandlers({mousedown(e,t){let n,r=t.state.field(wN,!1);if(!r||null==(n=t.posAtCoords({x:e.clientX,y:e.clientY})))return!1;let i=r.ranges.find(e=>e.from<=n&&e.to>=n);return!(!i||i.field==r.active)&&(t.dispatch({selection:kN(r.ranges,i.field),effects:_N.of(r.ranges.some(e=>e.field>i.field)?new SN(r.ranges,i.field):null)}),!0)}});const PN={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},RN=Yw.define({map(e,t){let n=t.mapPos(e,-1,aw.TrackAfter);return null==n?void 0:n}}),jN=new class extends uk{};jN.startSide=1,jN.endSide=-1;const NN=Aw.define({create:()=>fk.empty,update(e,t){if(t.selection){let n=t.state.doc.lineAt(t.selection.main.head).from,r=t.startState.doc.lineAt(t.startState.selection.main.head).from;n!=t.changes.mapPos(r,-1)&&(e=fk.empty)}e=e.map(t.changes);for(let n of t.effects)n.is(RN)&&(e=e.update({add:[jN.range(n.value,n.value+1)]}));return e}});function DN(e){for(let t=0;t<"()[]{}<>".length;t+=2)if("()[]{}<>".charCodeAt(t)==e)return"()[]{}<>".charAt(t+1);return iw(e<128?e:e+1)}function IN(e,t){return e.languageDataAt("closeBrackets",t)[0]||PN}const LN="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),BN=fT.inputHandler.of((e,t,n,r)=>{if((LN?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let i=e.state.selection.main;if(r.length>2||2==r.length&&1==ow(rw(r,0))||t!=i.from||n!=i.to)return!1;let o=function(e,t){let n=IN(e,e.selection.main.head),r=n.brackets||PN.brackets;for(let i of r){let o=DN(rw(i,0));if(t==i)return o==i?GN(e,i,r.indexOf(i+i+i)>-1,n):QN(e,i,o,n.before||PN.before);if(t==o&&FN(e,e.selection.main.from))return qN(e,i,o)}return null}(e.state,r);return!!o&&(e.dispatch(o),!0)}),zN=[{key:"Backspace",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=IN(e,e.selection.main.head).brackets||PN.brackets,r=null,i=e.changeByRange(t=>{if(t.empty){let r=function(e,t){let n=e.sliceString(t-2,t);return ow(rw(n,0))==n.length?n:n.slice(1)}(e.doc,t.head);for(let i of n)if(i==r&&UN(e.doc,t.head)==DN(rw(i,0)))return{changes:{from:t.head-i.length,to:t.head+i.length},range:bw.cursor(t.head-i.length)}}return{range:r=t}});return r||t(e.update(i,{scrollIntoView:!0,userEvent:"delete.backward"})),!r}}];function FN(e,t){let n=!1;return e.field(NN).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function UN(e,t){let n=e.sliceString(t,t+2);return n.slice(0,ow(rw(n,0)))}function QN(e,t,n,r){let i=null,o=e.changeByRange(o=>{if(!o.empty)return{changes:[{insert:t,from:o.from},{insert:n,from:o.to}],effects:RN.of(o.to+t.length),range:bw.range(o.anchor+t.length,o.head+t.length)};let s=UN(e.doc,o.head);return!s||/\s/.test(s)||r.indexOf(s)>-1?{changes:{insert:t+n,from:o.head},effects:RN.of(o.head+t.length),range:bw.cursor(o.head+t.length)}:{range:i=o}});return i?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function qN(e,t,n){let r=null,i=e.changeByRange(t=>t.empty&&UN(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:bw.cursor(t.head+n.length)}:r={range:t});return r?null:e.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function GN(e,t,n,r){let i=r.stringPrefixes||PN.stringPrefixes,o=null,s=e.changeByRange(r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:RN.of(r.to+t.length),range:bw.range(r.anchor+t.length,r.head+t.length)};let s,a=r.head,l=UN(e.doc,a);if(l==t){if(HN(e,a))return{changes:{insert:t+t,from:a},effects:RN.of(a+t.length),range:bw.cursor(a+t.length)};if(FN(e,a)){let r=n&&e.sliceDoc(a,a+3*t.length)==t+t+t?t+t+t:t;return{changes:{from:a,to:a+r.length,insert:r},range:bw.cursor(a+r.length)}}}else{if(n&&e.sliceDoc(a-2*t.length,a)==t+t&&(s=VN(e,a-2*t.length,i))>-1&&HN(e,s))return{changes:{insert:t+t+t+t,from:a},effects:RN.of(a+t.length),range:bw.cursor(a+t.length)};if(e.charCategorizer(a)(l)!=ik.Word&&VN(e,a,i)>-1&&!function(e,t,n,r){let i=NM(e).resolveInner(t,-1),o=r.reduce((e,t)=>Math.max(e,t.length),0);for(let s=0;s<5;s++){let s=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),a=s.indexOf(n);if(!a||a>-1&&r.indexOf(s.slice(0,a))>-1){let t=i.firstChild;for(;t&&t.from==i.from&&t.to-t.from>n.length+a;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let l=i.to==t&&i.parent;if(!l)break;i=l}return!1}(e,a,t,i))return{changes:{insert:t+t,from:a},effects:RN.of(a+t.length),range:bw.cursor(a+t.length)}}return{range:o=r}});return o?null:e.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function HN(e,t){let n=NM(e).resolveInner(t+1);return n.parent&&n.from==t}function VN(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=ik.Word)return t;for(let i of n){let n=t-i.length;if(e.sliceDoc(n,t)==i&&r(e.sliceDoc(n-1,n))!=ik.Word)return n}return-1}function WN(e={}){return[pN,Vj.of(e),Jj,YN,fN]}const XN=[{key:"Ctrl-Space",run:e=>!!e.state.field(pN,!1)&&(e.dispatch({effects:qj.of(!0)}),!0)},{key:"Escape",run:e=>{let t=e.state.field(pN,!1);return!(!t||!t.active.some(e=>0!=e.state))&&(e.dispatch({effects:Gj.of(null)}),!0)}},{key:"ArrowDown",run:Yj(!0)},{key:"ArrowUp",run:Yj(!1)},{key:"PageDown",run:Yj(!0,"page")},{key:"PageUp",run:Yj(!1,"page")},{key:"Enter",run:e=>{let t=e.state.field(pN,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||Date.now()-t.open.timestamp<e.state.facet(Vj).interactionDelay)&&(!!t.open.disabled||Kj(e,t.open.options[t.open.selected]))}}],YN=Rw.highest(xT.computeN([Vj],e=>e.facet(Vj).defaultKeymap?[XN]:[]));class ZN{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class JN{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let r=e,i=n.facet(dD).markerFilter;i&&(r=i(r));let o=FO.set(r.map(e=>e.from==e.to||e.from==e.to-1&&n.doc.lineAt(e.from).to==e.from?FO.widget({widget:new fD(e),diagnostic:e}).range(e.from):FO.mark({attributes:{class:"cm-lintRange cm-lintRange-"+e.severity},diagnostic:e}).range(e.from,e.to)),!0);return new JN(o,t,KN(o))}}function KN(e,t=null,n=0){let r=null;return e.between(n,1e9,(e,n,{spec:i})=>{if(!t||i.diagnostic==t)return r=new ZN(e,n,i.diagnostic),!1}),r}function eD(e,t){return!(!e.effects.some(e=>e.is(nD))&&!e.changes.touchesRange(t.pos))}function tD(e,t){return e.field(oD,!1)?t:t.concat(Yw.appendConfig.of(SD))}const nD=Yw.define(),rD=Yw.define(),iD=Yw.define(),oD=Aw.define({create:()=>new JN(FO.none,null,null),update(e,t){if(t.docChanged){let n=e.diagnostics.map(t.changes),r=null;if(e.selected){let i=t.changes.mapPos(e.selected.from,1);r=KN(n,e.selected.diagnostic,i)||KN(n,null,i)}e=new JN(n,e.panel,r)}for(let n of t.effects)n.is(nD)?e=JN.init(n.value,e.panel,t.state):n.is(rD)?e=new JN(e.diagnostics,n.value?gD.open:null,e.selected):n.is(iD)&&(e=new JN(e.diagnostics,e.panel,n.value));return e},provide:e=>[PC.from(e,e=>e.panel),fT.decorations.from(e,e=>e.diagnostics)]});const sD=FO.mark({class:"cm-lintRange cm-lintRange-active"});function aD(e,t,n){let{diagnostics:r}=e.state.field(oD),i=[],o=2e8,s=0;r.between(t-(n<0?1:0),t+(n>0?1:0),(e,r,{spec:a})=>{t>=e&&t<=r&&(e==r||(t>e||n>0)&&(t<r||n<0))&&(i.push(a.diagnostic),o=Math.min(e,o),s=Math.max(r,s))});let a=e.state.facet(dD).tooltipFilter;return a&&(i=a(i)),i.length?{pos:o,end:s,above:e.state.doc.lineAt(o).to<s,create:()=>({dom:lD(e,i)})}:null}function lD(e,t){return $R("ul",{class:"cm-tooltip-lint"},t.map(t=>pD(e,t,!1)))}const cD=e=>{let t=e.state.field(oD,!1);return!(!t||!t.panel)&&(e.dispatch({effects:rD.of(!1)}),!0)},uD=[{key:"Mod-Shift-m",run:e=>{let t=e.state.field(oD,!1);t&&t.panel||e.dispatch({effects:tD(e.state,[rD.of(!0)])});let n=TC(e,gD.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:e=>{let t=e.state.field(oD,!1);if(!t)return!1;let n=e.state.selection.main,r=t.diagnostics.iter(n.to+1);return!(!r.value&&(r=t.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to))&&(e.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)}}],dD=Sw.define({combine:e=>Object.assign({sources:e.map(e=>e.source)},ck(e.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t}))});function hD(e){let t=[];if(e)e:for(let{name:n}of e){for(let e=0;e<n.length;e++){let r=n[e];if(/[a-zA-Z]/.test(r)&&!t.some(e=>e.toLowerCase()==r.toLowerCase())){t.push(r);continue e}}t.push("")}return t}function pD(e,t,n){var r;let i=n?hD(t.actions):[];return $R("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},$R("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage():t.message),null===(r=t.actions)||void 0===r?void 0:r.map((n,r)=>{let o=!1,s=r=>{if(r.preventDefault(),o)return;o=!0;let i=KN(e.state.field(oD).diagnostics,t);i&&n.apply(e,i.from,i.to)},{name:a}=n,l=i[r]?a.indexOf(i[r]):-1,c=l<0?a:[a.slice(0,l),$R("u",a.slice(l,l+1)),a.slice(l+1)];return $R("button",{type:"button",class:"cm-diagnosticAction",onclick:s,onmousedown:s,"aria-label":` Action: ${a}${l<0?"":` (access key "${i[r]})"`}.`},c)}),t.source&&$R("div",{class:"cm-diagnosticSource"},t.source))}class fD extends BO{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return $R("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class mD{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=pD(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class gD{constructor(e){this.view=e,this.items=[];this.list=$R("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t=>{if(27==t.keyCode)cD(this.view),this.view.focus();else if(38==t.keyCode||33==t.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==t.keyCode||34==t.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==t.keyCode)this.moveSelection(0);else if(35==t.keyCode)this.moveSelection(this.items.length-1);else if(13==t.keyCode)this.view.focus();else{if(!(t.keyCode>=65&&t.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:n}=this.items[this.selectedIndex],r=hD(n.actions);for(let i=0;i<r.length;i++)if(r[i].toUpperCase().charCodeAt(0)==t.keyCode){let t=KN(this.view.state.field(oD).diagnostics,n);t&&n.actions[i].apply(e,t.from,t.to)}}}t.preventDefault()},onclick:e=>{for(let t=0;t<this.items.length;t++)this.items[t].dom.contains(e.target)&&this.moveSelection(t)}}),this.dom=$R("div",{class:"cm-panel-lint"},this.list,$R("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>cD(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(oD).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(oD),n=0,r=!1,i=null;for(e.between(0,this.view.state.doc.length,(e,o,{spec:s})=>{let a,l=-1;for(let e=n;e<this.items.length;e++)if(this.items[e].diagnostic==s.diagnostic){l=e;break}l<0?(a=new mD(this.view,s.diagnostic),this.items.splice(n,0,a),r=!0):(a=this.items[l],l>n&&(this.items.splice(n,l-n),r=!0)),t&&a.diagnostic==t.diagnostic?a.dom.hasAttribute("aria-selected")||(a.dom.setAttribute("aria-selected","true"),i=a):a.dom.hasAttribute("aria-selected")&&a.dom.removeAttribute("aria-selected"),n++});n<this.items.length&&!(1==this.items.length&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();0==this.items.length&&(this.items.push(new mD(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),r=!0),i?(this.list.setAttribute("aria-activedescendant",i.id),this.view.requestMeasure({key:this,read:()=>({sel:i.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{e.top<t.top?this.list.scrollTop-=t.top-e.top:e.bottom>t.bottom&&(this.list.scrollTop+=e.bottom-t.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=KN(this.view.state.field(oD).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:iD.of(t)})}static open(e){return new gD(e)}}function bD(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}function vD(e){return bD(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const yD=fT.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:vD("#d11")},".cm-lintRange-warning":{backgroundImage:vD("orange")},".cm-lintRange-info":{backgroundImage:vD("#999")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});const SD=[oD,fT.decorations.compute([oD],e=>{let{selected:t,panel:n}=e.field(oD);return t&&n&&t.from!=t.to?FO.set([sD.range(t.from,t.to)]):FO.none}),kC(aD,{hideOn:eD}),yD];const _D=(()=>[ZC(),eM,KT(),mP(),C$(),DT(),[qT,GT],lk.allowMultipleSelections.of(!0),lk.transactionFilter.of(e=>{if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;let t=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!t.length)return e;let n=e.newDoc,{head:r}=e.newSelection.main,i=n.lineAt(r);if(r>i.from+200)return e;let o=n.sliceString(i.from,r);if(!t.some(e=>e.test(o)))return e;let{state:s}=e,a=-1,l=[];for(let{head:e}of s.selection.ranges){let t=s.doc.lineAt(e);if(t.from==a)continue;a=t.from;let n=YM(s,t.from);if(null==n)continue;let r=/^\s*/.exec(t.text)[0],i=XM(s,n);r!=i&&l.push({from:t.from,to:t.from+r.length,insert:i})}return l.length?[e,{changes:l,sequential:!0}]:e}),N$(L$,{fallback:!0}),G$(),[BN,NN],WN(),aC(),uC(),iC,WR(),xT.of([...zN,...CR,...Tj,...$P,...x$,...XN,...uD])])();function xD(e){const t=e.selection.main.head;return e.doc.lineAt(t)}function wD(e,t){let n=0;e:for(let r=0;r<e.length;r++)switch(e[r]){case" ":n+=1;continue e;case"\t":n+=t-n%t;continue e;case"\r":continue e;default:break e}return n}const kD=Sw.define({combine:e=>ck(e,{highlightActiveBlock:!0,hideFirstIndent:!1})});class OD{constructor(e,t,n){this.lines=e,this.state=t,this.map=new Map,this.unitWidth=n;for(const e of this.lines)this.add(e);this.state.facet(kD).highlightActiveBlock&&this.findAndSetActiveLines()}has(e){return this.map.has("number"==typeof e?e:e.number)}get(e){const t=this.map.get("number"==typeof e?e:e.number);if(!t)throw new Error("Line not found in indentation map");return t}set(e,t,n){const r=!e.text.trim().length,i={line:e,col:t,level:n,empty:r};return this.map.set(i.line.number,i),i}add(e){if(this.has(e))return this.get(e);if(!e.length||!e.text.trim().length){if(1===e.number)return this.set(e,0,0);if(e.number===this.state.doc.lines){const t=this.closestNonEmpty(e,-1);return this.set(e,0,t.level)}const t=this.closestNonEmpty(e,-1),n=this.closestNonEmpty(e,1);return t.level>=n.level?this.set(e,0,t.level):t.empty&&0===t.level&&0!==n.level?this.set(e,0,0):n.level>t.level?this.set(e,0,t.level+1):this.set(e,0,n.level)}const t=wD(e.text,this.state.tabSize),n=Math.floor(t/this.unitWidth);return this.set(e,t,n)}closestNonEmpty(e,t){let n=e.number+t;for(;-1===t?n>=1:n<=this.state.doc.lines;){if(this.has(n)){const e=this.get(n);if(!e.empty)return e}const e=this.state.doc.line(n);if(e.text.trim().length){const t=wD(e.text,this.state.tabSize),n=Math.floor(t/this.unitWidth);return this.set(e,t,n)}n+=t}const r=this.state.doc.line(-1===t?1:this.state.doc.lines);return this.set(r,0,0)}findAndSetActiveLines(){const e=xD(this.state);if(!this.has(e))return;let t,n,r=this.get(e);if(this.has(r.line.number+1)){const e=this.get(r.line.number+1);e.level>r.level&&(r=e)}if(this.has(r.line.number-1)){const e=this.get(r.line.number-1);e.level>r.level&&(r=e)}if(0!==r.level){for(r.active=r.level,t=r.line.number;t>1;t--){if(!this.has(t-1))continue;const e=this.get(t-1);if(e.level<r.level)break;e.active=r.level}for(n=r.line.number;n<this.state.doc.lines;n++){if(!this.has(n+1))continue;const e=this.get(n+1);if(e.level<r.level)break;e.active=r.level}}}}const ED=fT.baseTheme({"&light":{"--indent-marker-bg-color":"#F0F1F2","--indent-marker-active-bg-color":"#E4E5E6"},"&dark":{"--indent-marker-bg-color":"#2B3245","--indent-marker-active-bg-color":"#3C445C"},".cm-line":{position:"relative"},".cm-indent-markers::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,background:"var(--indent-markers)",pointerEvents:"none",zIndex:"-1"}});function AD(e,t,n,r){return`${`repeating-linear-gradient(to right, var(${e}) 0 1px, transparent 1px ${t}ch)`} ${n*t}.5ch/calc(${t*r}ch - 1px) no-repeat`}function TD(e,t,n){const{level:r,active:i}=e;if(n&&0===r)return[];const o=n?1:0,s=[];if(void 0!==i){const e=i-o-1;e>0&&s.push(AD("--indent-marker-bg-color",t,o,e)),s.push(AD("--indent-marker-active-bg-color",t,i-1,1)),i!==r&&s.push(AD("--indent-marker-bg-color",t,i,r-i))}else s.push(AD("--indent-marker-bg-color",t,o,r-o));return s.join(",")}class CD{constructor(e){this.view=e,this.unitWidth=WM(e.state),this.currentLineNumber=xD(e.state).number,this.generate(e.state)}update(e){const t=WM(e.state),n=t!==this.unitWidth;n&&(this.unitWidth=t);const r=xD(e.state).number,i=r!==this.currentLineNumber;this.currentLineNumber=r;const o=e.state.facet(kD).highlightActiveBlock&&i;(e.docChanged||e.viewportChanged||n||o)&&this.generate(e.state)}generate(e){const t=new mk,n=function(e,t=e.state){const n=new Set;for(const{from:r,to:i}of e.visibleRanges){let e=r;for(;e<=i;){const r=t.doc.lineAt(e);n.has(r)||n.add(r),e=r.to+1}}return n}(this.view,e),r=new OD(n,e,this.unitWidth),{hideFirstIndent:i}=e.facet(kD);for(const e of n){const n=r.get(e.number);if(!(null==n?void 0:n.level))continue;const o=TD(n,this.unitWidth,i);t.add(e.from,e.from,FO.line({class:"cm-indent-markers",attributes:{style:"--indent-markers: "+o}}))}this.decorations=t.finish()}}function MD(e={}){return[kD.of(e),ED,pE.fromClass(CD,{decorations:e=>e.decorations})]}var $D=n(13);const PD={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},RD={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},jD={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function ND(e){return 9==e||10==e||13==e||32==e}let DD=null,ID=null,LD=0;function BD(e,t){let n=e.pos+t;if(LD==n&&ID==e)return DD;let r=e.peek(t);for(;ND(r);)r=e.peek(++t);let i="";for(;45==(o=r)||46==o||58==o||o>=65&&o<=90||95==o||o>=97&&o<=122||o>=161;)i+=String.fromCharCode(r),r=e.peek(++t);var o;return ID=e,LD=n,DD=i?i.toLowerCase():r==zD||r==FD?void 0:null}const zD=63,FD=33;function UD(e,t){this.name=e,this.parent=t,this.hash=t?t.hash:0;for(let t=0;t<e.length;t++)this.hash+=(this.hash<<4)+e.charCodeAt(t)+(e.charCodeAt(t)<<8)}const QD=[6,10,7,8,9],qD=new $D.a({start:null,shift:(e,t,n,r)=>QD.indexOf(t)>-1?new UD(BD(r,1)||"",e):e,reduce:(e,t)=>20==t&&e?e.parent:e,reuse(e,t,n,r){let i=t.type.id;return 6==i||36==i?new UD(BD(r,1)||"",e):e},hash:e=>e?e.hash:0,strict:!1}),GD=new $D.b((e,t)=>{if(60!=e.next)return void(e.next<0&&t.context&&e.acceptToken(57));e.advance();let n=47==e.next;n&&e.advance();let r=BD(e,0);if(void 0===r)return;if(!r)return e.acceptToken(n?14:6);let i=t.context?t.context.name:null;if(n){if(r==i)return e.acceptToken(11);if(i&&RD[i])return e.acceptToken(57,-2);if(t.dialectEnabled(0))return e.acceptToken(12);for(let e=t.context;e;e=e.parent)if(e.name==r)return;e.acceptToken(13)}else{if("script"==r)return e.acceptToken(7);if("style"==r)return e.acceptToken(8);if("textarea"==r)return e.acceptToken(9);if(PD.hasOwnProperty(r))return e.acceptToken(10);i&&jD[i]&&jD[i][r]?e.acceptToken(57,-1):e.acceptToken(6)}},{contextual:!0}),HD=new $D.b(e=>{for(let t=0,n=0;;n++){if(e.next<0){n&&e.acceptToken(58);break}if(45==e.next)t++;else{if(62==e.next&&t>=2){n>3&&e.acceptToken(58,-2);break}t=0}e.advance()}});const VD=new $D.b((e,t)=>{if(47==e.next&&62==e.peek(1)){let n=t.dialectEnabled(1)||function(e){for(;e;e=e.parent)if("svg"==e.name||"math"==e.name)return!0;return!1}(t.context);e.acceptToken(n?5:4,2)}else 62==e.next&&e.acceptToken(4,1)});function WD(e,t,n){let r=2+e.length;return new $D.b(i=>{for(let o=0,s=0,a=0;;a++){if(i.next<0){a&&i.acceptToken(t);break}if(0==o&&60==i.next||1==o&&47==i.next||o>=2&&o<r&&i.next==e.charCodeAt(o-2))o++,s++;else if(2!=o&&o!=r||!ND(i.next)){if(o==r&&62==i.next){a>s?i.acceptToken(t,-s):i.acceptToken(n,-(s-2));break}if((10==i.next||13==i.next)&&a){i.acceptToken(t,1);break}o=s=0}else s++;i.advance()}})}const XD=WD("script",54,1),YD=WD("style",55,2),ZD=WD("textarea",56,3),JD=sM({"Text RawText":AM.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":AM.angleBracket,TagName:AM.tagName,"MismatchedCloseTag/TagName":[AM.tagName,AM.invalid],AttributeName:AM.attributeName,"AttributeValue UnquotedAttributeValue":AM.attributeValue,Is:AM.definitionOperator,"EntityReference CharacterReference":AM.character,Comment:AM.blockComment,ProcessingInst:AM.processingInstruction,DoctypeDecl:AM.documentMeta}),KD=$D.c.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%WQ&rO,59fO%`Q&rO,59iO%hQ&rO,59lO%sQ&rO,59nOOOa'#D^'#D^O%{OaO'#CxO&WOaO,59[OOOb'#D_'#D_O&`ObO'#C{O&kObO,59[OOOd'#D`'#D`O&sOdO'#DOO'OOdO,59[OOO`'#Da'#DaO'WO!rO,59[O'_Q#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'dO$fO,59oOOO`,59o,59oO'lQ#|O,59qO'qQ#|O,59rOOO`-E7W-E7WO'vQ&rO'#CsOOQW'#DZ'#DZO(UQ&rO1G.wOOOa1G.w1G.wO(^Q&rO1G/QOOOb1G/Q1G/QO(fQ&rO1G/TOOOd1G/T1G/TO(nQ&rO1G/WOOO`1G/W1G/WOOO`1G/Y1G/YO(yQ&rO1G/YOOOa-E7[-E7[O)RQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)WQ#tO'#C|OOOd-E7^-E7^O)]Q#tO'#DPOOO`-E7_-E7_O)bQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/^O)gQ,UO,59_OOQW-E7X-E7XOOOa7+$c7+$cOOOb7+$l7+$lOOOd7+$o7+$oOOO`7+$r7+$rOOO`7+$t7+$tO)rQ#|O,59eO)wQ#|O,59hO)|Q#|O,59kOOO`1G/X1G/XO*RO7[O'#CvO*dOMhO'#CvOOQW1G.y1G.yOOO`1G/P1G/POOO`1G/S1G/SOOO`1G/V1G/VOOOO'#D['#D[O*uO7[O,59bOOQW,59b,59bOOOO'#D]'#D]O+WOMhO,59bOOOO-E7Y-E7YOOQW1G.|1G.|OOOO-E7Z-E7Z",stateData:"+s~O!^OS~OUSOVPOWQOXROYTO[]O][O^^O`^Oa^Ob^Oc^Ox^O{_O!dZO~OfaO~OfbO~OfcO~OfdO~OfeO~O!WfOPlP!ZlP~O!XiOQoP!ZoP~O!YlORrP!ZrP~OUSOVPOWQOXROYTOZqO[]O][O^^O`^Oa^Ob^Oc^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OfvO~OfwO~OS|OhyO~OS!OOhyO~OS!QOhyO~OS!SOT!TOhyO~OS!TOhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXhgXTgX~OS!fOhyO~OS!gOhyO~OS!hOhyO~OS!iOT!jOhyO~OS!jOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:qD,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"]],propSources:[JD],skippedNodes:[0],repeatNodeCount:9,tokenData:"#%g!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs4ysv-_vw5iwxJ^x}-_}!OKP!O!P-_!P!Q$q!Q![-_![!]!!O!]!^-_!^!_!&W!_!`#$o!`!a&X!a!c-_!c!}!!O!}#R-_#R#S!!O#S#T3V#T#o!!O#o#s-_#s$f$q$f%W-_%W%o!!O%o%p-_%p&a!!O&a&b-_&b1p!!O1p4U-_4U4d!!O4d4e-_4e$IS!!O$IS$I`-_$I`$Ib!!O$Ib$Kh-_$Kh%#t!!O%#t&/x-_&/x&Et!!O&Et&FV-_&FV;'S!!O;'S;:j!&Q;:j;=`4s<%l?&r-_?&r?Ah!!O?Ah?BY$q?BY?Mn!!O?MnO$q!Z$|c`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bX`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UV`P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pT`POv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!cpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({W`P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!a`Or)esv)ew;'S)e;'S;=`)y<%lO)e`)|P;=`<%l)ea*SP;=`<%l(t!Q*^V!a`!cpOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!Q*vP;=`<%l*V!R*|P;=`<%l&XW+UYkWOX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+PW+wP;=`<%l+P!Z+}P;=`<%l$q!a,]``P!a`!cp!^^OX&XXY,QYZ,QZ]&X]^,Q^p&Xpq,Qqr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!_-ljhS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_1n!_!a&X!a#S-_#S#T3V#T#s-_#s$f$q$f;'S-_;'S;=`4s<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q[/echSkWOX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!^!_0p!a#S/^#S#T0p#T#s/^#s$f+P$f;'S/^;'S;=`1h<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+PS0uXhSqr0psw0px!P0p!Q!_0p!a#s0p$f;'S0p;'S;=`1b<%l?Ah0p?BY?Mn0pS1eP;=`<%l0p[1kP;=`<%l/^!U1wbhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!U3SP;=`<%l1n!V3bchS`P!a`!cpOq&Xqr3Vrs&}sv3Vvw0pwx(tx!P3V!P!Q&X!Q!^3V!^!_1n!_!a&X!a#s3V#s$f&X$f;'S3V;'S;=`4m<%l?Ah3V?Ah?BY&X?BY?Mn3V?MnO&X!V4pP;=`<%l3V!_4vP;=`<%l-_!Z5SV!`h`P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}!_5rjhSkWc!ROX7dXZ8qZ[7d[^8q^p7dqr:crs8qst@Ttw:cwx8qx!P:c!P!Q7d!Q!]:c!]!^/^!^!_=p!_!a8q!a#S:c#S#T=p#T#s:c#s$f7d$f;'S:c;'S;=`?}<%l?Ah:c?Ah?BY7d?BY?Mn:c?MnO7d!Z7ibkWOX7dXZ8qZ[7d[^8q^p7dqr7drs8qst+Ptw7dwx8qx!]7d!]!^9f!^!a8q!a#S7d#S#T8q#T;'S7d;'S;=`:]<%lO7d!R8tVOp8qqs8qt!]8q!]!^9Z!^;'S8q;'S;=`9`<%lO8q!R9`Oa!R!R9cP;=`<%l8q!Z9mYkWa!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z:`P;=`<%l7d!_:jjhSkWOX7dXZ8qZ[7d[^8q^p7dqr:crs8qst/^tw:cwx8qx!P:c!P!Q7d!Q!]:c!]!^<[!^!_=p!_!a8q!a#S:c#S#T=p#T#s:c#s$f7d$f;'S:c;'S;=`?}<%l?Ah:c?Ah?BY7d?BY?Mn:c?MnO7d!_<echSkWa!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!^!_0p!a#S/^#S#T0p#T#s/^#s$f+P$f;'S/^;'S;=`1h<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!V=udhSOp8qqr=prs8qst0ptw=pwx8qx!P=p!P!Q8q!Q!]=p!]!^?T!^!_=p!_!a8q!a#s=p#s$f8q$f;'S=p;'S;=`?w<%l?Ah=p?Ah?BY8q?BY?Mn=p?MnO8q!V?[XhSa!Rqr0psw0px!P0p!Q!_0p!a#s0p$f;'S0p;'S;=`1b<%l?Ah0p?BY?Mn0p!V?zP;=`<%l=p!_@QP;=`<%l:c!_@[ihSkWOXAyXZCTZ[Ay[^CT^pAyqrDrrsCTswDrwxCTx!PDr!P!QAy!Q!]Dr!]!^/^!^!_G|!_!aCT!a#SDr#S#TG|#T#sDr#s$fAy$f;'SDr;'S;=`JW<%l?AhDr?Ah?BYAy?BY?MnDr?MnOAy!ZBOakWOXAyXZCTZ[Ay[^CT^pAyqrAyrsCTswAywxCTx!]Ay!]!^Cu!^!aCT!a#SAy#S#TCT#T;'SAy;'S;=`Dl<%lOAy!RCWUOpCTq!]CT!]!^Cj!^;'SCT;'S;=`Co<%lOCT!RCoOb!R!RCrP;=`<%lCT!ZC|YkWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZDoP;=`<%lAy!_DyihSkWOXAyXZCTZ[Ay[^CT^pAyqrDrrsCTswDrwxCTx!PDr!P!QAy!Q!]Dr!]!^Fh!^!_G|!_!aCT!a#SDr#S#TG|#T#sDr#s$fAy$f;'SDr;'S;=`JW<%l?AhDr?Ah?BYAy?BY?MnDr?MnOAy!_FqchSkWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!^!_0p!a#S/^#S#T0p#T#s/^#s$f+P$f;'S/^;'S;=`1h<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VHRchSOpCTqrG|rsCTswG|wxCTx!PG|!P!QCT!Q!]G|!]!^I^!^!_G|!_!aCT!a#sG|#s$fCT$f;'SG|;'S;=`JQ<%l?AhG|?Ah?BYCT?BY?MnG|?MnOCT!VIeXhSb!Rqr0psw0px!P0p!Q!_0p!a#s0p$f;'S0p;'S;=`1b<%l?Ah0p?BY?Mn0p!VJTP;=`<%lG|!_JZP;=`<%lDr!ZJgW!bx`P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aK^lhS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMU!O!P-_!P!Q$q!Q!^-_!^!_1n!_!a&X!a#S-_#S#T3V#T#s-_#s$f$q$f;'S-_;'S;=`4s<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aMckhS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_1n!_!`&X!`!a! W!a#S-_#S#T3V#T#s-_#s$f$q$f;'S-_;'S;=`4s<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!T! cX`P!a`!cp!eQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!a!!_!ZhSfQ`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!O!!O!O!P!!O!P!Q$q!Q![!!O![!]!!O!]!^-_!^!_1n!_!a&X!a!c-_!c!}!!O!}#R-_#R#S!!O#S#T3V#T#o!!O#o#s-_#s$f$q$f$}-_$}%O!!O%O%W-_%W%o!!O%o%p-_%p&a!!O&a&b-_&b1p!!O1p4U!!O4U4d!!O4d4e-_4e$IS!!O$IS$I`-_$I`$Ib!!O$Ib$Je-_$Je$Jg!!O$Jg$Kh-_$Kh%#t!!O%#t&/x-_&/x&Et!!O&Et&FV-_&FV;'S!!O;'S;:j!&Q;:j;=`4s<%l?&r-_?&r?Ah!!O?Ah?BY$q?BY?Mn!!O?MnO$q!a!&TP;=`<%l!!O!V!&achS!a`!cpOq*Vqr!'lrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a!b!Ey!b#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!'uhhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex}1n}!O!)a!O!P1n!P!Q*V!Q!_1n!_!a*V!a!f1n!f!g!,]!g#W1n#W#X!<y#X#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!)jdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex}1n}!O!*x!O!P1n!P!Q*V!Q!_1n!_!a*V!a#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!+TbhS!a`!cp!dPOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!,fdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a!q1n!q!r!-t!r#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!-}dhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a!e1n!e!f!/]!f#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!/fdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a!v1n!v!w!0t!w#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!0}dhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a!{1n!{!|!2]!|#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!2fdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a!r1n!r!s!3t!s#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!3}dhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a!g1n!g!h!5]!h#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!5fchS!a`!cpOq!6qqr!5]rs!7hsv!5]vw!;`wx!9[x!P!5]!P!Q!6q!Q!_!5]!_!`!6q!`!a!:j!a#s!5]#s$f!6q$f;'S!5];'S;=`!<s<%l?Ah!5]?Ah?BY!6q?BY?Mn!5]?MnO!6q!R!6xY!a`!cpOr!6qrs!7hsv!6qvw!8Swx!9[x!`!6q!`!a!:j!a;'S!6q;'S;=`!;Y<%lO!6qq!7mV!cpOv!7hvx!8Sx!`!7h!`!a!8q!a;'S!7h;'S;=`!9U<%lO!7hP!8VTO!`!8S!`!a!8f!a;'S!8S;'S;=`!8k<%lO!8SP!8kO{PP!8nP;=`<%l!8Sq!8xS!cp{POv(Vx;'S(V;'S;=`(h<%lO(Vq!9XP;=`<%l!7ha!9aX!a`Or!9[rs!8Ssv!9[vw!8Sw!`!9[!`!a!9|!a;'S!9[;'S;=`!:d<%lO!9[a!:TT!a`{POr)esv)ew;'S)e;'S;=`)y<%lO)ea!:gP;=`<%l!9[!R!:sV!a`!cp{POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;]P;=`<%l!6qT!;ebhSOq!8Sqr!;`rs!8Ssw!;`wx!8Sx!P!;`!P!Q!8S!Q!_!;`!_!`!8S!`!a!8f!a#s!;`#s$f!8S$f;'S!;`;'S;=`!<m<%l?Ah!;`?Ah?BY!8S?BY?Mn!;`?MnO!8ST!<pP;=`<%l!;`!V!<vP;=`<%l!5]!V!=SdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#c1n#c#d!>b#d#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!>kdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#V1n#V#W!?y#W#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!@SdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#h1n#h#i!Ab#i#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!AkdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#m1n#m#n!By#n#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!CSdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#d1n#d#e!Db#e#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!DkdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#X1n#X#Y!5]#Y#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!FSchS!a`!cpOq!G_qr!Eyrs!HUsv!Eyvw!Ncwx!Jvx!P!Ey!P!Q!G_!Q!_!Ey!_!a!G_!a!b##T!b#s!Ey#s$f!G_$f;'S!Ey;'S;=`#$i<%l?Ah!Ey?Ah?BY!G_?BY?Mn!Ey?MnO!G_!R!GfY!a`!cpOr!G_rs!HUsv!G_vw!Hpwx!Jvx!a!G_!a!b!Lv!b;'S!G_;'S;=`!N]<%lO!G_q!HZV!cpOv!HUvx!Hpx!a!HU!a!b!Iq!b;'S!HU;'S;=`!Jp<%lO!HUP!HsTO!a!Hp!a!b!IS!b;'S!Hp;'S;=`!Ik<%lO!HpP!IVTO!`!Hp!`!a!If!a;'S!Hp;'S;=`!Ik<%lO!HpP!IkOxPP!InP;=`<%l!Hpq!IvV!cpOv!HUvx!Hpx!`!HU!`!a!J]!a;'S!HU;'S;=`!Jp<%lO!HUq!JdS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!JsP;=`<%l!HUa!J{X!a`Or!Jvrs!Hpsv!Jvvw!Hpw!a!Jv!a!b!Kh!b;'S!Jv;'S;=`!Lp<%lO!Jva!KmX!a`Or!Jvrs!Hpsv!Jvvw!Hpw!`!Jv!`!a!LY!a;'S!Jv;'S;=`!Lp<%lO!Jva!LaT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!LsP;=`<%l!Jv!R!L}Y!a`!cpOr!G_rs!HUsv!G_vw!Hpwx!Jvx!`!G_!`!a!Mm!a;'S!G_;'S;=`!N]<%lO!G_!R!MvV!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!N`P;=`<%l!G_T!NhbhSOq!Hpqr!Ncrs!Hpsw!Ncwx!Hpx!P!Nc!P!Q!Hp!Q!_!Nc!_!a!Hp!a!b# p!b#s!Nc#s$f!Hp$f;'S!Nc;'S;=`#!}<%l?Ah!Nc?Ah?BY!Hp?BY?Mn!Nc?MnO!HpT# ubhSOq!Hpqr!Ncrs!Hpsw!Ncwx!Hpx!P!Nc!P!Q!Hp!Q!_!Nc!_!`!Hp!`!a!If!a#s!Nc#s$f!Hp$f;'S!Nc;'S;=`#!}<%l?Ah!Nc?Ah?BY!Hp?BY?Mn!Nc?MnO!HpT##QP;=`<%l!Nc!V##^chS!a`!cpOq!G_qr!Eyrs!HUsv!Eyvw!Ncwx!Jvx!P!Ey!P!Q!G_!Q!_!Ey!_!`!G_!`!a!Mm!a#s!Ey#s$f!G_$f;'S!Ey;'S;=`#$i<%l?Ah!Ey?Ah?BY!G_?BY?Mn!Ey?MnO!G_!V#$lP;=`<%l!Ey!V#$zXiS`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[XD,YD,ZD,VD,GD,HD,0,1,2,3,4,5],topRules:{Document:[0,15]},dialects:{noMatch:0,selfClosing:485},tokenPrec:487});function eI(e,t){let n=Object.create(null);for(let r of e.getChildren(23)){let e=r.getChild(24),i=r.getChild(26)||r.getChild(27);e&&(n[t.read(e.from,e.to)]=i?26==i.type.id?t.read(i.from+1,i.to-1):t.read(i.from,i.to):"")}return n}function tI(e,t){let n=e.getChild(22);return n?t.read(n.from,n.to):" "}function nI(e,t,n){let r;for(let i of n)if(!i.attrs||i.attrs(r||(r=eI(e.node.parent.firstChild,t))))return{parser:i.parser};return null}function rI(e=[],t=[]){let n=[],r=[],i=[],o=[];for(let t of e){("script"==t.tag?n:"style"==t.tag?r:"textarea"==t.tag?i:o).push(t)}let s=t.length?Object.create(null):null;for(let e of t)(s[e.name]||(s[e.name]=[])).push(e);return Object(tM.j)((e,t)=>{let a=e.type.id;if(28==a)return nI(e,t,n);if(31==a)return nI(e,t,r);if(34==a)return nI(e,t,i);if(20==a&&o.length){let n,r=e.node,i=r.firstChild,s=i&&tI(i,t);if(s)for(let e of o)if(e.tag==s&&(!e.attrs||e.attrs(n||(n=eI(r,t))))){let t=r.lastChild;return{parser:e.parser,overlay:[{from:i.to,to:37==t.type.id?t.from:r.to}]}}}if(s&&23==a){let n,r=e.node;if(n=r.firstChild){let e=s[t.read(n.from,n.to)];if(e)for(let n of e){if(n.tagName&&n.tagName!=tI(r.parent,t))continue;let e=r.lastChild;if(26==e.type.id){let t=e.from+1,r=e.lastChild,i=e.to-(r&&r.isError?0:1);if(i>t)return{parser:n.parser,overlay:[{from:t,to:i}]}}else if(27==e.type.id)return{parser:n.parser,overlay:[{from:e.from,to:e.to}]}}}}return null})}const iI=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288];function oI(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}const sI=new $D.b((e,t)=>{for(let r=!1,i=0,o=0;;o++){let{next:s}=e;if(!(oI(s)||45==s||95==s||r&&(n=s,n>=48&&n<=57))){r&&e.acceptToken(40==s?95:2==i&&t.canShift(2)?2:96);break}!r&&(45!=s||o>0)&&(r=!0),i===o&&45==s&&i++,e.advance()}var n}),aI=new $D.b(e=>{if(iI.includes(e.peek(-1))){let{next:t}=e;(oI(t)||95==t||35==t||46==t||91==t||58==t||45==t)&&e.acceptToken(94)}}),lI=new $D.b(e=>{if(!iI.includes(e.peek(-1))){let{next:t}=e;if(37==t&&(e.advance(),e.acceptToken(1)),oI(t)){do{e.advance()}while(oI(e.next));e.acceptToken(1)}}}),cI=sM({"AtKeyword import charset namespace keyframes media supports":AM.definitionKeyword,"from to selector":AM.keyword,NamespaceName:AM.namespace,KeyframeName:AM.labelName,TagName:AM.tagName,ClassName:AM.className,PseudoClassName:AM.constant(AM.className),IdName:AM.labelName,"FeatureName PropertyName":AM.propertyName,AttributeName:AM.attributeName,NumberLiteral:AM.number,KeywordQuery:AM.keyword,UnaryQueryOp:AM.operatorKeyword,"CallTag ValueName":AM.atom,VariableName:AM.variableName,Callee:AM.operatorKeyword,Unit:AM.unit,"UniversalSelector NestingSelector":AM.definitionOperator,MatchOp:AM.compareOperator,"ChildOp SiblingOp, LogicOp":AM.logicOperator,BinOp:AM.arithmeticOperator,Important:AM.modifier,Comment:AM.blockComment,ParenthesizedContent:AM.special(AM.name),ColorLiteral:AM.color,StringLiteral:AM.string,":":AM.punctuation,"PseudoOp #":AM.derefOperator,"; ,":AM.separator,"( )":AM.paren,"[ ]":AM.squareBracket,"{ }":AM.brace}),uI={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},dI={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},hI={__proto__:null,not:128,only:128,from:158,to:160},pI=$D.c.deserialize({version:14,states:"7WQYQ[OOO#_Q[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO#fQ[O'#CfO$YQXO'#CaO$aQ[O'#ChO$lQ[O'#DPO$qQ[O'#DTOOQP'#Ed'#EdO$vQdO'#DeO%bQ[O'#DrO$vQdO'#DtO%sQ[O'#DvO&OQ[O'#DyO&TQ[O'#EPO&cQ[O'#EROOQS'#Ec'#EcOOQS'#ET'#ETQYQ[OOO&jQXO'#CdO'_QWO'#DaO'dQWO'#EjO'oQ[O'#EjQOQWOOOOQP'#Cg'#CgOOQP,59Q,59QO#fQ[O,59QO'yQ[O'#EWO(eQWO,58{O(mQ[O,59SO$lQ[O,59kO$qQ[O,59oO'yQ[O,59sO'yQ[O,59uO'yQ[O,59vO(xQ[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO)PQWO,59SO)UQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO)ZQ`O,59oOOQS'#Cp'#CpO$vQdO'#CqO)cQvO'#CsO*pQtO,5:POOQO'#Cx'#CxO)UQWO'#CwO+UQWO'#CyOOQS'#Eg'#EgOOQO'#Dh'#DhO+ZQ[O'#DoO+iQWO'#EkO&TQ[O'#DmO+wQWO'#DpOOQO'#El'#ElO(hQWO,5:^O+|QpO,5:`OOQS'#Dx'#DxO,UQWO,5:bO,ZQ[O,5:bOOQO'#D{'#D{O,cQWO,5:eO,hQWO,5:kO,pQWO,5:mOOQS-E8R-E8RO$vQdO,59{O,xQ[O'#EYO-VQWO,5;UO-VQWO,5;UOOQP1G.l1G.lO-|QXO,5:rOOQO-E8U-E8UOOQS1G.g1G.gOOQP1G.n1G.nO)PQWO1G.nO)UQWO1G.nOOQP1G/V1G/VO.ZQ`O1G/ZO.tQXO1G/_O/[QXO1G/aO/rQXO1G/bO0YQWO,59zO0_Q[O'#DOO0fQdO'#CoOOQP1G/Z1G/ZO$vQdO1G/ZO0mQpO,59]OOQS,59_,59_O$vQdO,59aO0uQWO1G/kOOQS,59c,59cO0zQ!bO,59eO1SQWO'#DhO1_QWO,5:TO1dQWO,5:ZO&TQ[O,5:VO&TQ[O'#EZO1lQWO,5;VO1wQWO,5:XO'yQ[O,5:[OOQS1G/x1G/xOOQS1G/z1G/zOOQS1G/|1G/|O2YQWO1G/|O2_QdO'#D|OOQS1G0P1G0POOQS1G0V1G0VOOQS1G0X1G0XO2mQtO1G/gOOQO,5:t,5:tO3TQ[O,5:tOOQO-E8W-E8WO3bQWO1G0pOOQP7+$Y7+$YOOQP7+$u7+$uO$vQdO7+$uOOQS1G/f1G/fO3mQXO'#EiO3tQWO,59jO3yQtO'#EUO4nQdO'#EfO4xQWO,59ZO4}QpO7+$uOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%V7+%VO5VQWO1G/PO$vQdO1G/oOOQO1G/u1G/uOOQO1G/q1G/qO5[QWO,5:uOOQO-E8X-E8XO5jQXO1G/vOOQS7+%h7+%hO5qQYO'#CsO(hQWO'#E[O5yQdO,5:hOOQS,5:h,5:hO6XQtO'#EXO$vQdO'#EXO7VQdO7+%ROOQO7+%R7+%ROOQO1G0`1G0`O7jQpO<<HaO7rQWO,5;TOOQP1G/U1G/UOOQS-E8S-E8SO$vQdO'#EVO7zQWO,5;QOOQT1G.u1G.uOOQP<<Ha<<HaOOQS7+$k7+$kO8SQdO7+%ZOOQO7+%b7+%bOOQS,5:v,5:vOOQS-E8Y-E8YOOQS1G0S1G0SO8ZQtO,5:sOOQS-E8V-E8VOOQO<<Hm<<HmOOQPAN={AN={O9XQdO,5:qOOQO-E8T-E8TOOQO<<Hu<<Hu",stateData:"9i~O#UOSROS~OUXOXXO]UO^UOtVOxWO!Y`O!ZYO!gZO!i[O!k]O!n^O!t_O#SQO#XSO~OQeOUXOXXO]UO^UOtVOxWO!Y`O!ZYO!gZO!i[O!k]O!n^O!t_O#SdO#XSO~O#P#^P~P!ZO#SiO~O]nO^nOplOtoOxpO|qO!PsO#QrO#XkO~O!RtO~P#kO`zO#RwO#SvO~O#S{O~O#S}O~OQ!WOb!QOf!WOh!WOn!VO#R!TO#S!PO#[!RO~Ob!YO!b![O!e!]O#S!XO!R#_P~Oh!bOn!VO#S!aO~O#S!dO~Ob!YO!b![O!e!]O#S!XO~O!W#_P~P%bO]WX]!UX^WXpWXtWXxWX|WX!PWX!RWX#QWX#XWX~O]!iO~O!W!jO#P#^X!Q#^X~O#P#^X!Q#^X~P!ZOUXOXXO]UO^UOtVOxWO#SQO#XSO~OplO!RtO~O`!sO#RwO#SvO~O!Q#^P~P!ZOb!zO~Ob!{O~Ov!|Oz!}O~OP#PObgXjgX!WgX!bgX!egX#SgXagXQgXfgXhgXngXpgX!VgX#PgX#RgX#[gXvgX!QgX~Ob!YOj#QO!b![O!e!]O#S!XO!W#_P~Ob#TO~Ob!YO!b![O!e!]O#S#UO~Op#YO!`#XO!R#_X!W#_X~Ob#]O~Oj#QO!W#_O~O!W#`O~Oh#aOn!VO~O!R#bO~O!RtO!`#XO~O!RtO!W#eO~O!W!|X#P!|X!Q!|X~P!ZO!W!jO#P#^a!Q#^a~O]nO^nOtoOxpO|qO!PsO#QrO#XkO~Op!za!R!zaa!za~P-bOv#lOz#mO~O]nO^nOtoOxpO#XkO~Op{i|{i!P{i!R{i#Q{ia{i~P.cOp}i|}i!P}i!R}i#Q}ia}i~P.cOp!Oi|!Oi!P!Oi!R!Oi#Q!Oia!Oi~P.cO!Q#nO~Oa#]P~P'yOa#YP~P$vOa#uOj#QO~O!W#wO~Oh#xOo#xO~O]!^Xa![X!`![X~O]#yO~Oa#zO!`#XO~Op#YO!R#_a!W#_a~O!`#XOp!aa!R!aa!W!aaa!aa~O!W$PO~O!Q$TO!q$RO!r$RO#[$QO~Oj#QOp$VO!V$XO!W!Ti#P!Ti!Q!Ti~P$vO!W!|a#P!|a!Q!|a~P!ZO!W!jO#P#^i!Q#^i~Oa#]X~P#kOa$]O~Oj#QOQ!xXa!xXb!xXf!xXh!xXn!xXp!xX#R!xX#S!xX#[!xX~Op$_Oa#YX~P$vOa$aO~Oj#QOv$bO~Oa$cO~O!`#XOp!}a!R!}a!W!}a~Oa$eO~P-bOP#PO!RgX~O!Q$hO!q$RO!r$RO#[$QO~Oj#QOQ!{Xb!{Xf!{Xh!{Xn!{Xp!{X!V!{X!W!{X#P!{X#R!{X#S!{X#[!{X!Q!{X~Op$VO!V$kO!W!Tq#P!Tq!Q!Tq~P$vOj#QOv$lO~OplOa#]a~Op$_Oa#Ya~Oa$oO~P$vOj#QOQ!{ab!{af!{ah!{an!{ap!{a!V!{a!W!{a#P!{a#R!{a#S!{a#[!{a!Q!{a~Oa!yap!ya~P$vOo#[j!Pj~",goto:",`#aPPPPP#bP#k#zP#k$Z#kPP$aPPP$g$p$pP%SP$pP$p%j%|PPP&f&l#kP&rP#kP&xP#kP#k#kPPP'O'b'oPP#bPP'v'v(Q'vP'vP'v'vP#bP#bP#bP(T#bP(W(ZPP#bP#bP(^(m({)R)])c)m)sPPPPPP)y*SP*o*rP+h+k+q+z_aOPcgt!j#hkXOPcglqrst!j!z#]#hkROPcglqrst!j!z#]#hQjSR!mkQxUR!qnQ!qzQ#S!UR#k!sq!WY[!Q!i!{!}#Q#f#m#r#y$V$W$_$d$mp!WY[!Q!i!{!}#Q#f#m#r#y$V$W$_$d$mT$R#b$Sq!UY[!Q!i!{!}#Q#f#m#r#y$V$W$_$d$mp!WY[!Q!i!{!}#Q#f#m#r#y$V$W$_$d$mQ!b]R#a!cQyUR!rnQ!qyR#k!rQ|VR!toQ!OWR!upQuTQ!pmQ#^!_Q#d!fQ#e!gR$f$RSfPtQ!lgQ#g!jR$Y#hZePgt!j#ha!^Z_`!S!Y![#X#YR#V!YR!c]R!e^R#c!eQcOSgPtU!hcg#hR#h!jQ#r!{U$^#r$d$mQ$d#yR$m$_Q$`#rR$n$`QmTS!om$[R$[#oQ$W#fR$j$WQ!kfS#i!k#jR#j!lQ#Z!ZR#}#ZQ$S#bR$g$S_bOPcgt!j#h^TOPcgt!j#hQ!nlQ!vqQ!wrQ!xsQ#o!zR$O#]R#s!{Q!SYQ!`[Q#O!QQ#f!i[#q!{#r#y$_$d$mQ#t!}Q#v#QS$U#f$WQ$Z#mR$i$VR#p!zQhPR!ytQ!_ZQ!g`R#R!SU!ZZ`!SQ!f_Q#W!YQ#[![Q#{#XR#|#Y",nodeNames:"⚠ Unit VariableName Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee CallLiteral CallTag ParenthesizedContent , PseudoClassName ArgList IdSelector # IdName ] AttributeSelector [ AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp } { Block Declaration PropertyName Important ; ImportStatement AtKeyword import KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList from to SupportsStatement supports AtRule Styles",maxTerm:108,nodeProps:[["openedBy",17,"(",48,"{"],["closedBy",18,")",49,"}"]],propSources:[cI],skippedNodes:[0,3],repeatNodeCount:8,tokenData:"Lq~R!^OX$}X^%u^p$}pq%uqr)Xrs.Rst/utu6duv$}vw7^wx7oxy9^yz9oz{9t{|:_|}?Q}!O?c!O!P@Q!P!Q@i!Q![Cu![!]Dp!]!^El!^!_$}!_!`E}!`!aF`!a!b$}!b!cG[!c!}$}!}#OHt#O#P$}#P#QIV#Q#R6d#R#T$}#T#UIh#U#c$}#c#dJy#d#o$}#o#pK`#p#q6d#q#rKq#r#sLS#s#y$}#y#z%u#z$f$}$f$g%u$g#BY$}#BY#BZ%u#BZ$IS$}$IS$I_%u$I_$I|$}$I|$JO%u$JO$JT$}$JT$JU%u$JU$KV$}$KV$KW%u$KW&FU$}&FU&FV%u&FV;'S$};'S;=`Lk<%lO$}W%QSOy%^z;'S%^;'S;=`%o<%lO%^W%cSoWOy%^z;'S%^;'S;=`%o<%lO%^W%rP;=`<%l%^~%zh#U~OX%^X^'f^p%^pq'fqy%^z#y%^#y#z'f#z$f%^$f$g'f$g#BY%^#BY#BZ'f#BZ$IS%^$IS$I_'f$I_$I|%^$I|$JO'f$JO$JT%^$JT$JU'f$JU$KV%^$KV$KW'f$KW&FU%^&FU&FV'f&FV;'S%^;'S;=`%o<%lO%^~'mh#U~oWOX%^X^'f^p%^pq'fqy%^z#y%^#y#z'f#z$f%^$f$g'f$g#BY%^#BY#BZ'f#BZ$IS%^$IS$I_'f$I_$I|%^$I|$JO'f$JO$JT%^$JT$JU'f$JU$KV%^$KV$KW'f$KW&FU%^&FU&FV'f&FV;'S%^;'S;=`%o<%lO%^^)[UOy%^z#]%^#]#^)n#^;'S%^;'S;=`%o<%lO%^^)sUoWOy%^z#a%^#a#b*V#b;'S%^;'S;=`%o<%lO%^^*[UoWOy%^z#d%^#d#e*n#e;'S%^;'S;=`%o<%lO%^^*sUoWOy%^z#c%^#c#d+V#d;'S%^;'S;=`%o<%lO%^^+[UoWOy%^z#f%^#f#g+n#g;'S%^;'S;=`%o<%lO%^^+sUoWOy%^z#h%^#h#i,V#i;'S%^;'S;=`%o<%lO%^^,[UoWOy%^z#T%^#T#U,n#U;'S%^;'S;=`%o<%lO%^^,sUoWOy%^z#b%^#b#c-V#c;'S%^;'S;=`%o<%lO%^^-[UoWOy%^z#h%^#h#i-n#i;'S%^;'S;=`%o<%lO%^^-uS!VUoWOy%^z;'S%^;'S;=`%o<%lO%^~.UWOY.RZr.Rrs.ns#O.R#O#P.s#P;'S.R;'S;=`/o<%lO.R~.sOh~~.vRO;'S.R;'S;=`/P;=`O.R~/SXOY.RZr.Rrs.ns#O.R#O#P.s#P;'S.R;'S;=`/o;=`<%l.R<%lO.R~/rP;=`<%l.R_/zYtPOy%^z!Q%^!Q![0j![!c%^!c!i0j!i#T%^#T#Z0j#Z;'S%^;'S;=`%o<%lO%^^0oYoWOy%^z!Q%^!Q![1_![!c%^!c!i1_!i#T%^#T#Z1_#Z;'S%^;'S;=`%o<%lO%^^1dYoWOy%^z!Q%^!Q![2S![!c%^!c!i2S!i#T%^#T#Z2S#Z;'S%^;'S;=`%o<%lO%^^2ZYfUoWOy%^z!Q%^!Q![2y![!c%^!c!i2y!i#T%^#T#Z2y#Z;'S%^;'S;=`%o<%lO%^^3QYfUoWOy%^z!Q%^!Q![3p![!c%^!c!i3p!i#T%^#T#Z3p#Z;'S%^;'S;=`%o<%lO%^^3uYoWOy%^z!Q%^!Q![4e![!c%^!c!i4e!i#T%^#T#Z4e#Z;'S%^;'S;=`%o<%lO%^^4lYfUoWOy%^z!Q%^!Q![5[![!c%^!c!i5[!i#T%^#T#Z5[#Z;'S%^;'S;=`%o<%lO%^^5aYoWOy%^z!Q%^!Q![6P![!c%^!c!i6P!i#T%^#T#Z6P#Z;'S%^;'S;=`%o<%lO%^^6WSfUoWOy%^z;'S%^;'S;=`%o<%lO%^Y6gUOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^Y7QSzQoWOy%^z;'S%^;'S;=`%o<%lO%^X7cSXPOy%^z;'S%^;'S;=`%o<%lO%^~7rWOY7oZw7owx.nx#O7o#O#P8[#P;'S7o;'S;=`9W<%lO7o~8_RO;'S7o;'S;=`8h;=`O7o~8kXOY7oZw7owx.nx#O7o#O#P8[#P;'S7o;'S;=`9W;=`<%l7o<%lO7o~9ZP;=`<%l7o_9cSbVOy%^z;'S%^;'S;=`%o<%lO%^~9tOa~_9{UUPjSOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^_:fWjS!PPOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^^;TUoWOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^^;nYoW#[UOy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^^<cYoWOy%^z{%^{|=R|}%^}!O=R!O!Q%^!Q![=j![;'S%^;'S;=`%o<%lO%^^=WUoWOy%^z!Q%^!Q![=j![;'S%^;'S;=`%o<%lO%^^=qUoW#[UOy%^z!Q%^!Q![=j![;'S%^;'S;=`%o<%lO%^^>[[oW#[UOy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^_?VSpVOy%^z;'S%^;'S;=`%o<%lO%^^?hWjSOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^_@VU#XPOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTjSOy%^z{@}{;'S%^;'S;=`%o<%lO%^~ASUoWOy@}yzAfz{Bm{;'S@};'S;=`Co<%lO@}~AiTOzAfz{Ax{;'SAf;'S;=`Bg<%lOAf~A{VOzAfz{Ax{!PAf!P!QBb!Q;'SAf;'S;=`Bg<%lOAf~BgOR~~BjP;=`<%lAf~BrWoWOy@}yzAfz{Bm{!P@}!P!QC[!Q;'S@};'S;=`Co<%lO@}~CcSoWR~Oy%^z;'S%^;'S;=`%o<%lO%^~CrP;=`<%l@}^Cz[#[UOy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^XDuU]POy%^z![%^![!]EX!];'S%^;'S;=`%o<%lO%^XE`S^PoWOy%^z;'S%^;'S;=`%o<%lO%^_EqS!WVOy%^z;'S%^;'S;=`%o<%lO%^YFSSzQOy%^z;'S%^;'S;=`%o<%lO%^XFeU|POy%^z!`%^!`!aFw!a;'S%^;'S;=`%o<%lO%^XGOS|PoWOy%^z;'S%^;'S;=`%o<%lO%^XG_WOy%^z!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHO[!YPoWOy%^z}%^}!OGw!O!Q%^!Q![Gw![!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHySxPOy%^z;'S%^;'S;=`%o<%lO%^^I[SvUOy%^z;'S%^;'S;=`%o<%lO%^XIkUOy%^z#b%^#b#cI}#c;'S%^;'S;=`%o<%lO%^XJSUoWOy%^z#W%^#W#XJf#X;'S%^;'S;=`%o<%lO%^XJmS!`PoWOy%^z;'S%^;'S;=`%o<%lO%^XJ|UOy%^z#f%^#f#gJf#g;'S%^;'S;=`%o<%lO%^XKeS!RPOy%^z;'S%^;'S;=`%o<%lO%^_KvS!QVOy%^z;'S%^;'S;=`%o<%lO%^ZLXU!PPOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^WLnP;=`<%l$}",tokenizers:[aI,lI,sI,0,1,2,3],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:95,get:e=>uI[e]||-1},{term:56,get:e=>dI[e]||-1},{term:96,get:e=>hI[e]||-1}],tokenPrec:1123});let fI=null;function mI(){if(!fI&&"object"==typeof document&&document.body){let{style:e}=document.body,t=[],n=new Set;for(let r in e)"cssText"!=r&&"cssFloat"!=r&&"string"==typeof e[r]&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())),n.has(r)||(t.push(r),n.add(r)));fI=t.sort().map(e=>({type:"property",label:e}))}return fI||[]}const gI=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(e=>({type:"class",label:e})),bI=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(e=>({type:"keyword",label:e})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(e=>({type:"constant",label:e}))),vI=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(e=>({type:"type",label:e})),yI=/^(\w[\w-]*|-\w[\w-]*|)$/,SI=/^-(-[\w-]*)?$/;const _I=new tM.f,xI=["Declaration"];function wI(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function kI(e,t,n){if(t.to-t.from>4096){let r=_I.get(t);if(r)return r;let i=[],o=new Set,s=t.cursor(tM.b.IncludeAnonymous);if(s.firstChild())do{for(let t of kI(e,s.node,n))o.has(t.label)||(o.add(t.label),i.push(t))}while(s.nextSibling());return _I.set(t,i),i}{let r=[],i=new Set;return t.cursor().iterate(t=>{var o;if(n(t)&&t.matchContext(xI)&&":"==(null===(o=t.node.nextSibling)||void 0===o?void 0:o.name)){let n=e.sliceString(t.from,t.to);i.has(n)||(i.add(n),r.push({label:n,type:"variable"}))}}),r}}const OI=(e=>t=>{let{state:n,pos:r}=t,i=NM(n).resolveInner(r,-1),o=i.type.isError&&i.from==i.to-1&&"-"==n.doc.sliceString(i.from,i.to);if("PropertyName"==i.name||(o||"TagName"==i.name)&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:mI(),validFor:yI};if("ValueName"==i.name)return{from:i.from,options:bI,validFor:yI};if("PseudoClassName"==i.name)return{from:i.from,options:gI,validFor:yI};if(e(i)||(t.explicit||o)&&function(e,t){var n;if(("("==e.name||e.type.isError)&&(e=e.parent||e),"ArgList"!=e.name)return!1;let r=null===(n=e.parent)||void 0===n?void 0:n.firstChild;return"Callee"==(null==r?void 0:r.name)&&"var"==t.sliceString(r.from,r.to)}(i,n.doc))return{from:e(i)||o?i.from:r,options:kI(n.doc,wI(i),e),validFor:SI};if("TagName"==i.name){for(let{parent:e}=i;e;e=e.parent)if("Block"==e.name)return{from:i.from,options:mI(),validFor:yI};return{from:i.from,options:vI,validFor:yI}}if(!t.explicit)return null;let s=i.resolve(r),a=s.childBefore(r);return a&&":"==a.name&&"PseudoClassSelector"==s.name?{from:r,options:gI,validFor:yI}:a&&":"==a.name&&"Declaration"==s.name||"ArgList"==s.name?{from:r,options:bI,validFor:yI}:"Block"==s.name||"Styles"==s.name?{from:r,options:mI(),validFor:yI}:null})(e=>"VariableName"==e.name),EI=jM.define({name:"css",parser:pI.configure({props:[JM.add({Declaration:a$()}),c$.add({Block:u$})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function AI(){return new GM(EI,EI.data.of({autocomplete:OI}))}const TI=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],CI=new $D.a({start:!1,shift:(e,t)=>3==t||4==t||305==t?e:306==t,strict:!1}),MI=new $D.b((e,t)=>{let{next:n}=e;(125==n||-1==n||t.context)&&t.canShift(303)&&e.acceptToken(303)},{contextual:!0,fallback:!0}),$I=new $D.b((e,t)=>{let n,{next:r}=e;TI.indexOf(r)>-1||(47!=r||47!=(n=e.peek(1))&&42!=n)&&125!=r&&59!=r&&-1!=r&&!t.context&&t.canShift(302)&&e.acceptToken(302)},{contextual:!0}),PI=new $D.b((e,t)=>{let{next:n}=e;if((43==n||45==n)&&(e.advance(),n==e.next)){e.advance();let n=!t.context&&t.canShift(1);e.acceptToken(n?1:2)}},{contextual:!0}),RI=sM({"get set async static":AM.modifier,"for while do if else switch try catch finally return throw break continue default case":AM.controlKeyword,"in of await yield void typeof delete instanceof":AM.operatorKeyword,"let var const function class extends":AM.definitionKeyword,"import export from":AM.moduleKeyword,"with debugger as new":AM.keyword,TemplateString:AM.special(AM.string),super:AM.atom,BooleanLiteral:AM.bool,this:AM.self,null:AM.null,Star:AM.modifier,VariableName:AM.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":AM.function(AM.variableName),VariableDefinition:AM.definition(AM.variableName),Label:AM.labelName,PropertyName:AM.propertyName,PrivatePropertyName:AM.special(AM.propertyName),"CallExpression/MemberExpression/PropertyName":AM.function(AM.propertyName),"FunctionDeclaration/VariableDefinition":AM.function(AM.definition(AM.variableName)),"ClassDeclaration/VariableDefinition":AM.definition(AM.className),PropertyDefinition:AM.definition(AM.propertyName),PrivatePropertyDefinition:AM.definition(AM.special(AM.propertyName)),UpdateOp:AM.updateOperator,LineComment:AM.lineComment,BlockComment:AM.blockComment,Number:AM.number,String:AM.string,Escape:AM.escape,ArithOp:AM.arithmeticOperator,LogicOp:AM.logicOperator,BitOp:AM.bitwiseOperator,CompareOp:AM.compareOperator,RegExp:AM.regexp,Equals:AM.definitionOperator,Arrow:AM.function(AM.punctuation),": Spread":AM.punctuation,"( )":AM.paren,"[ ]":AM.squareBracket,"{ }":AM.brace,"InterpolationStart InterpolationEnd":AM.special(AM.brace),".":AM.derefOperator,", ;":AM.separator,"@":AM.meta,TypeName:AM.typeName,TypeDefinition:AM.definition(AM.typeName),"type enum interface implements namespace module declare":AM.definitionKeyword,"abstract global Privacy readonly override":AM.modifier,"is keyof unique infer":AM.operatorKeyword,JSXAttributeValue:AM.attributeValue,JSXText:AM.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":AM.angleBracket,"JSXIdentifier JSXNameSpacedName":AM.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":AM.attributeName,"JSXBuiltin/JSXIdentifier":AM.standard(AM.tagName)}),jI={__proto__:null,export:14,as:19,from:27,default:30,async:35,function:36,extends:46,this:50,true:58,false:58,null:70,void:74,typeof:78,super:96,new:130,delete:146,yield:155,await:159,class:164,public:221,private:221,protected:221,readonly:223,instanceof:242,satisfies:245,in:246,const:248,import:280,keyof:335,unique:339,infer:345,is:381,abstract:401,implements:403,type:405,let:408,var:410,interface:417,enum:421,namespace:427,module:429,declare:433,global:437,for:456,of:465,while:468,with:472,do:476,if:480,else:482,switch:486,case:492,try:498,catch:502,finally:506,return:510,throw:514,break:518,continue:522,debugger:526},NI={__proto__:null,async:117,get:119,set:121,declare:181,public:183,private:183,protected:183,static:185,abstract:187,override:189,readonly:195,accessor:197,new:385},DI={__proto__:null,"<":137},II=$D.c.deserialize({version:14,states:"$6[O`QUOOO%QQUOOO'TQWOOP(bOSOOO*pQ(CjO'#CfO*wOpO'#CgO+VO!bO'#CgO+eO07`O'#DZO-vQUO'#DaO.WQUO'#DlO%QQUO'#DvO0[QUO'#EOOOQ(CY'#EW'#EWO0uQSO'#ETOOQO'#Ei'#EiOOQO'#Ib'#IbO0}QSO'#GkO1YQSO'#EhO1_QSO'#EhO3aQ(CjO'#JcO6QQ(CjO'#JdO6nQSO'#FWO6sQ#tO'#FoOOQ(CY'#F`'#F`O7OO&jO'#F`O7^Q,UO'#FvO8tQSO'#FuOOQ(CY'#Jd'#JdOOQ(CW'#Jc'#JcOOQQ'#KO'#KOO8yQSO'#IOO9OQ(C[O'#IPOOQQ'#JP'#JPOOQQ'#IT'#ITQ`QUOOO%QQUO'#DnO9WQUO'#DzO%QQUO'#D|O9_QSO'#GkO9dQ,UO'#ClO9rQSO'#EgO9}QSO'#ErO:SQ,UO'#F_O:qQSO'#GkO:vQSO'#GoO;RQSO'#GoO;aQSO'#GrO;aQSO'#GsO;aQSO'#GuO9_QSO'#GxO<QQSO'#G{O=cQSO'#CbO=sQSO'#HXO={QSO'#H_O={QSO'#HaO`QUO'#HcO={QSO'#HeO={QSO'#HhO>QQSO'#HnO>VQ(C]O'#HtO%QQUO'#HvO>bQ(C]O'#HxO>mQ(C]O'#HzO9OQ(C[O'#H|O>xQ(CjO'#CfO?zQWO'#DfQOQSOOO@bQSO'#EPO9dQ,UO'#EgO@mQSO'#EgO@xQ`O'#F_OOQQ'#Cd'#CdOOQ(CW'#Dk'#DkOOQ(CW'#Jg'#JgO%QQUO'#JgOOQO'#Jk'#JkOOQO'#I_'#I_OAxQWO'#E`OOQ(CW'#E_'#E_OBtQ(C`O'#E`OCOQWO'#ESOOQO'#Jj'#JjOCdQWO'#JkODqQWO'#ESOCOQWO'#E`PEOO?MpO'#C`POOO)CDn)CDnOOOO'#IU'#IUOEZOpO,59ROOQ(CY,59R,59ROOOO'#IV'#IVOEiO!bO,59RO%QQUO'#D]OOOO'#IX'#IXOEwO07`O,59uOOQ(CY,59u,59uOFVQUO'#IYOFjQSO'#JeOHlQbO'#JeO+sQUO'#JeOHsQSO,59{OIZQSO'#EiOIhQSO'#JsOIsQSO'#JrOIsQSO'#JrOI{QSO,5;VOJQQSO'#JqOOQ(CY,5:W,5:WOJXQUO,5:WOLYQ(CjO,5:bOLyQSO,5:jOMdQ(C[O'#JpOMkQSO'#JoO:vQSO'#JoONPQSO'#JoONXQSO,5;UON^QSO'#JoO!!fQbO'#JdOOQ(CY'#Cf'#CfO%QQUO'#EOO!#UQ`O,5:oOOQO'#Jl'#JlOOQO-E<`-E<`O9_QSO,5=VO!#lQSO,5=VO!#qQUO,5;SO!%tQ,UO'#EdO!'XQSO,5;SO!(qQ,UO'#DpO!(xQUO'#DuO!)SQWO,5;]O!)[QWO,5;]O%QQUO,5;]OOQQ'#FO'#FOOOQQ'#FQ'#FQO%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^OOQQ'#FU'#FUO!)jQUO,5;oOOQ(CY,5;t,5;tOOQ(CY,5;u,5;uO!+mQSO,5;uOOQ(CY,5;v,5;vO%QQUO'#IfO!+uQ(C[O,5<cO!%tQ,UO,5;^O!,dQ,UO,5;^O%QQUO,5;rO!,kQ#tO'#FeO!-hQ#tO'#JwO!-SQ#tO'#JwO!-oQ#tO'#JwOOQO'#Jw'#JwO!.TQ#tO,5;}OOOO,5<Z,5<ZO!.fQUO'#FqOOOO'#Ie'#IeO7OO&jO,5;zO!.mQ#tO'#FsOOQ(CY,5;z,5;zO!/^Q7[O'#CrOOQ(CY'#Cv'#CvO!/qQSO'#CvO!/vO07`O'#CzO!0dQ,UO,5<`O!0kQSO,5<bO!2QQMhO'#GQO!2_QSO'#GRO!2dQSO'#GRO!2iQMhO'#GVO!3hQWO'#GZO!4ZQ7[O'#J^OOQ(CY'#J^'#J^O!4eQSO'#J]O!4sQSO'#J[O!4{QSO'#CqOOQ(CY'#Ct'#CtOOQ(CY'#DO'#DOOOQ(CY'#DQ'#DQO0xQSO'#DSO!'^Q,UO'#FxO!'^Q,UO'#FzO!5TQSO'#F|O!5YQSO'#F}O!2dQSO'#GTO!'^Q,UO'#GYO!5_QSO'#EjO!5|QSO,5<aO`QUO,5>jOOQQ'#JX'#JXOOQQ,5>k,5>kOOQQ-E<R-E<RO!7{Q(CjO,5:YO!:iQ(CjO,5:fO%QQUO,5:fO!=SQ(CjO,5:hOOQ(CW'#Co'#CoO!=sQ,UO,5=VO!>RQ(C[O'#JYO8tQSO'#JYO!>dQ(C[O,59WO!>oQWO,59WO!>wQ,UO,59WO9dQ,UO,59WO!?SQSO,5;SO!?[QSO'#HWO!?mQSO'#KSO%QQUO,5;wO!?uQWO,5;yO!?zQSO,5=qO!@PQSO,5=qO!@UQSO,5=qO9OQ(C[O,5=qO!@dQSO'#EkO!A^QWO'#ElOOQ(CW'#Jq'#JqO!AeQ(C[O'#KPO9OQ(C[O,5=ZO;aQSO,5=aOOQO'#Cr'#CrO!ApQWO,5=^O!AxQ,UO,5=_O!BTQSO,5=aO!BYQ`O,5=dO>QQSO'#G}O9_QSO'#HPO!BbQSO'#HPO9dQ,UO'#HRO!BgQSO'#HROOQQ,5=g,5=gO!BlQSO'#HSO!BtQSO'#ClO!ByQSO,58|O!CTQSO,58|O!E]QUO,58|OOQQ,58|,58|O!EjQ(C[O,58|O%QQUO,58|O!EuQUO'#HZOOQQ'#H['#H[OOQQ'#H]'#H]O`QUO,5=sO!FVQSO,5=sO`QUO,5=yO`QUO,5={O!F[QSO,5=}O`QUO,5>PO!FaQSO,5>SO!FfQUO,5>YOOQQ,5>`,5>`O%QQUO,5>`O9OQ(C[O,5>bOOQQ,5>d,5>dO!JmQSO,5>dOOQQ,5>f,5>fO!JmQSO,5>fOOQQ,5>h,5>hO!JrQWO'#DXO%QQUO'#JgO!KaQWO'#JgO!LOQWO'#DgO!LaQWO'#DgO!NrQUO'#DgO!NyQSO'#JfO# RQSO,5:QO# WQSO'#EmO# fQSO'#JtO# nQSO,5;WO# sQWO'#DgO#!QQWO'#EROOQ(CY,5:k,5:kO%QQUO,5:kO#!XQSO,5:kO>QQSO,5;RO!>oQWO,5;RO!>wQ,UO,5;RO9dQ,UO,5;RO#!aQSO,5@RO#!fQ!LQO,5:oOOQO-E<]-E<]O##lQ(C`O,5:zOCOQWO,5:nO##vQWO,5:nOCOQWO,5:zO!>dQ(C[O,5:nOOQ(CW'#Ec'#EcOOQO,5:z,5:zO%QQUO,5:zO#$TQ(C[O,5:zO#$`Q(C[O,5:zO!>oQWO,5:nOOQO,5;Q,5;QO#$nQ(C[O,5:zPOOO'#IS'#ISP#%SO?MpO,58zPOOO,58z,58zOOOO-E<S-E<SOOQ(CY1G.m1G.mOOOO-E<T-E<TO#%_Q`O,59wOOOO-E<V-E<VOOQ(CY1G/a1G/aO#%dQbO,5>tO+sQUO,5>tOOQO,5>z,5>zO#%nQUO'#IYOOQO-E<W-E<WO#%{QSO,5@PO#&TQbO,5@PO#&[QSO,5@^OOQ(CY1G/g1G/gO%QQUO,5@_O#&dQSO'#I`OOQO-E<^-E<^O#&[QSO,5@^OOQ(CW1G0q1G0qOOQ(CY1G/r1G/rOOQ(CY1G0U1G0UO%QQUO,5@[O#&xQ(C[O,5@[O#'ZQ(C[O,5@[O#'bQSO,5@ZO:vQSO,5@ZO#'jQSO,5@ZO#'xQSO'#IcO#'bQSO,5@ZOOQ(CW1G0p1G0pO!)SQWO,5:qO!)_QWO,5:qOOQO,5:s,5:sO#(jQSO,5:sO#(rQ,UO1G2qO9_QSO1G2qOOQ(CY1G0n1G0nO#)QQ(CjO1G0nO#*VQ(ChO,5;OOOQ(CY'#GP'#GPO#*sQ(CjO'#J^O!#qQUO1G0nO#,{Q,UO'#JhO#-VQSO,5:[O#-[QbO'#JiO%QQUO'#JiO#-fQSO,5:aOOQ(CY'#DX'#DXOOQ(CY1G0w1G0wO%QQUO1G0wOOQ(CY1G1a1G1aO#-kQSO1G0wO#0SQ(CjO1G0xO#0ZQ(CjO1G0xO#2tQ(CjO1G0xO#2{Q(CjO1G0xO#5VQ(CjO1G0xO#5mQ(CjO1G0xO#8gQ(CjO1G0xO#8nQ(CjO1G0xO#;XQ(CjO1G0xO#;`Q(CjO1G0xO#=WQ(CjO1G0xO#@WQ$IUO'#CfO#BUQ$IUO1G1ZO#B]Q$IUO'#JdO!+pQSO1G1aO#BmQ(CjO,5?QOOQ(CW-E<d-E<dO#CaQ(CjO1G0xOOQ(CY1G0x1G0xO#ElQ(CjO1G1^O#F`Q#tO,5<RO#FhQ#tO,5<SO#FpQ#tO'#FjO#GXQSO'#FiOOQO'#Jx'#JxOOQO'#Id'#IdO#G^Q#tO1G1iOOQ(CY1G1i1G1iOOOO1G1t1G1tO#GoQ$IUO'#JcO#GyQSO,5<]O!)jQUO,5<]OOOO-E<c-E<cOOQ(CY1G1f1G1fO#HOQWO'#JwOOQ(CY,5<_,5<_O#HWQWO,5<_OOQ(CY,59b,59bO!%tQ,UO'#C|OOOO'#IW'#IWO#H]O07`O,59fOOQ(CY,59f,59fO%QQUO1G1zO!5YQSO'#IhO#HhQSO,5<sOOQ(CY,5<p,5<pOOQO'#Gf'#GfO!'^Q,UO,5=POOQO'#Gh'#GhO!'^Q,UO,5=RO!%tQ,UO,5=TOOQO1G1|1G1|O#HvQ`O'#CoO#IZQ`O,5<lO#IbQSO'#J{O9_QSO'#J{O#IpQSO,5<nO!'^Q,UO,5<mO#IuQSO'#GSO#JQQSO,5<mO#JVQ`O'#GPO#JdQ`O'#J|O#JnQSO'#J|O!%tQ,UO'#J|O#JsQSO,5<qO#JxQWO'#G[O!3cQWO'#G[O#KZQSO'#G^O#K`QSO'#G`O!2dQSO'#GcO#KeQ(C[O'#IjO#KpQWO,5<uOOQ(CY,5<u,5<uO#KwQWO'#G[O#LVQWO'#G]O#L_QWO'#G]OOQ(CY,5=U,5=UO!'^Q,UO,5?wO!'^Q,UO,5?wO#LdQSO'#IkO#LoQSO,5?vO#LwQSO,59]O#MhQ,UO,59nOOQ(CY,59n,59nO#NZQ,UO,5<dO#N|Q,UO,5<fO?rQSO,5<hOOQ(CY,5<i,5<iO$ WQSO,5<oO$ ]Q,UO,5<tO$ mQSO'#JoO!#qQUO1G1{O$ rQSO1G1{OOQQ1G4U1G4UOOQ(CY1G/t1G/tO!+mQSO1G/tO$#qQ(CjO1G0QOOQQ1G2q1G2qO!%tQ,UO1G2qO%QQUO1G2qO$$bQSO1G2qO$$mQ,UO'#EdOOQ(CW,5?t,5?tO$$wQ(C[O,5?tOOQQ1G.r1G.rO!>dQ(C[O1G.rO!>oQWO1G.rO!>wQ,UO1G.rO$%YQSO1G0nO$%_QSO'#CfO$%jQSO'#KTO$%rQSO,5=rO$%wQSO'#KTO$%|QSO'#KTO$&XQSO'#IsO$&gQSO,5@nO$&oQbO1G1cOOQ(CY1G1e1G1eO9_QSO1G3]O?rQSO1G3]O$&vQSO1G3]O$&{QSO1G3]OOQQ1G3]1G3]O:vQSO'#JrO:vQSO'#EmO%QQUO'#EmO:vQSO'#ImO$'QQ(C[O,5@kOOQQ1G2u1G2uO!BTQSO1G2{O!%tQ,UO1G2xO$']QSO1G2xOOQQ1G2y1G2yO!%tQ,UO1G2yO$'bQSO1G2yO$'jQWO'#GwOOQQ1G2{1G2{O!3cQWO'#IoO!BYQ`O1G3OOOQQ1G3O1G3OOOQQ,5=i,5=iO$'rQ,UO,5=kO9_QSO,5=kO#K`QSO,5=mO8tQSO,5=mO!>oQWO,5=mO!>wQ,UO,5=mO9dQ,UO,5=mO$(QQSO'#KRO$(]QSO,5=nOOQQ1G.h1G.hO$(bQ(C[O1G.hO?rQSO1G.hO$(mQSO1G.hO9OQ(C[O1G.hO$*rQbO,5@pO$+SQSO,5@pO$+_QUO,5=uO$+fQSO,5=uO:vQSO,5@pOOQQ1G3_1G3_O`QUO1G3_OOQQ1G3e1G3eOOQQ1G3g1G3gO={QSO1G3iO$+kQUO1G3kO$/lQUO'#HjOOQQ1G3n1G3nO$/yQSO'#HpO>QQSO'#HrOOQQ1G3t1G3tO$0RQUO1G3tO9OQ(C[O1G3zOOQQ1G3|1G3|OOQ(CW'#GW'#GWO9OQ(C[O1G4OO9OQ(C[O1G4QO$4VQSO,5@RO!)jQUO,5;XO:vQSO,5;XO>QQSO,5:RO!)jQUO,5:RO!>oQWO,5:RO$4[Q$IUO,5:ROOQO,5;X,5;XO$4fQWO'#IZO$4|QSO,5@QOOQ(CY1G/l1G/lO$5UQWO'#IaO$5`QSO,5@`OOQ(CW1G0r1G0rO!LaQWO,5:ROOQO'#I^'#I^O$5hQWO,5:mOOQ(CY,5:m,5:mO#![QSO1G0VOOQ(CY1G0V1G0VO%QQUO1G0VOOQ(CY1G0m1G0mO>QQSO1G0mO!>oQWO1G0mO!>wQ,UO1G0mOOQ(CW1G5m1G5mO!>dQ(C[O1G0YOOQO1G0f1G0fO%QQUO1G0fO$5oQ(C[O1G0fO$5zQ(C[O1G0fO!>oQWO1G0YOCOQWO1G0YO$6YQ(C[O1G0fOOQO1G0Y1G0YO$6nQ(CjO1G0fPOOO-E<Q-E<QPOOO1G.f1G.fOOOO1G/c1G/cO$6xQ`O,5<cO$7QQbO1G4`OOQO1G4f1G4fO%QQUO,5>tO$7[QSO1G5kO$7dQSO1G5xO$7lQbO1G5yO:vQSO,5>zO$7vQ(CjO1G5vO%QQUO1G5vO$8WQ(C[O1G5vO$8iQSO1G5uO$8iQSO1G5uO:vQSO1G5uO$8qQSO,5>}O:vQSO,5>}OOQO,5>},5>}O$9VQSO,5>}O$ mQSO,5>}OOQO-E<a-E<aOOQO1G0]1G0]OOQO1G0_1G0_O!+pQSO1G0_OOQQ7+(]7+(]O!%tQ,UO7+(]O%QQUO7+(]O$9eQSO7+(]O$9pQ,UO7+(]O$:OQ(CjO,59nO$<WQ(CjO,5<dO$>cQ(CjO,5<fO$@nQ(CjO,5<tOOQ(CY7+&Y7+&YO$CPQ(CjO7+&YO$CsQ,UO'#I[O$C}QSO,5@SOOQ(CY1G/v1G/vO$DVQUO'#I]O$DdQSO,5@TO$DlQbO,5@TOOQ(CY1G/{1G/{O$DvQSO7+&cOOQ(CY7+&c7+&cO$D{Q$IUO,5:bO%QQUO7+&uO$EVQ$IUO,5:YO$EdQ$IUO,5:fO$EnQ$IUO,5:hOOQ(CY7+&{7+&{OOQO1G1m1G1mOOQO1G1n1G1nO$ExQ#tO,5<UO!)jQUO,5<TOOQO-E<b-E<bOOQ(CY7+'T7+'TOOOO7+'`7+'`OOOO1G1w1G1wO$FTQSO1G1wOOQ(CY1G1y1G1yO$FYQ`O,59hOOOO-E<U-E<UOOQ(CY1G/Q1G/QO$FaQ(CjO7+'fOOQ(CY,5?S,5?SO$GTQSO,5?SOOQ(CY1G2_1G2_P$GYQSO'#IhPOQ(CY-E<f-E<fO$G|Q,UO1G2kO$HoQ,UO1G2mO$HyQ`O1G2oOOQ(CY1G2W1G2WO$IQQSO'#IgO$I`QSO,5@gO$I`QSO,5@gO$IhQSO,5@gO$IsQSO,5@gOOQO1G2Y1G2YO$JRQ,UO1G2XO!'^Q,UO1G2XO$JcQMhO'#IiO$JsQSO,5@hO!%tQ,UO,5@hO$J{Q`O,5@hOOQ(CY1G2]1G2]OOQ(CW,5<v,5<vOOQ(CW,5<w,5<wO$ mQSO,5<wOBoQSO,5<wO!>oQWO,5<vOOQO'#G_'#G_O$KVQSO,5<xOOQ(CW,5<z,5<zO$ mQSO,5<}OOQO,5?U,5?UOOQO-E<h-E<hOOQ(CY1G2a1G2aO!3cQWO,5<vO$K_QSO,5<wO#KZQSO,5<xO!3cQWO,5<wO$KjQ,UO1G5cO$KtQ,UO1G5cOOQO,5?V,5?VOOQO-E<i-E<iOOQO1G.w1G.wO!?uQWO,59pO%QQUO,59pO$LRQSO1G2SO!'^Q,UO1G2ZO$LWQ(CjO7+'gOOQ(CY7+'g7+'gO!#qQUO7+'gOOQ(CY7+%`7+%`O$LzQ`O'#J}O#![QSO7+(]O$MUQbO7+(]O$9hQSO7+(]O$M]Q(ChO'#CfO$MpQ(ChO,5<{O$NbQSO,5<{OOQ(CW1G5`1G5`OOQQ7+$^7+$^O!>dQ(C[O7+$^O!>oQWO7+$^O!#qQUO7+&YO$NgQSO'#IrO$N{QSO,5@oOOQO1G3^1G3^O9_QSO,5@oO$N{QSO,5@oO% TQSO,5@oOOQO,5?_,5?_OOQO-E<q-E<qOOQ(CY7+&}7+&}O% YQSO7+(wO9OQ(C[O7+(wO9_QSO7+(wO?rQSO7+(wO% _QSO,5;XOOQ(CW,5?X,5?XOOQ(CW-E<k-E<kOOQQ7+(g7+(gO% dQ(ChO7+(dO!%tQ,UO7+(dO% nQ`O7+(eOOQQ7+(e7+(eO!%tQ,UO7+(eO% uQSO'#KQO%!QQSO,5=cOOQO,5?Z,5?ZOOQO-E<m-E<mOOQQ7+(j7+(jO%#aQWO'#HQOOQQ1G3V1G3VO!%tQ,UO1G3VO%QQUO1G3VO%#hQSO1G3VO%#sQ,UO1G3VO9OQ(C[O1G3XO#K`QSO1G3XO8tQSO1G3XO!>oQWO1G3XO!>wQ,UO1G3XO%$RQSO'#IqO%$^QSO,5@mO%$fQWO,5@mOOQ(CW1G3Y1G3YOOQQ7+$S7+$SO?rQSO7+$SO9OQ(C[O7+$SO%$qQSO7+$SO%QQUO1G6[O%QQUO1G6]O%$vQUO1G3aO%$}QSO1G3aO%%SQUO1G3aO%%ZQ(C[O1G6[OOQQ7+(y7+(yO9OQ(C[O7+)TO`QUO7+)VOOQQ'#KW'#KWOOQQ'#It'#ItO%%eQUO,5>UOOQQ,5>U,5>UO%QQUO'#HkO%%rQSO'#HmOOQQ,5>[,5>[O:vQSO,5>[OOQQ,5>^,5>^OOQQ7+)`7+)`OOQQ7+)f7+)fOOQQ7+)j7+)jOOQQ7+)l7+)lO%%wQWO1G5mO%&]Q$IUO1G0sO%&gQSO1G0sOOQO1G/m1G/mO%&rQ$IUO1G/mO>QQSO1G/mO!)jQUO'#DgOOQO,5>u,5>uOOQO-E<X-E<XOOQO,5>{,5>{OOQO-E<_-E<_O!>oQWO1G/mOOQO-E<[-E<[OOQ(CY1G0X1G0XOOQ(CY7+%q7+%qO#![QSO7+%qOOQ(CY7+&X7+&XO>QQSO7+&XO!>oQWO7+&XOOQO7+%t7+%tO$6nQ(CjO7+&QOOQO7+&Q7+&QO%QQUO7+&QO%&|Q(C[O7+&QO!>dQ(C[O7+%tO!>oQWO7+%tO%'XQ(C[O7+&QO%'gQ(CjO7++bO%QQUO7++bO%'wQSO7++aO%'wQSO7++aOOQO1G4i1G4iO:vQSO1G4iO%(PQSO1G4iOOQO7+%y7+%yO#![QSO<<KwO$MUQbO<<KwO%(_QSO<<KwOOQQ<<Kw<<KwO!%tQ,UO<<KwO%QQUO<<KwO%(gQSO<<KwO%(rQ(CjO1G2kO%*}Q(CjO1G2mO%-YQ(CjO1G2XO%/kQ,UO,5>vOOQO-E<Y-E<YO%/uQbO,5>wO%QQUO,5>wOOQO-E<Z-E<ZO%0PQSO1G5oOOQ(CY<<I}<<I}O%0XQ$IUO1G0nO%2cQ$IUO1G0xO%2jQ$IUO1G0xO%4nQ$IUO1G0xO%4uQ$IUO1G0xO%6jQ$IUO1G0xO%7QQ$IUO1G0xO%9eQ$IUO1G0xO%9lQ$IUO1G0xO%;pQ$IUO1G0xO%;wQ$IUO1G0xO%=oQ$IUO1G0xO%>SQ(CjO<<JaO%?XQ$IUO1G0xO%@}Q$IUO'#J^O%CQQ$IUO1G1^O%C_Q$IUO1G0QO!)jQUO'#FlOOQO'#Jy'#JyOOQO1G1p1G1pO%CiQSO1G1oO%CnQ$IUO,5?QOOOO7+'c7+'cOOOO1G/S1G/SOOQ(CY1G4n1G4nO!'^Q,UO7+(ZO%CxQSO,5?RO9_QSO,5?ROOQO-E<e-E<eO%DWQSO1G6RO%DWQSO1G6RO%D`QSO1G6RO%DkQ,UO7+'sO%D{Q`O,5?TO%EVQSO,5?TO!%tQ,UO,5?TOOQO-E<g-E<gO%E[Q`O1G6SO%EfQSO1G6SOOQ(CW1G2c1G2cO$ mQSO1G2cOOQ(CW1G2b1G2bO%EnQSO1G2dO!%tQ,UO1G2dOOQ(CW1G2i1G2iO!>oQWO1G2bOBoQSO1G2cO%EsQSO1G2dO%E{QSO1G2cO!'^Q,UO7+*}OOQ(CY1G/[1G/[O%FWQSO1G/[OOQ(CY7+'n7+'nO%F]Q,UO7+'uO%FmQ(CjO<<KROOQ(CY<<KR<<KRO!%tQ,UO'#IlO%GaQSO,5@iO!%tQ,UO1G2gOOQQ<<Gx<<GxO!>dQ(C[O<<GxO%GiQ(CjO<<ItOOQ(CY<<It<<ItOOQO,5?^,5?^O%H]QSO,5?^O$%|QSO,5?^OOQO-E<p-E<pO%HbQSO1G6ZO%HbQSO1G6ZO9_QSO1G6ZO?rQSO<<LcOOQQ<<Lc<<LcO%HjQSO<<LcO9OQ(C[O<<LcO%HoQSO1G0sOOQQ<<LO<<LOO% dQ(ChO<<LOOOQQ<<LP<<LPO% nQ`O<<LPO%HtQWO'#InO%IPQSO,5@lO!)jQUO,5@lOOQQ1G2}1G2}O%IXQUO'#JgOOQO'#Ip'#IpO9OQ(C[O'#IpO%IcQWO,5=lOOQQ,5=l,5=lO%IjQWO'#E`O%JOQSO7+(qO%JTQSO7+(qOOQQ7+(q7+(qO!%tQ,UO7+(qO%QQUO7+(qO%J]QSO7+(qOOQQ7+(s7+(sO9OQ(C[O7+(sO#K`QSO7+(sO8tQSO7+(sO!>oQWO7+(sO%JhQSO,5?]OOQO-E<o-E<oOOQO'#HT'#HTO%JsQSO1G6XO9OQ(C[O<<GnOOQQ<<Gn<<GnO?rQSO<<GnO%J{QSO7++vO%KQQSO7++wOOQQ7+({7+({O%KVQSO7+({O%K[QUO7+({O%KcQSO7+({O%QQUO7++vO%QQUO7++wOOQQ<<Lo<<LoOOQQ<<Lq<<LqOOQQ-E<r-E<rOOQQ1G3p1G3pO%KhQSO,5>VOOQQ,5>X,5>XO%KmQSO1G3vO:vQSO7+&_O!)jQUO7+&_OOQO7+%X7+%XO%KrQ$IUO1G5yO>QQSO7+%XOOQ(CY<<I]<<I]OOQ(CY<<Is<<IsO>QQSO<<IsOOQO<<Il<<IlO$6nQ(CjO<<IlO%QQUO<<IlOOQO<<I`<<I`O!>dQ(C[O<<I`O%K|Q(C[O<<IlO%LXQ(CjO<<N|O%LiQSO<<N{OOQO7+*T7+*TO:vQSO7+*TOOQQANAcANAcO%LqQSOANAcO!%tQ,UOANAcO#![QSOANAcO$MUQbOANAcO%QQUOANAcO%LyQ(CjO7+'sO& [Q(CjO7+'uO&#mQbO1G4cO&#wQ$IUO7+&YO&$UQ$IUO,59nO&&XQ$IUO,5<dO&([Q$IUO,5<fO&*_Q$IUO,5<tO&,TQ$IUO7+'fO&,bQ$IUO7+'gO&,oQSO,5<WOOQO7+'Z7+'ZO&,tQ,UO<<KuOOQO1G4m1G4mO&,{QSO1G4mO&-WQSO1G4mO&-fQSO7++mO&-fQSO7++mO!%tQ,UO1G4oO&-nQ`O1G4oO&-xQSO7++nOOQ(CW7+'}7+'}O$ mQSO7+(OO&.QQ`O7+(OOOQ(CW7+'|7+'|O$ mQSO7+'}O&.XQSO7+(OO!%tQ,UO7+(OOBoQSO7+'}O&.^Q,UO<<NiOOQ(CY7+$v7+$vO&.hQ`O,5?WOOQO-E<j-E<jO&.rQ(ChO7+(ROOQQAN=dAN=dO9_QSO1G4xOOQO1G4x1G4xO&/SQSO1G4xO&/XQSO7++uO&/XQSO7++uO9OQ(C[OANA}O?rQSOANA}OOQQANA}ANA}OOQQANAjANAjOOQQANAkANAkO&/aQSO,5?YOOQO-E<l-E<lO&/lQ$IUO1G6WO&1|QbO'#CfOOQO,5?[,5?[OOQO-E<n-E<nOOQQ1G3W1G3WO%IXQUO,5<xOOQQ<<L]<<L]O!%tQ,UO<<L]O%JOQSO<<L]O&2WQSO<<L]O%QQUO<<L]OOQQ<<L_<<L_O9OQ(C[O<<L_O#K`QSO<<L_O8tQSO<<L_O&2`QWO1G4wO&2kQSO7++sOOQQAN=YAN=YO9OQ(C[OAN=YOOQQ<= b<= bOOQQ<= c<= cOOQQ<<Lg<<LgO&2sQSO<<LgO&2xQUO<<LgO&3PQSO<= bO&3UQSO<= cOOQQ1G3q1G3qO>QQSO7+)bO&3ZQSO<<IyO&3fQ$IUO<<IyOOQO<<Hs<<HsOOQ(CYAN?_AN?_OOQOAN?WAN?WO$6nQ(CjOAN?WOOQOAN>zAN>zO%QQUOAN?WOOQO<<Mo<<MoOOQQG26}G26}O!%tQ,UOG26}O#![QSOG26}O&3pQSOG26}O$MUQbOG26}O&3xQ$IUO<<JaO&4VQ$IUO1G2XO&5{Q$IUO1G2kO&8OQ$IUO1G2mO&:RQ$IUO<<KRO&:`Q$IUO<<ItOOQO1G1r1G1rO!'^Q,UOANAaOOQO7+*X7+*XO&:mQSO7+*XO&:xQSO<= XO&;QQ`O7+*ZOOQ(CW<<Kj<<KjO$ mQSO<<KjOOQ(CW<<Ki<<KiO&;[Q`O<<KjO$ mQSO<<KiOOQO7+*d7+*dO9_QSO7+*dO&;cQSO<= aOOQQG27iG27iO9OQ(C[OG27iO!)jQUO1G4tO&;kQSO7++rO%JOQSOANAwOOQQANAwANAwO!%tQ,UOANAwO&;sQSOANAwOOQQANAyANAyO9OQ(C[OANAyO#K`QSOANAyOOQO'#HU'#HUOOQO7+*c7+*cOOQQG22tG22tOOQQANBRANBRO&;{QSOANBROOQQAND|AND|OOQQAND}AND}OOQQ<<L|<<L|O!)jQUOAN?eOOQOG24rG24rO$6nQ(CjOG24rO#![QSOLD,iOOQQLD,iLD,iO!%tQ,UOLD,iO&<QQSOLD,iO&<YQ$IUO7+'sO&>OQ$IUO7+'uO&?tQ,UOG26{OOQO<<Ms<<MsOOQ(CWANAUANAUO$ mQSOANAUOOQ(CWANATANATOOQO<<NO<<NOOOQQLD-TLD-TO&@UQ$IUO7+*`OOQQG27cG27cO%JOQSOG27cO!%tQ,UOG27cOOQQG27eG27eO9OQ(C[OG27eOOQQG27mG27mO&@`Q$IUOG25POOQOLD*^LD*^OOQQ!$(!T!$(!TO#![QSO!$(!TO!%tQ,UO!$(!TO&@jQ(CjOG26{OOQ(CWG26pG26pOOQQLD,}LD,}O%JOQSOLD,}OOQQLD-PLD-POOQQ!)9Eo!)9EoO#![QSO!)9EoOOQQ!$(!i!$(!iOOQQ!.K;Z!.K;ZO&B{Q$IUOG26{O!)jQUO'#DvO0uQSO'#ETO&DqQbO'#JcO!)jQUO'#DnO&DxQUO'#DzO!)jQUO'#D|O&EPQbO'#CfO&GgQbO'#CfO&GwQUO,5;SO!)jQUO,5;^O!)jQUO,5;^O!)jQUO,5;^O!)jQUO,5;^O!)jQUO,5;^O!)jQUO,5;^O!)jQUO,5;^O!)jQUO,5;^O!)jQUO,5;^O!)jQUO,5;^O!)jQUO,5;^O!)jQUO'#IfO&IzQSO,5<cO&JSQ,UO,5;^O&KgQ,UO,5;^O!)jQUO,5;rO0xQSO'#DSO0xQSO'#DSO!%tQ,UO'#FxO&JSQ,UO'#FxO!%tQ,UO'#FzO&JSQ,UO'#FzO!%tQ,UO'#GYO&JSQ,UO'#GYO!)jQUO,5:fO!)jQUO,5@_O&GwQUO1G0nO&KnQ$IUO'#CfO!)jQUO1G1zO!%tQ,UO,5=PO&JSQ,UO,5=PO!%tQ,UO,5=RO&JSQ,UO,5=RO!%tQ,UO,5<mO&JSQ,UO,5<mO&GwQUO1G1{O!)jQUO7+&uO!%tQ,UO1G2XO&JSQ,UO1G2XO!%tQ,UO1G2ZO&JSQ,UO1G2ZO&GwQUO7+'gO&GwQUO7+&YO!%tQ,UOANAaO&JSQ,UOANAaO&KxQSO'#EhO&K}QSO'#EhO&LVQSO'#FWO&L[QSO'#ErO&LaQSO'#JsO&LlQSO'#JqO&LwQSO,5;SO&L|Q,UO,5<`O&MTQSO'#GRO&MYQSO'#GRO&M_QSO,5<aO&MgQSO,5;SO&MoQ$IUO1G1ZO&MvQSO,5<mO&M{QSO,5<mO&NQQSO,5<oO&NVQSO,5<oO&N[QSO1G1{O&NaQSO1G0nO&NfQ,UO<<KuO&NmQ,UO<<KuO7^Q,UO'#FvO8tQSO'#FuO@mQSO'#EgO!)jQUO,5;oO!2dQSO'#GRO!2dQSO'#GRO!2dQSO'#GTO!2dQSO'#GTO!'^Q,UO7+(ZO!'^Q,UO7+(ZO$HyQ`O1G2oO$HyQ`O1G2oO!%tQ,UO,5=TO!%tQ,UO,5=T",stateData:"' v~O'mOS'nOSROS'oRQ~OPYOQYOV!TO^pOaxObwOikOkYOlkOmkOskOuYOwYO|WO!QkO!RkO!XXO!csO!hZO!kYO!lYO!mYO!otO!quO!tvO!x]O#p}O$QzO$UfO%`{O%b!OO%d|O%e|O%h!PO%j!QO%m!RO%n!RO%p!SO%|!UO&S!VO&U!WO&W!XO&Y!YO&]!ZO&c![O&i!]O&k!^O&m!_O&o!`O&q!aO'tSO'vTO'yUO(RVO(a[O(niO~OPYOQYOa!gOb!fOikOkYOlkOmkOskOuYOwYO|WO!QkO!RkO!X!cO!csO!hZO!kYO!lYO!mYO!otO!quO!t!eO$Q!hO$UfO't!bO'vTO'yUO(RVO(a[O(niO~O^!sOl!kO|!lO![!uO!]!rO!^!rO!x9mO!|!mO!}!mO#O!tO#P!mO#Q!mO#T!vO#U!vO'u!iO'vTO'yUO(U!jO(a!pO~O'o!wO~OPYXXYX^YXkYXyYXzYX|YX!VYX!eYX!fYX!hYX!lYX#XYX#dcX#gYX#hYX#iYX#jYX#kYX#lYX#mYX#nYX#oYX#qYX#sYX#uYX#vYX#{YX'kYX(RYX(bYX(iYX(jYX~O!a$zX~P(gO[!yO'v!{O'w!yO'x!{O~O[!|O'x!{O'y!{O'z!|O~Oq#OO!O#PO(S#PO(T#RO~OPYOQYOa!gOb!fOikOkYOlkOmkOskOuYOwYO|WO!QkO!RkO!X!cO!csO!hZO!kYO!lYO!mYO!otO!quO!t!eO$Q!hO$UfO't9rO'vTO'yUO(RVO(a[O(niO~O!U#VO!V#SO!S(XP!S(fP~P+sO!W#_O~P`OPYOQYOa!gOb!fOkYOlkOmkOskOuYOwYO|WO!QkO!RkO!X!cO!csO!hZO!kYO!lYO!mYO!otO!quO!t!eO$Q!hO$UfO'vTO'yUO(RVO(a[O(niO~Oi#iO!U#eO!x]O#b#hO#c#eO't9sO!g(cP~P._O!h#kO't#jO~O!t#oO!x]O%`#pO~O#d#qO~O!a#rO#d#qO~OP$YOX$aOk#}Oy#vOz#wO|#xO!V$^O!e$PO!f#tO!h#uO!l$YO#g#{O#h#|O#i#|O#j#|O#k$OO#l$PO#m$PO#n$`O#o$PO#q$QO#s$SO#u$UO#v$VO(RVO(b$WO(i#yO(j#zO~O^(VX'k(VX'i(VX!g(VX!S(VX!X(VX%a(VX!a(VX~P1gO#X$bO#{$bOP(WXX(WXk(WXy(WXz(WX|(WX!V(WX!e(WX!h(WX!l(WX#g(WX#h(WX#i(WX#j(WX#k(WX#l(WX#m(WX#n(WX#o(WX#q(WX#s(WX#u(WX#v(WX(R(WX(b(WX(i(WX(j(WX!X(WX%a(WX~O^(WX!f(WX'k(WX'i(WX!S(WX!g(WXo(WX!a(WX~P3}O#X$bO~O$W$dO$Y$cO$a$iO~O!X$jO$UfO$d$kO$f$mO~Oi%POk$qOl$pOm$pOs%QOu%ROw%SO|$xO!X$yO!c%XO!h$uO#c%YO$Q%VO$m%TO$o%UO$r%WO't$oO'vTO'yUO'}%OO(R$rOd(OP~O!h%ZO~O!a%]O~O^%^O'k%^O~O'u!iO~P%QO't%eO~O!h%ZO't%eO'u!iO'}%OO~Ob%lO!h%ZO't%eO~O#o$PO~Oy%qO!X%nO!h%pO%b%tO't%eO'u!iO'vTO'yUO](vP~O!t#oO~O|%vO!X%wO't%eO~O|%vO!X%wO%j%{O't%eO~O't%|O~O#p}O%b!OO%d|O%e|O%h!PO%j!QO%m!RO%n!RO~Oa&VOb&UO!t&SO%`&TO%r&RO~P;fOa&YObwO!X&XO!tvO!x]O#p}O%`{O%d|O%e|O%h!PO%j!QO%m!RO%n!RO%p!SO~O_&]O#X&`O%b&ZO'u!iO~P<eO!h&aO!q&eO~O!h#kO~O!XXO~O^%^O'j&mO'k%^O~O^%^O'j&pO'k%^O~O^%^O'j&rO'k%^O~O'iYX!SYXoYX!gYX&QYX!XYX%aYX!aYX~P(gO!['PO!]&xO!^&xO'u!iO'vTO'yUO~Ol&vO|&uO!U&yO(U&tO!W(YP!W(hP~P?fOg'SO!X'QO't%eO~Ob'XO!h%ZO't%eO~Oy%qO!h%pO~Ol!kO|!lO!x9mO!|!mO!}!mO#P!mO#Q!mO'u!iO'vTO'yUO(U!jO(a!pO~O!['_O!]'^O!^'^O#O!mO#T'`O#U'`O~PAQO^%^O!a#rO!h%ZO'k%^O'}%OO(b'bO~O!l'fO#X'dO~PB`Ol!kO|!lO'vTO'yUO(U!jO(a!pO~O!XXOl(_X|(_XPO'vTO'yUO(RVO(a[O(n;ZO~Oz)SO!h#uO~O!V$^O^$ka'k$ka'i$ka!g$ka!S$ka!X$ka%a$ka!a$ka~O#p)WO~P!%tOy)ZO!a)YO!X$XX$T$XX$W$XX$Y$XX$a$XX~O!a)YO!X(kX$T(kX$W(kX$Y(kX$a(kX~Oy)ZO~P!-SOy)ZO!X(kX$T(kX$W(kX$Y(kX$a(kX~O!X)]O$T)aO$W)[O$Y)[O$a)bO~O!U)eO~P!)jO$W$dO$Y$cO$a)iO~Og$sXy$sX|$sX!f$sX(i$sX(j$sX~OdfXd$sXgfX!VfX#XfX~P!.xOl)kO~Oq)lO(S)mO(T)oO~Og)xOy)qO|)rO(i)tO(j)vO~Od)pO~P!0ROd)yO~Oi%POk$qOl$pOm$pOs%QOu%ROw:VO|$xO!X$yO!c;aO!h$uO#c:]O$Q%VO$m:XO$o:ZO$r%WO'vTO'yUO'}%OO(R$rO~O!U)}O't)zO!g(oP~P!0pO#d*PO~O!h*QO~O!U*VO't*SO!S(pP~P!0pOk*cO|*ZO![*aO!]*YO!^*YO!h*QO#T*bO%W*]O'u!iO(U!jO~O!W*`O~P!2vO!f#tOg(QXy(QX|(QX(i(QX(j(QX!V(QX#X(QX~Od(QX#y(QX~P!3oOg*fO#X*eOd(PX!V(PX~O!V*gOd(OX~O't%|Od(OP~O!h*nO~O't(gO~Oi*rO|%vO!U#eO!X%wO!x]O#b#hO#c#eO't%eO!g(cP~O!a#rO#d*sO~OP$YOX$aOk#}Oy#vOz#wO|#xO!e$PO!f#tO!h#uO!l$YO#g#{O#h#|O#i#|O#j#|O#k$OO#l$PO#m$PO#n$`O#o$PO#q$QO#s$SO#u$UO#v$VO(RVO(b$WO(i#yO(j#zO~O^!ba!V!ba'k!ba'i!ba!S!ba!g!bao!ba!X!ba%a!ba!a!ba~P!6UOy#vOz#wO|#xO!f#tO!h#uO(RVOP!naX!nak!na!V!na!e!na!l!na#g!na#h!na#i!na#j!na#k!na#l!na#m!na#n!na#o!na#q!na#s!na#u!na#v!na(b!na(i!na(j!na~O^!na'k!na'i!na!S!na!g!nao!na!X!na%a!na!a!na~P!8oOy#vOz#wO|#xO!f#tO!h#uO(RVOP!paX!pak!pa!V!pa!e!pa!l!pa#g!pa#h!pa#i!pa#j!pa#k!pa#l!pa#m!pa#n!pa#o!pa#q!pa#s!pa#u!pa#v!pa(b!pa(i!pa(j!pa~O^!pa'k!pa'i!pa!S!pa!g!pao!pa!X!pa%a!pa!a!pa~P!;YOg*{O!X'QO%a*zO'}%OO~O!a*}O^'|X!X'|X'k'|X!V'|X~O^%^O!XXO'k%^O~O!h%ZO'}%OO~O!h%ZO't%eO'}%OO~O!a#rO#d(iO~O%b+ZO't+VO'vTO'yUO!W(wP~O!V+[O](vX~O(U(oO~OX+`O~O]+aO~O!X%nO't%eO'u!iO](vP~O|%vO!U+eO!V'}O!X%wO't%eO!S(fP~Ol&|O|+gO!U+fO'vTO'yUO(U(oO~O!W(hP~P!@xO!V+hO^(sX'k(sX~O#X+lO'}%OO~Og+oO!X$yO'}%OO~O!X+qO~Oy+sO!XXO~O!t+xO~Ob+}O~O't#jO!W(uP~Ob%lO~O%b!OO't%|O~P<eOX,TO],SO~OPYOQYOaxObwOikOkYOlkOmkOskOuYOwYO|WO!QkO!RkO!csO!hZO!kYO!lYO!mYO!otO!quO!tvO!x]O$UfO%`{O'vTO'yUO(RVO(a[O(niO~O!X!cO$Q!hO't!bO~P!C]O],SO^%^O'k%^O~O^,XO#p,ZO%d,ZO%e,ZO~P%QO!h&aO~O&S,`O~O!X,bO~O&e,dO&g,eOP&baQ&baV&ba^&baa&bab&bai&bak&bal&bam&bas&bau&baw&ba|&ba!Q&ba!R&ba!X&ba!c&ba!h&ba!k&ba!l&ba!m&ba!o&ba!q&ba!t&ba!x&ba#p&ba$Q&ba$U&ba%`&ba%b&ba%d&ba%e&ba%h&ba%j&ba%m&ba%n&ba%p&ba%|&ba&S&ba&U&ba&W&ba&Y&ba&]&ba&c&ba&i&ba&k&ba&m&ba&o&ba&q&ba'i&ba't&ba'v&ba'y&ba(R&ba(a&ba(n&ba!W&ba&Z&ba_&ba&`&ba~O't,jO~O!V{X!V!_X!W{X!W!_X!a{X!a!_X!h!_X#X{X'}!_X~O!a,oO#X,nO!V#aX!V(ZX!W#aX!W(ZX!a(ZX!h(ZX'}(ZX~O!a,qO!h%ZO'}%OO!V!ZX!W!ZX~Ol!kO|!lO'vTO'yUO(U!jO~OP9lOQ9lOa;]Ob!fOikOk9lOlkOmkOskOu9lOw9lO|WO!QkO!RkO!X!cO!c9oO!hZO!k9lO!l9lO!m9lO!o9pO!q9qO!t!eO$Q!hO$UfO'vTO'yUO(RVO(a[O(n;ZO~O't:bO~P!LrO!V,uO!W(YX~O!W,wO~O!a,oO#X,nO!V#aX!W#aX~O!V,xO!W(hX~O!W,zO~O!],{O!^,{O'u!iO~P!LaO!W-OO~P'TOg-RO!X'QO~O!S-WO~Ol!wa![!wa!]!wa!^!wa!|!wa!}!wa#O!wa#P!wa#Q!wa#T!wa#U!wa'u!wa'v!wa'y!wa(U!wa(a!wa~P!!pO!l-]O#X-ZO~PB`O!]-_O!^-_O'u!iO~PCOO^%^O#X-ZO'k%^O~O^%^O!a#rO#X-ZO'k%^O~O^%^O!a#rO!l-]O#X-ZO'k%^O(b'bO~O'p'jO'q'jO'r-dO~Oo-eO~O!S&|a!V&|a~P!6UO!U-iO!S&|X!V&|X~P%QO!V'vO!S(Xa~O!S(Xa~PFrO!V'}O!S(fa~O|%vO!U-mO!X%wO't%eO!S'SX!V'SX~O#X-oO!V(da!g(da^(da'k(da~O!a#rO~P#&xO!V(ZO!g(ca~O|%vO!X%wO#c-sO't%eO~Oi-xO|%vO!U-uO!X%wO!x]O#b-wO#c-uO't%eO!V'VX!g'VX~Oz-|O!h#uO~Og.PO!X'QO%a.OO'}%OO~O^#[i!V#[i'k#[i'i#[i!S#[i!g#[io#[i!X#[i%a#[i!a#[i~P!6UOg;gOy)qO|)rO(i)tO(j)vO~O#d#Wa^#Wa#X#Wa'k#Wa!V#Wa!g#Wa!X#Wa!S#Wa~P#)tO#d(QXP(QXX(QX^(QXk(QXz(QX!e(QX!h(QX!l(QX#g(QX#h(QX#i(QX#j(QX#k(QX#l(QX#m(QX#n(QX#o(QX#q(QX#s(QX#u(QX#v(QX'k(QX(R(QX(b(QX!g(QX!S(QX'i(QXo(QX!X(QX%a(QX!a(QX~P!3oO!V.YOd([X~P!0ROd.[O~O!V.]O!g(]X~P!6UO!g.`O~O!S.bO~OP$YOy#vOz#wO|#xO!f#tO!h#uO!l$YO(RVOX#fi^#fik#fi!V#fi!e#fi#h#fi#i#fi#j#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi'k#fi(b#fi(i#fi(j#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~O#g#fi~P#-pO#g#{O~P#-pOP$YOy#vOz#wO|#xO!f#tO!h#uO!l$YO#g#{O#h#|O#i#|O#j#|O(RVOX#fi^#fi!V#fi!e#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi'k#fi(b#fi(i#fi(j#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~Ok#fi~P#0bOk#}O~P#0bOP$YOk#}Oy#vOz#wO|#xO!f#tO!h#uO!l$YO#g#{O#h#|O#i#|O#j#|O#k$OO(RVO^#fi!V#fi#q#fi#s#fi#u#fi#v#fi'k#fi(b#fi(i#fi(j#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~OX#fi!e#fi#l#fi#m#fi#n#fi#o#fi~P#3SOX$aO!e$PO#l$PO#m$PO#n$`O#o$PO~P#3SOP$YOX$aOk#}Oy#vOz#wO|#xO!e$PO!f#tO!h#uO!l$YO#g#{O#h#|O#i#|O#j#|O#k$OO#l$PO#m$PO#n$`O#o$PO#q$QO(RVO^#fi!V#fi#s#fi#u#fi#v#fi'k#fi(b#fi(j#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~O(i#fi~P#6TO(i#yO~P#6TOP$YOX$aOk#}Oy#vOz#wO|#xO!e$PO!f#tO!h#uO!l$YO#g#{O#h#|O#i#|O#j#|O#k$OO#l$PO#m$PO#n$`O#o$PO#q$QO#s$SO(RVO(i#yO^#fi!V#fi#u#fi#v#fi'k#fi(b#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~O(j#fi~P#8uO(j#zO~P#8uOP$YOX$aOk#}Oy#vOz#wO|#xO!e$PO!f#tO!h#uO!l$YO#g#{O#h#|O#i#|O#j#|O#k$OO#l$PO#m$PO#n$`O#o$PO#q$QO#s$SO#u$UO(RVO(i#yO(j#zO~O^#fi!V#fi#v#fi'k#fi(b#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~P#;gOPYXXYXkYXyYXzYX|YX!eYX!fYX!hYX!lYX#XYX#dcX#gYX#hYX#iYX#jYX#kYX#lYX#mYX#nYX#oYX#qYX#sYX#uYX#vYX#{YX(RYX(bYX(iYX(jYX!VYX!WYX~O#yYX~P#>QOP$YOX:TOk9wOy#vOz#wO|#xO!e9yO!f#tO!h#uO!l$YO#g9uO#h9vO#i9vO#j9vO#k9xO#l9yO#m9yO#n:SO#o9yO#q9zO#s9|O#u:OO#v:PO(RVO(b$WO(i#yO(j#zO~O#y.dO~P#@_O#X:UO#{:UO#y(WX!W(WX~PNlO^'Ya!V'Ya'k'Ya'i'Ya!g'Ya!S'Yao'Ya!X'Ya%a'Ya!a'Ya~P!6UOP#fiX#fi^#fik#fiz#fi!V#fi!e#fi!f#fi!h#fi!l#fi#g#fi#h#fi#i#fi#j#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi'k#fi(R#fi(b#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~P#)tO^#zi!V#zi'k#zi'i#zi!S#zi!g#zio#zi!X#zi%a#zi!a#zi~P!6UO$W.iO$Y.iO~O$W.jO$Y.jO~O!a)YO#X.kO!X$^X$T$^X$W$^X$Y$^X$a$^X~O!U.lO~O!X)]O$T.nO$W)[O$Y)[O$a.oO~O!V:QO!W(VX~P#@_O!W.pO~O!a)YO$a(kX~O$a.rO~Oq)lO(S)mO(T.uO~Ol.xO!S.yO'vTO'yUO~O!VcX!acX!gcX!g$sX(bcX~P!.xO!g/PO~P#)tO!V/QO!a#rO(b'bO!g(oX~O!g/VO~O!U)}O't%eO!g(oP~O#d/XO~O!S$sX!V$sX!a$zX~P!.xO!V/YO!S(pX~P#)tO!a/[O~O!S/^O~Ok/bO!a#rO!h%ZO'}%OO(b'bO~O't/dO~O!a*}O~O^%^O!V/hO'k%^O~O!W/jO~P!2vO!]/kO!^/kO'u!iO(U!jO~O|/mO(U!jO~O#T/nO~O't%|Od'_X!V'_X~O!V*gOd(Oa~Od/sO~Oy/tOz/tO|/uOgva(iva(jva!Vva#Xva~Odva#yva~P#L|Oy)qO|)rOg$la(i$la(j$la!V$la#X$la~Od$la#y$la~P#MrOy)qO|)rOg$na(i$na(j$na!V$na#X$na~Od$na#y$na~P#NeO#d/wO~Od$|a!V$|a#X$|a#y$|a~P!0RO!a#rO~O#d/zO~Oy#vOz#wO|#xO!f#tO!h#uO(RVOP!niX!nik!ni!V!ni!e!ni!l!ni#g!ni#h!ni#i!ni#j!ni#k!ni#l!ni#m!ni#n!ni#o!ni#q!ni#s!ni#u!ni#v!ni(b!ni(i!ni(j!ni~O^!ni'k!ni'i!ni!S!ni!g!nio!ni!X!ni%a!ni!a!ni~P$ wOg.PO!X'QO%a.OO~Oi0RO't0QO~P!0sO!a*}O^'|a!X'|a'k'|a!V'|a~O#d0XO~OXYX!VcX!WcX~O!V0YO!W(wX~O!W0[O~OX0]O~O't+VO'vTO'yUO~O!X%nO't%eO]'gX!V'gX~O!V+[O](va~O!g0bO~P!6UOX0eO~O]0fO~O!V+hO^(sa'k(sa~O#X0lO~Og0oO!X$yO~O(U(oO!W(tP~Og0xO!X0uO%a0wO'}%OO~OX1SO!V1QO!W(uX~O!W1TO~O]1VO^%^O'k%^O~O't#jO'vTO'yUO~O#X$bO#{$bOP(WXX(WXk(WXy(WXz(WX|(WX!V(WX!e(WX!h(WX!l(WX#g(WX#h(WX#i(WX#j(WX#k(WX#l(WX#m(WX#n(WX#q(WX#s(WX#u(WX#v(WX(R(WX(b(WX(i(WX(j(WX~O#o1YO&Q1ZO^(WX!f(WX~P$(xO#X$bO#o1YO&Q1ZO~O^1[O~P%QO^1^O~O&Z1bOP&XiQ&XiV&Xi^&Xia&Xib&Xii&Xik&Xil&Xim&Xis&Xiu&Xiw&Xi|&Xi!Q&Xi!R&Xi!X&Xi!c&Xi!h&Xi!k&Xi!l&Xi!m&Xi!o&Xi!q&Xi!t&Xi!x&Xi#p&Xi$Q&Xi$U&Xi%`&Xi%b&Xi%d&Xi%e&Xi%h&Xi%j&Xi%m&Xi%n&Xi%p&Xi%|&Xi&S&Xi&U&Xi&W&Xi&Y&Xi&]&Xi&c&Xi&i&Xi&k&Xi&m&Xi&o&Xi&q&Xi'i&Xi't&Xi'v&Xi'y&Xi(R&Xi(a&Xi(n&Xi!W&Xi_&Xi&`&Xi~O_1hO!W1fO&`1gO~P`O!XXO!h1jO~O&g,eOP&biQ&biV&bi^&bia&bib&bii&bik&bil&bim&bis&biu&biw&bi|&bi!Q&bi!R&bi!X&bi!c&bi!h&bi!k&bi!l&bi!m&bi!o&bi!q&bi!t&bi!x&bi#p&bi$Q&bi$U&bi%`&bi%b&bi%d&bi%e&bi%h&bi%j&bi%m&bi%n&bi%p&bi%|&bi&S&bi&U&bi&W&bi&Y&bi&]&bi&c&bi&i&bi&k&bi&m&bi&o&bi&q&bi'i&bi't&bi'v&bi'y&bi(R&bi(a&bi(n&bi!W&bi&Z&bi_&bi&`&bi~O!S1pO~O!V!Za!W!Za~P#@_Ol!kO|!lO!U1vO(U!jO!V&}X!W&}X~P?fO!V,uO!W(Ya~O!V'TX!W'TX~P!@xO!V,xO!W(ha~O!W1}O~P'TO^%^O#X2WO'k%^O~O^%^O!a#rO#X2WO'k%^O~O^%^O!a#rO!l2[O#X2WO'k%^O(b'bO~O^%^O'k%^O~P!6UO!V$^Oo$ka~O!S&|i!V&|i~P!6UO!V'vO!S(Xi~O!V'}O!S(fi~O!S(gi!V(gi~P!6UO!V(di!g(di^(di'k(di~P!6UO#X2^O!V(di!g(di^(di'k(di~O!V(ZO!g(ci~O|%vO!X%wO!x]O#b2cO#c2bO't%eO~O|%vO!X%wO#c2bO't%eO~Og2jO!X'QO%a2iO~Og2jO!X'QO%a2iO'}%OO~O#dvaPvaXva^vakva!eva!fva!hva!lva#gva#hva#iva#jva#kva#lva#mva#nva#ova#qva#sva#uva#vva'kva(Rva(bva!gva!Sva'ivaova!Xva%ava!ava~P#L|O#d$laP$laX$la^$lak$laz$la!e$la!f$la!h$la!l$la#g$la#h$la#i$la#j$la#k$la#l$la#m$la#n$la#o$la#q$la#s$la#u$la#v$la'k$la(R$la(b$la!g$la!S$la'i$lao$la!X$la%a$la!a$la~P#MrO#d$naP$naX$na^$nak$naz$na!e$na!f$na!h$na!l$na#g$na#h$na#i$na#j$na#k$na#l$na#m$na#n$na#o$na#q$na#s$na#u$na#v$na'k$na(R$na(b$na!g$na!S$na'i$nao$na!X$na%a$na!a$na~P#NeO#d$|aP$|aX$|a^$|ak$|az$|a!V$|a!e$|a!f$|a!h$|a!l$|a#g$|a#h$|a#i$|a#j$|a#k$|a#l$|a#m$|a#n$|a#o$|a#q$|a#s$|a#u$|a#v$|a'k$|a(R$|a(b$|a!g$|a!S$|a'i$|a#X$|ao$|a!X$|a%a$|a!a$|a~P#)tO^#[q!V#[q'k#[q'i#[q!S#[q!g#[qo#[q!X#[q%a#[q!a#[q~P!6UOd'OX!V'OX~P!'^O!V.YOd([a~O!U2rO!V'PX!g'PX~P%QO!V.]O!g(]a~O!V.]O!g(]a~P!6UO!S2uO~O#y!ja!W!ja~PJ`O#y!ba!V!ba!W!ba~P#@_O#y!na!W!na~P!8oO#y!pa!W!pa~P!;YO!X3XO$UfO$_3YO~O!W3^O~Oo3_O~P#)tO^$hq!V$hq'k$hq'i$hq!S$hq!g$hqo$hq!X$hq%a$hq!a$hq~P!6UO!S3`O~Ol.xO'vTO'yUO~Oy)qO|)rO(j)vOg%Xi(i%Xi!V%Xi#X%Xi~Od%Xi#y%Xi~P$GeOy)qO|)rOg%Zi(i%Zi(j%Zi!V%Zi#X%Zi~Od%Zi#y%Zi~P$HWO(b$WO~P#)tO!U3cO't%eO!V'ZX!g'ZX~O!V/QO!g(oa~O!V/QO!a#rO!g(oa~O!V/QO!a#rO(b'bO!g(oa~Od$ui!V$ui#X$ui#y$ui~P!0RO!U3kO't*SO!S']X!V']X~P!0pO!V/YO!S(pa~O!V/YO!S(pa~P#)tO!a#rO#o3sO~Ok3vO!a#rO(b'bO~Od(Pi!V(Pi~P!0RO#X3yOd(Pi!V(Pi~P!0RO!g3|O~O^$iq!V$iq'k$iq'i$iq!S$iq!g$iqo$iq!X$iq%a$iq!a$iq~P!6UO!V4QO!X(qX~P#)tO!f#tO~P3}O^$sX!X$sX%UYX'k$sX!V$sX~P!.xO%U4SO^hXghXyhX|hX!XhX'khX(ihX(jhX!VhX~O%U4SO~O%b4ZO't+VO'vTO'yUO!V'fX!W'fX~O!V0YO!W(wa~OX4_O~O]4`O~O!S4dO~O^%^O'k%^O~P#)tO!X$yO~P#)tO!V4iO#X4kO!W(tX~O!W4lO~Ol!kO|4mO![!uO!]!rO!^!rO!x9mO!|!mO!}!mO#O!mO#P!mO#Q!mO#T4rO#U!vO'u!iO'vTO'yUO(U!jO(a!pO~O!W4qO~P%!VOg4wO!X0uO%a4vO~Og4wO!X0uO%a4vO'}%OO~O't#jO!V'eX!W'eX~O!V1QO!W(ua~O'vTO'yUO(U5QO~O]5UO~O!g5XO~P%QO^5ZO~O^5ZO~P%QO#o5]O&Q5^O~PMOO_1hO!W5bO&`1gO~P`O!a5dO~O!a5fO!V(Zi!W(Zi!a(Zi!h(Zi'}(Zi~O!V#ai!W#ai~P#@_O#X5gO!V#ai!W#ai~O!V!Zi!W!Zi~P#@_O^%^O#X5pO'k%^O~O^%^O!a#rO#X5pO'k%^O~O!V(dq!g(dq^(dq'k(dq~P!6UO!V(ZO!g(cq~O|%vO!X%wO#c5wO't%eO~O!X'QO%a5zO~Og5}O!X'QO%a5zO~O#d%XiP%XiX%Xi^%Xik%Xiz%Xi!e%Xi!f%Xi!h%Xi!l%Xi#g%Xi#h%Xi#i%Xi#j%Xi#k%Xi#l%Xi#m%Xi#n%Xi#o%Xi#q%Xi#s%Xi#u%Xi#v%Xi'k%Xi(R%Xi(b%Xi!g%Xi!S%Xi'i%Xio%Xi!X%Xi%a%Xi!a%Xi~P$GeO#d%ZiP%ZiX%Zi^%Zik%Ziz%Zi!e%Zi!f%Zi!h%Zi!l%Zi#g%Zi#h%Zi#i%Zi#j%Zi#k%Zi#l%Zi#m%Zi#n%Zi#o%Zi#q%Zi#s%Zi#u%Zi#v%Zi'k%Zi(R%Zi(b%Zi!g%Zi!S%Zi'i%Zio%Zi!X%Zi%a%Zi!a%Zi~P$HWO#d$uiP$uiX$ui^$uik$uiz$ui!V$ui!e$ui!f$ui!h$ui!l$ui#g$ui#h$ui#i$ui#j$ui#k$ui#l$ui#m$ui#n$ui#o$ui#q$ui#s$ui#u$ui#v$ui'k$ui(R$ui(b$ui!g$ui!S$ui'i$ui#X$uio$ui!X$ui%a$ui!a$ui~P#)tOd'Oa!V'Oa~P!0RO!V'Pa!g'Pa~P!6UO!V.]O!g(]i~O#y#[i!V#[i!W#[i~P#@_OP$YOy#vOz#wO|#xO!f#tO!h#uO!l$YO(RVOX#fik#fi!e#fi#h#fi#i#fi#j#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi#y#fi(b#fi(i#fi(j#fi!V#fi!W#fi~O#g#fi~P%0fO#g9uO~P%0fOP$YOy#vOz#wO|#xO!f#tO!h#uO!l$YO#g9uO#h9vO#i9vO#j9vO(RVOX#fi!e#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi#y#fi(b#fi(i#fi(j#fi!V#fi!W#fi~Ok#fi~P%2qOk9wO~P%2qOP$YOk9wOy#vOz#wO|#xO!f#tO!h#uO!l$YO#g9uO#h9vO#i9vO#j9vO#k9xO(RVO#q#fi#s#fi#u#fi#v#fi#y#fi(b#fi(i#fi(j#fi!V#fi!W#fi~OX#fi!e#fi#l#fi#m#fi#n#fi#o#fi~P%4|OX:TO!e9yO#l9yO#m9yO#n:SO#o9yO~P%4|OP$YOX:TOk9wOy#vOz#wO|#xO!e9yO!f#tO!h#uO!l$YO#g9uO#h9vO#i9vO#j9vO#k9xO#l9yO#m9yO#n:SO#o9yO#q9zO(RVO#s#fi#u#fi#v#fi#y#fi(b#fi(j#fi!V#fi!W#fi~O(i#fi~P%7hO(i#yO~P%7hOP$YOX:TOk9wOy#vOz#wO|#xO!e9yO!f#tO!h#uO!l$YO#g9uO#h9vO#i9vO#j9vO#k9xO#l9yO#m9yO#n:SO#o9yO#q9zO#s9|O(RVO(i#yO#u#fi#v#fi#y#fi(b#fi!V#fi!W#fi~O(j#fi~P%9sO(j#zO~P%9sOP$YOX:TOk9wOy#vOz#wO|#xO!e9yO!f#tO!h#uO!l$YO#g9uO#h9vO#i9vO#j9vO#k9xO#l9yO#m9yO#n:SO#o9yO#q9zO#s9|O#u:OO(RVO(i#yO(j#zO~O#v#fi#y#fi(b#fi!V#fi!W#fi~P%<OO^#wy!V#wy'k#wy'i#wy!S#wy!g#wyo#wy!X#wy%a#wy!a#wy~P!6UOg;hOy)qO|)rO(i)tO(j)vO~OP#fiX#fik#fiz#fi!e#fi!f#fi!h#fi!l#fi#g#fi#h#fi#i#fi#j#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi#y#fi(R#fi(b#fi!V#fi!W#fi~P%>vO!f#tOP(QXX(QXg(QXk(QXy(QXz(QX|(QX!e(QX!h(QX!l(QX#g(QX#h(QX#i(QX#j(QX#k(QX#l(QX#m(QX#n(QX#o(QX#q(QX#s(QX#u(QX#v(QX#y(QX(R(QX(b(QX(i(QX(j(QX!V(QX!W(QX~O#y#zi!V#zi!W#zi~P#@_O#y!ni!W!ni~P$ wO!W6ZO~O!V'Ya!W'Ya~P#@_O!a#rO(b'bO!V'Za!g'Za~O!V/QO!g(oi~O!V/QO!a#rO!g(oi~Od$uq!V$uq#X$uq#y$uq~P!0RO!S']a!V']a~P#)tO!a6bO~O!V/YO!S(pi~P#)tO!V/YO!S(pi~O!S6fO~O!a#rO#o6kO~Ok6lO!a#rO(b'bO~O!S6nO~Od$wq!V$wq#X$wq#y$wq~P!0RO^$iy!V$iy'k$iy'i$iy!S$iy!g$iyo$iy!X$iy%a$iy!a$iy~P!6UO!V4QO!X(qa~O^#[y!V#[y'k#[y'i#[y!S#[y!g#[yo#[y!X#[y%a#[y!a#[y~P!6UOX6sO~O!V0YO!W(wi~O]6yO~O!a5fO~O(U(oO!V'bX!W'bX~O!V4iO!W(ta~OikO't7QO~P._O!W7TO~P%!VOl!kO|7UO'vTO'yUO(U!jO(a!pO~O!X0uO~O!X0uO%a7WO~Og7ZO!X0uO%a7WO~OX7`O!V'ea!W'ea~O!V1QO!W(ui~O!g7dO~O!g7eO~O!g7fO~O!g7fO~P%QO^7hO~O!a7kO~O!g7lO~O!V(gi!W(gi~P#@_O^%^O#X7tO'k%^O~O!V(dy!g(dy^(dy'k(dy~P!6UO!V(ZO!g(cy~O!X'QO%a7wO~O#d$uqP$uqX$uq^$uqk$uqz$uq!V$uq!e$uq!f$uq!h$uq!l$uq#g$uq#h$uq#i$uq#j$uq#k$uq#l$uq#m$uq#n$uq#o$uq#q$uq#s$uq#u$uq#v$uq'k$uq(R$uq(b$uq!g$uq!S$uq'i$uq#X$uqo$uq!X$uq%a$uq!a$uq~P#)tO#d$wqP$wqX$wq^$wqk$wqz$wq!V$wq!e$wq!f$wq!h$wq!l$wq#g$wq#h$wq#i$wq#j$wq#k$wq#l$wq#m$wq#n$wq#o$wq#q$wq#s$wq#u$wq#v$wq'k$wq(R$wq(b$wq!g$wq!S$wq'i$wq#X$wqo$wq!X$wq%a$wq!a$wq~P#)tO!V'Pi!g'Pi~P!6UO#y#[q!V#[q!W#[q~P#@_Oy/tOz/tO|/uOPvaXvagvakva!eva!fva!hva!lva#gva#hva#iva#jva#kva#lva#mva#nva#ova#qva#sva#uva#vva#yva(Rva(bva(iva(jva!Vva!Wva~Oy)qO|)rOP$laX$lag$lak$laz$la!e$la!f$la!h$la!l$la#g$la#h$la#i$la#j$la#k$la#l$la#m$la#n$la#o$la#q$la#s$la#u$la#v$la#y$la(R$la(b$la(i$la(j$la!V$la!W$la~Oy)qO|)rOP$naX$nag$nak$naz$na!e$na!f$na!h$na!l$na#g$na#h$na#i$na#j$na#k$na#l$na#m$na#n$na#o$na#q$na#s$na#u$na#v$na#y$na(R$na(b$na(i$na(j$na!V$na!W$na~OP$|aX$|ak$|az$|a!e$|a!f$|a!h$|a!l$|a#g$|a#h$|a#i$|a#j$|a#k$|a#l$|a#m$|a#n$|a#o$|a#q$|a#s$|a#u$|a#v$|a#y$|a(R$|a(b$|a!V$|a!W$|a~P%>vO#y$hq!V$hq!W$hq~P#@_O#y$iq!V$iq!W$iq~P#@_O!W8RO~O#y8SO~P!0RO!a#rO!V'Zi!g'Zi~O!a#rO(b'bO!V'Zi!g'Zi~O!V/QO!g(oq~O!S']i!V']i~P#)tO!V/YO!S(pq~O!S8YO~P#)tO!S8YO~Od(Py!V(Py~P!0RO!V'`a!X'`a~P#)tO^%Tq!X%Tq'k%Tq!V%Tq~P#)tOX8_O~O!V0YO!W(wq~O#X8cO!V'ba!W'ba~O!V4iO!W(ti~P#@_OPYXXYXkYXyYXzYX|YX!SYX!VYX!eYX!fYX!hYX!lYX#XYX#dcX#gYX#hYX#iYX#jYX#kYX#lYX#mYX#nYX#oYX#qYX#sYX#uYX#vYX#{YX(RYX(bYX(iYX(jYX~O!a%RX#o%RX~P&/vO!X0uO%a8gO~O'vTO'yUO(U8lO~O!V1QO!W(uq~O!g8oO~O!g8oO~P%QO!g8qO~O!g8rO~O#X8tO!V#ay!W#ay~O!V#ay!W#ay~P#@_O!X'QO%a8yO~O#y#wy!V#wy!W#wy~P#@_OP$uiX$uik$uiz$ui!e$ui!f$ui!h$ui!l$ui#g$ui#h$ui#i$ui#j$ui#k$ui#l$ui#m$ui#n$ui#o$ui#q$ui#s$ui#u$ui#v$ui#y$ui(R$ui(b$ui!V$ui!W$ui~P%>vOy)qO|)rO(j)vOP%XiX%Xig%Xik%Xiz%Xi!e%Xi!f%Xi!h%Xi!l%Xi#g%Xi#h%Xi#i%Xi#j%Xi#k%Xi#l%Xi#m%Xi#n%Xi#o%Xi#q%Xi#s%Xi#u%Xi#v%Xi#y%Xi(R%Xi(b%Xi(i%Xi!V%Xi!W%Xi~Oy)qO|)rOP%ZiX%Zig%Zik%Ziz%Zi!e%Zi!f%Zi!h%Zi!l%Zi#g%Zi#h%Zi#i%Zi#j%Zi#k%Zi#l%Zi#m%Zi#n%Zi#o%Zi#q%Zi#s%Zi#u%Zi#v%Zi#y%Zi(R%Zi(b%Zi(i%Zi(j%Zi!V%Zi!W%Zi~O#y$iy!V$iy!W$iy~P#@_O#y#[y!V#[y!W#[y~P#@_O!a#rO!V'Zq!g'Zq~O!V/QO!g(oy~O!S']q!V']q~P#)tO!S9QO~P#)tO!V0YO!W(wy~O!V4iO!W(tq~O!X0uO%a9XO~O!g9[O~O!X'QO%a9aO~OP$uqX$uqk$uqz$uq!e$uq!f$uq!h$uq!l$uq#g$uq#h$uq#i$uq#j$uq#k$uq#l$uq#m$uq#n$uq#o$uq#q$uq#s$uq#u$uq#v$uq#y$uq(R$uq(b$uq!V$uq!W$uq~P%>vOP$wqX$wqk$wqz$wq!e$wq!f$wq!h$wq!l$wq#g$wq#h$wq#i$wq#j$wq#k$wq#l$wq#m$wq#n$wq#o$wq#q$wq#s$wq#u$wq#v$wq#y$wq(R$wq(b$wq!V$wq!W$wq~P%>vOd%]!Z!V%]!Z#X%]!Z#y%]!Z~P!0RO!V'bq!W'bq~P#@_O!V#a!Z!W#a!Z~P#@_O#d%]!ZP%]!ZX%]!Z^%]!Zk%]!Zz%]!Z!V%]!Z!e%]!Z!f%]!Z!h%]!Z!l%]!Z#g%]!Z#h%]!Z#i%]!Z#j%]!Z#k%]!Z#l%]!Z#m%]!Z#n%]!Z#o%]!Z#q%]!Z#s%]!Z#u%]!Z#v%]!Z'k%]!Z(R%]!Z(b%]!Z!g%]!Z!S%]!Z'i%]!Z#X%]!Zo%]!Z!X%]!Z%a%]!Z!a%]!Z~P#)tOP%]!ZX%]!Zk%]!Zz%]!Z!e%]!Z!f%]!Z!h%]!Z!l%]!Z#g%]!Z#h%]!Z#i%]!Z#j%]!Z#k%]!Z#l%]!Z#m%]!Z#n%]!Z#o%]!Z#q%]!Z#s%]!Z#u%]!Z#v%]!Z#y%]!Z(R%]!Z(b%]!Z!V%]!Z!W%]!Z~P%>vOo(VX~P1gO'u!iO~P!)jO!ScX!VcX#XcX~P&/vOPYXXYXkYXyYXzYX|YX!VYX!VcX!eYX!fYX!hYX!lYX#XYX#XcX#dcX#gYX#hYX#iYX#jYX#kYX#lYX#mYX#nYX#oYX#qYX#sYX#uYX#vYX#{YX(RYX(bYX(iYX(jYX~O!acX!gYX!gcX(bcX~P&E^OP9lOQ9lOa;]Ob!fOikOk9lOlkOmkOskOu9lOw9lO|WO!QkO!RkO!XXO!c9oO!hZO!k9lO!l9lO!m9lO!o9pO!q9qO!t!eO$Q!hO$UfO't)PO'vTO'yUO(RVO(a[O(n;ZO~O!V:QO!W$ka~Oi%POk$qOl$pOm$pOs%QOu%ROw:WO|$xO!X$yO!c;bO!h$uO#c:^O$Q%VO$m:YO$o:[O$r%WO't(gO'vTO'yUO'}%OO(R$rO~O#p)WO~P&JSO!WYX!WcX~P&E^O#d9tO~O!a#rO#d9tO~O#X:UO~O#o9yO~O#X:`O!V(gX!W(gX~O#X:UO!V(eX!W(eX~O#d:aO~Od:cO~P!0RO#d:hO~O#d:iO~O!a#rO#d:jO~O!a#rO#d:aO~O#y:kO~P#@_O#d:lO~O#d:mO~O#d:nO~O#d:oO~O#d:pO~O#d:qO~O#y:rO~P!0RO#y:sO~P!0RO$U~!f!|!}#P#Q#T#b#c#n(n$m$o$r%U%`%a%b%h%j%m%n%p%r~'oR$U(n#h!R'm'u#il#g#jky'n(U'n't$W$Y$W~",goto:"$%Z({PPPP(|P)PP)aP*p.rPPPP5SPP5iP;d>iP>|P>|PPP>|P@lP>|P>|P>|P@pPP@uPA`PFUPPPFYPPPPFYIXPPPI_JYPFYPLgPPPPNuFYPPPFYPFYP!#TFYP!&g!'i!'rP!(e!(i!(ePPPPP!+r!'iPP!,`!-YP!/|FYFY!0R!3Z!7n!7n!;cPPP!;jFYPPPPPPPPPPP!>uP!@WPPFY!AePFYPFYFYFYFYPFY!BwPP!E}P!IPP!IT!I_!Ic!IcP!EzP!Ig!IgP!LiP!LmFYFY!Ls# t>|P>|P>|>|P##O>|>|#$x>|#'V>|#(y>|>|#)g#+c#+c#+g#+o#+c#+wP#+cP>|#,a>|#-i>|>|5SPPP#.tPP#/^#/^P#/^P#/s#/^PP#/yP#/pP#/p#0]#/p#0w#0}5P)P#1Q)PP#1X#1X#1XP)PP)PP)PP)PPP)PP#1_#1bP#1b)PP#1fP#1iP)PP)PP)PP)PP)PP)P)PPP#1o#1u#2P#2V#2]#2c#2i#2w#2}#3T#3_#3e#3o#4O#4U#4u#5X#5_#5e#5s#6Y#7j#7x#8O#8U#8[#8b#8l#8r#8x#9S#9f#9lPPPPPPPPPP#9rPPPPPPP#:f#=mP#>|#?T#?]PPPP#Cg#F]#Lr#Lu#Lx#Mq#Mt#Mw#NO#NWPP#N^#Nb$ Z$!Z$!_$!sPP$!w$!}$#RP$#U$#Y$#]$$R$$i$$n$$q$$t$$z$$}$%R$%VR!xRmpOXr!X#`%]&d&f&g&i,],b1b1eY!rQ'Q,}0u4pQ%ctQ%kwQ%rzQ&[!TS&x!c,uQ'W!fS'^!o!uS*Y$y*_Q+T%lQ+b%tQ+|&UQ,{'PQ-V'XQ-_'_Q/k*aQ1P+}R:_9p$zdOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$^$b%]%c%p&]&`&d&f&g&i&m&u'S'd't'v'|(T(i(m(q)p*s+g,X,],b-R-Z-i-o.].d/u/z0X0x1Y1Z1[1^1b1e1g2W2^2r4m4w5Z5]5^5p7U7Z7h7tS#m]9m!r)R$X$j&y)e,n,q.l1v3X4k5g8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^Q*j%SQ+Y%nQ,O&XQ,V&aQ.S:VQ0O*{Q0S*}Q0_+ZQ1X,TQ2f.PQ4Y0YQ5O1QQ5|2jQ6S:WQ6u4ZR7z5}&xkOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j%]%c%p&]&`&a&d&f&g&i&m&u&y'S'd't'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^t!kQ!o!r!u!v&x'P'Q'^'_'`,u,{,}-_0u4p4r$Y$pi#r#t$`$a$u$x%T%U%Y)l)u)w)x*P*V*e*f*z*}+l+o.O.Y/X/Y/[/w0l0o0w2i3a3k3s3y4Q4S4v5z6b6k7W7w8S8g8y9X9a:S:T:X:Y:Z:[:]:^:d:e:f:g:h:i:l:m:n:o:r:s;Z;c;d;g;hQ%uzQ&v!cS&|%w,xQ+Y%nS.x)r.zQ/v*nQ0_+ZQ0d+aQ1W,SQ1X,TQ4Y0YQ4c0fQ5R1SQ5S1VQ6u4ZQ6x4`Q7c5UQ8b6yR8m7`pmOXr!T!X#`%]&Z&d&f&g&i,],b1b1eR,Q&]&r^OPXYrstux!X!^!g!l#O#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j%]%c%p&]&`&a&d&f&g&i&m&u'S'd'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;];^[#XWZ#S#V&y'tQ%fvQ%jwS%oz%t!U%x|}#d#e#h%Z%v'}(X(Y(Z+e+f+h,Z,o-m-s-t-u-w1j2b2c5f5wQ&Q!RQ'T!eQ'V!fQ(b#oS)|$u*QS+S%k%lQ+W%nQ+w&SQ+{&US-U'W'XQ.R(cQ/U)}Q0W+TQ0^+ZQ0`+[Q0c+`Q0z+xS1O+|+}Q2S-VQ3b/QQ4X0YQ4]0]Q4b0eQ4}1PQ6_3cQ6t4ZQ6w4_Q8^6sR9S8_v$wi#t%T%U%Y)u)w*P*e*f.Y/X/w3a3y8S;Z;c;d!S%hw!f!q%j%k%l&w'V'W'X']'g*X+S+T,r-U-V-^/c0W1{2S2Z3uQ*|%fQ+m%}Q+p&OQ+z&UQ.Q(bQ0y+wU0}+{+|+}Q2k.RQ4x0zS4|1O1PQ7_4}!z;_#r$`$a$u$x)l)x*V*z*}+l+o.O/Y/[0l0o0w2i3k3s4Q4S4v5z6b6k7W7w8g8y9X9a:X:Z:]:d:f:h:l:n:r;g;hg;`:S:T:Y:[:^:e:g:i:m:o:sW$|i%O*g;ZS%}!O&ZQ&O!PQ&P!QR+k%{$Z${i#r#t$`$a$u$x%T%U%Y)l)u)w)x*P*V*e*f*z*}+l+o.O.Y/X/Y/[/w0l0o0w2i3a3k3s3y4Q4S4v5z6b6k7W7w8S8g8y9X9a:S:T:X:Y:Z:[:]:^:d:e:f:g:h:i:l:m:n:o:r:s;Z;c;d;g;hT)m$r)nV*k%S:V:WU&|!c%w,xS(p#v#wQ+_%qS-z(^(_Q0p+qQ3z/tR6}4i&xkOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j%]%c%p&]&`&a&d&f&g&i&m&u&y'S'd't'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^$i$]c#U#a%a%b%d's'y(e(l(t(u(v(w(x(y(z({(|(})O)Q)T)X)c*x+^,s-b-g-l-n.X._.c.e.f.g.v/x1q1t2U2]2q2v2w2x2y2z2{2|2}3O3P3Q3R3S3V3W3]4O4V5i5o5t6Q6R6W6X7P7n7r7{8P8Q8v9U9]9n;QT#PV#Q&ykOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j%]%c%p&]&`&a&d&f&g&i&m&u&y'S'd't'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^Q&z!cR1w,uv!kQ!c!o!r!u!v&x'P'Q'^'_'`,u,{,}-_0u4p4rS*X$y*_S/c*Y*aQ/l*bQ0r+sQ3u/kR3x/nlpOXr!X#`%]&d&f&g&i,],b1b1eQ&k![Q'h!tS(d#q9tQ+Q%iQ+u&QQ+v&RQ-S'UQ-a'aS.W(i:aS/y*s:jQ0U+RQ0t+tQ1i,dQ1k,eQ1s,pQ2Q-TQ2T-XS4P/z:pQ4T0VS4W0X:qQ5h1uQ5l2RQ5q2YQ6r4UQ7o5jQ7p5mQ7s5rR8s7l$d$[c#U#a%b%d's'y(e(l(t(u(v(w(x(y(z({(|(})O)Q)T)X)c*x+^,s-b-g-l-n.X._.c.f.g.v/x1q1t2U2]2q2v2w2x2y2z2{2|2}3O3P3Q3R3S3V3W3]4O4V5i5o5t6Q6R6W6X7P7n7r7{8P8Q8v9U9]9n;QS(a#l'ZU*d$z(h3US*w%a.eQ2g0OQ5y2fQ7y5|R8z7z$d$Zc#U#a%b%d's'y(e(l(t(u(v(w(x(y(z({(|(})O)Q)T)X)c*x+^,s-b-g-l-n.X._.c.f.g.v/x1q1t2U2]2q2v2w2x2y2z2{2|2}3O3P3Q3R3S3V3W3]4O4V5i5o5t6Q6R6W6X7P7n7r7{8P8Q8v9U9]9n;QS(`#l'ZS(r#w$[S*v%a.eS-{(_(aQ.h)SQ/{*wR2d-|&xkOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j%]%c%p&]&`&a&d&f&g&i&m&u&y'S'd't'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^S#m]9mQ&f!VQ&g!WQ&i!YQ&j!ZR1a,`Q'R!eQ*y%fQ-Q'TS-}(b*|Q2O-PW2h.Q.R/}0PQ5k2PU5x2e2g2kS7v5y5{S8x7x7yS9_8w8zQ9g9`R9j9hU!sQ'Q,}T4n0u4p!O_OXZ`r!T!X#`#d%Z%]&Z&]&d&f&g&i(Z,],b-t1b1e]!mQ!o'Q,}0u4pT#m]9m%UyOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$^$b%]%c%p&]&`&a&d&f&g&i&m&u'S'd't'v'|(T(i(m(q)p*s*{+g,X,],b-R-Z-i-o.P.].d/u/z0X0x1Y1Z1[1^1b1e1g2W2^2j2r4m4w5Z5]5^5p5}7U7Z7h7tS(p#v#wS-z(^(_!s:w$X$j&y)e,n,q.l1v3X4k5g8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^Y!qQ'Q,}0u4pQ']!oS'g!r!uS'i!v4rS-^'^'_Q-`'`R2Z-_Q'f!qS(V#c1_S-]']'iQ/T)|Q/a*XQ2[-`Q3g/US3p/b/lQ6^3bS6i3v3xQ8U6_R8]6lQ#sbQ'e!qS(U#c1_S(W#i*rQ*t%[Q+O%gQ+U%mU-[']'f'iQ-p(VQ/S)|Q/`*XQ/f*[Q0T+PQ0{+yS2X-]-`Q2a-xS3f/T/US3o/a/lQ3r/eQ3t/gQ4z0|Q5s2[Q6]3bQ6a3gS6e3p3xQ6j3wQ7]4{S8T6^6_Q8X6fQ8Z6iQ8j7^Q9O8UQ9P8YQ9R8]Q9Z8kQ9c9QQ:z:uQ;V;OR;W;PV!sQ'Q,}%UaOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$^$b%]%c%p&]&`&a&d&f&g&i&m&u'S'd't'v'|(T(i(m(q)p*s*{+g,X,],b-R-Z-i-o.P.].d/u/z0X0x1Y1Z1[1^1b1e1g2W2^2j2r4m4w5Z5]5^5p5}7U7Z7h7tS#sx!g!r:t$X$j&y)e,n,q.l1v3X4k5g8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^R:z;]%UbOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$^$b%]%c%p&]&`&a&d&f&g&i&m&u'S'd't'v'|(T(i(m(q)p*s*{+g,X,],b-R-Z-i-o.P.].d/u/z0X0x1Y1Z1[1^1b1e1g2W2^2j2r4m4w5Z5]5^5p5}7U7Z7h7tQ%[j!S%gw!f!q%j%k%l&w'V'W'X']'g*X+S+T,r-U-V-^/c0W1{2S2Z3uS%mx!gQ+P%hQ+y&UW0|+z+{+|+}U4{0}1O1PS7^4|4}Q8k7_!r:u$X$j&y)e,n,q.l1v3X4k5g8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^Q;O;[R;P;]$xeOPXYrstu!X!^!l#O#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$^$b%]%c%p&]&`&d&f&g&i&m&u'S'd'v'|(T(i(m(q)p*s*{+g,X,],b-R-Z-i-o.P.].d/u/z0X0x1Y1Z1[1^1b1e1g2W2^2j2r4m4w5Z5]5^5p5}7U7Z7h7tY#^WZ#S#V't!U%x|}#d#e#h%Z%v'}(X(Y(Z+e+f+h,Z,o-m-s-t-u-w1j2b2c5f5wQ,W&a!p:v$X$j)e,n,q.l1v3X4k5g8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^R:y&yS&}!c%wR1y,x$zdOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$^$b%]%c%p&]&`&d&f&g&i&m&u'S'd't'v'|(T(i(m(q)p*s+g,X,],b-R-Z-i-o.].d/u/z0X0x1Y1Z1[1^1b1e1g2W2^2r4m4w5Z5]5^5p7U7Z7h7t!r)R$X$j&y)e,n,q.l1v3X4k5g8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^Q,V&aQ0O*{Q2f.PQ5|2jR7z5}!f$Rc#U%a's'y(e(l({(|(})O)T)X+^-b-g-l-n.X._.v/x2U2]2q3S4O4V5o5t6Q7r8v9n!T9{)Q)c,s.e1q1t2v3O3P3Q3R3V3]5i6R6W6X7P7n7{8P8Q9U9];Q!b$Tc#U%a's'y(e(l(})O)T)X+^-b-g-l-n.X._.v/x2U2]2q3S4O4V5o5t6Q7r8v9n!P9})Q)c,s.e1q1t2v3Q3R3V3]5i6R6W6X7P7n7{8P8Q9U9];Q!^$Xc#U%a's'y(e(l)T)X+^-b-g-l-n.X._.v/x2U2]2q3S4O4V5o5t6Q7r8v9nQ3a/Oz;^)Q)c,s.e1q1t2v3V3]5i6R6W6X7P7n7{8P8Q9U9];QQ;c;eR;d;f&xkOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j%]%c%p&]&`&a&d&f&g&i&m&u&y'S'd't'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^S$kh$lR3Y.k'PgOPWXYZhrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j$l%]%c%p&]&`&a&d&f&g&i&m&u&y'S'd't'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.k.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^T$gf$mQ$efS)[$h)`R)h$mT$ff$mT)^$h)`'PhOPWXYZhrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j$l%]%c%p&]&`&a&d&f&g&i&m&u&y'S'd't'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.k.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^T$kh$lQ$nhR)g$l%UjOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$^$b%]%c%p&]&`&a&d&f&g&i&m&u'S'd't'v'|(T(i(m(q)p*s*{+g,X,],b-R-Z-i-o.P.].d/u/z0X0x1Y1Z1[1^1b1e1g2W2^2j2r4m4w5Z5]5^5p5}7U7Z7h7t!s;[$X$j&y)e,n,q.l1v3X4k5g8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^#alOPXZr!X!^!l#O#`#k#x$j%]&]&`&a&d&f&g&i&m&u'S(q)e*{+g,X,],b-R.P.l/u0x1Y1Z1[1^1b1e1g2j3X4m4w5Z5]5^5}7U7Z7hv$zi#t%T%U%Y)u)w*P*e*f.Y/X/w3a3y8S;Z;c;d!z(h#r$`$a$u$x)l)x*V*z*}+l+o.O/Y/[0l0o0w2i3k3s4Q4S4v5z6b6k7W7w8g8y9X9a:X:Z:]:d:f:h:l:n:r;g;hQ*o%WQ.w)qg3U:S:T:Y:[:^:e:g:i:m:o:sv$vi#t%T%U%Y)u)w*P*e*f.Y/X/w3a3y8S;Z;c;dQ*R$wS*[$y*_Q*p%XQ/g*]!z:|#r$`$a$u$x)l)x*V*z*}+l+o.O/Y/[0l0o0w2i3k3s4Q4S4v5z6b6k7W7w8g8y9X9a:X:Z:]:d:f:h:l:n:r;g;hf:}:S:T:Y:[:^:e:g:i:m:o:sQ;R;_Q;S;`Q;T;aR;U;bv$zi#t%T%U%Y)u)w*P*e*f.Y/X/w3a3y8S;Z;c;d!z(h#r$`$a$u$x)l)x*V*z*}+l+o.O/Y/[0l0o0w2i3k3s4Q4S4v5z6b6k7W7w8g8y9X9a:X:Z:]:d:f:h:l:n:r;g;hg3U:S:T:Y:[:^:e:g:i:m:o:slnOXr!X#`%]&d&f&g&i,],b1b1eQ*U$xQ,k&pQ,l&rR3j/Y$Y${i#r#t$`$a$u$x%T%U%Y)l)u)w)x*P*V*e*f*z*}+l+o.O.Y/X/Y/[/w0l0o0w2i3a3k3s3y4Q4S4v5z6b6k7W7w8S8g8y9X9a:S:T:X:Y:Z:[:]:^:d:e:f:g:h:i:l:m:n:o:r:s;Z;c;d;g;hQ+n&OQ0n+pQ4g0mR6|4hT*^$y*_S*^$y*_T4o0u4pS/e*Z4mT3w/m7UQ+O%gQ/f*[Q0T+PQ0{+yQ4z0|Q7]4{Q8j7^R9Z8kn)u$s(j*q/W/o/p2o3h3}6[6m8}:{;X;Y!W:d(f)V){*T.V.s/O/]/|0k0m2n3i3m4f4h6O6P6c6g6o6q8W8[9b;e;f]:e3T6V7|8{8|9kp)w$s(j*q.|/W/o/p2o3h3}6[6m8}:{;X;Y!Y:f(f)V){*T.V.s/O/]/|0k0m2l2n3i3m4f4h6O6P6c6g6o6q8W8[9b;e;f_:g3T6V7|7}8{8|9kpmOXr!T!X#`%]&Z&d&f&g&i,],b1b1eQ&W!SR,X&apmOXr!T!X#`%]&Z&d&f&g&i,],b1b1eR&W!SQ+r&PR0j+kqmOXr!T!X#`%]&Z&d&f&g&i,],b1b1eQ0v+wS4u0y0zU7V4s4t4xS8f7X7YS9V8e8hQ9d9WR9i9eQ&_!TR,R&ZR5R1SS%oz%tR0`+[Q&d!UR,]&eR,c&jT1c,b1eR,g&kQ,f&kR1l,gQ'k!wR-c'kQrOQ#`XT%`r#`Q!zTR'm!zQ!}UR'o!}Q)n$rR.t)nQ#QVR'q#QQ#TWU'w#T'x-jQ'x#UR-j'yQ,v&zR1x,vQ.Z(jR2p.ZQ.^(lS2s.^2tR2t._Q,}'QR1|,}Y!oQ'Q,}0u4pR'[!oS#ZW%vU(O#Z(P-kQ(P#[R-k'zQ,y&}R1z,yr`OXr!T!X#`%]&Z&]&d&f&g&i,],b1b1eS#dZ%ZU#n`#d-tR-t(ZQ([#fQ-q(WW-y([-q2_5uQ2_-rR5u2`Q)`$hR.m)`Q$lhR)f$lQ$_cU)U$_-f:RQ-f9nR:R)cQ/R)|W3d/R3e6`8VU3e/S/T/US6`3f3gR8V6a#m)s$s(f(j)V){*T*l*m*q.T.U.V.s.|.}/O/W/]/o/p/|0k0m2l2m2n2o3T3h3i3m3}4f4h6O6P6T6U6V6[6c6g6m6o6q7|7}8O8W8[8{8|8}9b9k:{;X;Y;e;fQ/Z*TU3l/Z3n6dQ3n/]R6d3mQ*_$yR/i*_Q*h$}R/r*hQ4R/|R6p4RQ+i%yR0i+iQ4j0pS7O4j8dR8d7PQ+t&QR0s+tQ4p0uR7S4pQ1R,OS5P1R7aR7a5RQ0Z+WW4[0Z4^6v8`Q4^0^Q6v4]R8`6wQ+]%oR0a+]Q1e,bR5a1eWqOXr#`Q&h!XQ*u%]Q,[&dQ,^&fQ,_&gQ,a&iQ1`,]S1c,b1eR5`1bQ%_oQ&l!]Q&o!_Q&q!`Q&s!aQ'c!qQ+Q%iQ+d%uQ+j%zQ,Q&_Q,i&nW-Y']'e'f'iQ-a'aQ/h*^Q0U+RS1U,R,UQ1m,hQ1n,kQ1o,lQ2T-XW2V-[-]-`-bQ4T0VQ4a0dQ4e0kQ4y0{Q5T1WQ5_1aU5n2U2X2[Q5q2YQ6r4UQ6z4cQ6{4fQ7R4oQ7[4zQ7b5SS7q5o5sQ7s5rQ8a6xQ8i7]Q8n7cQ8u7rQ9T8bQ9Y8jQ9^8vR9f9ZQ%iwQ'U!fQ'a!qU+R%j%k%lQ,p&wU-T'V'W'XS-X']'gQ/_*XS0V+S+TQ1u,rS2R-U-VQ2Y-^Q3q/cQ4U0WQ5j1{Q5m2SQ5r2ZR6h3uS$ti;ZR*i%OU$}i%O;ZR/q*gQ$siS(f#r*}Q(j#tS)V$`$aQ){$uQ*T$xQ*l%TQ*m%UQ*q%YQ.T:XQ.U:ZQ.V:]Q.s)lQ.|)uQ.})wQ/O)xQ/W*PQ/]*VQ/o*eQ/p*fh/|*z.O0w2i4v5z7W7w8g8y9X9aQ0k+lQ0m+oQ2l:dQ2m:fQ2n:hQ2o.YS3T:S:TQ3h/XQ3i/YQ3m/[Q3}/wQ4f0lQ4h0oQ6O:lQ6P:nQ6T:YQ6U:[Q6V:^Q6[3aQ6c3kQ6g3sQ6m3yQ6o4QQ6q4SQ7|:iQ7}:eQ8O:gQ8W6bQ8[6kQ8{:mQ8|:oQ8}8SQ9b:rQ9k:sQ:{;ZQ;X;cQ;Y;dQ;e;gR;f;hloOXr!X#`%]&d&f&g&i,],b1b1eQ!dPS#bZ#kQ&n!^U'Y!l4m7UQ'p#OQ(s#xQ)d$jS,U&]&`Q,Y&aQ,h&mQ,m&uQ-P'SQ.a(qQ.q)eQ0P*{Q0g+gQ1],XQ2P-RQ2g.PQ3[.lQ3{/uQ4t0xQ5V1YQ5W1ZQ5Y1[Q5[1^Q5c1gQ5y2jQ6Y3XQ7Y4wQ7g5ZQ7i5]Q7j5^Q7y5}Q8h7ZR8p7h#UcOPXZr!X!^!l#`#k#x%]&]&`&a&d&f&g&i&m&u'S(q*{+g,X,],b-R.P/u0x1Y1Z1[1^1b1e1g2j4m4w5Z5]5^5}7U7Z7hQ#UWQ#aYQ%asQ%btQ%duS's#S'vQ'y#VQ(e#qQ(l#uQ(t#{Q(u#|Q(v#}Q(w$OQ(x$PQ(y$QQ(z$RQ({$SQ(|$TQ(}$UQ)O$VQ)Q$XQ)T$^Q)X$bW)c$j)e.l3XQ*x%cQ+^%pS,s&y1vQ-b'dS-g't-iQ-l'|Q-n(TQ.X(iQ._(mQ.c9lQ.e9oQ.f9pQ.g9qQ.v)pQ/x*sQ1q,nQ1t,qQ2U-ZQ2]-oQ2q.]Q2v9tQ2w9uQ2x9vQ2y9wQ2z9xQ2{9yQ2|9zQ2}9{Q3O9|Q3P9}Q3Q:OQ3R:PQ3S.dQ3V:UQ3W:_Q3]:QQ4O/zQ4V0XQ5i:`Q5o2WQ5t2^Q6Q2rQ6R:aQ6W:cQ6X:jQ7P4kQ7n5gQ7r5pQ7{:kQ8P:pQ8Q:qQ8v7tQ9U8cQ9]8tQ9n#OR;Q;^R#WWR&{!cY!qQ'Q,}0u4pS&w!c,uQ']!oS'g!r!uS'i!v4rS,r&x'PS-^'^'_Q-`'`Q1{,{R2Z-_R(k#tR(n#uQ!dQT,|'Q,}]!nQ!o'Q,}0u4pQ#l]R'Z9mT#gZ%ZS#fZ%ZU%y|},ZU(W#d#e#hS-r(X(YQ-v(ZQ0h+hQ2`-sU2a-t-u-wS5v2b2cR7u5w`#YW#S#V%v't'}+e-mt#cZ|}#d#e#h%Z(X(Y(Z+h-s-t-u-w2b2c5wQ1_,ZQ1r,oQ5e1jQ7m5fT:x&y+fT#]W%vS#[W%vS'u#S'}S'z#V+eS,t&y+fT-h't-mT'O!c%wQ$hfR)j$mT)_$h)`R3Z.kT*O$u*QR*W$xQ/}*zQ2e.OQ4s0wQ5{2iQ7X4vQ7x5zQ8e7WQ8w7wQ9W8gQ9`8yQ9e9XR9h9alpOXr!X#`%]&d&f&g&i,],b1b1eQ&^!TR,Q&ZV%z|},ZR0q+qR,P&XQ%szR+c%tR+X%nT&b!U&eT&c!U&eT1d,b1e",nodeNames:"⚠ ArithOp ArithOp LineComment BlockComment Script ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:364,context:CI,nodeProps:[["group",-26,6,14,16,62,199,203,206,207,209,212,215,225,227,233,235,237,239,242,248,254,256,258,260,262,264,265,"Statement",-32,10,11,25,28,29,35,45,48,49,51,56,64,72,76,78,80,81,103,104,113,114,131,134,136,137,138,139,141,142,162,163,165,"Expression",-23,24,26,30,34,36,38,166,168,170,171,173,174,175,177,178,179,181,182,183,193,195,197,198,"Type",-3,84,96,102,"ClassItem"],["openedBy",31,"InterpolationStart",50,"[",54,"{",69,"(",143,"JSXStartTag",155,"JSXStartTag JSXStartCloseTag"],["closedBy",33,"InterpolationEnd",44,"]",55,"}",70,")",144,"JSXSelfCloseEndTag JSXEndTag",160,"JSXEndTag"]],propSources:[RI],skippedNodes:[0,3,4,268],repeatNodeCount:33,tokenData:"$>y(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tu>PuvBavwDxwxGgxyMvyz! Qz{!![{|!%O|}!&]}!O!%O!O!P!'g!P!Q!1w!Q!R#0t!R![#3T![!]#@T!]!^#Aa!^!_#Bk!_!`#GS!`!a#In!a!b#N{!b!c$$z!c!}>P!}#O$&U#O#P$'`#P#Q$,w#Q#R$.R#R#S>P#S#T$/`#T#o$0j#o#p$4z#p#q$5p#q#r$7Q#r#s$8^#s$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$I|>P$I|$I}$<s$I}$JO$<s$JO$JT>P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(n%d_$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$d&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$d&j'z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU'z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$d&j'wpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU'wpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX'wp'z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z(CS+rq$d&j'wp'z!b'm(;dOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z(CS.ST'x#S$d&j'n(;dO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c(CS.n_$d&j'wp'z!b'n(;dOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`/x`$d&j!l$Ip'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S1V`#q$Id$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S2d_#q$Id$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$2b3l_'v$(n$d&j'z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k*r4r_$d&j'z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k)`5vX$d&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q)`6jT$_#t$d&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#t6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y#t7bO$_#t#t7eP;=`<%l6y)`7kP;=`<%l5q*r7w]$_#t$d&j'z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}%W8uZ'z!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p%W9oU$_#t'z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}%W:UP;=`<%l8p*r:[P;=`<%l4k#%|:hg$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}st%Ztu<Puw%Zwx(rx!^%Z!^!_*g!_!c%Z!c!}<P!}#O%Z#O#P&c#P#R%Z#R#S<P#S#T%Z#T#o<P#o#p*g#p$g%Z$g;'S<P;'S;=`=y<%lO<P#%|<[i$d&j(a!L^'wp'z!bOY%ZYZ&cZr%Zrs&}st%Ztu<Puw%Zwx(rx!Q%Z!Q![<P![!^%Z!^!_*g!_!c%Z!c!}<P!}#O%Z#O#P&c#P#R%Z#R#S<P#S#T%Z#T#o<P#o#p*g#p$g%Z$g;'S<P;'S;=`=y<%lO<P#%|=|P;=`<%l<P(CS>`k$d&j'wp'z!b(U!LY't&;d$W#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P+d@`k$d&j'wp'z!b$W#tOY%ZYZ&cZr%Zrs&}st%Ztu@Tuw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![@T![!^%Z!^!_*g!_!c%Z!c!}@T!}#O%Z#O#P&c#P#R%Z#R#S@T#S#T%Z#T#o@T#o#p*g#p$g%Z$g;'S@T;'S;=`BT<%lO@T+dBWP;=`<%l@T(CSB^P;=`<%l>P%#SBl`$d&j'wp'z!b#i$IdOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Cn!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#SCy_$d&j#{$Id'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%DfETa(j%<v$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sv%ZvwFYwx(rx!^%Z!^!_*g!_!`Cn!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#SFe`$d&j#u$Id'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Cn!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$2bGp_'y$)`$d&j'wpOYHoYZIuZrHorsIuswHowxKVx!^Ho!^!_LX!_#OHo#O#PIu#P#oHo#o#pLX#p;'SHo;'S;=`Mp<%lOHo*QHv_$d&j'wpOYHoYZIuZrHorsIuswHowxKVx!^Ho!^!_LX!_#OHo#O#PIu#P#oHo#o#pLX#p;'SHo;'S;=`Mp<%lOHo)`IzX$d&jOwIuwx6cx!^Iu!^!_Jg!_#oIu#o#pJg#p;'SIu;'S;=`KP<%lOIu#tJjTOwJgwx7]x;'SJg;'S;=`Jy<%lOJg#tJ|P;=`<%lJg)`KSP;=`<%lIu*QK`]$_#t$d&j'wpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(r$fL^Z'wpOYLXYZJgZrLXrsJgswLXwxMPx#OLX#O#PJg#P;'SLX;'S;=`Mj<%lOLX$fMWU$_#t'wpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)r$fMmP;=`<%lLX*QMsP;=`<%lHo(*QNR_!h(!b$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z!'l! ]_!gM|$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'+h!!ib$d&j'wp'z!b'u#)d#j$IdOY%ZYZ&cZr%Zrs&}sw%Zwx(rxz%Zz{!#q{!^%Z!^!_*g!_!`Cn!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S!#|`$d&j'wp'z!b#g$IdOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Cn!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&-O!%Z`$d&j'wp'z!bk&%`OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Cn!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&C[!&h_!V&;l$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(CS!'rc$d&j'wp'z!by'<nOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!(}!P!Q%Z!Q![!+g![!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z!'d!)Wa$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!*]!P!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z!'d!*h_!UMt$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l!+rg$d&j'wp'z!bl$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!+g![!^%Z!^!_*g!_!g%Z!g!h!-Z!h#O%Z#O#P&c#P#R%Z#R#S!+g#S#X%Z#X#Y!-Z#Y#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l!-dg$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx{%Z{|!.{|}%Z}!O!.{!O!Q%Z!Q![!0a![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!0a#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l!/Uc$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!0a![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!0a#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l!0lc$d&j'wp'z!bl$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!0a![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!0a#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(CS!2Sf$d&j'wp'z!b#h$IdOY!3hYZ&cZr!3hrs!4{sw!3hwx!C}xz!3hz{#$s{!P!3h!P!Q#&Y!Q!^!3h!^!_!Mh!_!`#-x!`!a#/_!a!}!3h!}#O##[#O#P!<w#P#o!3h#o#p!Mh#p;'S!3h;'S;=`#$m<%lO!3h(r!3sb$d&j'wp'z!b!RSOY!3hYZ&cZr!3hrs!4{sw!3hwx!C}x!P!3h!P!Q!Kh!Q!^!3h!^!_!Mh!_!}!3h!}#O##[#O#P!<w#P#o!3h#o#p!Mh#p;'S!3h;'S;=`#$m<%lO!3h(Q!5U`$d&j'z!b!RSOY!4{YZ&cZw!4{wx!6Wx!P!4{!P!Q!=o!Q!^!4{!^!_!?g!_!}!4{!}#O!Bn#O#P!<w#P#o!4{#o#p!?g#p;'S!4{;'S;=`!Cw<%lO!4{&n!6_^$d&j!RSOY!6WYZ&cZ!P!6W!P!Q!7Z!Q!^!6W!^!_!8g!_!}!6W!}#O!;U#O#P!<w#P#o!6W#o#p!8g#p;'S!6W;'S;=`!=i<%lO!6W&n!7ba$d&j!RSO!^&c!_#Z&c#Z#[!7Z#[#]&c#]#^!7Z#^#a&c#a#b!7Z#b#g&c#g#h!7Z#h#i&c#i#j!7Z#j#m&c#m#n!7Z#n#o&c#p;'S&c;'S;=`&w<%lO&cS!8lX!RSOY!8gZ!P!8g!P!Q!9X!Q!}!8g!}#O!9p#O#P!:o#P;'S!8g;'S;=`!;O<%lO!8gS!9^U!RS#Z#[!9X#]#^!9X#a#b!9X#g#h!9X#i#j!9X#m#n!9XS!9sVOY!9pZ#O!9p#O#P!:Y#P#Q!8g#Q;'S!9p;'S;=`!:i<%lO!9pS!:]SOY!9pZ;'S!9p;'S;=`!:i<%lO!9pS!:lP;=`<%l!9pS!:rSOY!8gZ;'S!8g;'S;=`!;O<%lO!8gS!;RP;=`<%l!8g&n!;Z[$d&jOY!;UYZ&cZ!^!;U!^!_!9p!_#O!;U#O#P!<P#P#Q!6W#Q#o!;U#o#p!9p#p;'S!;U;'S;=`!<q<%lO!;U&n!<UX$d&jOY!;UYZ&cZ!^!;U!^!_!9p!_#o!;U#o#p!9p#p;'S!;U;'S;=`!<q<%lO!;U&n!<tP;=`<%l!;U&n!<|X$d&jOY!6WYZ&cZ!^!6W!^!_!8g!_#o!6W#o#p!8g#p;'S!6W;'S;=`!=i<%lO!6W&n!=lP;=`<%l!6W(Q!=xi$d&j'z!b!RSOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#Z&}#Z#[!=o#[#]&}#]#^!=o#^#a&}#a#b!=o#b#g&}#g#h!=o#h#i&}#i#j!=o#j#m&}#m#n!=o#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!f!?nZ'z!b!RSOY!?gZw!?gwx!8gx!P!?g!P!Q!@a!Q!}!?g!}#O!Ap#O#P!:o#P;'S!?g;'S;=`!Bh<%lO!?g!f!@hb'z!b!RSOY'}Zw'}x#O'}#P#Z'}#Z#[!@a#[#]'}#]#^!@a#^#a'}#a#b!@a#b#g'}#g#h!@a#h#i'}#i#j!@a#j#m'}#m#n!@a#n;'S'};'S;=`(f<%lO'}!f!AuX'z!bOY!ApZw!Apwx!9px#O!Ap#O#P!:Y#P#Q!?g#Q;'S!Ap;'S;=`!Bb<%lO!Ap!f!BeP;=`<%l!Ap!f!BkP;=`<%l!?g(Q!Bu^$d&j'z!bOY!BnYZ&cZw!Bnwx!;Ux!^!Bn!^!_!Ap!_#O!Bn#O#P!<P#P#Q!4{#Q#o!Bn#o#p!Ap#p;'S!Bn;'S;=`!Cq<%lO!Bn(Q!CtP;=`<%l!Bn(Q!CzP;=`<%l!4{'`!DW`$d&j'wp!RSOY!C}YZ&cZr!C}rs!6Ws!P!C}!P!Q!EY!Q!^!C}!^!_!GQ!_!}!C}!}#O!JX#O#P!<w#P#o!C}#o#p!GQ#p;'S!C};'S;=`!Kb<%lO!C}'`!Eci$d&j'wp!RSOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#Z(r#Z#[!EY#[#](r#]#^!EY#^#a(r#a#b!EY#b#g(r#g#h!EY#h#i(r#i#j!EY#j#m(r#m#n!EY#n#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rt!GXZ'wp!RSOY!GQZr!GQrs!8gs!P!GQ!P!Q!Gz!Q!}!GQ!}#O!IZ#O#P!:o#P;'S!GQ;'S;=`!JR<%lO!GQt!HRb'wp!RSOY)rZr)rs#O)r#P#Z)r#Z#[!Gz#[#])r#]#^!Gz#^#a)r#a#b!Gz#b#g)r#g#h!Gz#h#i)r#i#j!Gz#j#m)r#m#n!Gz#n;'S)r;'S;=`*Z<%lO)rt!I`X'wpOY!IZZr!IZrs!9ps#O!IZ#O#P!:Y#P#Q!GQ#Q;'S!IZ;'S;=`!I{<%lO!IZt!JOP;=`<%l!IZt!JUP;=`<%l!GQ'`!J`^$d&j'wpOY!JXYZ&cZr!JXrs!;Us!^!JX!^!_!IZ!_#O!JX#O#P!<P#P#Q!C}#Q#o!JX#o#p!IZ#p;'S!JX;'S;=`!K[<%lO!JX'`!K_P;=`<%l!JX'`!KeP;=`<%l!C}(r!Ksk$d&j'wp'z!b!RSOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#Z%Z#Z#[!Kh#[#]%Z#]#^!Kh#^#a%Z#a#b!Kh#b#g%Z#g#h!Kh#h#i%Z#i#j!Kh#j#m%Z#m#n!Kh#n#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#W!Mq]'wp'z!b!RSOY!MhZr!Mhrs!?gsw!Mhwx!GQx!P!Mh!P!Q!Nj!Q!}!Mh!}#O#!U#O#P!:o#P;'S!Mh;'S;=`##U<%lO!Mh#W!Nse'wp'z!b!RSOY*gZr*grs'}sw*gwx)rx#O*g#P#Z*g#Z#[!Nj#[#]*g#]#^!Nj#^#a*g#a#b!Nj#b#g*g#g#h!Nj#h#i*g#i#j!Nj#j#m*g#m#n!Nj#n;'S*g;'S;=`+Z<%lO*g#W#!]Z'wp'z!bOY#!UZr#!Urs!Apsw#!Uwx!IZx#O#!U#O#P!:Y#P#Q!Mh#Q;'S#!U;'S;=`##O<%lO#!U#W##RP;=`<%l#!U#W##XP;=`<%l!Mh(r##e`$d&j'wp'z!bOY##[YZ&cZr##[rs!Bnsw##[wx!JXx!^##[!^!_#!U!_#O##[#O#P!<P#P#Q!3h#Q#o##[#o#p#!U#p;'S##[;'S;=`#$g<%lO##[(r#$jP;=`<%l##[(r#$pP;=`<%l!3h(CS#%Qb$d&j'wp'z!b'o(;d!RSOY!3hYZ&cZr!3hrs!4{sw!3hwx!C}x!P!3h!P!Q!Kh!Q!^!3h!^!_!Mh!_!}!3h!}#O##[#O#P!<w#P#o!3h#o#p!Mh#p;'S!3h;'S;=`#$m<%lO!3h(CS#&e_$d&j'wp'z!bR(;dOY#&YYZ&cZr#&Yrs#'dsw#&Ywx#*tx!^#&Y!^!_#,s!_#O#&Y#O#P#(f#P#o#&Y#o#p#,s#p;'S#&Y;'S;=`#-r<%lO#&Y(Bb#'m]$d&j'z!bR(;dOY#'dYZ&cZw#'dwx#(fx!^#'d!^!_#)w!_#O#'d#O#P#(f#P#o#'d#o#p#)w#p;'S#'d;'S;=`#*n<%lO#'d(AO#(mX$d&jR(;dOY#(fYZ&cZ!^#(f!^!_#)Y!_#o#(f#o#p#)Y#p;'S#(f;'S;=`#)q<%lO#(f(;d#)_SR(;dOY#)YZ;'S#)Y;'S;=`#)k<%lO#)Y(;d#)nP;=`<%l#)Y(AO#)tP;=`<%l#(f(<v#*OW'z!bR(;dOY#)wZw#)wwx#)Yx#O#)w#O#P#)Y#P;'S#)w;'S;=`#*h<%lO#)w(<v#*kP;=`<%l#)w(Bb#*qP;=`<%l#'d(Ap#*}]$d&j'wpR(;dOY#*tYZ&cZr#*trs#(fs!^#*t!^!_#+v!_#O#*t#O#P#(f#P#o#*t#o#p#+v#p;'S#*t;'S;=`#,m<%lO#*t(<U#+}W'wpR(;dOY#+vZr#+vrs#)Ys#O#+v#O#P#)Y#P;'S#+v;'S;=`#,g<%lO#+v(<U#,jP;=`<%l#+v(Ap#,pP;=`<%l#*t(=h#,|Y'wp'z!bR(;dOY#,sZr#,srs#)wsw#,swx#+vx#O#,s#O#P#)Y#P;'S#,s;'S;=`#-l<%lO#,s(=h#-oP;=`<%l#,s(CS#-uP;=`<%l#&Y%#W#.Vb$d&j#{$Id'wp'z!b!RSOY!3hYZ&cZr!3hrs!4{sw!3hwx!C}x!P!3h!P!Q!Kh!Q!^!3h!^!_!Mh!_!}!3h!}#O##[#O#P!<w#P#o!3h#o#p!Mh#p;'S!3h;'S;=`#$m<%lO!3h+h#/lb$T#t$d&j'wp'z!b!RSOY!3hYZ&cZr!3hrs!4{sw!3hwx!C}x!P!3h!P!Q!Kh!Q!^!3h!^!_!Mh!_!}!3h!}#O##[#O#P!<w#P#o!3h#o#p!Mh#p;'S!3h;'S;=`#$m<%lO!3h$/l#1Pp$d&j'wp'z!bl$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!+g!P!Q%Z!Q![#3T![!^%Z!^!_*g!_!g%Z!g!h!-Z!h#O%Z#O#P&c#P#R%Z#R#S#3T#S#U%Z#U#V#6_#V#X%Z#X#Y!-Z#Y#b%Z#b#c#5T#c#d#9g#d#l%Z#l#m#<i#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#3`k$d&j'wp'z!bl$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!+g!P!Q%Z!Q![#3T![!^%Z!^!_*g!_!g%Z!g!h!-Z!h#O%Z#O#P&c#P#R%Z#R#S#3T#S#X%Z#X#Y!-Z#Y#b%Z#b#c#5T#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#5`_$d&j'wp'z!bl$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#6hd$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#7v!R!S#7v!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#7v#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#8Rf$d&j'wp'z!bl$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#7v!R!S#7v!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#7v#S#b%Z#b#c#5T#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#9pc$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#:{!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#:{#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#;We$d&j'wp'z!bl$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#:{!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#:{#S#b%Z#b#c#5T#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#<rg$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#>Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#>fi$d&j'wp'z!bl$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#>Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#b%Z#b#c#5T#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%Gh#@b_!a$b$d&j#y%<f'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Al_^l$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(CS#Bz^'}!*v!e'.r'wp'z!b$U)d(nSOY*gZr*grs'}sw*gwx)rx!P*g!P!Q#Cv!Q!^*g!^!_#Dl!_!`#F^!`#O*g#P;'S*g;'S;=`+Z<%lO*g(n#DPX$f&j'wp'z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g$Kh#DuZ#k$Id'wp'z!bOY*gZr*grs'}sw*gwx)rx!_*g!_!`#Eh!`#O*g#P;'S*g;'S;=`+Z<%lO*g$Kh#EqX#{$Id'wp'z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g$Kh#FgX#l$Id'wp'z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g%Gh#G_a#X%?x$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`!a#Hd!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#W#Ho_#d$Ih$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%Gh#I}adBf#l$Id$a#|$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`#KS!`!a#L^!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S#K__#l$Id$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S#Lia#k$Id$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Cn!`!a#Mn!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S#My`#k$Id$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Cn!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'+h$ Wc(b$Ip$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P$!c!P!^%Z!^!_*g!_!a%Z!a!b$#m!b#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'+`$!n_z'#p$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S$#x`$d&j#v$Id'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Cn!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#&^$%V_!x!Ln$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(@^$&a_|(8n$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(n$'eZ$d&jO!^$(W!^!_$(n!_#i$(W#i#j$(s#j#l$(W#l#m$*f#m#o$(W#o#p$(n#p;'S$(W;'S;=`$,q<%lO$(W(n$(_T[#S$d&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#S$(sO[#S(n$(x[$d&jO!Q&c!Q![$)n![!^&c!_!c&c!c!i$)n!i#T&c#T#Z$)n#Z#o&c#o#p$,U#p;'S&c;'S;=`&w<%lO&c(n$)sZ$d&jO!Q&c!Q![$*f![!^&c!_!c&c!c!i$*f!i#T&c#T#Z$*f#Z#o&c#p;'S&c;'S;=`&w<%lO&c(n$*kZ$d&jO!Q&c!Q![$+^![!^&c!_!c&c!c!i$+^!i#T&c#T#Z$+^#Z#o&c#p;'S&c;'S;=`&w<%lO&c(n$+cZ$d&jO!Q&c!Q![$(W![!^&c!_!c&c!c!i$(W!i#T&c#T#Z$(W#Z#o&c#p;'S&c;'S;=`&w<%lO&c#S$,XR!Q![$,b!c!i$,b#T#Z$,b#S$,eS!Q![$,b!c!i$,b#T#Z$,b#q#r$(n(n$,tP;=`<%l$(W!'l$-S_!SM|$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S$.^`#s$Id$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Cn!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&,v$/k_$d&j'wp'z!b(R&%WOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(CS$0yk$d&j'wp'z!b(U!LY't&;d$Y#tOY%ZYZ&cZr%Zrs&}st%Ztu$0juw%Zwx(rx}%Z}!O$2n!O!Q%Z!Q![$0j![!^%Z!^!_*g!_!c%Z!c!}$0j!}#O%Z#O#P&c#P#R%Z#R#S$0j#S#T%Z#T#o$0j#o#p*g#p$g%Z$g;'S$0j;'S;=`$4t<%lO$0j+d$2yk$d&j'wp'z!b$Y#tOY%ZYZ&cZr%Zrs&}st%Ztu$2nuw%Zwx(rx}%Z}!O$2n!O!Q%Z!Q![$2n![!^%Z!^!_*g!_!c%Z!c!}$2n!}#O%Z#O#P&c#P#R%Z#R#S$2n#S#T%Z#T#o$2n#o#p*g#p$g%Z$g;'S$2n;'S;=`$4n<%lO$2n+d$4qP;=`<%l$2n(CS$4wP;=`<%l$0j!5p$5TX!X!3l'wp'z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g%Df$5{a(i%<v$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Cn!`#O%Z#O#P&c#P#o%Z#o#p*g#p#q$#m#q;'S%Z;'S;=`+a<%lO%Z%#`$7__!W$I`o`$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(r$8i_!mS$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(CS$9y|$d&j'wp'z!b'm(;d(U!LY't&;d$W#tOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$JT>P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(CS$=Uk$d&j'wp'z!b'n(;d(U!LY't&;d$W#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P",tokenizers:[$I,PI,2,3,4,5,6,7,8,9,10,11,12,13,MI,new $D.d("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOq~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!O~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(T~~",141,326),new $D.d("j~RQYZXz{^~^O'q~~aP!P!Qd~iO'r~~",25,308)],topRules:{Script:[0,5],SingleExpression:[1,266],SingleClassItem:[2,267]},dialects:{jsx:12686,ts:12688},dynamicPrecedences:{76:1,78:1,163:1,191:1},specialized:[{term:312,get:e=>jI[e]||-1},{term:328,get:e=>NI[e]||-1},{term:67,get:e=>DI[e]||-1}],tokenPrec:12712}),LI=[MN("function ${name}(${params}) {\n\t${}\n}",{label:"function",detail:"definition",type:"keyword"}),MN("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n\t${}\n}",{label:"for",detail:"loop",type:"keyword"}),MN("for (let ${name} of ${collection}) {\n\t${}\n}",{label:"for",detail:"of loop",type:"keyword"}),MN("do {\n\t${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),MN("while (${}) {\n\t${}\n}",{label:"while",detail:"loop",type:"keyword"}),MN("try {\n\t${}\n} catch (${error}) {\n\t${}\n}",{label:"try",detail:"/ catch block",type:"keyword"}),MN("if (${}) {\n\t${}\n}",{label:"if",detail:"block",type:"keyword"}),MN("if (${}) {\n\t${}\n} else {\n\t${}\n}",{label:"if",detail:"/ else block",type:"keyword"}),MN("class ${name} {\n\tconstructor(${params}) {\n\t\t${}\n\t}\n}",{label:"class",detail:"definition",type:"keyword"}),MN('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),MN('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],BI=new tM.f,zI=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function FI(e){return(t,n)=>{let r=t.node.getChild("VariableDefinition");return r&&n(r,e),!0}}const UI=["FunctionDeclaration"],QI={FunctionDeclaration:FI("function"),ClassDeclaration:FI("class"),ClassExpression:()=>!0,EnumDeclaration:FI("constant"),TypeAliasDeclaration:FI("type"),NamespaceDeclaration:FI("namespace"),VariableDefinition(e,t){e.matchContext(UI)||t(e,"variable")},TypeDefinition(e,t){t(e,"type")},__proto__:null};function qI(e,t){let n=BI.get(t);if(n)return n;let r=[],i=!0;function o(t,n){let i=e.sliceString(t.from,t.to);r.push({label:i,type:n})}return t.cursor(tM.b.IncludeAnonymous).iterate(t=>{if(i)i=!1;else if(t.name){let e=QI[t.name];if(e&&e(t,o)||zI.has(t.name))return!1}else if(t.to-t.from>8192){for(let n of qI(e,t.node))r.push(n);return!1}}),BI.set(t,r),r}const GI=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,HI=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName"];function VI(e){let t=NM(e.state).resolveInner(e.pos,-1);if(HI.indexOf(t.name)>-1)return null;let n="VariableName"==t.name||t.to-t.from<20&&GI.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let r=[];for(let n=t;n;n=n.parent)zI.has(n.name)&&(r=r.concat(qI(e.state.doc,n)));return{options:r,from:n?t.from:e.pos,validFor:GI}}const WI=jM.define({name:"javascript",parser:II.configure({props:[JM.add({IfStatement:a$({except:/^\s*({|else\b)/}),TryStatement:a$({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:s$,SwitchBody:e=>{let t=e.textAfter,n=/^\s*\}/.test(t),r=/^\s*(case|default)\b/.test(t);return e.baseIndent+(n?0:r?1:2)*e.unit},Block:i$({closing:"}"}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":a$({except:/^{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag":e=>e.column(e.node.from)+e.unit}),c$.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":u$,BlockComment:e=>({from:e.from+2,to:e.to-2})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),XI={test:e=>/^JSX/.test(e.name),facet:MM({commentTokens:{block:{open:"{/*",close:"*/}"}}})},YI=WI.configure({dialect:"ts"},"typescript"),ZI=WI.configure({dialect:"jsx",props:[$M.add(e=>e.isTop?[XI]:void 0)]}),JI=WI.configure({dialect:"jsx ts",props:[$M.add(e=>e.isTop?[XI]:void 0)]},"typescript"),KI="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(e=>({label:e,type:"keyword"}));function eL(e={}){let t=e.jsx?e.typescript?JI:ZI:e.typescript?YI:WI;return new GM(t,[WI.data.of({autocomplete:(n=HI,r=Ij(LI.concat(KI)),e=>{for(let t=NM(e.state).resolveInner(e.pos,-1);t;t=t.parent){if(n.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return r(e)})}),WI.data.of({autocomplete:VI}),e.jsx?rL:[]]);var n,r}function tL(e,t,n=e.length){for(let r=null==t?void 0:t.firstChild;r;r=r.nextSibling)if("JSXIdentifier"==r.name||"JSXBuiltin"==r.name||"JSXNamespacedName"==r.name||"JSXMemberExpression"==r.name)return e.sliceString(r.from,Math.min(r.to,n));return""}const nL="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),rL=fT.inputHandler.of((e,t,n,r)=>{if((nL?e.composing:e.compositionStarted)||e.state.readOnly||t!=n||">"!=r&&"/"!=r||!WI.isActiveAt(e.state,t,-1))return!1;let{state:i}=e,o=i.changeByRange(e=>{var t;let n,{head:o}=e,s=NM(i).resolveInner(o,-1);if("JSXStartTag"==s.name&&(s=s.parent),"JSXAttributeValue"==s.name&&s.to>o);else{if(">"==r&&"JSXFragmentTag"==s.name)return{range:bw.cursor(o+1),changes:{from:o,insert:"></>"}};if("/"==r&&"JSXFragmentTag"==s.name){let e=s.parent,r=null==e?void 0:e.parent;if(e.from==o-1&&"JSXEndTag"!=(null===(t=r.lastChild)||void 0===t?void 0:t.name)&&(n=tL(i.doc,null==r?void 0:r.firstChild,o))){let e=`/${n}>`;return{range:bw.cursor(o+e.length),changes:{from:o,insert:e}}}}else if(">"==r){let e=function(e){for(;;){if("JSXOpenTag"==e.name||"JSXSelfClosingTag"==e.name||"JSXFragmentTag"==e.name)return e;if("JSXEscape"==e.name||!e.parent)return null;e=e.parent}}(s);if(e&&(!(a=e.lastChild)||"JSXEndTag"!=a.name&&"JSXSelfCloseEndTag"!=a.name)&&"</"!=i.sliceDoc(o,o+2)&&(n=tL(i.doc,e,o)))return{range:bw.cursor(o+1),changes:{from:o,insert:`></${n}>`}}}}var a;return{range:e}});return!o.changes.empty&&(e.dispatch(o,{userEvent:"input.type",scrollIntoView:!0}),!0)});const iL=["_blank","_self","_top","_parent"],oL=["ascii","utf-8","utf-16","latin1","latin1"],sL=["get","post","put","delete"],aL=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],lL=["true","false"],cL={},uL={a:{attrs:{href:null,ping:null,type:null,media:null,target:iL,hreflang:null}},abbr:cL,address:cL,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:cL,aside:cL,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:cL,base:{attrs:{href:null,target:iL}},bdi:cL,bdo:cL,blockquote:{attrs:{cite:null}},body:cL,br:cL,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:aL,formmethod:sL,formnovalidate:["novalidate"],formtarget:iL,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:cL,center:cL,cite:cL,code:cL,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:cL,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:cL,div:cL,dl:cL,dt:cL,em:cL,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:cL,figure:cL,footer:cL,form:{attrs:{action:null,name:null,"accept-charset":oL,autocomplete:["on","off"],enctype:aL,method:sL,novalidate:["novalidate"],target:iL}},h1:cL,h2:cL,h3:cL,h4:cL,h5:cL,h6:cL,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:cL,hgroup:cL,hr:cL,html:{attrs:{manifest:null}},i:cL,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:aL,formmethod:sL,formnovalidate:["novalidate"],formtarget:iL,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:cL,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:cL,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:cL,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:oL,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:cL,noscript:cL,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:cL,param:{attrs:{name:null,value:null}},pre:cL,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:cL,rt:cL,ruby:cL,samp:cL,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:oL}},section:cL,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:cL,source:{attrs:{src:null,type:null,media:null}},span:cL,strong:cL,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:cL,summary:cL,sup:cL,table:cL,tbody:cL,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:cL,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:cL,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:cL,time:{attrs:{datetime:null}},title:cL,tr:cL,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:cL,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:cL},dL={accesskey:null,class:null,contenteditable:lL,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:lL,autocorrect:lL,autocapitalize:lL,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":lL,"aria-autocomplete":["inline","list","both","none"],"aria-busy":lL,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":lL,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":lL,"aria-hidden":lL,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":lL,"aria-multiselectable":lL,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":lL,"aria-relevant":null,"aria-required":lL,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},hL="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(e=>"on"+e);for(let e of hL)dL[e]=null;class pL{constructor(e,t){this.tags=Object.assign(Object.assign({},uL),e),this.globalAttrs=Object.assign(Object.assign({},dL),t),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}function fL(e,t,n=e.length){if(!t)return"";let r=t.firstChild,i=r&&r.getChild("TagName");return i?e.sliceString(i.from,Math.min(i.to,n)):""}function mL(e,t=!1){for(let n=e.parent;n;n=n.parent)if("Element"==n.name){if(!t)return n;t=!1}return null}function gL(e,t,n){let r=n.tags[fL(e,mL(t,!0))];return(null==r?void 0:r.children)||n.allTags}function bL(e,t){let n=[];for(let r=t;r=mL(r);){let i=fL(e,r);if(i&&"CloseTag"==r.lastChild.name)break;i&&n.indexOf(i)<0&&("EndTag"==t.name||t.from>=r.firstChild.to)&&n.push(i)}return n}pL.default=new pL;const vL=/^[:\-\.\w\u00b7-\uffff]*$/;function yL(e,t,n,r,i){let o=/\s*>/.test(e.sliceDoc(i,i+5))?"":">";return{from:r,to:i,options:gL(e.doc,n,t).map(e=>({label:e,type:"type"})).concat(bL(e.doc,n).map((e,t)=>({label:"/"+e,apply:"/"+e+o,type:"type",boost:99-t}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function SL(e,t,n,r){let i=/\s*>/.test(e.sliceDoc(r,r+5))?"":">";return{from:n,to:r,options:bL(e.doc,t).map((e,t)=>({label:e,apply:e+i,type:"type",boost:99-t})),validFor:vL}}function _L(e,t){let{state:n,pos:r}=t,i=NM(n).resolveInner(r),o=i.resolve(r,-1);for(let e,t=r;i==o&&(e=o.childBefore(t));){let n=e.lastChild;if(!n||!n.type.isError||n.from<n.to)break;i=o=e,t=n.from}return"TagName"==o.name?o.parent&&/CloseTag$/.test(o.parent.name)?SL(n,o,o.from,r):yL(n,e,o,o.from,r):"StartTag"==o.name?yL(n,e,o,r,r):"StartCloseTag"==o.name||"IncompleteCloseTag"==o.name?SL(n,o,r,r):t.explicit&&("OpenTag"==o.name||"SelfClosingTag"==o.name)||"AttributeName"==o.name?function(e,t,n,r,i){let o=mL(n),s=o?t.tags[fL(e.doc,o)]:null,a=s&&s.attrs?Object.keys(s.attrs):[];return{from:r,to:i,options:(s&&!1===s.globalAttrs?a:a.length?a.concat(t.globalAttrNames):t.globalAttrNames).map(e=>({label:e,type:"property"})),validFor:vL}}(n,e,o,"AttributeName"==o.name?o.from:r,r):"Is"==o.name||"AttributeValue"==o.name||"UnquotedAttributeValue"==o.name?function(e,t,n,r,i){var o;let s=null===(o=n.parent)||void 0===o?void 0:o.getChild("AttributeName"),a=[],l=void 0;if(s){let o=e.sliceDoc(s.from,s.to),c=t.globalAttrs[o];if(!c){let r=mL(n),i=r?t.tags[fL(e.doc,r)]:null;c=(null==i?void 0:i.attrs)&&i.attrs[o]}if(c){let t=e.sliceDoc(r,i).toLowerCase(),n='"',o='"';/^['"]/.test(t)?(l='"'==t[0]?/^[^"]*$/:/^[^']*$/,n="",o=e.sliceDoc(i,i+1)==t[0]?"":t[0],t=t.slice(1),r++):l=/^[^\s<>='"]*$/;for(let e of c)a.push({label:e,apply:n+e+o,type:"constant"})}}return{from:r,to:i,options:a,validFor:l}}(n,e,o,"Is"==o.name?r:o.from,r):!t.explicit||"Element"!=i.name&&"Text"!=i.name&&"Document"!=i.name?null:function(e,t,n,r){let i=[],o=0;for(let r of gL(e.doc,n,t))i.push({label:"<"+r,type:"type"});for(let t of bL(e.doc,n))i.push({label:"</"+t+">",type:"type",boost:99-o++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}(n,e,o,r)}function xL(e){let{extraTags:t,extraGlobalAttributes:n}=e,r=n||t?new pL(t,n):pL.default;return e=>_L(r,e)}const wL=[{tag:"script",attrs:e=>"text/typescript"==e.type||"ts"==e.lang,parser:YI.parser},{tag:"script",attrs:e=>"text/babel"==e.type||"text/jsx"==e.type,parser:ZI.parser},{tag:"script",attrs:e=>"text/typescript-jsx"==e.type,parser:JI.parser},{tag:"script",attrs:e=>!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type),parser:WI.parser},{tag:"style",attrs:e=>(!e.lang||"css"==e.lang)&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type)),parser:EI.parser}],kL=[{name:"style",parser:EI.parser.configure({top:"Styles"})}].concat(hL.map(e=>({name:e,parser:WI.parser}))),OL=jM.define({name:"html",parser:KD.configure({props:[JM.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag":e=>e.column(e.node.from)+e.unit,Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let t,n=null;for(let t=e.node;;){let e=t.lastChild;if(!e||"Element"!=e.name||e.to!=t.to)break;n=t=e}return n&&(!(t=n.lastChild)||"CloseTag"!=t.name&&"SelfClosingTag"!=t.name)?e.lineIndent(n.from)+e.unit:null}}),c$.add({Element(e){let t=e.firstChild,n=e.lastChild;return t&&"OpenTag"==t.name?{from:t.to,to:"CloseTag"==n.name?n.from:e.to}:null}}),H$.add({"OpenTag CloseTag":e=>e.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"\x3c!--",close:"--\x3e"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),EL=OL.configure({wrap:rI(wL,kL)});function AL(e={}){let t,n="";!1===e.matchClosingTags&&(n="noMatch"),!0===e.selfClosingTags&&(n=(n?n+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(t=rI((e.nestedLanguages||[]).concat(wL),(e.nestedAttributes||[]).concat(kL)));let r=t?OL.configure({wrap:t,dialect:n}):n?EL.configure({dialect:n}):EL;return new GM(r,[EL.data.of({autocomplete:xL(e)}),!1!==e.autoCloseTags?CL:[],eL().support,AI().support])}const TL=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),CL=fT.inputHandler.of((e,t,n,r)=>{if(e.composing||e.state.readOnly||t!=n||">"!=r&&"/"!=r||!EL.isActiveAt(e.state,t,-1))return!1;let{state:i}=e,o=i.changeByRange(t=>{var n,o,s;let a,{head:l}=t,c=NM(i).resolveInner(l,-1);if("TagName"!=c.name&&"StartTag"!=c.name||(c=c.parent),">"==r&&"OpenTag"==c.name){if("CloseTag"!=(null===(o=null===(n=c.parent)||void 0===n?void 0:n.lastChild)||void 0===o?void 0:o.name)&&(a=fL(i.doc,c.parent,l))&&!TL.has(a)){let t=">"===e.state.doc.sliceString(l,l+1),n=`${t?"":">"}</${a}>`;return{range:bw.cursor(l+1),changes:{from:l+(t?1:0),insert:n}}}}else if("/"==r&&"OpenTag"==c.name){let t=c.parent,n=null==t?void 0:t.parent;if(t.from==l-1&&"CloseTag"!=(null===(s=n.lastChild)||void 0===s?void 0:s.name)&&(a=fL(i.doc,n,l))&&!TL.has(a)){let t=">"===e.state.doc.sliceString(l,l+1),n=`/${a}${t?"":">"}`,r=l+n.length+(t?1:0);return{range:bw.cursor(r),changes:{from:l,insert:n}}}}return{range:t}});return!o.changes.empty&&(e.dispatch(o,{userEvent:"input.type",scrollIntoView:!0}),!0)}),ML=new Set([27,51,52,270,67,133,58,59,251,64,65,74,62,63,154,155,158,115]);function $L(e){return 10==e||13==e}const PL=new $D.b((e,t)=>{let n;if(e.next<0)e.acceptToken(206);else if(t.context.depth<0)$L(e.next)&&e.acceptToken(205,1);else if(((n=e.peek(-1))<0||$L(n))&&t.canShift(204)){let t=0;for(;32==e.next||9==e.next;)e.advance(),t++;10!=e.next&&13!=e.next&&35!=e.next||e.acceptToken(204,-t)}else $L(e.next)&&e.acceptToken(203,1)},{contextual:!0}),RL=new $D.b((e,t)=>{let n=t.context.depth;if(n<0)return;let r=e.peek(-1);if(10==r||13==r){let t=0,r=0;for(;;){if(32==e.next)t++;else{if(9!=e.next)break;t+=8-t%8}e.advance(),r++}t!=n&&10!=e.next&&13!=e.next&&35!=e.next&&(t<n?e.acceptToken(202,-r):e.acceptToken(201))}});function jL(e,t){this.parent=e,this.depth=t,this.hash=(e?e.hash+e.hash<<8:0)+t+(t<<4)}const NL=new jL(null,0);const DL=new $D.a({start:NL,reduce:(e,t)=>e.depth<0&&ML.has(t)?e.parent:e,shift:(e,t,n,r)=>201==t?new jL(e,function(e){let t=0;for(let n=0;n<e.length;n++)t+=9==e.charCodeAt(n)?8-t%8:1;return t}(r.read(r.pos,n.pos))):202==t?e.parent:26==t||57==t||61==t?new jL(e,-1):e,hash:e=>e.hash}),IL=new $D.b(e=>{for(let t=0;t<5;t++){if(e.next!="print".charCodeAt(t))return;e.advance()}if(!/\w/.test(String.fromCharCode(e.next)))for(let t=0;;t++){let n=e.peek(t);if(32!=n&&9!=n)return void(40!=n&&46!=n&&10!=n&&13!=n&&35!=n&&e.acceptToken(1))}});function LL(e,t,n,r,i){return new $D.b(o=>{let s=o.pos;for(;!(o.next<0);)if(123==o.next){if(123!=o.peek(1)){if(o.pos==s)return void o.acceptToken(r,1);break}o.advance(2)}else if(92==o.next)o.advance(),o.next>=0&&o.advance();else{if(o.next==e&&(1==t||o.peek(1)==e&&o.peek(2)==e)){if(o.pos==s)return void o.acceptToken(i,t);break}o.advance()}o.pos>s&&o.acceptToken(n)})}const BL=LL(39,1,207,2,208),zL=LL(34,1,209,3,210),FL=LL(39,3,211,4,212),UL=LL(34,3,213,5,214),QL=sM({'async "*" "**" FormatConversion FormatSpec':AM.modifier,"for while if elif else try except finally return raise break continue with pass assert await yield match case":AM.controlKeyword,"in not and or is del":AM.operatorKeyword,"from def class global nonlocal lambda":AM.definitionKeyword,import:AM.moduleKeyword,"with as print":AM.keyword,Boolean:AM.bool,None:AM.null,VariableName:AM.variableName,"CallExpression/VariableName":AM.function(AM.variableName),"FunctionDefinition/VariableName":AM.function(AM.definition(AM.variableName)),"ClassDefinition/VariableName":AM.definition(AM.className),PropertyName:AM.propertyName,"CallExpression/MemberExpression/PropertyName":AM.function(AM.propertyName),Comment:AM.lineComment,Number:AM.number,String:AM.string,FormatString:AM.special(AM.string),UpdateOp:AM.updateOperator,"ArithOp!":AM.arithmeticOperator,BitOp:AM.bitwiseOperator,CompareOp:AM.compareOperator,AssignOp:AM.definitionOperator,Ellipsis:AM.punctuation,At:AM.meta,"( )":AM.paren,"[ ]":AM.squareBracket,"{ }":AM.brace,".":AM.derefOperator,", ;":AM.separator}),qL={__proto__:null,await:48,or:58,and:60,in:64,not:66,is:68,if:74,else:76,lambda:80,yield:98,from:100,async:106,for:108,None:168,True:170,False:170,del:184,pass:188,break:192,continue:196,return:200,raise:208,import:212,as:214,global:218,nonlocal:220,assert:224,type:229,elif:242,while:246,try:252,except:254,finally:256,with:260,def:264,class:274,match:285,case:291},GL=$D.c.deserialize({version:14,states:"#&jO`Q#yOOP$bOSOOO%kQ&nO'#HcOOQS'#Cq'#CqOOQS'#Cr'#CrO'ZQ#xO'#CpO(|Q&nO'#HbOOQS'#Hc'#HcOOQS'#DW'#DWOOQS'#Hb'#HbO)jQ#xO'#DaO)}Q#xO'#DhO*_Q#xO'#DlOOQS'#Dw'#DwO*rO,UO'#DwO*zO7[O'#DwO+SOWO'#DxO+_O`O'#DxO+jOpO'#DxO+uO!bO'#DxO-wQ&nO'#HSOOQS'#HS'#HSO'ZQ#xO'#HRO/ZQ&nO'#HROOQS'#Ee'#EeO/rQ#xO'#EfOOQS'#HQ'#HQO/|Q#xO'#HPOOQV'#HP'#HPO0XQ#xO'#F]OOQS'#Ge'#GeO0^Q#xO'#F[OOQV'#IY'#IYOOQV'#HO'#HOOOQV'#Ft'#FtQ`Q#yOOO'ZQ#xO'#CsO0lQ#xO'#DPO0sQ#xO'#DTO1RQ#xO'#HgO1cQ&nO'#EYO'ZQ#xO'#EZOOQS'#E]'#E]OOQS'#E_'#E_OOQS'#Ea'#EaO1wQ#xO'#EcO2_Q#xO'#EgO0XQ#xO'#EiO2rQ&nO'#EiO0XQ#xO'#ElO/rQ#xO'#EoO0XQ#xO'#EqO/rQ#xO'#EwO/rQ#xO'#EzO2}Q#xO'#E|O3UQ#xO'#FRO3aQ#xO'#E}O/rQ#xO'#FRO0XQ#xO'#FTO0XQ#xO'#FYO3fQ#xO'#F_P3mO#xO'#G}POOO)CBq)CBqOOQS'#Cg'#CgOOQS'#Ch'#ChOOQS'#Ci'#CiOOQS'#Cj'#CjOOQS'#Ck'#CkOOQS'#Cl'#ClOOQS'#Cn'#CnO'ZQ#xO,59QO'ZQ#xO,59QO'ZQ#xO,59QO'ZQ#xO,59QO'ZQ#xO,59QO'ZQ#xO,59QO3xQ#xO'#DqOOQS,5:[,5:[O4]Q#xO'#HqOOQS,5:_,5:_O4jQMlO,5:_O4oQ&nO,59[O0lQ#xO,59dO0lQ#xO,59dO0lQ#xO,59dO7_Q#xO,59dO7dQ#xO,59dO7kQ#xO,59lO7rQ#xO'#HbO8xQ#xO'#HaOOQS'#Ha'#HaOOQS'#D^'#D^O9aQ#xO,59cO'ZQ#xO,59cO9oQ#xO,59cOOQS,59{,59{O9tQ#xO,5:TO'ZQ#xO,5:TOOQS,5:S,5:SO:SQ#xO,5:SO:XQ#xO,5:ZO'ZQ#xO,5:ZO'ZQ#xO,5:XOOQS,5:W,5:WO:jQ#xO,5:WO:oQ#xO,5:YOOOO'#F|'#F|O:tO,UO,5:cOOQS,5:c,5:cOOOO'#F}'#F}O:|O7[O,5:cO;UQ#xO'#DyOOOW'#GO'#GOO;fOWO,5:dOOQS,5:d,5:dO;UQ#xO'#D}OOO`'#GR'#GRO;qO`O,5:dO;UQ#xO'#EOOOOp'#GS'#GSO;|OpO,5:dO;UQ#xO'#EPOOO!b'#GT'#GTO<XO!bO,5:dOOQS'#GU'#GUO<dQ&nO,5:lO?UQ&nO,5=mO?oQ!LUO,5=mO@`Q&nO,5=mOOQS,5;Q,5;QO@wQ#yO'#G_OBZQ#xO,5;aOOQV,5=k,5=kOBfQ&nO'#ITOB}Q#xO,5;wOOQS-E:c-E:cOOQV,5;v,5;vO3[Q#xO'#FTOOQV-E9r-E9rOCVQ&nO,59_OE^Q&nO,59kOEwQ#xO'#HdOFSQ#xO'#HdO0XQ#xO'#HdOF_Q#xO'#DVOFgQ#xO,59oOFlQ#xO'#HhO'ZQ#xO'#HhO/rQ#xO,5>ROOQS,5>R,5>RO/rQ#xO'#EUOOQS'#EV'#EVOGZQ#xO'#GWOGkQ#xO,59OOGkQ#xO,59OO)pQ#xO,5:rOGyQ&nO'#HjOOQS,5:u,5:uOOQS,5:},5:}OH^Q#xO,5;ROHoQ#xO,5;TOOQS'#GZ'#GZOH}Q&nO,5;TOI]Q#xO,5;TOIbQ#xO'#IWOOQS,5;W,5;WOIpQ#xO'#ISOOQS,5;Z,5;ZOJRQ#xO,5;]O3aQ#xO,5;cO3aQ#xO,5;fOJZQ&nO'#IZO'ZQ#xO'#IZOJeQ#xO,5;hO2}Q#xO,5;hO/rQ#xO,5;mO0XQ#xO,5;oOJjQ#yO'#ExOKvQ#{O,5;iO! [Q#xO'#I[O3aQ#xO,5;mO! gQ#xO,5;oO! oQ#xO,5;tO! zQ&nO,5;yO'ZQ#xO,5;yPOOO,5=i,5=iP!!ROSO,5=iP!!WO#xO,5=iO!${Q&nO1G.lO!%SQ&nO1G.lO!'sQ&nO1G.lO!'}Q&nO1G.lO!*hQ&nO1G.lO!*{Q&nO1G.lO!+`Q#xO'#HpO!+nQ&nO'#HSO/rQ#xO'#HpO!+xQ#xO'#HoOOQS,5:],5:]O!,QQ#xO,5:]O!,VQ#xO'#HrO!,bQ#xO'#HrO!,uQ#xO,5>]OOQS'#Du'#DuOOQS1G/y1G/yOOQS1G/O1G/OO!-uQ&nO1G/OO!-|Q&nO1G/OO0lQ#xO1G/OO!.iQ#xO1G/WOOQS'#D]'#D]O/rQ#xO,59vOOQS1G.}1G.}O!.pQ#xO1G/gO!/QQ#xO1G/gO!/YQ#xO1G/hO'ZQ#xO'#HiO!/_Q#xO'#HiO!/dQ&nO1G.}O!/tQ#xO,59kO!0zQ#xO,5>XO!1[Q#xO,5>XO!1dQ#xO1G/oO!1iQ&nO1G/oOOQS1G/n1G/nO!1yQ#xO,5>SO!2pQ#xO,5>SO/rQ#xO1G/sO!3_Q#xO1G/uO!3dQ&nO1G/uO!3tQ&nO1G/sOOQS1G/r1G/rOOQS1G/t1G/tOOOO-E9z-E9zOOQS1G/}1G/}OOOO-E9{-E9{O!4UQ#xO'#H|O/rQ#xO'#H|O!4dQ#xO,5:eOOOW-E9|-E9|OOQS1G0O1G0OO!4oQ#xO,5:iOOO`-E:P-E:PO!4zQ#xO,5:jOOOp-E:Q-E:QO!5VQ#xO,5:kOOO!b-E:R-E:ROOQS-E:S-E:SO!5bQ!LUO1G3XO!6RQ&nO1G3XO'ZQ#xO,5<qOOQS,5<q,5<qOOQS-E:T-E:TOOQS,5<y,5<yOOQS-E:]-E:]OOQV1G0{1G0{O0XQ#xO'#GYO!6jQ&nO,5>oOOQS1G1c1G1cO!7RQ#xO1G1cOOQS'#DX'#DXO/rQ#xO,5>OOOQS,5>O,5>OO!7WQ#xO'#FuO!7cQ#xO,59qO!7kQ#xO1G/ZO!7uQ&nO,5>SOOQS1G3m1G3mOOQS,5:p,5:pO!8fQ#xO'#HROOQS,5<r,5<rOOQS-E:U-E:UO!8wQ#xO1G.jOOQS1G0^1G0^O!9VQ#xO,5>UO!9gQ#xO,5>UO/rQ#xO1G0mO/rQ#xO1G0mO0XQ#xO1G0oOOQS-E:X-E:XO!9xQ#xO1G0oO!:TQ#xO1G0oO!:YQ#xO,5>rO!:hQ#xO,5>rO!:vQ#xO,5>nO!;^Q#xO,5>nO!;oQ#xO'#EsO/rQ#xO1G0wO!;zQ#xO1G0wO!<PQ#{O1G0}O!?bQ#{O1G1QO!BpQ#xO,5>uO!BzQ#xO,5>uO!CSQ&nO,5>uO/rQ#xO1G1SO!C^Q#xO1G1SO3aQ#xO1G1XO! gQ#xO1G1ZOOQV,5;d,5;dO!CcQ#zO,5;dO!ChQ#{O1G1TO!F|Q#xO'#GbO3aQ#xO1G1TO3aQ#xO1G1TO!G^Q#xO,5>vO!GkQ#xO,5>vO0XQ#xO,5>vOOQV1G1X1G1XO!GsQ#xO'#FVO!HUQMlO1G1ZO!H^Q#xO1G1ZOOQV1G1`1G1`O3aQ#xO1G1`O!HcQ#xO1G1`O!HkQ#xO'#FaOOQV1G1e1G1eO! zQ&nO1G1ePOOO1G3T1G3TP!HpOSO1G3TOOQS,5>[,5>[OOQS'#Dr'#DrO/rQ#xO,5>[O!HuQ#xO,5>ZO!IYQ#xO,5>ZOOQS1G/w1G/wO!IbQ#xO,5>^O!IrQ#xO,5>^O!IzQ#xO,5>^O!J_Q#xO,5>^O!JoQ#xO,5>^OOQS1G3w1G3wOOQS7+$j7+$jO!7kQ#xO7+$rO!LbQ#xO1G/OO!LiQ#xO1G/OOOQS1G/b1G/bOOQS,5<c,5<cO'ZQ#xO,5<cOOQS7+%R7+%RO!LpQ#xO7+%ROOQS-E9u-E9uOOQS7+%S7+%SO!MQQ#xO,5>TO'ZQ#xO,5>TOOQS7+$i7+$iO!MVQ#xO7+%RO!M_Q#xO7+%SO!MdQ#xO1G3sOOQS7+%Z7+%ZO!MtQ#xO1G3sO!M|Q#xO7+%ZOOQS,5<b,5<bO'ZQ#xO,5<bO!NRQ#xO1G3nOOQS-E9t-E9tO!NxQ#xO7+%_OOQS7+%a7+%aO# WQ#xO1G3nO# uQ#xO7+%aO# zQ#xO1G3tO#![Q#xO1G3tO#!dQ#xO7+%_O#!iQ#xO,5>hO##PQ#xO,5>hO##PQ#xO,5>hO##_O$ISO'#D{O##jO#tO'#H}OOOW1G0P1G0PO##oQ#xO1G0POOO`1G0T1G0TO##wQ#xO1G0TOOOp1G0U1G0UO#$PQ#xO1G0UOOO!b1G0V1G0VO#$XQ#xO1G0VO#$aQ!LUO7+(sO#%QQ&nO1G2]P#%kQ#xO'#GVOOQS,5<t,5<tOOQS-E:W-E:WOOQS7+&}7+&}OOQS1G3j1G3jOOQS,5<a,5<aOOQS-E9s-E9sOOQS7+$u7+$uO#%xQ#xO,5=mO#&cQ#xO,5=mO#&tQ&nO,5<dO#'XQ#xO1G3pOOQS-E9v-E9vOOQS7+&X7+&XO#'iQ#xO7+&XOOQS7+&Z7+&ZO#'wQ#xO'#IVO0XQ#xO'#IUO#(]Q#xO7+&ZOOQS,5<w,5<wO#(hQ#xO1G4^OOQS-E:Z-E:ZOOQS,5<s,5<sO#(vQ#xO1G4YOOQS-E:V-E:VO0XQ#xO'#EtO#)^Q#xO'#EtO#)iQ#xO'#IXO#)qQ#xO,5;_OOQS7+&c7+&cO/rQ#xO7+&cO#)vQ#{O7+&iO!GPQ#xO'#G`O3aQ#xO7+&iO3aQ#xO7+&lO#-XQ&nO,5<{O'ZQ#xO,5<{O#-cQ#xO1G4aOOQS-E:_-E:_O#-mQ#xO1G4aO3aQ#xO7+&nO/rQ#xO7+&nOOQV7+&s7+&sO!HUQMlO7+&uO!H^Q#xO7+&uO`Q#yO1G1OOOQV-E:`-E:`O3aQ#xO7+&oO3aQ#xO7+&oOOQV,5<|,5<|O#-uQ#xO,5<|O!GPQ#xO,5<|OOQV7+&o7+&oO#.QQ#{O7+&oO#1`Q#xO,5<}O#1kQ#xO1G4bOOQS-E:a-E:aO#1xQ#xO1G4bO#2QQ#xO'#I^O#2`Q#xO'#I^O0XQ#xO'#I^OOQS'#I^'#I^O#2kQ#xO'#I]OOQS,5;q,5;qO#2sQ#xO,5;qO/rQ#xO'#FXOOQV7+&u7+&uO3aQ#xO7+&uOOQV7+&z7+&zO3aQ#xO7+&zO#2xQ#zO,5;{OOQV7+'P7+'PPOOO7+(o7+(oO#2}Q#xO1G3vOOQS,5<f,5<fO#3]Q#xO1G3uOOQS-E9x-E9xO#3pQ#xO,5<gO#3{Q#xO,5<gO#4`Q#xO1G3xOOQS-E9y-E9yO#4pQ#xO1G3xO#4xQ#xO1G3xO#5YQ#xO1G3xO#4pQ#xO1G3xOOQS<<H^<<H^O#5eQ&nO1G1}OOQS<<Hm<<HmP#5rQ#xO'#FwO7kQ#xO1G3oO#6PQ#xO1G3oO#6UQ#xO<<HmOOQS<<Hn<<HnO#6fQ#xO7+)_OOQS<<Hu<<HuO#6vQ&nO1G1|P#7gQ#xO'#FvO#7tQ#xO7+)`O#8UQ#xO7+)`O#8^Q#xO<<HyO#8cQ#xO7+)YOOQS<<H{<<H{O#9YQ#xO,5<eO'ZQ#xO,5<eOOQS-E9w-E9wOOQS<<Hy<<HyOOQS,5<k,5<kO/rQ#xO,5<kO#9_Q#xO1G4SOOQS-E9}-E9}O#9uQ#xO1G4SO;UQ#xO'#D|OOOO'#GQ'#GQO#:TO$ISO,5:gOOO#l,5>i,5>iOOOW7+%k7+%kOOO`7+%o7+%oOOOp7+%p7+%pOOO!b7+%q7+%qO#:`Q#xO1G3XO#:yQ#xO1G3XP'ZQ#xO'#FxO/rQ#xO<<IsO#;[Q#xO,5>qO#;mQ#xO,5>qO0XQ#xO,5>qO#<OQ#xO,5>pOOQS<<Iu<<IuP0XQ#xO'#G]P/rQ#xO'#GXOOQS,5;`,5;`O#<TQ#xO,5>sO#<cQ#xO,5>sOOQS1G0y1G0yOOQS<<I}<<I}OOQV-E:^-E:^O3aQ#xO<<JTOOQV,5<z,5<zO3aQ#xO,5<zOOQV<<JT<<JTOOQV<<JW<<JWO#<kQ&nO1G2gP#<uQ#xO'#GaO#<|Q#xO7+){O#=WQ#{O<<JYO3aQ#xO<<JYOOQV<<Ja<<JaO3aQ#xO<<JaO!HUQMlO<<JaO#@fQ#{O7+&jOOQV<<JZ<<JZO#@pQ#{O<<JZOOQV1G2h1G2hO0XQ#xO1G2hO#DOQ#xO1G2hO3aQ#xO<<JZO0XQ#xO1G2iP/rQ#xO'#GcO#DZQ#xO7+)|O#DhQ#xO7+)|OOQS'#FW'#FWO/rQ#xO,5>xO#DpQ#xO,5>xOOQS,5>x,5>xO#D{Q#xO,5>wO#E^Q#xO,5>wOOQS1G1]1G1]OOQS,5;s,5;sOOQV<<Jf<<JfO#EfQ#xO1G1gOOQS7+)b7+)bP#EkQ#xO'#FzO#E{Q#xO1G2RO#F`Q#xO1G2RO#FpQ#xO1G2RP#F{Q#xO'#F{O#GYQ#xO7+)dO#GjQ#xO7+)dO#GjQ#xO7+)dO#GrQ#xO7+)dO#HSQ#xO7+)ZO7kQ#xO7+)ZOOQSAN>XAN>XO#HmQ#xO<<LzOOQSAN>eAN>eO/rQ#xO1G2PO#H}Q&nO1G2PP#IXQ#xO'#FyOOQS1G2V1G2VP#IfQ#xO'#GPO#IsQ#xO7+)nO#JZQ#xO,5:hOOOO-E:O-E:OO#JfQ#xO7+(sOOQSAN?_AN?_O#KPQ#xO,5<vO#KeQ#xO1G4]OOQS-E:Y-E:YO#KvQ#xO1G4]OOQS1G4[1G4[OOQS,5<x,5<xO#LXQ#xO1G4_OOQS-E:[-E:[OOQVAN?oAN?oOOQV1G2f1G2fO3aQ#xOAN?tO#LgQ#{OAN?tOOQVAN?{AN?{O3aQ#xOAN?{OOQV<<JU<<JUO3aQ#xOAN?uO3aQ#xO7+(SOOQV7+(S7+(SO0XQ#xO7+(SOOQVAN?uAN?uOOQS7+(T7+(TO$ uQ#xO<<MhOOQS1G4d1G4dO/rQ#xO1G4dOOQS,5=O,5=OO$!SQ#xO1G4cOOQS-E:b-E:bOOQU'#Gf'#GfO$!eQ#zO7+'RO$!pQ#xO'#FbO$#hQ#xO7+'mO$#xQ#xO7+'mOOQS7+'m7+'mO$$TQ#xO<<MOO$$eQ#xO<<MOO$$eQ#xO<<MOO$$mQ#xO'#HkOOQS<<Lu<<LuO$$wQ#xO<<LuOOQS7+'k7+'kOOOO1G0S1G0SO$%bQ#xO1G0SO0XQ#xO1G2bP0XQ#xO'#G[O$%jQ#xO7+)wO$%{Q#xO7+)wP!;oQ#xO'#G^OOQVG25`G25`O3aQ#xOG25`OOQVG25gG25gOOQVG25aG25aOOQV<<Kn<<KnO3aQ#xO<<KnOOQS7+*O7+*OP$&^Q#xO'#GdOOQU-E:d-E:dOOQV<<Jm<<JmO$'QQ&nO'#FdOOQS'#Ff'#FfO$'bQ#xO'#FeO$(SQ#xO'#FeOOQS'#Fe'#FeO$(XQ#xO'#I`O$!pQ#xO'#FlO$!pQ#xO'#FlO$(pQ#xO'#FmO$!pQ#xO'#FnO$(wQ#xO'#IaOOQS'#Ia'#IaO$)fQ#xO,5;|OOQS<<KX<<KXO$)nQ#xO<<KXO$*OQ#xOANBjO$*`Q#xOANBjO$*hQ#xO'#HlOOQS'#Hl'#HlO0sQ#xO'#DeO$+RQ#xO,5>VOOQSANBaANBaOOOO7+%n7+%nOOQS7+'|7+'|O$+jQ#xO<<McOOQVLD*zLD*zOOQVANAYANAYO4jQMlO'#GhO$+{Q&nO,5<VO$!pQ#xO'#FpOOQS,5<Z,5<ZOOQS'#Fg'#FgO$,mQ#xO,5<PO$,rQ#xO,5<POOQS'#Fj'#FjO$!pQ#xO'#GgO$-dQ#xO,5<TO$.OQ#xO,5>zO$.`Q#xO,5>zO0XQ#xO,5<SO$.qQ#xO,5<WO$.vQ#xO,5<WO$!pQ#xO'#IbO$.{Q#xO'#IbO$/QQ#xO,5<XOOQS,5<Y,5<YO'ZQ#xO'#FsOOQU1G1h1G1hO3aQ#xO1G1hOOQSAN@sAN@sO$/VQ#xOG28UO$/gQ#xO,5:POOQS1G3q1G3qOOQS,5=S,5=SOOQS-E:f-E:fO$/lQ&nO'#FdO$/sQ#xO'#IcO$0RQ#xO'#IcO$0ZQ#xO,5<[OOQS1G1k1G1kO$0`Q#xO1G1kO$0eQ#xO,5=ROOQS-E:e-E:eO$1PQ#xO,5=VO$1hQ#xO1G4fOOQS-E:i-E:iOOQS1G1n1G1nOOQS1G1r1G1rO$1xQ#xO,5>|O$!pQ#xO,5>|OOQS1G1s1G1sO$2WQ&nO,5<_OOQU7+'S7+'SO$$mQ#xO1G/kO$!pQ#xO,5<]O$2_Q#xO,5>}O$2fQ#xO,5>}OOQS1G1v1G1vOOQS7+'V7+'VP$!pQ#xO'#GkO$2nQ#xO1G4hO$2xQ#xO1G4hO$3QQ#xO1G4hOOQS7+%V7+%VO$3`Q#xO1G1wO$3nQ&nO'#FdO$3uQ#xO,5=UOOQS,5=U,5=UO$4TQ#xO1G4iOOQS-E:h-E:hO$!pQ#xO,5=TO$4[Q#xO,5=TO$4aQ#xO7+*SOOQS-E:g-E:gO$4kQ#xO7+*SO$!pQ#xO,5<^P$!pQ#xO'#GjO$4sQ#xO1G2oO$!pQ#xO1G2oP$5RQ#xO'#GiO$5YQ#xO<<MnO$5dQ#xO1G1xO$5rQ#xO7+(ZO7kQ#xO'#DPO7kQ#xO,59dO7kQ#xO,59dO7kQ#xO,59dO$6QQ&nO,5=mO7kQ#xO1G/OO/rQ#xO1G/ZO/rQ#xO7+$rP$6eQ#xO'#GVO'ZQ#xO'#HRO$6rQ#xO,59dO$6wQ#xO,59dO$7OQ#xO,59oO$7TQ#xO1G/WO0sQ#xO'#DTO7kQ#xO,59l",stateData:"$7f~O%pOS%eOSUOS%dPQ~OPiOXfOhtOjYOquOu!UOxvO!RwO!S!QO!V!XO!W!WO!ZZO!_[O!jeO!ueO!veO!weO#OyO#QzO#S{O#U|O#W}O#[!OO#^!PO#a!RO#b!RO#d!SO#f!TO#o!VO#r!YO#v!ZO#x![O#}!]O$QmO$S!^O%|RO%}RO&RSO&SWO&h]O&i^O&l_O&o`O&saO&tbO&ucO~O%d!_O~OX!fOa!fOc!gOj!nO!Z!pO!h!rO%w!aO%x!bO%y!cO%z!dO%{!dO%|!eO%}!eO&O!fO&P!fO&Q!fO~Om&VXn&VXo&VXp&VXq&VXr&VXu&VX|&VX}&VX!{&VX#j&VX%c&VX%f&VX&X&VXi&VX!V&VX!W&VX&Y&VX!Y&VX!^&VX!S&VX#_&VXv&VX!n&VX~P$gOhtOjYO!ZZO!_[O!jeO!ueO!veO!weO%|RO%}RO&RSO&SWO&h]O&i^O&l_O&o`O&saO&tbO&ucO~O|&UX}&UX#j&UX%c&UX%f&UX&X&UX~Om!uOn!vOo!tOp!tOq!wOr!xOu!yO!{&UX~P(hOX#POi#ROq0zOx1YO!RwO~P'ZOX#TOq0zOx1YO!Y#UO~P'ZOX#XOc#YOq0zOx1YO!^#ZO~P'ZO&j#^O&k#`O~O&m#aO&n#`O~OQ#cO%g#dO%h#fO~OR#gO%i#hO%j#fO~OS#jO%k#kO%l#fO~OT#mO%m#nO%n#fO~OX%vXa%vXc%vXj%vXm%vXn%vXo%vXp%vXq%vXr%vXu%vX|%vX!Z%vX!h%vX%w%vX%x%vX%y%vX%z%vX%{%vX%|%vX%}%vX&O%vX&P%vX&Q%vXi%vX!V%vX!W%vX~O&h]O&i^O&l_O&o`O&saO&tbO&ucO}%vX!{%vX#j%vX%c%vX%f%vX&X%vX&Y%vX!Y%vX!^%vX!S%vX#_%vXv%vX!n%vX~P,QO|#sO}%uX!{%uX#j%uX%c%uX%f%uX&X%uX~Oq0zOx1YO~P'ZO#j#vO%c#xO%f#xO~O&SWO~O!V#}O#x![O#}!]O$QmO~OquO~P'ZOX$SOc$TO&SWO}yP~OX$XOq0zOx1YO!S$YO~P'ZO}$[O!{$aO&X$]O#j!|X%c!|X%f!|X~OX$XOq0zOx1YO#j#VX%c#VX%f#VX~P'ZOq0zOx1YO#j#ZX%c#ZX%f#ZX~P'ZO!h$gO!u$gO&SWO~OX$rO~P'ZO!W$tO#v$uO#x$vO~O}$wO~OX%OO~P'ZOU%QO%c%PO%p%RO~OX%[Oc%[Oi%^Oq0zOx1YO~P'ZOq0zOx1YO}%aO~P'ZO&g%cO~Oc!gOj!nO!Z!pO!h!rOXdaadamdandaodapdaqdardauda|da}da!{da#jda%cda%fda%wda%xda%yda%zda%{da%|da%}da&Oda&Pda&Qda&Xdaida!Vda!Wda&Yda!Yda!^da!Sda#_davda!nda~Op%hO~Oq%hO~P'ZOq0zO~P'ZOm0|On0}Oo0{Op0{Oq1UOr1VOu1ZOi&UX!V&UX!W&UX&Y&UX!Y&UX!^&UX!S&UX#_&UX!n&UX~P(hO&Y%jOi&TX|&TX!V&TX!W&TX!Y&TX}&TX~Oi%lO|%mO!V%qO!W%pO~Oi%lO~O|%tO!V%qO!W%pO!Y&aX~O!Y%xO~O|%yO}%{O!V%qO!W%pO!^&[X~O!^&PO~O!^&QO~O&j#^O&k&SO~O&m#aO&n&SO~OX&VOq0zOx1YO!RwO~P'ZOQ#cO%g#dO%h&YO~OR#gO%i#hO%j&YO~OS#jO%k#kO%l&YO~OT#mO%m#nO%n&YO~OX!taa!tac!taj!tam!tan!tao!tap!taq!tar!tau!ta|!ta}!ta!Z!ta!h!ta!{!ta#j!ta%c!ta%f!ta%w!ta%x!ta%y!ta%z!ta%{!ta%|!ta%}!ta&O!ta&P!ta&Q!ta&X!tai!ta!V!ta!W!ta&Y!ta!Y!ta!^!ta!S!ta#_!tav!ta!n!ta~P#yO|&bO}%ua!{%ua#j%ua%c%ua%f%ua&X%ua~P$gOX&dOquOxvO}%ua!{%ua#j%ua%c%ua%f%ua&X%ua~P'ZO|&bO}%ua!{%ua#j%ua%c%ua%f%ua&X%ua~OPiOXfOquOxvO!RwO!S!QO#OyO#QzO#S{O#U|O#W}O#[!OO#^!PO#a!RO#b!RO#d!SO#f!TO#j%RX%c%RX%f%RX~P'ZO#j#vO%c&iO%f&iO~O!h&jOj&wX%c&wX#_&wX#j&wX%f&wX#^&wX~Oj!nO%c&lO~Omgangaogapgaqgargauga|ga}ga!{ga#jga%cga%fga&Xgaiga!Vga!Wga&Yga!Yga!^ga!Sga#_gavga!nga~P$gOusa|sa}sa#jsa%csa%fsa&Xsa~Om!uOn!vOo!tOp!tOq!wOr!xO!{sa~PDuO&X&nO|&WX}&WX~O&SWO|&WX}&WX~O|&qO}yX~O}&sO~O|%yO#j&[X%c&[X%f&[Xi&[X}&[X!^&[X!n&[X&X&[X~OX1TOq0zOx1YO!RwO~P'ZO&X$]O#jWa%cWa%fWa~O|&|O#j&^X%c&^X%f&^Xp&^X~P$gO|'PO!S'OO#j#Za%c#Za%f#Za~O#_'QO#j#]a%c#]a%f#]a~O!h$gO!u$gO#^'SO&SWO~O#^'SO~O|'UO#j&zX%c&zX%f&zX~O|'WO#j&vX%c&vX%f&vX}&vX~O!Z'YO&X'ZO~O|'_Op&}X~P$gOp'bO~OPiOXfOquOxvO!RwO!S!QO#OyO#QzO#S{O#U|O#W}O#[!OO#^!PO#a!RO#b!RO#d!SO#f!TO%c'gO~P'ZOv'kO#s'iO#t'jOP#qaX#qah#qaj#qaq#qau#qax#qa!R#qa!S#qa!V#qa!W#qa!Z#qa!_#qa!j#qa!u#qa!v#qa!w#qa#O#qa#Q#qa#S#qa#U#qa#W#qa#[#qa#^#qa#a#qa#b#qa#d#qa#f#qa#o#qa#r#qa#v#qa#x#qa#}#qa$Q#qa$S#qa%`#qa%|#qa%}#qa&R#qa&S#qa&h#qa&i#qa&l#qa&o#qa&s#qa&t#qa&u#qa%b#qa%f#qa~O|'lO#_'nO}'OX~Oj'pO!Z'YO~Oj!nO}$wO!Z'YO~O}'vO~P$gO%c'yO~OU'zO%c'yO~OX!fOa!fOc!gOj!nO!Z!pO!h!rO%y!cO%z!dO%{!dO%|!eO%}!eO&O!fO&P!fO&Q!fOmYinYioYipYiqYirYiuYi|Yi}Yi!{Yi#jYi%cYi%fYi%wYi&XYiiYi!VYi!WYi&YYi!YYi!^Yi!SYi#_YivYi!nYi~O%x!bO~P!!`O%xYi~P!!`OX!fOa!fOc!gOj!nO!Z!pO!h!rO%|!eO%}!eO&O!fO&P!fO&Q!fOmYinYioYipYiqYirYiuYi|Yi}Yi!{Yi#jYi%cYi%fYi%wYi%xYi%yYi&XYiiYi!VYi!WYi&YYi!YYi!^Yi!SYi#_YivYi!nYi~O%z!dO%{!dO~P!%ZO%zYi%{Yi~P!%ZOc!gOj!nO!Z!pO!h!rOmYinYioYipYiqYirYiuYi|Yi}Yi!{Yi#jYi%cYi%fYi%wYi%xYi%yYi%zYi%{Yi%|Yi%}Yi&XYiiYi!VYi!WYi&YYi!YYi!^Yi!SYi#_YivYi!nYi~OX!fOa!fO&O!fO&P!fO&Q!fO~P!(XOXYiaYi&OYi&PYi&QYi~P!(XO!V%qO!W%pOi&dX|&dX~O&X'|O&Y'|O~P,QO|(OOi&cX~Oi(QO~O|(RO}(TO!Y&fX~Oq0zOx1YO|(RO}(UO!Y&fX~P'ZO!Y(WO~Oo!tOp!tOq!wOr!xOmliuli|li}li!{li#jli%cli%fli&Xli~On!vO~P!,zOnli~P!,zOm0|On0}Oo0{Op0{Oq1UOr1VO~Ov(YO~P!.TOX(_Oi(`Oq0zOx1YO~P'ZOi(`O|(aO~Oi(cO~O!W(eO~Oi(fO|(aO!V%qO!W%pO~P$gOm0|On0}Oo0{Op0{Oq1UOr1VOisa!Vsa!Wsa&Ysa!Ysa!^sa!Ssa#_savsa!nsa~PDuOX(_Oq0zOx1YO!Y&aa~P'ZO|(iO!Y&aa~O!Y(jO~O|(iO!V%qO!W%pO!Y&aa~P$gOX(nOq0zOx1YO!^&[a#j&[a%c&[a%f&[ai&[a}&[a!n&[a&X&[a~P'ZO|(oO!^&[a#j&[a%c&[a%f&[ai&[a}&[a!n&[a&X&[a~O!^(rO~O|(oO!V%qO!W%pO!^&[a~P$gO|(uO!V%qO!W%pO!^&ba~P$gO|(xO}&pX!^&pX!n&pX~O}({O!^(}O!n)OO~O}({O!^)PO!n)QO~O}({O!^)RO!n)SO~O}({O!^)TO!n)UO~OX&dOquOxvO}%ui!{%ui#j%ui%c%ui%f%ui&X%ui~P'ZO|)VO}%ui!{%ui#j%ui%c%ui%f%ui&X%ui~O!h&jOj&wa%c&wa#_&wa#j&wa%f&wa#^&wa~O%c)[O~OX$SOc$TO&SWO~O|&qO}ya~OquOxvO~P'ZO|(oO#j&[a%c&[a%f&[ai&[a}&[a!^&[a!n&[a&X&[a~P$gO|)aO#j%uX%c%uX%f%uX&X%uX~O&X$]O#jWi%cWi%fWi~O#j&^a%c&^a%f&^ap&^a~P'ZO|)dO#j&^a%c&^a%f&^ap&^a~OX)hOj)jO&SWO~O#^)kO~O&SWO#j&za%c&za%f&za~O|)mO#j&za%c&za%f&za~Oq0zOx1YO#j&va%c&va%f&va}&va~P'ZO|)pO#j&va%c&va%f&va}&va~OX)rOc)rO&SWO~O&X)wO~Ov)zO#m)yOP#kiX#kih#kij#kiq#kiu#kix#ki!R#ki!S#ki!V#ki!W#ki!Z#ki!_#ki!j#ki!u#ki!v#ki!w#ki#O#ki#Q#ki#S#ki#U#ki#W#ki#[#ki#^#ki#a#ki#b#ki#d#ki#f#ki#o#ki#r#ki#v#ki#x#ki#}#ki$Q#ki$S#ki%`#ki%|#ki%}#ki&R#ki&S#ki&h#ki&i#ki&l#ki&o#ki&s#ki&t#ki&u#ki%b#ki%f#ki~Ov){OP#niX#nih#nij#niq#niu#nix#ni!R#ni!S#ni!V#ni!W#ni!Z#ni!_#ni!j#ni!u#ni!v#ni!w#ni#O#ni#Q#ni#S#ni#U#ni#W#ni#[#ni#^#ni#a#ni#b#ni#d#ni#f#ni#o#ni#r#ni#v#ni#x#ni#}#ni$Q#ni$S#ni%`#ni%|#ni%}#ni&R#ni&S#ni&h#ni&i#ni&l#ni&o#ni&s#ni&t#ni&u#ni%b#ni%f#ni~OX)}Op&}a~P'ZO|*OOp&}a~O|*OOp&}a~P$gOp*SO~O%a*WO~Ov*ZO#s'iO#t*YOP#qiX#qih#qij#qiq#qiu#qix#qi!R#qi!S#qi!V#qi!W#qi!Z#qi!_#qi!j#qi!u#qi!v#qi!w#qi#O#qi#Q#qi#S#qi#U#qi#W#qi#[#qi#^#qi#a#qi#b#qi#d#qi#f#qi#o#qi#r#qi#v#qi#x#qi#}#qi$Q#qi$S#qi%`#qi%|#qi%}#qi&R#qi&S#qi&h#qi&i#qi&l#qi&o#qi&s#qi&t#qi&u#qi%b#qi%f#qi~OX*^Oq0zOx1YO}$wO~P'ZOq0zOx1YO}'Oa~P'ZO|*bO}'Oa~OX*fOc*gOi*jO&O*hO&SWO~O}$wO'R*lO~Oj'pO~Oj!nO}$wO~O%c*qO~O%c*sO~OX%[Oc%[Oq0zOx1YOi&ca~P'ZO|*vOi&ca~Oq0zOx1YO}*yO!Y&fa~P'ZO|*zO!Y&fa~Oq0zOx1YO|*zO}*}O!Y&fa~P'ZOq0zOx1YO|*zO!Y&fa~P'ZO|*zO}*}O!Y&fa~Oo0{Op0{Oq1UOr1VOilimliuli|li!Vli!Wli&Yli!Yli}li!^li#jli%cli%fli!Sli#_livli!nli&Xli~On0}O~P!JzOnli~P!JzOX(_Oi+SOq0zOx1YO~P'ZOp+UO~Oi+SO|+WO~Oi+XO~OX(_Oq0zOx1YO!Y&ai~P'ZO|+YO!Y&ai~O!Y+ZO~OX(nOq0zOx1YO!^&[i#j&[i%c&[i%f&[ii&[i}&[i!n&[i&X&[i~P'ZO|+^O!V%qO!W%pO!^&bi~O|+aO!^&[i#j&[i%c&[i%f&[ii&[i}&[i!n&[i&X&[i~O!^+bO~Oc+dOq0zOx1YO!^&bi~P'ZO|+^O!^&bi~O!^+fO~OX+hOq0zOx1YO}&pa!^&pa!n&pa~P'ZO|+iO}&pa!^&pa!n&pa~O!_+lO&r+mO!^!oX~O!^+oO~O}({O!^+pO~O}({O!^+qO~O}({O!^+rO~O}({O!^+sO~OX&dOquOxvO}%uq!{%uq#j%uq%c%uq%f%uq&X%uq~P'ZO|$yi}$yi!{$yi#j$yi%c$yi%f$yi&X$yi~P$gOX&dOquOxvO~P'ZOX&dOq0zOx1YO#j%ua%c%ua%f%ua&X%ua~P'ZO|+tO#j%ua%c%ua%f%ua&X%ua~O|$la#j$la%c$la%f$lap$la~P$gO#j&^i%c&^i%f&^ip&^i~P'ZO|+wO#j#Zq%c#Zq%f#Zq~O|+xO#_+zO#j&yX%c&yX%f&yXi&yX~OX+|Oj)jO&SWO~O&SWO#j&zi%c&zi%f&zi~Oq0zOx1YO#j&vi%c&vi%f&vi}&vi~P'ZO}$[O|#hX!Y#hX~O|,QO!Y&{X~O!Y,SO~Ov,VO#m)yOP#kqX#kqh#kqj#kqq#kqu#kqx#kq!R#kq!S#kq!V#kq!W#kq!Z#kq!_#kq!j#kq!u#kq!v#kq!w#kq#O#kq#Q#kq#S#kq#U#kq#W#kq#[#kq#^#kq#a#kq#b#kq#d#kq#f#kq#o#kq#r#kq#v#kq#x#kq#}#kq$Q#kq$S#kq%`#kq%|#kq%}#kq&R#kq&S#kq&h#kq&i#kq&l#kq&o#kq&s#kq&t#kq&u#kq%b#kq%f#kq~Op%Ta|%Ta~P$gOX)}Op&}i~P'ZO|,^Op&}i~O|,hO}$wO#_,hO~O#t,jOP#qqX#qqh#qqj#qqq#qqu#qqx#qq!R#qq!S#qq!V#qq!W#qq!Z#qq!_#qq!j#qq!u#qq!v#qq!w#qq#O#qq#Q#qq#S#qq#U#qq#W#qq#[#qq#^#qq#a#qq#b#qq#d#qq#f#qq#o#qq#r#qq#v#qq#x#qq#}#qq$Q#qq$S#qq%`#qq%|#qq%}#qq&R#qq&S#qq&h#qq&i#qq&l#qq&o#qq&s#qq&t#qq&u#qq%b#qq%f#qq~O#_,kO|%Va}%Va~Oq0zOx1YO}'Oi~P'ZO|,mO}'Oi~O}$[O&X,oOi'QX|'QX~O&SWOi'QX|'QX~O|,sOi'PX~Oi,uO~O%a,xO~O!V%qO!W%pOi&di|&di~OX%[Oc%[Oq0zOx1YOi&ci~P'ZO},{O|$oa!Y$oa~Oq0zOx1YO},|O|$oa!Y$oa~P'ZOq0zOx1YO}*yO!Y&fi~P'ZO|-PO!Y&fi~Oq0zOx1YO|-PO!Y&fi~P'ZO|-PO}-SO!Y&fi~Oi$ki|$ki!Y$ki~P$gOX(_Oq0zOx1YO~P'ZOp-UO~OX(_Oi-VOq0zOx1YO~P'ZOX(_Oq0zOx1YO!Y&aq~P'ZO|$ji!^$ji#j$ji%c$ji%f$jii$ji}$ji!n$ji&X$ji~P$gOX(nOq0zOx1YO~P'ZOc+dOq0zOx1YO!^&bq~P'ZO|-WO!^&bq~O!^-XO~OX(nOq0zOx1YO!^&[q#j&[q%c&[q%f&[qi&[q}&[q!n&[q&X&[q~P'ZO}-YO~OX+hOq0zOx1YO}&pi!^&pi!n&pi~P'ZO|-_O}&pi!^&pi!n&pi~O!_+lO&r+mO!^!oa~OX&dOq0zOx1YO#j%ui%c%ui%f%ui&X%ui~P'ZO|-bO#j%ui%c%ui%f%ui&X%ui~O&SWO#j&ya%c&ya%f&yai&ya~O|-eO#j&ya%c&ya%f&yai&ya~Oi-hO~OX)rOc)rO&SWO!Y&{a~O|-jO!Y&{a~Op%Ti|%Ti~P$gOX)}O~P'ZOX)}Op&}q~P'ZOv-nOP#pyX#pyh#pyj#pyq#pyu#pyx#py!R#py!S#py!V#py!W#py!Z#py!_#py!j#py!u#py!v#py!w#py#O#py#Q#py#S#py#U#py#W#py#[#py#^#py#a#py#b#py#d#py#f#py#o#py#r#py#v#py#x#py#}#py$Q#py$S#py%`#py%|#py%}#py&R#py&S#py&h#py&i#py&l#py&o#py&s#py&t#py&u#py%b#py%f#py~O%b-rO%f-rO~P`O#t-sOP#qyX#qyh#qyj#qyq#qyu#qyx#qy!R#qy!S#qy!V#qy!W#qy!Z#qy!_#qy!j#qy!u#qy!v#qy!w#qy#O#qy#Q#qy#S#qy#U#qy#W#qy#[#qy#^#qy#a#qy#b#qy#d#qy#f#qy#o#qy#r#qy#v#qy#x#qy#}#qy$Q#qy$S#qy%`#qy%|#qy%}#qy&R#qy&S#qy&h#qy&i#qy&l#qy&o#qy&s#qy&t#qy&u#qy%b#qy%f#qy~O|-vO}$wO#_-vO~Oq0zOx1YO}'Oq~P'ZO|-yO}'Oq~O&X,oOi'Qa|'Qa~OX*fOc*gO&O*hO&SWOi'Pa~O|-}Oi'Pa~O$V.RO~OX%[Oc%[Oq0zOx1YO~P'ZOq0zOx1YO}.SO|$oi!Y$oi~P'ZOq0zOx1YO|$oi!Y$oi~P'ZO}.SO|$oi!Y$oi~Oq0zOx1YO}*yO~P'ZOq0zOx1YO}*yO!Y&fq~P'ZO|.VO!Y&fq~Oq0zOx1YO|.VO!Y&fq~P'ZOu.YO!V%qO!W%pOi&]q!Y&]q!^&]q|&]q~P!.TOc+dOq0zOx1YO!^&by~P'ZO|$mi!^$mi~P$gOc+dOq0zOx1YO~P'ZOX+hOq0zOx1YO~P'ZOX+hOq0zOx1YO}&pq!^&pq!n&pq~P'ZO}({O!^.^O!n._O~OX&dOq0zOx1YO#j%uq%c%uq%f%uq&X%uq~P'ZO#_.`O|%Oa#j%Oa%c%Oa%f%Oai%Oa~O&SWO#j&yi%c&yi%f&yii&yi~O|.bO#j&yi%c&yi%f&yii&yi~OX)rOc)rO&SWO!Y&{i~Ov.fOP#p!RX#p!Rh#p!Rj#p!Rq#p!Ru#p!Rx#p!R!R#p!R!S#p!R!V#p!R!W#p!R!Z#p!R!_#p!R!j#p!R!u#p!R!v#p!R!w#p!R#O#p!R#Q#p!R#S#p!R#U#p!R#W#p!R#[#p!R#^#p!R#a#p!R#b#p!R#d#p!R#f#p!R#o#p!R#r#p!R#v#p!R#x#p!R#}#p!R$Q#p!R$S#p!R%`#p!R%|#p!R%}#p!R&R#p!R&S#p!R&h#p!R&i#p!R&l#p!R&o#p!R&s#p!R&t#p!R&u#p!R%b#p!R%f#p!R~Oq0zOx1YO}'Oy~P'ZOX*fOc*gO&O*hO&SWOi'Pi~O$V.RO%b.nO%f.nO~OX.xOj.vO!Z.uO!_.wO!j.qO!v.sO!w.sO%}.pO&SWO&h]O&i^O&l_O~Oq0zOx1YO|$oq!Y$oq~P'ZO}.}O|$oq!Y$oq~Oq0zOx1YO}*yO!Y&fy~P'ZO|/OO!Y&fy~Oq0zOx/SO~P'ZOu.YO!V%qO!W%pOi&]y!Y&]y!^&]y|&]y~P!.TO}({O!^/VO~O&SWO#j&yq%c&yq%f&yqi&yq~O|/XO#j&yq%c&yq%f&yqi&yq~OX*fOc*gO&O*hO&SWO~Oj/^O!h/[O|$WX#_$WX%w$WXi$WX~Ou$WX}$WX!Y$WX!^$WX~P$&lO%|/`O%}/`Ou$XX|$XX}$XX#_$XX%w$XX!Y$XXi$XX!^$XX~O!j/bO~O|/fO#_/hO%w/cOu'SX}'SX!Y'SXi'SX~Oc/kO~P$!|Oj/^Ou'TX|'TX}'TX#_'TX%w'TX!Y'TXi'TX!^'TX~Ou/oO}$wO~Oq0zOx1YO|$oy!Y$oy~P'ZOq0zOx1YO}*yO!Y&f!R~P'ZO|/sO!Y&f!R~Oi&`Xu&`X!V&`X!W&`X!Y&`X!^&`X|&`X~P!.TOu.YO!V%qO!W%pOi&_a!Y&_a!^&_a|&_a~O&SWO#j&yy%c&yy%f&yyi&yy~O!h/[Oj$_au$_a|$_a}$_a#_$_a%w$_a!Y$_ai$_a!^$_a~O!j/|O~O%|/`O%}/`Ou$Xa|$Xa}$Xa#_$Xa%w$Xa!Y$Xai$Xa!^$Xa~O%w/cOu$]a|$]a}$]a#_$]a!Y$]ai$]a!^$]a~Ou'Sa}'Sa!Y'Sai'Sa~P$!pO|0ROu'Sa}'Sa!Y'Sai'Sa~O!Y0UO~Oi0UO~O}0WO~O!^0XO~Oq0zOx1YO}*yO!Y&f!Z~P'ZO}0[O~O&X0]O~P$&lO|0^O#_/hO%w/cOi'VX~O|0^Oi'VX~Oi0`O~O!j0aO~O#_/hOu%Za|%Za}%Za%w%Za!Y%Zai%Za!^%Za~O#_/hO%w/cOu%_a|%_a}%_a!Y%_ai%_a~Ou'Si}'Si!Y'Sii'Si~P$!pO|0cO#_/hO%w/cO!^'Ua~O}$ga~P$gOi'Va~P$!pO|0kOi'Va~Oc0mO!^'Ui~P$!|O|0oO!^'Ui~O|0oO#_/hO%w/cO!^'Ui~O#_/hO%w/cOi$ei|$ei~O&X0rO~P$&lO#_/hO%w/cOi%^a|%^a~Oi'Vi~P$!pO}0uO~Oc0mO!^'Uq~P$!|O|0wO!^'Uq~O#_/hO%w/cO|%]i!^%]i~Oc0mO~P$!|Oc0mO!^'Uy~P$!|O#_/hO%w/cOi$fi|$fi~O#_/hO%w/cO|%]q!^%]q~O|+tO#j%ua%c%ua%f%ua&X%ua~P$gOX&dOq0zOx1YO~P'ZOp1PO~Oq1PO~P'ZO}1QO~Ov1RO~P!.TO&i&l&t&u&h&o&s&S&h~",goto:"!?b'WPPPPPPPP'XP'a*|+f,P,k-W-tP.cP'a/S/S'aPPP'a2oPPPPPP2o5fPP5fP7y8S>fPP>i?Z?^PP'a'aPP?vPP'a'aPP'a'a'a'a'a?z@t'aP@wP@}EXHxPH|IYI^IbIf'aPPPIjIs'XP'X'XP'XP'XP'XP'XP'X'X'XP'XPP'XPP'XP'XPIyJVJ_PJfJlPJfPJfJfPPPJfPLzPMTM_MeLzPJfMnPJfPMuM{PNPNe! S! mNPNP! s!!QNPNPNPNP!!f!!l!!o!!t!!w!#R!#X!#e!#w!#}!$X!$_!${!%R!%X!%_!%i!%o!%u!%{!&R!&X!&k!&u!&{!'R!'X!'c!'i!'o!'u!'{!(V!(]!(g!(m!(v!(|!)]!)e!)o!)vPPPPPPPPPPPPPPPPP!)|!*P!*V!*`!*j!*uPPPPPPPPPPPP!/l!1Q!5T!8hPP!8p!9S!9]!:U!9{!:_!:e!:h!:k!:n!:v!;gPPPPPPPPP!;j!;yPPPP!<i!<u!=R!=X!=b!=e!=h!=n!=t!=z!=}P!>V!>`!?[!?_]jOs#v$w*W,d(TeOTYZ[fistuwy}!O!S!U!V!W!Z!^!h!i!j!k!l!m!n!p!t!u!v!x!y#P#T#X#Y#c#g#j#m#s#v$X$Y$[$^$a$r$t$u$w%O%[%a%h%k%m%p%t%y%{&V&b&d&o&s&|'O'P'W'Z'_'b'i'l'}(O(R(T(U(Y(_(a(e(i(n(o(u(x)V)X)a)d)p)w)y)}*O*S*W*^*b*l*v*y*z*}+T+U+W+Y+]+^+a+d+h+i+l+t+v+w,O,],^,d,l,m,p,z,{,|-O-P-S-U-W-Y-[-^-_-b-y-{.S.V.Y.}/O/o/s0[0z0{0|0}1P1Q1R1S1T1V1Z}!hQ#r$P$b$q$}%r%w%}&O&t'a'x)W)c)|+R+[,[-Z0Y1O!P!iQ#r$P$b$q$}%S%r%w%}&O&t'a'x)W)c)|+R+[,[-Z0Y1O!R!jQ#r$P$b$q$}%S%T%r%w%}&O&t'a'x)W)c)|+R+[,[-Z0Y1O!T!kQ#r$P$b$q$}%S%T%U%r%w%}&O&t'a'x)W)c)|+R+[,[-Z0Y1O!V!lQ#r$P$b$q$}%S%T%U%V%r%w%}&O&t'a'x)W)c)|+R+[,[-Z0Y1O!X!mQ#r$P$b$q$}%S%T%U%V%W%r%w%}&O&t'a'x)W)c)|+R+[,[-Z0Y1O!]!mQ!s#r$P$b$q$}%S%T%U%V%W%X%r%w%}&O&t'a'x)W)c)|+R+[,[-Z0Y1O(TTOTYZ[fistuwy}!O!S!U!V!W!Z!^!h!i!j!k!l!m!n!p!t!u!v!x!y#P#T#X#Y#c#g#j#m#s#v$X$Y$[$^$a$r$t$u$w%O%[%a%h%k%m%p%t%y%{&V&b&d&o&s&|'O'P'W'Z'_'b'i'l'}(O(R(T(U(Y(_(a(e(i(n(o(u(x)V)X)a)d)p)w)y)}*O*S*W*^*b*l*v*y*z*}+T+U+W+Y+]+^+a+d+h+i+l+t+v+w,O,],^,d,l,m,p,z,{,|-O-P-S-U-W-Y-[-^-_-b-y-{.S.V.Y.}/O/o/s0[0z0{0|0}1P1Q1R1S1T1V1Z&iVOYZ[isuw}!O!S!U!V!Z!n!p!t!u!v!x!y#c#g#j#m#s#v$Y$[$^$a$u$w%[%a%h%k%m%t%y%{&V&b&o&s'O'P'W'Z'b'i'l'}(O(R(T(U(Y(a(i(o(u(x)V)X)a)p)w)y*S*W*^*b*l*v*y*z*}+T+U+W+Y+]+^+a+h+i+l+t+w,O,d,l,m,p,z,{,|-O-P-S-U-W-Y-[-^-_-b-y-{.S.V.Y.}/O/s0[0z0{0|0}1P1Q1R1S1V1Z%sXOYZ[isw}!O!S!U!V!Z!n!p#c#g#j#m#s#v$Y$[$^$a$u$w%[%a%k%m%t%y%{&V&b&o&s'O'P'W'Z'b'i'l'}(O(R(T(U(Y(a(i(o(u(x)V)X)a)p)w)y*S*W*^*b*l*v*y*z*}+T+W+Y+]+^+a+h+i+l+t+w,O,d,l,m,p,z,{,|-O-P-S-W-Y-[-^-_-b-y-{.S.V.}/O/s1Q1R1SQ$VvQ/t/SR1W1Y'zeOTYZ[fistuwy}!O!S!U!V!W!Z!^!h!i!j!k!l!m!p!t!u!v!x!y#P#T#X#Y#c#g#j#m#s#v$X$Y$[$^$a$r$t$u$w%O%[%a%h%k%m%p%t%y%{&V&b&d&o&s&|'O'P'W'Z'_'b'i'l'}(R(T(U(Y(_(a(e(i(n(o(u(x)V)X)a)d)p)w)y)}*O*S*W*^*b*l*y*z*}+T+U+W+Y+]+^+a+d+h+i+l+t+v+w,O,],^,d,l,m,p,{,|-O-P-S-U-W-Y-[-^-_-b-y-{.S.V.Y.}/O/o/s0[0z0{0|0}1P1Q1R1S1T1V1ZW#ym!P!Q$hW$Rv&q/S1YQ$j!RQ$n!TQ${![Q$|!]W%Z!n(O*v,zS&p$S$TQ'e$vQ)Y&jQ)h'QU)i'S)j)kU)l'U)m+}W)s'Y,Q-j.dQ*d'nW*e'p,s-}.lQ,P)rS,r*f*gY-d+x-e.a.b/XQ-g+zQ-t,hQ-x,kQ.j-vl.o.R.u.v.x/d/f/k0R0W0]0b0m0r0uQ/W.`Q/l.wQ/x/^Q0T/hU0h0^0k0sX0n0c0o0v0wR&o$R!_!|YZ!U!V!p%a%m%t(R(T(U(a(i)y*y*z*}+T+W+Y,{,|-O-P-S.S.V.}/O/sR%k!{Q#QYQ&W#cQ&Z#gQ&]#jQ&_#mQ&x$^Q&{$aR-`+lT/R.Y0[![!oQ!s#r$P$b$q$}%S%T%U%V%W%X%r%w%}&O&t'a'x)W)c)|+R+[,[-Z0Y1OQ&m#zQ't$|R*p'uR'}%ZQ%d!rR/v/[(SdOTYZ[fistuwy}!O!S!U!V!W!Z!^!h!i!j!k!l!m!n!p!t!u!v!x!y#P#T#X#Y#c#g#j#m#s#v$X$Y$[$^$a$r$t$u$w%O%[%a%h%k%m%p%t%y%{&V&b&d&o&s&|'O'P'W'Z'_'b'i'l'}(O(R(T(U(Y(_(a(e(i(n(o(u(x)V)X)a)d)p)w)y)}*O*S*W*^*b*l*v*y*z*}+T+U+W+Y+]+^+a+d+h+i+l+t+v+w,O,],^,d,l,m,p,z,{,|-O-P-S-U-W-Y-[-^-_-b-y-{.S.V.Y.}/O/o/s0[0z0{0|0}1P1Q1R1S1T1V1ZS#pd#q!P.s.R.u.v.w.x/^/d/f/k0R0W0]0^0b0c0k0m0o0r0s0u0v0w(SdOTYZ[fistuwy}!O!S!U!V!W!Z!^!h!i!j!k!l!m!n!p!t!u!v!x!y#P#T#X#Y#c#g#j#m#s#v$X$Y$[$^$a$r$t$u$w%O%[%a%h%k%m%p%t%y%{&V&b&d&o&s&|'O'P'W'Z'_'b'i'l'}(O(R(T(U(Y(_(a(e(i(n(o(u(x)V)X)a)d)p)w)y)}*O*S*W*^*b*l*v*y*z*}+T+U+W+Y+]+^+a+d+h+i+l+t+v+w,O,],^,d,l,m,p,z,{,|-O-P-S-U-W-Y-[-^-_-b-y-{.S.V.Y.}/O/o/s0[0z0{0|0}1P1Q1R1S1T1V1ZT#pd#qT#d`#ee(|&W&Z&]&_)O)Q)S)U-`._T+m({+nT#ha#iT#kb#lT#nc#oQ$`xQ,P)sR,q*eX$^x$_$`&zQ'[$nQ'r${Q'u$|R*V'eQ)t'YV-i,Q-j.dZlOs$w*W,dXpOs*W,dQ$x!YQ']$oQ'^$pQ'o$zQ's$|Q*T'dQ*['iQ*_'jQ*`'kQ*m'qS*o't'uQ,W)yQ,Y)zQ,Z){Q,_*RS,a*U*nQ,e*YQ,f*ZS,g*]*^Q,w*pQ-l,VQ-m,XQ-o,`S-p,b,cQ-u,iQ-w,jQ.e-nQ.g-qQ.h-sQ.i-tQ/Y.fQ/Z.jQ/p.{R0Z/qWpOs*W,dR#|oQ'q${S*U'e'rR,c*VQ,p*eR-{,qQ*n'qQ,b*UR-q,cZnOos*W,dQ'w$}R*r'xT.P,x.Qu.z.R.u.v.x/^/d/f/k0R0W0]0^0b0k0m0r0s0ut.z.R.u.v.x/^/d/f/k0R0W0]0^0b0k0m0r0s0uQ/l.wX0n0c0o0v0w!P.r.R.u.v.w.x/^/d/f/k0R0W0]0^0b0c0k0m0o0r0s0u0v0wQ/a.qR/}/bg/d.t/e/y0Q0V0e0g0i0t0x0yu.y.R.u.v.x/^/d/f/k0R0W0]0^0b0k0m0r0s0uX/_.o.y/x0hR/z/^V0j0^0k0sR/q.{QsOS$Os,dR,d*WQ&r$UR)_&rS%z#W$WS(p%z(sT(s%}&tQ%n#OQ%u#SW(b%n%u(g(kQ(g%rR(k%wQ&}$bR)e&}Q(v&OQ+_(qT+e(v+_Q(P%]R*w(PS(S%`%aY*{(S*|-Q.W/PU*|(T(U(VU-Q*}+O+PS.W-R-SR/P.XQ#_^R&R#_Q#b_R&T#bQ#e`R&X#eQ(y&US+j(y+kR+k(zQ+n({R-a+nQ#iaR&[#iQ#lbR&^#lQ#ocR&`#oQ#qdR&a#qQ#tgQ&c#rW&f#t&c)b+uQ)b&wR+u1OQ$_xS&y$_&zR&z$`Q'X$lR)q'XQ&k#yR)Z&kQ$h!QR'R$hQ+y)iS-f+y.cR.c-gQ'V$jR)n'VQ,R)tR-k,RQ#wkR&h#wQ)x']R,U)xQ'`$qS*P'`*QR*Q'aQ'h$xR*X'hQ'm$yS*c'm,nR,n*dQ,t*iR.O,tWoOs*W,dR#{oQ.Q,xR.m.Qd/e.t/y0Q0V0e0g0i0t0x0yR0P/eU/].o/x0hR/w/]Q0d0VS0p0d0qR0q0eS0_/y/zR0l0_Q/g.tR0S/gR!`PXrOs*W,dWqOs*W,dR'f$wYkOs$w*W,dR&g#v[xOs#v$w*W,dR&x$^&hQOYZ[isuw}!O!S!U!V!Z!n!p!t!u!v!x!y#c#g#j#m#s#v$Y$[$^$a$u$w%[%a%h%k%m%t%y%{&V&b&o&s'O'P'W'Z'b'i'l'}(O(R(T(U(Y(a(i(o(u(x)V)X)a)p)w)y*S*W*^*b*l*v*y*z*}+T+U+W+Y+]+^+a+h+i+l+t+w,O,d,l,m,p,z,{,|-O-P-S-U-W-Y-[-^-_-b-y-{.S.V.Y.}/O/s0[0z0{0|0}1P1Q1R1S1V1ZQ!sTQ#rfQ$PtU$by%p(eS$q!W$tQ$}!^Q%S!hQ%T!iQ%U!jQ%V!kQ%W!lQ%X!mQ%r#PQ%w#TQ%}#XQ&O#YQ&t$XQ'a$rQ'x%OQ)W&dU)c&|)d+vW)|'_*O,],^Q+R(_Q+[(nQ,[)}Q-Z+dQ0Y/oR1O1TQ#OYQ#SZQ$o!UQ$p!VQ%`!pQ(V%a^(^%m%t(a(i+T+W+Y^*x(R*z-O-P.V/O/sQ+O(TQ+P(UQ,X)yQ,}*yQ-R*}Q.T,{Q.U,|Q.X-SQ.|.SR/r.}[gOs#v$w*W,d!^!{YZ!U!V!p%a%m%t(R(T(U(a(i)y*y*z*}+T+W+Y,{,|-O-P-S.S.V.}/O/sQ#W[Q#uiS$Ww}Q$e!OW$l!S$a'b*SS$y!Z$uW%Y!n(O*v,zY&U#c#g#j#m+l`&e#s&b)V)X)a+t-b1SQ&u$YQ&v$[Q&w$^Q'{%[Q(]%kW(m%y(o+]+aQ(q%{Q(z&VQ)]&oS)`&s1QQ)f'OQ)g'PU)o'W)p,OQ)v'ZQ*]'iY*a'l*b,l,m-yQ*t'}S+Q(Y1RW+c(u+^-W-[W+g(x+i-^-_Q,T)wQ,i*^Q,v*lQ-]+hQ-c+wQ-z,pQ.]-YR.k-{hUOs#s#v$w&b&s(Y)V)X*W,d%Y!zYZ[iw}!O!S!U!V!Z!n!p#c#g#j#m$Y$[$^$a$u%[%a%k%m%t%y%{&V&o'O'P'W'Z'b'i'l'}(O(R(T(U(a(i(o(u(x)a)p)w)y*S*^*b*l*v*y*z*}+T+W+Y+]+^+a+h+i+l+t+w,O,l,m,p,z,{,|-O-P-S-W-Y-[-^-_-b-y-{.S.V.}/O/s1Q1R1SQ$QuW%e!t!x0{1VQ%f!uQ%g!vQ%i!yQ%s0zS(X%h1PQ(Z0|Q([0}Q-T+UQ.[-US/Q.Y0[R1X1ZU$Uv/S1YR)^&q[hOs#v$w*W,da!}Y#c#g#j#m$^$a+lQ#][Q$ZwR$d}Q%o#OQ%v#SQ%|#WQ'{%YQ(h%rQ(l%wQ(t%}Q(w&OQ+`(qQ,y*tQ.Z-TQ/U.[R/u/TQ$cyQ(d%pR+V(eQ/T.YR0f0[R#VZR#[[R%_!nQ%]!nV*u(O*v,z!]!qQ!s#r$P$b$q$}%S%T%U%V%W%X%r%w%}&O&t'a'x)W)c)|+R+[,[-Z0Y1OR%b!pQ&W#cQ&Z#gQ&]#jQ&_#mR-`+lQ(}&WQ)P&ZQ)R&]Q)T&_Q+p)OQ+q)QQ+r)SQ+s)UQ.^-`R/V._Q$m!SQ&{$aQ*R'bR,`*SQ#zmQ$f!PQ$i!QR'T$hQ)h'SR+|)kQ)h'SQ+{)jR+|)kR$k!RR)u'YXqOs*W,dQ$s!WR'c$tQ$z!ZR'd$uR*k'pQ*i'pV-|,s-}.lQ.{.RQ/i.uR/j.vU.t.R.u.vQ/n.xQ/y/^Q0O/dU0Q/f0R0bQ0V/kQ0e0WQ0g0]U0i0^0k0sQ0t0mQ0x0rR0y0uR/m.wR/{/^",nodeNames:"⚠ print { { { { Comment Script AssignStatement * BinaryExpression BitOp BitOp BitOp BitOp ArithOp ArithOp @ ArithOp ** UnaryExpression ArithOp BitOp AwaitExpression await ) ( ParenthesizedExpression BinaryExpression or and CompareOp in not is UnaryExpression ConditionalExpression if else LambdaExpression lambda ParamList VariableName AssignOp , : NamedExpression AssignOp YieldExpression yield from TupleExpression ComprehensionExpression async for LambdaExpression ] [ ArrayExpression ArrayComprehensionExpression } { DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression CallExpression ArgList AssignOp MemberExpression . PropertyName Number String FormatString FormatReplacement FormatConversion FormatSpec FormatReplacement FormatReplacement FormatReplacement FormatReplacement ContinuedString Ellipsis None Boolean TypeDef AssignOp UpdateStatement UpdateOp ExpressionStatement DeleteStatement del PassStatement pass BreakStatement break ContinueStatement continue ReturnStatement return YieldStatement PrintStatement RaiseStatement raise ImportStatement import as ScopeStatement global nonlocal AssertStatement assert TypeDefinition type TypeParamList TypeParam StatementGroup ; IfStatement Body elif WhileStatement while ForStatement TryStatement try except finally WithStatement with FunctionDefinition def ParamList AssignOp TypeDef ClassDefinition class DecoratedStatement Decorator At MatchStatement match MatchBody MatchClause case CapturePattern LiteralPattern ArithOp ArithOp AsPattern OrPattern LogicOp AttributePattern SequencePattern MappingPattern StarPattern ClassPattern PatternArgList KeywordPattern KeywordPattern Guard",maxTerm:283,context:DL,nodeProps:[["group",-15,8,88,90,91,93,95,97,99,101,102,103,105,108,111,113,"Statement Statement",-22,10,20,23,27,42,51,52,58,59,62,63,64,65,66,69,72,73,74,82,83,84,85,"Expression",-10,117,119,122,124,125,129,131,136,138,141,"Statement",-9,146,147,150,151,153,154,155,156,157,"Pattern"],["openedBy",25,"(",56,"[",60,"{"],["closedBy",26,")",57,"]",61,"}"]],propSources:[QL],skippedNodes:[0,6],repeatNodeCount:38,tokenData:"%-W#sR!`OX%TXY=|Y[%T[]=|]p%Tpq=|qr@_rsDOst!+|tu%Tuv!Nnvw#!|wx#$Wxy#:Uyz#;Yz{#<^{|#>x|}#@S}!O#AW!O!P#Ci!P!Q#N_!Q!R$!y!R![$&w![!]$1e!]!^$3s!^!_$4w!_!`$7c!`!a$8m!a!b%T!b!c$;U!c!d$<b!d!e$>W!e!h$<b!h!i$H[!i!t$<b!t!u%#r!u!w$<b!w!x$Fl!x!}$<b!}#O%%z#O#P?d#P#Q%'O#Q#R%(S#R#S$<b#S#T%T#T#U$<b#U#V$>W#V#Y$<b#Y#Z$H[#Z#f$<b#f#g%#r#g#i$<b#i#j$Fl#j#o$<b#o#p%)^#p#q%*S#q#r%+^#r#s%,S#s$g%T$g;'S$<b;'S;=`$>Q<%lO$<b!n%^]&r!b&jS&mWOr%Trs&Vsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T!n&^]&r!b&jSOr%Trs'Vsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T!n'^]&r!b&jSOr%Trs(Vsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T!f(^Z&r!b&jSOw(Vwx)Px#O(V#O#P+Z#P#o(V#o#p+x#p#q(V#q#r+x#r;'S(V;'S;=`/R<%lO(V!f)UZ&r!bOw(Vwx)wx#O(V#O#P+Z#P#o(V#o#p+x#p#q(V#q#r+x#r;'S(V;'S;=`/R<%lO(V!f)|Z&r!bOw(Vwx*ox#O(V#O#P+Z#P#o(V#o#p+x#p#q(V#q#r+x#r;'S(V;'S;=`/R<%lO(V!b*tT&r!bO#o*o#p#q*o#r;'S*o;'S;=`+T<%lO*o!b+WP;=`<%l*o!f+`W&r!bO#o(V#o#p+x#p#q(V#q#r+x#r;'S(V;'S;=`.d;=`<%l+x<%lO(VS+}V&jSOw+xwx,dx#O+x#O#P-c#P;'S+x;'S;=`.^<%lO+xS,gVOw+xwx,|x#O+x#O#P-c#P;'S+x;'S;=`.^<%lO+xS-PUOw+xx#O+x#O#P-c#P;'S+x;'S;=`.^<%lO+xS-fRO;'S+x;'S;=`-o;=`O+xS-tW&jSOw+xwx,dx#O+x#O#P-c#P;'S+x;'S;=`.^;=`<%l+x<%lO+xS.aP;=`<%l+x!f.iW&jSOw+xwx,dx#O+x#O#P-c#P;'S+x;'S;=`.^;=`<%l(V<%lO+x!f/UP;=`<%l(V!n/`]&r!b&mWOr%Trs&Vsw%Twx0Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T!n0`]&r!b&mWOr%Trs&Vsw%Twx1Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T!j1`Z&r!b&mWOr1Xrs2Rs#O1X#O#P3q#P#o1X#o#p4`#p#q1X#q#r4`#r;'S1X;'S;=`7i<%lO1X!j2WZ&r!bOr1Xrs2ys#O1X#O#P3q#P#o1X#o#p4`#p#q1X#q#r4`#r;'S1X;'S;=`7i<%lO1X!j3OZ&r!bOr1Xrs*os#O1X#O#P3q#P#o1X#o#p4`#p#q1X#q#r4`#r;'S1X;'S;=`7i<%lO1X!j3vW&r!bO#o1X#o#p4`#p#q1X#q#r4`#r;'S1X;'S;=`6z;=`<%l4`<%lO1XW4eV&mWOr4`rs4zs#O4`#O#P5y#P;'S4`;'S;=`6t<%lO4`W4}VOr4`rs5ds#O4`#O#P5y#P;'S4`;'S;=`6t<%lO4`W5gUOr4`s#O4`#O#P5y#P;'S4`;'S;=`6t<%lO4`W5|RO;'S4`;'S;=`6V;=`O4`W6[W&mWOr4`rs4zs#O4`#O#P5y#P;'S4`;'S;=`6t;=`<%l4`<%lO4`W6wP;=`<%l4`!j7PW&mWOr4`rs4zs#O4`#O#P5y#P;'S4`;'S;=`6t;=`<%l1X<%lO4`!j7lP;=`<%l1X!n7tW&r!bO#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=P;=`<%l8^<%lO%T[8eX&jS&mWOr8^rs9Qsw8^wx:dx#O8^#O#P;v#P;'S8^;'S;=`<y<%lO8^[9VX&jSOr8^rs9rsw8^wx:dx#O8^#O#P;v#P;'S8^;'S;=`<y<%lO8^[9wX&jSOr8^rs+xsw8^wx:dx#O8^#O#P;v#P;'S8^;'S;=`<y<%lO8^[:iX&mWOr8^rs9Qsw8^wx;Ux#O8^#O#P;v#P;'S8^;'S;=`<y<%lO8^[;ZX&mWOr8^rs9Qsw8^wx4`x#O8^#O#P;v#P;'S8^;'S;=`<y<%lO8^[;yRO;'S8^;'S;=`<S;=`O8^[<ZY&jS&mWOr8^rs9Qsw8^wx:dx#O8^#O#P;v#P;'S8^;'S;=`<y;=`<%l8^<%lO8^[<|P;=`<%l8^!n=WY&jS&mWOr8^rs9Qsw8^wx:dx#O8^#O#P;v#P;'S8^;'S;=`<y;=`<%l%T<%lO8^!n=yP;=`<%l%T#s>Xc&r!b&jS&mW%p!TOX%TXY=|Y[%T[]=|]p%Tpq=|qr%Trs&Vsw%Twx/Xx#O%T#O#P?d#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#s?i[&r!bOY%TYZ=|Z]%T]^=|^#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=P;=`<%l8^<%lO%T!q@hd&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!_%T!_!`Av!`#O%T#O#P7o#P#T%T#T#UBz#U#f%T#f#gBz#g#hBz#h#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T!qBR]oR&r!b&jS&mWOr%Trs&Vsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T!qCV]!nR&r!b&jS&mWOr%Trs&Vsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#cDXa&r!b&jS&hsOYE^YZ%TZ]E^]^%T^rE^rs!)|swE^wxGpx#OE^#O#P!!u#P#oE^#o#p!#d#p#qE^#q#r!#d#r;'SE^;'S;=`!)v<%lOE^#cEia&r!b&jS&mW&hsOYE^YZ%TZ]E^]^%T^rE^rsFnswE^wxGpx#OE^#O#P!!u#P#oE^#o#p!#d#p#qE^#q#r!#d#r;'SE^;'S;=`!)v<%lOE^#cFw]&r!b&jS&hsOr%Trs'Vsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#cGya&r!b&mW&hsOYE^YZ%TZ]E^]^%T^rE^rsFnswE^wxIOx#OE^#O#P!!u#P#oE^#o#p!#d#p#qE^#q#r!#d#r;'SE^;'S;=`!)v<%lOE^#cIXa&r!b&mW&hsOYE^YZ%TZ]E^]^%T^rE^rsFnswE^wxJ^x#OE^#O#P!!u#P#oE^#o#p!#d#p#qE^#q#r!#d#r;'SE^;'S;=`!)v<%lOE^#_Jg_&r!b&mW&hsOYJ^YZ1XZ]J^]^1X^rJ^rsKfs#OJ^#O#PL`#P#oJ^#o#pL}#p#qJ^#q#rL}#r;'SJ^;'S;=`!!o<%lOJ^#_KmZ&r!b&hsOr1Xrs2ys#O1X#O#P3q#P#o1X#o#p4`#p#q1X#q#r4`#r;'S1X;'S;=`7i<%lO1X#_LeW&r!bO#oJ^#o#pL}#p#qJ^#q#rL}#r;'SJ^;'S;=`! r;=`<%lL}<%lOJ^{MUZ&mW&hsOYL}YZ4`Z]L}]^4`^rL}rsMws#OL}#O#PNc#P;'SL};'S;=`! l<%lOL}{M|V&hsOr4`rs5ds#O4`#O#P5y#P;'S4`;'S;=`6t<%lO4`{NfRO;'SL};'S;=`No;=`OL}{Nv[&mW&hsOYL}YZ4`Z]L}]^4`^rL}rsMws#OL}#O#PNc#P;'SL};'S;=`! l;=`<%lL}<%lOL}{! oP;=`<%lL}#_! y[&mW&hsOYL}YZ4`Z]L}]^4`^rL}rsMws#OL}#O#PNc#P;'SL};'S;=`! l;=`<%lJ^<%lOL}#_!!rP;=`<%lJ^#c!!zW&r!bO#oE^#o#p!#d#p#qE^#q#r!#d#r;'SE^;'S;=`!(q;=`<%l!#d<%lOE^!P!#m]&jS&mW&hsOY!#dYZ8^Z]!#d]^8^^r!#drs!$fsw!#dwx!%Yx#O!#d#O#P!'Y#P;'S!#d;'S;=`!(k<%lO!#d!P!$mX&jS&hsOr8^rs9rsw8^wx:dx#O8^#O#P;v#P;'S8^;'S;=`<y<%lO8^!P!%a]&mW&hsOY!#dYZ8^Z]!#d]^8^^r!#drs!$fsw!#dwx!&Yx#O!#d#O#P!'Y#P;'S!#d;'S;=`!(k<%lO!#d!P!&a]&mW&hsOY!#dYZ8^Z]!#d]^8^^r!#drs!$fsw!#dwxL}x#O!#d#O#P!'Y#P;'S!#d;'S;=`!(k<%lO!#d!P!']RO;'S!#d;'S;=`!'f;=`O!#d!P!'o^&jS&mW&hsOY!#dYZ8^Z]!#d]^8^^r!#drs!$fsw!#dwx!%Yx#O!#d#O#P!'Y#P;'S!#d;'S;=`!(k;=`<%l!#d<%lO!#d!P!(nP;=`<%l!#d#c!(z^&jS&mW&hsOY!#dYZ8^Z]!#d]^8^^r!#drs!$fsw!#dwx!%Yx#O!#d#O#P!'Y#P;'S!#d;'S;=`!(k;=`<%lE^<%lO!#d#c!)yP;=`<%lE^#c!*V]&r!b&jS&hsOr%Trs!+Osw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#c!+ZZ&nW&r!b&jS&lsOw(Vwx)Px#O(V#O#P+Z#P#o(V#o#p+x#p#q(V#q#r+x#r;'S(V;'S;=`/R<%lO(V#s!,XaU!T&r!b&jS&mWOY!+|YZ%TZ]!+|]^%T^r!+|rs!-^sw!+|wx!:hx#O!+|#O#P!FW#P#o!+|#o#p!GT#p#q!+|#q#r!GT#r;'S!+|;'S;=`!Nh<%lO!+|#s!-gaU!T&r!b&jSOY!+|YZ%TZ]!+|]^%T^r!+|rs!.lsw!+|wx!:hx#O!+|#O#P!FW#P#o!+|#o#p!GT#p#q!+|#q#r!GT#r;'S!+|;'S;=`!Nh<%lO!+|#s!.uaU!T&r!b&jSOY!+|YZ%TZ]!+|]^%T^r!+|rs!/zsw!+|wx!:hx#O!+|#O#P!FW#P#o!+|#o#p!GT#p#q!+|#q#r!GT#r;'S!+|;'S;=`!Nh<%lO!+|#k!0T_U!T&r!b&jSOY!/zYZ(VZ]!/z]^(V^w!/zwx!1Sx#O!/z#O#P!4z#P#o!/z#o#p!5w#p#q!/z#q#r!5w#r;'S!/z;'S;=`!:b<%lO!/z#k!1Z_U!T&r!bOY!/zYZ(VZ]!/z]^(V^w!/zwx!2Yx#O!/z#O#P!4z#P#o!/z#o#p!5w#p#q!/z#q#r!5w#r;'S!/z;'S;=`!:b<%lO!/z#k!2a_U!T&r!bOY!/zYZ(VZ]!/z]^(V^w!/zwx!3`x#O!/z#O#P!4z#P#o!/z#o#p!5w#p#q!/z#q#r!5w#r;'S!/z;'S;=`!:b<%lO!/z#g!3gZU!T&r!bOY!3`YZ*oZ]!3`]^*o^#o!3`#o#p!4Y#p#q!3`#q#r!4Y#r;'S!3`;'S;=`!4t<%lO!3`!T!4_TU!TOY!4YZ]!4Y^;'S!4Y;'S;=`!4n<%lO!4Y!T!4qP;=`<%l!4Y#g!4wP;=`<%l!3`#k!5R[U!T&r!bOY!/zYZ(VZ]!/z]^(V^#o!/z#o#p!5w#p#q!/z#q#r!5w#r;'S!/z;'S;=`!9s;=`<%l+x<%lO!/z!X!6OZU!T&jSOY!5wYZ+xZ]!5w]^+x^w!5wwx!6qx#O!5w#O#P!8a#P;'S!5w;'S;=`!9m<%lO!5w!X!6vZU!TOY!5wYZ+xZ]!5w]^+x^w!5wwx!7ix#O!5w#O#P!8a#P;'S!5w;'S;=`!9m<%lO!5w!X!7nZU!TOY!5wYZ+xZ]!5w]^+x^w!5wwx!4Yx#O!5w#O#P!8a#P;'S!5w;'S;=`!9m<%lO!5w!X!8fWU!TOY!5wYZ+xZ]!5w]^+x^;'S!5w;'S;=`!9O;=`<%l+x<%lO!5w!X!9TW&jSOw+xwx,dx#O+x#O#P-c#P;'S+x;'S;=`.^;=`<%l!5w<%lO+x!X!9pP;=`<%l!5w#k!9xW&jSOw+xwx,dx#O+x#O#P-c#P;'S+x;'S;=`.^;=`<%l!/z<%lO+x#k!:eP;=`<%l!/z#s!:qaU!T&r!b&mWOY!+|YZ%TZ]!+|]^%T^r!+|rs!-^sw!+|wx!;vx#O!+|#O#P!FW#P#o!+|#o#p!GT#p#q!+|#q#r!GT#r;'S!+|;'S;=`!Nh<%lO!+|#s!<PaU!T&r!b&mWOY!+|YZ%TZ]!+|]^%T^r!+|rs!-^sw!+|wx!=Ux#O!+|#O#P!FW#P#o!+|#o#p!GT#p#q!+|#q#r!GT#r;'S!+|;'S;=`!Nh<%lO!+|#o!=__U!T&r!b&mWOY!=UYZ1XZ]!=U]^1X^r!=Urs!>^s#O!=U#O#P!@j#P#o!=U#o#p!Ag#p#q!=U#q#r!Ag#r;'S!=U;'S;=`!FQ<%lO!=U#o!>e_U!T&r!bOY!=UYZ1XZ]!=U]^1X^r!=Urs!?ds#O!=U#O#P!@j#P#o!=U#o#p!Ag#p#q!=U#q#r!Ag#r;'S!=U;'S;=`!FQ<%lO!=U#o!?k_U!T&r!bOY!=UYZ1XZ]!=U]^1X^r!=Urs!3`s#O!=U#O#P!@j#P#o!=U#o#p!Ag#p#q!=U#q#r!Ag#r;'S!=U;'S;=`!FQ<%lO!=U#o!@q[U!T&r!bOY!=UYZ1XZ]!=U]^1X^#o!=U#o#p!Ag#p#q!=U#q#r!Ag#r;'S!=U;'S;=`!Ec;=`<%l4`<%lO!=U!]!AnZU!T&mWOY!AgYZ4`Z]!Ag]^4`^r!Agrs!Bas#O!Ag#O#P!DP#P;'S!Ag;'S;=`!E]<%lO!Ag!]!BfZU!TOY!AgYZ4`Z]!Ag]^4`^r!Agrs!CXs#O!Ag#O#P!DP#P;'S!Ag;'S;=`!E]<%lO!Ag!]!C^ZU!TOY!AgYZ4`Z]!Ag]^4`^r!Agrs!4Ys#O!Ag#O#P!DP#P;'S!Ag;'S;=`!E]<%lO!Ag!]!DUWU!TOY!AgYZ4`Z]!Ag]^4`^;'S!Ag;'S;=`!Dn;=`<%l4`<%lO!Ag!]!DsW&mWOr4`rs4zs#O4`#O#P5y#P;'S4`;'S;=`6t;=`<%l!Ag<%lO4`!]!E`P;=`<%l!Ag#o!EhW&mWOr4`rs4zs#O4`#O#P5y#P;'S4`;'S;=`6t;=`<%l!=U<%lO4`#o!FTP;=`<%l!=U#s!F_[U!T&r!bOY!+|YZ%TZ]!+|]^%T^#o!+|#o#p!GT#p#q!+|#q#r!GT#r;'S!+|;'S;=`!Mq;=`<%l8^<%lO!+|!a!G^]U!T&jS&mWOY!GTYZ8^Z]!GT]^8^^r!GTrs!HVsw!GTwx!JVx#O!GT#O#P!LV#P;'S!GT;'S;=`!Mk<%lO!GT!a!H^]U!T&jSOY!GTYZ8^Z]!GT]^8^^r!GTrs!IVsw!GTwx!JVx#O!GT#O#P!LV#P;'S!GT;'S;=`!Mk<%lO!GT!a!I^]U!T&jSOY!GTYZ8^Z]!GT]^8^^r!GTrs!5wsw!GTwx!JVx#O!GT#O#P!LV#P;'S!GT;'S;=`!Mk<%lO!GT!a!J^]U!T&mWOY!GTYZ8^Z]!GT]^8^^r!GTrs!HVsw!GTwx!KVx#O!GT#O#P!LV#P;'S!GT;'S;=`!Mk<%lO!GT!a!K^]U!T&mWOY!GTYZ8^Z]!GT]^8^^r!GTrs!HVsw!GTwx!Agx#O!GT#O#P!LV#P;'S!GT;'S;=`!Mk<%lO!GT!a!L[WU!TOY!GTYZ8^Z]!GT]^8^^;'S!GT;'S;=`!Lt;=`<%l8^<%lO!GT!a!L{Y&jS&mWOr8^rs9Qsw8^wx:dx#O8^#O#P;v#P;'S8^;'S;=`<y;=`<%l!GT<%lO8^!a!MnP;=`<%l!GT#s!MxY&jS&mWOr8^rs9Qsw8^wx:dx#O8^#O#P;v#P;'S8^;'S;=`<y;=`<%l!+|<%lO8^#s!NkP;=`<%l!+|#b!Ny_&PQ&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!_%T!_!`# x!`#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#b#!T]!{r&r!b&jS&mWOr%Trs&Vsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#b##X_%yQ&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!_%T!_!`# x!`#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#c#$aa&r!b&mW&hsOY#%fYZ%TZ]#%f]^%T^r#%frs#&vsw#%fwx#8Ux#O#%f#O#P#0}#P#o#%f#o#p#1l#p#q#%f#q#r#1l#r;'S#%f;'S;=`#8O<%lO#%f#c#%qa&r!b&jS&mW&hsOY#%fYZ%TZ]#%f]^%T^r#%frs#&vsw#%fwx#/{x#O#%f#O#P#0}#P#o#%f#o#p#1l#p#q#%f#q#r#1l#r;'S#%f;'S;=`#8O<%lO#%f#c#'Pa&r!b&jS&hsOY#%fYZ%TZ]#%f]^%T^r#%frs#(Usw#%fwx#/{x#O#%f#O#P#0}#P#o#%f#o#p#1l#p#q#%f#q#r#1l#r;'S#%f;'S;=`#8O<%lO#%f#c#(_a&r!b&jS&hsOY#%fYZ%TZ]#%f]^%T^r#%frs#)dsw#%fwx#/{x#O#%f#O#P#0}#P#o#%f#o#p#1l#p#q#%f#q#r#1l#r;'S#%f;'S;=`#8O<%lO#%f#Z#)m_&r!b&jS&hsOY#)dYZ(VZ]#)d]^(V^w#)dwx#*lx#O#)d#O#P#+f#P#o#)d#o#p#,T#p#q#)d#q#r#,T#r;'S#)d;'S;=`#/u<%lO#)d#Z#*sZ&r!b&hsOw(Vwx)wx#O(V#O#P+Z#P#o(V#o#p+x#p#q(V#q#r+x#r;'S(V;'S;=`/R<%lO(V#Z#+kW&r!bO#o#)d#o#p#,T#p#q#)d#q#r#,T#r;'S#)d;'S;=`#.x;=`<%l#,T<%lO#)dw#,[Z&jS&hsOY#,TYZ+xZ]#,T]^+x^w#,Twx#,}x#O#,T#O#P#-i#P;'S#,T;'S;=`#.r<%lO#,Tw#-SV&hsOw+xwx,|x#O+x#O#P-c#P;'S+x;'S;=`.^<%lO+xw#-lRO;'S#,T;'S;=`#-u;=`O#,Tw#-|[&jS&hsOY#,TYZ+xZ]#,T]^+x^w#,Twx#,}x#O#,T#O#P#-i#P;'S#,T;'S;=`#.r;=`<%l#,T<%lO#,Tw#.uP;=`<%l#,T#Z#/P[&jS&hsOY#,TYZ+xZ]#,T]^+x^w#,Twx#,}x#O#,T#O#P#-i#P;'S#,T;'S;=`#.r;=`<%l#)d<%lO#,T#Z#/xP;=`<%l#)d#c#0U]&r!b&mW&hsOr%Trs&Vsw%Twx0Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#c#1SW&r!bO#o#%f#o#p#1l#p#q#%f#q#r#1l#r;'S#%f;'S;=`#6y;=`<%l#1l<%lO#%f!P#1u]&jS&mW&hsOY#1lYZ8^Z]#1l]^8^^r#1lrs#2nsw#1lwx#4nx#O#1l#O#P#5b#P;'S#1l;'S;=`#6s<%lO#1l!P#2u]&jS&hsOY#1lYZ8^Z]#1l]^8^^r#1lrs#3nsw#1lwx#4nx#O#1l#O#P#5b#P;'S#1l;'S;=`#6s<%lO#1l!P#3u]&jS&hsOY#1lYZ8^Z]#1l]^8^^r#1lrs#,Tsw#1lwx#4nx#O#1l#O#P#5b#P;'S#1l;'S;=`#6s<%lO#1l!P#4uX&mW&hsOr8^rs9Qsw8^wx;Ux#O8^#O#P;v#P;'S8^;'S;=`<y<%lO8^!P#5eRO;'S#1l;'S;=`#5n;=`O#1l!P#5w^&jS&mW&hsOY#1lYZ8^Z]#1l]^8^^r#1lrs#2nsw#1lwx#4nx#O#1l#O#P#5b#P;'S#1l;'S;=`#6s;=`<%l#1l<%lO#1l!P#6vP;=`<%l#1l#c#7S^&jS&mW&hsOY#1lYZ8^Z]#1l]^8^^r#1lrs#2nsw#1lwx#4nx#O#1l#O#P#5b#P;'S#1l;'S;=`#6s;=`<%l#%f<%lO#1l#c#8RP;=`<%l#%f#c#8_]&r!b&mW&hsOr%Trs&Vsw%Twx#9Wx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#c#9cZ&kS&r!b&mW&isOr1Xrs2Rs#O1X#O#P3q#P#o1X#o#p4`#p#q1X#q#r4`#r;'S1X;'S;=`7i<%lO1X#c#:a]js&r!b&jS&mWOr%Trs&Vsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T!q#;e]iR&r!b&jS&mWOr%Trs&Vsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#c#<iaXs&r!b&jS&mWOr%Trs&Vsw%Twx/Xxz%Tz{#=n{!_%T!_!`# x!`#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#c#=y_cR&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!_%T!_!`# x!`#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#c#?T_%|s&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!_%T!_!`# x!`#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T!q#@_]|R&r!b&jS&mWOr%Trs&Vsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#s#Ac`%}s&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!_%T!_!`# x!`!a#Be!a#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#O#Bp]'R`&r!b&jS&mWOr%Trs&Vsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#c#Cta!hQ&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!O%T!O!P#Dy!P!Q%T!Q![#GV![#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#c#ES_&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!O%T!O!P#FR!P#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#c#F^]!us&r!b&jS&mWOr%Trs&Vsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#a#Gbi!jq&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!Q%T!Q![#GV![!g%T!g!h#IP!h!l%T!l!m#MZ!m#O%T#O#P7o#P#R%T#R#S#GV#S#X%T#X#Y#IP#Y#^%T#^#_#MZ#_#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#a#IYc&r!b&jS&mWOr%Trs&Vsw%Twx/Xx{%T{|#Je|}%T}!O#Je!O!Q%T!Q![#Km![#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#a#Jn_&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!Q%T!Q![#Km![#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#a#Kxe!jq&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!Q%T!Q![#Km![!l%T!l!m#MZ!m#O%T#O#P7o#P#R%T#R#S#Km#S#^%T#^#_#MZ#_#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#a#Mf]!jq&r!b&jS&mWOr%Trs&Vsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#c#Nja&OR&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!P%T!P!Q$ o!Q!_%T!_!`# x!`#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#b$ z_&QQ&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!_%T!_!`# x!`#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#a$#Uw!jq&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!O%T!O!P$%o!P!Q%T!Q![$&w![!d%T!d!e$(w!e!g%T!g!h#IP!h!l%T!l!m#MZ!m!q%T!q!r$+m!r!z%T!z!{$.]!{#O%T#O#P7o#P#R%T#R#S$&w#S#U%T#U#V$(w#V#X%T#X#Y#IP#Y#^%T#^#_#MZ#_#c%T#c#d$+m#d#l%T#l#m$.]#m#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#a$%x_&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!Q%T!Q![#GV![#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#a$'Sk!jq&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!O%T!O!P$%o!P!Q%T!Q![$&w![!g%T!g!h#IP!h!l%T!l!m#MZ!m#O%T#O#P7o#P#R%T#R#S$&w#S#X%T#X#Y#IP#Y#^%T#^#_#MZ#_#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#a$)Qb&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!Q%T!Q!R$*Y!R!S$*Y!S#O%T#O#P7o#P#R%T#R#S$*Y#S#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#a$*eb!jq&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!Q%T!Q!R$*Y!R!S$*Y!S#O%T#O#P7o#P#R%T#R#S$*Y#S#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#a$+va&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!Q%T!Q!Y$,{!Y#O%T#O#P7o#P#R%T#R#S$,{#S#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#a$-Wa!jq&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!Q%T!Q!Y$,{!Y#O%T#O#P7o#P#R%T#R#S$,{#S#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#a$.fe&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!Q%T!Q![$/w![!c%T!c!i$/w!i#O%T#O#P7o#P#R%T#R#S$/w#S#T%T#T#Z$/w#Z#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#a$0Se!jq&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!Q%T!Q![$/w![!c%T!c!i$/w!i#O%T#O#P7o#P#R%T#R#S$/w#S#T%T#T#Z$/w#Z#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#s$1p_}!T&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!_%T!_!`$2o!`#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T!q$2z]&YR&r!b&jS&mWOr%Trs&Vsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#c$4O]#js&r!b&jS&mWOr%Trs&Vsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#c$5SaoR&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!^%T!^!_$6X!_!`Av!`!aAv!a#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#b$6d_%zQ&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!_%T!_!`# x!`#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#c$7n_&Xs&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!_%T!_!`Av!`#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#c$8x`oR&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!_%T!_!`Av!`!a$9z!a#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#b$:V_%{Q&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!_%T!_!`# x!`#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#c$;c_aQ$QP&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!_%T!_!`# x!`#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#s$<oe&r!b&jS&mW&g`&SsOr%Trs&Vsw%Twx/Xx!Q%T!Q![$<b![!c%T!c!}$<b!}#O%T#O#P7o#P#R%T#R#S$<b#S#T%T#T#o$<b#o#p8^#p#q%T#q#r8^#r$g%T$g;'S$<b;'S;=`$>Q<%lO$<b#s$>TP;=`<%l$<b#s$>ei&r!b&jS&mW&g`&SsOr%Trs$@Ssw%Twx$C`x!Q%T!Q![$<b![!c%T!c!t$<b!t!u$Fl!u!}$<b!}#O%T#O#P7o#P#R%T#R#S$<b#S#T%T#T#f$<b#f#g$Fl#g#o$<b#o#p8^#p#q%T#q#r8^#r$g%T$g;'S$<b;'S;=`$>Q<%lO$<b#c$@]a&r!b&jS&hsOYE^YZ%TZ]E^]^%T^rE^rs$AbswE^wxGpx#OE^#O#P!!u#P#oE^#o#p!#d#p#qE^#q#r!#d#r;'SE^;'S;=`!)v<%lOE^#c$Ak]&r!b&jS&hsOr%Trs$Bdsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#Z$BmZ&r!b&jS&lsOw(Vwx)Px#O(V#O#P+Z#P#o(V#o#p+x#p#q(V#q#r+x#r;'S(V;'S;=`/R<%lO(V#c$Cia&r!b&mW&hsOY#%fYZ%TZ]#%f]^%T^r#%frs#&vsw#%fwx$Dnx#O#%f#O#P#0}#P#o#%f#o#p#1l#p#q#%f#q#r#1l#r;'S#%f;'S;=`#8O<%lO#%f#c$Dw]&r!b&mW&hsOr%Trs&Vsw%Twx$Epx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#_$EyZ&r!b&mW&isOr1Xrs2Rs#O1X#O#P3q#P#o1X#o#p4`#p#q1X#q#r4`#r;'S1X;'S;=`7i<%lO1X#s$Fye&r!b&jS&mW&g`&SsOr%Trs$@Ssw%Twx$C`x!Q%T!Q![$<b![!c%T!c!}$<b!}#O%T#O#P7o#P#R%T#R#S$<b#S#T%T#T#o$<b#o#p8^#p#q%T#q#r8^#r$g%T$g;'S$<b;'S;=`$>Q<%lO$<b#s$Hii&r!b&jS&mW&g`&SsOr%Trs$JWsw%Twx$MUx!Q%T!Q![$<b![!c%T!c!t$<b!t!u%!S!u!}$<b!}#O%T#O#P7o#P#R%T#R#S$<b#S#T%T#T#f$<b#f#g%!S#g#o$<b#o#p8^#p#q%T#q#r8^#r$g%T$g;'S$<b;'S;=`$>Q<%lO$<b#c$Ja]&r!b&jS&ssOr%Trs$KYsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#c$Ka]&r!b&jSOr%Trs$LYsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#Z$LcZ&r!b&jS&usOw(Vwx)Px#O(V#O#P+Z#P#o(V#o#p+x#p#q(V#q#r+x#r;'S(V;'S;=`/R<%lO(V#c$M_]&r!b&mW&osOr%Trs&Vsw%Twx$NWx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#c$N_]&r!b&mWOr%Trs&Vsw%Twx% Wx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#_% aZ&r!b&mW&tsOr1Xrs2Rs#O1X#O#P3q#P#o1X#o#p4`#p#q1X#q#r4`#r;'S1X;'S;=`7i<%lO1X#s%!ae&r!b&jS&mW&g`&SsOr%Trs$JWsw%Twx$MUx!Q%T!Q![$<b![!c%T!c!}$<b!}#O%T#O#P7o#P#R%T#R#S$<b#S#T%T#T#o$<b#o#p8^#p#q%T#q#r8^#r$g%T$g;'S$<b;'S;=`$>Q<%lO$<b#s%$Pm&r!b&jS&mW&g`&SsOr%Trs$@Ssw%Twx$C`x!Q%T!Q![$<b![!c%T!c!h$<b!h!i%!S!i!t$<b!t!u$Fl!u!}$<b!}#O%T#O#P7o#P#R%T#R#S$<b#S#T%T#T#U$<b#U#V$Fl#V#Y$<b#Y#Z%!S#Z#o$<b#o#p8^#p#q%T#q#r8^#r$g%T$g;'S$<b;'S;=`$>Q<%lO$<b#c%&V]!Zs&r!b&jS&mWOr%Trs&Vsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T!q%'Z]!YR&r!b&jS&mWOr%Trs&Vsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#b%(__%xQ&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!_%T!_!`# x!`#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#a%)gX!_#T&jS&mWOr8^rs9Qsw8^wx:dx#O8^#O#P;v#P;'S8^;'S;=`<y<%lO8^#c%*__%wR&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!_%T!_!`# x!`#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T!q%+gX!^!e&jS&mWOr8^rs9Qsw8^wx:dx#O8^#O#P;v#P;'S8^;'S;=`<y<%lO8^#a%,_]&Rq&r!b&jS&mWOr%Trs&Vsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T",tokenizers:[IL,RL,PL,BL,zL,FL,UL,0,1,2,3,4,5,6],topRules:{Script:[0,7]},specialized:[{term:234,get:e=>qL[e]||-1}],tokenPrec:7372}),HL="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),VL="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),WL="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class XL{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function i(e,t,o,s){let a=[],l=/^@(\w+)\b/.exec(e[0]),c=l&&"keyframes"==l[1];if(l&&null==t)return o.push(e[0]+";");for(let n in t){let s=t[n];if(/&/.test(n))i(n.split(/,\s*/).map(t=>e.map(e=>t.replace(/&/,e))).reduce((e,t)=>e.concat(t)),s,o);else if(s&&"object"==typeof s){if(!l)throw new RangeError("The value of a property ("+n+") should be a primitive value.");i(r(n),s,a,c)}else null!=s&&a.push(n.replace(/_.*/,"").replace(/[A-Z]/g,e=>"-"+e.toLowerCase())+": "+s+";")}(a.length||c)&&o.push((!n||l||s?e:e.map(n)).join(", ")+" {"+a.join(" ")+"}")}for(let t in e)i(r(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=WL[HL]||1;return WL[HL]=e+1,"ͼ"+e.toString(36)}static mount(e,t,n){let r=e[VL],i=n&&n.nonce;r?i&&r.setNonce(i):r=new ZL(e,i),r.mount(Array.isArray(t)?t:[t])}}let YL=new Map;class ZL{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let t=YL.get(n);if(t)return e.adoptedStyleSheets=[t.sheet,...e.adoptedStyleSheets],e[VL]=t;this.sheet=new r.CSSStyleSheet,e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets],YL.set(n,this)}else{this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);let r=e.head||e;r.insertBefore(this.styleTag,r.firstChild)}this.modules=[],e[VL]=this}mount(e){let t=this.sheet,n=0,r=0;for(let i=0;i<e.length;i++){let o=e[i],s=this.modules.indexOf(o);if(s<r&&s>-1&&(this.modules.splice(s,1),r--,s=-1),-1==s){if(this.modules.splice(r++,0,o),t)for(let e=0;e<o.rules.length;e++)t.insertRule(o.rules[e],n++)}else{for(;r<s;)n+=this.modules[r++].rules.length;n+=o.rules.length,r++}}if(!t){let e="";for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+"\n";this.styleTag.textContent=e}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}function JL(e){let t;return t=11==e.nodeType?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function KL(e,t){return!!t&&(e==t||e.contains(1!=t.nodeType?t.parentNode:t))}function eB(e,t){if(!t.anchorNode)return!1;try{return KL(e,t.anchorNode)}catch(e){return!1}}function tB(e){return 3==e.nodeType?hB(e,0,e.nodeValue.length).getClientRects():1==e.nodeType?e.getClientRects():[]}function nB(e,t,n,r){return!!n&&(iB(e,t,n,r,-1)||iB(e,t,n,r,1))}function rB(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function iB(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:oB(e))){if("DIV"==e.nodeName)return!1;let n=e.parentNode;if(!n||1!=n.nodeType)return!1;t=rB(e)+(i<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if(1==(e=e.childNodes[t+(i<0?-1:0)]).nodeType&&"false"==e.contentEditable)return!1;t=i<0?oB(e):0}}}function oB(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function sB(e,t){let n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function aB(e){return{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}class lB{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?oB(t):0),n,Math.min(e.focusOffset,n?oB(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}}let cB,uB=null;function dB(e){if(e.setActive)return e.setActive();if(uB)return e.focus(uB);let t=[];for(let n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(null==uB?{get preventScroll(){return uB={preventScroll:!0},!0}}:void 0),!uB){uB=!1;for(let e=0;e<t.length;){let n=t[e++],r=t[e++],i=t[e++];n.scrollTop!=r&&(n.scrollTop=r),n.scrollLeft!=i&&(n.scrollLeft=i)}}}function hB(e,t,n=t){let r=cB||(cB=document.createRange());return r.setEnd(e,n),r.setStart(e,t),r}function pB(e,t,n){let r={key:t,code:t,keyCode:n,which:n,cancelable:!0},i=new KeyboardEvent("keydown",r);i.synthetic=!0,e.dispatchEvent(i);let o=new KeyboardEvent("keyup",r);return o.synthetic=!0,e.dispatchEvent(o),i.defaultPrevented||o.defaultPrevented}function fB(e){for(;e.attributes.length;)e.removeAttributeNode(e.attributes[0])}function mB(e){return e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}class gB{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(e,t){return new gB(e.parentNode,rB(e),t)}static after(e,t){return new gB(e.parentNode,rB(e)+1,t)}}const bB=[];class vB{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let n of this.children){if(n==e)return t;t+=n.length+n.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,t){if(2&this.flags){let n,r=this.dom,i=null;for(let o of this.children){if(7&o.flags){if(!o.dom&&(n=i?i.nextSibling:r.firstChild)){let e=vB.get(n);(!e||!e.parent&&e.canReuseDOM(o))&&o.reuseDOM(n)}o.sync(e,t),o.flags&=-8}if(n=i?i.nextSibling:r.firstChild,t&&!t.written&&t.node==r&&n!=o.dom&&(t.written=!0),o.dom.parentNode==r)for(;n&&n!=o.dom;)n=yB(n);else r.insertBefore(o.dom,n);i=o.dom}for(n=i?i.nextSibling:r.firstChild,n&&t&&t.node==r&&(t.written=!0);n;)n=yB(n)}else if(1&this.flags)for(let n of this.children)7&n.flags&&(n.sync(e,t),n.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,t){let n;if(e==this.dom)n=this.dom.childNodes[t];else{let r=0==oB(e)?0:0==t?-1:1;for(;;){let t=e.parentNode;if(t==this.dom)break;0==r&&t.firstChild!=t.lastChild&&(r=e==t.firstChild?-1:1),e=t}n=r<0?e:e.nextSibling}if(n==this.dom.firstChild)return 0;for(;n&&!vB.get(n);)n=n.nextSibling;if(!n)return this.length;for(let e=0,t=0;;e++){let r=this.children[e];if(r.dom==n)return t;t+=r.length+r.breakAfter}}domBoundsAround(e,t,n=0){let r=-1,i=-1,o=-1,s=-1;for(let a=0,l=n,c=n;a<this.children.length;a++){let n=this.children[a],u=l+n.length;if(l<e&&u>t)return n.domBoundsAround(e,t,l);if(u>=e&&-1==r&&(r=a,i=l),l>t&&n.dom.parentNode==this.dom){o=a,s=c;break}c=u,l=u+n.breakAfter}return{from:i,to:s<0?n+this.length:s,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o<this.children.length&&o>=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),1&t.flags)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,7&this.flags&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,n=bB){this.markDirty();for(let n=e;n<t;n++){let e=this.children[n];e.parent==this&&e.destroy()}this.children.splice(e,t-e,...n);for(let e=0;e<n.length;e++)n[e].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new SB(this.children,e,this.children.length)}childPos(e,t=1){return this.childCursor().findPos(e,t)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==e?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,t,n,r,i,o){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!(8&(this.flags|e.flags))}getSide(){return 0}destroy(){this.parent=null}}function yB(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}vB.prototype.breakAfter=0;class SB{constructor(e,t,n){this.children=e,this.pos=t,this.i=n,this.off=0}findPos(e,t=1){for(;;){if(e>this.pos||e==this.pos&&(t>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function _B(e,t,n,r,i,o,s,a,l){let{children:c}=e,u=c.length?c[t]:null,d=o.length?o[o.length-1]:null,h=d?d.breakAfter:s;if(!(t==r&&u&&!s&&!h&&o.length<2&&u.merge(n,i,o.length?d:null,0==n,a,l))){if(r<c.length){let e=c[r];e&&(i<e.length||e.breakAfter&&(null==d?void 0:d.breakAfter))?(t==r&&(e=e.split(i),i=0),!h&&d&&e.merge(0,i,d,!0,0,l)?o[o.length-1]=e:((i||e.children.length&&!e.children[0].length)&&e.merge(0,i,null,!1,0,l),o.push(e))):(null==e?void 0:e.breakAfter)&&(d?d.breakAfter=1:s=1),r++}for(u&&(u.breakAfter=s,n>0&&(!s&&o.length&&u.merge(n,u.length,o[0],!1,a,0)?u.breakAfter=o.shift().breakAfter:(n<u.length||u.children.length&&0==u.children[u.children.length-1].length)&&u.merge(n,u.length,null,!1,a,0),t++));t<r&&o.length;)if(c[r-1].become(o[o.length-1]))r--,o.pop(),l=o.length?0:a;else{if(!c[t].become(o[0]))break;t++,o.shift(),a=o.length?0:l}!o.length&&t&&r<c.length&&!c[t-1].breakAfter&&c[r].merge(0,0,c[t-1],!1,a,l)&&t--,(t<r||o.length)&&e.replaceChildren(t,r,o)}}function xB(e,t,n,r,i,o){let s=e.childCursor(),{i:a,off:l}=s.findPos(n,1),{i:c,off:u}=s.findPos(t,-1),d=t-n;for(let e of r)d+=e.length;e.length+=d,_B(e,c,u,a,l,r,0,i,o)}let wB="undefined"!=typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},kB="undefined"!=typeof document?document:{documentElement:{style:{}}};const OB=/Edge\/(\d+)/.exec(wB.userAgent),EB=/MSIE \d/.test(wB.userAgent),AB=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(wB.userAgent),TB=!!(EB||AB||OB),CB=!TB&&/gecko\/(\d+)/i.test(wB.userAgent),MB=!TB&&/Chrome\/(\d+)/.exec(wB.userAgent),$B="webkitFontSmoothing"in kB.documentElement.style,PB=!TB&&/Apple Computer/.test(wB.vendor),RB=PB&&(/Mobile\/\w+/.test(wB.userAgent)||wB.maxTouchPoints>2);var jB={mac:RB||/Mac/.test(wB.platform),windows:/Win/.test(wB.platform),linux:/Linux|X11/.test(wB.platform),ie:TB,ie_version:EB?kB.documentMode||6:AB?+AB[1]:OB?+OB[1]:0,gecko:CB,gecko_version:CB?+(/Firefox\/(\d+)/.exec(wB.userAgent)||[0,0])[1]:0,chrome:!!MB,chrome_version:MB?+MB[1]:0,ios:RB,android:/Android\b/.test(wB.userAgent),webkit:$B,safari:PB,webkit_version:$B?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=kB.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class NB extends vB{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){3==e.nodeType&&this.createDOM(e)}merge(e,t,n){return!(8&this.flags||n&&(!(n instanceof NB)||this.length-(t-e)+n.length>256||8&n.flags))&&(this.text=this.text.slice(0,e)+(n?n.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new NB(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=8&this.flags,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new gB(this.dom,e)}domBoundsAround(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return function(e,t,n){let r=e.nodeValue.length;t>r&&(t=r);let i=t,o=t,s=0;0==t&&n<0||t==r&&n>=0?jB.chrome||jB.gecko||(t?(i--,s=1):o<r&&(o++,s=-1)):n<0?i--:o<r&&o++;let a=hB(e,i,o).getClientRects();if(!a.length)return null;let l=a[(s?s<0:n>=0)?0:a.length-1];jB.safari&&!s&&0==l.width&&(l=Array.prototype.find.call(a,e=>e.width)||l);return s?sB(l,s<0):l||null}(this.dom,e,t)}}class DB extends vB{constructor(e,t=[],n=0){super(),this.mark=e,this.children=t,this.length=n;for(let e of t)e.setParent(this)}setAttrs(e){if(fB(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!(8&(this.flags|e.flags))}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,n,r,i,o){return(!n||!(!(n instanceof DB&&n.mark.eq(this.mark))||e&&i<=0||t<this.length&&o<=0))&&(xB(this,e,t,n?n.children:[],i-1,o-1),this.markDirty(),!0)}split(e){let t=[],n=0,r=-1,i=0;for(let o of this.children){let s=n+o.length;s>e&&t.push(n<e?o.split(e-n):o),r<0&&n>=e&&(r=i),n=s,i++}let o=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new DB(this.mark,t,o)}domAtPos(e){return BB(this,e)}coordsAt(e,t){return zB(this,e,t)}}class IB extends vB{static create(e,t,n){return new IB(e,t,n)}constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}split(e){let t=IB.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}getSide(){return this.side}merge(e,t,n,r,i,o){return!(n&&(!(n instanceof IB&&this.widget.compare(n.widget))||e>0&&i<=0||t<this.length&&o<=0))&&(this.length=e+(n?n.length:0)+(this.length-t),!0)}become(e){return e instanceof IB&&e.side==this.side&&this.widget.constructor==e.widget.constructor&&(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0)}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(0==this.length)return zx.empty;let e=this;for(;e.parent;)e=e.parent;let{view:t}=e,n=t&&t.state.doc,r=this.posAtStart;return n?n.slice(r,r+this.length):zx.empty}domAtPos(e){return(this.length?0==e:this.side>0)?gB.before(this.dom):gB.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);if(n)return n;let r=this.dom.getClientRects(),i=null;if(!r.length)return null;let o=this.side?this.side<0:e>0;for(let t=o?r.length-1:0;i=r[t],!(e>0?0==t:t==r.length-1||i.top<i.bottom);t+=o?-1:1);return sB(i,!o)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class LB extends vB{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof LB&&e.side==this.side}split(){return new LB(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?gB.before(this.dom):gB.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return zx.empty}get isHidden(){return!0}}function BB(e,t){let n=e.dom,{children:r}=e,i=0;for(let e=0;i<r.length;i++){let o=r[i],s=e+o.length;if(!(s==e&&o.getSide()<=0)){if(t>e&&t<s&&o.dom.parentNode==n)return o.domAtPos(t-e);if(t<=e)break;e=s}}for(let e=i;e>0;e--){let t=r[e-1];if(t.dom.parentNode==n)return t.domAtPos(t.length)}for(let e=i;e<r.length;e++){let t=r[e];if(t.dom.parentNode==n)return t.domAtPos(0)}return new gB(n,0)}function zB(e,t,n){let r=null,i=-1,o=null,s=-1;!function e(t,a){for(let l=0,c=0;l<t.children.length&&c<=a;l++){let u=t.children[l],d=c+u.length;d>=a&&(u.children.length?e(u,a-c):(!o||o.isHidden&&n>0)&&(d>a||c==d&&u.getSide()>0)?(o=u,s=a-c):(c<a||c==d&&u.getSide()<0&&!u.isHidden)&&(r=u,i=a-c)),c=d}}(e,t);let a=(n<0?r:o)||r||o;return a?a.coordsAt(Math.max(0,a==r?i:s),n):function(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=tB(t);return n[n.length-1]||null}(e)}function FB(e,t){for(let n in e)"class"==n&&t.class?t.class+=" "+e.class:"style"==n&&t.style?t.style+=";"+e.style:t[n]=e[n];return t}NB.prototype.children=IB.prototype.children=LB.prototype.children=bB;const UB=Object.create(null);function QB(e,t,n){if(e==t)return!0;e||(e=UB),t||(t=UB);let r=Object.keys(e),i=Object.keys(t);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let o of r)if(o!=n&&(-1==i.indexOf(o)||e[o]!==t[o]))return!1;return!0}function qB(e,t,n){let r=!1;if(t)for(let i in t)n&&i in n||(r=!0,"style"==i?e.style.cssText="":e.removeAttribute(i));if(n)for(let i in n)t&&t[i]==n[i]||(r=!0,"style"==i?e.style.cssText=n[i]:e.setAttribute(i,n[i]));return r}function GB(e){let t=Object.create(null);for(let n=0;n<e.attributes.length;n++){let r=e.attributes[n];t[r.name]=r.value}return t}class HB extends vB{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,n,r,i,o){if(n){if(!(n instanceof HB))return!1;this.dom||n.transferDOM(this)}return r&&this.setDeco(n?n.attrs:null),xB(this,e,t,n?n.children:[],i,o),!0}split(e){let t=new HB;if(t.breakAfter=this.breakAfter,0==this.length)return t;let{i:n,off:r}=this.childPos(e);r&&(t.append(this.children[n].split(r),0),this.children[n].merge(r,this.children[n].length,null,!1,0,0),n++);for(let e=n;e<this.children.length;e++)t.append(this.children[e],0);for(;n>0&&0==this.children[n-1].length;)this.children[--n].destroy();return this.children.length=n,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){QB(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){!function e(t,n,r){let i,{children:o}=t;r>0&&n instanceof DB&&o.length&&(i=o[o.length-1])instanceof DB&&i.mark.eq(n.mark)?e(i,n.children[0],r-1):(o.push(n),n.setParent(t)),t.length+=n.length}(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=FB(t,this.attrs||{})),n&&(this.attrs=FB({class:n},this.attrs||{}))}domAtPos(e){return BB(this,e)}reuseDOM(e){"DIV"==e.nodeName&&(this.setDOM(e),this.flags|=6)}sync(e,t){var n;this.dom?4&this.flags&&(fB(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(qB(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let r=this.dom.lastChild;for(;r&&vB.get(r)instanceof DB;)r=r.lastChild;if(!(r&&this.length&&("BR"==r.nodeName||0!=(null===(n=vB.get(r))||void 0===n?void 0:n.isEditable)||jB.ios&&this.children.some(e=>e instanceof NB)))){let e=document.createElement("BR");e.cmIgnore=!0,this.dom.appendChild(e)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let e,t=0;for(let n of this.children){if(!(n instanceof NB)||/[^ -~]/.test(n.text))return null;let r=tB(n.dom);if(1!=r.length)return null;t+=r[0].width,e=r[0].height}return t?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length,textHeight:e}:null}coordsAt(e,t){let n=zB(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:e}=this.parent.view.viewState,t=n.bottom-n.top;if(Math.abs(t-e.lineHeight)<2&&e.textHeight<t){let r=(t-e.textHeight)/2;return{top:n.top+r,bottom:n.bottom-r,left:n.left,right:n.left}}}return n}become(e){return!1}covers(){return!0}static find(e,t){for(let n=0,r=0;n<e.children.length;n++){let i=e.children[n],o=r+i.length;if(o>=t){if(i instanceof HB)return i;if(o>t)break}r=o+i.breakAfter}return null}}class VB extends vB{constructor(e,t,n){super(),this.widget=e,this.length=t,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(e,t,n,r,i,o){return!(n&&(!(n instanceof VB&&this.widget.compare(n.widget))||e>0&&i<=0||t<this.length&&o<=0))&&(this.length=e+(n?n.length:0)+(this.length-t),!0)}domAtPos(e){return 0==e?gB.before(this.dom):gB.after(this.dom,e==this.length)}split(e){let t=this.length-e;this.length=e;let n=new VB(this.widget,t,this.deco);return n.breakAfter=this.breakAfter,n}get children(){return bB}sync(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):zx.empty}domBoundsAround(){return null}become(e){return e instanceof VB&&e.widget.constructor==this.widget.constructor&&(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0)}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,t){return this.widget.coordsAt(this.dom,e,t)}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:t,endSide:n}=this.deco;return t!=n&&(e<0?t<0:n>0)}}class WB{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}destroy(e){}}var XB=function(e){return e[e.Text=0]="Text",e[e.WidgetBefore=1]="WidgetBefore",e[e.WidgetAfter=2]="WidgetAfter",e[e.WidgetRange=3]="WidgetRange",e}(XB||(XB={}));class YB extends uk{constructor(e,t,n,r){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(e){return new ZB(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new KB(e,t,t,n,e.widget||null,!1)}static replace(e){let t,n,r=!!e.block;if(e.isBlockGap)t=-5e8,n=4e8;else{let{start:i,end:o}=ez(e,r);t=(i?r?-3e8:-1:5e8)-1,n=1+(o?r?2e8:1:-6e8)}return new KB(e,t,n,r,e.widget||null,!0)}static line(e){return new JB(e)}static set(e,t=!1){return fk.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}YB.none=fk.empty;class ZB extends YB{constructor(e){let{start:t,end:n}=ez(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,n;return this==e||e instanceof ZB&&this.tagName==e.tagName&&(this.class||(null===(t=this.attrs)||void 0===t?void 0:t.class))==(e.class||(null===(n=e.attrs)||void 0===n?void 0:n.class))&&QB(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}ZB.prototype.point=!1;class JB extends YB{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof JB&&this.spec.class==e.spec.class&&QB(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}JB.prototype.mapMode=aw.TrackBefore,JB.prototype.point=!0;class KB extends YB{constructor(e,t,n,r,i,o){super(t,n,i,e),this.block=r,this.isReplace=o,this.mapMode=r?t<=0?aw.TrackBefore:aw.TrackAfter:aw.TrackDel}get type(){return this.startSide!=this.endSide?XB.WidgetRange:this.startSide<=0?XB.WidgetBefore:XB.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof KB&&(t=this.widget,n=e.widget,t==n||!!(t&&n&&t.compare(n)))&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide;var t,n}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}function ez(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return null==n&&(n=e.inclusive),null==r&&(r=e.inclusive),{start:null!=n?n:t,end:null!=r?r:t}}function tz(e,t,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}KB.prototype.point=!0;class nz{constructor(e,t,n,r){this.doc=e,this.pos=t,this.end=n,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof VB&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new HB),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(rz(new LB(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||e&&this.content.length&&this.content[this.content.length-1]instanceof VB||this.getLine()}buildText(e,t,n){for(;e>0;){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:r}=this.cursor.next(this.skip);if(this.skip=0,r)throw new Error("Ran out of text content when drawing inline views");if(n){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}this.text=t,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(rz(new NB(this.text.slice(this.textOff,this.textOff+r)),t),n),this.atCursorPos=!0,this.textOff+=r,e-=r,n=0}}span(e,t,n,r){this.buildText(t-e,n,r),this.pos=t,this.openStart<0&&(this.openStart=r)}point(e,t,n,r,i,o){if(this.disallowBlockEffectsFor[o]&&n instanceof KB){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let s=t-e;if(n instanceof KB)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new VB(n.widget||new iz("div"),s,n));else{let o=IB.create(n.widget||new iz("span"),s,s?0:n.startSide),a=this.atCursorPos&&!o.isEditable&&i<=r.length&&(e<t||n.startSide>0),l=!o.isEditable&&(e<t||i>r.length||n.startSide<=0),c=this.getLine();2!=this.pendingBuffer||a||o.isEditable||(this.pendingBuffer=0),this.flushBuffer(r),a&&(c.append(rz(new LB(1),r),i),i=r.length+Math.max(0,i-r.length)),c.append(rz(o,r),i),this.atCursorPos=l,this.pendingBuffer=l?e<t||i>r.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);s&&(this.textOff+s<=this.text.length?this.textOff+=s:(this.skip+=s-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=i)}static build(e,t,n,r,i){let o=new nz(e,t,n,i);return o.openEnd=fk.spans(r,t,n,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function rz(e,t){for(let n of t)e=new DB(n,[e],e.length);return e}class iz extends WB{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}const oz=Sw.define(),sz=Sw.define(),az=Sw.define(),lz=Sw.define(),cz=Sw.define(),uz=Sw.define(),dz=Sw.define(),hz=Sw.define({combine:e=>e.some(e=>e)}),pz=Sw.define({combine:e=>e.some(e=>e)});class fz{constructor(e,t="nearest",n="nearest",r=5,i=5,o=!1){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=i,this.isSnapshot=o}map(e){return e.empty?this:new fz(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new fz(bw.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const mz=Yw.define({map:(e,t)=>e.map(t)});function gz(e,t,n){let r=e.facet(lz);r.length?r[0](t):window.onerror?window.onerror(String(t),n,void 0,void 0,t):n?console.error(n+":",t):console.error(t)}const bz=Sw.define({combine:e=>!e.length||e[0]});let vz=0;const yz=Sw.define();class Sz{constructor(e,t,n,r,i){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=r,this.extension=i(this)}static define(e,t){const{eventHandlers:n,eventObservers:r,provide:i,decorations:o}=t||{};return new Sz(vz++,e,n,r,e=>{let t=[yz.of(e)];return o&&t.push(kz.of(t=>{let n=t.plugin(e);return n?o(n):YB.none})),i&&t.push(i(e)),t})}static fromClass(e,t){return Sz.define(t=>new e(t),t)}}class _z{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(gz(e.state,t,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(e){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){gz(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(null===(t=this.value)||void 0===t?void 0:t.destroy)try{this.value.destroy()}catch(t){gz(e.state,t,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const xz=Sw.define(),wz=Sw.define(),kz=Sw.define(),Oz=Sw.define(),Ez=Sw.define();function Az(e,t,n){let r=e.state.facet(Ez);if(!r.length)return r;let i=r.map(t=>t instanceof Function?t(e):t),o=[];return fk.spans(i,t,n,{point(){},span(e,t,n,r){let i=o;for(let o=n.length-1;o>=0;o--,r--){let s,a=n[o].spec.bidiIsolate;if(null!=a)if(r>0&&i.length&&(s=i[i.length-1]).to==e&&s.direction==a)s.to=t,i=s.inner;else{let n={from:e,to:t,direction:a,inner:[]};i.push(n),i=n.inner}}}}),o}const Tz=Sw.define();function Cz(e){let t=0,n=0,r=0,i=0;for(let o of e.state.facet(Tz)){let s=o(e);s&&(null!=s.left&&(t=Math.max(t,s.left)),null!=s.right&&(n=Math.max(n,s.right)),null!=s.top&&(r=Math.max(r,s.top)),null!=s.bottom&&(i=Math.max(i,s.bottom)))}return{left:t,right:n,top:r,bottom:i}}const Mz=Sw.define();class $z{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(e){return new $z(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>n.toA)){if(r.toA<n.fromA)break;n=n.join(r),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(e,t){if(0==t.length)return e;let n=[];for(let r=0,i=0,o=0,s=0;;r++){let a=r==e.length?null:e[r],l=o-s,c=a?a.fromB:1e9;for(;i<t.length&&t[i]<c;){let e=t[i],r=t[i+1],o=Math.max(s,e),a=Math.min(c,r);if(o<=a&&new $z(o+l,a+l,o,a).addToSet(n),r>c)break;i+=2}if(!a)return n;new $z(a.fromA,a.toA,a.fromB,a.toB).addToSet(n),o=a.toA,s=a.toB}}}class Pz{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=cw.empty(this.startState.doc.length);for(let e of n)this.changes=this.changes.compose(e.changes);let r=[];this.changes.iterChangedRanges((e,t,n,i)=>r.push(new $z(e,t,n,i))),this.changedRanges=r}static create(e,t,n){return new Pz(e,t,n)}get viewportChanged(){return(4&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(10&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return 0==this.flags&&0==this.transactions.length}}var Rz=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(Rz||(Rz={}));const jz=Rz.LTR,Nz=Rz.RTL;function Dz(e){let t=[];for(let n=0;n<e.length;n++)t.push(1<<+e[n]);return t}const Iz=Dz("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),Lz=Dz("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),Bz=Object.create(null),zz=[];for(let e of["()","[]","{}"]){let t=e.charCodeAt(0),n=e.charCodeAt(1);Bz[t]=n,Bz[n]=-t}const Fz=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Uz{get dir(){return this.level%2?Nz:jz}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}static find(e,t,n,r){let i=-1;for(let o=0;o<e.length;o++){let s=e[o];if(s.from<=t&&s.to>=t){if(s.level==n)return o;(i<0||(0!=r?r<0?s.from<t:s.to>t:e[i].level>s.level))&&(i=o)}}if(i<0)throw new RangeError("Index out of range");return i}}function Qz(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!Qz(r.inner,i.inner))return!1}return!0}const qz=[];function Gz(e,t,n,r,i,o,s){let a=t%2?2:1;!function(e,t,n,r,i){for(let s=0;s<=r.length;s++){let a=s?r[s-1].to:t,l=s<r.length?r[s].from:n,c=s?256:i;for(let t=a,n=c,r=c;t<l;t++){let i=(o=e.charCodeAt(t))<=247?Iz[o]:1424<=o&&o<=1524?2:1536<=o&&o<=1785?Lz[o-1536]:1774<=o&&o<=2220?4:8192<=o&&o<=8203?256:64336<=o&&o<=65023?4:8204==o?256:1;512==i?i=n:8==i&&4==r&&(i=16),qz[t]=4==i?2:i,7&i&&(r=i),n=i}for(let e=a,t=c,r=c;e<l;e++){let i=qz[e];if(128==i)e<l-1&&t==qz[e+1]&&24&t?i=qz[e]=t:qz[e]=256;else if(64==i){let i=e+1;for(;i<l&&64==qz[i];)i++;let o=e&&8==t||i<n&&8==qz[i]?1==r?1:8:256;for(let t=e;t<i;t++)qz[t]=o;e=i-1}else 8==i&&1==r&&(qz[e]=1);t=i,7&i&&(r=i)}}var o}(e,i,o,r,a),function(e,t,n,r,i){let o=1==i?2:1;for(let s=0,a=0,l=0;s<=r.length;s++){let c=s?r[s-1].to:t,u=s<r.length?r[s].from:n;for(let t,n,r,s=c;s<u;s++)if(n=Bz[t=e.charCodeAt(s)])if(n<0){for(let e=a-3;e>=0;e-=3)if(zz[e+1]==-n){let t=zz[e+2],n=2&t?i:4&t?1&t?o:i:0;n&&(qz[s]=qz[zz[e]]=n),a=e;break}}else{if(189==zz.length)break;zz[a++]=s,zz[a++]=t,zz[a++]=l}else if(2==(r=qz[s])||1==r){let e=r==i;l=e?0:1;for(let t=a-3;t>=0;t-=3){let n=zz[t+2];if(2&n)break;if(e)zz[t+2]|=2;else{if(4&n)break;zz[t+2]|=4}}}}}(e,i,o,r,a),function(e,t,n,r){for(let i=0,o=r;i<=n.length;i++){let s=i?n[i-1].to:e,a=i<n.length?n[i].from:t;for(let l=s;l<a;){let s=qz[l];if(256==s){let s=l+1;for(;;)if(s==a){if(i==n.length)break;s=n[i++].to,a=i<n.length?n[i].from:t}else{if(256!=qz[s])break;s++}let c=1==o,u=c==(1==(s<t?qz[s]:r))?c?1:2:r;for(let t=s,r=i,o=r?n[r-1].to:e;t>l;)t==o&&(t=n[--r].from,o=r?n[r-1].to:e),qz[--t]=u;l=s}else o=s,l++}}}(i,o,r,a),function e(t,n,r,i,o,s,a){let l=i%2?2:1;if(i%2==o%2)for(let c=n,u=0;c<r;){let n=!0,d=!1;if(u==s.length||c<s[u].from){let e=qz[c];e!=l&&(n=!1,d=16==e)}let h=n||1!=l?null:[],p=n?i:i+1,f=c;e:for(;;)if(u<s.length&&f==s[u].from){if(d)break e;let e=s[u];if(!n)for(let t=e.to,n=u+1;;){if(t==r)break e;if(!(n<s.length&&s[n].from==t)){if(qz[t]==l)break e;break}t=s[n++].to}if(u++,h)h.push(e);else{e.from>c&&a.push(new Uz(c,e.from,p)),Gz(t,e.direction==jz!=!(p%2)?i+1:i,o,e.inner,e.from,e.to,a),c=e.to}f=e.to}else{if(f==r||(n?qz[f]!=l:qz[f]==l))break;f++}h?e(t,c,f,i+1,o,h,a):c<f&&a.push(new Uz(c,f,p)),c=f}else for(let c=r,u=s.length;c>n;){let r=!0,d=!1;if(!u||c>s[u-1].to){let e=qz[c-1];e!=l&&(r=!1,d=16==e)}let h=r||1!=l?null:[],p=r?i:i+1,f=c;e:for(;;)if(u&&f==s[u-1].to){if(d)break e;let e=s[--u];if(!r)for(let t=e.from,r=u;;){if(t==n)break e;if(!r||s[r-1].to!=t){if(qz[t-1]==l)break e;break}t=s[--r].from}if(h)h.push(e);else{e.to<c&&a.push(new Uz(e.to,c,p)),Gz(t,e.direction==jz!=!(p%2)?i+1:i,o,e.inner,e.from,e.to,a),c=e.from}f=e.from}else{if(f==n||(r?qz[f-1]!=l:qz[f-1]==l))break;f--}h?e(t,f,c,i+1,o,h,a):f<c&&a.push(new Uz(f,c,p)),c=f}}(e,i,o,t,n,r,s)}function Hz(e,t,n){if(!e)return[new Uz(0,0,t==Nz?1:0)];if(t==jz&&!n.length&&!Fz.test(e))return Vz(e.length);if(n.length)for(;e.length>qz.length;)qz[qz.length]=256;let r=[],i=t==jz?0:1;return Gz(e,i,i,n,0,e.length,r),r}function Vz(e){return[new Uz(0,e,0)]}let Wz="";function Xz(e,t,n,r,i){var o;let s=r.head-e.from,a=-1;if(0==s){if(!i||!e.length)return null;t[0].level!=n&&(s=t[0].side(!1,n),a=0)}else if(s==e.length){if(i)return null;let e=t[t.length-1];e.level!=n&&(s=e.side(!0,n),a=t.length-1)}a<0&&(a=Uz.find(t,s,null!==(o=r.bidiLevel)&&void 0!==o?o:-1,r.assoc));let l=t[a];s==l.side(i,n)&&(l=t[a+=i?1:-1],s=l.side(!i,n));let c=i==(l.dir==n),u=Jx(e.text,s,c);if(Wz=e.text.slice(Math.min(s,u),Math.max(s,u)),u!=l.side(i,n))return bw.cursor(u+e.from,c?-1:1,l.level);let d=a==(i?t.length-1:0)?null:t[a+(i?1:-1)];return d||l.level==n?d&&d.level<l.level?bw.cursor(d.side(!i,n)+e.from,i?1:-1,d.level):bw.cursor(u+e.from,i?-1:1,l.level):bw.cursor(i?e.to:e.from,i?-1:1,n)}class Yz extends vB{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new HB],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new $z(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let n=e.changedRanges;this.minWidth>0&&n.length&&(n.every(({fromA:e,toA:t})=>t<this.minWidthFrom||e>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);let r=-1;this.view.inputState.composing>=0&&((null===(t=this.domChanged)||void 0===t?void 0:t.newSel)?r=this.domChanged.newSel.head:function(e,t){let n=!1;t&&e.iterChangedRanges((e,r)=>{e<t.to&&r>t.from&&(n=!0)});return n}(e.changes,this.hasComposition)||e.selectionSet||(r=e.state.selection.main.head));let i=r>-1?function(e,t,n){let r=Jz(e,n);if(!r)return null;let{node:i,from:o,to:s}=r,a=i.nodeValue;if(/[\n\r]/.test(a))return null;if(e.state.doc.sliceString(r.from,r.to)!=a)return null;let l=t.invertedDesc,c=new $z(l.mapPos(o),l.mapPos(s),o,s),u=[];for(let t=i.parentNode;;t=t.parentNode){let n=vB.get(t);if(n instanceof DB)u.push({node:t,deco:n.mark});else{if(n instanceof HB||"DIV"==t.nodeName&&t.parentNode==e.contentDOM)return{range:c,text:i,marks:u,line:t};if(t==e.contentDOM)return null;u.push({node:t,deco:new ZB({inclusive:!0,attributes:GB(t),tagName:t.tagName.toLowerCase()})})}}}(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:t,to:r}=this.hasComposition;n=new $z(t,r,e.changes.mapPos(t,-1),e.changes.mapPos(r,1)).addToSet(n.slice())}this.hasComposition=i?{from:i.range.fromB,to:i.range.toB}:null,(jB.ie||jB.chrome)&&!i&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=function(e,t,n){let r=new class{constructor(){this.changes=[]}compareRange(e,t){tz(e,t,this.changes)}comparePoint(e,t){tz(e,t,this.changes)}};return fk.compare(e,t,n,r),r.changes}(this.decorations,this.updateDeco(),e.changes);return n=$z.extendWithRanges(n,o),!!(7&this.flags||0!=n.length)&&(this.updateInner(n,e.startState.doc.length,i),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,n);let{observer:r}=this.view;r.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let e=jB.chrome||jB.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,e),this.flags&=-8,e&&(e.written||r.selectionRange.focusNode!=e.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(e=>e.flags&=-9);let i=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let e of this.children)e instanceof VB&&e.widget instanceof Zz&&i.push(e.dom);r.updateGaps(i)}updateChildren(e,t,n){let r=n?n.range.addToSet(e.slice()):e,i=this.childCursor(t);for(let e=r.length-1;;e--){let t=e>=0?r[e]:null;if(!t)break;let o,s,a,l,{fromA:c,toA:u,fromB:d,toB:h}=t;if(n&&n.range.fromB<h&&n.range.toB>d){let e=nz.build(this.view.state.doc,d,n.range.fromB,this.decorations,this.dynamicDecorationMap),t=nz.build(this.view.state.doc,n.range.toB,h,this.decorations,this.dynamicDecorationMap);s=e.breakAtStart,a=e.openStart,l=t.openEnd;let r=this.compositionView(n);t.breakAtStart?r.breakAfter=1:t.content.length&&r.merge(r.length,r.length,t.content[0],!1,t.openStart,0)&&(r.breakAfter=t.content[0].breakAfter,t.content.shift()),e.content.length&&r.merge(0,0,e.content[e.content.length-1],!0,0,e.openEnd)&&e.content.pop(),o=e.content.concat(r).concat(t.content)}else({content:o,breakAtStart:s,openStart:a,openEnd:l}=nz.build(this.view.state.doc,d,h,this.decorations,this.dynamicDecorationMap));let{i:p,off:f}=i.findPos(u,1),{i:m,off:g}=i.findPos(c,-1);_B(this,m,g,p,f,o,s,a,l)}n&&this.fixCompositionDOM(n)}compositionView(e){let t=new NB(e.text.nodeValue);t.flags|=8;for(let{deco:n}of e.marks)t=new DB(n,[t],t.length);let n=new HB;return n.append(t,0),n}fixCompositionDOM(e){let t=(e,t)=>{t.flags|=8|(t.children.some(e=>7&e.flags)?1:0),this.markedForComposition.add(t);let n=vB.get(e);n&&n!=t&&(n.dom=null),t.setDOM(e)},n=this.childPos(e.range.fromB,1),r=this.children[n.i];t(e.line,r);for(let i=e.marks.length-1;i>=-1;i--)n=r.childPos(n.off,1),r=r.children[n.i],t(i>=0?e.marks[i].node:e.text,r)}updateSelection(e=!1,t=!1){!e&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let n=this.view.root.activeElement,r=n==this.dom,i=!r&&eB(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(!(r||t||i))return;let o=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,a=this.moveToLine(this.domAtPos(s.anchor)),l=s.empty?a:this.moveToLine(this.domAtPos(s.head));if(jB.gecko&&s.empty&&!this.hasComposition&&(1==(c=a).node.nodeType&&c.node.firstChild&&(0==c.offset||"false"==c.node.childNodes[c.offset-1].contentEditable)&&(c.offset==c.node.childNodes.length||"false"==c.node.childNodes[c.offset].contentEditable))){let e=document.createTextNode("");this.view.observer.ignore(()=>a.node.insertBefore(e,a.node.childNodes[a.offset]||null)),a=l=new gB(e,0),o=!0}var c;let u=this.view.observer.selectionRange;!o&&u.focusNode&&nB(a.node,a.offset,u.anchorNode,u.anchorOffset)&&nB(l.node,l.offset,u.focusNode,u.focusOffset)||(this.view.observer.ignore(()=>{jB.android&&jB.chrome&&this.dom.contains(u.focusNode)&&function(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(1==n.nodeType&&"false"==n.contentEditable)return!0;return!1}(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let e=JL(this.view.root);if(e)if(s.empty){if(jB.gecko){let e=(t=a.node,r=a.offset,1!=t.nodeType?0:(r&&"false"==t.childNodes[r-1].contentEditable?1:0)|(r<t.childNodes.length&&"false"==t.childNodes[r].contentEditable?2:0));if(e&&3!=e){let t=Kz(a.node,a.offset,1==e?1:-1);t&&(a=new gB(t.node,t.offset))}}e.collapse(a.node,a.offset),null!=s.bidiLevel&&void 0!==e.caretBidiLevel&&(e.caretBidiLevel=s.bidiLevel)}else if(e.extend){e.collapse(a.node,a.offset);try{e.extend(l.node,l.offset)}catch(e){}}else{let t=document.createRange();s.anchor>s.head&&([a,l]=[l,a]),t.setEnd(l.node,l.offset),t.setStart(a.node,a.offset),e.removeAllRanges(),e.addRange(t)}else;var t,r;i&&this.view.root.activeElement==this.dom&&(this.dom.blur(),n&&n.focus())}),this.view.observer.setSelectionRange(a,l)),this.impreciseAnchor=a.precise?null:new gB(u.anchorNode,u.anchorOffset),this.impreciseHead=l.precise?null:new gB(u.focusNode,u.focusOffset)}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=JL(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!(n&&t.empty&&t.assoc&&n.modify))return;let o=HB.find(this,t.head);if(!o)return;let s=o.posAtStart;if(t.head==s||t.head==s+o.length)return;let a=this.coordsAt(t.head,-1),l=this.coordsAt(t.head,1);if(!a||!l||a.bottom>l.top)return;let c=this.domAtPos(t.head+t.assoc);n.collapse(c.node,c.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let u=e.observer.selectionRange;e.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=t.from&&n.collapse(r,i)}moveToLine(e){let t,n=this.dom;if(e.node!=n)return e;for(let r=e.offset;!t&&r<n.childNodes.length;r++){let e=vB.get(n.childNodes[r]);e instanceof HB&&(t=e.domAtPos(0))}for(let r=e.offset-1;!t&&r>=0;r--){let e=vB.get(n.childNodes[r]);e instanceof HB&&(t=e.domAtPos(e.length))}return t?new gB(t.node,t.offset,!0):e}nearest(e){for(let t=e;t;){let e=vB.get(t);if(e&&e.rootView==this)return e;t=t.parentNode}return null}posFromDOM(e,t){let n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}domAtPos(e){let{i:t,off:n}=this.childCursor().findPos(e,-1);for(;t<this.children.length-1;){let e=this.children[t];if(n<e.length||e instanceof HB)break;t++,n=0}return this.children[t].domAtPos(n)}coordsAt(e,t){let n=null,r=0;for(let i=this.length,o=this.children.length-1;o>=0;o--){let s=this.children[o],a=i-s.breakAfter,l=a-s.length;if(a<e)break;l<=e&&(l<e||s.covers(-1))&&(a>e||s.covers(1))&&(!n||s instanceof HB&&!(n instanceof HB&&t>=0))&&(n=s,r=l),i=l}return n?n.coordsAt(e-r,t):null}coordsForChar(e){let{i:t,off:n}=this.childPos(e,1),r=this.children[t];if(!(r instanceof HB))return null;for(;r.children.length;){let{i:e,off:t}=r.childPos(n,1);for(;;e++){if(e==r.children.length)return null;if((r=r.children[e]).length)break}n=t}if(!(r instanceof NB))return null;let i=Jx(r.text,n);if(i==n)return null;let o=hB(r.dom,n,i).getClientRects();for(let e=0;e<o.length;e++){let t=o[e];if(e==o.length-1||t.top<t.bottom&&t.left<t.right)return t}return null}measureVisibleLineHeights(e){let t=[],{from:n,to:r}=e,i=this.view.contentDOM.clientWidth,o=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,a=this.view.textDirection==Rz.LTR;for(let e=0,l=0;l<this.children.length;l++){let c=this.children[l],u=e+c.length;if(u>r)break;if(e>=n){let n=c.dom.getBoundingClientRect();if(t.push(n.height),o){let t=c.dom.lastChild,r=t?tB(t):[];if(r.length){let t=r[r.length-1],o=a?t.right-n.left:n.right-t.left;o>s&&(s=o,this.minWidth=i,this.minWidthFrom=e,this.minWidthTo=u)}}}e=u+c.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return"rtl"==getComputedStyle(this.children[t].dom).direction?Rz.RTL:Rz.LTR}measureTextSize(){for(let e of this.children)if(e instanceof HB){let t=e.measureTextSize();if(t)return t}let e,t,n,r=document.createElement("div");return r.className="cm-line",r.style.width="99999px",r.style.position="absolute",r.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(r);let i=tB(r.firstChild)[0];e=r.getBoundingClientRect().height,t=i?i.width/27:7,n=i?i.height:e,r.remove()}),{lineHeight:e,charWidth:t,textHeight:n}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new SB(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let i=r==t.viewports.length?null:t.viewports[r],o=i?i.from-1:this.length;if(o>n){let r=(t.lineBlockAt(o).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(YB.replace({widget:new Zz(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,o))}if(!i)break;n=i.to+1}return YB.set(e)}updateDeco(){let e=this.view.state.facet(kz).map((e,t)=>(this.dynamicDecorationMap[t]="function"==typeof e)?e(this.view):e);for(let t=e.length;t<e.length+3;t++)this.dynamicDecorationMap[t]=!1;return this.decorations=[...e,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco]}scrollIntoView(e){if(e.isSnapshot){let t=this.view.viewState.lineBlockAt(e.range.head);return this.view.scrollDOM.scrollTop=t.top-e.yMargin,void(this.view.scrollDOM.scrollLeft=e.xMargin)}let t,{range:n}=e,r=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1);if(!r)return;!n.empty&&(t=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,t.left),top:Math.min(r.top,t.top),right:Math.max(r.right,t.right),bottom:Math.max(r.bottom,t.bottom)});let i=Cz(this.view),o={left:r.left-i.left,top:r.top-i.top,right:r.right+i.right,bottom:r.bottom+i.bottom},{offsetWidth:s,offsetHeight:a}=this.view.scrollDOM;!function(e,t,n,r,i,o,s,a){let l=e.ownerDocument,c=l.defaultView||window;for(let u=e,d=!1;u&&!d;)if(1==u.nodeType){let e,h=u==l.body,p=1,f=1;if(h)e=aB(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(d=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let t=u.getBoundingClientRect();p=t.width/u.offsetWidth,f=t.height/u.offsetHeight,e={left:t.left,right:t.left+u.clientWidth*p,top:t.top,bottom:t.top+u.clientHeight*f}}let m=0,g=0;if("nearest"==i)t.top<e.top?(g=-(e.top-t.top+s),n>0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+g+s)):t.bottom>e.bottom&&(g=t.bottom-e.bottom+s,n<0&&t.top-g<e.top&&(g=-(e.top+g-t.top+s)));else{let r=t.bottom-t.top,o=e.bottom-e.top;g=("center"==i&&r<=o?t.top+r/2-o/2:"start"==i||"center"==i&&n<0?t.top-s:t.bottom-o+s)-e.top}if("nearest"==r)t.left<e.left?(m=-(e.left-t.left+o),n>0&&t.right>e.right+m&&(m=t.right-e.right+m+o)):t.right>e.right&&(m=t.right-e.right+o,n<0&&t.left<e.left+m&&(m=-(e.left+m-t.left+o)));else{m=("center"==r?t.left+(t.right-t.left)/2-(e.right-e.left)/2:"start"==r==a?t.left-o:t.right-(e.right-e.left)+o)-e.left}if(m||g)if(h)c.scrollBy(m,g);else{let e=0,n=0;if(g){let e=u.scrollTop;u.scrollTop+=g/f,n=(u.scrollTop-e)*f}if(m){let t=u.scrollLeft;u.scrollLeft+=m/p,e=(u.scrollLeft-t)*p}t={left:t.left-e,top:t.top-n,right:t.right-e,bottom:t.bottom-n},e&&Math.abs(e-m)<1&&(r="nearest"),n&&Math.abs(n-g)<1&&(i="nearest")}if(h)break;u=u.assignedSlot||u.parentNode}else{if(11!=u.nodeType)break;u=u.host}}(this.view.scrollDOM,o,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,s),-s),Math.max(Math.min(e.yMargin,a),-a),this.view.textDirection==Rz.LTR)}}class Zz extends WB{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}}function Jz(e,t){let n=e.observer.selectionRange,r=n.focusNode&&Kz(n.focusNode,n.focusOffset,0);if(!r)return null;let i=t-r.offset;return{from:i,to:i+r.node.nodeValue.length,node:r.node}}function Kz(e,t,n){if(n<=0)for(let n=e,r=t;;){if(3==n.nodeType)return{node:n,offset:r};if(!(1==n.nodeType&&r>0))break;n=n.childNodes[r-1],r=oB(n)}if(n>=0)for(let r=e,i=t;;){if(3==r.nodeType)return{node:r,offset:i};if(!(1==r.nodeType&&i<r.childNodes.length&&n>=0))break;r=r.childNodes[i],i=0}return null}function eF(e,t){return t.left>e?t.left-e:Math.max(0,e-t.right)}function tF(e,t){return t.top>e?t.top-e:Math.max(0,e-t.bottom)}function nF(e,t){return e.top<t.bottom-1&&e.bottom>t.top+1}function rF(e,t){return t<e.top?{top:t,left:e.left,right:e.right,bottom:e.bottom}:e}function iF(e,t){return t>e.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function oF(e,t,n){let r=e.nodeValue.length,i=-1,o=1e9,s=0;for(let a=0;a<r;a++){let r=hB(e,a,a+1).getClientRects();for(let l=0;l<r.length;l++){let c=r[l];if(c.top==c.bottom)continue;s||(s=t-c.left);let u=(c.top>n?c.top-n:n-c.bottom)-1;if(c.left-1<=t&&c.right+1>=t&&u<o){let n=t>=(c.left+c.right)/2,r=n;if(jB.chrome||jB.gecko){hB(e,a).getBoundingClientRect().left==c.right&&(r=!n)}if(u<=0)return{node:e,offset:a+(r?1:0)};i=a+(r?1:0),o=u}}}return{node:e,offset:i>-1?i:s>0?e.nodeValue.length:0}}function sF(e,t,n,r=-1){var i,o;let s,a=e.contentDOM.getBoundingClientRect(),l=a.top+e.viewState.paddingTop,{docHeight:c}=e.viewState,{x:u,y:d}=t,h=d-l;if(h<0)return 0;if(h>c)return e.state.doc.length;for(let t=e.viewState.heightOracle.textHeight/2,i=!1;s=e.elementAtHeight(h),s.type!=XB.Text;)for(;h=r>0?s.bottom+t:s.top-t,!(h>=0&&h<=c);){if(i)return n?null:0;i=!0,r=-r}d=l+h;let p=s.from;if(p<e.viewport.from)return 0==e.viewport.from?0:n?null:aF(e,a,s,u,d);if(p>e.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:n?null:aF(e,a,s,u,d);let f=e.dom.ownerDocument,m=e.root.elementFromPoint?e.root:f,g=m.elementFromPoint(u,d);g&&!e.contentDOM.contains(g)&&(g=null),g||(u=Math.max(a.left+1,Math.min(a.right-1,u)),g=m.elementFromPoint(u,d),g&&!e.contentDOM.contains(g)&&(g=null));let b,v=-1;if(g&&0!=(null===(i=e.docView.nearest(g))||void 0===i?void 0:i.isEditable))if(f.caretPositionFromPoint){let e=f.caretPositionFromPoint(u,d);e&&({offsetNode:b,offset:v}=e)}else if(f.caretRangeFromPoint){let t=f.caretRangeFromPoint(u,d);t&&(({startContainer:b,startOffset:v}=t),(!e.contentDOM.contains(b)||jB.safari&&function(e,t,n){let r;if(3!=e.nodeType||t!=(r=e.nodeValue.length))return!1;for(let t=e.nextSibling;t;t=t.nextSibling)if(1!=t.nodeType||"BR"!=t.nodeName)return!1;return hB(e,r-1,r).getBoundingClientRect().left>n}(b,v,u)||jB.chrome&&function(e,t,n){if(0!=t)return!1;for(let t=e;;){let e=t.parentNode;if(!e||1!=e.nodeType||e.firstChild!=t)return!1;if(e.classList.contains("cm-line"))break;t=e}let r=1==e.nodeType?e.getBoundingClientRect():hB(e,0,Math.max(e.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}(b,v,u))&&(b=void 0))}if(!b||!e.docView.dom.contains(b)){let t=HB.find(e.docView,p);if(!t)return h>s.top+s.height/2?s.to:s.from;({node:b,offset:v}=function e(t,n,r){let i,o,s,a,l,c,u,d,h=!1;for(let p=t.firstChild;p;p=p.nextSibling){let t=tB(p);for(let f=0;f<t.length;f++){let m=t[f];o&&nF(o,m)&&(m=rF(iF(m,o.bottom),o.top));let g=eF(n,m),b=tF(r,m);if(0==g&&0==b)return 3==p.nodeType?oF(p,n,r):e(p,n,r);if(!i||a>b||a==b&&s>g){i=p,o=m,s=g,a=b;let e=b?r<m.top?-1:1:g?n<m.left?-1:1:0;h=!e||(e>0?f<t.length-1:f>0)}0==g?r>m.bottom&&(!u||u.bottom<m.bottom)?(l=p,u=m):r<m.top&&(!d||d.top>m.top)&&(c=p,d=m):u&&nF(u,m)?u=iF(u,m.bottom):d&&nF(d,m)&&(d=rF(d,m.top))}}if(u&&u.bottom>=r?(i=l,o=u):d&&d.top<=r&&(i=c,o=d),!i)return{node:t,offset:0};let p=Math.max(o.left,Math.min(o.right,n));return 3==i.nodeType?oF(i,p,r):h&&"false"!=i.contentEditable?e(i,p,r):{node:t,offset:Array.prototype.indexOf.call(t.childNodes,i)+(n>=(o.left+o.right)/2?1:0)}}(t.dom,u,d))}let y=e.docView.nearest(b);if(!y)return null;if(y.isWidget&&1==(null===(o=y.dom)||void 0===o?void 0:o.nodeType)){let e=y.dom.getBoundingClientRect();return t.y<e.top||t.y<=e.bottom&&t.x<=(e.left+e.right)/2?y.posAtStart:y.posAtEnd}return y.localPosFromDOM(b,v)+y.posAtStart}function aF(e,t,n,r,i){let o=Math.round((r-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>1.5*e.defaultLineHeight){let t=e.viewState.heightOracle.textHeight;o+=Math.floor((i-n.top-.5*(e.defaultLineHeight-t))/t)*e.viewState.heightOracle.lineLength}let s=e.state.sliceDoc(n.from,n.to);return n.from+Ak(s,o,e.state.tabSize)}function lF(e,t){let n=e.lineBlockAt(t);if(Array.isArray(n.type))for(let e of n.type)if(e.to>t||e.to==t&&(e.to==n.to||e.type==XB.Text))return e;return n}function cF(e,t,n,r){let i=e.state.doc.lineAt(t.head),o=e.bidiSpans(i),s=e.textDirectionAt(i.from);for(let a=t,l=null;;){let t=Xz(i,o,s,a,n),c=Wz;if(!t){if(i.number==(n?e.state.doc.lines:1))return a;c="\n",i=e.state.doc.line(i.number+(n?1:-1)),o=e.bidiSpans(i),t=bw.cursor(n?i.from:i.to)}if(l){if(!l(c))return a}else{if(!r)return t;l=r(c)}a=t}}function uF(e,t,n){for(;;){let r=0;for(let i of e)i.between(t-1,t+1,(e,i,o)=>{if(t>e&&t<i){let o=r||n||(t-e<i-t?-1:1);t=o<0?e:i,r=o}});if(!r)return t}}function dF(e,t,n){let r=uF(e.state.facet(Oz).map(t=>t(e)),n.from,t.head>n.from?-1:1);return r==n.from?n:bw.cursor(r,r<n.from?1:-1)}class hF{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){var t;this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,jB.safari&&e.contentDOM.addEventListener("input",()=>null),jB.gecko&&(t=e.contentDOM.ownerDocument,LF.has(t)||(LF.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{})))}handleEvent(e){(function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n,r=t.target;r!=e.contentDOM;r=r.parentNode)if(!r||11==r.nodeType||(n=vB.get(r))&&n.ignoreEvent(t))return!1;return!0})(this.view,e)&&!this.ignoreDuringComposition(e)&&("keydown"==e.type&&this.keydown(e)||this.runHandlers(e.type,e))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let e of n.observers)e(this.view,t);for(let e of n.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=function(e){let t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec;if(e&&e.domEventHandlers)for(let r in e.domEventHandlers){let i=e.domEventHandlers[r];i&&n(r).handlers.push(pF(t.value,i))}if(e&&e.domEventObservers)for(let r in e.domEventObservers){let i=e.domEventObservers[r];i&&n(r).observers.push(pF(t.value,i))}}for(let e in yF)n(e).handlers.push(yF[e]);for(let e in SF)n(e).observers.push(SF[e]);return t}(e),n=this.handlers,r=this.view.contentDOM;for(let e in t)if("scroll"!=e){let i=!t[e].handlers.length,o=n[e];o&&i!=!o.handlers.length&&(r.removeEventListener(e,this.handleEvent),o=null),o||r.addEventListener(e,this.handleEvent,{passive:i})}for(let e in n)"scroll"==e||t[e]||r.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&Date.now()<this.lastEscPress+2e3)return!0;if(27!=e.keyCode&&gF.indexOf(e.keyCode)<0&&(this.view.inputState.lastEscPress=0),jB.android&&jB.chrome&&!e.synthetic&&(13==e.keyCode||8==e.keyCode))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return!jB.ios||e.synthetic||e.altKey||e.metaKey||!((t=fF.find(t=>t.keyCode==e.keyCode))&&!e.ctrlKey||mF.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(229!=e.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0)}flushIOSKey(){let e=this.pendingIOSKey;return!!e&&(this.pendingIOSKey=void 0,pB(this.view.contentDOM,e.key,e.keyCode))}ignoreDuringComposition(e){return!!/^key/.test(e.type)&&(this.composing>0||!!(jB.safari&&!jB.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function pF(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(e){gz(n.state,e)}}}const fF=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],mF="dthko",gF=[16,17,18,20,91,92,224,225];function bF(e){return.7*Math.max(0,e)+8}class vF{constructor(e,t,n,r){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParent=function(e){let t=e.ownerDocument;for(let n=e.parentNode;n&&n!=t.body;)if(1==n.nodeType){if(n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)return n;n=n.assignedSlot||n.parentNode}else{if(11!=n.nodeType)break;n=n.host}return null}(e.contentDOM),this.atoms=e.state.facet(Oz).map(t=>t(e));let i=e.contentDOM.ownerDocument;i.addEventListener("mousemove",this.move=this.move.bind(this)),i.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(lk.allowMultipleSelections)&&function(e,t){let n=e.state.facet(oz);return n.length?n[0](t):jB.mac?t.metaKey:t.ctrlKey}(e,t),this.dragging=!(!function(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=JL(e.root);if(!r||0==r.rangeCount)return!0;let i=r.getRangeAt(0).getClientRects();for(let e=0;e<i.length;e++){let n=i[e];if(n.left<=t.clientX&&n.right>=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}(e,t)||1!=PF(t))&&null}start(e){!1===this.dragging&&this.select(e)}move(e){var t,n,r;if(0==e.buttons)return this.destroy();if(this.dragging||null==this.dragging&&(n=this.startEvent,r=e,Math.max(Math.abs(n.clientX-r.clientX),Math.abs(n.clientY-r.clientY))<10))return;this.select(this.lastEvent=e);let i=0,o=0,s=(null===(t=this.scrollParent)||void 0===t?void 0:t.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},a=Cz(this.view);e.clientX-a.left<=s.left+6?i=-bF(s.left-e.clientX):e.clientX+a.right>=s.right-6&&(i=bF(e.clientX-s.right)),e.clientY-a.top<=s.top+6?o=-bF(s.top-e.clientY):e.clientY+a.bottom>=s.bottom-6&&(o=bF(e.clientY-s.bottom)),this.setScrollSpeed(i,o)}up(e){null==this.dragging&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),!1===this.dragging&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let n=0;n<e.ranges.length;n++){let r=e.ranges[n],i=null;if(r.empty){let e=uF(this.atoms,r.from,0);e!=r.from&&(i=bw.cursor(e,-1))}else{let e=uF(this.atoms,r.from,-1),t=uF(this.atoms,r.to,1);e==r.from&&t==r.to||(i=bw.range(r.from==r.anchor?e:t,r.from==r.head?e:t))}i&&(t||(t=e.ranges.slice()),t[n]=i)}return t?bw.create(t,e.mainIndex):e}select(e){let{view:t}=this,n=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection)||n.main.assoc!=t.state.selection.main.assoc&&!1===this.dragging)&&this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}const yF=Object.create(null),SF=Object.create(null),_F=jB.ie&&jB.ie_version<15||jB.ios&&jB.webkit_version<604;function xF(e,t){let n,{state:r}=e,i=1,o=r.toText(t),s=o.lines==r.selection.ranges.length;if(null!=jF&&r.selection.ranges.every(e=>e.empty)&&jF==o.toString()){let e=-1;n=r.changeByRange(n=>{let a=r.doc.lineAt(n.from);if(a.from==e)return{range:n};e=a.from;let l=r.toText((s?o.line(i++).text:t)+r.lineBreak);return{changes:{from:a.from,insert:l},range:bw.cursor(n.from+l.length)}})}else n=s?r.changeByRange(e=>{let t=o.line(i++);return{changes:{from:e.from,to:e.to,insert:t.text},range:bw.cursor(e.from+t.length)}}):r.replaceSelection(o);e.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}function wF(e,t,n,r){if(1==r)return bw.cursor(t,n);if(2==r)return function(e,t,n=1){let r=e.charCategorizer(t),i=e.doc.lineAt(t),o=t-i.from;if(0==i.length)return bw.cursor(t);0==o?n=1:o==i.length&&(n=-1);let s=o,a=o;n<0?s=Jx(i.text,o,!1):a=Jx(i.text,o);let l=r(i.text.slice(s,a));for(;s>0;){let e=Jx(i.text,s,!1);if(r(i.text.slice(e,s))!=l)break;s=e}for(;a<i.length;){let e=Jx(i.text,a);if(r(i.text.slice(a,e))!=l)break;a=e}return bw.range(s+i.from,a+i.from)}(e.state,t,n);{let n=HB.find(e.docView,t),r=e.state.doc.lineAt(n?n.posAtEnd:t),i=n?n.posAtStart:r.from,o=n?n.posAtEnd:r.to;return o<e.state.doc.length&&o==r.to&&o++,bw.range(i,o)}}SF.scroll=e=>{e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft},yF.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),27==t.keyCode&&(e.inputState.lastEscPress=Date.now()),!1),SF.touchstart=(e,t)=>{e.inputState.lastTouchTime=Date.now(),e.inputState.setSelectionOrigin("select.pointer")},SF.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")},yF.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of e.state.facet(az))if(n=r(e,t),n)break;if(n||0!=t.button||(n=function(e,t){let n=AF(e,t),r=PF(t),i=e.state.selection;return{update(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),i=i.map(e.changes))},get(t,o,s){let a,l=AF(e,t),c=wF(e,l.pos,l.bias,r);if(n.pos!=l.pos&&!o){let t=wF(e,n.pos,n.bias,r),i=Math.min(t.from,c.from),o=Math.max(t.to,c.to);c=i<c.from?bw.range(i,o):bw.range(o,i)}return o?i.replaceRange(i.main.extend(c.from,c.to)):s&&1==r&&i.ranges.length>1&&(a=function(e,t){for(let n=0;n<e.ranges.length;n++){let{from:r,to:i}=e.ranges[n];if(r<=t&&i>=t)return bw.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-(e.mainIndex>n?1:0))}return null}(i,l.pos))?a:s?i.addRange(c):bw.create([c])}}}(e,t)),n){let r=!e.hasFocus;e.inputState.startMouseSelection(new vF(e,t,n,r)),r&&e.observer.ignore(()=>dB(e.contentDOM));let i=e.inputState.mouseSelection;if(i)return i.start(t),!1===i.dragging}return!1};let kF=(e,t)=>e>=t.top&&e<=t.bottom,OF=(e,t,n)=>kF(t,n)&&e>=n.left&&e<=n.right;function EF(e,t,n,r){let i=HB.find(e.docView,t);if(!i)return 1;let o=t-i.posAtStart;if(0==o)return 1;if(o==i.length)return-1;let s=i.coordsAt(o,-1);if(s&&OF(n,r,s))return-1;let a=i.coordsAt(o,1);return a&&OF(n,r,a)?1:s&&kF(r,s)?-1:1}function AF(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:n,bias:EF(e,n,t.clientX,t.clientY)}}const TF=jB.ie&&jB.ie_version<=11;let CF=null,MF=0,$F=0;function PF(e){if(!TF)return e.detail;let t=CF,n=$F;return CF=e,$F=Date.now(),MF=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(MF+1)%3:1}function RF(e,t,n,r){if(!n)return;let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:o}=e.inputState,s=r&&o&&function(e,t){let n=e.state.facet(sz);return n.length?n[0](t):jB.mac?!t.altKey:!t.ctrlKey}(e,t)?{from:o.from,to:o.to}:null,a={from:i,insert:n},l=e.state.changes(s?[s,a]:a);e.focus(),e.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:s?"move.drop":"input.drop"}),e.inputState.draggedContent=null}yF.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let r=e.docView.nearest(t.target);if(r&&r.isWidget){let e=r.posAtStart,t=e+r.length;(e>=n.to||t<=n.from)&&(n=bw.range(e,t))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData("Text",e.state.sliceDoc(n.from,n.to)),t.dataTransfer.effectAllowed="copyMove"),!1},yF.dragend=e=>(e.inputState.draggedContent=null,!1),yF.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,o=()=>{++i==n.length&&RF(e,t,r.filter(e=>null!=e).join(e.state.lineBreak),!1)};for(let e=0;e<n.length;e++){let t=new FileReader;t.onerror=o,t.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),o()},t.readAsText(n[e])}return!0}{let n=t.dataTransfer.getData("Text");if(n)return RF(e,t,n,!0),!0}return!1},yF.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=_F?null:t.clipboardData;return n?(xF(e,n.getData("text/plain")||n.getData("text/uri-text")),!0):(function(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{e.focus(),n.remove(),xF(e,n.value)},50)}(e),!1)};let jF=null;yF.copy=yF.cut=(e,t)=>{let{text:n,ranges:r,linewise:i}=function(e){let t=[],n=[],r=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let i=-1;for(let{from:r}of e.selection.ranges){let o=e.doc.lineAt(r);o.number>i&&(t.push(o.text),n.push({from:o.from,to:Math.min(e.doc.length,o.to+1)})),i=o.number}r=!0}return{text:t.join(e.lineBreak),ranges:n,linewise:r}}(e.state);if(!n&&!i)return!1;jF=i?n:null,"cut"!=t.type||e.state.readOnly||e.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let o=_F?null:t.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(function(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout(()=>{r.remove(),e.focus()},50)}(e,n),!1)};const NF=Vw.define();function DF(e,t){let n=[];for(let r of e.facet(dz)){let i=r(e,t);i&&n.push(i)}return n?e.update({effects:n,annotations:NF.of(!0)}):null}function IF(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=DF(e.state,t);n?e.dispatch(n):e.update([])}},10)}SF.focus=e=>{e.inputState.lastFocusTime=Date.now(),e.scrollDOM.scrollTop||!e.inputState.lastScrollTop&&!e.inputState.lastScrollLeft||(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),IF(e)},SF.blur=e=>{e.observer.clearSelectionRange(),IF(e)},SF.compositionstart=SF.compositionupdate=e=>{null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0)},SF.compositionend=e=>{e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,jB.chrome&&jB.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50)},SF.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},yF.beforeinput=(e,t)=>{var n;let r;if(jB.chrome&&jB.android&&(r=fF.find(e=>e.inputType==t.inputType))&&(e.observer.delayAndroidKey(r.key,r.keyCode),"Backspace"==r.key||"Delete"==r.key)){let t=(null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0;setTimeout(()=>{var n;((null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return!1};const LF=new Set;const BF=["pre-wrap","normal","pre-line","break-spaces"];class zF{constructor(e){this.lineWrapping=e,this.doc=zx.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){if(!this.lineWrapping)return this.lineHeight;return(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return BF.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];r<0?n++:this.heightSamples[Math.floor(10*r)]||(t=!0,this.heightSamples[Math.floor(10*r)]=!0)}return t}refresh(e,t,n,r,i,o){let s=BF.indexOf(e)>-1,a=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=i,a){this.heightSamples={};for(let e=0;e<o.length;e++){let t=o[e];t<0?e++:this.heightSamples[Math.floor(10*t)]=!0}}return a}}class FF{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class UF{constructor(e,t,n,r,i){this.from=e,this.length=t,this.top=n,this.height=r,this._content=i}get type(){return"number"==typeof this._content?XB.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof KB?this._content.widget:null}get widgetLineBreaks(){return"number"==typeof this._content?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new UF(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var QF=function(e){return e[e.ByPos=0]="ByPos",e[e.ByHeight=1]="ByHeight",e[e.ByPosNoHeight=2]="ByPosNoHeight",e}(QF||(QF={}));class qF{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(2&this.flags)>0}set outdated(e){this.flags=(e?2:0)|-3&this.flags}setHeight(e,t){this.height!=t&&(Math.abs(this.height-t)>.001&&(e.heightChanged=!0),this.height=t)}replace(e,t,n){return qF.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let i=this,o=n.doc;for(let s=r.length-1;s>=0;s--){let{fromA:a,toA:l,fromB:c,toB:u}=r[s],d=i.lineAt(a,QF.ByPosNoHeight,n.setDoc(t),0,0),h=d.to>=l?d:i.lineAt(l,QF.ByPosNoHeight,n,0,0);for(u+=h.to-l,l=h.to;s>0&&d.from<=r[s-1].toA;)a=r[s-1].fromA,c=r[s-1].fromB,s--,a<d.from&&(d=i.lineAt(a,QF.ByPosNoHeight,n,0,0));c+=d.from-a,a=d.from;let p=YF.build(n.setDoc(o),e,c,u);i=i.replace(a,l,p)}return i.updateHeight(n,0)}static empty(){return new HF(0,0)}static of(e){if(1==e.length)return e[0];let t=0,n=e.length,r=0,i=0;for(;;)if(t==n)if(r>2*i){let i=e[t-1];i.break?e.splice(--t,1,i.left,null,i.right):e.splice(--t,1,i.left,i.right),n+=1+i.break,r-=i.size}else{if(!(i>2*r))break;{let t=e[n];t.break?e.splice(n,1,t.left,null,t.right):e.splice(n,1,t.left,t.right),n+=2+t.break,i-=t.size}}else if(r<i){let n=e[t++];n&&(r+=n.size)}else{let t=e[--n];t&&(i+=t.size)}let o=0;return null==e[t-1]?(o=1,t--):null==e[t]&&(o=1,n++),new WF(qF.of(e.slice(0,t)),o,qF.of(e.slice(n)))}}qF.prototype.size=1;class GF extends qF{constructor(e,t,n){super(e,t),this.deco=n}blockAt(e,t,n,r){return new UF(r,this.length,n,this.height,this.deco||0)}lineAt(e,t,n,r,i){return this.blockAt(0,n,r,i)}forEachLine(e,t,n,r,i,o){e<=i+this.length&&t>=i&&o(this.blockAt(0,n,r,i))}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setHeight(e,r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class HF extends GF{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,n,r){return new UF(r,this.length,n,this.height,this.breaks)}replace(e,t,n){let r=n[0];return 1==n.length&&(r instanceof HF||r instanceof VF&&4&r.flags)&&Math.abs(this.length-r.length)<10?(r instanceof VF?r=new HF(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):qF.of(n)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more?this.setHeight(e,r.heights[r.index++]):(n||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class VF extends qF{constructor(e){super(e,0)}heightMetrics(e,t){let n,r=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,o=i-r+1,s=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*o);n=t/o,this.length>o+1&&(s=(this.height-t)/(this.length-o-1))}else n=this.height/o;return{firstLine:r,lastLine:i,perLine:n,perChar:s}}blockAt(e,t,n,r){let{firstLine:i,lastLine:o,perLine:s,perChar:a}=this.heightMetrics(t,r);if(t.lineWrapping){let i=r+Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length),o=t.doc.lineAt(i),l=s+o.length*a,c=Math.max(n,e-l/2);return new UF(o.from,o.length,c,l,0)}{let r=Math.max(0,Math.min(o-i,Math.floor((e-n)/s))),{from:a,length:l}=t.doc.line(i+r);return new UF(a,l,n+s*r,s,0)}}lineAt(e,t,n,r,i){if(t==QF.ByHeight)return this.blockAt(e,n,r,i);if(t==QF.ByPosNoHeight){let{from:t,to:r}=n.doc.lineAt(e);return new UF(t,r-t,0,0,0)}let{firstLine:o,perLine:s,perChar:a}=this.heightMetrics(n,i),l=n.doc.lineAt(e),c=s+l.length*a,u=l.number-o,d=r+s*u+a*(l.from-i-u);return new UF(l.from,l.length,Math.max(r,Math.min(d,r+this.height-c)),c,0)}forEachLine(e,t,n,r,i,o){e=Math.max(e,i),t=Math.min(t,i+this.length);let{firstLine:s,perLine:a,perChar:l}=this.heightMetrics(n,i);for(let c=e,u=r;c<=t;){let t=n.doc.lineAt(c);if(c==e){let n=t.number-s;u+=a*n+l*(e-i-n)}let r=a+l*t.length;o(new UF(t.from,t.length,u,r,0)),u+=r,c=t.to+1}}replace(e,t,n){let r=this.length-t;if(r>0){let e=n[n.length-1];e instanceof VF?n[n.length-1]=new VF(e.length+r):n.push(null,new VF(r-1))}if(e>0){let t=n[0];t instanceof VF?n[0]=new VF(e+t.length):n.unshift(new VF(e-1),null)}return qF.of(n)}decomposeLeft(e,t){t.push(new VF(e-1),null)}decomposeRight(e,t){t.push(null,new VF(this.length-e-1))}updateHeight(e,t=0,n=!1,r){let i=t+this.length;if(r&&r.from<=t+this.length&&r.more){let n=[],o=Math.max(t,r.from),s=-1;for(r.from>t&&n.push(new VF(r.from-t-1).updateHeight(e,t));o<=i&&r.more;){let t=e.doc.lineAt(o).length;n.length&&n.push(null);let i=r.heights[r.index++];-1==s?s=i:Math.abs(i-s)>=.001&&(s=-2);let a=new HF(t,i);a.outdated=!1,n.push(a),o+=t+1}o<=i&&n.push(null,new VF(i-o).updateHeight(e,o));let a=qF.of(n);return(s<0||Math.abs(a.height-this.height)>=.001||Math.abs(s-this.heightMetrics(e,t).perLine)>=.001)&&(e.heightChanged=!0),a}return(n||this.outdated)&&(this.setHeight(e,e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class WF extends qF{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return 1&this.flags}blockAt(e,t,n,r){let i=n+this.left.height;return e<i?this.left.blockAt(e,t,n,r):this.right.blockAt(e,t,i,r+this.left.length+this.break)}lineAt(e,t,n,r,i){let o=r+this.left.height,s=i+this.left.length+this.break,a=t==QF.ByHeight?e<o:e<s,l=a?this.left.lineAt(e,t,n,r,i):this.right.lineAt(e,t,n,o,s);if(this.break||(a?l.to<s:l.from>s))return l;let c=t==QF.ByPosNoHeight?QF.ByPosNoHeight:QF.ByPos;return a?l.join(this.right.lineAt(s,c,n,o,s)):this.left.lineAt(s,c,n,r,i).join(l)}forEachLine(e,t,n,r,i,o){let s=r+this.left.height,a=i+this.left.length+this.break;if(this.break)e<a&&this.left.forEachLine(e,t,n,r,i,o),t>=a&&this.right.forEachLine(e,t,n,s,a,o);else{let l=this.lineAt(a,QF.ByPos,n,r,i);e<l.from&&this.left.forEachLine(e,l.from-1,n,r,i,o),l.to>=e&&l.from<=t&&o(l),t>l.to&&this.right.forEachLine(l.to+1,t,n,s,a,o)}}replace(e,t,n){let r=this.left.length+this.break;if(t<r)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let i=[];e>0&&this.decomposeLeft(e,i);let o=i.length;for(let e of n)i.push(e);if(e>0&&XF(i,o-1),t<this.length){let e=i.length;this.decomposeRight(t,i),XF(i,e)}return qF.of(i)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<r&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?qF.of(this.break?[e,null,t]:[e,t]):(this.left=e,this.right=t,this.height=e.height+t.height,this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:i,right:o}=this,s=t+i.length+this.break,a=null;return r&&r.from<=t+i.length&&r.more?a=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=s+o.length&&r.more?a=o=o.updateHeight(e,s,n,r):o.updateHeight(e,s,n),a?this.balanced(i,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function XF(e,t){let n,r;null==e[t]&&(n=e[t-1])instanceof VF&&(r=e[t+1])instanceof VF&&e.splice(t-1,3,new VF(n.length+1+r.length))}class YF{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof HF?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new HF(e-this.pos,-1)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let r=n.widget?n.widget.estimatedHeight:0,i=n.widget?n.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let o=t-e;n.block?this.addBlock(new GF(o,r,n)):(o||i||r>=5)&&this.addLineDeco(r,i,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||null==this.nodes[this.nodes.length-1])&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new HF(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new VF(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof HF)return e;let t=new HF(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof HF||this.isCovered?(this.writtenTo<this.pos||null==t)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new HF(0,-1));let n=e;for(let e of this.nodes)e instanceof HF&&e.updateHeight(this.oracle,n),n+=e?e.length:1;return this.nodes}static build(e,t,n,r){let i=new YF(n,e);return fk.spans(t,n,r,i,0),i.finish(n)}}class ZF{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,r){(e<t||n&&n.heightRelevant||r&&r.heightRelevant)&&tz(e,t,this.changes,5)}}function JF(e,t){let n=e.getBoundingClientRect(),r=e.ownerDocument,i=r.defaultView||window,o=Math.max(0,n.left),s=Math.min(i.innerWidth,n.right),a=Math.max(0,n.top),l=Math.min(i.innerHeight,n.bottom);for(let t=e.parentNode;t&&t!=r.body;)if(1==t.nodeType){let n=t,r=window.getComputedStyle(n);if((n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)&&"visible"!=r.overflow){let r=n.getBoundingClientRect();o=Math.max(o,r.left),s=Math.min(s,r.right),a=Math.max(a,r.top),l=t==e.parentNode?r.bottom:Math.min(l,r.bottom)}t="absolute"==r.position||"fixed"==r.position?n.offsetParent:n.parentNode}else{if(11!=t.nodeType)break;t=t.host}return{left:o-n.left,right:Math.max(o,s)-n.left,top:a-(n.top+t),bottom:Math.max(a,l)-(n.top+t)}}function KF(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}class eU{constructor(e,t,n){this.from=e,this.to=t,this.size=n}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}draw(e,t){return YB.replace({widget:new tU(this.size*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class tU extends WB{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class nU{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!0,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=aU,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Rz.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(wz).some(e=>"function"!=typeof e&&"cm-lineWrapping"==e.class);this.heightOracle=new zF(t),this.stateDeco=e.facet(kz).filter(e=>"function"!=typeof e),this.heightMap=qF.empty().applyChanges(this.stateDeco,zx.empty,this.heightOracle.setDoc(e.doc),[new $z(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=YB.set(this.lineGaps.map(e=>e.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some(({from:e,to:t})=>r>=e&&r<=t)){let{from:t,to:n}=this.lineBlockAt(r);e.push(new rU(t,n))}}this.viewports=e.sort((e,t)=>e.from-t.from),this.scaler=this.heightMap.height<=7e6?aU:new lU(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(1==this.scaler.scale?e:cU(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=this.state.facet(kz).filter(e=>"function"!=typeof e);let r=e.changedRanges,i=$z.extendWithRanges(r,function(e,t,n){let r=new ZF;return fk.compare(e,t,n,r,0),r.changes}(n,this.stateDeco,e?e.changes:cw.empty(this.state.doc.length))),o=this.heightMap.height,s=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),this.heightMap.height!=o&&(e.flags|=2),s?(this.scrollAnchorPos=e.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=i.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<a.from||t.range.head>a.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,t));let l=!e.changes.empty||2&e.flags||a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,this.updateForViewport(),l&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(pz)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,i=n.whiteSpace;this.defaultTextDirection="rtl"==n.direction?Rz.RTL:Rz.LTR;let o=this.heightOracle.mustRefreshForWrapping(i),s=t.getBoundingClientRect(),a=o||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let l=0,c=0;if(s.width&&s.height){let e=s.width/t.offsetWidth,n=s.height/t.offsetHeight;(e>.995&&e<1.005||!isFinite(e)||Math.abs(s.width-t.offsetWidth)<1)&&(e=1),(n>.995&&n<1.005||!isFinite(n)||Math.abs(s.height-t.offsetHeight)<1)&&(n=1),this.scaleX==e&&this.scaleY==n||(this.scaleX=e,this.scaleY=n,l|=8,o=a=!0)}let u=(parseInt(n.paddingTop)||0)*this.scaleY,d=(parseInt(n.paddingBottom)||0)*this.scaleY;this.paddingTop==u&&this.paddingBottom==d||(this.paddingTop=u,this.paddingBottom=d,l|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,l|=8);let h=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=h&&(this.scrollAnchorHeight=-1,this.scrollTop=h),this.scrolledToBottom=mB(e.scrollDOM);let p=(this.printing?KF:JF)(t,this.paddingTop),f=p.top-this.pixelViewport.top,m=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let b=s.width;if(this.contentDOMWidth==b&&this.editorHeight==e.scrollDOM.clientHeight||(this.contentDOMWidth=s.width,this.editorHeight=e.scrollDOM.clientHeight,l|=8),a){let t=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(t)&&(o=!0),o||r.lineWrapping&&Math.abs(b-this.contentDOMWidth)>r.charWidth){let{lineHeight:n,charWidth:s,textHeight:a}=e.docView.measureTextSize();o=n>0&&r.refresh(i,n,s,a,b/s,t),o&&(e.docView.minWidth=0,l|=8)}f>0&&m>0?c=Math.max(f,m):f<0&&m<0&&(c=Math.min(f,m)),r.heightChanged=!1;for(let n of this.viewports){let i=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(o?qF.empty().applyChanges(this.stateDeco,zx.empty,this.heightOracle,[new $z(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,o,new FF(n.from,i))}r.heightChanged&&(l|=2)}let v=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return v&&(this.viewport=this.getViewport(c,this.scrollTarget)),this.updateForViewport(),(2&l||v)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),l}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:o,visibleBottom:s}=this,a=new rU(r.lineAt(o-1e3*n,QF.ByHeight,i,0,0).from,r.lineAt(s+1e3*(1-n),QF.ByHeight,i,0,0).to);if(t){let{head:e}=t.range;if(e<a.from||e>a.to){let n,o=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),s=r.lineAt(e,QF.ByPos,i,0,0);n="center"==t.y?(s.top+s.bottom)/2-o/2:"start"==t.y||"nearest"==t.y&&e<a.from?s.top:s.bottom-o,a=new rU(r.lineAt(n-500,QF.ByHeight,i,0,0).from,r.lineAt(n+o+500,QF.ByHeight,i,0,0).to)}}return a}mapViewport(e,t){let n=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new rU(this.heightMap.lineAt(n,QF.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,QF.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,QF.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(t,QF.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:s}=this;return(0==e||r<=o-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||i>=s+Math.max(10,Math.min(n,250)))&&r>o-2e3&&i<s+2e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let r of e)t.touchesRange(r.from,r.to)||n.push(new eU(t.mapPos(r.from),t.mapPos(r.to),r.size));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,r=n?1e4:2e3,i=r>>1,o=r<<1;if(this.defaultTextDirection!=Rz.LTR&&!n)return[];let s=[],a=(r,o,l,c)=>{if(o-r<i)return;let u=this.state.selection.main,d=[u.from];u.empty||d.push(u.to);for(let e of d)if(e>r&&e<o)return a(r,e-10,l,c),void a(e+10,o,l,c);let h=function(e,t){for(let n of e)if(t(n))return n;return}(e,e=>e.from>=l.from&&e.to<=l.to&&Math.abs(e.from-r)<i&&Math.abs(e.to-o)<i&&!d.some(t=>e.from<t&&e.to>t));if(!h){if(o<l.to&&t&&n&&t.visibleRanges.some(e=>e.from<=o&&e.to>=o)){let e=t.moveToLineBoundary(bw.cursor(o),!1,!0).head;e>r&&(o=e)}h=new eU(r,o,this.gapSize(l,r,o,c))}s.push(h)};for(let e of this.viewportLines){if(e.length<o)continue;let t=iU(e.from,e.to,this.stateDeco);if(t.total<o)continue;let i,s,l=this.scrollTarget?this.scrollTarget.range.head:null;if(n){let n,o,a=r/this.heightOracle.lineLength*this.heightOracle.lineHeight;if(null!=l){let r=sU(t,l),i=((this.visibleBottom-this.visibleTop)/2+a)/e.height;n=r-i,o=r+i}else n=(this.visibleTop-e.top-a)/e.height,o=(this.visibleBottom-e.top+a)/e.height;i=oU(t,n),s=oU(t,o)}else{let e,n,o=t.total*this.heightOracle.charWidth,a=r*this.heightOracle.charWidth;if(null!=l){let r=sU(t,l),i=((this.pixelViewport.right-this.pixelViewport.left)/2+a)/o;e=r-i,n=r+i}else e=(this.pixelViewport.left-a)/o,n=(this.pixelViewport.right+a)/o;i=oU(t,e),s=oU(t,n)}i>e.from&&a(e.from,i,e,t),s<e.to&&a(s,e.to,e,t)}return s}gapSize(e,t,n,r){let i=sU(r,n)-sU(r,t);return this.heightOracle.lineWrapping?e.height*i:r.total*this.heightOracle.charWidth*i}updateLineGaps(e){eU.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=YB.set(e.map(e=>e.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];fk.spans(e,this.viewport.from,this.viewport.to,{span(e,n){t.push({from:e,to:n})},point(){}},20);let n=t.length!=this.visibleRanges.length||this.visibleRanges.some((e,n)=>e.from!=t[n].from||e.to!=t[n].to);return this.visibleRanges=t,n?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||cU(this.heightMap.lineAt(e,QF.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return cU(this.heightMap.lineAt(this.scaler.fromDOM(e),QF.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return cU(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class rU{constructor(e,t){this.from=e,this.to=t}}function iU(e,t,n){let r=[],i=e,o=0;return fk.spans(n,e,t,{span(){},point(e,t){e>i&&(r.push({from:i,to:e}),o+=e-i),i=t}},20),i<t&&(r.push({from:i,to:t}),o+=t-i),{total:o,ranges:r}}function oU({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:i}=t[e],o=i-n;if(r<=o)return n+r;r-=o}}function sU(e,t){let n=0;for(let{from:r,to:i}of e.ranges){if(t<=i){n+=t-r;break}n+=i-r}return n/e.total}const aU={toDOM:e=>e,fromDOM:e=>e,scale:1};class lU{constructor(e,t,n){let r=0,i=0,o=0;this.viewports=n.map(({from:n,to:i})=>{let o=t.lineAt(n,QF.ByPos,e,0,0).top,s=t.lineAt(i,QF.ByPos,e,0,0).bottom;return r+=s-o,{from:n,to:i,top:o,bottom:s,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(t.height-r);for(let e of this.viewports)e.domTop=o+(e.top-i)*this.scale,o=e.domBottom=e.domTop+(e.bottom-e.top),i=e.bottom}toDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.top)return r+(e-n)*this.scale;if(e<=i.bottom)return i.domTop+(e-i.top);n=i.bottom,r=i.domBottom}}fromDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.domTop)return n+(e-r)/this.scale;if(e<=i.domBottom)return i.top+(e-i.domTop);n=i.bottom,r=i.domBottom}}}function cU(e,t){if(1==t.scale)return e;let n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new UF(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map(e=>cU(e,t)):e._content)}const uU=Sw.define({combine:e=>e.join(" ")}),dU=Sw.define({combine:e=>e.indexOf(!0)>-1}),hU=XL.newName(),pU=XL.newName(),fU=XL.newName(),mU={"&light":"."+pU,"&dark":"."+fU};function gU(e,t,n){return new XL(t,{finish:t=>/&/.test(t)?t.replace(/&\w*/,t=>{if("&"==t)return e;if(!n||!n[t])throw new RangeError("Unsupported selector: "+t);return n[t]}):e+" "+t})}const bU=gU("."+hU,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},mU);class vU{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(lk.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=""}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r);let e=this.text.length;this.readNode(r);let i=r.nextSibling;if(i==t)break;let o=vB.get(r),s=vB.get(i);(o&&s?o.breakAfter:(o?o.breakAfter:SU(r))||SU(i)&&("BR"!=r.nodeName||r.cmIgnore)&&this.text.length>e)&&this.lineBreak(),r=i}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i,o=-1,s=1;if(this.lineSeparator?(o=t.indexOf(this.lineSeparator,n),s=this.lineSeparator.length):(i=r.exec(t))&&(o=i.index,s=i[0].length),this.append(t.slice(n,o<0?t.length:o)),o<0)break;if(this.lineBreak(),s>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=s-1);n=o+s}}readNode(e){if(e.cmIgnore)return;let t=vB.get(e),n=t&&t.overrideDOMText;if(null!=n){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else 3==e.nodeType?this.readTextNode(e):"BR"==e.nodeName?e.nextSibling&&this.lineBreak():1==e.nodeType&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(3==e.nodeType?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(yU(e,n.node,n.offset)?t:0))}}function yU(e,t,n){for(;;){if(!t||n<oB(t))return!1;if(t==e)return!0;n=rB(t)+1,t=t.parentNode}}function SU(e){return 1==e.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}class _U{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class xU{constructor(e,t,n,r){this.typeOver=r,this.bounds=null,this.text="";let{impreciseHead:i,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,n,0))){let t=i||o?[]:function(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}=e.observer.selectionRange;n&&(t.push(new _U(n,r)),i==n&&o==r||t.push(new _U(i,o)));return t}(e),n=new vU(t,e.state);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=function(e,t){if(0==e.length)return null;let n=e[0].pos,r=2==e.length?e[1].pos:n;return n>-1&&r>-1?bw.single(n+t,r+t):null}(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=i&&i.node==t.focusNode&&i.offset==t.focusOffset||!KL(e.contentDOM,t.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),r=o&&o.node==t.anchorNode&&o.offset==t.anchorOffset||!KL(e.contentDOM,t.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset);this.newSel=bw.single(r,n)}}}function wU(e,t){let n,{newSel:r}=t,i=e.state.selection.main,o=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:r,to:s}=t.bounds,a=i.from,l=null;(8===o||jB.android&&t.text.length<s-r)&&(a=i.to,l="end");let c=function(e,t,n,r){let i=Math.min(e.length,t.length),o=0;for(;o<i&&e.charCodeAt(o)==t.charCodeAt(o);)o++;if(o==i&&e.length==t.length)return null;let s=e.length,a=t.length;for(;s>0&&a>0&&e.charCodeAt(s-1)==t.charCodeAt(a-1);)s--,a--;if("end"==r){let e=Math.max(0,o-Math.min(s,a));n-=s+e-o}if(s<o&&e.length<t.length){o-=n<=o&&n>=s?o-n:0,a=o+(a-s),s=o}else if(a<o){o-=n<=o&&n>=a?o-n:0,s=o+(s-a),a=o}return{from:o,toA:s,toB:a}}(e.state.doc.sliceString(r,s,""),t.text,a-r,l);c&&(jB.chrome&&13==o&&c.toB==c.from+2&&""==t.text.slice(c.from,c.toB)&&c.toB--,n={from:r+c.from,to:r+c.toA,insert:zx.of(t.text.slice(c.from,c.toB).split(""))})}else r&&(!e.hasFocus&&e.state.facet(bz)||r.main.eq(i))&&(r=null);if(!n&&!r)return!1;if(!n&&t.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,i.to)}:n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,n.from).append(n.insert).append(e.state.doc.slice(n.to,i.to))}:(jB.mac||jB.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&"off"==e.contentDOM.getAttribute("autocorrect")?(r&&2==n.insert.length&&(r=bw.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:zx.of([" "])}):jB.chrome&&n&&n.from==n.to&&n.from==i.head&&"\n "==n.insert.toString()&&e.lineWrapping&&(r&&(r=bw.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:zx.of([" "])}),n){if(jB.ios&&e.inputState.flushIOSKey())return!0;if(jB.android&&(n.from==i.from&&n.to==i.to&&1==n.insert.length&&2==n.insert.lines&&pB(e.contentDOM,"Enter",13)||(n.from==i.from-1&&n.to==i.to&&0==n.insert.length||8==o&&n.insert.length<n.to-n.from&&n.to>i.head)&&pB(e.contentDOM,"Backspace",8)||n.from==i.from&&n.to==i.to+1&&0==n.insert.length&&pB(e.contentDOM,"Delete",46)))return!0;let t,s=n.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let a=()=>t||(t=function(e,t,n){let r,i=e.state,o=i.selection.main;if(t.from>=o.from&&t.to<=o.to&&t.to-t.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=o.from<t.from?i.sliceDoc(o.from,t.from):"",s=o.to>t.to?i.sliceDoc(t.to,o.to):"";r=i.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+s))}else{let s=i.changes(t),a=n&&n.main.to<=s.newLength?n.main:void 0;if(i.selection.ranges.length>1&&e.inputState.composing>=0&&t.to<=o.to&&t.to>=o.to-10){let l,c=e.state.sliceDoc(t.from,t.to),u=n&&Jz(e,n.main.head);if(u){let e=t.insert.length-(t.to-t.from);l={from:u.from,to:u.to-e}}else l=e.state.doc.lineAt(o.head);let d=o.to-t.to,h=o.to-o.from;r=i.changeByRange(n=>{if(n.from==o.from&&n.to==o.to)return{changes:s,range:a||n.map(s)};let r=n.to-d,u=r-c.length;if(n.to-n.from!=h||e.state.sliceDoc(u,r)!=c||n.to>=l.from&&n.from<=l.to)return{range:n};let p=i.changes({from:u,to:r,insert:t.insert}),f=n.to-o.to;return{changes:p,range:a?bw.range(Math.max(0,a.anchor+f),Math.max(0,a.head+f)):n.map(p)}})}else r={changes:s,selection:a&&i.selection.replaceRange(a)}}let s="input.type";(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,s+=".compose",e.inputState.compositionFirstChange&&(s+=".start",e.inputState.compositionFirstChange=!1));return i.update(r,{userEvent:s,scrollIntoView:!0})}(e,n,r));return e.state.facet(uz).some(t=>t(e,n.from,n.to,s,a))||e.dispatch(a()),!0}if(r&&!r.main.eq(i)){let t=!1,n="select";return e.inputState.lastSelectionTime>Date.now()-50&&("select"==e.inputState.lastSelectionOrigin&&(t=!0),n=e.inputState.lastSelectionOrigin),e.dispatch({selection:r,scrollIntoView:t,userEvent:n}),!0}return!1}const kU={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},OU=jB.ie&&jB.ie_version<=11;class EU{constructor(e){this.view=e,this.active=!1,this.selectionRange=new lB,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let e of t)this.queue.push(e);(jB.ie&&jB.ie_version<=11||jB.ios&&e.composing)&&t.some(e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),OU&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver(()=>{var e;(null===(e=this.view.docView)||void 0===e?void 0:e.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver(e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(bz)?n.root.activeElement!=this.dom:!eB(n.dom,r))return;let i=r.anchorNode&&n.docView.nearest(r.anchorNode);i&&i.ignoreEvent(e)?t||(this.selectionChanged=!1):(jB.ie&&jB.ie_version<=11||jB.android&&jB.chrome)&&!n.state.selection.main.empty&&r.focusNode&&nB(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=jB.safari&&11==e.root.nodeType&&function(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom&&function(e){let t=null;function n(e){e.preventDefault(),e.stopImmediatePropagation(),t=e.getTargetRanges()[0]}if(e.contentDOM.addEventListener("beforeinput",n,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",n,!0),!t)return null;let r=t.startContainer,i=t.startOffset,o=t.endContainer,s=t.endOffset,a=e.docView.domAtPos(e.state.selection.main.anchor);nB(a.node,a.offset,o,s)&&([r,i,o,s]=[o,s,r,i]);return{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s}}(this.view)||JL(e.root);if(!t||this.selectionRange.eq(t))return!1;let n=eB(this.dom,t);return n&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&function(e,t){let n=t.focusNode,r=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=r)return!1;for(r=Math.min(r,oB(n));;)if(r){if(1!=n.nodeType)return!1;let e=n.childNodes[r-1];"false"==e.contentEditable?r--:(n=e,r=oB(n))}else{if(n==e)return!0;r=rB(n),n=n.parentNode}}(this.dom,t)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(t),n&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(1==n.nodeType)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(n),n=n.assignedSlot||n.parentNode;else{if(11!=n.nodeType)break;n=n.host}if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);for(let e of this.scrollTargets=t)e.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,kU),OU&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),OU&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var n;if(!this.delayedAndroidKey){let e=()=>{let e=this.delayedAndroidKey;if(e){this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&pB(this.dom,e.key,e.keyCode)}};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}this.delayedAndroidKey&&"Enter"!=e||(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(null===(n=this.delayedAndroidKey)||void 0===n?void 0:n.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let i of e){let e=this.readMutation(i);e&&(e.typeOver&&(r=!0),-1==t?({from:t,to:n}=e):(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&eB(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new xU(this.view,e,t,n);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,r=wU(this.view,t);return this.view.state==n&&this.view.update([]),r}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty("attributes"==e.type),"attributes"==e.type&&(t.flags|=4),"childList"==e.type){let n=AU(t,e.previousSibling||e.target.previousSibling,-1),r=AU(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}return"characterData"==e.type?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,t,n;this.stop(),null===(e=this.intersection)||void 0===e||e.disconnect(),null===(t=this.gapIntersection)||void 0===t||t.disconnect(),null===(n=this.resizeScroll)||void 0===n||n.disconnect();for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function AU(e,t,n){for(;t;){let r=vB.get(t);if(r&&r.parent==e)return r;let i=t.parentNode;t=i!=e.dom?i:n>0?t.nextSibling:t.previousSibling}return null}class TU{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM);let{dispatch:t}=e;this.dispatchTransactions=e.dispatchTransactions||t&&(e=>e.forEach(e=>t(e,this)))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||function(e){for(;e;){if(e&&(9==e.nodeType||11==e.nodeType&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}(e.parent)||document,this.viewState=new nU(e.state||lk.create(e)),e.scrollTo&&e.scrollTo.is(mz)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(yz).map(e=>new _z(e));for(let e of this.plugins)e.update(this);this.observer=new EU(this),this.inputState=new hF(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Yz(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}dispatch(...e){let t=1==e.length&&e[0]instanceof Zw?e:1==e.length&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t,n=!1,r=!1,i=this.state;for(let t of e){if(t.startState!=i)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");i=t.state}if(this.destroyed)return void(this.viewState.state=i);let o=this.hasFocus,s=0,a=null;e.some(e=>e.annotation(NF))?(this.inputState.notifiedFocused=o,s=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,a=DF(i,o),a||(s=1));let l=this.observer.delayedAndroidKey,c=null;if(l?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(i.doc)||!this.state.selection.eq(i.selection))&&(c=null)):this.observer.clear(),i.facet(lk.phrases)!=this.state.facet(lk.phrases))return this.setState(i);t=Pz.create(this,i,e),t.flags|=s;let u=this.viewState.scrollTarget;try{this.updateState=2;for(let t of e){if(u&&(u=u.map(t.changes)),t.scrollIntoView){let{main:e}=t.state.selection;u=new fz(e.empty?e:bw.cursor(e.head,e.head>e.anchor?-1:1))}for(let e of t.effects)e.is(mz)&&(u=e.value.clip(this.state))}this.viewState.update(t,u),this.bidiCache=$U.update(this.bidiCache,t.changes),t.empty||(this.updatePlugins(t),this.inputState.update(t)),n=this.docView.update(t),this.state.facet(Mz)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(e=>e.isUserEvent("select.pointer")))}finally{this.updateState=0}if(t.startState.facet(uU)!=t.state.facet(uU)&&(this.viewState.mustMeasureContent=!0),(n||r||u||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!t.empty)for(let e of this.state.facet(cz))try{e(t)}catch(e){gz(this.state,e,"update listener")}(a||c)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),c&&!wU(this,c)&&l.force&&pB(this.contentDOM,l.key,l.keyCode)})}setState(e){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=e);this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new nU(e),this.plugins=e.facet(yz).map(e=>new _z(e)),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView=new Yz(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(yz),n=e.state.facet(yz);if(t!=n){let r=[];for(let i of n){let n=t.indexOf(i);if(n<0)r.push(new _z(i));else{let t=this.plugins[n];t.mustUpdate=e,r.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e<this.plugins.length;e++)this.plugins[e].update(this);t!=n&&this.inputState.ensureHandlers(this.plugins)}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.scrollDOM,r=n.scrollTop*this.scaleY,{scrollAnchorPos:i,scrollAnchorHeight:o}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(o<0)if(mB(n))i=-1,o=this.viewState.heightMap.height;else{let e=this.viewState.scrollAnchorAt(r);i=e.from,o=e.top}this.updateState=1;let s=this.viewState.measure(this);if(!s&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(e>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let a=[];4&s||([this.measureRequests,a]=[a,this.measureRequests]);let l=a.map(e=>{try{return e.read(this)}catch(e){return gz(this.state,e),MU}}),c=Pz.create(this,this.state,[]),u=!1;c.flags|=s,t?t.flags|=s:t=c,this.updateState=2,c.empty||(this.updatePlugins(c),this.inputState.update(c),this.updateAttrs(),u=this.docView.update(c));for(let e=0;e<a.length;e++)if(l[e]!=MU)try{let t=a[e];t.write&&t.write(l[e],this)}catch(e){gz(this.state,e)}if(u&&this.docView.updateSelection(!0),!c.viewportChanged&&0==this.measureRequests.length){if(this.viewState.editorHeight){if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null;continue}{let e=(i<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(i).top)-o;if(e>1||e<-1){r+=e,n.scrollTop=r/this.scaleY,o=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(cz))e(t)}get themeClasses(){return hU+" "+(this.state.facet(dU)?fU:pU)+" "+this.state.facet(uU)}updateAttrs(){let e=PU(this,xz,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(bz)?"true":"false",class:"cm-content",style:`${jB.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),PU(this,wz,t);let n=this.observer.ignore(()=>{let n=qB(this.contentDOM,this.contentAttrs,t),r=qB(this.dom,this.editorAttrs,e);return n||r});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let e of n.effects)if(e.is(TU.announce)){t&&(this.announceDOM.textContent=""),t=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=e.value}}mountStyles(){this.styleModules=this.state.facet(Mz);let e=this.state.facet(TU.cspNonce);XL.mount(this.root,this.styleModules.concat(bU).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(null!=e.key)for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key)return void(this.measureRequests[t]=e);this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(void 0===t||t&&t.spec!=e)&&this.pluginMap.set(e,t=this.plugins.find(t=>t.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return dF(this,e,cF(this,e,t,n))}moveByGroup(e,t){return dF(this,e,cF(this,e,t,t=>function(e,t,n){let r=e.state.charCategorizer(t),i=r(n);return e=>{let t=r(e);return i==ik.Space&&(i=t),i==t}}(this,e.head,t)))}moveToLineBoundary(e,t,n=!0){return function(e,t,n,r){let i=lF(e,t.head),o=r&&i.type==XB.Text&&(e.lineWrapping||i.widgetLineBreaks)?e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head):null;if(o){let t=e.dom.getBoundingClientRect(),r=e.textDirectionAt(i.from),s=e.posAtCoords({x:n==(r==Rz.LTR)?t.right-1:t.left+1,y:(o.top+o.bottom)/2});if(null!=s)return bw.cursor(s,n?-1:1)}return bw.cursor(n?i.to:i.from,n?-1:1)}(this,e,t,n)}moveVertically(e,t,n){return dF(this,e,function(e,t,n,r){let i=t.head,o=n?1:-1;if(i==(n?e.state.doc.length:0))return bw.cursor(i,t.assoc);let s,a=t.goalColumn,l=e.contentDOM.getBoundingClientRect(),c=e.coordsAtPos(i,t.assoc||-1),u=e.documentTop;if(c)null==a&&(a=c.left-l.left),s=o<0?c.top:c.bottom;else{let t=e.viewState.lineBlockAt(i);null==a&&(a=Math.min(l.right-l.left,e.defaultCharacterWidth*(i-t.from))),s=(o<0?t.top:t.bottom)+u}let d=l.left+a,h=null!=r?r:e.viewState.heightOracle.textHeight>>1;for(let t=0;;t+=10){let n=s+(h+t)*o,r=sF(e,{x:d,y:n},!1,o);if(n<l.top||n>l.bottom||(o<0?r<i:r>i)){let t=e.docView.coordsForChar(r),i=!t||n<t.top?-1:1;return bw.cursor(r,i,void 0,a)}}}(this,e,t,n))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),sF(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;let r=this.state.doc.lineAt(e),i=this.bidiSpans(r);return sB(n,i[Uz.find(i,e-r.from,-1,t)].dir==Rz.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(hz)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>CU)return Vz(e.length);let t,n=this.textDirectionAt(e.from);for(let r of this.bidiCache)if(r.from==e.from&&r.dir==n&&(r.fresh||Qz(r.isolates,t=Az(this,e.from,e.to))))return r.order;t||(t=Az(this,e.from,e.to));let r=Hz(e.text,n,t);return this.bidiCache.push(new $U(e.from,e.to,n,t,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||jB.safari&&(null===(e=this.inputState)||void 0===e?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{dB(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((9==e.nodeType?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return mz.of(new fz("number"==typeof e?bw.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return mz.of(new fz(bw.cursor(n.from),"start","start",n.top-e,t,!0))}static domEventHandlers(e){return Sz.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Sz.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=XL.newName(),r=[uU.of(n),Mz.of(gU("."+n,e))];return t&&t.dark&&r.push(dU.of(!0)),r}static baseTheme(e){return Rw.lowest(Mz.of(gU("."+hU,e,mU)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),r=n&&vB.get(n)||vB.get(e);return(null===(t=null==r?void 0:r.rootView)||void 0===t?void 0:t.view)||null}}TU.styleModule=Mz,TU.inputHandler=uz,TU.focusChangeEffect=dz,TU.perLineTextDirection=hz,TU.exceptionSink=lz,TU.updateListener=cz,TU.editable=bz,TU.mouseSelectionStyle=az,TU.dragMovesSelection=sz,TU.clickAddsSelectionRange=oz,TU.decorations=kz,TU.atomicRanges=Oz,TU.bidiIsolatedRanges=Ez,TU.scrollMargins=Tz,TU.darkTheme=dU,TU.cspNonce=Sw.define({combine:e=>e.length?e[0]:""}),TU.contentAttributes=wz,TU.editorAttributes=xz,TU.lineWrapping=TU.contentAttributes.of({class:"cm-lineWrapping"}),TU.announce=Yw.define();const CU=4096,MU={};class $U{constructor(e,t,n,r,i,o){this.from=e,this.to=t,this.dir=n,this.isolates=r,this.fresh=i,this.order=o}static update(e,t){if(t.empty&&!e.some(e=>e.fresh))return e;let n=[],r=e.length?e[e.length-1].dir:Rz.LTR;for(let i=Math.max(0,e.length-10);i<e.length;i++){let o=e[i];o.dir!=r||t.touchesRange(o.from,o.to)||n.push(new $U(t.mapPos(o.from,1),t.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return n}}function PU(e,t,n){for(let r=e.state.facet(t),i=r.length-1;i>=0;i--){let t=r[i],o="function"==typeof t?t(e):t;o&&FB(o,n)}return n}const RU=jB.mac?"mac":jB.windows?"win":jB.linux?"linux":"key";function jU(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}const NU=Rw.default(TU.domEventHandlers({keydown:(e,t)=>zU(LU(t.state),e,t,"editor")})),DU=Sw.define({enables:NU}),IU=new WeakMap;function LU(e){let t=e.facet(DU),n=IU.get(t);return n||IU.set(t,n=function(e,t=RU){let n=Object.create(null),r=Object.create(null),i=(e,t)=>{let n=r[e];if(null==n)r[e]=t;else if(n!=t)throw new Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},o=(e,r,o,s,a)=>{var l,c;let u=n[e]||(n[e]=Object.create(null)),d=r.split(/ (?!$)/).map(e=>function(e,t){const n=e.split(/-(?!$)/);let r,i,o,s,a=n[n.length-1];"Space"==a&&(a=" ");for(let e=0;e<n.length-1;++e){const a=n[e];if(/^(cmd|meta|m)$/i.test(a))s=!0;else if(/^a(lt)?$/i.test(a))r=!0;else if(/^(c|ctrl|control)$/i.test(a))i=!0;else if(/^s(hift)?$/i.test(a))o=!0;else{if(!/^mod$/i.test(a))throw new Error("Unrecognized modifier name: "+a);"mac"==t?s=!0:i=!0}}return r&&(a="Alt-"+a),i&&(a="Ctrl-"+a),s&&(a="Meta-"+a),o&&(a="Shift-"+a),a}(e,t));for(let t=1;t<d.length;t++){let n=d.slice(0,t).join(" ");i(n,!0),u[n]||(u[n]={preventDefault:!0,stopPropagation:!1,run:[t=>{let r=BU={view:t,prefix:n,scope:e};return setTimeout(()=>{BU==r&&(BU=null)},4e3),!0}]})}let h=d.join(" ");i(h,!1);let p=u[h]||(u[h]={preventDefault:!1,stopPropagation:!1,run:(null===(c=null===(l=u._any)||void 0===l?void 0:l.run)||void 0===c?void 0:c.slice())||[]});o&&p.run.push(o),s&&(p.preventDefault=!0),a&&(p.stopPropagation=!0)};for(let r of e){let e=r.scope?r.scope.split(" "):["editor"];if(r.any)for(let t of e){let e=n[t]||(n[t]=Object.create(null));e._any||(e._any={preventDefault:!1,stopPropagation:!1,run:[]});for(let t in e)e[t].run.push(r.any)}let i=r[t]||r.key;if(i)for(let t of e)o(t,i,r.run,r.preventDefault,r.stopPropagation),r.shift&&o(t,"Shift-"+i,r.shift,r.preventDefault,r.stopPropagation)}return n}(t.reduce((e,t)=>e.concat(t),[]))),n}let BU=null;function zU(e,t,n,r){let i=Uk(t),o=ow(rw(i,0))==i.length&&" "!=i,s="",a=!1,l=!1,c=!1;BU&&BU.view==n&&BU.scope==r&&(s=BU.prefix+" ",gF.indexOf(t.keyCode)<0&&(l=!0,BU=null));let u,d,h=new Set,p=e=>{if(e){for(let r of e.run)if(!h.has(r)&&(h.add(r),r(n,t)))return e.stopPropagation&&(c=!0),!0;e.preventDefault&&(e.stopPropagation&&(c=!0),l=!0)}return!1},f=e[r];return f&&(p(f[s+jU(i,t,!o)])?a=!0:o&&(t.altKey||t.metaKey||t.ctrlKey)&&!(jB.windows&&t.ctrlKey&&t.altKey)&&(u=jk[t.keyCode])&&u!=i?(p(f[s+jU(u,t,!0)])||t.shiftKey&&(d=Nk[t.keyCode])!=i&&d!=u&&p(f[s+jU(d,t,!1)]))&&(a=!0):o&&t.shiftKey&&p(f[s+jU(i,t,!0)])&&(a=!0),!a&&p(f._any)&&(a=!0)),l&&(a=!0),a&&c&&t.stopPropagation(),a}const FU=!jB.ios;const UU={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};FU&&(UU[".cm-line"].caretColor="transparent !important");class QU extends uk{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}QU.prototype.elementClass="",QU.prototype.toDOM=void 0,QU.prototype.mapMode=aw.TrackBefore,QU.prototype.startSide=QU.prototype.endSide=-1,QU.prototype.point=!0;function qU(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function GU(e){let t=e.map(e=>"string"==typeof e?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e<r.length;e++)n[r[e]]=!0}let r=qU(t)+qU(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}function HU(e,t){return n=>{for(let t=NM(n.state).resolveInner(n.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(n)}}const VU=Vw.define();const WU=TU.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class XU{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}}class YU{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(e){let t=e.mapPos(this.from,-1,aw.TrackDel),n=e.mapPos(this.to,1,aw.TrackDel);return null==t||null==n?null:new YU(this.field,t,n)}}class ZU{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],r=[t],i=e.doc.lineAt(t),o=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(n.length){let n=o,s=/^\t*/.exec(i)[0].length;for(let t=0;t<s;t++)n+=e.facet(VM);r.push(t+n.length-s),i=n+i.slice(s)}n.push(i),t+=i.length+1}return{text:n,ranges:this.fieldPositions.map(e=>new YU(e.field,r[e.line]+e.from,r[e.line]+e.to))}}static parse(e){let t,n=[],r=[],i=[];for(let o of e.split(/\r\n?|\n/)){for(;t=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(o);){let e=t[1]?+t[1]:null,s=t[2]||t[3]||"",a=-1;for(let t=0;t<n.length;t++)(null!=e?n[t].seq==e:s&&n[t].name==s)&&(a=t);if(a<0){let t=0;for(;t<n.length&&(null==e||null!=n[t].seq&&n[t].seq<e);)t++;n.splice(t,0,{seq:e,name:s}),a=t;for(let e of i)e.field>=a&&e.field++}i.push(new XU(a,r.length,t.index,t.index+s.length)),o=o.slice(0,t.index)+s+o.slice(t.index+t[0].length)}for(let e;e=/\\([{}])/.exec(o);){o=o.slice(0,e.index)+e[1]+o.slice(e.index+e[0].length);for(let t of i)t.line==r.length&&t.from>e.index&&(t.from--,t.to--)}r.push(o)}return new ZU(r,i)}}let JU=YB.widget({widget:new class extends WB{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),KU=YB.mark({class:"cm-snippetField"});class eQ{constructor(e,t){this.ranges=e,this.active=t,this.deco=YB.set(e.map(e=>(e.from==e.to?JU:KU).range(e.from,e.to)))}map(e){let t=[];for(let n of this.ranges){let r=n.map(e);if(!r)return null;t.push(r)}return new eQ(t,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}}const tQ=Yw.define({map:(e,t)=>e&&e.map(t)}),nQ=Yw.define(),rQ=Aw.define({create:()=>null,update(e,t){for(let n of t.effects){if(n.is(tQ))return n.value;if(n.is(nQ)&&e)return new eQ(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>TU.decorations.from(e,e=>e?e.deco:YB.none)});function iQ(e,t){return bw.create(e.filter(e=>e.field==t).map(e=>bw.range(e.from,e.to)))}function oQ(e){let t=ZU.parse(e);return(e,n,r,i)=>{let{text:o,ranges:s}=t.instantiate(e.state,r),a={changes:{from:r,to:i,insert:zx.of(o)},scrollIntoView:!0,annotations:n?VU.of(n):void 0};if(s.length&&(a.selection=iQ(s,0)),s.length>1){let t=new eQ(s,0),n=a.effects=[tQ.of(t)];void 0===e.state.field(rQ,!1)&&n.push(Yw.appendConfig.of([rQ,cQ,dQ,WU]))}e.dispatch(e.state.update(a))}}function sQ(e){return({state:t,dispatch:n})=>{let r=t.field(rQ,!1);if(!r||e<0&&0==r.active)return!1;let i=r.active+e,o=e>0&&!r.ranges.some(t=>t.field==i+e);return n(t.update({selection:iQ(r.ranges,i),effects:tQ.of(o?null:new eQ(r.ranges,i)),scrollIntoView:!0})),!0}}const aQ=[{key:"Tab",run:sQ(1),shift:sQ(-1)},{key:"Escape",run:({state:e,dispatch:t})=>!!e.field(rQ,!1)&&(t(e.update({effects:tQ.of(null)})),!0)}],lQ=Sw.define({combine:e=>e.length?e[0]:aQ}),cQ=Rw.highest(DU.compute([lQ],e=>e.facet(lQ)));function uQ(e,t){return Object.assign(Object.assign({},t),{apply:oQ(e)})}const dQ=TU.domEventHandlers({mousedown(e,t){let n,r=t.state.field(rQ,!1);if(!r||null==(n=t.posAtCoords({x:e.clientX,y:e.clientY})))return!1;let i=r.ranges.find(e=>e.from<=n&&e.to>=n);return!(!i||i.field==r.active)&&(t.dispatch({selection:iQ(r.ranges,i.field),effects:tQ.of(r.ranges.some(e=>e.field>i.field)?new eQ(r.ranges,i.field):null),scrollIntoView:!0}),!0)}});const hQ=new class extends uk{};hQ.startSide=1,hQ.endSide=-1;"object"==typeof navigator&&navigator.userAgent;const pQ=new tM.f,fQ=new Set(["Script","Body","FunctionDefinition","ClassDefinition","LambdaExpression","ForStatement","MatchClause"]);function mQ(e){return(t,n,r)=>{if(r)return!1;let i=t.node.getChild("VariableName");return i&&n(i,e),!0}}const gQ={FunctionDefinition:mQ("function"),ClassDefinition:mQ("class"),ForStatement(e,t,n){if(n)for(let n=e.node.firstChild;n;n=n.nextSibling)if("VariableName"==n.name)t(n,"variable");else if("in"==n.name)break},ImportStatement(e,t){var n,r;let{node:i}=e,o="from"==(null===(n=i.firstChild)||void 0===n?void 0:n.name);for(let e=i.getChild("import");e;e=e.nextSibling)"VariableName"==e.name&&"as"!=(null===(r=e.nextSibling)||void 0===r?void 0:r.name)&&t(e,o?"variable":"namespace")},AssignStatement(e,t){for(let n=e.node.firstChild;n;n=n.nextSibling)if("VariableName"==n.name)t(n,"variable");else if(":"==n.name||"AssignOp"==n.name)break},ParamList(e,t){for(let n=null,r=e.node.firstChild;r;r=r.nextSibling)"VariableName"!=r.name||n&&/\*|AssignOp/.test(n.name)||t(r,"variable"),n=r},CapturePattern:mQ("variable"),AsPattern:mQ("variable"),__proto__:null};function bQ(e,t){let n=pQ.get(t);if(n)return n;let r=[],i=!0;function o(t,n){let i=e.sliceString(t.from,t.to);r.push({label:i,type:n})}return t.cursor(tM.b.IncludeAnonymous).iterate(t=>{if(t.name){let e=gQ[t.name];if(e&&e(t,o,i)||!i&&fQ.has(t.name))return!1;i=!1}else if(t.to-t.from>8192){for(let n of bQ(e,t.node))r.push(n);return!1}}),pQ.set(t,r),r}const vQ=/^[\w\xa1-\uffff][\w\d\xa1-\uffff]*$/,yQ=["String","FormatString","Comment","PropertyName"];function SQ(e){let t=NM(e.state).resolveInner(e.pos,-1);if(yQ.indexOf(t.name)>-1)return null;let n="VariableName"==t.name||t.to-t.from<20&&vQ.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let r=[];for(let n=t;n;n=n.parent)fQ.has(n.name)&&(r=r.concat(bQ(e.state.doc,n)));return{options:r,from:n?t.from:e.pos,validFor:vQ}}const _Q=["__annotations__","__builtins__","__debug__","__doc__","__import__","__name__","__loader__","__package__","__spec__","False","None","True"].map(e=>({label:e,type:"constant"})).concat(["ArithmeticError","AssertionError","AttributeError","BaseException","BlockingIOError","BrokenPipeError","BufferError","BytesWarning","ChildProcessError","ConnectionAbortedError","ConnectionError","ConnectionRefusedError","ConnectionResetError","DeprecationWarning","EOFError","Ellipsis","EncodingWarning","EnvironmentError","Exception","FileExistsError","FileNotFoundError","FloatingPointError","FutureWarning","GeneratorExit","IOError","ImportError","ImportWarning","IndentationError","IndexError","InterruptedError","IsADirectoryError","KeyError","KeyboardInterrupt","LookupError","MemoryError","ModuleNotFoundError","NameError","NotADirectoryError","NotImplemented","NotImplementedError","OSError","OverflowError","PendingDeprecationWarning","PermissionError","ProcessLookupError","RecursionError","ReferenceError","ResourceWarning","RuntimeError","RuntimeWarning","StopAsyncIteration","StopIteration","SyntaxError","SyntaxWarning","SystemError","SystemExit","TabError","TimeoutError","TypeError","UnboundLocalError","UnicodeDecodeError","UnicodeEncodeError","UnicodeError","UnicodeTranslateError","UnicodeWarning","UserWarning","ValueError","Warning","ZeroDivisionError"].map(e=>({label:e,type:"type"}))).concat(["bool","bytearray","bytes","classmethod","complex","float","frozenset","int","list","map","memoryview","object","range","set","staticmethod","str","super","tuple","type"].map(e=>({label:e,type:"class"}))).concat(["abs","aiter","all","anext","any","ascii","bin","breakpoint","callable","chr","compile","delattr","dict","dir","divmod","enumerate","eval","exec","exit","filter","format","getattr","globals","hasattr","hash","help","hex","id","input","isinstance","issubclass","iter","len","license","locals","max","min","next","oct","open","ord","pow","print","property","quit","repr","reversed","round","setattr","slice","sorted","sum","vars","zip"].map(e=>({label:e,type:"function"}))),xQ=[uQ("def ${name}(${params}):\n\t${}",{label:"def",detail:"function",type:"keyword"}),uQ("for ${name} in ${collection}:\n\t${}",{label:"for",detail:"loop",type:"keyword"}),uQ("while ${}:\n\t${}",{label:"while",detail:"loop",type:"keyword"}),uQ("try:\n\t${}\nexcept ${error}:\n\t${}",{label:"try",detail:"/ except block",type:"keyword"}),uQ("if ${}:\n\t\n",{label:"if",detail:"block",type:"keyword"}),uQ("if ${}:\n\t${}\nelse:\n\t${}",{label:"if",detail:"/ else block",type:"keyword"}),uQ("class ${name}:\n\tdef __init__(self, ${params}):\n\t\t\t${}",{label:"class",detail:"definition",type:"keyword"}),uQ("import ${module}",{label:"import",detail:"statement",type:"keyword"}),uQ("from ${module} import ${names}",{label:"from",detail:"import",type:"keyword"})],wQ=HU(yQ,GU(_Q.concat(xQ)));function kQ(e,t){let n=e.lineIndent(t.from),r=e.lineAt(e.pos,-1),i=r.from+r.text.length;return/^\s*($|#)/.test(r.text)&&e.node.to<i+100&&!/\S/.test(e.state.sliceDoc(i,e.node.to))&&e.lineIndent(e.pos,-1)<=n||/^\s*(else:|elif |except |finally:)/.test(e.textAfter)&&e.lineIndent(e.pos,-1)>n?null:n+e.unit}const OQ=jM.define({name:"python",parser:GL.configure({props:[JM.add({Body:e=>{var t;return null!==(t=kQ(e,e.node))&&void 0!==t?t:e.continue()},IfStatement:e=>/^\s*(else:|elif )/.test(e.textAfter)?e.baseIndent:e.continue(),TryStatement:e=>/^\s*(except |finally:|else:)/.test(e.textAfter)?e.baseIndent:e.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":i$({closing:")"}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":i$({closing:"}"}),"ArrayExpression ArrayComprehensionExpression":i$({closing:"]"}),"String FormatString":()=>null,Script:e=>{if(e.pos+/\s*/.exec(e.textAfter)[0].length>=e.node.to){let t=null;for(let n=e.node,r=n.to;n=n.lastChild,n&&n.to==r;)"Body"==n.type.name&&(t=n);if(t){let n=kQ(e,t);if(null!=n)return n}}return e.continue()}}),c$.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":u$,Body:(e,t)=>({from:e.from+1,to:e.to-(e.to==t.doc.length?0:1)})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""'],stringPrefixes:["f","fr","rf","r","u","b","br","rb","F","FR","RF","R","U","B","BR","RB"]},commentTokens:{line:"#"},indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/}});const EQ="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),AQ="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),TQ="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class CQ{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function i(e,t,o,s){let a=[],l=/^@(\w+)\b/.exec(e[0]),c=l&&"keyframes"==l[1];if(l&&null==t)return o.push(e[0]+";");for(let n in t){let s=t[n];if(/&/.test(n))i(n.split(/,\s*/).map(t=>e.map(e=>t.replace(/&/,e))).reduce((e,t)=>e.concat(t)),s,o);else if(s&&"object"==typeof s){if(!l)throw new RangeError("The value of a property ("+n+") should be a primitive value.");i(r(n),s,a,c)}else null!=s&&a.push(n.replace(/_.*/,"").replace(/[A-Z]/g,e=>"-"+e.toLowerCase())+": "+s+";")}(a.length||c)&&o.push((!n||l||s?e:e.map(n)).join(", ")+" {"+a.join(" ")+"}")}for(let t in e)i(r(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=TQ[EQ]||1;return TQ[EQ]=e+1,"ͼ"+e.toString(36)}static mount(e,t,n){let r=e[AQ],i=n&&n.nonce;r?i&&r.setNonce(i):r=new $Q(e,i),r.mount(Array.isArray(t)?t:[t])}}let MQ=new Map;class $Q{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let t=MQ.get(n);if(t)return e.adoptedStyleSheets=[t.sheet,...e.adoptedStyleSheets],e[AQ]=t;this.sheet=new r.CSSStyleSheet,e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets],MQ.set(n,this)}else{this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);let r=e.head||e;r.insertBefore(this.styleTag,r.firstChild)}this.modules=[],e[AQ]=this}mount(e){let t=this.sheet,n=0,r=0;for(let i=0;i<e.length;i++){let o=e[i],s=this.modules.indexOf(o);if(s<r&&s>-1&&(this.modules.splice(s,1),r--,s=-1),-1==s){if(this.modules.splice(r++,0,o),t)for(let e=0;e<o.rules.length;e++)t.insertRule(o.rules[e],n++)}else{for(;r<s;)n+=this.modules[r++].rules.length;n+=o.rules.length,r++}}if(!t){let e="";for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+"\n";this.styleTag.textContent=e}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}function PQ(e){let t;return t=11==e.nodeType?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function RQ(e,t){return!!t&&(e==t||e.contains(1!=t.nodeType?t.parentNode:t))}function jQ(e,t){if(!t.anchorNode)return!1;try{return RQ(e,t.anchorNode)}catch(e){return!1}}function NQ(e){return 3==e.nodeType?HQ(e,0,e.nodeValue.length).getClientRects():1==e.nodeType?e.getClientRects():[]}function DQ(e,t,n,r){return!!n&&(LQ(e,t,n,r,-1)||LQ(e,t,n,r,1))}function IQ(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function LQ(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:BQ(e))){if("DIV"==e.nodeName)return!1;let n=e.parentNode;if(!n||1!=n.nodeType)return!1;t=IQ(e)+(i<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if(1==(e=e.childNodes[t+(i<0?-1:0)]).nodeType&&"false"==e.contentEditable)return!1;t=i<0?BQ(e):0}}}function BQ(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function zQ(e,t){let n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function FQ(e){return{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}class UQ{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?BQ(t):0),n,Math.min(e.focusOffset,n?BQ(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}}let QQ,qQ=null;function GQ(e){if(e.setActive)return e.setActive();if(qQ)return e.focus(qQ);let t=[];for(let n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(null==qQ?{get preventScroll(){return qQ={preventScroll:!0},!0}}:void 0),!qQ){qQ=!1;for(let e=0;e<t.length;){let n=t[e++],r=t[e++],i=t[e++];n.scrollTop!=r&&(n.scrollTop=r),n.scrollLeft!=i&&(n.scrollLeft=i)}}}function HQ(e,t,n=t){let r=QQ||(QQ=document.createRange());return r.setEnd(e,n),r.setStart(e,t),r}function VQ(e,t,n){let r={key:t,code:t,keyCode:n,which:n,cancelable:!0},i=new KeyboardEvent("keydown",r);i.synthetic=!0,e.dispatchEvent(i);let o=new KeyboardEvent("keyup",r);return o.synthetic=!0,e.dispatchEvent(o),i.defaultPrevented||o.defaultPrevented}function WQ(e){for(;e.attributes.length;)e.removeAttributeNode(e.attributes[0])}function XQ(e){return e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}class YQ{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(e,t){return new YQ(e.parentNode,IQ(e),t)}static after(e,t){return new YQ(e.parentNode,IQ(e)+1,t)}}const ZQ=[];class JQ{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let n of this.children){if(n==e)return t;t+=n.length+n.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,t){if(2&this.flags){let n,r=this.dom,i=null;for(let o of this.children){if(7&o.flags){if(!o.dom&&(n=i?i.nextSibling:r.firstChild)){let e=JQ.get(n);(!e||!e.parent&&e.canReuseDOM(o))&&o.reuseDOM(n)}o.sync(e,t),o.flags&=-8}if(n=i?i.nextSibling:r.firstChild,t&&!t.written&&t.node==r&&n!=o.dom&&(t.written=!0),o.dom.parentNode==r)for(;n&&n!=o.dom;)n=KQ(n);else r.insertBefore(o.dom,n);i=o.dom}for(n=i?i.nextSibling:r.firstChild,n&&t&&t.node==r&&(t.written=!0);n;)n=KQ(n)}else if(1&this.flags)for(let n of this.children)7&n.flags&&(n.sync(e,t),n.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,t){let n;if(e==this.dom)n=this.dom.childNodes[t];else{let r=0==BQ(e)?0:0==t?-1:1;for(;;){let t=e.parentNode;if(t==this.dom)break;0==r&&t.firstChild!=t.lastChild&&(r=e==t.firstChild?-1:1),e=t}n=r<0?e:e.nextSibling}if(n==this.dom.firstChild)return 0;for(;n&&!JQ.get(n);)n=n.nextSibling;if(!n)return this.length;for(let e=0,t=0;;e++){let r=this.children[e];if(r.dom==n)return t;t+=r.length+r.breakAfter}}domBoundsAround(e,t,n=0){let r=-1,i=-1,o=-1,s=-1;for(let a=0,l=n,c=n;a<this.children.length;a++){let n=this.children[a],u=l+n.length;if(l<e&&u>t)return n.domBoundsAround(e,t,l);if(u>=e&&-1==r&&(r=a,i=l),l>t&&n.dom.parentNode==this.dom){o=a,s=c;break}c=u,l=u+n.breakAfter}return{from:i,to:s<0?n+this.length:s,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o<this.children.length&&o>=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),1&t.flags)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,7&this.flags&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,n=ZQ){this.markDirty();for(let n=e;n<t;n++){let e=this.children[n];e.parent==this&&e.destroy()}this.children.splice(e,t-e,...n);for(let e=0;e<n.length;e++)n[e].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new eq(this.children,e,this.children.length)}childPos(e,t=1){return this.childCursor().findPos(e,t)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==e?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,t,n,r,i,o){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!(8&(this.flags|e.flags))}getSide(){return 0}destroy(){this.parent=null}}function KQ(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}JQ.prototype.breakAfter=0;class eq{constructor(e,t,n){this.children=e,this.pos=t,this.i=n,this.off=0}findPos(e,t=1){for(;;){if(e>this.pos||e==this.pos&&(t>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function tq(e,t,n,r,i,o,s,a,l){let{children:c}=e,u=c.length?c[t]:null,d=o.length?o[o.length-1]:null,h=d?d.breakAfter:s;if(!(t==r&&u&&!s&&!h&&o.length<2&&u.merge(n,i,o.length?d:null,0==n,a,l))){if(r<c.length){let e=c[r];e&&(i<e.length||e.breakAfter&&(null==d?void 0:d.breakAfter))?(t==r&&(e=e.split(i),i=0),!h&&d&&e.merge(0,i,d,!0,0,l)?o[o.length-1]=e:((i||e.children.length&&!e.children[0].length)&&e.merge(0,i,null,!1,0,l),o.push(e))):(null==e?void 0:e.breakAfter)&&(d?d.breakAfter=1:s=1),r++}for(u&&(u.breakAfter=s,n>0&&(!s&&o.length&&u.merge(n,u.length,o[0],!1,a,0)?u.breakAfter=o.shift().breakAfter:(n<u.length||u.children.length&&0==u.children[u.children.length-1].length)&&u.merge(n,u.length,null,!1,a,0),t++));t<r&&o.length;)if(c[r-1].become(o[o.length-1]))r--,o.pop(),l=o.length?0:a;else{if(!c[t].become(o[0]))break;t++,o.shift(),a=o.length?0:l}!o.length&&t&&r<c.length&&!c[t-1].breakAfter&&c[r].merge(0,0,c[t-1],!1,a,l)&&t--,(t<r||o.length)&&e.replaceChildren(t,r,o)}}function nq(e,t,n,r,i,o){let s=e.childCursor(),{i:a,off:l}=s.findPos(n,1),{i:c,off:u}=s.findPos(t,-1),d=t-n;for(let e of r)d+=e.length;e.length+=d,tq(e,c,u,a,l,r,0,i,o)}let rq="undefined"!=typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},iq="undefined"!=typeof document?document:{documentElement:{style:{}}};const oq=/Edge\/(\d+)/.exec(rq.userAgent),sq=/MSIE \d/.test(rq.userAgent),aq=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(rq.userAgent),lq=!!(sq||aq||oq),cq=!lq&&/gecko\/(\d+)/i.test(rq.userAgent),uq=!lq&&/Chrome\/(\d+)/.exec(rq.userAgent),dq="webkitFontSmoothing"in iq.documentElement.style,hq=!lq&&/Apple Computer/.test(rq.vendor),pq=hq&&(/Mobile\/\w+/.test(rq.userAgent)||rq.maxTouchPoints>2);var fq={mac:pq||/Mac/.test(rq.platform),windows:/Win/.test(rq.platform),linux:/Linux|X11/.test(rq.platform),ie:lq,ie_version:sq?iq.documentMode||6:aq?+aq[1]:oq?+oq[1]:0,gecko:cq,gecko_version:cq?+(/Firefox\/(\d+)/.exec(rq.userAgent)||[0,0])[1]:0,chrome:!!uq,chrome_version:uq?+uq[1]:0,ios:pq,android:/Android\b/.test(rq.userAgent),webkit:dq,safari:hq,webkit_version:dq?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=iq.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class mq extends JQ{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){3==e.nodeType&&this.createDOM(e)}merge(e,t,n){return!(8&this.flags||n&&(!(n instanceof mq)||this.length-(t-e)+n.length>256||8&n.flags))&&(this.text=this.text.slice(0,e)+(n?n.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new mq(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=8&this.flags,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new YQ(this.dom,e)}domBoundsAround(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return function(e,t,n){let r=e.nodeValue.length;t>r&&(t=r);let i=t,o=t,s=0;0==t&&n<0||t==r&&n>=0?fq.chrome||fq.gecko||(t?(i--,s=1):o<r&&(o++,s=-1)):n<0?i--:o<r&&o++;let a=HQ(e,i,o).getClientRects();if(!a.length)return null;let l=a[(s?s<0:n>=0)?0:a.length-1];fq.safari&&!s&&0==l.width&&(l=Array.prototype.find.call(a,e=>e.width)||l);return s?zQ(l,s<0):l||null}(this.dom,e,t)}}class gq extends JQ{constructor(e,t=[],n=0){super(),this.mark=e,this.children=t,this.length=n;for(let e of t)e.setParent(this)}setAttrs(e){if(WQ(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!(8&(this.flags|e.flags))}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,n,r,i,o){return(!n||!(!(n instanceof gq&&n.mark.eq(this.mark))||e&&i<=0||t<this.length&&o<=0))&&(nq(this,e,t,n?n.children:[],i-1,o-1),this.markDirty(),!0)}split(e){let t=[],n=0,r=-1,i=0;for(let o of this.children){let s=n+o.length;s>e&&t.push(n<e?o.split(e-n):o),r<0&&n>=e&&(r=i),n=s,i++}let o=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new gq(this.mark,t,o)}domAtPos(e){return yq(this,e)}coordsAt(e,t){return Sq(this,e,t)}}class bq extends JQ{static create(e,t,n){return new bq(e,t,n)}constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}split(e){let t=bq.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}getSide(){return this.side}merge(e,t,n,r,i,o){return!(n&&(!(n instanceof bq&&this.widget.compare(n.widget))||e>0&&i<=0||t<this.length&&o<=0))&&(this.length=e+(n?n.length:0)+(this.length-t),!0)}become(e){return e instanceof bq&&e.side==this.side&&this.widget.constructor==e.widget.constructor&&(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0)}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(0==this.length)return zx.empty;let e=this;for(;e.parent;)e=e.parent;let{view:t}=e,n=t&&t.state.doc,r=this.posAtStart;return n?n.slice(r,r+this.length):zx.empty}domAtPos(e){return(this.length?0==e:this.side>0)?YQ.before(this.dom):YQ.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);if(n)return n;let r=this.dom.getClientRects(),i=null;if(!r.length)return null;let o=this.side?this.side<0:e>0;for(let t=o?r.length-1:0;i=r[t],!(e>0?0==t:t==r.length-1||i.top<i.bottom);t+=o?-1:1);return zQ(i,!o)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class vq extends JQ{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof vq&&e.side==this.side}split(){return new vq(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?YQ.before(this.dom):YQ.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return zx.empty}get isHidden(){return!0}}function yq(e,t){let n=e.dom,{children:r}=e,i=0;for(let e=0;i<r.length;i++){let o=r[i],s=e+o.length;if(!(s==e&&o.getSide()<=0)){if(t>e&&t<s&&o.dom.parentNode==n)return o.domAtPos(t-e);if(t<=e)break;e=s}}for(let e=i;e>0;e--){let t=r[e-1];if(t.dom.parentNode==n)return t.domAtPos(t.length)}for(let e=i;e<r.length;e++){let t=r[e];if(t.dom.parentNode==n)return t.domAtPos(0)}return new YQ(n,0)}function Sq(e,t,n){let r=null,i=-1,o=null,s=-1;!function e(t,a){for(let l=0,c=0;l<t.children.length&&c<=a;l++){let u=t.children[l],d=c+u.length;d>=a&&(u.children.length?e(u,a-c):(!o||o.isHidden&&n>0)&&(d>a||c==d&&u.getSide()>0)?(o=u,s=a-c):(c<a||c==d&&u.getSide()<0&&!u.isHidden)&&(r=u,i=a-c)),c=d}}(e,t);let a=(n<0?r:o)||r||o;return a?a.coordsAt(Math.max(0,a==r?i:s),n):function(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=NQ(t);return n[n.length-1]||null}(e)}function _q(e,t){for(let n in e)"class"==n&&t.class?t.class+=" "+e.class:"style"==n&&t.style?t.style+=";"+e.style:t[n]=e[n];return t}mq.prototype.children=bq.prototype.children=vq.prototype.children=ZQ;const xq=Object.create(null);function wq(e,t,n){if(e==t)return!0;e||(e=xq),t||(t=xq);let r=Object.keys(e),i=Object.keys(t);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let o of r)if(o!=n&&(-1==i.indexOf(o)||e[o]!==t[o]))return!1;return!0}function kq(e,t,n){let r=!1;if(t)for(let i in t)n&&i in n||(r=!0,"style"==i?e.style.cssText="":e.removeAttribute(i));if(n)for(let i in n)t&&t[i]==n[i]||(r=!0,"style"==i?e.style.cssText=n[i]:e.setAttribute(i,n[i]));return r}function Oq(e){let t=Object.create(null);for(let n=0;n<e.attributes.length;n++){let r=e.attributes[n];t[r.name]=r.value}return t}class Eq extends JQ{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,n,r,i,o){if(n){if(!(n instanceof Eq))return!1;this.dom||n.transferDOM(this)}return r&&this.setDeco(n?n.attrs:null),nq(this,e,t,n?n.children:[],i,o),!0}split(e){let t=new Eq;if(t.breakAfter=this.breakAfter,0==this.length)return t;let{i:n,off:r}=this.childPos(e);r&&(t.append(this.children[n].split(r),0),this.children[n].merge(r,this.children[n].length,null,!1,0,0),n++);for(let e=n;e<this.children.length;e++)t.append(this.children[e],0);for(;n>0&&0==this.children[n-1].length;)this.children[--n].destroy();return this.children.length=n,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){wq(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){!function e(t,n,r){let i,{children:o}=t;r>0&&n instanceof gq&&o.length&&(i=o[o.length-1])instanceof gq&&i.mark.eq(n.mark)?e(i,n.children[0],r-1):(o.push(n),n.setParent(t)),t.length+=n.length}(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=_q(t,this.attrs||{})),n&&(this.attrs=_q({class:n},this.attrs||{}))}domAtPos(e){return yq(this,e)}reuseDOM(e){"DIV"==e.nodeName&&(this.setDOM(e),this.flags|=6)}sync(e,t){var n;this.dom?4&this.flags&&(WQ(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(kq(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let r=this.dom.lastChild;for(;r&&JQ.get(r)instanceof gq;)r=r.lastChild;if(!(r&&this.length&&("BR"==r.nodeName||0!=(null===(n=JQ.get(r))||void 0===n?void 0:n.isEditable)||fq.ios&&this.children.some(e=>e instanceof mq)))){let e=document.createElement("BR");e.cmIgnore=!0,this.dom.appendChild(e)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let e,t=0;for(let n of this.children){if(!(n instanceof mq)||/[^ -~]/.test(n.text))return null;let r=NQ(n.dom);if(1!=r.length)return null;t+=r[0].width,e=r[0].height}return t?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length,textHeight:e}:null}coordsAt(e,t){let n=Sq(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:e}=this.parent.view.viewState,t=n.bottom-n.top;if(Math.abs(t-e.lineHeight)<2&&e.textHeight<t){let r=(t-e.textHeight)/2;return{top:n.top+r,bottom:n.bottom-r,left:n.left,right:n.left}}}return n}become(e){return!1}covers(){return!0}static find(e,t){for(let n=0,r=0;n<e.children.length;n++){let i=e.children[n],o=r+i.length;if(o>=t){if(i instanceof Eq)return i;if(o>t)break}r=o+i.breakAfter}return null}}class Aq extends JQ{constructor(e,t,n){super(),this.widget=e,this.length=t,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(e,t,n,r,i,o){return!(n&&(!(n instanceof Aq&&this.widget.compare(n.widget))||e>0&&i<=0||t<this.length&&o<=0))&&(this.length=e+(n?n.length:0)+(this.length-t),!0)}domAtPos(e){return 0==e?YQ.before(this.dom):YQ.after(this.dom,e==this.length)}split(e){let t=this.length-e;this.length=e;let n=new Aq(this.widget,t,this.deco);return n.breakAfter=this.breakAfter,n}get children(){return ZQ}sync(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):zx.empty}domBoundsAround(){return null}become(e){return e instanceof Aq&&e.widget.constructor==this.widget.constructor&&(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0)}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,t){return this.widget.coordsAt(this.dom,e,t)}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:t,endSide:n}=this.deco;return t!=n&&(e<0?t<0:n>0)}}class Tq{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}destroy(e){}}var Cq=function(e){return e[e.Text=0]="Text",e[e.WidgetBefore=1]="WidgetBefore",e[e.WidgetAfter=2]="WidgetAfter",e[e.WidgetRange=3]="WidgetRange",e}(Cq||(Cq={}));class Mq extends uk{constructor(e,t,n,r){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(e){return new $q(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new Rq(e,t,t,n,e.widget||null,!1)}static replace(e){let t,n,r=!!e.block;if(e.isBlockGap)t=-5e8,n=4e8;else{let{start:i,end:o}=jq(e,r);t=(i?r?-3e8:-1:5e8)-1,n=1+(o?r?2e8:1:-6e8)}return new Rq(e,t,n,r,e.widget||null,!0)}static line(e){return new Pq(e)}static set(e,t=!1){return fk.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}Mq.none=fk.empty;class $q extends Mq{constructor(e){let{start:t,end:n}=jq(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,n;return this==e||e instanceof $q&&this.tagName==e.tagName&&(this.class||(null===(t=this.attrs)||void 0===t?void 0:t.class))==(e.class||(null===(n=e.attrs)||void 0===n?void 0:n.class))&&wq(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}$q.prototype.point=!1;class Pq extends Mq{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Pq&&this.spec.class==e.spec.class&&wq(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}Pq.prototype.mapMode=aw.TrackBefore,Pq.prototype.point=!0;class Rq extends Mq{constructor(e,t,n,r,i,o){super(t,n,i,e),this.block=r,this.isReplace=o,this.mapMode=r?t<=0?aw.TrackBefore:aw.TrackAfter:aw.TrackDel}get type(){return this.startSide!=this.endSide?Cq.WidgetRange:this.startSide<=0?Cq.WidgetBefore:Cq.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Rq&&(t=this.widget,n=e.widget,t==n||!!(t&&n&&t.compare(n)))&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide;var t,n}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}function jq(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return null==n&&(n=e.inclusive),null==r&&(r=e.inclusive),{start:null!=n?n:t,end:null!=r?r:t}}function Nq(e,t,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}Rq.prototype.point=!0;class Dq{constructor(e,t,n,r){this.doc=e,this.pos=t,this.end=n,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Aq&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Eq),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Iq(new vq(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||e&&this.content.length&&this.content[this.content.length-1]instanceof Aq||this.getLine()}buildText(e,t,n){for(;e>0;){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:r}=this.cursor.next(this.skip);if(this.skip=0,r)throw new Error("Ran out of text content when drawing inline views");if(n){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}this.text=t,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(Iq(new mq(this.text.slice(this.textOff,this.textOff+r)),t),n),this.atCursorPos=!0,this.textOff+=r,e-=r,n=0}}span(e,t,n,r){this.buildText(t-e,n,r),this.pos=t,this.openStart<0&&(this.openStart=r)}point(e,t,n,r,i,o){if(this.disallowBlockEffectsFor[o]&&n instanceof Rq){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let s=t-e;if(n instanceof Rq)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Aq(n.widget||new Lq("div"),s,n));else{let o=bq.create(n.widget||new Lq("span"),s,s?0:n.startSide),a=this.atCursorPos&&!o.isEditable&&i<=r.length&&(e<t||n.startSide>0),l=!o.isEditable&&(e<t||i>r.length||n.startSide<=0),c=this.getLine();2!=this.pendingBuffer||a||o.isEditable||(this.pendingBuffer=0),this.flushBuffer(r),a&&(c.append(Iq(new vq(1),r),i),i=r.length+Math.max(0,i-r.length)),c.append(Iq(o,r),i),this.atCursorPos=l,this.pendingBuffer=l?e<t||i>r.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);s&&(this.textOff+s<=this.text.length?this.textOff+=s:(this.skip+=s-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=i)}static build(e,t,n,r,i){let o=new Dq(e,t,n,i);return o.openEnd=fk.spans(r,t,n,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function Iq(e,t){for(let n of t)e=new gq(n,[e],e.length);return e}class Lq extends Tq{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}const Bq=Sw.define(),zq=Sw.define(),Fq=Sw.define(),Uq=Sw.define(),Qq=Sw.define(),qq=Sw.define(),Gq=Sw.define(),Hq=Sw.define({combine:e=>e.some(e=>e)}),Vq=Sw.define({combine:e=>e.some(e=>e)});class Wq{constructor(e,t="nearest",n="nearest",r=5,i=5,o=!1){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=i,this.isSnapshot=o}map(e){return e.empty?this:new Wq(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Wq(bw.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Xq=Yw.define({map:(e,t)=>e.map(t)});function Yq(e,t,n){let r=e.facet(Uq);r.length?r[0](t):window.onerror?window.onerror(String(t),n,void 0,void 0,t):n?console.error(n+":",t):console.error(t)}const Zq=Sw.define({combine:e=>!e.length||e[0]});let Jq=0;const Kq=Sw.define();class eG{constructor(e,t,n,r,i){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=r,this.extension=i(this)}static define(e,t){const{eventHandlers:n,eventObservers:r,provide:i,decorations:o}=t||{};return new eG(Jq++,e,n,r,e=>{let t=[Kq.of(e)];return o&&t.push(iG.of(t=>{let n=t.plugin(e);return n?o(n):Mq.none})),i&&t.push(i(e)),t})}static fromClass(e,t){return eG.define(t=>new e(t),t)}}class tG{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(Yq(e.state,t,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(e){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Yq(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(null===(t=this.value)||void 0===t?void 0:t.destroy)try{this.value.destroy()}catch(t){Yq(e.state,t,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const nG=Sw.define(),rG=Sw.define(),iG=Sw.define(),oG=Sw.define(),sG=Sw.define();function aG(e,t,n){let r=e.state.facet(sG);if(!r.length)return r;let i=r.map(t=>t instanceof Function?t(e):t),o=[];return fk.spans(i,t,n,{point(){},span(e,t,n,r){let i=o;for(let o=n.length-1;o>=0;o--,r--){let s,a=n[o].spec.bidiIsolate;if(null!=a)if(r>0&&i.length&&(s=i[i.length-1]).to==e&&s.direction==a)s.to=t,i=s.inner;else{let n={from:e,to:t,direction:a,inner:[]};i.push(n),i=n.inner}}}}),o}const lG=Sw.define();function cG(e){let t=0,n=0,r=0,i=0;for(let o of e.state.facet(lG)){let s=o(e);s&&(null!=s.left&&(t=Math.max(t,s.left)),null!=s.right&&(n=Math.max(n,s.right)),null!=s.top&&(r=Math.max(r,s.top)),null!=s.bottom&&(i=Math.max(i,s.bottom)))}return{left:t,right:n,top:r,bottom:i}}const uG=Sw.define();class dG{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(e){return new dG(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>n.toA)){if(r.toA<n.fromA)break;n=n.join(r),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(e,t){if(0==t.length)return e;let n=[];for(let r=0,i=0,o=0,s=0;;r++){let a=r==e.length?null:e[r],l=o-s,c=a?a.fromB:1e9;for(;i<t.length&&t[i]<c;){let e=t[i],r=t[i+1],o=Math.max(s,e),a=Math.min(c,r);if(o<=a&&new dG(o+l,a+l,o,a).addToSet(n),r>c)break;i+=2}if(!a)return n;new dG(a.fromA,a.toA,a.fromB,a.toB).addToSet(n),o=a.toA,s=a.toB}}}class hG{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=cw.empty(this.startState.doc.length);for(let e of n)this.changes=this.changes.compose(e.changes);let r=[];this.changes.iterChangedRanges((e,t,n,i)=>r.push(new dG(e,t,n,i))),this.changedRanges=r}static create(e,t,n){return new hG(e,t,n)}get viewportChanged(){return(4&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(10&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return 0==this.flags&&0==this.transactions.length}}var pG=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(pG||(pG={}));const fG=pG.LTR,mG=pG.RTL;function gG(e){let t=[];for(let n=0;n<e.length;n++)t.push(1<<+e[n]);return t}const bG=gG("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),vG=gG("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),yG=Object.create(null),SG=[];for(let e of["()","[]","{}"]){let t=e.charCodeAt(0),n=e.charCodeAt(1);yG[t]=n,yG[n]=-t}const _G=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class xG{get dir(){return this.level%2?mG:fG}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}static find(e,t,n,r){let i=-1;for(let o=0;o<e.length;o++){let s=e[o];if(s.from<=t&&s.to>=t){if(s.level==n)return o;(i<0||(0!=r?r<0?s.from<t:s.to>t:e[i].level>s.level))&&(i=o)}}if(i<0)throw new RangeError("Index out of range");return i}}function wG(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!wG(r.inner,i.inner))return!1}return!0}const kG=[];function OG(e,t,n,r,i,o,s){let a=t%2?2:1;!function(e,t,n,r,i){for(let s=0;s<=r.length;s++){let a=s?r[s-1].to:t,l=s<r.length?r[s].from:n,c=s?256:i;for(let t=a,n=c,r=c;t<l;t++){let i=(o=e.charCodeAt(t))<=247?bG[o]:1424<=o&&o<=1524?2:1536<=o&&o<=1785?vG[o-1536]:1774<=o&&o<=2220?4:8192<=o&&o<=8203?256:64336<=o&&o<=65023?4:8204==o?256:1;512==i?i=n:8==i&&4==r&&(i=16),kG[t]=4==i?2:i,7&i&&(r=i),n=i}for(let e=a,t=c,r=c;e<l;e++){let i=kG[e];if(128==i)e<l-1&&t==kG[e+1]&&24&t?i=kG[e]=t:kG[e]=256;else if(64==i){let i=e+1;for(;i<l&&64==kG[i];)i++;let o=e&&8==t||i<n&&8==kG[i]?1==r?1:8:256;for(let t=e;t<i;t++)kG[t]=o;e=i-1}else 8==i&&1==r&&(kG[e]=1);t=i,7&i&&(r=i)}}var o}(e,i,o,r,a),function(e,t,n,r,i){let o=1==i?2:1;for(let s=0,a=0,l=0;s<=r.length;s++){let c=s?r[s-1].to:t,u=s<r.length?r[s].from:n;for(let t,n,r,s=c;s<u;s++)if(n=yG[t=e.charCodeAt(s)])if(n<0){for(let e=a-3;e>=0;e-=3)if(SG[e+1]==-n){let t=SG[e+2],n=2&t?i:4&t?1&t?o:i:0;n&&(kG[s]=kG[SG[e]]=n),a=e;break}}else{if(189==SG.length)break;SG[a++]=s,SG[a++]=t,SG[a++]=l}else if(2==(r=kG[s])||1==r){let e=r==i;l=e?0:1;for(let t=a-3;t>=0;t-=3){let n=SG[t+2];if(2&n)break;if(e)SG[t+2]|=2;else{if(4&n)break;SG[t+2]|=4}}}}}(e,i,o,r,a),function(e,t,n,r){for(let i=0,o=r;i<=n.length;i++){let s=i?n[i-1].to:e,a=i<n.length?n[i].from:t;for(let l=s;l<a;){let s=kG[l];if(256==s){let s=l+1;for(;;)if(s==a){if(i==n.length)break;s=n[i++].to,a=i<n.length?n[i].from:t}else{if(256!=kG[s])break;s++}let c=1==o,u=c==(1==(s<t?kG[s]:r))?c?1:2:r;for(let t=s,r=i,o=r?n[r-1].to:e;t>l;)t==o&&(t=n[--r].from,o=r?n[r-1].to:e),kG[--t]=u;l=s}else o=s,l++}}}(i,o,r,a),function e(t,n,r,i,o,s,a){let l=i%2?2:1;if(i%2==o%2)for(let c=n,u=0;c<r;){let n=!0,d=!1;if(u==s.length||c<s[u].from){let e=kG[c];e!=l&&(n=!1,d=16==e)}let h=n||1!=l?null:[],p=n?i:i+1,f=c;e:for(;;)if(u<s.length&&f==s[u].from){if(d)break e;let e=s[u];if(!n)for(let t=e.to,n=u+1;;){if(t==r)break e;if(!(n<s.length&&s[n].from==t)){if(kG[t]==l)break e;break}t=s[n++].to}if(u++,h)h.push(e);else{e.from>c&&a.push(new xG(c,e.from,p)),OG(t,e.direction==fG!=!(p%2)?i+1:i,o,e.inner,e.from,e.to,a),c=e.to}f=e.to}else{if(f==r||(n?kG[f]!=l:kG[f]==l))break;f++}h?e(t,c,f,i+1,o,h,a):c<f&&a.push(new xG(c,f,p)),c=f}else for(let c=r,u=s.length;c>n;){let r=!0,d=!1;if(!u||c>s[u-1].to){let e=kG[c-1];e!=l&&(r=!1,d=16==e)}let h=r||1!=l?null:[],p=r?i:i+1,f=c;e:for(;;)if(u&&f==s[u-1].to){if(d)break e;let e=s[--u];if(!r)for(let t=e.from,r=u;;){if(t==n)break e;if(!r||s[r-1].to!=t){if(kG[t-1]==l)break e;break}t=s[--r].from}if(h)h.push(e);else{e.to<c&&a.push(new xG(e.to,c,p)),OG(t,e.direction==fG!=!(p%2)?i+1:i,o,e.inner,e.from,e.to,a),c=e.from}f=e.from}else{if(f==n||(r?kG[f-1]!=l:kG[f-1]==l))break;f--}h?e(t,f,c,i+1,o,h,a):f<c&&a.push(new xG(f,c,p)),c=f}}(e,i,o,t,n,r,s)}function EG(e,t,n){if(!e)return[new xG(0,0,t==mG?1:0)];if(t==fG&&!n.length&&!_G.test(e))return AG(e.length);if(n.length)for(;e.length>kG.length;)kG[kG.length]=256;let r=[],i=t==fG?0:1;return OG(e,i,i,n,0,e.length,r),r}function AG(e){return[new xG(0,e,0)]}let TG="";function CG(e,t,n,r,i){var o;let s=r.head-e.from,a=-1;if(0==s){if(!i||!e.length)return null;t[0].level!=n&&(s=t[0].side(!1,n),a=0)}else if(s==e.length){if(i)return null;let e=t[t.length-1];e.level!=n&&(s=e.side(!0,n),a=t.length-1)}a<0&&(a=xG.find(t,s,null!==(o=r.bidiLevel)&&void 0!==o?o:-1,r.assoc));let l=t[a];s==l.side(i,n)&&(l=t[a+=i?1:-1],s=l.side(!i,n));let c=i==(l.dir==n),u=Jx(e.text,s,c);if(TG=e.text.slice(Math.min(s,u),Math.max(s,u)),u!=l.side(i,n))return bw.cursor(u+e.from,c?-1:1,l.level);let d=a==(i?t.length-1:0)?null:t[a+(i?1:-1)];return d||l.level==n?d&&d.level<l.level?bw.cursor(d.side(!i,n)+e.from,i?1:-1,d.level):bw.cursor(u+e.from,i?-1:1,l.level):bw.cursor(i?e.to:e.from,i?-1:1,n)}class MG extends JQ{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Eq],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new dG(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let n=e.changedRanges;this.minWidth>0&&n.length&&(n.every(({fromA:e,toA:t})=>t<this.minWidthFrom||e>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);let r=-1;this.view.inputState.composing>=0&&((null===(t=this.domChanged)||void 0===t?void 0:t.newSel)?r=this.domChanged.newSel.head:function(e,t){let n=!1;t&&e.iterChangedRanges((e,r)=>{e<t.to&&r>t.from&&(n=!0)});return n}(e.changes,this.hasComposition)||e.selectionSet||(r=e.state.selection.main.head));let i=r>-1?function(e,t,n){let r=PG(e,n);if(!r)return null;let{node:i,from:o,to:s}=r,a=i.nodeValue;if(/[\n\r]/.test(a))return null;if(e.state.doc.sliceString(r.from,r.to)!=a)return null;let l=t.invertedDesc,c=new dG(l.mapPos(o),l.mapPos(s),o,s),u=[];for(let t=i.parentNode;;t=t.parentNode){let n=JQ.get(t);if(n instanceof gq)u.push({node:t,deco:n.mark});else{if(n instanceof Eq||"DIV"==t.nodeName&&t.parentNode==e.contentDOM)return{range:c,text:i,marks:u,line:t};if(t==e.contentDOM)return null;u.push({node:t,deco:new $q({inclusive:!0,attributes:Oq(t),tagName:t.tagName.toLowerCase()})})}}}(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:t,to:r}=this.hasComposition;n=new dG(t,r,e.changes.mapPos(t,-1),e.changes.mapPos(r,1)).addToSet(n.slice())}this.hasComposition=i?{from:i.range.fromB,to:i.range.toB}:null,(fq.ie||fq.chrome)&&!i&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=function(e,t,n){let r=new class{constructor(){this.changes=[]}compareRange(e,t){Nq(e,t,this.changes)}comparePoint(e,t){Nq(e,t,this.changes)}};return fk.compare(e,t,n,r),r.changes}(this.decorations,this.updateDeco(),e.changes);return n=dG.extendWithRanges(n,o),!!(7&this.flags||0!=n.length)&&(this.updateInner(n,e.startState.doc.length,i),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,n);let{observer:r}=this.view;r.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let e=fq.chrome||fq.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,e),this.flags&=-8,e&&(e.written||r.selectionRange.focusNode!=e.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(e=>e.flags&=-9);let i=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let e of this.children)e instanceof Aq&&e.widget instanceof $G&&i.push(e.dom);r.updateGaps(i)}updateChildren(e,t,n){let r=n?n.range.addToSet(e.slice()):e,i=this.childCursor(t);for(let e=r.length-1;;e--){let t=e>=0?r[e]:null;if(!t)break;let o,s,a,l,{fromA:c,toA:u,fromB:d,toB:h}=t;if(n&&n.range.fromB<h&&n.range.toB>d){let e=Dq.build(this.view.state.doc,d,n.range.fromB,this.decorations,this.dynamicDecorationMap),t=Dq.build(this.view.state.doc,n.range.toB,h,this.decorations,this.dynamicDecorationMap);s=e.breakAtStart,a=e.openStart,l=t.openEnd;let r=this.compositionView(n);t.breakAtStart?r.breakAfter=1:t.content.length&&r.merge(r.length,r.length,t.content[0],!1,t.openStart,0)&&(r.breakAfter=t.content[0].breakAfter,t.content.shift()),e.content.length&&r.merge(0,0,e.content[e.content.length-1],!0,0,e.openEnd)&&e.content.pop(),o=e.content.concat(r).concat(t.content)}else({content:o,breakAtStart:s,openStart:a,openEnd:l}=Dq.build(this.view.state.doc,d,h,this.decorations,this.dynamicDecorationMap));let{i:p,off:f}=i.findPos(u,1),{i:m,off:g}=i.findPos(c,-1);tq(this,m,g,p,f,o,s,a,l)}n&&this.fixCompositionDOM(n)}compositionView(e){let t=new mq(e.text.nodeValue);t.flags|=8;for(let{deco:n}of e.marks)t=new gq(n,[t],t.length);let n=new Eq;return n.append(t,0),n}fixCompositionDOM(e){let t=(e,t)=>{t.flags|=8|(t.children.some(e=>7&e.flags)?1:0),this.markedForComposition.add(t);let n=JQ.get(e);n&&n!=t&&(n.dom=null),t.setDOM(e)},n=this.childPos(e.range.fromB,1),r=this.children[n.i];t(e.line,r);for(let i=e.marks.length-1;i>=-1;i--)n=r.childPos(n.off,1),r=r.children[n.i],t(i>=0?e.marks[i].node:e.text,r)}updateSelection(e=!1,t=!1){!e&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let n=this.view.root.activeElement,r=n==this.dom,i=!r&&jQ(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(!(r||t||i))return;let o=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,a=this.moveToLine(this.domAtPos(s.anchor)),l=s.empty?a:this.moveToLine(this.domAtPos(s.head));if(fq.gecko&&s.empty&&!this.hasComposition&&(1==(c=a).node.nodeType&&c.node.firstChild&&(0==c.offset||"false"==c.node.childNodes[c.offset-1].contentEditable)&&(c.offset==c.node.childNodes.length||"false"==c.node.childNodes[c.offset].contentEditable))){let e=document.createTextNode("");this.view.observer.ignore(()=>a.node.insertBefore(e,a.node.childNodes[a.offset]||null)),a=l=new YQ(e,0),o=!0}var c;let u=this.view.observer.selectionRange;!o&&u.focusNode&&DQ(a.node,a.offset,u.anchorNode,u.anchorOffset)&&DQ(l.node,l.offset,u.focusNode,u.focusOffset)||(this.view.observer.ignore(()=>{fq.android&&fq.chrome&&this.dom.contains(u.focusNode)&&function(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(1==n.nodeType&&"false"==n.contentEditable)return!0;return!1}(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let e=PQ(this.view.root);if(e)if(s.empty){if(fq.gecko){let e=(t=a.node,r=a.offset,1!=t.nodeType?0:(r&&"false"==t.childNodes[r-1].contentEditable?1:0)|(r<t.childNodes.length&&"false"==t.childNodes[r].contentEditable?2:0));if(e&&3!=e){let t=RG(a.node,a.offset,1==e?1:-1);t&&(a=new YQ(t.node,t.offset))}}e.collapse(a.node,a.offset),null!=s.bidiLevel&&void 0!==e.caretBidiLevel&&(e.caretBidiLevel=s.bidiLevel)}else if(e.extend){e.collapse(a.node,a.offset);try{e.extend(l.node,l.offset)}catch(e){}}else{let t=document.createRange();s.anchor>s.head&&([a,l]=[l,a]),t.setEnd(l.node,l.offset),t.setStart(a.node,a.offset),e.removeAllRanges(),e.addRange(t)}else;var t,r;i&&this.view.root.activeElement==this.dom&&(this.dom.blur(),n&&n.focus())}),this.view.observer.setSelectionRange(a,l)),this.impreciseAnchor=a.precise?null:new YQ(u.anchorNode,u.anchorOffset),this.impreciseHead=l.precise?null:new YQ(u.focusNode,u.focusOffset)}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=PQ(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!(n&&t.empty&&t.assoc&&n.modify))return;let o=Eq.find(this,t.head);if(!o)return;let s=o.posAtStart;if(t.head==s||t.head==s+o.length)return;let a=this.coordsAt(t.head,-1),l=this.coordsAt(t.head,1);if(!a||!l||a.bottom>l.top)return;let c=this.domAtPos(t.head+t.assoc);n.collapse(c.node,c.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let u=e.observer.selectionRange;e.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=t.from&&n.collapse(r,i)}moveToLine(e){let t,n=this.dom;if(e.node!=n)return e;for(let r=e.offset;!t&&r<n.childNodes.length;r++){let e=JQ.get(n.childNodes[r]);e instanceof Eq&&(t=e.domAtPos(0))}for(let r=e.offset-1;!t&&r>=0;r--){let e=JQ.get(n.childNodes[r]);e instanceof Eq&&(t=e.domAtPos(e.length))}return t?new YQ(t.node,t.offset,!0):e}nearest(e){for(let t=e;t;){let e=JQ.get(t);if(e&&e.rootView==this)return e;t=t.parentNode}return null}posFromDOM(e,t){let n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}domAtPos(e){let{i:t,off:n}=this.childCursor().findPos(e,-1);for(;t<this.children.length-1;){let e=this.children[t];if(n<e.length||e instanceof Eq)break;t++,n=0}return this.children[t].domAtPos(n)}coordsAt(e,t){let n=null,r=0;for(let i=this.length,o=this.children.length-1;o>=0;o--){let s=this.children[o],a=i-s.breakAfter,l=a-s.length;if(a<e)break;l<=e&&(l<e||s.covers(-1))&&(a>e||s.covers(1))&&(!n||s instanceof Eq&&!(n instanceof Eq&&t>=0))&&(n=s,r=l),i=l}return n?n.coordsAt(e-r,t):null}coordsForChar(e){let{i:t,off:n}=this.childPos(e,1),r=this.children[t];if(!(r instanceof Eq))return null;for(;r.children.length;){let{i:e,off:t}=r.childPos(n,1);for(;;e++){if(e==r.children.length)return null;if((r=r.children[e]).length)break}n=t}if(!(r instanceof mq))return null;let i=Jx(r.text,n);if(i==n)return null;let o=HQ(r.dom,n,i).getClientRects();for(let e=0;e<o.length;e++){let t=o[e];if(e==o.length-1||t.top<t.bottom&&t.left<t.right)return t}return null}measureVisibleLineHeights(e){let t=[],{from:n,to:r}=e,i=this.view.contentDOM.clientWidth,o=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,a=this.view.textDirection==pG.LTR;for(let e=0,l=0;l<this.children.length;l++){let c=this.children[l],u=e+c.length;if(u>r)break;if(e>=n){let n=c.dom.getBoundingClientRect();if(t.push(n.height),o){let t=c.dom.lastChild,r=t?NQ(t):[];if(r.length){let t=r[r.length-1],o=a?t.right-n.left:n.right-t.left;o>s&&(s=o,this.minWidth=i,this.minWidthFrom=e,this.minWidthTo=u)}}}e=u+c.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return"rtl"==getComputedStyle(this.children[t].dom).direction?pG.RTL:pG.LTR}measureTextSize(){for(let e of this.children)if(e instanceof Eq){let t=e.measureTextSize();if(t)return t}let e,t,n,r=document.createElement("div");return r.className="cm-line",r.style.width="99999px",r.style.position="absolute",r.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(r);let i=NQ(r.firstChild)[0];e=r.getBoundingClientRect().height,t=i?i.width/27:7,n=i?i.height:e,r.remove()}),{lineHeight:e,charWidth:t,textHeight:n}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new eq(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let i=r==t.viewports.length?null:t.viewports[r],o=i?i.from-1:this.length;if(o>n){let r=(t.lineBlockAt(o).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(Mq.replace({widget:new $G(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,o))}if(!i)break;n=i.to+1}return Mq.set(e)}updateDeco(){let e=this.view.state.facet(iG).map((e,t)=>(this.dynamicDecorationMap[t]="function"==typeof e)?e(this.view):e);for(let t=e.length;t<e.length+3;t++)this.dynamicDecorationMap[t]=!1;return this.decorations=[...e,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco]}scrollIntoView(e){if(e.isSnapshot){let t=this.view.viewState.lineBlockAt(e.range.head);return this.view.scrollDOM.scrollTop=t.top-e.yMargin,void(this.view.scrollDOM.scrollLeft=e.xMargin)}let t,{range:n}=e,r=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1);if(!r)return;!n.empty&&(t=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,t.left),top:Math.min(r.top,t.top),right:Math.max(r.right,t.right),bottom:Math.max(r.bottom,t.bottom)});let i=cG(this.view),o={left:r.left-i.left,top:r.top-i.top,right:r.right+i.right,bottom:r.bottom+i.bottom},{offsetWidth:s,offsetHeight:a}=this.view.scrollDOM;!function(e,t,n,r,i,o,s,a){let l=e.ownerDocument,c=l.defaultView||window;for(let u=e,d=!1;u&&!d;)if(1==u.nodeType){let e,h=u==l.body,p=1,f=1;if(h)e=FQ(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(d=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let t=u.getBoundingClientRect();p=t.width/u.offsetWidth,f=t.height/u.offsetHeight,e={left:t.left,right:t.left+u.clientWidth*p,top:t.top,bottom:t.top+u.clientHeight*f}}let m=0,g=0;if("nearest"==i)t.top<e.top?(g=-(e.top-t.top+s),n>0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+g+s)):t.bottom>e.bottom&&(g=t.bottom-e.bottom+s,n<0&&t.top-g<e.top&&(g=-(e.top+g-t.top+s)));else{let r=t.bottom-t.top,o=e.bottom-e.top;g=("center"==i&&r<=o?t.top+r/2-o/2:"start"==i||"center"==i&&n<0?t.top-s:t.bottom-o+s)-e.top}if("nearest"==r)t.left<e.left?(m=-(e.left-t.left+o),n>0&&t.right>e.right+m&&(m=t.right-e.right+m+o)):t.right>e.right&&(m=t.right-e.right+o,n<0&&t.left<e.left+m&&(m=-(e.left+m-t.left+o)));else{m=("center"==r?t.left+(t.right-t.left)/2-(e.right-e.left)/2:"start"==r==a?t.left-o:t.right-(e.right-e.left)+o)-e.left}if(m||g)if(h)c.scrollBy(m,g);else{let e=0,n=0;if(g){let e=u.scrollTop;u.scrollTop+=g/f,n=(u.scrollTop-e)*f}if(m){let t=u.scrollLeft;u.scrollLeft+=m/p,e=(u.scrollLeft-t)*p}t={left:t.left-e,top:t.top-n,right:t.right-e,bottom:t.bottom-n},e&&Math.abs(e-m)<1&&(r="nearest"),n&&Math.abs(n-g)<1&&(i="nearest")}if(h)break;u=u.assignedSlot||u.parentNode}else{if(11!=u.nodeType)break;u=u.host}}(this.view.scrollDOM,o,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,s),-s),Math.max(Math.min(e.yMargin,a),-a),this.view.textDirection==pG.LTR)}}class $G extends Tq{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}}function PG(e,t){let n=e.observer.selectionRange,r=n.focusNode&&RG(n.focusNode,n.focusOffset,0);if(!r)return null;let i=t-r.offset;return{from:i,to:i+r.node.nodeValue.length,node:r.node}}function RG(e,t,n){if(n<=0)for(let n=e,r=t;;){if(3==n.nodeType)return{node:n,offset:r};if(!(1==n.nodeType&&r>0))break;n=n.childNodes[r-1],r=BQ(n)}if(n>=0)for(let r=e,i=t;;){if(3==r.nodeType)return{node:r,offset:i};if(!(1==r.nodeType&&i<r.childNodes.length&&n>=0))break;r=r.childNodes[i],i=0}return null}function jG(e,t){return t.left>e?t.left-e:Math.max(0,e-t.right)}function NG(e,t){return t.top>e?t.top-e:Math.max(0,e-t.bottom)}function DG(e,t){return e.top<t.bottom-1&&e.bottom>t.top+1}function IG(e,t){return t<e.top?{top:t,left:e.left,right:e.right,bottom:e.bottom}:e}function LG(e,t){return t>e.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function BG(e,t,n){let r=e.nodeValue.length,i=-1,o=1e9,s=0;for(let a=0;a<r;a++){let r=HQ(e,a,a+1).getClientRects();for(let l=0;l<r.length;l++){let c=r[l];if(c.top==c.bottom)continue;s||(s=t-c.left);let u=(c.top>n?c.top-n:n-c.bottom)-1;if(c.left-1<=t&&c.right+1>=t&&u<o){let n=t>=(c.left+c.right)/2,r=n;if(fq.chrome||fq.gecko){HQ(e,a).getBoundingClientRect().left==c.right&&(r=!n)}if(u<=0)return{node:e,offset:a+(r?1:0)};i=a+(r?1:0),o=u}}}return{node:e,offset:i>-1?i:s>0?e.nodeValue.length:0}}function zG(e,t,n,r=-1){var i,o;let s,a=e.contentDOM.getBoundingClientRect(),l=a.top+e.viewState.paddingTop,{docHeight:c}=e.viewState,{x:u,y:d}=t,h=d-l;if(h<0)return 0;if(h>c)return e.state.doc.length;for(let t=e.viewState.heightOracle.textHeight/2,i=!1;s=e.elementAtHeight(h),s.type!=Cq.Text;)for(;h=r>0?s.bottom+t:s.top-t,!(h>=0&&h<=c);){if(i)return n?null:0;i=!0,r=-r}d=l+h;let p=s.from;if(p<e.viewport.from)return 0==e.viewport.from?0:n?null:FG(e,a,s,u,d);if(p>e.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:n?null:FG(e,a,s,u,d);let f=e.dom.ownerDocument,m=e.root.elementFromPoint?e.root:f,g=m.elementFromPoint(u,d);g&&!e.contentDOM.contains(g)&&(g=null),g||(u=Math.max(a.left+1,Math.min(a.right-1,u)),g=m.elementFromPoint(u,d),g&&!e.contentDOM.contains(g)&&(g=null));let b,v=-1;if(g&&0!=(null===(i=e.docView.nearest(g))||void 0===i?void 0:i.isEditable))if(f.caretPositionFromPoint){let e=f.caretPositionFromPoint(u,d);e&&({offsetNode:b,offset:v}=e)}else if(f.caretRangeFromPoint){let t=f.caretRangeFromPoint(u,d);t&&(({startContainer:b,startOffset:v}=t),(!e.contentDOM.contains(b)||fq.safari&&function(e,t,n){let r;if(3!=e.nodeType||t!=(r=e.nodeValue.length))return!1;for(let t=e.nextSibling;t;t=t.nextSibling)if(1!=t.nodeType||"BR"!=t.nodeName)return!1;return HQ(e,r-1,r).getBoundingClientRect().left>n}(b,v,u)||fq.chrome&&function(e,t,n){if(0!=t)return!1;for(let t=e;;){let e=t.parentNode;if(!e||1!=e.nodeType||e.firstChild!=t)return!1;if(e.classList.contains("cm-line"))break;t=e}let r=1==e.nodeType?e.getBoundingClientRect():HQ(e,0,Math.max(e.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}(b,v,u))&&(b=void 0))}if(!b||!e.docView.dom.contains(b)){let t=Eq.find(e.docView,p);if(!t)return h>s.top+s.height/2?s.to:s.from;({node:b,offset:v}=function e(t,n,r){let i,o,s,a,l,c,u,d,h=!1;for(let p=t.firstChild;p;p=p.nextSibling){let t=NQ(p);for(let f=0;f<t.length;f++){let m=t[f];o&&DG(o,m)&&(m=IG(LG(m,o.bottom),o.top));let g=jG(n,m),b=NG(r,m);if(0==g&&0==b)return 3==p.nodeType?BG(p,n,r):e(p,n,r);if(!i||a>b||a==b&&s>g){i=p,o=m,s=g,a=b;let e=b?r<m.top?-1:1:g?n<m.left?-1:1:0;h=!e||(e>0?f<t.length-1:f>0)}0==g?r>m.bottom&&(!u||u.bottom<m.bottom)?(l=p,u=m):r<m.top&&(!d||d.top>m.top)&&(c=p,d=m):u&&DG(u,m)?u=LG(u,m.bottom):d&&DG(d,m)&&(d=IG(d,m.top))}}if(u&&u.bottom>=r?(i=l,o=u):d&&d.top<=r&&(i=c,o=d),!i)return{node:t,offset:0};let p=Math.max(o.left,Math.min(o.right,n));return 3==i.nodeType?BG(i,p,r):h&&"false"!=i.contentEditable?e(i,p,r):{node:t,offset:Array.prototype.indexOf.call(t.childNodes,i)+(n>=(o.left+o.right)/2?1:0)}}(t.dom,u,d))}let y=e.docView.nearest(b);if(!y)return null;if(y.isWidget&&1==(null===(o=y.dom)||void 0===o?void 0:o.nodeType)){let e=y.dom.getBoundingClientRect();return t.y<e.top||t.y<=e.bottom&&t.x<=(e.left+e.right)/2?y.posAtStart:y.posAtEnd}return y.localPosFromDOM(b,v)+y.posAtStart}function FG(e,t,n,r,i){let o=Math.round((r-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>1.5*e.defaultLineHeight){let t=e.viewState.heightOracle.textHeight;o+=Math.floor((i-n.top-.5*(e.defaultLineHeight-t))/t)*e.viewState.heightOracle.lineLength}let s=e.state.sliceDoc(n.from,n.to);return n.from+Ak(s,o,e.state.tabSize)}function UG(e,t){let n=e.lineBlockAt(t);if(Array.isArray(n.type))for(let e of n.type)if(e.to>t||e.to==t&&(e.to==n.to||e.type==Cq.Text))return e;return n}function QG(e,t,n,r){let i=e.state.doc.lineAt(t.head),o=e.bidiSpans(i),s=e.textDirectionAt(i.from);for(let a=t,l=null;;){let t=CG(i,o,s,a,n),c=TG;if(!t){if(i.number==(n?e.state.doc.lines:1))return a;c="\n",i=e.state.doc.line(i.number+(n?1:-1)),o=e.bidiSpans(i),t=bw.cursor(n?i.from:i.to)}if(l){if(!l(c))return a}else{if(!r)return t;l=r(c)}a=t}}function qG(e,t,n){for(;;){let r=0;for(let i of e)i.between(t-1,t+1,(e,i,o)=>{if(t>e&&t<i){let o=r||n||(t-e<i-t?-1:1);t=o<0?e:i,r=o}});if(!r)return t}}function GG(e,t,n){let r=qG(e.state.facet(oG).map(t=>t(e)),n.from,t.head>n.from?-1:1);return r==n.from?n:bw.cursor(r,r<n.from?1:-1)}class HG{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){var t;this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,fq.safari&&e.contentDOM.addEventListener("input",()=>null),fq.gecko&&(t=e.contentDOM.ownerDocument,vH.has(t)||(vH.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{})))}handleEvent(e){(function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n,r=t.target;r!=e.contentDOM;r=r.parentNode)if(!r||11==r.nodeType||(n=JQ.get(r))&&n.ignoreEvent(t))return!1;return!0})(this.view,e)&&!this.ignoreDuringComposition(e)&&("keydown"==e.type&&this.keydown(e)||this.runHandlers(e.type,e))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let e of n.observers)e(this.view,t);for(let e of n.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=function(e){let t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec;if(e&&e.domEventHandlers)for(let r in e.domEventHandlers){let i=e.domEventHandlers[r];i&&n(r).handlers.push(VG(t.value,i))}if(e&&e.domEventObservers)for(let r in e.domEventObservers){let i=e.domEventObservers[r];i&&n(r).observers.push(VG(t.value,i))}}for(let e in KG)n(e).handlers.push(KG[e]);for(let e in eH)n(e).observers.push(eH[e]);return t}(e),n=this.handlers,r=this.view.contentDOM;for(let e in t)if("scroll"!=e){let i=!t[e].handlers.length,o=n[e];o&&i!=!o.handlers.length&&(r.removeEventListener(e,this.handleEvent),o=null),o||r.addEventListener(e,this.handleEvent,{passive:i})}for(let e in n)"scroll"==e||t[e]||r.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&Date.now()<this.lastEscPress+2e3)return!0;if(27!=e.keyCode&&YG.indexOf(e.keyCode)<0&&(this.view.inputState.lastEscPress=0),fq.android&&fq.chrome&&!e.synthetic&&(13==e.keyCode||8==e.keyCode))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return!fq.ios||e.synthetic||e.altKey||e.metaKey||!((t=WG.find(t=>t.keyCode==e.keyCode))&&!e.ctrlKey||XG.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(229!=e.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0)}flushIOSKey(){let e=this.pendingIOSKey;return!!e&&(this.pendingIOSKey=void 0,VQ(this.view.contentDOM,e.key,e.keyCode))}ignoreDuringComposition(e){return!!/^key/.test(e.type)&&(this.composing>0||!!(fq.safari&&!fq.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function VG(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(e){Yq(n.state,e)}}}const WG=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],XG="dthko",YG=[16,17,18,20,91,92,224,225];function ZG(e){return.7*Math.max(0,e)+8}class JG{constructor(e,t,n,r){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParent=function(e){let t=e.ownerDocument;for(let n=e.parentNode;n&&n!=t.body;)if(1==n.nodeType){if(n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)return n;n=n.assignedSlot||n.parentNode}else{if(11!=n.nodeType)break;n=n.host}return null}(e.contentDOM),this.atoms=e.state.facet(oG).map(t=>t(e));let i=e.contentDOM.ownerDocument;i.addEventListener("mousemove",this.move=this.move.bind(this)),i.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(lk.allowMultipleSelections)&&function(e,t){let n=e.state.facet(Bq);return n.length?n[0](t):fq.mac?t.metaKey:t.ctrlKey}(e,t),this.dragging=!(!function(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=PQ(e.root);if(!r||0==r.rangeCount)return!0;let i=r.getRangeAt(0).getClientRects();for(let e=0;e<i.length;e++){let n=i[e];if(n.left<=t.clientX&&n.right>=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}(e,t)||1!=hH(t))&&null}start(e){!1===this.dragging&&this.select(e)}move(e){var t,n,r;if(0==e.buttons)return this.destroy();if(this.dragging||null==this.dragging&&(n=this.startEvent,r=e,Math.max(Math.abs(n.clientX-r.clientX),Math.abs(n.clientY-r.clientY))<10))return;this.select(this.lastEvent=e);let i=0,o=0,s=(null===(t=this.scrollParent)||void 0===t?void 0:t.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},a=cG(this.view);e.clientX-a.left<=s.left+6?i=-ZG(s.left-e.clientX):e.clientX+a.right>=s.right-6&&(i=ZG(e.clientX-s.right)),e.clientY-a.top<=s.top+6?o=-ZG(s.top-e.clientY):e.clientY+a.bottom>=s.bottom-6&&(o=ZG(e.clientY-s.bottom)),this.setScrollSpeed(i,o)}up(e){null==this.dragging&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),!1===this.dragging&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let n=0;n<e.ranges.length;n++){let r=e.ranges[n],i=null;if(r.empty){let e=qG(this.atoms,r.from,0);e!=r.from&&(i=bw.cursor(e,-1))}else{let e=qG(this.atoms,r.from,-1),t=qG(this.atoms,r.to,1);e==r.from&&t==r.to||(i=bw.range(r.from==r.anchor?e:t,r.from==r.head?e:t))}i&&(t||(t=e.ranges.slice()),t[n]=i)}return t?bw.create(t,e.mainIndex):e}select(e){let{view:t}=this,n=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection)||n.main.assoc!=t.state.selection.main.assoc&&!1===this.dragging)&&this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}const KG=Object.create(null),eH=Object.create(null),tH=fq.ie&&fq.ie_version<15||fq.ios&&fq.webkit_version<604;function nH(e,t){let n,{state:r}=e,i=1,o=r.toText(t),s=o.lines==r.selection.ranges.length;if(null!=fH&&r.selection.ranges.every(e=>e.empty)&&fH==o.toString()){let e=-1;n=r.changeByRange(n=>{let a=r.doc.lineAt(n.from);if(a.from==e)return{range:n};e=a.from;let l=r.toText((s?o.line(i++).text:t)+r.lineBreak);return{changes:{from:a.from,insert:l},range:bw.cursor(n.from+l.length)}})}else n=s?r.changeByRange(e=>{let t=o.line(i++);return{changes:{from:e.from,to:e.to,insert:t.text},range:bw.cursor(e.from+t.length)}}):r.replaceSelection(o);e.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}function rH(e,t,n,r){if(1==r)return bw.cursor(t,n);if(2==r)return function(e,t,n=1){let r=e.charCategorizer(t),i=e.doc.lineAt(t),o=t-i.from;if(0==i.length)return bw.cursor(t);0==o?n=1:o==i.length&&(n=-1);let s=o,a=o;n<0?s=Jx(i.text,o,!1):a=Jx(i.text,o);let l=r(i.text.slice(s,a));for(;s>0;){let e=Jx(i.text,s,!1);if(r(i.text.slice(e,s))!=l)break;s=e}for(;a<i.length;){let e=Jx(i.text,a);if(r(i.text.slice(a,e))!=l)break;a=e}return bw.range(s+i.from,a+i.from)}(e.state,t,n);{let n=Eq.find(e.docView,t),r=e.state.doc.lineAt(n?n.posAtEnd:t),i=n?n.posAtStart:r.from,o=n?n.posAtEnd:r.to;return o<e.state.doc.length&&o==r.to&&o++,bw.range(i,o)}}eH.scroll=e=>{e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft},KG.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),27==t.keyCode&&(e.inputState.lastEscPress=Date.now()),!1),eH.touchstart=(e,t)=>{e.inputState.lastTouchTime=Date.now(),e.inputState.setSelectionOrigin("select.pointer")},eH.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")},KG.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of e.state.facet(Fq))if(n=r(e,t),n)break;if(n||0!=t.button||(n=function(e,t){let n=aH(e,t),r=hH(t),i=e.state.selection;return{update(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),i=i.map(e.changes))},get(t,o,s){let a,l=aH(e,t),c=rH(e,l.pos,l.bias,r);if(n.pos!=l.pos&&!o){let t=rH(e,n.pos,n.bias,r),i=Math.min(t.from,c.from),o=Math.max(t.to,c.to);c=i<c.from?bw.range(i,o):bw.range(o,i)}return o?i.replaceRange(i.main.extend(c.from,c.to)):s&&1==r&&i.ranges.length>1&&(a=function(e,t){for(let n=0;n<e.ranges.length;n++){let{from:r,to:i}=e.ranges[n];if(r<=t&&i>=t)return bw.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-(e.mainIndex>n?1:0))}return null}(i,l.pos))?a:s?i.addRange(c):bw.create([c])}}}(e,t)),n){let r=!e.hasFocus;e.inputState.startMouseSelection(new JG(e,t,n,r)),r&&e.observer.ignore(()=>GQ(e.contentDOM));let i=e.inputState.mouseSelection;if(i)return i.start(t),!1===i.dragging}return!1};let iH=(e,t)=>e>=t.top&&e<=t.bottom,oH=(e,t,n)=>iH(t,n)&&e>=n.left&&e<=n.right;function sH(e,t,n,r){let i=Eq.find(e.docView,t);if(!i)return 1;let o=t-i.posAtStart;if(0==o)return 1;if(o==i.length)return-1;let s=i.coordsAt(o,-1);if(s&&oH(n,r,s))return-1;let a=i.coordsAt(o,1);return a&&oH(n,r,a)?1:s&&iH(r,s)?-1:1}function aH(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:n,bias:sH(e,n,t.clientX,t.clientY)}}const lH=fq.ie&&fq.ie_version<=11;let cH=null,uH=0,dH=0;function hH(e){if(!lH)return e.detail;let t=cH,n=dH;return cH=e,dH=Date.now(),uH=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(uH+1)%3:1}function pH(e,t,n,r){if(!n)return;let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:o}=e.inputState,s=r&&o&&function(e,t){let n=e.state.facet(zq);return n.length?n[0](t):fq.mac?!t.altKey:!t.ctrlKey}(e,t)?{from:o.from,to:o.to}:null,a={from:i,insert:n},l=e.state.changes(s?[s,a]:a);e.focus(),e.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:s?"move.drop":"input.drop"}),e.inputState.draggedContent=null}KG.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let r=e.docView.nearest(t.target);if(r&&r.isWidget){let e=r.posAtStart,t=e+r.length;(e>=n.to||t<=n.from)&&(n=bw.range(e,t))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData("Text",e.state.sliceDoc(n.from,n.to)),t.dataTransfer.effectAllowed="copyMove"),!1},KG.dragend=e=>(e.inputState.draggedContent=null,!1),KG.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,o=()=>{++i==n.length&&pH(e,t,r.filter(e=>null!=e).join(e.state.lineBreak),!1)};for(let e=0;e<n.length;e++){let t=new FileReader;t.onerror=o,t.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),o()},t.readAsText(n[e])}return!0}{let n=t.dataTransfer.getData("Text");if(n)return pH(e,t,n,!0),!0}return!1},KG.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=tH?null:t.clipboardData;return n?(nH(e,n.getData("text/plain")||n.getData("text/uri-text")),!0):(function(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{e.focus(),n.remove(),nH(e,n.value)},50)}(e),!1)};let fH=null;KG.copy=KG.cut=(e,t)=>{let{text:n,ranges:r,linewise:i}=function(e){let t=[],n=[],r=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let i=-1;for(let{from:r}of e.selection.ranges){let o=e.doc.lineAt(r);o.number>i&&(t.push(o.text),n.push({from:o.from,to:Math.min(e.doc.length,o.to+1)})),i=o.number}r=!0}return{text:t.join(e.lineBreak),ranges:n,linewise:r}}(e.state);if(!n&&!i)return!1;fH=i?n:null,"cut"!=t.type||e.state.readOnly||e.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let o=tH?null:t.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(function(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout(()=>{r.remove(),e.focus()},50)}(e,n),!1)};const mH=Vw.define();function gH(e,t){let n=[];for(let r of e.facet(Gq)){let i=r(e,t);i&&n.push(i)}return n?e.update({effects:n,annotations:mH.of(!0)}):null}function bH(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=gH(e.state,t);n?e.dispatch(n):e.update([])}},10)}eH.focus=e=>{e.inputState.lastFocusTime=Date.now(),e.scrollDOM.scrollTop||!e.inputState.lastScrollTop&&!e.inputState.lastScrollLeft||(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),bH(e)},eH.blur=e=>{e.observer.clearSelectionRange(),bH(e)},eH.compositionstart=eH.compositionupdate=e=>{null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0)},eH.compositionend=e=>{e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,fq.chrome&&fq.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50)},eH.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},KG.beforeinput=(e,t)=>{var n;let r;if(fq.chrome&&fq.android&&(r=WG.find(e=>e.inputType==t.inputType))&&(e.observer.delayAndroidKey(r.key,r.keyCode),"Backspace"==r.key||"Delete"==r.key)){let t=(null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0;setTimeout(()=>{var n;((null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return!1};const vH=new Set;const yH=["pre-wrap","normal","pre-line","break-spaces"];class SH{constructor(e){this.lineWrapping=e,this.doc=zx.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){if(!this.lineWrapping)return this.lineHeight;return(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return yH.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];r<0?n++:this.heightSamples[Math.floor(10*r)]||(t=!0,this.heightSamples[Math.floor(10*r)]=!0)}return t}refresh(e,t,n,r,i,o){let s=yH.indexOf(e)>-1,a=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=i,a){this.heightSamples={};for(let e=0;e<o.length;e++){let t=o[e];t<0?e++:this.heightSamples[Math.floor(10*t)]=!0}}return a}}class _H{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class xH{constructor(e,t,n,r,i){this.from=e,this.length=t,this.top=n,this.height=r,this._content=i}get type(){return"number"==typeof this._content?Cq.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof Rq?this._content.widget:null}get widgetLineBreaks(){return"number"==typeof this._content?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new xH(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var wH=function(e){return e[e.ByPos=0]="ByPos",e[e.ByHeight=1]="ByHeight",e[e.ByPosNoHeight=2]="ByPosNoHeight",e}(wH||(wH={}));class kH{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(2&this.flags)>0}set outdated(e){this.flags=(e?2:0)|-3&this.flags}setHeight(e,t){this.height!=t&&(Math.abs(this.height-t)>.001&&(e.heightChanged=!0),this.height=t)}replace(e,t,n){return kH.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let i=this,o=n.doc;for(let s=r.length-1;s>=0;s--){let{fromA:a,toA:l,fromB:c,toB:u}=r[s],d=i.lineAt(a,wH.ByPosNoHeight,n.setDoc(t),0,0),h=d.to>=l?d:i.lineAt(l,wH.ByPosNoHeight,n,0,0);for(u+=h.to-l,l=h.to;s>0&&d.from<=r[s-1].toA;)a=r[s-1].fromA,c=r[s-1].fromB,s--,a<d.from&&(d=i.lineAt(a,wH.ByPosNoHeight,n,0,0));c+=d.from-a,a=d.from;let p=MH.build(n.setDoc(o),e,c,u);i=i.replace(a,l,p)}return i.updateHeight(n,0)}static empty(){return new EH(0,0)}static of(e){if(1==e.length)return e[0];let t=0,n=e.length,r=0,i=0;for(;;)if(t==n)if(r>2*i){let i=e[t-1];i.break?e.splice(--t,1,i.left,null,i.right):e.splice(--t,1,i.left,i.right),n+=1+i.break,r-=i.size}else{if(!(i>2*r))break;{let t=e[n];t.break?e.splice(n,1,t.left,null,t.right):e.splice(n,1,t.left,t.right),n+=2+t.break,i-=t.size}}else if(r<i){let n=e[t++];n&&(r+=n.size)}else{let t=e[--n];t&&(i+=t.size)}let o=0;return null==e[t-1]?(o=1,t--):null==e[t]&&(o=1,n++),new TH(kH.of(e.slice(0,t)),o,kH.of(e.slice(n)))}}kH.prototype.size=1;class OH extends kH{constructor(e,t,n){super(e,t),this.deco=n}blockAt(e,t,n,r){return new xH(r,this.length,n,this.height,this.deco||0)}lineAt(e,t,n,r,i){return this.blockAt(0,n,r,i)}forEachLine(e,t,n,r,i,o){e<=i+this.length&&t>=i&&o(this.blockAt(0,n,r,i))}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setHeight(e,r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class EH extends OH{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,n,r){return new xH(r,this.length,n,this.height,this.breaks)}replace(e,t,n){let r=n[0];return 1==n.length&&(r instanceof EH||r instanceof AH&&4&r.flags)&&Math.abs(this.length-r.length)<10?(r instanceof AH?r=new EH(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):kH.of(n)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more?this.setHeight(e,r.heights[r.index++]):(n||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class AH extends kH{constructor(e){super(e,0)}heightMetrics(e,t){let n,r=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,o=i-r+1,s=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*o);n=t/o,this.length>o+1&&(s=(this.height-t)/(this.length-o-1))}else n=this.height/o;return{firstLine:r,lastLine:i,perLine:n,perChar:s}}blockAt(e,t,n,r){let{firstLine:i,lastLine:o,perLine:s,perChar:a}=this.heightMetrics(t,r);if(t.lineWrapping){let i=r+Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length),o=t.doc.lineAt(i),l=s+o.length*a,c=Math.max(n,e-l/2);return new xH(o.from,o.length,c,l,0)}{let r=Math.max(0,Math.min(o-i,Math.floor((e-n)/s))),{from:a,length:l}=t.doc.line(i+r);return new xH(a,l,n+s*r,s,0)}}lineAt(e,t,n,r,i){if(t==wH.ByHeight)return this.blockAt(e,n,r,i);if(t==wH.ByPosNoHeight){let{from:t,to:r}=n.doc.lineAt(e);return new xH(t,r-t,0,0,0)}let{firstLine:o,perLine:s,perChar:a}=this.heightMetrics(n,i),l=n.doc.lineAt(e),c=s+l.length*a,u=l.number-o,d=r+s*u+a*(l.from-i-u);return new xH(l.from,l.length,Math.max(r,Math.min(d,r+this.height-c)),c,0)}forEachLine(e,t,n,r,i,o){e=Math.max(e,i),t=Math.min(t,i+this.length);let{firstLine:s,perLine:a,perChar:l}=this.heightMetrics(n,i);for(let c=e,u=r;c<=t;){let t=n.doc.lineAt(c);if(c==e){let n=t.number-s;u+=a*n+l*(e-i-n)}let r=a+l*t.length;o(new xH(t.from,t.length,u,r,0)),u+=r,c=t.to+1}}replace(e,t,n){let r=this.length-t;if(r>0){let e=n[n.length-1];e instanceof AH?n[n.length-1]=new AH(e.length+r):n.push(null,new AH(r-1))}if(e>0){let t=n[0];t instanceof AH?n[0]=new AH(e+t.length):n.unshift(new AH(e-1),null)}return kH.of(n)}decomposeLeft(e,t){t.push(new AH(e-1),null)}decomposeRight(e,t){t.push(null,new AH(this.length-e-1))}updateHeight(e,t=0,n=!1,r){let i=t+this.length;if(r&&r.from<=t+this.length&&r.more){let n=[],o=Math.max(t,r.from),s=-1;for(r.from>t&&n.push(new AH(r.from-t-1).updateHeight(e,t));o<=i&&r.more;){let t=e.doc.lineAt(o).length;n.length&&n.push(null);let i=r.heights[r.index++];-1==s?s=i:Math.abs(i-s)>=.001&&(s=-2);let a=new EH(t,i);a.outdated=!1,n.push(a),o+=t+1}o<=i&&n.push(null,new AH(i-o).updateHeight(e,o));let a=kH.of(n);return(s<0||Math.abs(a.height-this.height)>=.001||Math.abs(s-this.heightMetrics(e,t).perLine)>=.001)&&(e.heightChanged=!0),a}return(n||this.outdated)&&(this.setHeight(e,e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class TH extends kH{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return 1&this.flags}blockAt(e,t,n,r){let i=n+this.left.height;return e<i?this.left.blockAt(e,t,n,r):this.right.blockAt(e,t,i,r+this.left.length+this.break)}lineAt(e,t,n,r,i){let o=r+this.left.height,s=i+this.left.length+this.break,a=t==wH.ByHeight?e<o:e<s,l=a?this.left.lineAt(e,t,n,r,i):this.right.lineAt(e,t,n,o,s);if(this.break||(a?l.to<s:l.from>s))return l;let c=t==wH.ByPosNoHeight?wH.ByPosNoHeight:wH.ByPos;return a?l.join(this.right.lineAt(s,c,n,o,s)):this.left.lineAt(s,c,n,r,i).join(l)}forEachLine(e,t,n,r,i,o){let s=r+this.left.height,a=i+this.left.length+this.break;if(this.break)e<a&&this.left.forEachLine(e,t,n,r,i,o),t>=a&&this.right.forEachLine(e,t,n,s,a,o);else{let l=this.lineAt(a,wH.ByPos,n,r,i);e<l.from&&this.left.forEachLine(e,l.from-1,n,r,i,o),l.to>=e&&l.from<=t&&o(l),t>l.to&&this.right.forEachLine(l.to+1,t,n,s,a,o)}}replace(e,t,n){let r=this.left.length+this.break;if(t<r)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let i=[];e>0&&this.decomposeLeft(e,i);let o=i.length;for(let e of n)i.push(e);if(e>0&&CH(i,o-1),t<this.length){let e=i.length;this.decomposeRight(t,i),CH(i,e)}return kH.of(i)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<r&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?kH.of(this.break?[e,null,t]:[e,t]):(this.left=e,this.right=t,this.height=e.height+t.height,this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:i,right:o}=this,s=t+i.length+this.break,a=null;return r&&r.from<=t+i.length&&r.more?a=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=s+o.length&&r.more?a=o=o.updateHeight(e,s,n,r):o.updateHeight(e,s,n),a?this.balanced(i,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function CH(e,t){let n,r;null==e[t]&&(n=e[t-1])instanceof AH&&(r=e[t+1])instanceof AH&&e.splice(t-1,3,new AH(n.length+1+r.length))}class MH{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof EH?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new EH(e-this.pos,-1)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let r=n.widget?n.widget.estimatedHeight:0,i=n.widget?n.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let o=t-e;n.block?this.addBlock(new OH(o,r,n)):(o||i||r>=5)&&this.addLineDeco(r,i,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||null==this.nodes[this.nodes.length-1])&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new EH(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new AH(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof EH)return e;let t=new EH(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof EH||this.isCovered?(this.writtenTo<this.pos||null==t)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new EH(0,-1));let n=e;for(let e of this.nodes)e instanceof EH&&e.updateHeight(this.oracle,n),n+=e?e.length:1;return this.nodes}static build(e,t,n,r){let i=new MH(n,e);return fk.spans(t,n,r,i,0),i.finish(n)}}class $H{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,r){(e<t||n&&n.heightRelevant||r&&r.heightRelevant)&&Nq(e,t,this.changes,5)}}function PH(e,t){let n=e.getBoundingClientRect(),r=e.ownerDocument,i=r.defaultView||window,o=Math.max(0,n.left),s=Math.min(i.innerWidth,n.right),a=Math.max(0,n.top),l=Math.min(i.innerHeight,n.bottom);for(let t=e.parentNode;t&&t!=r.body;)if(1==t.nodeType){let n=t,r=window.getComputedStyle(n);if((n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)&&"visible"!=r.overflow){let r=n.getBoundingClientRect();o=Math.max(o,r.left),s=Math.min(s,r.right),a=Math.max(a,r.top),l=t==e.parentNode?r.bottom:Math.min(l,r.bottom)}t="absolute"==r.position||"fixed"==r.position?n.offsetParent:n.parentNode}else{if(11!=t.nodeType)break;t=t.host}return{left:o-n.left,right:Math.max(o,s)-n.left,top:a-(n.top+t),bottom:Math.max(a,l)-(n.top+t)}}function RH(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}class jH{constructor(e,t,n){this.from=e,this.to=t,this.size=n}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}draw(e,t){return Mq.replace({widget:new NH(this.size*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class NH extends Tq{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class DH{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!0,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=FH,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=pG.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(rG).some(e=>"function"!=typeof e&&"cm-lineWrapping"==e.class);this.heightOracle=new SH(t),this.stateDeco=e.facet(iG).filter(e=>"function"!=typeof e),this.heightMap=kH.empty().applyChanges(this.stateDeco,zx.empty,this.heightOracle.setDoc(e.doc),[new dG(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Mq.set(this.lineGaps.map(e=>e.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some(({from:e,to:t})=>r>=e&&r<=t)){let{from:t,to:n}=this.lineBlockAt(r);e.push(new IH(t,n))}}this.viewports=e.sort((e,t)=>e.from-t.from),this.scaler=this.heightMap.height<=7e6?FH:new UH(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(1==this.scaler.scale?e:QH(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=this.state.facet(iG).filter(e=>"function"!=typeof e);let r=e.changedRanges,i=dG.extendWithRanges(r,function(e,t,n){let r=new $H;return fk.compare(e,t,n,r,0),r.changes}(n,this.stateDeco,e?e.changes:cw.empty(this.state.doc.length))),o=this.heightMap.height,s=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),this.heightMap.height!=o&&(e.flags|=2),s?(this.scrollAnchorPos=e.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=i.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<a.from||t.range.head>a.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,t));let l=!e.changes.empty||2&e.flags||a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,this.updateForViewport(),l&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Vq)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,i=n.whiteSpace;this.defaultTextDirection="rtl"==n.direction?pG.RTL:pG.LTR;let o=this.heightOracle.mustRefreshForWrapping(i),s=t.getBoundingClientRect(),a=o||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let l=0,c=0;if(s.width&&s.height){let e=s.width/t.offsetWidth,n=s.height/t.offsetHeight;(e>.995&&e<1.005||!isFinite(e)||Math.abs(s.width-t.offsetWidth)<1)&&(e=1),(n>.995&&n<1.005||!isFinite(n)||Math.abs(s.height-t.offsetHeight)<1)&&(n=1),this.scaleX==e&&this.scaleY==n||(this.scaleX=e,this.scaleY=n,l|=8,o=a=!0)}let u=(parseInt(n.paddingTop)||0)*this.scaleY,d=(parseInt(n.paddingBottom)||0)*this.scaleY;this.paddingTop==u&&this.paddingBottom==d||(this.paddingTop=u,this.paddingBottom=d,l|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,l|=8);let h=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=h&&(this.scrollAnchorHeight=-1,this.scrollTop=h),this.scrolledToBottom=XQ(e.scrollDOM);let p=(this.printing?RH:PH)(t,this.paddingTop),f=p.top-this.pixelViewport.top,m=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let b=s.width;if(this.contentDOMWidth==b&&this.editorHeight==e.scrollDOM.clientHeight||(this.contentDOMWidth=s.width,this.editorHeight=e.scrollDOM.clientHeight,l|=8),a){let t=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(t)&&(o=!0),o||r.lineWrapping&&Math.abs(b-this.contentDOMWidth)>r.charWidth){let{lineHeight:n,charWidth:s,textHeight:a}=e.docView.measureTextSize();o=n>0&&r.refresh(i,n,s,a,b/s,t),o&&(e.docView.minWidth=0,l|=8)}f>0&&m>0?c=Math.max(f,m):f<0&&m<0&&(c=Math.min(f,m)),r.heightChanged=!1;for(let n of this.viewports){let i=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(o?kH.empty().applyChanges(this.stateDeco,zx.empty,this.heightOracle,[new dG(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,o,new _H(n.from,i))}r.heightChanged&&(l|=2)}let v=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return v&&(this.viewport=this.getViewport(c,this.scrollTarget)),this.updateForViewport(),(2&l||v)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),l}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:o,visibleBottom:s}=this,a=new IH(r.lineAt(o-1e3*n,wH.ByHeight,i,0,0).from,r.lineAt(s+1e3*(1-n),wH.ByHeight,i,0,0).to);if(t){let{head:e}=t.range;if(e<a.from||e>a.to){let n,o=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),s=r.lineAt(e,wH.ByPos,i,0,0);n="center"==t.y?(s.top+s.bottom)/2-o/2:"start"==t.y||"nearest"==t.y&&e<a.from?s.top:s.bottom-o,a=new IH(r.lineAt(n-500,wH.ByHeight,i,0,0).from,r.lineAt(n+o+500,wH.ByHeight,i,0,0).to)}}return a}mapViewport(e,t){let n=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new IH(this.heightMap.lineAt(n,wH.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,wH.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,wH.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(t,wH.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:s}=this;return(0==e||r<=o-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||i>=s+Math.max(10,Math.min(n,250)))&&r>o-2e3&&i<s+2e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let r of e)t.touchesRange(r.from,r.to)||n.push(new jH(t.mapPos(r.from),t.mapPos(r.to),r.size));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,r=n?1e4:2e3,i=r>>1,o=r<<1;if(this.defaultTextDirection!=pG.LTR&&!n)return[];let s=[],a=(r,o,l,c)=>{if(o-r<i)return;let u=this.state.selection.main,d=[u.from];u.empty||d.push(u.to);for(let e of d)if(e>r&&e<o)return a(r,e-10,l,c),void a(e+10,o,l,c);let h=function(e,t){for(let n of e)if(t(n))return n;return}(e,e=>e.from>=l.from&&e.to<=l.to&&Math.abs(e.from-r)<i&&Math.abs(e.to-o)<i&&!d.some(t=>e.from<t&&e.to>t));if(!h){if(o<l.to&&t&&n&&t.visibleRanges.some(e=>e.from<=o&&e.to>=o)){let e=t.moveToLineBoundary(bw.cursor(o),!1,!0).head;e>r&&(o=e)}h=new jH(r,o,this.gapSize(l,r,o,c))}s.push(h)};for(let e of this.viewportLines){if(e.length<o)continue;let t=LH(e.from,e.to,this.stateDeco);if(t.total<o)continue;let i,s,l=this.scrollTarget?this.scrollTarget.range.head:null;if(n){let n,o,a=r/this.heightOracle.lineLength*this.heightOracle.lineHeight;if(null!=l){let r=zH(t,l),i=((this.visibleBottom-this.visibleTop)/2+a)/e.height;n=r-i,o=r+i}else n=(this.visibleTop-e.top-a)/e.height,o=(this.visibleBottom-e.top+a)/e.height;i=BH(t,n),s=BH(t,o)}else{let e,n,o=t.total*this.heightOracle.charWidth,a=r*this.heightOracle.charWidth;if(null!=l){let r=zH(t,l),i=((this.pixelViewport.right-this.pixelViewport.left)/2+a)/o;e=r-i,n=r+i}else e=(this.pixelViewport.left-a)/o,n=(this.pixelViewport.right+a)/o;i=BH(t,e),s=BH(t,n)}i>e.from&&a(e.from,i,e,t),s<e.to&&a(s,e.to,e,t)}return s}gapSize(e,t,n,r){let i=zH(r,n)-zH(r,t);return this.heightOracle.lineWrapping?e.height*i:r.total*this.heightOracle.charWidth*i}updateLineGaps(e){jH.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=Mq.set(e.map(e=>e.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];fk.spans(e,this.viewport.from,this.viewport.to,{span(e,n){t.push({from:e,to:n})},point(){}},20);let n=t.length!=this.visibleRanges.length||this.visibleRanges.some((e,n)=>e.from!=t[n].from||e.to!=t[n].to);return this.visibleRanges=t,n?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||QH(this.heightMap.lineAt(e,wH.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return QH(this.heightMap.lineAt(this.scaler.fromDOM(e),wH.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return QH(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class IH{constructor(e,t){this.from=e,this.to=t}}function LH(e,t,n){let r=[],i=e,o=0;return fk.spans(n,e,t,{span(){},point(e,t){e>i&&(r.push({from:i,to:e}),o+=e-i),i=t}},20),i<t&&(r.push({from:i,to:t}),o+=t-i),{total:o,ranges:r}}function BH({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:i}=t[e],o=i-n;if(r<=o)return n+r;r-=o}}function zH(e,t){let n=0;for(let{from:r,to:i}of e.ranges){if(t<=i){n+=t-r;break}n+=i-r}return n/e.total}const FH={toDOM:e=>e,fromDOM:e=>e,scale:1};class UH{constructor(e,t,n){let r=0,i=0,o=0;this.viewports=n.map(({from:n,to:i})=>{let o=t.lineAt(n,wH.ByPos,e,0,0).top,s=t.lineAt(i,wH.ByPos,e,0,0).bottom;return r+=s-o,{from:n,to:i,top:o,bottom:s,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(t.height-r);for(let e of this.viewports)e.domTop=o+(e.top-i)*this.scale,o=e.domBottom=e.domTop+(e.bottom-e.top),i=e.bottom}toDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.top)return r+(e-n)*this.scale;if(e<=i.bottom)return i.domTop+(e-i.top);n=i.bottom,r=i.domBottom}}fromDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.domTop)return n+(e-r)/this.scale;if(e<=i.domBottom)return i.top+(e-i.domTop);n=i.bottom,r=i.domBottom}}}function QH(e,t){if(1==t.scale)return e;let n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new xH(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map(e=>QH(e,t)):e._content)}const qH=Sw.define({combine:e=>e.join(" ")}),GH=Sw.define({combine:e=>e.indexOf(!0)>-1}),HH=CQ.newName(),VH=CQ.newName(),WH=CQ.newName(),XH={"&light":"."+VH,"&dark":"."+WH};function YH(e,t,n){return new CQ(t,{finish:t=>/&/.test(t)?t.replace(/&\w*/,t=>{if("&"==t)return e;if(!n||!n[t])throw new RangeError("Unsupported selector: "+t);return n[t]}):e+" "+t})}const ZH=YH("."+HH,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},XH);class JH{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(lk.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=""}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r);let e=this.text.length;this.readNode(r);let i=r.nextSibling;if(i==t)break;let o=JQ.get(r),s=JQ.get(i);(o&&s?o.breakAfter:(o?o.breakAfter:eV(r))||eV(i)&&("BR"!=r.nodeName||r.cmIgnore)&&this.text.length>e)&&this.lineBreak(),r=i}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i,o=-1,s=1;if(this.lineSeparator?(o=t.indexOf(this.lineSeparator,n),s=this.lineSeparator.length):(i=r.exec(t))&&(o=i.index,s=i[0].length),this.append(t.slice(n,o<0?t.length:o)),o<0)break;if(this.lineBreak(),s>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=s-1);n=o+s}}readNode(e){if(e.cmIgnore)return;let t=JQ.get(e),n=t&&t.overrideDOMText;if(null!=n){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else 3==e.nodeType?this.readTextNode(e):"BR"==e.nodeName?e.nextSibling&&this.lineBreak():1==e.nodeType&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(3==e.nodeType?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(KH(e,n.node,n.offset)?t:0))}}function KH(e,t,n){for(;;){if(!t||n<BQ(t))return!1;if(t==e)return!0;n=IQ(t)+1,t=t.parentNode}}function eV(e){return 1==e.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}class tV{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class nV{constructor(e,t,n,r){this.typeOver=r,this.bounds=null,this.text="";let{impreciseHead:i,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,n,0))){let t=i||o?[]:function(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}=e.observer.selectionRange;n&&(t.push(new tV(n,r)),i==n&&o==r||t.push(new tV(i,o)));return t}(e),n=new JH(t,e.state);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=function(e,t){if(0==e.length)return null;let n=e[0].pos,r=2==e.length?e[1].pos:n;return n>-1&&r>-1?bw.single(n+t,r+t):null}(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=i&&i.node==t.focusNode&&i.offset==t.focusOffset||!RQ(e.contentDOM,t.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),r=o&&o.node==t.anchorNode&&o.offset==t.anchorOffset||!RQ(e.contentDOM,t.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset);this.newSel=bw.single(r,n)}}}function rV(e,t){let n,{newSel:r}=t,i=e.state.selection.main,o=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:r,to:s}=t.bounds,a=i.from,l=null;(8===o||fq.android&&t.text.length<s-r)&&(a=i.to,l="end");let c=function(e,t,n,r){let i=Math.min(e.length,t.length),o=0;for(;o<i&&e.charCodeAt(o)==t.charCodeAt(o);)o++;if(o==i&&e.length==t.length)return null;let s=e.length,a=t.length;for(;s>0&&a>0&&e.charCodeAt(s-1)==t.charCodeAt(a-1);)s--,a--;if("end"==r){let e=Math.max(0,o-Math.min(s,a));n-=s+e-o}if(s<o&&e.length<t.length){o-=n<=o&&n>=s?o-n:0,a=o+(a-s),s=o}else if(a<o){o-=n<=o&&n>=a?o-n:0,s=o+(s-a),a=o}return{from:o,toA:s,toB:a}}(e.state.doc.sliceString(r,s,""),t.text,a-r,l);c&&(fq.chrome&&13==o&&c.toB==c.from+2&&""==t.text.slice(c.from,c.toB)&&c.toB--,n={from:r+c.from,to:r+c.toA,insert:zx.of(t.text.slice(c.from,c.toB).split(""))})}else r&&(!e.hasFocus&&e.state.facet(Zq)||r.main.eq(i))&&(r=null);if(!n&&!r)return!1;if(!n&&t.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,i.to)}:n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,n.from).append(n.insert).append(e.state.doc.slice(n.to,i.to))}:(fq.mac||fq.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&"off"==e.contentDOM.getAttribute("autocorrect")?(r&&2==n.insert.length&&(r=bw.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:zx.of([" "])}):fq.chrome&&n&&n.from==n.to&&n.from==i.head&&"\n "==n.insert.toString()&&e.lineWrapping&&(r&&(r=bw.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:zx.of([" "])}),n){if(fq.ios&&e.inputState.flushIOSKey())return!0;if(fq.android&&(n.from==i.from&&n.to==i.to&&1==n.insert.length&&2==n.insert.lines&&VQ(e.contentDOM,"Enter",13)||(n.from==i.from-1&&n.to==i.to&&0==n.insert.length||8==o&&n.insert.length<n.to-n.from&&n.to>i.head)&&VQ(e.contentDOM,"Backspace",8)||n.from==i.from&&n.to==i.to+1&&0==n.insert.length&&VQ(e.contentDOM,"Delete",46)))return!0;let t,s=n.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let a=()=>t||(t=function(e,t,n){let r,i=e.state,o=i.selection.main;if(t.from>=o.from&&t.to<=o.to&&t.to-t.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=o.from<t.from?i.sliceDoc(o.from,t.from):"",s=o.to>t.to?i.sliceDoc(t.to,o.to):"";r=i.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+s))}else{let s=i.changes(t),a=n&&n.main.to<=s.newLength?n.main:void 0;if(i.selection.ranges.length>1&&e.inputState.composing>=0&&t.to<=o.to&&t.to>=o.to-10){let l,c=e.state.sliceDoc(t.from,t.to),u=n&&PG(e,n.main.head);if(u){let e=t.insert.length-(t.to-t.from);l={from:u.from,to:u.to-e}}else l=e.state.doc.lineAt(o.head);let d=o.to-t.to,h=o.to-o.from;r=i.changeByRange(n=>{if(n.from==o.from&&n.to==o.to)return{changes:s,range:a||n.map(s)};let r=n.to-d,u=r-c.length;if(n.to-n.from!=h||e.state.sliceDoc(u,r)!=c||n.to>=l.from&&n.from<=l.to)return{range:n};let p=i.changes({from:u,to:r,insert:t.insert}),f=n.to-o.to;return{changes:p,range:a?bw.range(Math.max(0,a.anchor+f),Math.max(0,a.head+f)):n.map(p)}})}else r={changes:s,selection:a&&i.selection.replaceRange(a)}}let s="input.type";(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,s+=".compose",e.inputState.compositionFirstChange&&(s+=".start",e.inputState.compositionFirstChange=!1));return i.update(r,{userEvent:s,scrollIntoView:!0})}(e,n,r));return e.state.facet(qq).some(t=>t(e,n.from,n.to,s,a))||e.dispatch(a()),!0}if(r&&!r.main.eq(i)){let t=!1,n="select";return e.inputState.lastSelectionTime>Date.now()-50&&("select"==e.inputState.lastSelectionOrigin&&(t=!0),n=e.inputState.lastSelectionOrigin),e.dispatch({selection:r,scrollIntoView:t,userEvent:n}),!0}return!1}const iV={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},oV=fq.ie&&fq.ie_version<=11;class sV{constructor(e){this.view=e,this.active=!1,this.selectionRange=new UQ,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let e of t)this.queue.push(e);(fq.ie&&fq.ie_version<=11||fq.ios&&e.composing)&&t.some(e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),oV&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver(()=>{var e;(null===(e=this.view.docView)||void 0===e?void 0:e.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver(e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(Zq)?n.root.activeElement!=this.dom:!jQ(n.dom,r))return;let i=r.anchorNode&&n.docView.nearest(r.anchorNode);i&&i.ignoreEvent(e)?t||(this.selectionChanged=!1):(fq.ie&&fq.ie_version<=11||fq.android&&fq.chrome)&&!n.state.selection.main.empty&&r.focusNode&&DQ(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=fq.safari&&11==e.root.nodeType&&function(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom&&function(e){let t=null;function n(e){e.preventDefault(),e.stopImmediatePropagation(),t=e.getTargetRanges()[0]}if(e.contentDOM.addEventListener("beforeinput",n,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",n,!0),!t)return null;let r=t.startContainer,i=t.startOffset,o=t.endContainer,s=t.endOffset,a=e.docView.domAtPos(e.state.selection.main.anchor);DQ(a.node,a.offset,o,s)&&([r,i,o,s]=[o,s,r,i]);return{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s}}(this.view)||PQ(e.root);if(!t||this.selectionRange.eq(t))return!1;let n=jQ(this.dom,t);return n&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&function(e,t){let n=t.focusNode,r=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=r)return!1;for(r=Math.min(r,BQ(n));;)if(r){if(1!=n.nodeType)return!1;let e=n.childNodes[r-1];"false"==e.contentEditable?r--:(n=e,r=BQ(n))}else{if(n==e)return!0;r=IQ(n),n=n.parentNode}}(this.dom,t)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(t),n&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(1==n.nodeType)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(n),n=n.assignedSlot||n.parentNode;else{if(11!=n.nodeType)break;n=n.host}if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);for(let e of this.scrollTargets=t)e.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,iV),oV&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),oV&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var n;if(!this.delayedAndroidKey){let e=()=>{let e=this.delayedAndroidKey;if(e){this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&VQ(this.dom,e.key,e.keyCode)}};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}this.delayedAndroidKey&&"Enter"!=e||(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(null===(n=this.delayedAndroidKey)||void 0===n?void 0:n.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let i of e){let e=this.readMutation(i);e&&(e.typeOver&&(r=!0),-1==t?({from:t,to:n}=e):(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&jQ(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new nV(this.view,e,t,n);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,r=rV(this.view,t);return this.view.state==n&&this.view.update([]),r}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty("attributes"==e.type),"attributes"==e.type&&(t.flags|=4),"childList"==e.type){let n=aV(t,e.previousSibling||e.target.previousSibling,-1),r=aV(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}return"characterData"==e.type?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,t,n;this.stop(),null===(e=this.intersection)||void 0===e||e.disconnect(),null===(t=this.gapIntersection)||void 0===t||t.disconnect(),null===(n=this.resizeScroll)||void 0===n||n.disconnect();for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function aV(e,t,n){for(;t;){let r=JQ.get(t);if(r&&r.parent==e)return r;let i=t.parentNode;t=i!=e.dom?i:n>0?t.nextSibling:t.previousSibling}return null}class lV{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM);let{dispatch:t}=e;this.dispatchTransactions=e.dispatchTransactions||t&&(e=>e.forEach(e=>t(e,this)))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||function(e){for(;e;){if(e&&(9==e.nodeType||11==e.nodeType&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}(e.parent)||document,this.viewState=new DH(e.state||lk.create(e)),e.scrollTo&&e.scrollTo.is(Xq)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Kq).map(e=>new tG(e));for(let e of this.plugins)e.update(this);this.observer=new sV(this),this.inputState=new HG(this),this.inputState.ensureHandlers(this.plugins),this.docView=new MG(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}dispatch(...e){let t=1==e.length&&e[0]instanceof Zw?e:1==e.length&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t,n=!1,r=!1,i=this.state;for(let t of e){if(t.startState!=i)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");i=t.state}if(this.destroyed)return void(this.viewState.state=i);let o=this.hasFocus,s=0,a=null;e.some(e=>e.annotation(mH))?(this.inputState.notifiedFocused=o,s=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,a=gH(i,o),a||(s=1));let l=this.observer.delayedAndroidKey,c=null;if(l?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(i.doc)||!this.state.selection.eq(i.selection))&&(c=null)):this.observer.clear(),i.facet(lk.phrases)!=this.state.facet(lk.phrases))return this.setState(i);t=hG.create(this,i,e),t.flags|=s;let u=this.viewState.scrollTarget;try{this.updateState=2;for(let t of e){if(u&&(u=u.map(t.changes)),t.scrollIntoView){let{main:e}=t.state.selection;u=new Wq(e.empty?e:bw.cursor(e.head,e.head>e.anchor?-1:1))}for(let e of t.effects)e.is(Xq)&&(u=e.value.clip(this.state))}this.viewState.update(t,u),this.bidiCache=dV.update(this.bidiCache,t.changes),t.empty||(this.updatePlugins(t),this.inputState.update(t)),n=this.docView.update(t),this.state.facet(uG)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(e=>e.isUserEvent("select.pointer")))}finally{this.updateState=0}if(t.startState.facet(qH)!=t.state.facet(qH)&&(this.viewState.mustMeasureContent=!0),(n||r||u||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!t.empty)for(let e of this.state.facet(Qq))try{e(t)}catch(e){Yq(this.state,e,"update listener")}(a||c)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),c&&!rV(this,c)&&l.force&&VQ(this.contentDOM,l.key,l.keyCode)})}setState(e){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=e);this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new DH(e),this.plugins=e.facet(Kq).map(e=>new tG(e)),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView=new MG(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Kq),n=e.state.facet(Kq);if(t!=n){let r=[];for(let i of n){let n=t.indexOf(i);if(n<0)r.push(new tG(i));else{let t=this.plugins[n];t.mustUpdate=e,r.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e<this.plugins.length;e++)this.plugins[e].update(this);t!=n&&this.inputState.ensureHandlers(this.plugins)}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.scrollDOM,r=n.scrollTop*this.scaleY,{scrollAnchorPos:i,scrollAnchorHeight:o}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(o<0)if(XQ(n))i=-1,o=this.viewState.heightMap.height;else{let e=this.viewState.scrollAnchorAt(r);i=e.from,o=e.top}this.updateState=1;let s=this.viewState.measure(this);if(!s&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(e>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let a=[];4&s||([this.measureRequests,a]=[a,this.measureRequests]);let l=a.map(e=>{try{return e.read(this)}catch(e){return Yq(this.state,e),uV}}),c=hG.create(this,this.state,[]),u=!1;c.flags|=s,t?t.flags|=s:t=c,this.updateState=2,c.empty||(this.updatePlugins(c),this.inputState.update(c),this.updateAttrs(),u=this.docView.update(c));for(let e=0;e<a.length;e++)if(l[e]!=uV)try{let t=a[e];t.write&&t.write(l[e],this)}catch(e){Yq(this.state,e)}if(u&&this.docView.updateSelection(!0),!c.viewportChanged&&0==this.measureRequests.length){if(this.viewState.editorHeight){if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null;continue}{let e=(i<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(i).top)-o;if(e>1||e<-1){r+=e,n.scrollTop=r/this.scaleY,o=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(Qq))e(t)}get themeClasses(){return HH+" "+(this.state.facet(GH)?WH:VH)+" "+this.state.facet(qH)}updateAttrs(){let e=hV(this,nG,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Zq)?"true":"false",class:"cm-content",style:`${fq.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),hV(this,rG,t);let n=this.observer.ignore(()=>{let n=kq(this.contentDOM,this.contentAttrs,t),r=kq(this.dom,this.editorAttrs,e);return n||r});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let e of n.effects)if(e.is(lV.announce)){t&&(this.announceDOM.textContent=""),t=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=e.value}}mountStyles(){this.styleModules=this.state.facet(uG);let e=this.state.facet(lV.cspNonce);CQ.mount(this.root,this.styleModules.concat(ZH).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(null!=e.key)for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key)return void(this.measureRequests[t]=e);this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(void 0===t||t&&t.spec!=e)&&this.pluginMap.set(e,t=this.plugins.find(t=>t.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return GG(this,e,QG(this,e,t,n))}moveByGroup(e,t){return GG(this,e,QG(this,e,t,t=>function(e,t,n){let r=e.state.charCategorizer(t),i=r(n);return e=>{let t=r(e);return i==ik.Space&&(i=t),i==t}}(this,e.head,t)))}moveToLineBoundary(e,t,n=!0){return function(e,t,n,r){let i=UG(e,t.head),o=r&&i.type==Cq.Text&&(e.lineWrapping||i.widgetLineBreaks)?e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head):null;if(o){let t=e.dom.getBoundingClientRect(),r=e.textDirectionAt(i.from),s=e.posAtCoords({x:n==(r==pG.LTR)?t.right-1:t.left+1,y:(o.top+o.bottom)/2});if(null!=s)return bw.cursor(s,n?-1:1)}return bw.cursor(n?i.to:i.from,n?-1:1)}(this,e,t,n)}moveVertically(e,t,n){return GG(this,e,function(e,t,n,r){let i=t.head,o=n?1:-1;if(i==(n?e.state.doc.length:0))return bw.cursor(i,t.assoc);let s,a=t.goalColumn,l=e.contentDOM.getBoundingClientRect(),c=e.coordsAtPos(i,t.assoc||-1),u=e.documentTop;if(c)null==a&&(a=c.left-l.left),s=o<0?c.top:c.bottom;else{let t=e.viewState.lineBlockAt(i);null==a&&(a=Math.min(l.right-l.left,e.defaultCharacterWidth*(i-t.from))),s=(o<0?t.top:t.bottom)+u}let d=l.left+a,h=null!=r?r:e.viewState.heightOracle.textHeight>>1;for(let t=0;;t+=10){let n=s+(h+t)*o,r=zG(e,{x:d,y:n},!1,o);if(n<l.top||n>l.bottom||(o<0?r<i:r>i)){let t=e.docView.coordsForChar(r),i=!t||n<t.top?-1:1;return bw.cursor(r,i,void 0,a)}}}(this,e,t,n))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),zG(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;let r=this.state.doc.lineAt(e),i=this.bidiSpans(r);return zQ(n,i[xG.find(i,e-r.from,-1,t)].dir==pG.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(Hq)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>cV)return AG(e.length);let t,n=this.textDirectionAt(e.from);for(let r of this.bidiCache)if(r.from==e.from&&r.dir==n&&(r.fresh||wG(r.isolates,t=aG(this,e.from,e.to))))return r.order;t||(t=aG(this,e.from,e.to));let r=EG(e.text,n,t);return this.bidiCache.push(new dV(e.from,e.to,n,t,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||fq.safari&&(null===(e=this.inputState)||void 0===e?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{GQ(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((9==e.nodeType?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return Xq.of(new Wq("number"==typeof e?bw.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return Xq.of(new Wq(bw.cursor(n.from),"start","start",n.top-e,t,!0))}static domEventHandlers(e){return eG.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return eG.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=CQ.newName(),r=[qH.of(n),uG.of(YH("."+n,e))];return t&&t.dark&&r.push(GH.of(!0)),r}static baseTheme(e){return Rw.lowest(uG.of(YH("."+HH,e,XH)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),r=n&&JQ.get(n)||JQ.get(e);return(null===(t=null==r?void 0:r.rootView)||void 0===t?void 0:t.view)||null}}lV.styleModule=uG,lV.inputHandler=qq,lV.focusChangeEffect=Gq,lV.perLineTextDirection=Hq,lV.exceptionSink=Uq,lV.updateListener=Qq,lV.editable=Zq,lV.mouseSelectionStyle=Fq,lV.dragMovesSelection=zq,lV.clickAddsSelectionRange=Bq,lV.decorations=iG,lV.atomicRanges=oG,lV.bidiIsolatedRanges=sG,lV.scrollMargins=lG,lV.darkTheme=GH,lV.cspNonce=Sw.define({combine:e=>e.length?e[0]:""}),lV.contentAttributes=rG,lV.editorAttributes=nG,lV.lineWrapping=lV.contentAttributes.of({class:"cm-lineWrapping"}),lV.announce=Yw.define();const cV=4096,uV={};class dV{constructor(e,t,n,r,i,o){this.from=e,this.to=t,this.dir=n,this.isolates=r,this.fresh=i,this.order=o}static update(e,t){if(t.empty&&!e.some(e=>e.fresh))return e;let n=[],r=e.length?e[e.length-1].dir:pG.LTR;for(let i=Math.max(0,e.length-10);i<e.length;i++){let o=e[i];o.dir!=r||t.touchesRange(o.from,o.to)||n.push(new dV(t.mapPos(o.from,1),t.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return n}}function hV(e,t,n){for(let r=e.state.facet(t),i=r.length-1;i>=0;i--){let t=r[i],o="function"==typeof t?t(e):t;o&&_q(o,n)}return n}const pV=fq.mac?"mac":fq.windows?"win":fq.linux?"linux":"key";function fV(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}const mV=Rw.default(lV.domEventHandlers({keydown:(e,t)=>SV(vV(t.state),e,t,"editor")})),gV=Sw.define({enables:mV}),bV=new WeakMap;function vV(e){let t=e.facet(gV),n=bV.get(t);return n||bV.set(t,n=function(e,t=pV){let n=Object.create(null),r=Object.create(null),i=(e,t)=>{let n=r[e];if(null==n)r[e]=t;else if(n!=t)throw new Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},o=(e,r,o,s,a)=>{var l,c;let u=n[e]||(n[e]=Object.create(null)),d=r.split(/ (?!$)/).map(e=>function(e,t){const n=e.split(/-(?!$)/);let r,i,o,s,a=n[n.length-1];"Space"==a&&(a=" ");for(let e=0;e<n.length-1;++e){const a=n[e];if(/^(cmd|meta|m)$/i.test(a))s=!0;else if(/^a(lt)?$/i.test(a))r=!0;else if(/^(c|ctrl|control)$/i.test(a))i=!0;else if(/^s(hift)?$/i.test(a))o=!0;else{if(!/^mod$/i.test(a))throw new Error("Unrecognized modifier name: "+a);"mac"==t?s=!0:i=!0}}return r&&(a="Alt-"+a),i&&(a="Ctrl-"+a),s&&(a="Meta-"+a),o&&(a="Shift-"+a),a}(e,t));for(let t=1;t<d.length;t++){let n=d.slice(0,t).join(" ");i(n,!0),u[n]||(u[n]={preventDefault:!0,stopPropagation:!1,run:[t=>{let r=yV={view:t,prefix:n,scope:e};return setTimeout(()=>{yV==r&&(yV=null)},4e3),!0}]})}let h=d.join(" ");i(h,!1);let p=u[h]||(u[h]={preventDefault:!1,stopPropagation:!1,run:(null===(c=null===(l=u._any)||void 0===l?void 0:l.run)||void 0===c?void 0:c.slice())||[]});o&&p.run.push(o),s&&(p.preventDefault=!0),a&&(p.stopPropagation=!0)};for(let r of e){let e=r.scope?r.scope.split(" "):["editor"];if(r.any)for(let t of e){let e=n[t]||(n[t]=Object.create(null));e._any||(e._any={preventDefault:!1,stopPropagation:!1,run:[]});for(let t in e)e[t].run.push(r.any)}let i=r[t]||r.key;if(i)for(let t of e)o(t,i,r.run,r.preventDefault,r.stopPropagation),r.shift&&o(t,"Shift-"+i,r.shift,r.preventDefault,r.stopPropagation)}return n}(t.reduce((e,t)=>e.concat(t),[]))),n}let yV=null;function SV(e,t,n,r){let i=Uk(t),o=ow(rw(i,0))==i.length&&" "!=i,s="",a=!1,l=!1,c=!1;yV&&yV.view==n&&yV.scope==r&&(s=yV.prefix+" ",YG.indexOf(t.keyCode)<0&&(l=!0,yV=null));let u,d,h=new Set,p=e=>{if(e){for(let r of e.run)if(!h.has(r)&&(h.add(r),r(n,t)))return e.stopPropagation&&(c=!0),!0;e.preventDefault&&(e.stopPropagation&&(c=!0),l=!0)}return!1},f=e[r];return f&&(p(f[s+fV(i,t,!o)])?a=!0:o&&(t.altKey||t.metaKey||t.ctrlKey)&&!(fq.windows&&t.ctrlKey&&t.altKey)&&(u=jk[t.keyCode])&&u!=i?(p(f[s+fV(u,t,!0)])||t.shiftKey&&(d=Nk[t.keyCode])!=i&&d!=u&&p(f[s+fV(d,t,!1)]))&&(a=!0):o&&t.shiftKey&&p(f[s+fV(i,t,!0)])&&(a=!0),!a&&p(f._any)&&(a=!0)),l&&(a=!0),a&&c&&t.stopPropagation(),a}const _V=!fq.ios;const xV={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};_V&&(xV[".cm-line"].caretColor="transparent !important");class wV extends uk{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}wV.prototype.elementClass="",wV.prototype.toDOM=void 0,wV.prototype.mapMode=aw.TrackBefore,wV.prototype.startSide=wV.prototype.endSide=-1,wV.prototype.point=!0;function kV(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function OV(e){let t=e.map(e=>"string"==typeof e?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e<r.length;e++)n[r[e]]=!0}let r=kV(t)+kV(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}const EV=Vw.define();const AV=lV.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class TV{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}}class CV{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(e){let t=e.mapPos(this.from,-1,aw.TrackDel),n=e.mapPos(this.to,1,aw.TrackDel);return null==t||null==n?null:new CV(this.field,t,n)}}class MV{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],r=[t],i=e.doc.lineAt(t),o=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(n.length){let n=o,s=/^\t*/.exec(i)[0].length;for(let t=0;t<s;t++)n+=e.facet(VM);r.push(t+n.length-s),i=n+i.slice(s)}n.push(i),t+=i.length+1}return{text:n,ranges:this.fieldPositions.map(e=>new CV(e.field,r[e.line]+e.from,r[e.line]+e.to))}}static parse(e){let t,n=[],r=[],i=[];for(let o of e.split(/\r\n?|\n/)){for(;t=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(o);){let e=t[1]?+t[1]:null,s=t[2]||t[3]||"",a=-1;for(let t=0;t<n.length;t++)(null!=e?n[t].seq==e:s&&n[t].name==s)&&(a=t);if(a<0){let t=0;for(;t<n.length&&(null==e||null!=n[t].seq&&n[t].seq<e);)t++;n.splice(t,0,{seq:e,name:s}),a=t;for(let e of i)e.field>=a&&e.field++}i.push(new TV(a,r.length,t.index,t.index+s.length)),o=o.slice(0,t.index)+s+o.slice(t.index+t[0].length)}for(let e;e=/\\([{}])/.exec(o);){o=o.slice(0,e.index)+e[1]+o.slice(e.index+e[0].length);for(let t of i)t.line==r.length&&t.from>e.index&&(t.from--,t.to--)}r.push(o)}return new MV(r,i)}}let $V=Mq.widget({widget:new class extends Tq{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),PV=Mq.mark({class:"cm-snippetField"});class RV{constructor(e,t){this.ranges=e,this.active=t,this.deco=Mq.set(e.map(e=>(e.from==e.to?$V:PV).range(e.from,e.to)))}map(e){let t=[];for(let n of this.ranges){let r=n.map(e);if(!r)return null;t.push(r)}return new RV(t,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}}const jV=Yw.define({map:(e,t)=>e&&e.map(t)}),NV=Yw.define(),DV=Aw.define({create:()=>null,update(e,t){for(let n of t.effects){if(n.is(jV))return n.value;if(n.is(NV)&&e)return new RV(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>lV.decorations.from(e,e=>e?e.deco:Mq.none)});function IV(e,t){return bw.create(e.filter(e=>e.field==t).map(e=>bw.range(e.from,e.to)))}function LV(e){let t=MV.parse(e);return(e,n,r,i)=>{let{text:o,ranges:s}=t.instantiate(e.state,r),a={changes:{from:r,to:i,insert:zx.of(o)},scrollIntoView:!0,annotations:n?EV.of(n):void 0};if(s.length&&(a.selection=IV(s,0)),s.length>1){let t=new RV(s,0),n=a.effects=[jV.of(t)];void 0===e.state.field(DV,!1)&&n.push(Yw.appendConfig.of([DV,UV,qV,AV]))}e.dispatch(e.state.update(a))}}function BV(e){return({state:t,dispatch:n})=>{let r=t.field(DV,!1);if(!r||e<0&&0==r.active)return!1;let i=r.active+e,o=e>0&&!r.ranges.some(t=>t.field==i+e);return n(t.update({selection:IV(r.ranges,i),effects:jV.of(o?null:new RV(r.ranges,i))})),!0}}const zV=[{key:"Tab",run:BV(1),shift:BV(-1)},{key:"Escape",run:({state:e,dispatch:t})=>!!e.field(DV,!1)&&(t(e.update({effects:jV.of(null)})),!0)}],FV=Sw.define({combine:e=>e.length?e[0]:zV}),UV=Rw.highest(gV.compute([FV],e=>e.facet(FV)));function QV(e,t){return Object.assign(Object.assign({},t),{apply:LV(e)})}const qV=lV.domEventHandlers({mousedown(e,t){let n,r=t.state.field(DV,!1);if(!r||null==(n=t.posAtCoords({x:e.clientX,y:e.clientY})))return!1;let i=r.ranges.find(e=>e.from<=n&&e.to>=n);return!(!i||i.field==r.active)&&(t.dispatch({selection:IV(r.ranges,i.field),effects:jV.of(r.ranges.some(e=>e.field>i.field)?new RV(r.ranges,i.field):null)}),!0)}});const GV=new class extends uk{};GV.startSide=1,GV.endSide=-1;"object"==typeof navigator&&navigator.userAgent;const HV=[QV("function ${name}(${params}) {\n\t${}\n}",{label:"function",detail:"definition",type:"keyword"}),QV("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n\t${}\n}",{label:"for",detail:"loop",type:"keyword"}),QV("for (let ${name} of ${collection}) {\n\t${}\n}",{label:"for",detail:"of loop",type:"keyword"}),QV("do {\n\t${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),QV("while (${}) {\n\t${}\n}",{label:"while",detail:"loop",type:"keyword"}),QV("try {\n\t${}\n} catch (${error}) {\n\t${}\n}",{label:"try",detail:"/ catch block",type:"keyword"}),QV("if (${}) {\n\t${}\n}",{label:"if",detail:"block",type:"keyword"}),QV("if (${}) {\n\t${}\n} else {\n\t${}\n}",{label:"if",detail:"/ else block",type:"keyword"}),QV("class ${name} {\n\tconstructor(${params}) {\n\t\t${}\n\t}\n}",{label:"class",detail:"definition",type:"keyword"}),QV('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),QV('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],VV=HV.concat([QV("interface ${name} {\n\t${}\n}",{label:"interface",detail:"definition",type:"keyword"}),QV("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),QV("enum ${name} {\n\t${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),WV=new tM.f,XV=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function YV(e){return(t,n)=>{let r=t.node.getChild("VariableDefinition");return r&&n(r,e),!0}}const ZV=["FunctionDeclaration"],JV={FunctionDeclaration:YV("function"),ClassDeclaration:YV("class"),ClassExpression:()=>!0,EnumDeclaration:YV("constant"),TypeAliasDeclaration:YV("type"),NamespaceDeclaration:YV("namespace"),VariableDefinition(e,t){e.matchContext(ZV)||t(e,"variable")},TypeDefinition(e,t){t(e,"type")},__proto__:null};function KV(e,t){let n=WV.get(t);if(n)return n;let r=[],i=!0;function o(t,n){let i=e.sliceString(t.from,t.to);r.push({label:i,type:n})}return t.cursor(tM.b.IncludeAnonymous).iterate(t=>{if(i)i=!1;else if(t.name){let e=JV[t.name];if(e&&e(t,o)||XV.has(t.name))return!1}else if(t.to-t.from>8192){for(let n of KV(e,t.node))r.push(n);return!1}}),WV.set(t,r),r}const eW=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,tW=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function nW(e){let t=NM(e.state).resolveInner(e.pos,-1);if(tW.indexOf(t.name)>-1)return null;let n="VariableName"==t.name||t.to-t.from<20&&eW.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let r=[];for(let n=t;n;n=n.parent)XV.has(n.name)&&(r=r.concat(KV(e.state.doc,n)));return{options:r,from:n?t.from:e.pos,validFor:eW}}const rW=jM.define({name:"javascript",parser:II.configure({props:[JM.add({IfStatement:a$({except:/^\s*({|else\b)/}),TryStatement:a$({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:s$,SwitchBody:e=>{let t=e.textAfter,n=/^\s*\}/.test(t),r=/^\s*(case|default)\b/.test(t);return e.baseIndent+(n?0:r?1:2)*e.unit},Block:i$({closing:"}"}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":a$({except:/^{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag":e=>e.column(e.node.from)+e.unit}),c$.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":u$,BlockComment:e=>({from:e.from+2,to:e.to-2})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),iW={test:e=>/^JSX/.test(e.name),facet:MM({commentTokens:{block:{open:"{/*",close:"*/}"}}})},oW=rW.configure({dialect:"ts"},"typescript"),sW=rW.configure({dialect:"jsx",props:[$M.add(e=>e.isTop?[iW]:void 0)]}),aW=rW.configure({dialect:"jsx ts",props:[$M.add(e=>e.isTop?[iW]:void 0)]},"typescript");let lW=e=>({label:e,type:"keyword"});const cW="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(lW),uW=cW.concat(["declare","implements","private","protected","public"].map(lW));function dW(e,t,n=e.length){for(let r=null==t?void 0:t.firstChild;r;r=r.nextSibling)if("JSXIdentifier"==r.name||"JSXBuiltin"==r.name||"JSXNamespacedName"==r.name||"JSXMemberExpression"==r.name)return e.sliceString(r.from,Math.min(r.to,n));return""}const hW="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),pW=lV.inputHandler.of((e,t,n,r,i)=>{if((hW?e.composing:e.compositionStarted)||e.state.readOnly||t!=n||">"!=r&&"/"!=r||!rW.isActiveAt(e.state,t,-1))return!1;let o=i(),{state:s}=o,a=s.changeByRange(e=>{var t;let n,{head:i}=e,o=NM(s).resolveInner(i-1,-1);if("JSXStartTag"==o.name&&(o=o.parent),s.doc.sliceString(i-1,i)!=r||"JSXAttributeValue"==o.name&&o.to>i);else{if(">"==r&&"JSXFragmentTag"==o.name)return{range:e,changes:{from:i,insert:"</>"}};if("/"==r&&"JSXStartCloseTag"==o.name){let e=o.parent,r=e.parent;if(r&&e.from==i-2&&((n=dW(s.doc,r.firstChild,i))||"JSXFragmentTag"==(null===(t=r.firstChild)||void 0===t?void 0:t.name))){let e=n+">";return{range:bw.cursor(i+e.length,-1),changes:{from:i,insert:e}}}}else if(">"==r){let t=function(e){for(;;){if("JSXOpenTag"==e.name||"JSXSelfClosingTag"==e.name||"JSXFragmentTag"==e.name)return e;if("JSXEscape"==e.name||!e.parent)return null;e=e.parent}}(o);if(t&&!/^\/?>|^<\//.test(s.doc.sliceString(i,i+2))&&(n=dW(s.doc,t,i)))return{range:e,changes:{from:i,insert:`</${n}>`}}}}return{range:e}});return!a.changes.empty&&(e.dispatch([o,s.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});const fW=fT.theme({".cm-activeLine":{"background-color":"inherit"},".cm-activeLineGutter":{"background-color":"inherit",color:"inherit"},".cm-gutters":{border:"none",color:"black","background-color":"white"},".cm-line .cm-indentation-marker":{background:"none","border-inline-start":"solid lightgrey","&.active":{background:"none","border-inline-start":"solid grey"}},".ͼf":{color:"#AA1111"}},{dark:!1});n(409),n(410),n(411);const mW=fT.theme({".cm-gutters":{"background-color":"#2A2B32",color:"white",border:"none"},".cm-activeLine":{"background-color":"inherit"},".cm-activeLineGutter":{"background-color":"inherit",color:"inherit"},"&.cm-focused .cm-selectionBackground, ::selection":{background:"#144866"},"&.cm-focused .cm-cursor":{borderLeftColor:"white"},".cm-line .cm-indentation-marker":{background:"none","border-inline-start":"solid grey","&.active":{background:"none","border-inline-start":"solid lightgrey"}},".ͼ5":{color:"#FFCA99"},".ͼb":{color:"#EECCFF"},".ͼc":{color:"#9EE8FF"},".ͼd":{color:"#9EE8FF"},".ͼe":{color:"#94F9AF"},".ͼf":{color:"#94F9AF"},".ͼg":{color:"#9EE8FF"},".ͼi":{color:"#EECCFF"},".ͼj":{color:"#9EE8FF"},".ͼm":{color:"#FFCA99"}},{dark:!0});var gW=e=>{let{extension:t="html",fileName:n="index"}=e;const r=Object(i.useRef)(),s=Fn(e=>e.editor.project),a=Fn(e=>e.editor.readOnly),[l]=xg(["theme","fontSize"]),c=In(),{t:u}=Wi(),d=Object(i.useContext)(Po),h=fT.contentAttributes.of({"aria-label":u("editorPanel.ariaLabel")}),p=fT.updateListener.of(e=>{var r;e.docChanged&&(r=e.state.doc.toString(),c(Br({extension:t,name:n,code:r})))}),f=()=>{switch(t){case"html":return AL();case"css":return AI();case"py":return new GM(OQ,[OQ.data.of({autocomplete:SQ}),OQ.data.of({autocomplete:wQ})]);case"js":return function(e={}){let t=e.jsx?e.typescript?aW:sW:e.typescript?oW:rW,n=e.typescript?VV.concat(uW):HV.concat(cW);return new GM(t,[rW.data.of({autocomplete:(r=tW,i=OV(n),e=>{for(let t=NM(e.state).resolveInner(e.pos,-1);t;t=t.parent){if(r.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return i(e)})}),rW.data.of({autocomplete:nW}),e.jsx?pW:[]]);var r,i}();default:return AL()}},m="dark"===l.theme||!l.theme&&window.matchMedia("(prefers-color-scheme:dark)").matches?mW:fW;return Object(i.useEffect)(()=>{const e=s.components.find(e=>e.extension===t&&e.name===n);if(!e)return;const i=e.content,o=f();let l=" ";"py"===t&&(l=" ");const c=lk.create({doc:i,extensions:[_D,xT.of([CR,MR]),o,h,p,m,MD(),VM.of(l),fT.editable.of(!a)]}),u=new fT({lineWrapping:!0,state:c,parent:r.current});u.scrollDOM.setAttribute("aria-hidden","true");const d=u.contentDOM.getElementsByClassName("cm-widgetBuffer");for(let e of d)e.setAttribute("role","presentation");return()=>{u.destroy()}},[l]),o.a.createElement("div",{className:"editor editor--".concat(d.fontSize),ref:r})};n(160);const bW=e=>{let{children:t,panelIndex:n,fileIndex:r,...i}=e;const s=Fn(e=>e.editor.webComponent),a=Fn(e=>e.editor.openFiles)[n].length,l=In(),c=(e,t)=>{l(br({panelIndex:e,fileIndex:t}))},u=()=>o.a.createElement(Eo,Object.assign({onClick:e=>{e.stopPropagation(),c(n,r)},onKeyDown:e=>((e,t,n)=>{"ArrowRight"===e.code?c(t,(n+1)%a):"ArrowLeft"===e.code&&c(t,(n+a-1)%a)})(e,n,r)},i),t);return s?o.a.createElement(u,null):o.a.createElement(px,{draggableId:"draggable".concat(n,"_").concat(r),index:r},e=>{let{innerRef:t,draggableProps:n,dragHandleProps:r}=e;return o.a.createElement("div",Object.assign({className:"draggable-tab",ref:t},n,r,{style:n.style}),o.a.createElement(u,null))})};bW.tabsRole="Tab";var vW=bW;const yW=e=>{let{children:t,index:n,...r}=e;return o.a.createElement(xo,r,o.a.createElement(Bx,{direction:"horizontal",droppableId:n.toString()},e=>{let{innerRef:n,droppableProps:r,placeholder:i}=e;return o.a.createElement("div",Object.assign({className:"droppable-tab-list"},r,{ref:n}),t,i)}))};yW.tabsRole="TabList";var SW=yW;n(415);var _W=()=>{var e,t;const n=Fn(e=>e.editor.project),r=Fn(e=>e.editor.openFiles),s=Fn(e=>e.editor.focussedFileIndices),a=In(),l=Object(hi.useMediaQuery)({query:$o}),c=Fn(e=>e.editor.readOnly),{t:u}=Wi(),[d,h]=Object(i.useState)(null==n||null===(e=n.components)||void 0===e?void 0:e.length);let p=Object(i.useRef)(null==n||null===(t=n.components)||void 0===t?void 0:t.map(i.createRef));return Object(i.useEffect)(()=>{null!=n&&n.components&&(h(n.components.length),Array(n.components.length).fill().forEach((e,t)=>{p.current[t]=p.current[t]||o.a.createRef()}))},[null==n?void 0:n.components]),Object(i.useEffect)(()=>{null!=n&&n.components&&s.forEach((e,t)=>{const i=r[t][e],o=n.components.findIndex(e=>"".concat(e.name,".").concat(e.extension)===i),s=p.current[o];s&&s.current&&s.current.parentElement.scrollIntoView()})},[s,r,d,n]),n&&n.components?o.a.createElement(Y_,{onDragStart:e=>(e=>{const{source:t}=e;a(br({panelIndex:parseInt(t.droppableId),fileIndex:t.index}))})(e),onDragEnd:e=>(e=>{const{source:t,destination:n}=e;if(!n)return;let i=[...r],o=[...i[t.droppableId]];const[s]=o.splice(t.index,1);i[t.droppableId]=[...o];let l=[...i[n.droppableId]];l.splice(n.index,0,s),i[n.droppableId]=[...l],a(mr(i)),a(br({panelIndex:parseInt(n.droppableId),fileIndex:n.index})),n.droppableId!==t.droppableId&&a(br({panelIndex:parseInt(t.droppableId),fileIndex:Math.max(t.index-1,0)}))})(e)},o.a.createElement("div",{className:"editor-input"},r.map((e,t)=>o.a.createElement(vo,{key:t,selectedIndex:s[t],onSelect:()=>{}},o.a.createElement("div",{className:"react-tabs__tab-container"},o.a.createElement(SW,{index:t},e.map((e,r)=>{var i;return o.a.createElement(vW,{key:r,fileIndex:r,panelIndex:t},o.a.createElement("span",{className:mi()("react-tabs__tab-text",{"react-tabs__tab-text--split":!["main.py","index.html"].includes(e)}),ref:p.current[null==n||null===(i=n.components)||void 0===i?void 0:i.findIndex(t=>"".concat(t.name,".").concat(t.extension)===e)]},e),["main.py","index.html"].includes(e)?null:o.a.createElement(kc,{className:"btn--tertiary react-tabs__tab-close-btn",label:"close",onClickHandler:t=>((e,t)=>{e.stopPropagation(),a(pr(t))})(t,e),ButtonIcon:()=>o.a.createElement(Uh,{scaleFactor:.85})}))})),l?o.a.createElement(jc,{skinny:!0}):null),e.map((e,t)=>o.a.createElement(Mo,{key:t},c&&o.a.createElement("span",{className:"editor-input__view-only-banner"},u("editorPanel.viewOnly")),o.a.createElement(gW,{fileName:e.split(".")[0],extension:e.split(".").slice(1).join(".")}))),l?null:o.a.createElement(uu,null))))):null};const xW={"width-larger-than-720":{minWidth:720},"width-smaller-than-600":{maxWidth:600}};var wW=e=>{const t=Fn(e=>e.editor.webComponent),{nameEditable:n=!0,withProjectbar:r=!0,withSidebar:s=!0,sidebarOptions:a=[]}=e,l=Fn(e=>e.editor.saving),c=Fn(e=>e.editor.lastSaveAutosave);Object(i.useEffect)(()=>{"success"===l&&!1===c&&Zu(Fh.t("notifications.projectSaved"),{...Qh,icon:nd})},[l,c]);const[u,d]=Object(pi.useContainerQuery)(xW),[h,p]=Object(i.useState)("auto"),[f,m]=Object(i.useState)("auto"),[g,b]=Object(i.useState)("100%"),[v,y]=Object(i.useState)("right"),[S,_]=Object(i.useState)(!0);return Object(i.useMemo)(()=>{const e=u["width-larger-than-720"];p(e?"50%":"100%"),m(e?"100%":"50%"),b(e?"75%":"100%"),y(e?"right":"bottom")},[u["width-larger-than-720"]]),Object(i.useEffect)(()=>{_(!1)},[]),o.a.createElement("div",{className:"proj","data-testid":"project"},o.a.createElement("div",{className:mi()("proj-container",{"proj-container--wc":t})},s&&o.a.createElement(pb,{options:a}),o.a.createElement("div",{className:"project-wrapper",ref:d},r&&o.a.createElement(Ef,{nameEditable:n}),!S&&o.a.createElement("div",{className:"proj-editor-wrapper"},o.a.createElement(Um,{"data-testid":"proj-editor-container",className:"proj-editor-container",defaultWidth:h,defaultHeight:f,handleDirection:v,minWidth:"25%",maxWidth:g},o.a.createElement(_W,null)),o.a.createElement(du,null)))))};n(416);var kW,OW=()=>{const e=Fn(e=>e.editor.project.name),t=Fn(e=>e.editor.lastSavedTime),n=Fn(e=>e.editor.readOnly);return o.a.createElement("div",{className:"mobile-project-bar"},o.a.createElement("p",{className:"mobile-project-bar__name"},e),t&&!n?o.a.createElement(Sp,{isMobile:!0}):null)};n(417);function EW(){return(EW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var AW,TW=function(e){return i.createElement("svg",EW({width:19,height:18,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),kW||(kW=i.createElement("path",{d:"M8.5 12.175L7.1 13.6 3.5 10l1.8-1.8 1.8-1.8 1.4 1.425L6.325 10 8.5 12.175zm7-2.175l-3.6 3.6-1.4-1.425L12.675 10 10.5 7.825 11.9 6.4l3.6 3.6zM.5 0v18h18V0H.5zm16 16h-14V4h14v12z"})))};function CW(){return(CW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var MW,$W=function(e){return i.createElement("svg",CW({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),AW||(AW=i.createElement("path",{d:"M3 18v-2h18v2H3zm0-5v-2h18v2H3zm0-5V6h18v2H3z"})))};function PW(){return(PW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var RW=function(e){return i.createElement("svg",PW({width:19,height:18,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),MW||(MW=i.createElement("path",{d:"M.5 18V0h18v18H.5zm2-2h14V4h-14v12zm7-2c-1.367 0-2.588-.37-3.662-1.113A6.374 6.374 0 013.5 10a6.374 6.374 0 012.338-2.888C6.912 6.372 8.133 6 9.5 6s2.588.37 3.662 1.112A6.374 6.374 0 0115.5 10a6.374 6.374 0 01-2.338 2.887C12.088 13.63 10.867 14 9.5 14zm0-1.5c.933 0 1.783-.22 2.55-.662A4.711 4.711 0 0013.85 10a4.71 4.71 0 00-1.8-1.838A5.017 5.017 0 009.5 7.5c-.933 0-1.783.22-2.55.662A4.711 4.711 0 005.15 10a4.711 4.711 0 001.8 1.838 5.016 5.016 0 002.55.662zm0-1c.417 0 .77-.146 1.063-.438.291-.291.437-.645.437-1.062 0-.417-.146-.77-.438-1.063A1.447 1.447 0 009.5 8.5c-.417 0-.77.146-1.063.438A1.447 1.447 0 008 10c0 .417.146.77.438 1.063.291.291.645.437 1.062.437z"})))};var jW=e=>{let{withSidebar:t,sidebarOptions:n=[]}=e;const r=Fn(e=>e.editor.project.project_type),s=Fn(e=>e.editor.sidebarShowing),a=Fn(e=>e.editor.codeRunTriggered),l=n.includes("instructions"),[c,u]=Object(i.useState)(1),{t:d}=Wi(),h=In();return Object(i.useEffect)(()=>{a?u(t?2:1):s||u(t?1:0)},[a,s,t]),o.a.createElement("div",{className:"proj-container proj-editor-container proj-container--mobile","data-testid":"mobile-project"},o.a.createElement(vo,{forceRenderTabPanel:!0,selectedIndex:c,onSelect:e=>u(e)},t&&o.a.createElement(Mo,null,o.a.createElement(pb,{options:n})),o.a.createElement(Mo,null,o.a.createElement(_W,null)),o.a.createElement(Mo,null,o.a.createElement(du,null)),o.a.createElement(OW,null),o.a.createElement("div",{className:"react-tabs__tab-container mobile-nav"},o.a.createElement(xo,null,t&&o.a.createElement(Eo,{onClick:()=>h(ai())},l?o.a.createElement(Kg,null):o.a.createElement($W,null),o.a.createElement("span",{className:"react-tabs__tab-text"},d(l?"mobile.steps":"mobile.menu"))),o.a.createElement(Eo,null,o.a.createElement(TW,null),o.a.createElement("span",{className:"react-tabs__tab-text"},d("mobile.code"))),o.a.createElement(Eo,null,o.a.createElement(RW,null),o.a.createElement("span",{className:"react-tabs__tab-text"},d("html"===r?"mobile.preview":"mobile.output")))))))};var NW=e=>{let{withProjectbar:t=!1,nameEditable:n=!1,withSidebar:r=!1,sidebarOptions:s=[],outputOnly:a=!1,outputPanels:l=["text","visual"],outputSplitView:c=!1}=e;const u=Fn(e=>e.editor.loading),d=Fn(e=>e.editor.project),h=Fn(e=>e.editor.project.identifier),p=Fn(e=>e.editor.codeRunTriggered),f=Fn(e=>e.editor.error),m=Fn(e=>e.editor.errorDetails),g=Fn(e=>e.editor.codeHasBeenRun),b=Fn(e=>e.instructions.currentStepPosition),v=Object(hi.useMediaQuery)({query:$o}),[y,S]=Object(i.useState)(g),_=In();return _(wr(c)),_(Er(!0)),_(Sr(a)),Object(i.useEffect)(()=>{S(!1);const e=setTimeout(()=>{document.dispatchEvent(mf)},2e3);return()=>clearTimeout(e)},[d]),Object(i.useEffect)(()=>{h&&document.dispatchEvent(ff("editor-projectIdentifierChanged",h))},[h]),Object(i.useEffect)(()=>{if(p)document.dispatchEvent(gf),S(!0);else if(y){const e=$s.a.sense_hat?$s.a.sense_hat.mz_criteria:{...vl},t=a?{errorDetails:m}:{isErrorFree:""===f,...e};document.dispatchEvent(ff("editor-runCompleted",t))}},[p,y,a,f,m]),Object(i.useEffect)(()=>{document.dispatchEvent(ff("editor-stepChanged",b))},[b]),o.a.createElement(o.a.Fragment,null,!a&&(v?o.a.createElement(jW,{withSidebar:r,sidebarOptions:s}):o.a.createElement(wW,{nameEditable:n,withProjectbar:t,withSidebar:r,sidebarOptions:s})),a&&o.a.createElement("div",{className:"embedded-viewer","data-testid":"output-only"},"success"===u&&o.a.createElement(du,{outputPanels:l})))};const DW={project_type:"python",name:Fh.t("project.untitled"),locale:null,components:[{extension:"py",name:"main",content:"",default:!0}],image_list:[]},IW=(Fh.t("project.untitled"),e=>{let{assetsIdentifier:t=null,projectIdentifier:n=null,code:r=null,accessToken:o=null,loadRemix:s=!1,loadCache:a=!0,remixLoadFailed:l=!1}=e;const c=Fn(e=>e.editor.loading),u=Fn(e=>e.editor.isEmbedded),d=Fn(e=>e.editor.browserPreview),h=Fn(e=>e.editor.project),p=Object(i.useRef)(!1),f=e=>u&&!d?null:JSON.parse(localStorage.getItem(e||"project")),[m,g]=Object(i.useState)(f(n)),{i18n:b}=Wi(),v=In();Object(i.useEffect)(()=>{g(f(n))},[n]),Object(i.useEffect)(()=>{if(!s){const e=n&&m&&m.identifier===n,i=!n&&m;if(a&&(e||i))return void v(Ar(m));if(t)return void v(sr("load")({identifier:t,locale:b.language,accessToken:o,assetsOnly:!0}));if(n)return void v(sr("load")({identifier:n,locale:b.language,accessToken:o}));if(r){return void v(Ar({name:"Blank project",project_type:"python",components:[{name:"main",extension:"py",content:r}]}))}v(Ar(DW))}},[r,n,m,b.language,o,s]),Object(i.useEffect)(()=>{n&&o&&s&&(l||p.current||(v(sr("loadRemix")({identifier:n,accessToken:o})),p.current=!0))},[n,o,h,s,l]),Object(i.useEffect)(()=>{n&&s&&l&&!p.current&&(v(sr("load")({identifier:n,locale:b.language,accessToken:o})),p.current=!0)},[n,b.language,o,l]),Object(i.useEffect)(()=>{if(r&&"success"===c){var e,t;const n="html"===h.project_type?"index":"main",i="html"===h.project_type?"html":"py",o=(null===(e=h.components)||void 0===e?void 0:e.find(e=>e.name===n&&e.extension===i))||{name:n,extension:i,content:""},s=(null===(t=h.components)||void 0===t?void 0:t.filter(e=>!(e.name===n&&e.extension===i)))||[],a={...h,project_type:h.project_type||"python",components:[...s,{...o,content:r}]};v(Ar(a))}},[r,c])}),LW=e=>{let{user:t,project:n={},justLoaded:r,hasShownSavePrompt:o,saveTriggered:s}=e;const a=In();Object(i.useEffect)(()=>{(async()=>{0!==Object.keys(n).length&&(s||t&&localStorage.getItem("awaitingSave"))&&(Sf(t,n)?a(sr("save")({project:n,accessToken:t.access_token,autosave:!1})):t&&n.identifier?(await a(sr("remix")({project:n,accessToken:t.access_token})),a(sr("loadRemix")({identifier:n.identifier,accessToken:t.access_token}))):a(Vr()),localStorage.removeItem("awaitingSave"))})()},[s,n,t,a]),Object(i.useEffect)(()=>{let e=setTimeout(()=>{n&&(Sf(t,n)&&n.identifier?(r&&a(hr()),a(sr("save")({project:n,accessToken:t.access_token,autosave:!0}))):r?a(hr()):((e=>{localStorage.setItem(e.identifier||"project",JSON.stringify(e))})(n),o||(Zu(t?Fh.t("notifications.savePrompt"):Fh.t("notifications.loginPrompt"),{...qh,className:"".concat(qh.className," toast--info"),icon:ed}),a(Or()))))},2e3);return()=>clearTimeout(e)},[a,n,t,o])},BW={python:["py","csv","txt"],html:["html","css","js"]},zW=(e,t)=>{const n=BW[e];return 1===n.length?"'.".concat(n[0],"'"):"'.".concat(n.slice(0,-1).join("', '."),"' ").concat(t("filePanel.errors.or")," '.").concat(n[n.length-1],"'")},FW=(e,t,n)=>{const r=e.split(".").slice(1).join(".");return!(!BW[t].includes(r)||n.includes(e)||1!==e.split(" ").length)},UW=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"python",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,o=arguments.length>5?arguments[5]:void 0,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;const a=e.split(".").slice(1).join(".");FW(e,t,n)||s&&e===s?o():n.includes(e)?r(kr(i("filePanel.errors.notUnique"))):e.split(" ").length>1?r(kr(i("filePanel.errors.containsSpaces"))):BW[t].includes(a)?r(kr(i("filePanel.errors.generalError"))):r(kr(i("filePanel.errors.unsupportedExtension",{allowedExtensions:zW(t,i)})))};var QW=n(84),qW=n.n(QW);n(106);var GW=e=>{let{buttons:t=[],children:n,defaultCallback:r,heading:i,isOpen:s,text:a=[],withCloseButton:l=!1,closeModal:c}=e;const{t:u}=Wi();return o.a.createElement("div",{onKeyDown:e=>{"Enter"===e.key&&r&&(e.preventDefault(),r())}},o.a.createElement(qW.a,{isOpen:s,onRequestClose:c,className:"modal-content",overlayClassName:"modal-overlay",contentLabel:i,parentSelector:()=>document.querySelector("#app")||document.querySelector("editor-wc").shadowRoot.querySelector("#wc"),appElement:document.querySelector("editor-wc")||document.getElementById("app")||void 0},o.a.createElement("div",{className:"modal-content__header"},o.a.createElement("h2",{className:"modal-content__heading"},i),l?o.a.createElement(kc,{className:"btn--tertiary",onClickHandler:c,ButtonIcon:Uh,label:u("modals.close"),title:u("modals.close")}):null),o.a.createElement("div",{className:"modal-content__body"},a.map((e,t)=>"subheading"===e.type?o.a.createElement("h3",{className:"modal-content__subheading",key:t},e.content):o.a.createElement("p",{className:"modal-content__text",key:t},e.content)),n),o.a.createElement("div",{className:"modal-content__buttons"},t)))};var HW=()=>{const e=Fn(e=>e.editor.nameError);return e?o.a.createElement("div",{className:"error-message"},o.a.createElement("p",{className:"error-message__content"},e)):null};var VW=e=>{let{inputs:t,...n}=e;const r=Object(i.useCallback)(e=>{e&&e.select()},[]);return o.a.createElement(GW,n,o.a.createElement("div",{className:"modal-content__inputs"},t.map((e,t)=>o.a.createElement("div",{key:t},"radio"===e.type?o.a.createElement(Ag,{label:e.label,options:e.options,value:e.value,setValue:e.setValue}):o.a.createElement("div",{className:"modal-content__input-section"},o.a.createElement("label",{htmlFor:t},e.label,o.a.createElement("p",{className:"modal-content__help-text"},e.helpText)),o.a.createElement("div",{className:"modal-content__input"},e.validateName?o.a.createElement(HW,null):null,o.a.createElement("input",{ref:0===t?r:null,type:"text",id:t,onChange:t=>e.setValue(t.target.value),value:e.value})))))))};var WW=()=>{const{t:e}=Wi(),t=In(),n=Fn(e=>e.editor.project.project_type),r=Fn(e=>e.editor.project.components).map(e=>"".concat(e.name,".").concat(e.extension)),s=Fn(e=>e.editor.newFileModalShowing),a=()=>t(Zr()),[l,c]=Object(i.useState)(""),u=()=>{const i=l.split(".")[0],o=l.split(".").slice(1).join(".");UW(l,n,r,t,e,()=>{t(cr({extension:o,name:i})),t(fr(l)),a()})};return o.a.createElement(VW,{isOpen:s,closeModal:a,withCloseButton:!0,heading:e("filePanel.newFileModal.heading"),inputs:[{label:e("filePanel.newFileModal.inputLabel"),helpText:e("filePanel.newFileModal.helpText",{examples:e("filePanel.newFileModal.helpTextExample.".concat(n))}),value:l,setValue:c,validateName:!0}],defaultCallback:u,buttons:[o.a.createElement(kc,{key:"create",className:"btn--primary",buttonText:e("filePanel.newFileModal.addFile"),onClickHandler:u}),o.a.createElement(kc,{key:"close",className:"btn--secondary",buttonText:e("filePanel.newFileModal.cancel"),onClickHandler:a})]})};var XW=e=>{let{errorType:t,additionalOnClose:n}=e;const r=In(),{t:i}=Wi(),s=Fn(e=>e.editor.error),a=Fn(e=>e.editor.errorModalShowing),l=()=>{r(Hr()),n&&n(),r(xr(null))};return o.a.createElement(o.a.Fragment,null,o.a.createElement(qW.a,{isOpen:a,onRequestClose:l,className:"modal-content",overlayClassName:"modal-overlay",contentLabel:"Error",parentSelector:()=>document.querySelector("#app")||document.querySelector("editor-wc").shadowRoot.querySelector("#wc"),appElement:document.querySelector("editor-wc")||document.getElementById("app")||void 0},o.a.createElement("div",{className:"modal-content__header"},o.a.createElement("h2",{className:"modal-content__heading"},i("modal.error.heading"))),i("modal.error.".concat(t||s,".message"),{defaultValue:null})&&o.a.createElement("div",{className:"modal-content__body"},o.a.createElement("p",{className:"modal-content__text"},i("modal.error.".concat(t||s,".message")))),o.a.createElement("div",{className:"modal-content__buttons"},o.a.createElement(kc,{className:"btn--primary",buttonText:i("modal.close"),onClickHandler:l}))))};var YW=()=>{const e=In(),{t:t}=Wi(),n=Fn(e=>e.editor.project.project_type),r=Fn(e=>e.editor.project.components),s=Fn(e=>e.editor.renameFileModalShowing),{name:a,ext:l,fileKey:c}=Fn(e=>e.editor.modals.renameFile),u=r.map(e=>"".concat(e.name,".").concat(e.extension)),d=()=>e(Kr()),[h,p]=Object(i.useState)("".concat(a,".").concat(l)),f=()=>{const r=h.split(".")[0],i=h.split(".").slice(1).join(".");UW(h,n,u,e,t,()=>{e(Ir({key:c,extension:i,name:r})),d()},"".concat(a,".").concat(l))};return o.a.createElement(VW,{isOpen:s,closeModal:d,withCloseButton:!0,heading:t("filePanel.renameFileModal.heading"),inputs:[{label:t("filePanel.renameFileModal.inputLabel"),value:h,setValue:p,validateName:!0}],defaultCallback:f,buttons:[o.a.createElement(kc,{key:"rename",className:"btn--primary",buttonText:t("filePanel.renameFileModal.save"),onClickHandler:f}),o.a.createElement(kc,{key:"close",className:"btn--secondary",buttonText:t("filePanel.renameFileModal.cancel"),onClickHandler:d})]})};var ZW=e=>{let{closeToast:t}=e;return o.a.createElement(kc,{className:"btn btn--tertiary",onClickHandler:t,ButtonIcon:()=>o.a.createElement(Uh,{scaleFactor:.75})})},JW=n(184),KW=n(185),eX=n(186),tX=(n(427),n(187)),nX=n.n(tX);var rX,iX=e=>{const{assetsIdentifier:t,authKey:n,identifier:r,code:s,senseHatAlwaysEnabled:a=!1,instructions:l,withProjectbar:c=!1,projectNameEditable:u=!1,withSidebar:d=!1,sidebarOptions:h=[],theme:p,outputPanels:f=["text","visual"],embedded:m=!1,hostStyles:g,showSavePrompt:b=!1,loadRemixDisabled:v=!1,readOnly:y=!1,outputOnly:S=!1,outputSplitView:_=!1,useEditorStyles:x=!1}=e,w=In(),{t:k}=Wi(),[O,E]=Object(i.useState)(r);localStorage.setItem("authKey",n);const A=n?JSON.parse(localStorage.getItem(n)):null,T=Fn(e=>e.auth.user||A),[C,M]=Object(i.useState)(!T),[$,P]=Object(i.useState)(!!T),R=Fn(e=>e.editor.project),j=Fn(e=>e.editor.project.user_name),N=Fn(e=>e.editor.loading),D=Fn(e=>e.editor.justLoaded),I=Fn(e=>e.editor.remixLoadFailed),L=Fn(e=>e.editor.hasShownSavePrompt),B=Fn(e=>e.editor.saveTriggered),z=Fn(e=>e.editor.modals),F=Fn(e=>e.editor.errorModalShowing),U=Fn(e=>e.editor.newFileModalShowing),Q=Fn(e=>e.editor.renameFileModalShowing),[q,G]=xg(["theme","fontSize"]),H=window.matchMedia("(prefers-color-scheme:dark)").matches?"dark":"light";!function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=In();Object(i.useEffect)(()=>{e&&t(yr())},[])}(m),Object(i.useEffect)(()=>{p&&(w(ci()),G("theme",p,{path:"/"}))},[p,G,w]),Object(i.useEffect)(()=>{I?(M(!0),P(!1)):(M(!T),P(!!T))},[T,R,I]),Object(i.useEffect)(()=>{"idle"===N&&R.identifier&&E(R.identifier)},[N,R]),Object(i.useEffect)(()=>{D&&document.dispatchEvent(ff("editor-projectOwnerLoaded",j))},[j,D]),IW({projectIdentifier:O,assetsIdentifier:t,code:s,accessToken:null==T?void 0:T.access_token,loadRemix:$&&!v,loadCache:C,remixLoadFailed:I}),LW({user:T,project:R,justLoaded:D,hasShownSavePrompt:L||!b,saveTriggered:B}),Object(i.useEffect)(()=>{w(Cr(a))},[a,w]),Object(i.useEffect)(()=>{w($r(v))},[v,w]),Object(i.useEffect)(()=>{l&&w(Bc(l))},[l,w]),Object(i.useEffect)(()=>{w(Tr(y))},[y,w]);return"success"===N?o.a.createElement(o.a.Fragment,null,o.a.createElement(Po.Provider,{value:{theme:q.theme||H,fontSize:q.fontSize||"small"}},o.a.createElement("style",null,KW.a.toString()),x&&o.a.createElement("style",null,eX.a.toString()),g&&o.a.createElement("style",null,g),o.a.createElement(nX.a,null,JW.a.toString(),o.a.createElement("div",{id:"wc",className:"--".concat(q.theme||H)},o.a.createElement(Lu,{enableMultiContainer:!0,containerId:"top-center",position:"top-center",className:"toast--top-center",closeButton:ZW}),o.a.createElement(NW,{withProjectbar:c,nameEditable:u,withSidebar:d,sidebarOptions:h,outputOnly:S,outputPanels:f,outputSplitView:_}),F&&o.a.createElement(XW,null),U&&o.a.createElement(WW,null),Q&&z.renameFile&&o.a.createElement(YW,null))))):["idle","failed"].includes(N)?o.a.createElement(o.a.Fragment,null,o.a.createElement("p",null,k("webComponent.failed"))):o.a.createElement(o.a.Fragment,null,o.a.createElement("p",null,k("webComponent.loading")))},oX=n(188),sX=n.n(oX);(rX={dsn:"https://a6d7b79c7a474a6499ace73acf792a83@o17504.ingest.sentry.io/4504055099621376",integrations:[new vn],environment:"production",tracesSampleRate:1})._metadata=rX._metadata||{},rX._metadata.sdk=rX._metadata.sdk||{name:"sentry.javascript.react",packages:[{name:"npm:@sentry/react",version:"7.16.0"}],version:"7.16.0"},jt(rX);class aX extends HTMLElement{constructor(){super(...arguments),this.componentAttributes={},this.componentProperties={}}connectedCallback(){this.shadowRoot||(this.mountPoint=this.shadowRoot),console.log("Mounted web-component..."),this.mountReactApp()}disconnectedCallback(){this.root&&(console.log("Unmounted web-component..."),this.root.unmount())}static get observedAttributes(){return["host_styles","assets_identifier","auth_key","identifier","code","sense_hat_always_enabled","instructions","with_projectbar","project_name_editable","with_sidebar","read_only","output_only","output_panels","sidebar_options","theme","embedded","show_save_prompt","load_remix_disabled","output_split_view","use_editor_styles"]}attributeChangedCallback(e,t,n){let r;r=["sense_hat_always_enabled","with_sidebar","with_projectbar","project_name_editable","show_save_prompt","load_remix_disabled","output_only","embedded","output_split_view","use_editor_styles","read_only"].includes(e)?"false"!==n:["instructions","sidebar_options","host_styles","output_panels"].includes(e)?JSON.parse(n):n,this.componentAttributes[sX()(e)]=r,this.mountReactApp()}get editorCode(){return Vc.getState().editor.project.components[0].content}get menuItems(){return this.componentProperties.menuItems}set menuItems(e){this.componentProperties.menuItems=e,this.mountReactApp()}stopCode(){const e=Vc.getState();(e.editor.codeRunTriggered||e.editor.drawTriggered)&&(Vc.dispatch(Pr()),Vc.dispatch(Rr()))}runCode(){Vc.dispatch(jr())}rerunCode(){this.stopCode(),new Promise(e=>{let t=setInterval(()=>{let n=Vc.getState();n.codeRunTriggered||n.drawTriggered||(clearInterval(t),e())},50)}).then(()=>{this.runCode()})}reactProps(){return{...this.componentAttributes,...this.componentProperties}}mountReactApp(){this.mountPoint||(this.mountPoint=document.createElement("div"),this.mountPoint.setAttribute("id","root"),this.mountPoint.setAttribute("part","editor-root"),this.attachShadow({mode:"open"}).appendChild(this.mountPoint),this.root=s.createRoot(this.mountPoint)),this.root.render(o.a.createElement(o.a.StrictMode,null,o.a.createElement(En,{store:Vc},o.a.createElement(vc,null,o.a.createElement(iX,this.reactProps())))))}}window.customElements.get("editor-wc")||window.customElements.define("editor-wc",aX)},function(e,t,n){"use strict";n.r(t),n.d(t,"compile",(function(){return Wt})),n.d(t,"_compileUnsafe",(function(){return Xt})),n.d(t,"_compileToken",(function(){return Yt})),n.d(t,"prepareContext",(function(){return Jt})),n.d(t,"selectAll",(function(){return Kt})),n.d(t,"selectOne",(function(){return en})),n.d(t,"is",(function(){return tn})),n.d(t,"filters",(function(){return wt})),n.d(t,"pseudos",(function(){return Ot})),n.d(t,"aliases",(function(){return At}));var r,i={};n.r(i),n.d(i,"getOuterHTML",(function(){return te})),n.d(i,"getInnerHTML",(function(){return ne})),n.d(i,"getText",(function(){return re})),n.d(i,"textContent",(function(){return ie})),n.d(i,"innerText",(function(){return oe})),n.d(i,"getChildren",(function(){return se})),n.d(i,"getParent",(function(){return ae})),n.d(i,"getSiblings",(function(){return le})),n.d(i,"getAttributeValue",(function(){return ce})),n.d(i,"hasAttrib",(function(){return ue})),n.d(i,"getName",(function(){return de})),n.d(i,"nextElementSibling",(function(){return he})),n.d(i,"prevElementSibling",(function(){return pe})),n.d(i,"removeElement",(function(){return fe})),n.d(i,"replaceElement",(function(){return me})),n.d(i,"appendChild",(function(){return ge})),n.d(i,"append",(function(){return be})),n.d(i,"prependChild",(function(){return ve})),n.d(i,"prepend",(function(){return ye})),n.d(i,"filter",(function(){return Se})),n.d(i,"find",(function(){return _e})),n.d(i,"findOneChild",(function(){return xe})),n.d(i,"findOne",(function(){return we})),n.d(i,"existsOne",(function(){return ke})),n.d(i,"findAll",(function(){return Oe})),n.d(i,"testElement",(function(){return Me})),n.d(i,"getElements",(function(){return $e})),n.d(i,"getElementById",(function(){return Pe})),n.d(i,"getElementsByTagName",(function(){return Re})),n.d(i,"getElementsByTagType",(function(){return je})),n.d(i,"removeSubsets",(function(){return Ne})),n.d(i,"DocumentPosition",(function(){return De})),n.d(i,"compareDocumentPosition",(function(){return Ie})),n.d(i,"uniqueSort",(function(){return Le})),n.d(i,"getFeed",(function(){return Be})),n.d(i,"isTag",(function(){return f})),n.d(i,"isCDATA",(function(){return m})),n.d(i,"isText",(function(){return g})),n.d(i,"isComment",(function(){return b})),n.d(i,"isDocument",(function(){return v})),n.d(i,"hasChildren",(function(){return y})),function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(r||(r={}));const o=r.Root,s=r.Text,a=r.Directive,l=r.Comment,c=r.Script,u=r.Style,d=r.Tag,h=r.CDATA,p=r.Doctype;function f(e){return(t=e).type===r.Tag||t.type===r.Script||t.type===r.Style;var t}function m(e){return e.type===r.CDATA}function g(e){return e.type===r.Text}function b(e){return e.type===r.Comment}function v(e){return e.type===r.Root}function y(e){return Object.prototype.hasOwnProperty.call(e,"children")}var S,_=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),x=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));const w=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),k=null!==(S=String.fromCodePoint)&&void 0!==S?S:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e),t};function O(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=w.get(e))&&void 0!==t?t:e}var E;!function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"}(E||(E={}));var A,T,C;function M(e){return e>=E.ZERO&&e<=E.NINE}function $(e){return e===E.EQUALS||function(e){return e>=E.UPPER_A&&e<=E.UPPER_Z||e>=E.LOWER_A&&e<=E.LOWER_Z||M(e)}(e)}!function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(A||(A={})),function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"}(T||(T={})),function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"}(C||(C={}));class P{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=T.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=C.Strict}startEntity(e){this.decodeMode=e,this.state=T.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case T.EntityStart:return e.charCodeAt(t)===E.NUM?(this.state=T.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=T.NamedEntity,this.stateNamedEntity(e,t));case T.NumericStart:return this.stateNumericStart(e,t);case T.NumericDecimal:return this.stateNumericDecimal(e,t);case T.NumericHex:return this.stateNumericHex(e,t);case T.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===E.LOWER_X?(this.state=T.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=T.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){const i=n-t;this.result=this.result*Math.pow(r,i)+parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){const n=t;for(;t<e.length;){const i=e.charCodeAt(t);if(!(M(i)||(r=i,r>=E.UPPER_A&&r<=E.UPPER_F||r>=E.LOWER_A&&r<=E.LOWER_F)))return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(i,3);t+=1}var r;return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){const n=t;for(;t<e.length;){const r=e.charCodeAt(t);if(!M(r))return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2);t+=1}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return null===(n=this.errors)||void 0===n||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===E.SEMI)this.consumed+=1;else if(this.decodeMode===C.Strict)return 0;return this.emitCodePoint(O(this.result),this.consumed),this.errors&&(e!==E.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){const{decodeTree:n}=this;let r=n[this.treeIndex],i=(r&A.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){const o=e.charCodeAt(t);if(this.treeIndex=j(n,r,this.treeIndex+Math.max(1,i),o),this.treeIndex<0)return 0===this.result||this.decodeMode===C.Attribute&&(0===i||$(o))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&A.VALUE_LENGTH)>>14,0!==i){if(o===E.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==C.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:n}=this,r=(n[t]&A.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:r}=this;return this.emitCodePoint(1===t?r[e]&~A.VALUE_LENGTH:r[e+1],n),3===t&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case T.NamedEntity:return 0===this.result||this.decodeMode===C.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case T.NumericDecimal:return this.emitNumericEntity(0,2);case T.NumericHex:return this.emitNumericEntity(0,3);case T.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case T.EntityStart:return 0}}}function R(e){let t="";const n=new P(e,e=>t+=k(e));return function(e,r){let i=0,o=0;for(;(o=e.indexOf("&",o))>=0;){t+=e.slice(i,o),n.startEntity(r);const s=n.write(e,o+1);if(s<0){i=o+n.end();break}i=o+s,o=0===s?i+1:i}const s=t+e.slice(i);return t="",s}}function j(e,t,n,r){const i=(t&A.BRANCH_LENGTH)>>7,o=t&A.JUMP_TABLE;if(0===i)return 0!==o&&r===o?n:-1;if(o){const t=r-o;return t<0||t>=i?-1:e[n+t]-1}let s=n,a=s+i-1;for(;s<=a;){const t=s+a>>>1,n=e[t];if(n<r)s=t+1;else{if(!(n>r))return e[t+i];a=t-1}}return-1}R(_),R(x);function N(e){for(let t=1;t<e.length;t++)e[t][0]+=e[t-1][0]+1;return e}new Map(N([[9,"	"],[0,"
"],[22,"!"],[0,"""],[0,"#"],[0,"$"],[0,"%"],[0,"&"],[0,"'"],[0,"("],[0,")"],[0,"*"],[0,"+"],[0,","],[1,"."],[0,"/"],[10,":"],[0,";"],[0,{v:"<",n:8402,o:"<⃒"}],[0,{v:"=",n:8421,o:"=⃥"}],[0,{v:">",n:8402,o:">⃒"}],[0,"?"],[0,"@"],[26,"["],[0,"\"],[0,"]"],[0,"^"],[0,"_"],[0,"`"],[5,{n:106,o:"fj"}],[20,"{"],[0,"|"],[0,"}"],[34," "],[0,"¡"],[0,"¢"],[0,"£"],[0,"¤"],[0,"¥"],[0,"¦"],[0,"§"],[0,"¨"],[0,"©"],[0,"ª"],[0,"«"],[0,"¬"],[0,"­"],[0,"®"],[0,"¯"],[0,"°"],[0,"±"],[0,"²"],[0,"³"],[0,"´"],[0,"µ"],[0,"¶"],[0,"·"],[0,"¸"],[0,"¹"],[0,"º"],[0,"»"],[0,"¼"],[0,"½"],[0,"¾"],[0,"¿"],[0,"À"],[0,"Á"],[0,"Â"],[0,"Ã"],[0,"Ä"],[0,"Å"],[0,"Æ"],[0,"Ç"],[0,"È"],[0,"É"],[0,"Ê"],[0,"Ë"],[0,"Ì"],[0,"Í"],[0,"Î"],[0,"Ï"],[0,"Ð"],[0,"Ñ"],[0,"Ò"],[0,"Ó"],[0,"Ô"],[0,"Õ"],[0,"Ö"],[0,"×"],[0,"Ø"],[0,"Ù"],[0,"Ú"],[0,"Û"],[0,"Ü"],[0,"Ý"],[0,"Þ"],[0,"ß"],[0,"à"],[0,"á"],[0,"â"],[0,"ã"],[0,"ä"],[0,"å"],[0,"æ"],[0,"ç"],[0,"è"],[0,"é"],[0,"ê"],[0,"ë"],[0,"ì"],[0,"í"],[0,"î"],[0,"ï"],[0,"ð"],[0,"ñ"],[0,"ò"],[0,"ó"],[0,"ô"],[0,"õ"],[0,"ö"],[0,"÷"],[0,"ø"],[0,"ù"],[0,"ú"],[0,"û"],[0,"ü"],[0,"ý"],[0,"þ"],[0,"ÿ"],[0,"Ā"],[0,"ā"],[0,"Ă"],[0,"ă"],[0,"Ą"],[0,"ą"],[0,"Ć"],[0,"ć"],[0,"Ĉ"],[0,"ĉ"],[0,"Ċ"],[0,"ċ"],[0,"Č"],[0,"č"],[0,"Ď"],[0,"ď"],[0,"Đ"],[0,"đ"],[0,"Ē"],[0,"ē"],[2,"Ė"],[0,"ė"],[0,"Ę"],[0,"ę"],[0,"Ě"],[0,"ě"],[0,"Ĝ"],[0,"ĝ"],[0,"Ğ"],[0,"ğ"],[0,"Ġ"],[0,"ġ"],[0,"Ģ"],[1,"Ĥ"],[0,"ĥ"],[0,"Ħ"],[0,"ħ"],[0,"Ĩ"],[0,"ĩ"],[0,"Ī"],[0,"ī"],[2,"Į"],[0,"į"],[0,"İ"],[0,"ı"],[0,"IJ"],[0,"ij"],[0,"Ĵ"],[0,"ĵ"],[0,"Ķ"],[0,"ķ"],[0,"ĸ"],[0,"Ĺ"],[0,"ĺ"],[0,"Ļ"],[0,"ļ"],[0,"Ľ"],[0,"ľ"],[0,"Ŀ"],[0,"ŀ"],[0,"Ł"],[0,"ł"],[0,"Ń"],[0,"ń"],[0,"Ņ"],[0,"ņ"],[0,"Ň"],[0,"ň"],[0,"ʼn"],[0,"Ŋ"],[0,"ŋ"],[0,"Ō"],[0,"ō"],[2,"Ő"],[0,"ő"],[0,"Œ"],[0,"œ"],[0,"Ŕ"],[0,"ŕ"],[0,"Ŗ"],[0,"ŗ"],[0,"Ř"],[0,"ř"],[0,"Ś"],[0,"ś"],[0,"Ŝ"],[0,"ŝ"],[0,"Ş"],[0,"ş"],[0,"Š"],[0,"š"],[0,"Ţ"],[0,"ţ"],[0,"Ť"],[0,"ť"],[0,"Ŧ"],[0,"ŧ"],[0,"Ũ"],[0,"ũ"],[0,"Ū"],[0,"ū"],[0,"Ŭ"],[0,"ŭ"],[0,"Ů"],[0,"ů"],[0,"Ű"],[0,"ű"],[0,"Ų"],[0,"ų"],[0,"Ŵ"],[0,"ŵ"],[0,"Ŷ"],[0,"ŷ"],[0,"Ÿ"],[0,"Ź"],[0,"ź"],[0,"Ż"],[0,"ż"],[0,"Ž"],[0,"ž"],[19,"ƒ"],[34,"Ƶ"],[63,"ǵ"],[65,"ȷ"],[142,"ˆ"],[0,"ˇ"],[16,"˘"],[0,"˙"],[0,"˚"],[0,"˛"],[0,"˜"],[0,"˝"],[51,"̑"],[127,"Α"],[0,"Β"],[0,"Γ"],[0,"Δ"],[0,"Ε"],[0,"Ζ"],[0,"Η"],[0,"Θ"],[0,"Ι"],[0,"Κ"],[0,"Λ"],[0,"Μ"],[0,"Ν"],[0,"Ξ"],[0,"Ο"],[0,"Π"],[0,"Ρ"],[1,"Σ"],[0,"Τ"],[0,"Υ"],[0,"Φ"],[0,"Χ"],[0,"Ψ"],[0,"Ω"],[7,"α"],[0,"β"],[0,"γ"],[0,"δ"],[0,"ε"],[0,"ζ"],[0,"η"],[0,"θ"],[0,"ι"],[0,"κ"],[0,"λ"],[0,"μ"],[0,"ν"],[0,"ξ"],[0,"ο"],[0,"π"],[0,"ρ"],[0,"ς"],[0,"σ"],[0,"τ"],[0,"υ"],[0,"φ"],[0,"χ"],[0,"ψ"],[0,"ω"],[7,"ϑ"],[0,"ϒ"],[2,"ϕ"],[0,"ϖ"],[5,"Ϝ"],[0,"ϝ"],[18,"ϰ"],[0,"ϱ"],[3,"ϵ"],[0,"϶"],[10,"Ё"],[0,"Ђ"],[0,"Ѓ"],[0,"Є"],[0,"Ѕ"],[0,"І"],[0,"Ї"],[0,"Ј"],[0,"Љ"],[0,"Њ"],[0,"Ћ"],[0,"Ќ"],[1,"Ў"],[0,"Џ"],[0,"А"],[0,"Б"],[0,"В"],[0,"Г"],[0,"Д"],[0,"Е"],[0,"Ж"],[0,"З"],[0,"И"],[0,"Й"],[0,"К"],[0,"Л"],[0,"М"],[0,"Н"],[0,"О"],[0,"П"],[0,"Р"],[0,"С"],[0,"Т"],[0,"У"],[0,"Ф"],[0,"Х"],[0,"Ц"],[0,"Ч"],[0,"Ш"],[0,"Щ"],[0,"Ъ"],[0,"Ы"],[0,"Ь"],[0,"Э"],[0,"Ю"],[0,"Я"],[0,"а"],[0,"б"],[0,"в"],[0,"г"],[0,"д"],[0,"е"],[0,"ж"],[0,"з"],[0,"и"],[0,"й"],[0,"к"],[0,"л"],[0,"м"],[0,"н"],[0,"о"],[0,"п"],[0,"р"],[0,"с"],[0,"т"],[0,"у"],[0,"ф"],[0,"х"],[0,"ц"],[0,"ч"],[0,"ш"],[0,"щ"],[0,"ъ"],[0,"ы"],[0,"ь"],[0,"э"],[0,"ю"],[0,"я"],[1,"ё"],[0,"ђ"],[0,"ѓ"],[0,"є"],[0,"ѕ"],[0,"і"],[0,"ї"],[0,"ј"],[0,"љ"],[0,"њ"],[0,"ћ"],[0,"ќ"],[1,"ў"],[0,"џ"],[7074," "],[0," "],[0," "],[0," "],[1," "],[0," "],[0," "],[0," "],[0,"​"],[0,"‌"],[0,"‍"],[0,"‎"],[0,"‏"],[0,"‐"],[2,"–"],[0,"—"],[0,"―"],[0,"‖"],[1,"‘"],[0,"’"],[0,"‚"],[1,"“"],[0,"”"],[0,"„"],[1,"†"],[0,"‡"],[0,"•"],[2,"‥"],[0,"…"],[9,"‰"],[0,"‱"],[0,"′"],[0,"″"],[0,"‴"],[0,"‵"],[3,"‹"],[0,"›"],[3,"‾"],[2,"⁁"],[1,"⁃"],[0,"⁄"],[10,"⁏"],[7,"⁗"],[7,{v:" ",n:8202,o:"  "}],[0,"⁠"],[0,"⁡"],[0,"⁢"],[0,"⁣"],[72,"€"],[46,"⃛"],[0,"⃜"],[37,"ℂ"],[2,"℅"],[4,"ℊ"],[0,"ℋ"],[0,"ℌ"],[0,"ℍ"],[0,"ℎ"],[0,"ℏ"],[0,"ℐ"],[0,"ℑ"],[0,"ℒ"],[0,"ℓ"],[1,"ℕ"],[0,"№"],[0,"℗"],[0,"℘"],[0,"ℙ"],[0,"ℚ"],[0,"ℛ"],[0,"ℜ"],[0,"ℝ"],[0,"℞"],[3,"™"],[1,"ℤ"],[2,"℧"],[0,"ℨ"],[0,"℩"],[2,"ℬ"],[0,"ℭ"],[1,"ℯ"],[0,"ℰ"],[0,"ℱ"],[1,"ℳ"],[0,"ℴ"],[0,"ℵ"],[0,"ℶ"],[0,"ℷ"],[0,"ℸ"],[12,"ⅅ"],[0,"ⅆ"],[0,"ⅇ"],[0,"ⅈ"],[10,"⅓"],[0,"⅔"],[0,"⅕"],[0,"⅖"],[0,"⅗"],[0,"⅘"],[0,"⅙"],[0,"⅚"],[0,"⅛"],[0,"⅜"],[0,"⅝"],[0,"⅞"],[49,"←"],[0,"↑"],[0,"→"],[0,"↓"],[0,"↔"],[0,"↕"],[0,"↖"],[0,"↗"],[0,"↘"],[0,"↙"],[0,"↚"],[0,"↛"],[1,{v:"↝",n:824,o:"↝̸"}],[0,"↞"],[0,"↟"],[0,"↠"],[0,"↡"],[0,"↢"],[0,"↣"],[0,"↤"],[0,"↥"],[0,"↦"],[0,"↧"],[1,"↩"],[0,"↪"],[0,"↫"],[0,"↬"],[0,"↭"],[0,"↮"],[1,"↰"],[0,"↱"],[0,"↲"],[0,"↳"],[1,"↵"],[0,"↶"],[0,"↷"],[2,"↺"],[0,"↻"],[0,"↼"],[0,"↽"],[0,"↾"],[0,"↿"],[0,"⇀"],[0,"⇁"],[0,"⇂"],[0,"⇃"],[0,"⇄"],[0,"⇅"],[0,"⇆"],[0,"⇇"],[0,"⇈"],[0,"⇉"],[0,"⇊"],[0,"⇋"],[0,"⇌"],[0,"⇍"],[0,"⇎"],[0,"⇏"],[0,"⇐"],[0,"⇑"],[0,"⇒"],[0,"⇓"],[0,"⇔"],[0,"⇕"],[0,"⇖"],[0,"⇗"],[0,"⇘"],[0,"⇙"],[0,"⇚"],[0,"⇛"],[1,"⇝"],[6,"⇤"],[0,"⇥"],[15,"⇵"],[7,"⇽"],[0,"⇾"],[0,"⇿"],[0,"∀"],[0,"∁"],[0,{v:"∂",n:824,o:"∂̸"}],[0,"∃"],[0,"∄"],[0,"∅"],[1,"∇"],[0,"∈"],[0,"∉"],[1,"∋"],[0,"∌"],[2,"∏"],[0,"∐"],[0,"∑"],[0,"−"],[0,"∓"],[0,"∔"],[1,"∖"],[0,"∗"],[0,"∘"],[1,"√"],[2,"∝"],[0,"∞"],[0,"∟"],[0,{v:"∠",n:8402,o:"∠⃒"}],[0,"∡"],[0,"∢"],[0,"∣"],[0,"∤"],[0,"∥"],[0,"∦"],[0,"∧"],[0,"∨"],[0,{v:"∩",n:65024,o:"∩︀"}],[0,{v:"∪",n:65024,o:"∪︀"}],[0,"∫"],[0,"∬"],[0,"∭"],[0,"∮"],[0,"∯"],[0,"∰"],[0,"∱"],[0,"∲"],[0,"∳"],[0,"∴"],[0,"∵"],[0,"∶"],[0,"∷"],[0,"∸"],[1,"∺"],[0,"∻"],[0,{v:"∼",n:8402,o:"∼⃒"}],[0,{v:"∽",n:817,o:"∽̱"}],[0,{v:"∾",n:819,o:"∾̳"}],[0,"∿"],[0,"≀"],[0,"≁"],[0,{v:"≂",n:824,o:"≂̸"}],[0,"≃"],[0,"≄"],[0,"≅"],[0,"≆"],[0,"≇"],[0,"≈"],[0,"≉"],[0,"≊"],[0,{v:"≋",n:824,o:"≋̸"}],[0,"≌"],[0,{v:"≍",n:8402,o:"≍⃒"}],[0,{v:"≎",n:824,o:"≎̸"}],[0,{v:"≏",n:824,o:"≏̸"}],[0,{v:"≐",n:824,o:"≐̸"}],[0,"≑"],[0,"≒"],[0,"≓"],[0,"≔"],[0,"≕"],[0,"≖"],[0,"≗"],[1,"≙"],[0,"≚"],[1,"≜"],[2,"≟"],[0,"≠"],[0,{v:"≡",n:8421,o:"≡⃥"}],[0,"≢"],[1,{v:"≤",n:8402,o:"≤⃒"}],[0,{v:"≥",n:8402,o:"≥⃒"}],[0,{v:"≦",n:824,o:"≦̸"}],[0,{v:"≧",n:824,o:"≧̸"}],[0,{v:"≨",n:65024,o:"≨︀"}],[0,{v:"≩",n:65024,o:"≩︀"}],[0,{v:"≪",n:new Map(N([[824,"≪̸"],[7577,"≪⃒"]]))}],[0,{v:"≫",n:new Map(N([[824,"≫̸"],[7577,"≫⃒"]]))}],[0,"≬"],[0,"≭"],[0,"≮"],[0,"≯"],[0,"≰"],[0,"≱"],[0,"≲"],[0,"≳"],[0,"≴"],[0,"≵"],[0,"≶"],[0,"≷"],[0,"≸"],[0,"≹"],[0,"≺"],[0,"≻"],[0,"≼"],[0,"≽"],[0,"≾"],[0,{v:"≿",n:824,o:"≿̸"}],[0,"⊀"],[0,"⊁"],[0,{v:"⊂",n:8402,o:"⊂⃒"}],[0,{v:"⊃",n:8402,o:"⊃⃒"}],[0,"⊄"],[0,"⊅"],[0,"⊆"],[0,"⊇"],[0,"⊈"],[0,"⊉"],[0,{v:"⊊",n:65024,o:"⊊︀"}],[0,{v:"⊋",n:65024,o:"⊋︀"}],[1,"⊍"],[0,"⊎"],[0,{v:"⊏",n:824,o:"⊏̸"}],[0,{v:"⊐",n:824,o:"⊐̸"}],[0,"⊑"],[0,"⊒"],[0,{v:"⊓",n:65024,o:"⊓︀"}],[0,{v:"⊔",n:65024,o:"⊔︀"}],[0,"⊕"],[0,"⊖"],[0,"⊗"],[0,"⊘"],[0,"⊙"],[0,"⊚"],[0,"⊛"],[1,"⊝"],[0,"⊞"],[0,"⊟"],[0,"⊠"],[0,"⊡"],[0,"⊢"],[0,"⊣"],[0,"⊤"],[0,"⊥"],[1,"⊧"],[0,"⊨"],[0,"⊩"],[0,"⊪"],[0,"⊫"],[0,"⊬"],[0,"⊭"],[0,"⊮"],[0,"⊯"],[0,"⊰"],[1,"⊲"],[0,"⊳"],[0,{v:"⊴",n:8402,o:"⊴⃒"}],[0,{v:"⊵",n:8402,o:"⊵⃒"}],[0,"⊶"],[0,"⊷"],[0,"⊸"],[0,"⊹"],[0,"⊺"],[0,"⊻"],[1,"⊽"],[0,"⊾"],[0,"⊿"],[0,"⋀"],[0,"⋁"],[0,"⋂"],[0,"⋃"],[0,"⋄"],[0,"⋅"],[0,"⋆"],[0,"⋇"],[0,"⋈"],[0,"⋉"],[0,"⋊"],[0,"⋋"],[0,"⋌"],[0,"⋍"],[0,"⋎"],[0,"⋏"],[0,"⋐"],[0,"⋑"],[0,"⋒"],[0,"⋓"],[0,"⋔"],[0,"⋕"],[0,"⋖"],[0,"⋗"],[0,{v:"⋘",n:824,o:"⋘̸"}],[0,{v:"⋙",n:824,o:"⋙̸"}],[0,{v:"⋚",n:65024,o:"⋚︀"}],[0,{v:"⋛",n:65024,o:"⋛︀"}],[2,"⋞"],[0,"⋟"],[0,"⋠"],[0,"⋡"],[0,"⋢"],[0,"⋣"],[2,"⋦"],[0,"⋧"],[0,"⋨"],[0,"⋩"],[0,"⋪"],[0,"⋫"],[0,"⋬"],[0,"⋭"],[0,"⋮"],[0,"⋯"],[0,"⋰"],[0,"⋱"],[0,"⋲"],[0,"⋳"],[0,"⋴"],[0,{v:"⋵",n:824,o:"⋵̸"}],[0,"⋶"],[0,"⋷"],[1,{v:"⋹",n:824,o:"⋹̸"}],[0,"⋺"],[0,"⋻"],[0,"⋼"],[0,"⋽"],[0,"⋾"],[6,"⌅"],[0,"⌆"],[1,"⌈"],[0,"⌉"],[0,"⌊"],[0,"⌋"],[0,"⌌"],[0,"⌍"],[0,"⌎"],[0,"⌏"],[0,"⌐"],[1,"⌒"],[0,"⌓"],[1,"⌕"],[0,"⌖"],[5,"⌜"],[0,"⌝"],[0,"⌞"],[0,"⌟"],[2,"⌢"],[0,"⌣"],[9,"⌭"],[0,"⌮"],[7,"⌶"],[6,"⌽"],[1,"⌿"],[60,"⍼"],[51,"⎰"],[0,"⎱"],[2,"⎴"],[0,"⎵"],[0,"⎶"],[37,"⏜"],[0,"⏝"],[0,"⏞"],[0,"⏟"],[2,"⏢"],[4,"⏧"],[59,"␣"],[164,"Ⓢ"],[55,"─"],[1,"│"],[9,"┌"],[3,"┐"],[3,"└"],[3,"┘"],[3,"├"],[7,"┤"],[7,"┬"],[7,"┴"],[7,"┼"],[19,"═"],[0,"║"],[0,"╒"],[0,"╓"],[0,"╔"],[0,"╕"],[0,"╖"],[0,"╗"],[0,"╘"],[0,"╙"],[0,"╚"],[0,"╛"],[0,"╜"],[0,"╝"],[0,"╞"],[0,"╟"],[0,"╠"],[0,"╡"],[0,"╢"],[0,"╣"],[0,"╤"],[0,"╥"],[0,"╦"],[0,"╧"],[0,"╨"],[0,"╩"],[0,"╪"],[0,"╫"],[0,"╬"],[19,"▀"],[3,"▄"],[3,"█"],[8,"░"],[0,"▒"],[0,"▓"],[13,"□"],[8,"▪"],[0,"▫"],[1,"▭"],[0,"▮"],[2,"▱"],[1,"△"],[0,"▴"],[0,"▵"],[2,"▸"],[0,"▹"],[3,"▽"],[0,"▾"],[0,"▿"],[2,"◂"],[0,"◃"],[6,"◊"],[0,"○"],[32,"◬"],[2,"◯"],[8,"◸"],[0,"◹"],[0,"◺"],[0,"◻"],[0,"◼"],[8,"★"],[0,"☆"],[7,"☎"],[49,"♀"],[1,"♂"],[29,"♠"],[2,"♣"],[1,"♥"],[0,"♦"],[3,"♪"],[2,"♭"],[0,"♮"],[0,"♯"],[163,"✓"],[3,"✗"],[8,"✠"],[21,"✶"],[33,"❘"],[25,"❲"],[0,"❳"],[84,"⟈"],[0,"⟉"],[28,"⟦"],[0,"⟧"],[0,"⟨"],[0,"⟩"],[0,"⟪"],[0,"⟫"],[0,"⟬"],[0,"⟭"],[7,"⟵"],[0,"⟶"],[0,"⟷"],[0,"⟸"],[0,"⟹"],[0,"⟺"],[1,"⟼"],[2,"⟿"],[258,"⤂"],[0,"⤃"],[0,"⤄"],[0,"⤅"],[6,"⤌"],[0,"⤍"],[0,"⤎"],[0,"⤏"],[0,"⤐"],[0,"⤑"],[0,"⤒"],[0,"⤓"],[2,"⤖"],[2,"⤙"],[0,"⤚"],[0,"⤛"],[0,"⤜"],[0,"⤝"],[0,"⤞"],[0,"⤟"],[0,"⤠"],[2,"⤣"],[0,"⤤"],[0,"⤥"],[0,"⤦"],[0,"⤧"],[0,"⤨"],[0,"⤩"],[0,"⤪"],[8,{v:"⤳",n:824,o:"⤳̸"}],[1,"⤵"],[0,"⤶"],[0,"⤷"],[0,"⤸"],[0,"⤹"],[2,"⤼"],[0,"⤽"],[7,"⥅"],[2,"⥈"],[0,"⥉"],[0,"⥊"],[0,"⥋"],[2,"⥎"],[0,"⥏"],[0,"⥐"],[0,"⥑"],[0,"⥒"],[0,"⥓"],[0,"⥔"],[0,"⥕"],[0,"⥖"],[0,"⥗"],[0,"⥘"],[0,"⥙"],[0,"⥚"],[0,"⥛"],[0,"⥜"],[0,"⥝"],[0,"⥞"],[0,"⥟"],[0,"⥠"],[0,"⥡"],[0,"⥢"],[0,"⥣"],[0,"⥤"],[0,"⥥"],[0,"⥦"],[0,"⥧"],[0,"⥨"],[0,"⥩"],[0,"⥪"],[0,"⥫"],[0,"⥬"],[0,"⥭"],[0,"⥮"],[0,"⥯"],[0,"⥰"],[0,"⥱"],[0,"⥲"],[0,"⥳"],[0,"⥴"],[0,"⥵"],[0,"⥶"],[1,"⥸"],[0,"⥹"],[1,"⥻"],[0,"⥼"],[0,"⥽"],[0,"⥾"],[0,"⥿"],[5,"⦅"],[0,"⦆"],[4,"⦋"],[0,"⦌"],[0,"⦍"],[0,"⦎"],[0,"⦏"],[0,"⦐"],[0,"⦑"],[0,"⦒"],[0,"⦓"],[0,"⦔"],[0,"⦕"],[0,"⦖"],[3,"⦚"],[1,"⦜"],[0,"⦝"],[6,"⦤"],[0,"⦥"],[0,"⦦"],[0,"⦧"],[0,"⦨"],[0,"⦩"],[0,"⦪"],[0,"⦫"],[0,"⦬"],[0,"⦭"],[0,"⦮"],[0,"⦯"],[0,"⦰"],[0,"⦱"],[0,"⦲"],[0,"⦳"],[0,"⦴"],[0,"⦵"],[0,"⦶"],[0,"⦷"],[1,"⦹"],[1,"⦻"],[0,"⦼"],[1,"⦾"],[0,"⦿"],[0,"⧀"],[0,"⧁"],[0,"⧂"],[0,"⧃"],[0,"⧄"],[0,"⧅"],[3,"⧉"],[3,"⧍"],[0,"⧎"],[0,{v:"⧏",n:824,o:"⧏̸"}],[0,{v:"⧐",n:824,o:"⧐̸"}],[11,"⧜"],[0,"⧝"],[0,"⧞"],[4,"⧣"],[0,"⧤"],[0,"⧥"],[5,"⧫"],[8,"⧴"],[1,"⧶"],[9,"⨀"],[0,"⨁"],[0,"⨂"],[1,"⨄"],[1,"⨆"],[5,"⨌"],[0,"⨍"],[2,"⨐"],[0,"⨑"],[0,"⨒"],[0,"⨓"],[0,"⨔"],[0,"⨕"],[0,"⨖"],[0,"⨗"],[10,"⨢"],[0,"⨣"],[0,"⨤"],[0,"⨥"],[0,"⨦"],[0,"⨧"],[1,"⨩"],[0,"⨪"],[2,"⨭"],[0,"⨮"],[0,"⨯"],[0,"⨰"],[0,"⨱"],[1,"⨳"],[0,"⨴"],[0,"⨵"],[0,"⨶"],[0,"⨷"],[0,"⨸"],[0,"⨹"],[0,"⨺"],[0,"⨻"],[0,"⨼"],[2,"⨿"],[0,"⩀"],[1,"⩂"],[0,"⩃"],[0,"⩄"],[0,"⩅"],[0,"⩆"],[0,"⩇"],[0,"⩈"],[0,"⩉"],[0,"⩊"],[0,"⩋"],[0,"⩌"],[0,"⩍"],[2,"⩐"],[2,"⩓"],[0,"⩔"],[0,"⩕"],[0,"⩖"],[0,"⩗"],[0,"⩘"],[1,"⩚"],[0,"⩛"],[0,"⩜"],[0,"⩝"],[1,"⩟"],[6,"⩦"],[3,"⩪"],[2,{v:"⩭",n:824,o:"⩭̸"}],[0,"⩮"],[0,"⩯"],[0,{v:"⩰",n:824,o:"⩰̸"}],[0,"⩱"],[0,"⩲"],[0,"⩳"],[0,"⩴"],[0,"⩵"],[1,"⩷"],[0,"⩸"],[0,"⩹"],[0,"⩺"],[0,"⩻"],[0,"⩼"],[0,{v:"⩽",n:824,o:"⩽̸"}],[0,{v:"⩾",n:824,o:"⩾̸"}],[0,"⩿"],[0,"⪀"],[0,"⪁"],[0,"⪂"],[0,"⪃"],[0,"⪄"],[0,"⪅"],[0,"⪆"],[0,"⪇"],[0,"⪈"],[0,"⪉"],[0,"⪊"],[0,"⪋"],[0,"⪌"],[0,"⪍"],[0,"⪎"],[0,"⪏"],[0,"⪐"],[0,"⪑"],[0,"⪒"],[0,"⪓"],[0,"⪔"],[0,"⪕"],[0,"⪖"],[0,"⪗"],[0,"⪘"],[0,"⪙"],[0,"⪚"],[2,"⪝"],[0,"⪞"],[0,"⪟"],[0,"⪠"],[0,{v:"⪡",n:824,o:"⪡̸"}],[0,{v:"⪢",n:824,o:"⪢̸"}],[1,"⪤"],[0,"⪥"],[0,"⪦"],[0,"⪧"],[0,"⪨"],[0,"⪩"],[0,"⪪"],[0,"⪫"],[0,{v:"⪬",n:65024,o:"⪬︀"}],[0,{v:"⪭",n:65024,o:"⪭︀"}],[0,"⪮"],[0,{v:"⪯",n:824,o:"⪯̸"}],[0,{v:"⪰",n:824,o:"⪰̸"}],[2,"⪳"],[0,"⪴"],[0,"⪵"],[0,"⪶"],[0,"⪷"],[0,"⪸"],[0,"⪹"],[0,"⪺"],[0,"⪻"],[0,"⪼"],[0,"⪽"],[0,"⪾"],[0,"⪿"],[0,"⫀"],[0,"⫁"],[0,"⫂"],[0,"⫃"],[0,"⫄"],[0,{v:"⫅",n:824,o:"⫅̸"}],[0,{v:"⫆",n:824,o:"⫆̸"}],[0,"⫇"],[0,"⫈"],[2,{v:"⫋",n:65024,o:"⫋︀"}],[0,{v:"⫌",n:65024,o:"⫌︀"}],[2,"⫏"],[0,"⫐"],[0,"⫑"],[0,"⫒"],[0,"⫓"],[0,"⫔"],[0,"⫕"],[0,"⫖"],[0,"⫗"],[0,"⫘"],[0,"⫙"],[0,"⫚"],[0,"⫛"],[8,"⫤"],[1,"⫦"],[0,"⫧"],[0,"⫨"],[0,"⫩"],[1,"⫫"],[0,"⫬"],[0,"⫭"],[0,"⫮"],[0,"⫯"],[0,"⫰"],[0,"⫱"],[0,"⫲"],[0,"⫳"],[9,{v:"⫽",n:8421,o:"⫽⃥"}],[44343,{n:new Map(N([[56476,"𝒜"],[1,"𝒞"],[0,"𝒟"],[2,"𝒢"],[2,"𝒥"],[0,"𝒦"],[2,"𝒩"],[0,"𝒪"],[0,"𝒫"],[0,"𝒬"],[1,"𝒮"],[0,"𝒯"],[0,"𝒰"],[0,"𝒱"],[0,"𝒲"],[0,"𝒳"],[0,"𝒴"],[0,"𝒵"],[0,"𝒶"],[0,"𝒷"],[0,"𝒸"],[0,"𝒹"],[1,"𝒻"],[1,"𝒽"],[0,"𝒾"],[0,"𝒿"],[0,"𝓀"],[0,"𝓁"],[0,"𝓂"],[0,"𝓃"],[1,"𝓅"],[0,"𝓆"],[0,"𝓇"],[0,"𝓈"],[0,"𝓉"],[0,"𝓊"],[0,"𝓋"],[0,"𝓌"],[0,"𝓍"],[0,"𝓎"],[0,"𝓏"],[52,"𝔄"],[0,"𝔅"],[1,"𝔇"],[0,"𝔈"],[0,"𝔉"],[0,"𝔊"],[2,"𝔍"],[0,"𝔎"],[0,"𝔏"],[0,"𝔐"],[0,"𝔑"],[0,"𝔒"],[0,"𝔓"],[0,"𝔔"],[1,"𝔖"],[0,"𝔗"],[0,"𝔘"],[0,"𝔙"],[0,"𝔚"],[0,"𝔛"],[0,"𝔜"],[1,"𝔞"],[0,"𝔟"],[0,"𝔠"],[0,"𝔡"],[0,"𝔢"],[0,"𝔣"],[0,"𝔤"],[0,"𝔥"],[0,"𝔦"],[0,"𝔧"],[0,"𝔨"],[0,"𝔩"],[0,"𝔪"],[0,"𝔫"],[0,"𝔬"],[0,"𝔭"],[0,"𝔮"],[0,"𝔯"],[0,"𝔰"],[0,"𝔱"],[0,"𝔲"],[0,"𝔳"],[0,"𝔴"],[0,"𝔵"],[0,"𝔶"],[0,"𝔷"],[0,"𝔸"],[0,"𝔹"],[1,"𝔻"],[0,"𝔼"],[0,"𝔽"],[0,"𝔾"],[1,"𝕀"],[0,"𝕁"],[0,"𝕂"],[0,"𝕃"],[0,"𝕄"],[1,"𝕆"],[3,"𝕊"],[0,"𝕋"],[0,"𝕌"],[0,"𝕍"],[0,"𝕎"],[0,"𝕏"],[0,"𝕐"],[1,"𝕒"],[0,"𝕓"],[0,"𝕔"],[0,"𝕕"],[0,"𝕖"],[0,"𝕗"],[0,"𝕘"],[0,"𝕙"],[0,"𝕚"],[0,"𝕛"],[0,"𝕜"],[0,"𝕝"],[0,"𝕞"],[0,"𝕟"],[0,"𝕠"],[0,"𝕡"],[0,"𝕢"],[0,"𝕣"],[0,"𝕤"],[0,"𝕥"],[0,"𝕦"],[0,"𝕧"],[0,"𝕨"],[0,"𝕩"],[0,"𝕪"],[0,"𝕫"]]))}],[8906,"ff"],[0,"fi"],[0,"fl"],[0,"ffi"],[0,"ffl"]]));const D=/["&'<>$\x80-\uFFFF]/g,I=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]),L=null!=String.prototype.codePointAt?(e,t)=>e.codePointAt(t):(e,t)=>55296==(64512&e.charCodeAt(t))?1024*(e.charCodeAt(t)-55296)+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function B(e){let t,n="",r=0;for(;null!==(t=D.exec(e));){const i=t.index,o=e.charCodeAt(i),s=I.get(o);void 0!==s?(n+=e.substring(r,i)+s,r=i+1):(n+=`${e.substring(r,i)}&#x${L(e,i).toString(16)};`,r=D.lastIndex+=Number(55296==(64512&o)))}return n+e.substr(r)}function z(e,t){return function(n){let r,i=0,o="";for(;r=e.exec(n);)i!==r.index&&(o+=n.substring(i,r.index)),o+=t.get(r[0].charCodeAt(0)),i=r.index+1;return o+n.substring(i)}}z(/[&<>'"]/g,I);const F=z(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),U=z(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]));var Q,q;!function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"}(Q||(Q={})),function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"}(q||(q={}));const G=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),H=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),V=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function W(e){return e.replace(/"/g,""")}const X=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function Y(e,t={}){const n="length"in e?e:[e];let r="";for(let e=0;e<n.length;e++)r+=J(n[e],t);return r}var Z=Y;function J(e,t){switch(e.type){case o:return Y(e.children,t);case p:case a:return`<${e.data}>`;case l:return function(e){return`\x3c!--${e.data}--\x3e`}(e);case h:return function(e){return`<![CDATA[${e.children[0].data}]]>`}(e);case c:case u:case d:return function(e,t){var n;"foreign"===t.xmlMode&&(e.name=null!==(n=G.get(e.name))&&void 0!==n?n:e.name,e.parent&&K.has(e.parent.name)&&(t={...t,xmlMode:!1}));!t.xmlMode&&ee.has(e.name)&&(t={...t,xmlMode:"foreign"});let r="<"+e.name;const i=function(e,t){var n;if(!e)return;const r=!1===(null!==(n=t.encodeEntities)&&void 0!==n?n:t.decodeEntities)?W:t.xmlMode||"utf8"!==t.encodeEntities?B:F;return Object.keys(e).map(n=>{var i,o;const s=null!==(i=e[n])&&void 0!==i?i:"";return"foreign"===t.xmlMode&&(n=null!==(o=H.get(n))&&void 0!==o?o:n),t.emptyAttrs||t.xmlMode||""!==s?`${n}="${r(s)}"`:n}).join(" ")}(e.attribs,t);i&&(r+=" "+i);0===e.children.length&&(t.xmlMode?!1!==t.selfClosingTags:t.selfClosingTags&&X.has(e.name))?(t.xmlMode||(r+=" "),r+="/>"):(r+=">",e.children.length>0&&(r+=Y(e.children,t)),!t.xmlMode&&X.has(e.name)||(r+=`</${e.name}>`));return r}(e,t);case s:return function(e,t){var n;let r=e.data||"";!1===(null!==(n=t.encodeEntities)&&void 0!==n?n:t.decodeEntities)||!t.xmlMode&&e.parent&&V.has(e.parent.name)||(r=t.xmlMode||"utf8"!==t.encodeEntities?B(r):U(r));return r}(e,t)}}const K=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),ee=new Set(["svg","math"]);function te(e,t){return Z(e,t)}function ne(e,t){return y(e)?e.children.map(e=>te(e,t)).join(""):""}function re(e){return Array.isArray(e)?e.map(re).join(""):f(e)?"br"===e.name?"\n":re(e.children):m(e)?re(e.children):g(e)?e.data:""}function ie(e){return Array.isArray(e)?e.map(ie).join(""):y(e)&&!b(e)?ie(e.children):g(e)?e.data:""}function oe(e){return Array.isArray(e)?e.map(oe).join(""):y(e)&&(e.type===r.Tag||m(e))?oe(e.children):g(e)?e.data:""}function se(e){return y(e)?e.children:[]}function ae(e){return e.parent||null}function le(e){const t=ae(e);if(null!=t)return se(t);const n=[e];let{prev:r,next:i}=e;for(;null!=r;)n.unshift(r),({prev:r}=r);for(;null!=i;)n.push(i),({next:i}=i);return n}function ce(e,t){var n;return null===(n=e.attribs)||void 0===n?void 0:n[t]}function ue(e,t){return null!=e.attribs&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&null!=e.attribs[t]}function de(e){return e.name}function he(e){let{next:t}=e;for(;null!==t&&!f(t);)({next:t}=t);return t}function pe(e){let{prev:t}=e;for(;null!==t&&!f(t);)({prev:t}=t);return t}function fe(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){const t=e.parent.children,n=t.lastIndexOf(e);n>=0&&t.splice(n,1)}e.next=null,e.prev=null,e.parent=null}function me(e,t){const n=t.prev=e.prev;n&&(n.next=t);const r=t.next=e.next;r&&(r.prev=t);const i=t.parent=e.parent;if(i){const n=i.children;n[n.lastIndexOf(e)]=t,e.parent=null}}function ge(e,t){if(fe(t),t.next=null,t.parent=e,e.children.push(t)>1){const n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null}function be(e,t){fe(t);const{parent:n}=e,r=e.next;if(t.next=r,t.prev=e,e.next=t,t.parent=n,r){if(r.prev=t,n){const e=n.children;e.splice(e.lastIndexOf(r),0,t)}}else n&&n.children.push(t)}function ve(e,t){if(fe(t),t.parent=e,t.prev=null,1!==e.children.unshift(t)){const n=e.children[1];n.prev=t,t.next=n}else t.next=null}function ye(e,t){fe(t);const{parent:n}=e;if(n){const r=n.children;r.splice(r.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}function Se(e,t,n=!0,r=1/0){return _e(e,Array.isArray(t)?t:[t],n,r)}function _e(e,t,n,r){const i=[],o=[t],s=[0];for(;;){if(s[0]>=o[0].length){if(1===s.length)return i;o.shift(),s.shift();continue}const t=o[0][s[0]++];if(e(t)&&(i.push(t),--r<=0))return i;n&&y(t)&&t.children.length>0&&(s.unshift(0),o.unshift(t.children))}}function xe(e,t){return t.find(e)}function we(e,t,n=!0){let r=null;for(let i=0;i<t.length&&!r;i++){const o=t[i];f(o)&&(e(o)?r=o:n&&o.children.length>0&&(r=we(e,o.children,!0)))}return r}function ke(e,t){return t.some(t=>f(t)&&(e(t)||ke(e,t.children)))}function Oe(e,t){const n=[],r=[t],i=[0];for(;;){if(i[0]>=r[0].length){if(1===r.length)return n;r.shift(),i.shift();continue}const t=r[0][i[0]++];f(t)&&(e(t)&&n.push(t),t.children.length>0&&(i.unshift(0),r.unshift(t.children)))}}const Ee={tag_name:e=>"function"==typeof e?t=>f(t)&&e(t.name):"*"===e?f:t=>f(t)&&t.name===e,tag_type:e=>"function"==typeof e?t=>e(t.type):t=>t.type===e,tag_contains:e=>"function"==typeof e?t=>g(t)&&e(t.data):t=>g(t)&&t.data===e};function Ae(e,t){return"function"==typeof t?n=>f(n)&&t(n.attribs[e]):n=>f(n)&&n.attribs[e]===t}function Te(e,t){return n=>e(n)||t(n)}function Ce(e){const t=Object.keys(e).map(t=>{const n=e[t];return Object.prototype.hasOwnProperty.call(Ee,t)?Ee[t](n):Ae(t,n)});return 0===t.length?null:t.reduce(Te)}function Me(e,t){const n=Ce(e);return!n||n(t)}function $e(e,t,n,r=1/0){const i=Ce(e);return i?Se(i,t,n,r):[]}function Pe(e,t,n=!0){return Array.isArray(t)||(t=[t]),we(Ae("id",e),t,n)}function Re(e,t,n=!0,r=1/0){return Se(Ee.tag_name(e),t,n,r)}function je(e,t,n=!0,r=1/0){return Se(Ee.tag_type(e),t,n,r)}function Ne(e){let t=e.length;for(;--t>=0;){const n=e[t];if(t>0&&e.lastIndexOf(n,t-1)>=0)e.splice(t,1);else for(let r=n.parent;r;r=r.parent)if(e.includes(r)){e.splice(t,1);break}}return e}var De;function Ie(e,t){const n=[],r=[];if(e===t)return 0;let i=y(e)?e:e.parent;for(;i;)n.unshift(i),i=i.parent;for(i=y(t)?t:t.parent;i;)r.unshift(i),i=i.parent;const o=Math.min(n.length,r.length);let s=0;for(;s<o&&n[s]===r[s];)s++;if(0===s)return De.DISCONNECTED;const a=n[s-1],l=a.children,c=n[s],u=r[s];return l.indexOf(c)>l.indexOf(u)?a===t?De.FOLLOWING|De.CONTAINED_BY:De.FOLLOWING:a===e?De.PRECEDING|De.CONTAINS:De.PRECEDING}function Le(e){return(e=e.filter((e,t,n)=>!n.includes(e,t+1))).sort((e,t)=>{const n=Ie(e,t);return n&De.PRECEDING?-1:n&De.FOLLOWING?1:0}),e}function Be(e){const t=Qe(He,e);return t?"feed"===t.name?function(e){var t;const n=e.children,r={type:"atom",items:Re("entry",n).map(e=>{var t;const{children:n}=e,r={media:Ue(n)};Ge(r,"id","id",n),Ge(r,"title","title",n);const i=null===(t=Qe("link",n))||void 0===t?void 0:t.attribs.href;i&&(r.link=i);const o=qe("summary",n)||qe("content",n);o&&(r.description=o);const s=qe("updated",n);return s&&(r.pubDate=new Date(s)),r})};Ge(r,"id","id",n),Ge(r,"title","title",n);const i=null===(t=Qe("link",n))||void 0===t?void 0:t.attribs.href;i&&(r.link=i);Ge(r,"description","subtitle",n);const o=qe("updated",n);o&&(r.updated=new Date(o));return Ge(r,"author","email",n,!0),r}(t):function(e){var t,n;const r=null!==(n=null===(t=Qe("channel",e.children))||void 0===t?void 0:t.children)&&void 0!==n?n:[],i={type:e.name.substr(0,3),id:"",items:Re("item",e.children).map(e=>{const{children:t}=e,n={media:Ue(t)};Ge(n,"id","guid",t),Ge(n,"title","title",t),Ge(n,"link","link",t),Ge(n,"description","description",t);const r=qe("pubDate",t)||qe("dc:date",t);return r&&(n.pubDate=new Date(r)),n})};Ge(i,"title","title",r),Ge(i,"link","link",r),Ge(i,"description","description",r);const o=qe("lastBuildDate",r);o&&(i.updated=new Date(o));return Ge(i,"author","managingEditor",r,!0),i}(t):null}!function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"}(De||(De={}));const ze=["url","type","lang"],Fe=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function Ue(e){return Re("media:content",e).map(e=>{const{attribs:t}=e,n={medium:t.medium,isDefault:!!t.isDefault};for(const e of ze)t[e]&&(n[e]=t[e]);for(const e of Fe)t[e]&&(n[e]=parseInt(t[e],10));return t.expression&&(n.expression=t.expression),n})}function Qe(e,t){return Re(e,t,!0,1)[0]}function qe(e,t,n=!1){return ie(Re(e,t,n,1)).trim()}function Ge(e,t,n,r,i=!1){const o=qe(n,r,i);o&&(e[t]=o)}function He(e){return"rss"===e||"feed"===e||"rdf:RDF"===e}var Ve,We=n(6),Xe=n.n(We);!function(e){e.Attribute="attribute",e.Pseudo="pseudo",e.PseudoElement="pseudo-element",e.Tag="tag",e.Universal="universal",e.Adjacent="adjacent",e.Child="child",e.Descendant="descendant",e.Parent="parent",e.Sibling="sibling",e.ColumnCombinator="column-combinator"}(Ve||(Ve={}));var Ye;!function(e){e.Any="any",e.Element="element",e.End="end",e.Equals="equals",e.Exists="exists",e.Hyphen="hyphen",e.Not="not",e.Start="start"}(Ye||(Ye={}));const Ze=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,Je=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,Ke=new Map([[126,Ye.Element],[94,Ye.Start],[36,Ye.End],[42,Ye.Any],[33,Ye.Not],[124,Ye.Hyphen]]),et=new Set(["has","not","matches","is","where","host","host-context"]);const tt=new Set(["contains","icontains"]);function nt(e,t,n){const r=parseInt(t,16)-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)}function rt(e){return e.replace(Je,nt)}function it(e){return 39===e||34===e}function ot(e){return 32===e||9===e||10===e||12===e||13===e}function st(e){const t=[],n=function e(t,n,r){let i=[];function o(e){const t=n.slice(r+e).match(Ze);if(!t)throw new Error("Expected name, found "+n.slice(r));const[i]=t;return r+=e+i.length,rt(i)}function s(e){for(r+=e;r<n.length&&ot(n.charCodeAt(r));)r++}function a(){const e=r+=1;let t=1;for(;t>0&&r<n.length;r++)40!==n.charCodeAt(r)||l(r)?41!==n.charCodeAt(r)||l(r)||t--:t++;if(t)throw new Error("Parenthesis not matched");return rt(n.slice(e,r-1))}function l(e){let t=0;for(;92===n.charCodeAt(--e);)t++;return 1==(1&t)}function c(){if(i.length>0&&function(e){switch(e.type){case Ve.Adjacent:case Ve.Child:case Ve.Descendant:case Ve.Parent:case Ve.Sibling:case Ve.ColumnCombinator:return!0;default:return!1}}(i[i.length-1]))throw new Error("Did not expect successive traversals.")}function u(e){i.length>0&&i[i.length-1].type===Ve.Descendant?i[i.length-1].type=e:(c(),i.push({type:e}))}function d(e,t){i.push({type:Ve.Attribute,name:e,action:t,value:o(1),namespace:null,ignoreCase:"quirks"})}function h(){if(i.length&&i[i.length-1].type===Ve.Descendant&&i.pop(),0===i.length)throw new Error("Empty sub-selector");t.push(i)}if(s(0),n.length===r)return r;e:for(;r<n.length;){const t=n.charCodeAt(r);switch(t){case 32:case 9:case 10:case 12:case 13:0!==i.length&&i[0].type===Ve.Descendant||(c(),i.push({type:Ve.Descendant})),s(1);break;case 62:u(Ve.Child),s(1);break;case 60:u(Ve.Parent),s(1);break;case 126:u(Ve.Sibling),s(1);break;case 43:u(Ve.Adjacent),s(1);break;case 46:d("class",Ye.Element);break;case 35:d("id",Ye.Equals);break;case 91:{let e;s(1);let t=null;124===n.charCodeAt(r)?e=o(1):n.startsWith("*|",r)?(t="*",e=o(2)):(e=o(0),124===n.charCodeAt(r)&&61!==n.charCodeAt(r+1)&&(t=e,e=o(1))),s(0);let a=Ye.Exists;const c=Ke.get(n.charCodeAt(r));if(c){if(a=c,61!==n.charCodeAt(r+1))throw new Error("Expected `=`");s(2)}else 61===n.charCodeAt(r)&&(a=Ye.Equals,s(1));let u="",d=null;if("exists"!==a){if(it(n.charCodeAt(r))){const e=n.charCodeAt(r);let t=r+1;for(;t<n.length&&(n.charCodeAt(t)!==e||l(t));)t+=1;if(n.charCodeAt(t)!==e)throw new Error("Attribute value didn't end");u=rt(n.slice(r+1,t)),r=t+1}else{const e=r;for(;r<n.length&&(!ot(n.charCodeAt(r))&&93!==n.charCodeAt(r)||l(r));)r+=1;u=rt(n.slice(e,r))}s(0);const e=32|n.charCodeAt(r);115===e?(d=!1,s(1)):105===e&&(d=!0,s(1))}if(93!==n.charCodeAt(r))throw new Error("Attribute selector didn't terminate");r+=1;const h={type:Ve.Attribute,name:e,action:a,value:u,namespace:t,ignoreCase:d};i.push(h);break}case 58:{if(58===n.charCodeAt(r+1)){i.push({type:Ve.PseudoElement,name:o(2).toLowerCase(),data:40===n.charCodeAt(r)?a():null});continue}const t=o(1).toLowerCase();let s=null;if(40===n.charCodeAt(r))if(et.has(t)){if(it(n.charCodeAt(r+1)))throw new Error(`Pseudo-selector ${t} cannot be quoted`);if(s=[],r=e(s,n,r+1),41!==n.charCodeAt(r))throw new Error(`Missing closing parenthesis in :${t} (${n})`);r+=1}else{if(s=a(),tt.has(t)){const e=s.charCodeAt(0);e===s.charCodeAt(s.length-1)&&it(e)&&(s=s.slice(1,-1))}s=rt(s)}i.push({type:Ve.Pseudo,name:t,data:s});break}case 44:h(),i=[],s(1);break;default:{if(n.startsWith("/*",r)){const e=n.indexOf("*/",r+2);if(e<0)throw new Error("Comment was not terminated");r=e+2,0===i.length&&s(0);break}let e,a=null;if(42===t)r+=1,e="*";else if(124===t){if(e="",124===n.charCodeAt(r+1)){u(Ve.ColumnCombinator),s(2);break}}else{if(!Ze.test(n.slice(r)))break e;e=o(0)}124===n.charCodeAt(r)&&124!==n.charCodeAt(r+1)&&(a=e,42===n.charCodeAt(r+1)?(e="*",r+=2):e=o(1)),i.push("*"===e?{type:Ve.Universal,namespace:a}:{type:Ve.Tag,name:e,namespace:a})}}}return h(),r}(t,""+e,0);if(n<e.length)throw new Error("Unmatched selector: "+e.slice(n));return t}const at=new Map([[Ve.Universal,50],[Ve.Tag,30],[Ve.Attribute,1],[Ve.Pseudo,0]]);function lt(e){return!at.has(e.type)}const ct=new Map([[Ye.Exists,10],[Ye.Equals,8],[Ye.Not,7],[Ye.Start,6],[Ye.End,6],[Ye.Any,5]]);function ut(e){const t=e.map(dt);for(let n=1;n<e.length;n++){const r=t[n];if(!(r<0))for(let i=n-1;i>=0&&r<t[i];i--){const n=e[i+1];e[i+1]=e[i],e[i]=n,t[i+1]=t[i],t[i]=r}}}function dt(e){var t,n;let r=null!==(t=at.get(e.type))&&void 0!==t?t:-1;return e.type===Ve.Attribute?(r=null!==(n=ct.get(e.action))&&void 0!==n?n:4,e.action===Ye.Equals&&"id"===e.name&&(r=9),e.ignoreCase&&(r>>=1)):e.type===Ve.Pseudo&&(e.data?"has"===e.name||"contains"===e.name?r=0:Array.isArray(e.data)?(r=Math.min(...e.data.map(e=>Math.min(...e.map(dt)))),r<0&&(r=0)):r=2:r=3),r}const ht=/[-[\]{}()*+?.,\\^$|#\s]/g;function pt(e){return e.replace(ht,"\\$&")}const ft=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function mt(e,t){return"boolean"==typeof e.ignoreCase?e.ignoreCase:"quirks"===e.ignoreCase?!!t.quirksMode:!t.xmlMode&&ft.has(e.name)}const gt={equals(e,t,n){const{adapter:r}=n,{name:i}=t;let{value:o}=t;return mt(t,n)?(o=o.toLowerCase(),t=>{const n=r.getAttributeValue(t,i);return null!=n&&n.length===o.length&&n.toLowerCase()===o&&e(t)}):t=>r.getAttributeValue(t,i)===o&&e(t)},hyphen(e,t,n){const{adapter:r}=n,{name:i}=t;let{value:o}=t;const s=o.length;return mt(t,n)?(o=o.toLowerCase(),function(t){const n=r.getAttributeValue(t,i);return null!=n&&(n.length===s||"-"===n.charAt(s))&&n.substr(0,s).toLowerCase()===o&&e(t)}):function(t){const n=r.getAttributeValue(t,i);return null!=n&&(n.length===s||"-"===n.charAt(s))&&n.substr(0,s)===o&&e(t)}},element(e,t,n){const{adapter:r}=n,{name:i,value:o}=t;if(/\s/.test(o))return Xe.a.falseFunc;const s=new RegExp(`(?:^|\\s)${pt(o)}(?:$|\\s)`,mt(t,n)?"i":"");return function(t){const n=r.getAttributeValue(t,i);return null!=n&&n.length>=o.length&&s.test(n)&&e(t)}},exists:(e,{name:t},{adapter:n})=>r=>n.hasAttrib(r,t)&&e(r),start(e,t,n){const{adapter:r}=n,{name:i}=t;let{value:o}=t;const s=o.length;return 0===s?Xe.a.falseFunc:mt(t,n)?(o=o.toLowerCase(),t=>{const n=r.getAttributeValue(t,i);return null!=n&&n.length>=s&&n.substr(0,s).toLowerCase()===o&&e(t)}):t=>{var n;return!!(null===(n=r.getAttributeValue(t,i))||void 0===n?void 0:n.startsWith(o))&&e(t)}},end(e,t,n){const{adapter:r}=n,{name:i}=t;let{value:o}=t;const s=-o.length;return 0===s?Xe.a.falseFunc:mt(t,n)?(o=o.toLowerCase(),t=>{var n;return(null===(n=r.getAttributeValue(t,i))||void 0===n?void 0:n.substr(s).toLowerCase())===o&&e(t)}):t=>{var n;return!!(null===(n=r.getAttributeValue(t,i))||void 0===n?void 0:n.endsWith(o))&&e(t)}},any(e,t,n){const{adapter:r}=n,{name:i,value:o}=t;if(""===o)return Xe.a.falseFunc;if(mt(t,n)){const t=new RegExp(pt(o),"i");return function(n){const s=r.getAttributeValue(n,i);return null!=s&&s.length>=o.length&&t.test(s)&&e(n)}}return t=>{var n;return!!(null===(n=r.getAttributeValue(t,i))||void 0===n?void 0:n.includes(o))&&e(t)}},not(e,t,n){const{adapter:r}=n,{name:i}=t;let{value:o}=t;return""===o?t=>!!r.getAttributeValue(t,i)&&e(t):mt(t,n)?(o=o.toLowerCase(),t=>{const n=r.getAttributeValue(t,i);return(null==n||n.length!==o.length||n.toLowerCase()!==o)&&e(t)}):t=>r.getAttributeValue(t,i)!==o&&e(t)}},bt=new Set([9,10,12,13,32]),vt="0".charCodeAt(0),yt="9".charCodeAt(0);function St(e){if("even"===(e=e.trim().toLowerCase()))return[2,0];if("odd"===e)return[2,1];let t=0,n=0,r=o(),i=s();if(t<e.length&&"n"===e.charAt(t)&&(t++,n=r*(null!=i?i:1),a(),t<e.length?(r=o(),a(),i=s()):r=i=0),null===i||t<e.length)throw new Error(`n-th rule couldn't be parsed ('${e}')`);return[n,r*i];function o(){return"-"===e.charAt(t)?(t++,-1):("+"===e.charAt(t)&&t++,1)}function s(){const n=t;let r=0;for(;t<e.length&&e.charCodeAt(t)>=vt&&e.charCodeAt(t)<=yt;)r=10*r+(e.charCodeAt(t)-vt),t++;return t===n?null:r}function a(){for(;t<e.length&&bt.has(e.charCodeAt(t));)t++}}function _t(e){return function(e){const t=e[0],n=e[1]-1;if(n<0&&t<=0)return Xe.a.falseFunc;if(-1===t)return e=>e<=n;if(0===t)return e=>e===n;if(1===t)return n<0?Xe.a.trueFunc:e=>e>=n;const r=Math.abs(t),i=(n%r+r)%r;return t>1?e=>e>=n&&e%r===i:e=>e<=n&&e%r===i}(St(e))}function xt(e,t){return n=>{const r=t.getParent(n);return null!=r&&t.isTag(r)&&e(n)}}const wt={contains:(e,t,{adapter:n})=>function(r){return e(r)&&n.getText(r).includes(t)},icontains(e,t,{adapter:n}){const r=t.toLowerCase();return function(t){return e(t)&&n.getText(t).toLowerCase().includes(r)}},"nth-child"(e,t,{adapter:n,equals:r}){const i=_t(t);return i===Xe.a.falseFunc?Xe.a.falseFunc:i===Xe.a.trueFunc?xt(e,n):function(t){const o=n.getSiblings(t);let s=0;for(let e=0;e<o.length&&!r(t,o[e]);e++)n.isTag(o[e])&&s++;return i(s)&&e(t)}},"nth-last-child"(e,t,{adapter:n,equals:r}){const i=_t(t);return i===Xe.a.falseFunc?Xe.a.falseFunc:i===Xe.a.trueFunc?xt(e,n):function(t){const o=n.getSiblings(t);let s=0;for(let e=o.length-1;e>=0&&!r(t,o[e]);e--)n.isTag(o[e])&&s++;return i(s)&&e(t)}},"nth-of-type"(e,t,{adapter:n,equals:r}){const i=_t(t);return i===Xe.a.falseFunc?Xe.a.falseFunc:i===Xe.a.trueFunc?xt(e,n):function(t){const o=n.getSiblings(t);let s=0;for(let e=0;e<o.length;e++){const i=o[e];if(r(t,i))break;n.isTag(i)&&n.getName(i)===n.getName(t)&&s++}return i(s)&&e(t)}},"nth-last-of-type"(e,t,{adapter:n,equals:r}){const i=_t(t);return i===Xe.a.falseFunc?Xe.a.falseFunc:i===Xe.a.trueFunc?xt(e,n):function(t){const o=n.getSiblings(t);let s=0;for(let e=o.length-1;e>=0;e--){const i=o[e];if(r(t,i))break;n.isTag(i)&&n.getName(i)===n.getName(t)&&s++}return i(s)&&e(t)}},root:(e,t,{adapter:n})=>t=>{const r=n.getParent(t);return(null==r||!n.isTag(r))&&e(t)},scope(e,t,n,r){const{equals:i}=n;return r&&0!==r.length?1===r.length?t=>i(r[0],t)&&e(t):t=>r.includes(t)&&e(t):wt.root(e,t,n)},hover:kt("isHovered"),visited:kt("isVisited"),active:kt("isActive")};function kt(e){return function(t,n,{adapter:r}){const i=r[e];return"function"!=typeof i?Xe.a.falseFunc:function(e){return i(e)&&t(e)}}}const Ot={empty:(e,{adapter:t})=>!t.getChildren(e).some(e=>t.isTag(e)||""!==t.getText(e)),"first-child"(e,{adapter:t,equals:n}){if(t.prevElementSibling)return null==t.prevElementSibling(e);const r=t.getSiblings(e).find(e=>t.isTag(e));return null!=r&&n(e,r)},"last-child"(e,{adapter:t,equals:n}){const r=t.getSiblings(e);for(let i=r.length-1;i>=0;i--){if(n(e,r[i]))return!0;if(t.isTag(r[i]))break}return!1},"first-of-type"(e,{adapter:t,equals:n}){const r=t.getSiblings(e),i=t.getName(e);for(let o=0;o<r.length;o++){const s=r[o];if(n(e,s))return!0;if(t.isTag(s)&&t.getName(s)===i)break}return!1},"last-of-type"(e,{adapter:t,equals:n}){const r=t.getSiblings(e),i=t.getName(e);for(let o=r.length-1;o>=0;o--){const s=r[o];if(n(e,s))return!0;if(t.isTag(s)&&t.getName(s)===i)break}return!1},"only-of-type"(e,{adapter:t,equals:n}){const r=t.getName(e);return t.getSiblings(e).every(i=>n(e,i)||!t.isTag(i)||t.getName(i)!==r)},"only-child":(e,{adapter:t,equals:n})=>t.getSiblings(e).every(r=>n(e,r)||!t.isTag(r))};function Et(e,t,n,r){if(null===n){if(e.length>r)throw new Error(`Pseudo-class :${t} requires an argument`)}else if(e.length===r)throw new Error(`Pseudo-class :${t} doesn't have any arguments`)}const At={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:":is(\n :is(button, input, select, textarea, optgroup, option)[disabled],\n optgroup[disabled] > option,\n fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)\n )",enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"},Tt={};function Ct(e,t){return e===Xe.a.falseFunc?Xe.a.falseFunc:n=>t.isTag(n)&&e(n)}function Mt(e,t){const n=t.getSiblings(e);if(n.length<=1)return[];const r=n.indexOf(e);return r<0||r===n.length-1?[]:n.slice(r+1).filter(t.isTag)}function $t(e){return{xmlMode:!!e.xmlMode,lowerCaseAttributeNames:!!e.lowerCaseAttributeNames,lowerCaseTags:!!e.lowerCaseTags,quirksMode:!!e.quirksMode,cacheResults:!!e.cacheResults,pseudos:e.pseudos,adapter:e.adapter,equals:e.equals}}const Pt=(e,t,n,r,i)=>{const o=i(t,$t(n),r);return o===Xe.a.trueFunc?e:o===Xe.a.falseFunc?Xe.a.falseFunc:t=>o(t)&&e(t)},Rt={is:Pt,matches:Pt,where:Pt,not(e,t,n,r,i){const o=i(t,$t(n),r);return o===Xe.a.falseFunc?e:o===Xe.a.trueFunc?Xe.a.falseFunc:t=>!o(t)&&e(t)},has(e,t,n,r,i){const{adapter:o}=n,s=$t(n);s.relativeSelector=!0;const a=t.some(e=>e.some(lt))?[Tt]:void 0,l=i(t,s,a);if(l===Xe.a.falseFunc)return Xe.a.falseFunc;const c=Ct(l,o);if(a&&l!==Xe.a.trueFunc){const{shouldTestNextSiblings:t=!1}=l;return n=>{if(!e(n))return!1;a[0]=n;const r=o.getChildren(n),i=t?[...r,...Mt(n,o)]:r;return o.existsOne(c,i)}}return t=>e(t)&&o.existsOne(c,o.getChildren(t))}};function jt(e,t){const n=t.getParent(e);return n&&t.isTag(n)?n:null}function Nt(e,t,n,r,i){const{adapter:o,equals:s}=n;switch(t.type){case Ve.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case Ve.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case Ve.Attribute:if(null!=t.namespace)throw new Error("Namespaced attributes are not yet supported by css-select");return n.xmlMode&&!n.lowerCaseAttributeNames||(t.name=t.name.toLowerCase()),gt[t.action](e,t,n);case Ve.Pseudo:return function(e,t,n,r,i){var o;const{name:s,data:a}=t;if(Array.isArray(a)){if(!(s in Rt))throw new Error(`Unknown pseudo-class :${s}(${a})`);return Rt[s](e,a,n,r,i)}const l=null===(o=n.pseudos)||void 0===o?void 0:o[s],c="string"==typeof l?l:At[s];if("string"==typeof c){if(null!=a)throw new Error(`Pseudo ${s} doesn't have any arguments`);const t=st(c);return Rt.is(e,t,n,r,i)}if("function"==typeof l)return Et(l,s,a,1),t=>l(t,a)&&e(t);if(s in wt)return wt[s](e,a,n,r);if(s in Ot){const t=Ot[s];return Et(t,s,a,2),r=>t(r,n,a)&&e(r)}throw new Error("Unknown pseudo-class :"+s)}(e,t,n,r,i);case Ve.Tag:{if(null!=t.namespace)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:r}=t;return n.xmlMode&&!n.lowerCaseTags||(r=r.toLowerCase()),function(t){return o.getName(t)===r&&e(t)}}case Ve.Descendant:{if(!1===n.cacheResults||"undefined"==typeof WeakSet)return function(t){let n=t;for(;n=jt(n,o);)if(e(n))return!0;return!1};const t=new WeakSet;return function(n){let r=n;for(;r=jt(r,o);)if(!t.has(r)){if(o.isTag(r)&&e(r))return!0;t.add(r)}return!1}}case"_flexibleDescendant":return function(t){let n=t;do{if(e(n))return!0}while(n=jt(n,o));return!1};case Ve.Parent:return function(t){return o.getChildren(t).some(t=>o.isTag(t)&&e(t))};case Ve.Child:return function(t){const n=o.getParent(t);return null!=n&&o.isTag(n)&&e(n)};case Ve.Sibling:return function(t){const n=o.getSiblings(t);for(let r=0;r<n.length;r++){const i=n[r];if(s(t,i))break;if(o.isTag(i)&&e(i))return!0}return!1};case Ve.Adjacent:return o.prevElementSibling?function(t){const n=o.prevElementSibling(t);return null!=n&&e(n)}:function(t){const n=o.getSiblings(t);let r;for(let e=0;e<n.length;e++){const i=n[e];if(s(t,i))break;o.isTag(i)&&(r=i)}return!!r&&e(r)};case Ve.Universal:if(null!=t.namespace&&"*"!==t.namespace)throw new Error("Namespaced universal selectors are not yet supported by css-select");return e}}function Dt(e,t,n){return Ct(It(e,t,n),t.adapter)}function It(e,t,n){return Ut("string"==typeof e?st(e):e,t,n)}function Lt(e){return e.type===Ve.Pseudo&&("scope"===e.name||Array.isArray(e.data)&&e.data.some(e=>e.some(Lt)))}const Bt={type:Ve.Descendant},zt={type:"_flexibleDescendant"},Ft={type:Ve.Pseudo,name:"scope",data:null};function Ut(e,t,n){var r;e.forEach(ut),n=null!==(r=t.context)&&void 0!==r?r:n;const i=Array.isArray(n),o=n&&(Array.isArray(n)?n:[n]);if(!1!==t.relativeSelector)!function(e,{adapter:t},n){const r=!!(null==n?void 0:n.every(e=>{const n=t.isTag(e)&&t.getParent(e);return e===Tt||n&&t.isTag(n)}));for(const t of e){if(t.length>0&<(t[0])&&t[0].type!==Ve.Descendant);else{if(!r||t.some(Lt))continue;t.unshift(Bt)}t.unshift(Ft)}}(e,t,o);else if(e.some(e=>e.length>0&<(e[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let s=!1;const a=e.map(e=>{if(e.length>=2){const[t,n]=e;t.type!==Ve.Pseudo||"scope"!==t.name||(i&&n.type===Ve.Descendant?e[1]=zt:n.type!==Ve.Adjacent&&n.type!==Ve.Sibling||(s=!0))}return function(e,t,n){var r;return e.reduce((e,r)=>e===Xe.a.falseFunc?Xe.a.falseFunc:Nt(e,r,t,n,Ut),null!==(r=t.rootFunc)&&void 0!==r?r:Xe.a.trueFunc)}(e,t,o)}).reduce(Qt,Xe.a.falseFunc);return a.shouldTestNextSiblings=s,a}function Qt(e,t){return t===Xe.a.falseFunc||e===Xe.a.trueFunc?e:e===Xe.a.falseFunc||t===Xe.a.trueFunc?t:function(n){return e(n)||t(n)}}const qt=(e,t)=>e===t,Gt={adapter:i,equals:qt};function Ht(e){var t,n,r,o;const s=null!=e?e:Gt;return null!==(t=s.adapter)&&void 0!==t||(s.adapter=i),null!==(n=s.equals)&&void 0!==n||(s.equals=null!==(o=null===(r=s.adapter)||void 0===r?void 0:r.equals)&&void 0!==o?o:qt),s}function Vt(e){return function(t,n,r){const i=Ht(n);return e(t,i,r)}}const Wt=Vt(Dt),Xt=Vt(It),Yt=Vt(Ut);function Zt(e){return function(t,n,r){const i=Ht(r);"function"!=typeof t&&(t=It(t,i,n));const o=Jt(n,i.adapter,t.shouldTestNextSiblings);return e(t,o,i)}}function Jt(e,t,n=!1){return n&&(e=function(e,t){const n=Array.isArray(e)?e.slice(0):[e],r=n.length;for(let e=0;e<r;e++){const r=Mt(n[e],t);n.push(...r)}return n}(e,t)),Array.isArray(e)?t.removeSubsets(e):t.getChildren(e)}const Kt=Zt((e,t,n)=>e!==Xe.a.falseFunc&&t&&0!==t.length?n.adapter.findAll(e,t):[]),en=Zt((e,t,n)=>e!==Xe.a.falseFunc&&t&&0!==t.length?n.adapter.findOne(e,t):null);function tn(e,t,n){const r=Ht(n);return("function"==typeof t?t:Dt(t,r))(e)}t.default=Kt},,,,,,,,,,function(e,t,n){"use strict";function r(e){let t=void 0,n=e[0],r=1;for(;r<e.length;){const i=e[r],o=e[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(t=n,n=o(n)):"call"!==i&&"optionalCall"!==i||(n=o((...e)=>n.call(t,...e)),t=void 0)}return n}n.d(t,"a",(function(){return r}))}]); |