reacthub-pixitweenjs 0.2.101 → 0.2.103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(re,mt){typeof exports=="object"&&typeof module<"u"?mt(exports,require("react"),require("@pixi/react"),require("pixi.js"),require("reacthub-react-bindings"),require("gsap"),require("@pixi/sound")):typeof define=="function"&&define.amd?define(["exports","react","@pixi/react","pixi.js","reacthub-react-bindings","gsap","@pixi/sound"],mt):(re=typeof globalThis<"u"?globalThis:re||self,mt(re["reacthub-pixitweenjs"]={},re.React,re.PIXIReact,re.PIXI,re.reacthubReactBindings,re.gsap,re.PIXI.sound))})(this,function(re,mt,le,oy,ay,_e,ly){"use strict";function uc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Et=uc(mt),zr=uc(oy);var Ye=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function En(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function uy(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var fc={exports:{}},$s={};/**
1
+ (function(re,mt){typeof exports=="object"&&typeof module<"u"?mt(exports,require("react"),require("@pixi/react"),require("pixi.js"),require("reacthub-react-bindings"),require("gsap"),require("@pixi/sound")):typeof define=="function"&&define.amd?define(["exports","react","@pixi/react","pixi.js","reacthub-react-bindings","gsap","@pixi/sound"],mt):(re=typeof globalThis<"u"?globalThis:re||self,mt(re["reacthub-pixitweenjs"]={},re.React,re.PIXIReact,re.PIXI,re.reacthubReactBindings,re.gsap,re.PIXI.sound))})(this,function(re,mt,le,oy,ay,_e,ly){"use strict";function uc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Et=uc(mt),zr=uc(oy);var Ye=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function En(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function uy(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var fc={exports:{}},Gs={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,18 +6,18 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var fy=mt,cy=Symbol.for("react.element"),hy=Symbol.for("react.fragment"),dy=Object.prototype.hasOwnProperty,py=fy.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,vy={key:!0,ref:!0,__self:!0,__source:!0};function cc(e,t,r){var n,i={},o=null,a=null;r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(n in t)dy.call(t,n)&&!vy.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:cy,type:e,key:o,ref:a,props:i,_owner:py.current}}$s.Fragment=hy,$s.jsx=cc,$s.jsxs=cc,fc.exports=$s;var Vt=fc.exports,Sn=(e=>(e.BlackAndWhite="BlackAndWhite",e.Sepia="Sepia",e.RetroVintage="RetroVintage",e.NightVision="NightVision",e.Normal="Normal",e.None="Normal",e))(Sn||{});let hc;function dc(){return hc=document.body,hc}function Ze(e,t,r){let n;return mt.useEffect(()=>{n=n||dc();const i=o=>{const a=o.detail;t(a)};return n.addEventListener(e,i,!1),()=>{n==null||n.removeEventListener(e,i,!1)}},r),i=>{n=i}}function ti(e,t){const r=dc(),n=new CustomEvent(e,{detail:t});r.dispatchEvent(n)}function gy(){let e;function t(r){e=r}return t.emit=function(r,n){const i=new CustomEvent(r,{bubbles:!0,detail:n});e==null||e.dispatchEvent(i)},t}const An=Et.createContext({}),Oe={STOP:"GSAP_STOP",PAUSE:"GSAP_PAUSE",PLAY:"GSAP_PLAY",RESUME:"GSAP_RESUME",RESTART:"GSAP_RESTART",REPEAT:"GSAP_REPEAT",SEEK:"GSAP_SEEK",RESET:"GSAP_RESET",COMPLETE:"GSAP_COMPLETE",SEEK_START:"GSAP_SEEK_START",SEEK_END:"GSAP_SEEK_END",SCRUBBER_SEEK:"GSAP_SCRUBBER_SEEK",SCRUBBER_PROGRESS_UPDATE:"GSAP_SCRUBBER_PROGRESS_UPDATE",SCRUBBER_PLAY:"GSAP_SCRUBBER_PLAY",SCRUBBER_PAUSE:"GSAP_SCRUBBER_PAUSE",TRANSFORMER_DRAG_START:"TRANSFORMER_DRAG_START",TRANSFORMER_DRAG_END:"TRANSFORMER_DRAG_END",REVERSE_MODE_START:"REVERSE_MODE_START",REVERSE_MODE_END:"REVERSE_MODE_END"},my=({children:e})=>{const[t,r]=mt.useState(0),n=mt.useRef(),i=mt.useRef(),o=mt.useRef(.001),a=mt.useRef(!1),u=mt.useRef(!1);mt.useLayoutEffect(()=>(i.current=_e.context(()=>{n.current&&n.current.progress(0).kill(),n.current&&n.current.clear(),n.current&&_e.killTweensOf(n.current),n.current=_e.timeline({paused:!0,defaults:{duration:0}})}),()=>{n.current&&(n.current.progress(0).kill(),_e.killTweensOf(n.current)),i.current.revert()}),[]);const f=mt.useCallback(()=>{if(n.current){let w=n.current.time();w<o.current?a.current=!0:a.current=!1,o.current=w}},[]);mt.useEffect(()=>{if(n.current){const m=n.current;m.eventCallback("onStart",function(){}).eventCallback("onInterrupt",function(){m.pause(),f()}).eventCallback("onUpdate",function(){f()}).eventCallback("onComplete",function(){m.pause(),m.revert(),ti(Oe.COMPLETE,{uniqueId:"timeline"}),console.log("Emitted events"),f()})}},[]);const h=mt.useCallback(()=>{n.current&&n.current.revert()},[]),d=mt.useCallback(()=>{n.current&&n.current.restart()},[]),p=mt.useCallback(()=>{if(n.current){const m=n.current;m.repeat(1),m.restart()}},[]),c=mt.useCallback(m=>{n.current&&n.current.seek(m)},[]),v=mt.useCallback(()=>{n.current&&n.current.seek(4)},[]),y=mt.useCallback(()=>{const m=n.current;return m?m.totalDuration():0},[]),b=()=>{n.current&&(n.current.pause(),ti(Oe.PAUSE))},_=()=>{n.current&&(n.current.resume(),ti(Oe.RESUME))};return Ze(Oe.SEEK_START,()=>{u.current=!0}),Ze(Oe.SCRUBBER_PLAY,()=>{_()}),Ze(Oe.SCRUBBER_PAUSE,()=>{b()}),Ze(Oe.SCRUBBER_SEEK,m=>{c(m)}),Ze(Oe.SEEK_END,()=>{u.current=!1}),Ze(Oe.REVERSE_MODE_START,()=>{a.current=!0}),Ze(Oe.REVERSE_MODE_END,()=>{a.current=!1}),Ze(Oe.SCRUBBER_PROGRESS_UPDATE,m=>{}),Vt.jsx(An.Provider,{value:{gsapCtx:i,tl:n,handlePlay:_,handlePause:b,handleReset:h,handleSeek:c,handleSeekTest:v,handleRestart:d,handleRepeat:p,playerTimeRef:o,getTimelineDuration:y,totalDuration:t,setTotalDuration:r,reverseModeRef:a,dragModeRef:u},children:e})},yy=({pixiTransformerRef:e,imageRef:t,isMounted:r,transformCommit:n,transformChange:i,mouseoverEvent:o,onDoubleClick:a,uniqueId:u="",isText:f=!1})=>{const h=zr.utils.string2hex("#F3C409"),d=zr.utils.string2hex("#F3C409"),p=Et.useRef({isDragging:!1}),c=300,v=Et.useRef(0),y=Et.useCallback(()=>{o&&!p.current.isDragging&&o(!0)},[o]),b=Et.useCallback(()=>{o&&!p.current.isDragging&&o(!1)},[o]),_=Et.useCallback(()=>{p.current.isDragging=!0;const T=new Date().getTime();T-v.current<c&&a&&a(),v.current=T},[]),m=Et.useCallback(T=>{p.current.isDragging=!0,i&&i(T),ti(Oe.TRANSFORMER_DRAG_START,{uniqueId:"timeline"})},[i]),w=Et.useCallback(()=>{if(t.current===null)return;const T=t.current.x,x=t.current.y,E=t.current.width,I=t.current.height,A=t.current.rotation,O=[t.current.scale.x,t.current.scale.y],L=O[0]<0?-1:1,R=O[1]<0?-1:1;n&&(n({uniqueId:u,transformation:{x:Math.round(T),y:Math.round(x),width:Math.round(Math.max(5,E)),height:Math.round(Math.max(5,I)),rotation:A,scale:f?O:[L,R]}}),ti(Oe.TRANSFORMER_DRAG_END,{uniqueId:"timeline"})),p.current.isDragging=!1},[n]);return Et.useEffect(()=>(e.current&&(e.current.on("mouseover",y),e.current.on("mouseout",b),e.current.on("mousedown",_)),()=>{e.current&&(e.current.off("mouseover",y),e.current.off("mouseout",b),e.current.off("mousedown",_))}),[]),Vt.jsx(ay.Transformer,{ref:e,group:r?[t.current]:[],rotateEnabled:!0,boxRotationEnabled:!0,centeredScaling:!0,boxScalingEnabled:!0,wireframeStyle:{thickness:2,color:d},lockAspectRatio:!0,scaleEnabled:!0,handleStyle:{outlineColor:h,shape:"circle",radius:10},transformchange:m,transformcommit:w})};var _y=Object.prototype;function by(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||_y;return e===r}var pc=by;function xy(e,t){return function(r){return e(t(r))}}var wy=xy,Ty=wy,Ey=Ty(Object.keys,Object),Sy=Ey,Ay=pc,Oy=Sy,Cy=Object.prototype,Ry=Cy.hasOwnProperty;function Iy(e){if(!Ay(e))return Oy(e);var t=[];for(var r in Object(e))Ry.call(e,r)&&r!="constructor"&&t.push(r);return t}var vc=Iy,Py=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,gc=Py,Ny=gc,My=typeof self=="object"&&self&&self.Object===Object&&self,ky=Ny||My||Function("return this")(),Mr=ky,Ly=Mr,Fy=Ly.Symbol,Gs=Fy,mc=Gs,yc=Object.prototype,By=yc.hasOwnProperty,Dy=yc.toString,Xi=mc?mc.toStringTag:void 0;function Uy(e){var t=By.call(e,Xi),r=e[Xi];try{e[Xi]=void 0;var n=!0}catch{}var i=Dy.call(e);return n&&(t?e[Xi]=r:delete e[Xi]),i}var $y=Uy,Gy=Object.prototype,jy=Gy.toString;function qy(e){return jy.call(e)}var zy=qy,_c=Gs,Hy=$y,Vy=zy,Wy="[object Null]",Xy="[object Undefined]",bc=_c?_c.toStringTag:void 0;function Ky(e){return e==null?e===void 0?Xy:Wy:bc&&bc in Object(e)?Hy(e):Vy(e)}var Ki=Ky;function Yy(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Yi=Yy,Zy=Ki,Qy=Yi,Jy="[object AsyncFunction]",t0="[object Function]",e0="[object GeneratorFunction]",r0="[object Proxy]";function n0(e){if(!Qy(e))return!1;var t=Zy(e);return t==t0||t==e0||t==Jy||t==r0}var xc=n0,i0=Mr,s0=i0["__core-js_shared__"],o0=s0,za=o0,wc=function(){var e=/[^.]+$/.exec(za&&za.keys&&za.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function a0(e){return!!wc&&wc in e}var l0=a0,u0=Function.prototype,f0=u0.toString;function c0(e){if(e!=null){try{return f0.call(e)}catch{}try{return e+""}catch{}}return""}var Tc=c0,h0=xc,d0=l0,p0=Yi,v0=Tc,g0=/[\\^$.*+?()[\]{}|]/g,m0=/^\[object .+?Constructor\]$/,y0=Function.prototype,_0=Object.prototype,b0=y0.toString,x0=_0.hasOwnProperty,w0=RegExp("^"+b0.call(x0).replace(g0,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function T0(e){if(!p0(e)||d0(e))return!1;var t=h0(e)?w0:m0;return t.test(v0(e))}var E0=T0;function S0(e,t){return e==null?void 0:e[t]}var A0=S0,O0=E0,C0=A0;function R0(e,t){var r=C0(e,t);return O0(r)?r:void 0}var ei=R0,I0=ei,P0=Mr,N0=I0(P0,"DataView"),M0=N0,k0=ei,L0=Mr,F0=k0(L0,"Map"),Ha=F0,B0=ei,D0=Mr,U0=B0(D0,"Promise"),$0=U0,G0=ei,j0=Mr,q0=G0(j0,"Set"),z0=q0,H0=ei,V0=Mr,W0=H0(V0,"WeakMap"),X0=W0,Va=M0,Wa=Ha,Xa=$0,Ka=z0,Ya=X0,Ec=Ki,ri=Tc,Sc="[object Map]",K0="[object Object]",Ac="[object Promise]",Oc="[object Set]",Cc="[object WeakMap]",Rc="[object DataView]",Y0=ri(Va),Z0=ri(Wa),Q0=ri(Xa),J0=ri(Ka),t1=ri(Ya),On=Ec;(Va&&On(new Va(new ArrayBuffer(1)))!=Rc||Wa&&On(new Wa)!=Sc||Xa&&On(Xa.resolve())!=Ac||Ka&&On(new Ka)!=Oc||Ya&&On(new Ya)!=Cc)&&(On=function(e){var t=Ec(e),r=t==K0?e.constructor:void 0,n=r?ri(r):"";if(n)switch(n){case Y0:return Rc;case Z0:return Sc;case Q0:return Ac;case J0:return Oc;case t1:return Cc}return t});var Ic=On;function e1(e){return e!=null&&typeof e=="object"}var Zi=e1,r1=Ki,n1=Zi,i1="[object Arguments]";function s1(e){return n1(e)&&r1(e)==i1}var o1=s1,Pc=o1,a1=Zi,Nc=Object.prototype,l1=Nc.hasOwnProperty,u1=Nc.propertyIsEnumerable,f1=Pc(function(){return arguments}())?Pc:function(e){return a1(e)&&l1.call(e,"callee")&&!u1.call(e,"callee")},Za=f1,c1=Array.isArray,kr=c1,h1=9007199254740991;function d1(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=h1}var Qa=d1,p1=xc,v1=Qa;function g1(e){return e!=null&&v1(e.length)&&!p1(e)}var js=g1,qs={exports:{}};function m1(){return!1}var y1=m1;qs.exports,function(e,t){var r=Mr,n=y1,i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===i,u=a?r.Buffer:void 0,f=u?u.isBuffer:void 0,h=f||n;e.exports=h}(qs,qs.exports);var Ja=qs.exports,_1=Ki,b1=Qa,x1=Zi,w1="[object Arguments]",T1="[object Array]",E1="[object Boolean]",S1="[object Date]",A1="[object Error]",O1="[object Function]",C1="[object Map]",R1="[object Number]",I1="[object Object]",P1="[object RegExp]",N1="[object Set]",M1="[object String]",k1="[object WeakMap]",L1="[object ArrayBuffer]",F1="[object DataView]",B1="[object Float32Array]",D1="[object Float64Array]",U1="[object Int8Array]",$1="[object Int16Array]",G1="[object Int32Array]",j1="[object Uint8Array]",q1="[object Uint8ClampedArray]",z1="[object Uint16Array]",H1="[object Uint32Array]",ue={};ue[B1]=ue[D1]=ue[U1]=ue[$1]=ue[G1]=ue[j1]=ue[q1]=ue[z1]=ue[H1]=!0,ue[w1]=ue[T1]=ue[L1]=ue[E1]=ue[F1]=ue[S1]=ue[A1]=ue[O1]=ue[C1]=ue[R1]=ue[I1]=ue[P1]=ue[N1]=ue[M1]=ue[k1]=!1;function V1(e){return x1(e)&&b1(e.length)&&!!ue[_1(e)]}var W1=V1;function X1(e){return function(t){return e(t)}}var K1=X1,zs={exports:{}};zs.exports,function(e,t){var r=gc,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,a=o&&r.process,u=function(){try{var f=i&&i.require&&i.require("util").types;return f||a&&a.binding&&a.binding("util")}catch{}}();e.exports=u}(zs,zs.exports);var Y1=zs.exports,Z1=W1,Q1=K1,Mc=Y1,kc=Mc&&Mc.isTypedArray,J1=kc?Q1(kc):Z1,tl=J1,t_=vc,e_=Ic,r_=Za,n_=kr,i_=js,s_=Ja,o_=pc,a_=tl,l_="[object Map]",u_="[object Set]",f_=Object.prototype,c_=f_.hasOwnProperty;function h_(e){if(e==null)return!0;if(i_(e)&&(n_(e)||typeof e=="string"||typeof e.splice=="function"||s_(e)||a_(e)||r_(e)))return!e.length;var t=e_(e);if(t==l_||t==u_)return!e.size;if(o_(e))return!t_(e).length;for(var r in e)if(c_.call(e,r))return!1;return!0}var d_=h_;const el=En(d_);var rl=(e=>(e.NONE="none",e.NORMAL="normal",e.LENSFLARE="lensflare",e.FILMSTRIP="filmstrip",e.GRUNGE="grunge",e.BRICKS="bricks",e))(rl||{});const Lc={normal:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/eyecast_lensflare_overlay_50.jpg",blendmode:"ADD",alpha:0},lensflare:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/eyecast_lensflare_overlay_50.jpg",blendmode:"ADD",alpha:1},filmstrip:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/frames_filmstrip_5.png",blendmode:"ADD",alpha:1},grunge:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/pixi_overlay_grunge_60.jpg",blendmode:"ADD",alpha:1},bricks:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/bricks_Overlay_100.jpg",blendmode:"MULTIPLY",alpha:1}},p_=e=>{const{overlay:t,width:r,height:n,x:i,y:o}=e,{src:a,blendmode:u}=Lc[t]||Lc.normal;return Vt.jsx(le.TilingSprite,{image:a,width:r,height:n,x:i,y:o,tilePosition:{x:0,y:0},tileScale:.5,alpha:.5,anchor:.5})},v_=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],ni=Et.forwardRef((e,t)=>{const[r,n]=Et.useState(!1),[i,o]=mt.useState(!1),[a,u]=mt.useState(!1),f=mt.useRef(null),h=mt.useRef(null),d=mt.useRef(null),p=mt.useRef(null),{uniqueId:c,transformation:{x:v,y,width:b,height:_,scale:m=[1,1],rotation:w=0,effect:T,overlay:x},applyTransformer:E,disabled:I,pointerdown:A,pointerout:O,pointerover:L,isText:R,isDragging:C,isGif:P,onDoubleClick:M,isTextEditMode:F}=e;Ze(Oe.COMPLETE,()=>{f.current}),Et.useImperativeHandle(t,()=>({getIsTransformerDragging:()=>i,getIsMouseOverTransformer:()=>a}),[i,a]),Et.useEffect(()=>{f.current&&n(!0)},[]);const q=Et.useCallback(()=>{u(!0),L&&L()},[]),Z=Et.useCallback(()=>{o(!0)},[]),z=Et.useCallback(V=>{e.onAnchorTransformationEnd&&e.onAnchorTransformationEnd(V),o(!1)},[]),nt=le.withFilters(le.Container,{matrix:zr.filters.ColorMatrixFilter});return Vt.jsxs(le.Container,{ref:h,children:[Vt.jsxs(le.Container,{ref:f,position:[v,y],pivot:[v,y],width:b,height:_,scale:m,rotation:w,...!I&&!i&&!C&&{interactive:!0,buttonMode:!0,pointerdown:A,pointerover:L,pointerout:O},children:[!P&&Vt.jsx(nt,{scale:1,apply:({matrix:V})=>{T===Sn.BlackAndWhite?V.desaturate():T===Sn.Sepia?V.sepia():T===Sn.RetroVintage||T===Sn.NightVision?V.negative():T===Sn.Normal&&V.reset()},matrix:{enabled:!0,matrix:v_},children:Vt.jsx(le.Container,{ref:d,children:e.children})}),P&&Vt.jsx(le.Container,{ref:d,children:e.children}),!el(x)&&x!==rl.NONE&&x!==rl.NORMAL&&Vt.jsx(p_,{overlay:x,width:b,height:_,x:v,y})]}),E&&!F&&Vt.jsx(yy,{pixiTransformerRef:p,imageRef:f,isMounted:r,transformCommit:z,transformChange:Z,mouseoverEvent:q,uniqueId:c,isText:R,onDoubleClick:M})]})});ni.whyDidYouRender={logOnDifferentValues:!0,customName:"AbstractContainer"};var Cn=(e=>(e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2",e))(Cn||{}),Fc=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS",e))(Fc||{}),nl=(e=>(e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL",e))(nl||{}),Rt=(e=>(e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e[e.NORMAL_NPM=17]="NORMAL_NPM",e[e.ADD_NPM=18]="ADD_NPM",e[e.SCREEN_NPM=19]="SCREEN_NPM",e[e.NONE=20]="NONE",e[e.SRC_OVER=0]="SRC_OVER",e[e.SRC_IN=21]="SRC_IN",e[e.SRC_OUT=22]="SRC_OUT",e[e.SRC_ATOP=23]="SRC_ATOP",e[e.DST_OVER=24]="DST_OVER",e[e.DST_IN=25]="DST_IN",e[e.DST_OUT=26]="DST_OUT",e[e.DST_ATOP=27]="DST_ATOP",e[e.ERASE=26]="ERASE",e[e.SUBTRACT=28]="SUBTRACT",e[e.XOR=29]="XOR",e))(Rt||{}),an=(e=>(e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN",e))(an||{}),_t=(e=>(e[e.RGBA=6408]="RGBA",e[e.RGB=6407]="RGB",e[e.RG=33319]="RG",e[e.RED=6403]="RED",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.ALPHA=6406]="ALPHA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e))(_t||{}),ii=(e=>(e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",e))(ii||{}),Xt=(e=>(e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.BYTE=5120]="BYTE",e[e.SHORT=5122]="SHORT",e[e.INT=5124]="INT",e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",e[e.HALF_FLOAT=36193]="HALF_FLOAT",e))(Xt||{}),il=(e=>(e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT",e))(il||{}),Lr=(e=>(e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR",e))(Lr||{}),Qi=(e=>(e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",e))(Qi||{}),Rn=(e=>(e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL",e))(Rn||{}),ln=(e=>(e[e.NPM=0]="NPM",e[e.UNPACK=1]="UNPACK",e[e.PMA=2]="PMA",e[e.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",e[e.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",e[e.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",e))(ln||{}),In=(e=>(e[e.NO=0]="NO",e[e.YES=1]="YES",e[e.AUTO=2]="AUTO",e[e.BLEND=0]="BLEND",e[e.CLEAR=1]="CLEAR",e[e.BLIT=2]="BLIT",e))(In||{}),sl=(e=>(e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL",e))(sl||{}),ar=(e=>(e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp",e))(ar||{}),Ee=(e=>(e[e.NONE=0]="NONE",e[e.SCISSOR=1]="SCISSOR",e[e.STENCIL=2]="STENCIL",e[e.SPRITE=3]="SPRITE",e[e.COLOR=4]="COLOR",e))(Ee||{}),Te=(e=>(e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH",e))(Te||{}),Fr=(e=>(e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",e))(Fr||{});const Dt={ADAPTER:{createCanvas:(e,t)=>{const r=document.createElement("canvas");return r.width=e,r.height=t,r},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(e,t)=>fetch(e,t),parseXML:e=>new DOMParser().parseFromString(e,"text/xml")},RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var ol=/iPhone/i,Bc=/iPod/i,Dc=/iPad/i,Uc=/\biOS-universal(?:.+)Mac\b/i,al=/\bAndroid(?:.+)Mobile\b/i,$c=/Android/i,si=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Hs=/Silk/i,Hr=/Windows Phone/i,Gc=/\bWindows(?:.+)ARM\b/i,jc=/BlackBerry/i,qc=/BB10/i,zc=/Opera Mini/i,Hc=/\b(CriOS|Chrome)(?:.+)Mobile/i,Vc=/Mobile(?:.+)Firefox\b/i,Wc=function(e){return typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof MSStream>"u"};function g_(e){return function(t){return t.test(e)}}function Xc(e){var t={userAgent:"",platform:"",maxTouchPoints:0};!e&&typeof navigator<"u"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e=="string"?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});var r=t.userAgent,n=r.split("[FBAN");typeof n[1]<"u"&&(r=n[0]),n=r.split("Twitter"),typeof n[1]<"u"&&(r=n[0]);var i=g_(r),o={apple:{phone:i(ol)&&!i(Hr),ipod:i(Bc),tablet:!i(ol)&&(i(Dc)||Wc(t))&&!i(Hr),universal:i(Uc),device:(i(ol)||i(Bc)||i(Dc)||i(Uc)||Wc(t))&&!i(Hr)},amazon:{phone:i(si),tablet:!i(si)&&i(Hs),device:i(si)||i(Hs)},android:{phone:!i(Hr)&&i(si)||!i(Hr)&&i(al),tablet:!i(Hr)&&!i(si)&&!i(al)&&(i(Hs)||i($c)),device:!i(Hr)&&(i(si)||i(Hs)||i(al)||i($c))||i(/\bokhttp\b/i)},windows:{phone:i(Hr),tablet:i(Gc),device:i(Hr)||i(Gc)},other:{blackberry:i(jc),blackberry10:i(qc),opera:i(zc),firefox:i(Vc),chrome:i(Hc),device:i(jc)||i(qc)||i(zc)||i(Vc)||i(Hc)},any:!1,phone:!1,tablet:!1};return o.any=o.apple.device||o.android.device||o.windows.device||o.other.device,o.phone=o.apple.phone||o.android.phone||o.windows.phone,o.tablet=o.apple.tablet||o.android.tablet||o.windows.tablet,o}const oi=(Xc.default??Xc)(globalThis.navigator);Dt.RETINA_PREFIX=/@([0-9\.]+)x/,Dt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var Kc={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(f,h,d){this.fn=f,this.context=h,this.once=d||!1}function o(f,h,d,p,c){if(typeof d!="function")throw new TypeError("The listener must be a function");var v=new i(d,p||f,c),y=r?r+h:h;return f._events[y]?f._events[y].fn?f._events[y]=[f._events[y],v]:f._events[y].push(v):(f._events[y]=v,f._eventsCount++),f}function a(f,h){--f._eventsCount===0?f._events=new n:delete f._events[h]}function u(){this._events=new n,this._eventsCount=0}u.prototype.eventNames=function(){var h=[],d,p;if(this._eventsCount===0)return h;for(p in d=this._events)t.call(d,p)&&h.push(r?p.slice(1):p);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(d)):h},u.prototype.listeners=function(h){var d=r?r+h:h,p=this._events[d];if(!p)return[];if(p.fn)return[p.fn];for(var c=0,v=p.length,y=new Array(v);c<v;c++)y[c]=p[c].fn;return y},u.prototype.listenerCount=function(h){var d=r?r+h:h,p=this._events[d];return p?p.fn?1:p.length:0},u.prototype.emit=function(h,d,p,c,v,y){var b=r?r+h:h;if(!this._events[b])return!1;var _=this._events[b],m=arguments.length,w,T;if(_.fn){switch(_.once&&this.removeListener(h,_.fn,void 0,!0),m){case 1:return _.fn.call(_.context),!0;case 2:return _.fn.call(_.context,d),!0;case 3:return _.fn.call(_.context,d,p),!0;case 4:return _.fn.call(_.context,d,p,c),!0;case 5:return _.fn.call(_.context,d,p,c,v),!0;case 6:return _.fn.call(_.context,d,p,c,v,y),!0}for(T=1,w=new Array(m-1);T<m;T++)w[T-1]=arguments[T];_.fn.apply(_.context,w)}else{var x=_.length,E;for(T=0;T<x;T++)switch(_[T].once&&this.removeListener(h,_[T].fn,void 0,!0),m){case 1:_[T].fn.call(_[T].context);break;case 2:_[T].fn.call(_[T].context,d);break;case 3:_[T].fn.call(_[T].context,d,p);break;case 4:_[T].fn.call(_[T].context,d,p,c);break;default:if(!w)for(E=1,w=new Array(m-1);E<m;E++)w[E-1]=arguments[E];_[T].fn.apply(_[T].context,w)}}return!0},u.prototype.on=function(h,d,p){return o(this,h,d,p,!1)},u.prototype.once=function(h,d,p){return o(this,h,d,p,!0)},u.prototype.removeListener=function(h,d,p,c){var v=r?r+h:h;if(!this._events[v])return this;if(!d)return a(this,v),this;var y=this._events[v];if(y.fn)y.fn===d&&(!c||y.once)&&(!p||y.context===p)&&a(this,v);else{for(var b=0,_=[],m=y.length;b<m;b++)(y[b].fn!==d||c&&!y[b].once||p&&y[b].context!==p)&&_.push(y[b]);_.length?this._events[v]=_.length===1?_[0]:_:a(this,v)}return this},u.prototype.removeAllListeners=function(h){var d;return h?(d=r?r+h:h,this._events[d]&&a(this,d)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=r,u.EventEmitter=u,e.exports=u})(Kc);var m_=Kc.exports;const Vs=En(m_);var ll={exports:{}};ll.exports=Ws,ll.exports.default=Ws;function Ws(e,t,r){r=r||2;var n=t&&t.length,i=n?t[0]*r:e.length,o=Yc(e,0,i,r,!0),a=[];if(!o||o.next===o.prev)return a;var u,f,h,d,p,c,v;if(n&&(o=w_(e,t,o,r)),e.length>80*r){u=h=e[0],f=d=e[1];for(var y=r;y<i;y+=r)p=e[y],c=e[y+1],p<u&&(u=p),c<f&&(f=c),p>h&&(h=p),c>d&&(d=c);v=Math.max(h-u,d-f),v=v!==0?32767/v:0}return Ji(o,a,r,u,f,v,0),a}function Yc(e,t,r,n,i){var o,a;if(i===cl(e,t,r,n)>0)for(o=t;o<r;o+=n)a=Jc(o,e[o],e[o+1],a);else for(o=r-n;o>=t;o-=n)a=Jc(o,e[o],e[o+1],a);return a&&Xs(a,a.next)&&(es(a),a=a.next),a}function Pn(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(Xs(r,r.next)||pe(r.prev,r,r.next)===0)){if(es(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function Ji(e,t,r,n,i,o,a){if(e){!a&&o&&O_(e,n,i,o);for(var u=e,f,h;e.prev!==e.next;){if(f=e.prev,h=e.next,o?__(e,n,i,o):y_(e)){t.push(f.i/r|0),t.push(e.i/r|0),t.push(h.i/r|0),es(e),e=h.next,u=h.next;continue}if(e=h,e===u){a?a===1?(e=b_(Pn(e),t,r),Ji(e,t,r,n,i,o,2)):a===2&&x_(e,t,r,n,i,o):Ji(Pn(e),t,r,n,i,o,1);break}}}}function y_(e){var t=e.prev,r=e,n=e.next;if(pe(t,r,n)>=0)return!1;for(var i=t.x,o=r.x,a=n.x,u=t.y,f=r.y,h=n.y,d=i<o?i<a?i:a:o<a?o:a,p=u<f?u<h?u:h:f<h?f:h,c=i>o?i>a?i:a:o>a?o:a,v=u>f?u>h?u:h:f>h?f:h,y=n.next;y!==t;){if(y.x>=d&&y.x<=c&&y.y>=p&&y.y<=v&&ai(i,u,o,f,a,h,y.x,y.y)&&pe(y.prev,y,y.next)>=0)return!1;y=y.next}return!0}function __(e,t,r,n){var i=e.prev,o=e,a=e.next;if(pe(i,o,a)>=0)return!1;for(var u=i.x,f=o.x,h=a.x,d=i.y,p=o.y,c=a.y,v=u<f?u<h?u:h:f<h?f:h,y=d<p?d<c?d:c:p<c?p:c,b=u>f?u>h?u:h:f>h?f:h,_=d>p?d>c?d:c:p>c?p:c,m=ul(v,y,t,r,n),w=ul(b,_,t,r,n),T=e.prevZ,x=e.nextZ;T&&T.z>=m&&x&&x.z<=w;){if(T.x>=v&&T.x<=b&&T.y>=y&&T.y<=_&&T!==i&&T!==a&&ai(u,d,f,p,h,c,T.x,T.y)&&pe(T.prev,T,T.next)>=0||(T=T.prevZ,x.x>=v&&x.x<=b&&x.y>=y&&x.y<=_&&x!==i&&x!==a&&ai(u,d,f,p,h,c,x.x,x.y)&&pe(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;T&&T.z>=m;){if(T.x>=v&&T.x<=b&&T.y>=y&&T.y<=_&&T!==i&&T!==a&&ai(u,d,f,p,h,c,T.x,T.y)&&pe(T.prev,T,T.next)>=0)return!1;T=T.prevZ}for(;x&&x.z<=w;){if(x.x>=v&&x.x<=b&&x.y>=y&&x.y<=_&&x!==i&&x!==a&&ai(u,d,f,p,h,c,x.x,x.y)&&pe(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function b_(e,t,r){var n=e;do{var i=n.prev,o=n.next.next;!Xs(i,o)&&Zc(i,n,n.next,o)&&ts(i,o)&&ts(o,i)&&(t.push(i.i/r|0),t.push(n.i/r|0),t.push(o.i/r|0),es(n),es(n.next),n=e=o),n=n.next}while(n!==e);return Pn(n)}function x_(e,t,r,n,i,o){var a=e;do{for(var u=a.next.next;u!==a.prev;){if(a.i!==u.i&&I_(a,u)){var f=Qc(a,u);a=Pn(a,a.next),f=Pn(f,f.next),Ji(a,t,r,n,i,o,0),Ji(f,t,r,n,i,o,0);return}u=u.next}a=a.next}while(a!==e)}function w_(e,t,r,n){var i=[],o,a,u,f,h;for(o=0,a=t.length;o<a;o++)u=t[o]*n,f=o<a-1?t[o+1]*n:e.length,h=Yc(e,u,f,n,!1),h===h.next&&(h.steiner=!0),i.push(R_(h));for(i.sort(T_),o=0;o<i.length;o++)r=E_(i[o],r);return r}function T_(e,t){return e.x-t.x}function E_(e,t){var r=S_(e,t);if(!r)return t;var n=Qc(r,e);return Pn(n,n.next),Pn(r,r.next)}function S_(e,t){var r=t,n=e.x,i=e.y,o=-1/0,a;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var u=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(u<=n&&u>o&&(o=u,a=r.x<r.next.x?r:r.next,u===n))return a}r=r.next}while(r!==t);if(!a)return null;var f=a,h=a.x,d=a.y,p=1/0,c;r=a;do n>=r.x&&r.x>=h&&n!==r.x&&ai(i<d?n:o,i,h,d,i<d?o:n,i,r.x,r.y)&&(c=Math.abs(i-r.y)/(n-r.x),ts(r,e)&&(c<p||c===p&&(r.x>a.x||r.x===a.x&&A_(a,r)))&&(a=r,p=c)),r=r.next;while(r!==f);return a}function A_(e,t){return pe(e.prev,e,t.prev)<0&&pe(t.next,e,e.next)<0}function O_(e,t,r,n){var i=e;do i.z===0&&(i.z=ul(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,C_(i)}function C_(e){var t,r,n,i,o,a,u,f,h=1;do{for(r=e,e=null,o=null,a=0;r;){for(a++,n=r,u=0,t=0;t<h&&(u++,n=n.nextZ,!!n);t++);for(f=h;u>0||f>0&&n;)u!==0&&(f===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,u--):(i=n,n=n.nextZ,f--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;r=n}o.nextZ=null,h*=2}while(a>1);return e}function ul(e,t,r,n,i){return e=(e-r)*i|0,t=(t-n)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function R_(e){var t=e,r=e;do(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next;while(t!==e);return r}function ai(e,t,r,n,i,o,a,u){return(i-a)*(t-u)>=(e-a)*(o-u)&&(e-a)*(n-u)>=(r-a)*(t-u)&&(r-a)*(o-u)>=(i-a)*(n-u)}function I_(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!P_(e,t)&&(ts(e,t)&&ts(t,e)&&N_(e,t)&&(pe(e.prev,e,t.prev)||pe(e,t.prev,t))||Xs(e,t)&&pe(e.prev,e,e.next)>0&&pe(t.prev,t,t.next)>0)}function pe(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function Xs(e,t){return e.x===t.x&&e.y===t.y}function Zc(e,t,r,n){var i=Ys(pe(e,t,r)),o=Ys(pe(e,t,n)),a=Ys(pe(r,n,e)),u=Ys(pe(r,n,t));return!!(i!==o&&a!==u||i===0&&Ks(e,r,t)||o===0&&Ks(e,n,t)||a===0&&Ks(r,e,n)||u===0&&Ks(r,t,n))}function Ks(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function Ys(e){return e>0?1:e<0?-1:0}function P_(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&Zc(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function ts(e,t){return pe(e.prev,e,e.next)<0?pe(e,t,e.next)>=0&&pe(e,e.prev,t)>=0:pe(e,t,e.prev)<0||pe(e,e.next,t)<0}function N_(e,t){var r=e,n=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do r.y>o!=r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==e);return n}function Qc(e,t){var r=new fl(e.i,e.x,e.y),n=new fl(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function Jc(e,t,r,n){var i=new fl(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function es(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 fl(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}Ws.deviation=function(e,t,r,n){var i=t&&t.length,o=i?t[0]*r:e.length,a=Math.abs(cl(e,0,o,r));if(i)for(var u=0,f=t.length;u<f;u++){var h=t[u]*r,d=u<f-1?t[u+1]*r:e.length;a-=Math.abs(cl(e,h,d,r))}var p=0;for(u=0;u<n.length;u+=3){var c=n[u]*r,v=n[u+1]*r,y=n[u+2]*r;p+=Math.abs((e[c]-e[y])*(e[v+1]-e[c+1])-(e[c]-e[v])*(e[y+1]-e[c+1]))}return a===0&&p===0?0:Math.abs((p-a)/a)};function cl(e,t,r,n){for(var i=0,o=t,a=r-n;o<r;o+=n)i+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return i}Ws.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},n=0,i=0;i<e.length;i++){for(var o=0;o<e[i].length;o++)for(var a=0;a<t;a++)r.vertices.push(e[i][o][a]);i>0&&(n+=e[i-1].length,r.holes.push(n))}return r};var M_=ll.exports;const k_=En(M_);var Zs={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */Zs.exports,function(e,t){(function(r){var n=t&&!t.nodeType&&t,i=e&&!e.nodeType&&e,o=typeof Ye=="object"&&Ye;(o.global===o||o.window===o||o.self===o)&&(r=o);var a,u=2147483647,f=36,h=1,d=26,p=38,c=700,v=72,y=128,b="-",_=/^xn--/,m=/[^\x20-\x7E]/,w=/[\x2E\u3002\uFF0E\uFF61]/g,T={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=f-h,E=Math.floor,I=String.fromCharCode,A;function O(U){throw new RangeError(T[U])}function L(U,k){for(var j=U.length,G=[];j--;)G[j]=k(U[j]);return G}function R(U,k){var j=U.split("@"),G="";j.length>1&&(G=j[0]+"@",U=j[1]),U=U.replace(w,".");var X=U.split("."),Y=L(X,k).join(".");return G+Y}function C(U){for(var k=[],j=0,G=U.length,X,Y;j<G;)X=U.charCodeAt(j++),X>=55296&&X<=56319&&j<G?(Y=U.charCodeAt(j++),(Y&64512)==56320?k.push(((X&1023)<<10)+(Y&1023)+65536):(k.push(X),j--)):k.push(X);return k}function P(U){return L(U,function(k){var j="";return k>65535&&(k-=65536,j+=I(k>>>10&1023|55296),k=56320|k&1023),j+=I(k),j}).join("")}function M(U){return U-48<10?U-22:U-65<26?U-65:U-97<26?U-97:f}function F(U,k){return U+22+75*(U<26)-((k!=0)<<5)}function q(U,k,j){var G=0;for(U=j?E(U/c):U>>1,U+=E(U/k);U>x*d>>1;G+=f)U=E(U/x);return E(G+(x+1)*U/(U+p))}function Z(U){var k=[],j=U.length,G,X=0,Y=y,$=v,W,et,J,it,lt,pt,yt,xt,At;for(W=U.lastIndexOf(b),W<0&&(W=0),et=0;et<W;++et)U.charCodeAt(et)>=128&&O("not-basic"),k.push(U.charCodeAt(et));for(J=W>0?W+1:0;J<j;){for(it=X,lt=1,pt=f;J>=j&&O("invalid-input"),yt=M(U.charCodeAt(J++)),(yt>=f||yt>E((u-X)/lt))&&O("overflow"),X+=yt*lt,xt=pt<=$?h:pt>=$+d?d:pt-$,!(yt<xt);pt+=f)At=f-xt,lt>E(u/At)&&O("overflow"),lt*=At;G=k.length+1,$=q(X-it,G,it==0),E(X/G)>u-Y&&O("overflow"),Y+=E(X/G),X%=G,k.splice(X++,0,Y)}return P(k)}function z(U){var k,j,G,X,Y,$,W,et,J,it,lt,pt=[],yt,xt,At,oe;for(U=C(U),yt=U.length,k=y,j=0,Y=v,$=0;$<yt;++$)lt=U[$],lt<128&&pt.push(I(lt));for(G=X=pt.length,X&&pt.push(b);G<yt;){for(W=u,$=0;$<yt;++$)lt=U[$],lt>=k&&lt<W&&(W=lt);for(xt=G+1,W-k>E((u-j)/xt)&&O("overflow"),j+=(W-k)*xt,k=W,$=0;$<yt;++$)if(lt=U[$],lt<k&&++j>u&&O("overflow"),lt==k){for(et=j,J=f;it=J<=Y?h:J>=Y+d?d:J-Y,!(et<it);J+=f)oe=et-it,At=f-it,pt.push(I(F(it+oe%At,0))),et=E(oe/At);pt.push(I(F(et,0))),Y=q(j,xt,G==X),j=0,++G}++j,++k}return pt.join("")}function nt(U){return R(U,function(k){return _.test(k)?Z(k.slice(4).toLowerCase()):k})}function V(U){return R(U,function(k){return m.test(k)?"xn--"+z(k):k})}if(a={version:"1.4.1",ucs2:{decode:C,encode:P},decode:Z,encode:z,toASCII:V,toUnicode:nt},n&&i)if(e.exports==n)i.exports=a;else for(A in a)a.hasOwnProperty(A)&&(n[A]=a[A]);else r.punycode=a})(Ye)}(Zs,Zs.exports);var L_=Zs.exports,F_=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,r);if(a.value!==i||a.enumerable!==!0)return!1}return!0},th=typeof Symbol<"u"&&Symbol,B_=F_,D_=function(){return typeof th!="function"||typeof Symbol!="function"||typeof th("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:B_()},eh={foo:{}},U_=Object,$_=function(){return{__proto__:eh}.foo===eh.foo&&!({__proto__:null}instanceof U_)},G_="Function.prototype.bind called on incompatible ",hl=Array.prototype.slice,j_=Object.prototype.toString,q_="[object Function]",z_=function(t){var r=this;if(typeof r!="function"||j_.call(r)!==q_)throw new TypeError(G_+r);for(var n=hl.call(arguments,1),i,o=function(){if(this instanceof i){var d=r.apply(this,n.concat(hl.call(arguments)));return Object(d)===d?d:this}else return r.apply(t,n.concat(hl.call(arguments)))},a=Math.max(0,r.length-n.length),u=[],f=0;f<a;f++)u.push("$"+f);if(i=Function("binder","return function ("+u.join(",")+"){ return binder.apply(this,arguments); }")(o),r.prototype){var h=function(){};h.prototype=r.prototype,i.prototype=new h,h.prototype=null}return i},H_=z_,dl=Function.prototype.bind||H_,V_=dl,W_=V_.call(Function.call,Object.prototype.hasOwnProperty),$t,li=SyntaxError,rh=Function,ui=TypeError,pl=function(e){try{return rh('"use strict"; return ('+e+").constructor;")()}catch{}},Nn=Object.getOwnPropertyDescriptor;if(Nn)try{Nn({},"")}catch{Nn=null}var vl=function(){throw new ui},X_=Nn?function(){try{return arguments.callee,vl}catch{try{return Nn(arguments,"callee").get}catch{return vl}}}():vl,fi=D_(),K_=$_(),Ce=Object.getPrototypeOf||(K_?function(e){return e.__proto__}:null),ci={},Y_=typeof Uint8Array>"u"||!Ce?$t:Ce(Uint8Array),Mn={"%AggregateError%":typeof AggregateError>"u"?$t:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?$t:ArrayBuffer,"%ArrayIteratorPrototype%":fi&&Ce?Ce([][Symbol.iterator]()):$t,"%AsyncFromSyncIteratorPrototype%":$t,"%AsyncFunction%":ci,"%AsyncGenerator%":ci,"%AsyncGeneratorFunction%":ci,"%AsyncIteratorPrototype%":ci,"%Atomics%":typeof Atomics>"u"?$t:Atomics,"%BigInt%":typeof BigInt>"u"?$t:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?$t:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?$t:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?$t:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?$t:Float32Array,"%Float64Array%":typeof Float64Array>"u"?$t:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?$t:FinalizationRegistry,"%Function%":rh,"%GeneratorFunction%":ci,"%Int8Array%":typeof Int8Array>"u"?$t:Int8Array,"%Int16Array%":typeof Int16Array>"u"?$t:Int16Array,"%Int32Array%":typeof Int32Array>"u"?$t:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":fi&&Ce?Ce(Ce([][Symbol.iterator]())):$t,"%JSON%":typeof JSON=="object"?JSON:$t,"%Map%":typeof Map>"u"?$t:Map,"%MapIteratorPrototype%":typeof Map>"u"||!fi||!Ce?$t:Ce(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?$t:Promise,"%Proxy%":typeof Proxy>"u"?$t:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?$t:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?$t:Set,"%SetIteratorPrototype%":typeof Set>"u"||!fi||!Ce?$t:Ce(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?$t:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":fi&&Ce?Ce(""[Symbol.iterator]()):$t,"%Symbol%":fi?Symbol:$t,"%SyntaxError%":li,"%ThrowTypeError%":X_,"%TypedArray%":Y_,"%TypeError%":ui,"%Uint8Array%":typeof Uint8Array>"u"?$t:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?$t:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?$t:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?$t:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?$t:WeakMap,"%WeakRef%":typeof WeakRef>"u"?$t:WeakRef,"%WeakSet%":typeof WeakSet>"u"?$t:WeakSet};if(Ce)try{null.error}catch(e){var Z_=Ce(Ce(e));Mn["%Error.prototype%"]=Z_}var Q_=function e(t){var r;if(t==="%AsyncFunction%")r=pl("async function () {}");else if(t==="%GeneratorFunction%")r=pl("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=pl("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Ce&&(r=Ce(i.prototype))}return Mn[t]=r,r},nh={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},rs=dl,Qs=W_,J_=rs.call(Function.call,Array.prototype.concat),tb=rs.call(Function.apply,Array.prototype.splice),ih=rs.call(Function.call,String.prototype.replace),Js=rs.call(Function.call,String.prototype.slice),eb=rs.call(Function.call,RegExp.prototype.exec),rb=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,nb=/\\(\\)?/g,ib=function(t){var r=Js(t,0,1),n=Js(t,-1);if(r==="%"&&n!=="%")throw new li("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new li("invalid intrinsic syntax, expected opening `%`");var i=[];return ih(t,rb,function(o,a,u,f){i[i.length]=u?ih(f,nb,"$1"):a||o}),i},sb=function(t,r){var n=t,i;if(Qs(nh,n)&&(i=nh[n],n="%"+i[0]+"%"),Qs(Mn,n)){var o=Mn[n];if(o===ci&&(o=Q_(n)),typeof o>"u"&&!r)throw new ui("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new li("intrinsic "+t+" does not exist!")},gl=function(t,r){if(typeof t!="string"||t.length===0)throw new ui("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new ui('"allowMissing" argument must be a boolean');if(eb(/^%?[^%]*%?$/,t)===null)throw new li("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=ib(t),i=n.length>0?n[0]:"",o=sb("%"+i+"%",r),a=o.name,u=o.value,f=!1,h=o.alias;h&&(i=h[0],tb(n,J_([0,1],h)));for(var d=1,p=!0;d<n.length;d+=1){var c=n[d],v=Js(c,0,1),y=Js(c,-1);if((v==='"'||v==="'"||v==="`"||y==='"'||y==="'"||y==="`")&&v!==y)throw new li("property names with quotes must have matching quotes");if((c==="constructor"||!p)&&(f=!0),i+="."+c,a="%"+i+"%",Qs(Mn,a))u=Mn[a];else if(u!=null){if(!(c in u)){if(!r)throw new ui("base intrinsic for "+t+" exists, but the property is not available.");return}if(Nn&&d+1>=n.length){var b=Nn(u,c);p=!!b,p&&"get"in b&&!("originalValue"in b.get)?u=b.get:u=u[c]}else p=Qs(u,c),u=u[c];p&&!f&&(Mn[a]=u)}}return u},sh={exports:{}};(function(e){var t=dl,r=gl,n=r("%Function.prototype.apply%"),i=r("%Function.prototype.call%"),o=r("%Reflect.apply%",!0)||t.call(i,n),a=r("%Object.getOwnPropertyDescriptor%",!0),u=r("%Object.defineProperty%",!0),f=r("%Math.max%");if(u)try{u({},"a",{value:1})}catch{u=null}e.exports=function(p){var c=o(t,i,arguments);if(a&&u){var v=a(c,"length");v.configurable&&u(c,"length",{value:1+f(0,p.length-(arguments.length-1))})}return c};var h=function(){return o(t,n,arguments)};u?u(e.exports,"apply",{value:h}):e.exports.apply=h})(sh);var ob=sh.exports,oh=gl,ah=ob,ab=ah(oh("String.prototype.indexOf")),lb=function(t,r){var n=oh(t,!!r);return typeof n=="function"&&ab(t,".prototype.")>-1?ah(n):n};const ub=uy(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var ml=typeof Map=="function"&&Map.prototype,yl=Object.getOwnPropertyDescriptor&&ml?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,to=ml&&yl&&typeof yl.get=="function"?yl.get:null,lh=ml&&Map.prototype.forEach,_l=typeof Set=="function"&&Set.prototype,bl=Object.getOwnPropertyDescriptor&&_l?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,eo=_l&&bl&&typeof bl.get=="function"?bl.get:null,uh=_l&&Set.prototype.forEach,fb=typeof WeakMap=="function"&&WeakMap.prototype,ns=fb?WeakMap.prototype.has:null,cb=typeof WeakSet=="function"&&WeakSet.prototype,is=cb?WeakSet.prototype.has:null,hb=typeof WeakRef=="function"&&WeakRef.prototype,fh=hb?WeakRef.prototype.deref:null,db=Boolean.prototype.valueOf,pb=Object.prototype.toString,vb=Function.prototype.toString,gb=String.prototype.match,xl=String.prototype.slice,un=String.prototype.replace,mb=String.prototype.toUpperCase,ch=String.prototype.toLowerCase,hh=RegExp.prototype.test,dh=Array.prototype.concat,Br=Array.prototype.join,yb=Array.prototype.slice,ph=Math.floor,wl=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Tl=Object.getOwnPropertySymbols,El=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,hi=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Le=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===hi||"symbol")?Symbol.toStringTag:null,vh=Object.prototype.propertyIsEnumerable,gh=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function mh(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||hh.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-ph(-e):ph(e);if(n!==e){var i=String(n),o=xl.call(t,i.length+1);return un.call(i,r,"$&_")+"."+un.call(un.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return un.call(t,r,"$&_")}var Sl=ub,yh=Sl.custom,_h=wh(yh)?yh:null,_b=function e(t,r,n,i){var o=r||{};if(fn(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(fn(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=fn(o,"customInspect")?o.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(fn(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(fn(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var u=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Eh(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var f=String(t);return u?mh(t,f):f}if(typeof t=="bigint"){var h=String(t)+"n";return u?mh(t,h):h}var d=typeof o.depth>"u"?5:o.depth;if(typeof n>"u"&&(n=0),n>=d&&d>0&&typeof t=="object")return Al(t)?"[Array]":"[Object]";var p=Bb(o,n);if(typeof i>"u")i=[];else if(Th(i,t)>=0)return"[Circular]";function c(M,F,q){if(F&&(i=yb.call(i),i.push(F)),q){var Z={depth:o.depth};return fn(o,"quoteStyle")&&(Z.quoteStyle=o.quoteStyle),e(M,Z,n+1,i)}return e(M,o,n+1,i)}if(typeof t=="function"&&!xh(t)){var v=Cb(t),y=ro(t,c);return"[Function"+(v?": "+v:" (anonymous)")+"]"+(y.length>0?" { "+Br.call(y,", ")+" }":"")}if(wh(t)){var b=hi?un.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):El.call(t);return typeof t=="object"&&!hi?ss(b):b}if(kb(t)){for(var _="<"+ch.call(String(t.nodeName)),m=t.attributes||[],w=0;w<m.length;w++)_+=" "+m[w].name+"="+bh(bb(m[w].value),"double",o);return _+=">",t.childNodes&&t.childNodes.length&&(_+="..."),_+="</"+ch.call(String(t.nodeName))+">",_}if(Al(t)){if(t.length===0)return"[]";var T=ro(t,c);return p&&!Fb(T)?"["+Cl(T,p)+"]":"[ "+Br.call(T,", ")+" ]"}if(wb(t)){var x=ro(t,c);return!("cause"in Error.prototype)&&"cause"in t&&!vh.call(t,"cause")?"{ ["+String(t)+"] "+Br.call(dh.call("[cause]: "+c(t.cause),x),", ")+" }":x.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Br.call(x,", ")+" }"}if(typeof t=="object"&&a){if(_h&&typeof t[_h]=="function"&&Sl)return Sl(t,{depth:d-n});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Rb(t)){var E=[];return lh&&lh.call(t,function(M,F){E.push(c(F,t,!0)+" => "+c(M,t))}),Sh("Map",to.call(t),E,p)}if(Nb(t)){var I=[];return uh&&uh.call(t,function(M){I.push(c(M,t))}),Sh("Set",eo.call(t),I,p)}if(Ib(t))return Ol("WeakMap");if(Mb(t))return Ol("WeakSet");if(Pb(t))return Ol("WeakRef");if(Eb(t))return ss(c(Number(t)));if(Ab(t))return ss(c(wl.call(t)));if(Sb(t))return ss(db.call(t));if(Tb(t))return ss(c(String(t)));if(!xb(t)&&!xh(t)){var A=ro(t,c),O=gh?gh(t)===Object.prototype:t instanceof Object||t.constructor===Object,L=t instanceof Object?"":"null prototype",R=!O&&Le&&Object(t)===t&&Le in t?xl.call(cn(t),8,-1):L?"Object":"",C=O||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",P=C+(R||L?"["+Br.call(dh.call([],R||[],L||[]),": ")+"] ":"");return A.length===0?P+"{}":p?P+"{"+Cl(A,p)+"}":P+"{ "+Br.call(A,", ")+" }"}return String(t)};function bh(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function bb(e){return un.call(String(e),/"/g,"&quot;")}function Al(e){return cn(e)==="[object Array]"&&(!Le||!(typeof e=="object"&&Le in e))}function xb(e){return cn(e)==="[object Date]"&&(!Le||!(typeof e=="object"&&Le in e))}function xh(e){return cn(e)==="[object RegExp]"&&(!Le||!(typeof e=="object"&&Le in e))}function wb(e){return cn(e)==="[object Error]"&&(!Le||!(typeof e=="object"&&Le in e))}function Tb(e){return cn(e)==="[object String]"&&(!Le||!(typeof e=="object"&&Le in e))}function Eb(e){return cn(e)==="[object Number]"&&(!Le||!(typeof e=="object"&&Le in e))}function Sb(e){return cn(e)==="[object Boolean]"&&(!Le||!(typeof e=="object"&&Le in e))}function wh(e){if(hi)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!El)return!1;try{return El.call(e),!0}catch{}return!1}function Ab(e){if(!e||typeof e!="object"||!wl)return!1;try{return wl.call(e),!0}catch{}return!1}var Ob=Object.prototype.hasOwnProperty||function(e){return e in this};function fn(e,t){return Ob.call(e,t)}function cn(e){return pb.call(e)}function Cb(e){if(e.name)return e.name;var t=gb.call(vb.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Th(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function Rb(e){if(!to||!e||typeof e!="object")return!1;try{to.call(e);try{eo.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function Ib(e){if(!ns||!e||typeof e!="object")return!1;try{ns.call(e,ns);try{is.call(e,is)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function Pb(e){if(!fh||!e||typeof e!="object")return!1;try{return fh.call(e),!0}catch{}return!1}function Nb(e){if(!eo||!e||typeof e!="object")return!1;try{eo.call(e);try{to.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function Mb(e){if(!is||!e||typeof e!="object")return!1;try{is.call(e,is);try{ns.call(e,ns)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function kb(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Eh(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Eh(xl.call(e,0,t.maxStringLength),t)+n}var i=un.call(un.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Lb);return bh(i,"single",t)}function Lb(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+mb.call(t.toString(16))}function ss(e){return"Object("+e+")"}function Ol(e){return e+" { ? }"}function Sh(e,t,r,n){var i=n?Cl(r,n):Br.call(r,", ");return e+" ("+t+") {"+i+"}"}function Fb(e){for(var t=0;t<e.length;t++)if(Th(e[t],`
10
- `)>=0)return!1;return!0}function Bb(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=Br.call(Array(e.indent+1)," ");else return null;return{base:r,prev:Br.call(Array(t+1),r)}}function Cl(e,t){if(e.length===0)return"";var r=`
9
+ */var fy=mt,cy=Symbol.for("react.element"),hy=Symbol.for("react.fragment"),dy=Object.prototype.hasOwnProperty,py=fy.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,vy={key:!0,ref:!0,__self:!0,__source:!0};function cc(e,t,r){var n,i={},o=null,a=null;r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(n in t)dy.call(t,n)&&!vy.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:cy,type:e,key:o,ref:a,props:i,_owner:py.current}}Gs.Fragment=hy,Gs.jsx=cc,Gs.jsxs=cc,fc.exports=Gs;var Vt=fc.exports,Sn=(e=>(e.BlackAndWhite="BlackAndWhite",e.Sepia="Sepia",e.RetroVintage="RetroVintage",e.NightVision="NightVision",e.Normal="Normal",e.None="Normal",e))(Sn||{});let hc;function dc(){return hc=document.body,hc}function Ze(e,t,r){let n;return mt.useEffect(()=>{n=n||dc();const i=o=>{const a=o.detail;t(a)};return n.addEventListener(e,i,!1),()=>{n==null||n.removeEventListener(e,i,!1)}},r),i=>{n=i}}function ti(e,t){const r=dc(),n=new CustomEvent(e,{detail:t});r.dispatchEvent(n)}function gy(){let e;function t(r){e=r}return t.emit=function(r,n){const i=new CustomEvent(r,{bubbles:!0,detail:n});e==null||e.dispatchEvent(i)},t}const An=Et.createContext({}),Oe={STOP:"GSAP_STOP",PAUSE:"GSAP_PAUSE",PLAY:"GSAP_PLAY",RESUME:"GSAP_RESUME",RESTART:"GSAP_RESTART",REPEAT:"GSAP_REPEAT",SEEK:"GSAP_SEEK",RESET:"GSAP_RESET",COMPLETE:"GSAP_COMPLETE",SEEK_START:"GSAP_SEEK_START",SEEK_END:"GSAP_SEEK_END",SCRUBBER_SEEK:"GSAP_SCRUBBER_SEEK",SCRUBBER_PROGRESS_UPDATE:"GSAP_SCRUBBER_PROGRESS_UPDATE",SCRUBBER_PLAY:"GSAP_SCRUBBER_PLAY",SCRUBBER_PAUSE:"GSAP_SCRUBBER_PAUSE",TRANSFORMER_DRAG_START:"TRANSFORMER_DRAG_START",TRANSFORMER_DRAG_END:"TRANSFORMER_DRAG_END",REVERSE_MODE_START:"REVERSE_MODE_START",REVERSE_MODE_END:"REVERSE_MODE_END"},my=({children:e})=>{const[t,r]=mt.useState(0),n=mt.useRef(),i=mt.useRef(),o=mt.useRef(.001),a=mt.useRef(!1),u=mt.useRef(!1);mt.useLayoutEffect(()=>(i.current=_e.context(()=>{n.current&&n.current.progress(0).kill(),n.current&&n.current.clear(),n.current&&_e.killTweensOf(n.current),n.current=_e.timeline({paused:!0,defaults:{duration:0}})}),()=>{n.current&&(n.current.progress(0).kill(),_e.killTweensOf(n.current)),i.current.revert()}),[]);const f=mt.useCallback(()=>{if(n.current){let w=n.current.time();w<o.current?a.current=!0:a.current=!1,o.current=w}},[]);mt.useEffect(()=>{if(n.current){const m=n.current;m.eventCallback("onStart",function(){}).eventCallback("onInterrupt",function(){m.pause(),f()}).eventCallback("onUpdate",function(){f()}).eventCallback("onComplete",function(){m.pause(),m.revert(),ti(Oe.COMPLETE,{uniqueId:"timeline"}),console.log("Emitted events"),f()})}},[]);const h=mt.useCallback(()=>{n.current&&n.current.revert()},[]),d=mt.useCallback(()=>{n.current&&n.current.restart()},[]),p=mt.useCallback(()=>{if(n.current){const m=n.current;m.repeat(1),m.restart()}},[]),c=mt.useCallback(m=>{n.current&&n.current.seek(m)},[]),v=mt.useCallback(()=>{n.current&&n.current.seek(4)},[]),y=mt.useCallback(()=>{const m=n.current;return m?m.totalDuration():0},[]),_=()=>{n.current&&(n.current.pause(),ti(Oe.PAUSE))},b=()=>{n.current&&(n.current.resume(),ti(Oe.RESUME))};return Ze(Oe.SEEK_START,()=>{u.current=!0}),Ze(Oe.SCRUBBER_PLAY,()=>{b()}),Ze(Oe.SCRUBBER_PAUSE,()=>{_()}),Ze(Oe.SCRUBBER_SEEK,m=>{c(m)}),Ze(Oe.SEEK_END,()=>{u.current=!1}),Ze(Oe.REVERSE_MODE_START,()=>{a.current=!0}),Ze(Oe.REVERSE_MODE_END,()=>{a.current=!1}),Ze(Oe.SCRUBBER_PROGRESS_UPDATE,m=>{}),Vt.jsx(An.Provider,{value:{gsapCtx:i,tl:n,handlePlay:b,handlePause:_,handleReset:h,handleSeek:c,handleSeekTest:v,handleRestart:d,handleRepeat:p,playerTimeRef:o,getTimelineDuration:y,totalDuration:t,setTotalDuration:r,reverseModeRef:a,dragModeRef:u},children:e})},yy=({pixiTransformerRef:e,imageRef:t,isMounted:r,transformCommit:n,transformChange:i,mouseoverEvent:o,onDoubleClick:a,uniqueId:u="",isText:f=!1})=>{const h=zr.utils.string2hex("#F3C409"),d=zr.utils.string2hex("#F3C409"),p=Et.useRef({isDragging:!1}),c=300,v=Et.useRef(0),y=Et.useCallback(()=>{o&&!p.current.isDragging&&o(!0)},[o]),_=Et.useCallback(()=>{o&&!p.current.isDragging&&o(!1)},[o]),b=Et.useCallback(()=>{p.current.isDragging=!0;const T=new Date().getTime();T-v.current<c&&a&&a(),v.current=T},[]),m=Et.useCallback(T=>{p.current.isDragging=!0,i&&i(T),ti(Oe.TRANSFORMER_DRAG_START,{uniqueId:"timeline"})},[i]),w=Et.useCallback(()=>{if(t.current===null)return;const T=t.current.x,x=t.current.y,E=t.current.width,I=t.current.height,O=t.current.rotation,A=[t.current.scale.x,t.current.scale.y],L=A[0]<0?-1:1,R=A[1]<0?-1:1;n&&(n({uniqueId:u,transformation:{x:Math.round(T),y:Math.round(x),width:Math.round(Math.max(5,E)),height:Math.round(Math.max(5,I)),rotation:O,scale:f?A:[L,R]}}),ti(Oe.TRANSFORMER_DRAG_END,{uniqueId:"timeline"})),p.current.isDragging=!1},[n]);return Et.useEffect(()=>(e.current&&(e.current.on("mouseover",y),e.current.on("mouseout",_),e.current.on("mousedown",b)),()=>{e.current&&(e.current.off("mouseover",y),e.current.off("mouseout",_),e.current.off("mousedown",b))}),[]),Vt.jsx(ay.Transformer,{ref:e,group:r?[t.current]:[],rotateEnabled:!0,boxRotationEnabled:!0,centeredScaling:!0,boxScalingEnabled:!0,wireframeStyle:{thickness:2,color:d},lockAspectRatio:!0,scaleEnabled:!0,handleStyle:{outlineColor:h,shape:"circle",radius:10},transformchange:m,transformcommit:w})};var _y=Object.prototype;function by(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||_y;return e===r}var pc=by;function xy(e,t){return function(r){return e(t(r))}}var wy=xy,Ty=wy,Ey=Ty(Object.keys,Object),Sy=Ey,Ay=pc,Oy=Sy,Cy=Object.prototype,Ry=Cy.hasOwnProperty;function Iy(e){if(!Ay(e))return Oy(e);var t=[];for(var r in Object(e))Ry.call(e,r)&&r!="constructor"&&t.push(r);return t}var vc=Iy,Py=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,gc=Py,Ny=gc,My=typeof self=="object"&&self&&self.Object===Object&&self,ky=Ny||My||Function("return this")(),Mr=ky,Ly=Mr,Fy=Ly.Symbol,js=Fy,mc=js,yc=Object.prototype,By=yc.hasOwnProperty,Dy=yc.toString,Ki=mc?mc.toStringTag:void 0;function Uy(e){var t=By.call(e,Ki),r=e[Ki];try{e[Ki]=void 0;var n=!0}catch{}var i=Dy.call(e);return n&&(t?e[Ki]=r:delete e[Ki]),i}var $y=Uy,Gy=Object.prototype,jy=Gy.toString;function qy(e){return jy.call(e)}var zy=qy,_c=js,Hy=$y,Vy=zy,Wy="[object Null]",Xy="[object Undefined]",bc=_c?_c.toStringTag:void 0;function Ky(e){return e==null?e===void 0?Xy:Wy:bc&&bc in Object(e)?Hy(e):Vy(e)}var Yi=Ky;function Yy(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Zi=Yy,Zy=Yi,Qy=Zi,Jy="[object AsyncFunction]",t0="[object Function]",e0="[object GeneratorFunction]",r0="[object Proxy]";function n0(e){if(!Qy(e))return!1;var t=Zy(e);return t==t0||t==e0||t==Jy||t==r0}var xc=n0,i0=Mr,s0=i0["__core-js_shared__"],o0=s0,Ha=o0,wc=function(){var e=/[^.]+$/.exec(Ha&&Ha.keys&&Ha.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function a0(e){return!!wc&&wc in e}var l0=a0,u0=Function.prototype,f0=u0.toString;function c0(e){if(e!=null){try{return f0.call(e)}catch{}try{return e+""}catch{}}return""}var Tc=c0,h0=xc,d0=l0,p0=Zi,v0=Tc,g0=/[\\^$.*+?()[\]{}|]/g,m0=/^\[object .+?Constructor\]$/,y0=Function.prototype,_0=Object.prototype,b0=y0.toString,x0=_0.hasOwnProperty,w0=RegExp("^"+b0.call(x0).replace(g0,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function T0(e){if(!p0(e)||d0(e))return!1;var t=h0(e)?w0:m0;return t.test(v0(e))}var E0=T0;function S0(e,t){return e==null?void 0:e[t]}var A0=S0,O0=E0,C0=A0;function R0(e,t){var r=C0(e,t);return O0(r)?r:void 0}var ei=R0,I0=ei,P0=Mr,N0=I0(P0,"DataView"),M0=N0,k0=ei,L0=Mr,F0=k0(L0,"Map"),Va=F0,B0=ei,D0=Mr,U0=B0(D0,"Promise"),$0=U0,G0=ei,j0=Mr,q0=G0(j0,"Set"),z0=q0,H0=ei,V0=Mr,W0=H0(V0,"WeakMap"),X0=W0,Wa=M0,Xa=Va,Ka=$0,Ya=z0,Za=X0,Ec=Yi,ri=Tc,Sc="[object Map]",K0="[object Object]",Ac="[object Promise]",Oc="[object Set]",Cc="[object WeakMap]",Rc="[object DataView]",Y0=ri(Wa),Z0=ri(Xa),Q0=ri(Ka),J0=ri(Ya),t1=ri(Za),On=Ec;(Wa&&On(new Wa(new ArrayBuffer(1)))!=Rc||Xa&&On(new Xa)!=Sc||Ka&&On(Ka.resolve())!=Ac||Ya&&On(new Ya)!=Oc||Za&&On(new Za)!=Cc)&&(On=function(e){var t=Ec(e),r=t==K0?e.constructor:void 0,n=r?ri(r):"";if(n)switch(n){case Y0:return Rc;case Z0:return Sc;case Q0:return Ac;case J0:return Oc;case t1:return Cc}return t});var Ic=On;function e1(e){return e!=null&&typeof e=="object"}var Qi=e1,r1=Yi,n1=Qi,i1="[object Arguments]";function s1(e){return n1(e)&&r1(e)==i1}var o1=s1,Pc=o1,a1=Qi,Nc=Object.prototype,l1=Nc.hasOwnProperty,u1=Nc.propertyIsEnumerable,f1=Pc(function(){return arguments}())?Pc:function(e){return a1(e)&&l1.call(e,"callee")&&!u1.call(e,"callee")},Qa=f1,c1=Array.isArray,kr=c1,h1=9007199254740991;function d1(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=h1}var Ja=d1,p1=xc,v1=Ja;function g1(e){return e!=null&&v1(e.length)&&!p1(e)}var qs=g1,zs={exports:{}};function m1(){return!1}var y1=m1;zs.exports,function(e,t){var r=Mr,n=y1,i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===i,u=a?r.Buffer:void 0,f=u?u.isBuffer:void 0,h=f||n;e.exports=h}(zs,zs.exports);var tl=zs.exports,_1=Yi,b1=Ja,x1=Qi,w1="[object Arguments]",T1="[object Array]",E1="[object Boolean]",S1="[object Date]",A1="[object Error]",O1="[object Function]",C1="[object Map]",R1="[object Number]",I1="[object Object]",P1="[object RegExp]",N1="[object Set]",M1="[object String]",k1="[object WeakMap]",L1="[object ArrayBuffer]",F1="[object DataView]",B1="[object Float32Array]",D1="[object Float64Array]",U1="[object Int8Array]",$1="[object Int16Array]",G1="[object Int32Array]",j1="[object Uint8Array]",q1="[object Uint8ClampedArray]",z1="[object Uint16Array]",H1="[object Uint32Array]",ue={};ue[B1]=ue[D1]=ue[U1]=ue[$1]=ue[G1]=ue[j1]=ue[q1]=ue[z1]=ue[H1]=!0,ue[w1]=ue[T1]=ue[L1]=ue[E1]=ue[F1]=ue[S1]=ue[A1]=ue[O1]=ue[C1]=ue[R1]=ue[I1]=ue[P1]=ue[N1]=ue[M1]=ue[k1]=!1;function V1(e){return x1(e)&&b1(e.length)&&!!ue[_1(e)]}var W1=V1;function X1(e){return function(t){return e(t)}}var K1=X1,Hs={exports:{}};Hs.exports,function(e,t){var r=gc,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,a=o&&r.process,u=function(){try{var f=i&&i.require&&i.require("util").types;return f||a&&a.binding&&a.binding("util")}catch{}}();e.exports=u}(Hs,Hs.exports);var Y1=Hs.exports,Z1=W1,Q1=K1,Mc=Y1,kc=Mc&&Mc.isTypedArray,J1=kc?Q1(kc):Z1,el=J1,t_=vc,e_=Ic,r_=Qa,n_=kr,i_=qs,s_=tl,o_=pc,a_=el,l_="[object Map]",u_="[object Set]",f_=Object.prototype,c_=f_.hasOwnProperty;function h_(e){if(e==null)return!0;if(i_(e)&&(n_(e)||typeof e=="string"||typeof e.splice=="function"||s_(e)||a_(e)||r_(e)))return!e.length;var t=e_(e);if(t==l_||t==u_)return!e.size;if(o_(e))return!t_(e).length;for(var r in e)if(c_.call(e,r))return!1;return!0}var d_=h_;const rl=En(d_);var nl=(e=>(e.NONE="none",e.NORMAL="normal",e.LENSFLARE="lensflare",e.FILMSTRIP="filmstrip",e.GRUNGE="grunge",e.BRICKS="bricks",e))(nl||{});const Lc={normal:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/eyecast_lensflare_overlay_50.jpg",blendmode:"ADD",alpha:0},lensflare:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/eyecast_lensflare_overlay_50.jpg",blendmode:"ADD",alpha:1},filmstrip:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/frames_filmstrip_5.png",blendmode:"ADD",alpha:1},grunge:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/pixi_overlay_grunge_60.jpg",blendmode:"ADD",alpha:1},bricks:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/bricks_Overlay_100.jpg",blendmode:"MULTIPLY",alpha:1}},p_=e=>{const{overlay:t,width:r,height:n,x:i,y:o}=e,{src:a,blendmode:u}=Lc[t]||Lc.normal;return Vt.jsx(le.TilingSprite,{image:a,width:r,height:n,x:i,y:o,tilePosition:{x:0,y:0},tileScale:.5,alpha:.5,anchor:.5})},v_=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],ni=Et.forwardRef((e,t)=>{const[r,n]=Et.useState(!1),[i,o]=mt.useState(!1),[a,u]=mt.useState(!1),f=mt.useRef(null),h=mt.useRef(null),d=mt.useRef(null),p=mt.useRef(null),{uniqueId:c,visible:v,transformation:{x:y,y:_,width:b,height:m,scale:w=[1,1],rotation:T=0,effect:x,overlay:E},applyTransformer:I,disabled:O,pointerdown:A,pointerout:L,pointerover:R,isText:C,isDragging:P,isGif:M,onDoubleClick:F,isTextEditMode:q}=e;Ze(Oe.COMPLETE,()=>{f.current}),Et.useImperativeHandle(t,()=>({getIsTransformerDragging:()=>i,getIsMouseOverTransformer:()=>a}),[i,a]),Et.useEffect(()=>{f.current&&n(!0)},[]);const Z=Et.useCallback(()=>{u(!0),R&&R()},[]),z=Et.useCallback(()=>{o(!0)},[]),nt=Et.useCallback(D=>{e.onAnchorTransformationEnd&&e.onAnchorTransformationEnd(D),o(!1)},[]),V=le.withFilters(le.Container,{matrix:zr.filters.ColorMatrixFilter});return Vt.jsxs(le.Container,{ref:h,children:[Vt.jsxs(le.Container,{ref:f,position:[y,_],pivot:[y,_],width:b,height:m,scale:w,rotation:T,...!O&&v&&!i&&!P&&{interactive:!0,buttonMode:!0,pointerdown:A,pointerover:R,pointerout:L},children:[!M&&Vt.jsx(V,{scale:1,apply:({matrix:D})=>{x===Sn.BlackAndWhite?D.desaturate():x===Sn.Sepia?D.sepia():x===Sn.RetroVintage||x===Sn.NightVision?D.negative():x===Sn.Normal&&D.reset()},matrix:{enabled:!0,matrix:v_},children:Vt.jsx(le.Container,{ref:d,children:e.children})}),M&&Vt.jsx(le.Container,{ref:d,children:e.children}),!rl(E)&&E!==nl.NONE&&E!==nl.NORMAL&&Vt.jsx(p_,{overlay:E,width:b,height:m,x:y,y:_})]}),I&&v&&!q&&Vt.jsx(yy,{pixiTransformerRef:p,imageRef:f,isMounted:r,transformCommit:nt,transformChange:z,mouseoverEvent:Z,uniqueId:c,isText:C,onDoubleClick:F})]})});ni.whyDidYouRender={logOnDifferentValues:!0,customName:"AbstractContainer"};var Cn=(e=>(e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2",e))(Cn||{}),Fc=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS",e))(Fc||{}),il=(e=>(e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL",e))(il||{}),Pt=(e=>(e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e[e.NORMAL_NPM=17]="NORMAL_NPM",e[e.ADD_NPM=18]="ADD_NPM",e[e.SCREEN_NPM=19]="SCREEN_NPM",e[e.NONE=20]="NONE",e[e.SRC_OVER=0]="SRC_OVER",e[e.SRC_IN=21]="SRC_IN",e[e.SRC_OUT=22]="SRC_OUT",e[e.SRC_ATOP=23]="SRC_ATOP",e[e.DST_OVER=24]="DST_OVER",e[e.DST_IN=25]="DST_IN",e[e.DST_OUT=26]="DST_OUT",e[e.DST_ATOP=27]="DST_ATOP",e[e.ERASE=26]="ERASE",e[e.SUBTRACT=28]="SUBTRACT",e[e.XOR=29]="XOR",e))(Pt||{}),an=(e=>(e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN",e))(an||{}),bt=(e=>(e[e.RGBA=6408]="RGBA",e[e.RGB=6407]="RGB",e[e.RG=33319]="RG",e[e.RED=6403]="RED",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.ALPHA=6406]="ALPHA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e))(bt||{}),ii=(e=>(e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",e))(ii||{}),Xt=(e=>(e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.BYTE=5120]="BYTE",e[e.SHORT=5122]="SHORT",e[e.INT=5124]="INT",e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",e[e.HALF_FLOAT=36193]="HALF_FLOAT",e))(Xt||{}),sl=(e=>(e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT",e))(sl||{}),Lr=(e=>(e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR",e))(Lr||{}),Ji=(e=>(e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",e))(Ji||{}),Rn=(e=>(e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL",e))(Rn||{}),ln=(e=>(e[e.NPM=0]="NPM",e[e.UNPACK=1]="UNPACK",e[e.PMA=2]="PMA",e[e.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",e[e.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",e[e.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",e))(ln||{}),In=(e=>(e[e.NO=0]="NO",e[e.YES=1]="YES",e[e.AUTO=2]="AUTO",e[e.BLEND=0]="BLEND",e[e.CLEAR=1]="CLEAR",e[e.BLIT=2]="BLIT",e))(In||{}),ol=(e=>(e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL",e))(ol||{}),ar=(e=>(e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp",e))(ar||{}),Ee=(e=>(e[e.NONE=0]="NONE",e[e.SCISSOR=1]="SCISSOR",e[e.STENCIL=2]="STENCIL",e[e.SPRITE=3]="SPRITE",e[e.COLOR=4]="COLOR",e))(Ee||{}),Te=(e=>(e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH",e))(Te||{}),Fr=(e=>(e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",e))(Fr||{});const Dt={ADAPTER:{createCanvas:(e,t)=>{const r=document.createElement("canvas");return r.width=e,r.height=t,r},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(e,t)=>fetch(e,t),parseXML:e=>new DOMParser().parseFromString(e,"text/xml")},RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var al=/iPhone/i,Bc=/iPod/i,Dc=/iPad/i,Uc=/\biOS-universal(?:.+)Mac\b/i,ll=/\bAndroid(?:.+)Mobile\b/i,$c=/Android/i,si=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Vs=/Silk/i,Hr=/Windows Phone/i,Gc=/\bWindows(?:.+)ARM\b/i,jc=/BlackBerry/i,qc=/BB10/i,zc=/Opera Mini/i,Hc=/\b(CriOS|Chrome)(?:.+)Mobile/i,Vc=/Mobile(?:.+)Firefox\b/i,Wc=function(e){return typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof MSStream>"u"};function g_(e){return function(t){return t.test(e)}}function Xc(e){var t={userAgent:"",platform:"",maxTouchPoints:0};!e&&typeof navigator<"u"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e=="string"?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});var r=t.userAgent,n=r.split("[FBAN");typeof n[1]<"u"&&(r=n[0]),n=r.split("Twitter"),typeof n[1]<"u"&&(r=n[0]);var i=g_(r),o={apple:{phone:i(al)&&!i(Hr),ipod:i(Bc),tablet:!i(al)&&(i(Dc)||Wc(t))&&!i(Hr),universal:i(Uc),device:(i(al)||i(Bc)||i(Dc)||i(Uc)||Wc(t))&&!i(Hr)},amazon:{phone:i(si),tablet:!i(si)&&i(Vs),device:i(si)||i(Vs)},android:{phone:!i(Hr)&&i(si)||!i(Hr)&&i(ll),tablet:!i(Hr)&&!i(si)&&!i(ll)&&(i(Vs)||i($c)),device:!i(Hr)&&(i(si)||i(Vs)||i(ll)||i($c))||i(/\bokhttp\b/i)},windows:{phone:i(Hr),tablet:i(Gc),device:i(Hr)||i(Gc)},other:{blackberry:i(jc),blackberry10:i(qc),opera:i(zc),firefox:i(Vc),chrome:i(Hc),device:i(jc)||i(qc)||i(zc)||i(Vc)||i(Hc)},any:!1,phone:!1,tablet:!1};return o.any=o.apple.device||o.android.device||o.windows.device||o.other.device,o.phone=o.apple.phone||o.android.phone||o.windows.phone,o.tablet=o.apple.tablet||o.android.tablet||o.windows.tablet,o}const oi=(Xc.default??Xc)(globalThis.navigator);Dt.RETINA_PREFIX=/@([0-9\.]+)x/,Dt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var Kc={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(f,h,d){this.fn=f,this.context=h,this.once=d||!1}function o(f,h,d,p,c){if(typeof d!="function")throw new TypeError("The listener must be a function");var v=new i(d,p||f,c),y=r?r+h:h;return f._events[y]?f._events[y].fn?f._events[y]=[f._events[y],v]:f._events[y].push(v):(f._events[y]=v,f._eventsCount++),f}function a(f,h){--f._eventsCount===0?f._events=new n:delete f._events[h]}function u(){this._events=new n,this._eventsCount=0}u.prototype.eventNames=function(){var h=[],d,p;if(this._eventsCount===0)return h;for(p in d=this._events)t.call(d,p)&&h.push(r?p.slice(1):p);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(d)):h},u.prototype.listeners=function(h){var d=r?r+h:h,p=this._events[d];if(!p)return[];if(p.fn)return[p.fn];for(var c=0,v=p.length,y=new Array(v);c<v;c++)y[c]=p[c].fn;return y},u.prototype.listenerCount=function(h){var d=r?r+h:h,p=this._events[d];return p?p.fn?1:p.length:0},u.prototype.emit=function(h,d,p,c,v,y){var _=r?r+h:h;if(!this._events[_])return!1;var b=this._events[_],m=arguments.length,w,T;if(b.fn){switch(b.once&&this.removeListener(h,b.fn,void 0,!0),m){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,d),!0;case 3:return b.fn.call(b.context,d,p),!0;case 4:return b.fn.call(b.context,d,p,c),!0;case 5:return b.fn.call(b.context,d,p,c,v),!0;case 6:return b.fn.call(b.context,d,p,c,v,y),!0}for(T=1,w=new Array(m-1);T<m;T++)w[T-1]=arguments[T];b.fn.apply(b.context,w)}else{var x=b.length,E;for(T=0;T<x;T++)switch(b[T].once&&this.removeListener(h,b[T].fn,void 0,!0),m){case 1:b[T].fn.call(b[T].context);break;case 2:b[T].fn.call(b[T].context,d);break;case 3:b[T].fn.call(b[T].context,d,p);break;case 4:b[T].fn.call(b[T].context,d,p,c);break;default:if(!w)for(E=1,w=new Array(m-1);E<m;E++)w[E-1]=arguments[E];b[T].fn.apply(b[T].context,w)}}return!0},u.prototype.on=function(h,d,p){return o(this,h,d,p,!1)},u.prototype.once=function(h,d,p){return o(this,h,d,p,!0)},u.prototype.removeListener=function(h,d,p,c){var v=r?r+h:h;if(!this._events[v])return this;if(!d)return a(this,v),this;var y=this._events[v];if(y.fn)y.fn===d&&(!c||y.once)&&(!p||y.context===p)&&a(this,v);else{for(var _=0,b=[],m=y.length;_<m;_++)(y[_].fn!==d||c&&!y[_].once||p&&y[_].context!==p)&&b.push(y[_]);b.length?this._events[v]=b.length===1?b[0]:b:a(this,v)}return this},u.prototype.removeAllListeners=function(h){var d;return h?(d=r?r+h:h,this._events[d]&&a(this,d)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=r,u.EventEmitter=u,e.exports=u})(Kc);var m_=Kc.exports;const Ws=En(m_);var ul={exports:{}};ul.exports=Xs,ul.exports.default=Xs;function Xs(e,t,r){r=r||2;var n=t&&t.length,i=n?t[0]*r:e.length,o=Yc(e,0,i,r,!0),a=[];if(!o||o.next===o.prev)return a;var u,f,h,d,p,c,v;if(n&&(o=w_(e,t,o,r)),e.length>80*r){u=h=e[0],f=d=e[1];for(var y=r;y<i;y+=r)p=e[y],c=e[y+1],p<u&&(u=p),c<f&&(f=c),p>h&&(h=p),c>d&&(d=c);v=Math.max(h-u,d-f),v=v!==0?32767/v:0}return ts(o,a,r,u,f,v,0),a}function Yc(e,t,r,n,i){var o,a;if(i===hl(e,t,r,n)>0)for(o=t;o<r;o+=n)a=Jc(o,e[o],e[o+1],a);else for(o=r-n;o>=t;o-=n)a=Jc(o,e[o],e[o+1],a);return a&&Ks(a,a.next)&&(rs(a),a=a.next),a}function Pn(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(Ks(r,r.next)||pe(r.prev,r,r.next)===0)){if(rs(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function ts(e,t,r,n,i,o,a){if(e){!a&&o&&O_(e,n,i,o);for(var u=e,f,h;e.prev!==e.next;){if(f=e.prev,h=e.next,o?__(e,n,i,o):y_(e)){t.push(f.i/r|0),t.push(e.i/r|0),t.push(h.i/r|0),rs(e),e=h.next,u=h.next;continue}if(e=h,e===u){a?a===1?(e=b_(Pn(e),t,r),ts(e,t,r,n,i,o,2)):a===2&&x_(e,t,r,n,i,o):ts(Pn(e),t,r,n,i,o,1);break}}}}function y_(e){var t=e.prev,r=e,n=e.next;if(pe(t,r,n)>=0)return!1;for(var i=t.x,o=r.x,a=n.x,u=t.y,f=r.y,h=n.y,d=i<o?i<a?i:a:o<a?o:a,p=u<f?u<h?u:h:f<h?f:h,c=i>o?i>a?i:a:o>a?o:a,v=u>f?u>h?u:h:f>h?f:h,y=n.next;y!==t;){if(y.x>=d&&y.x<=c&&y.y>=p&&y.y<=v&&ai(i,u,o,f,a,h,y.x,y.y)&&pe(y.prev,y,y.next)>=0)return!1;y=y.next}return!0}function __(e,t,r,n){var i=e.prev,o=e,a=e.next;if(pe(i,o,a)>=0)return!1;for(var u=i.x,f=o.x,h=a.x,d=i.y,p=o.y,c=a.y,v=u<f?u<h?u:h:f<h?f:h,y=d<p?d<c?d:c:p<c?p:c,_=u>f?u>h?u:h:f>h?f:h,b=d>p?d>c?d:c:p>c?p:c,m=fl(v,y,t,r,n),w=fl(_,b,t,r,n),T=e.prevZ,x=e.nextZ;T&&T.z>=m&&x&&x.z<=w;){if(T.x>=v&&T.x<=_&&T.y>=y&&T.y<=b&&T!==i&&T!==a&&ai(u,d,f,p,h,c,T.x,T.y)&&pe(T.prev,T,T.next)>=0||(T=T.prevZ,x.x>=v&&x.x<=_&&x.y>=y&&x.y<=b&&x!==i&&x!==a&&ai(u,d,f,p,h,c,x.x,x.y)&&pe(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;T&&T.z>=m;){if(T.x>=v&&T.x<=_&&T.y>=y&&T.y<=b&&T!==i&&T!==a&&ai(u,d,f,p,h,c,T.x,T.y)&&pe(T.prev,T,T.next)>=0)return!1;T=T.prevZ}for(;x&&x.z<=w;){if(x.x>=v&&x.x<=_&&x.y>=y&&x.y<=b&&x!==i&&x!==a&&ai(u,d,f,p,h,c,x.x,x.y)&&pe(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function b_(e,t,r){var n=e;do{var i=n.prev,o=n.next.next;!Ks(i,o)&&Zc(i,n,n.next,o)&&es(i,o)&&es(o,i)&&(t.push(i.i/r|0),t.push(n.i/r|0),t.push(o.i/r|0),rs(n),rs(n.next),n=e=o),n=n.next}while(n!==e);return Pn(n)}function x_(e,t,r,n,i,o){var a=e;do{for(var u=a.next.next;u!==a.prev;){if(a.i!==u.i&&I_(a,u)){var f=Qc(a,u);a=Pn(a,a.next),f=Pn(f,f.next),ts(a,t,r,n,i,o,0),ts(f,t,r,n,i,o,0);return}u=u.next}a=a.next}while(a!==e)}function w_(e,t,r,n){var i=[],o,a,u,f,h;for(o=0,a=t.length;o<a;o++)u=t[o]*n,f=o<a-1?t[o+1]*n:e.length,h=Yc(e,u,f,n,!1),h===h.next&&(h.steiner=!0),i.push(R_(h));for(i.sort(T_),o=0;o<i.length;o++)r=E_(i[o],r);return r}function T_(e,t){return e.x-t.x}function E_(e,t){var r=S_(e,t);if(!r)return t;var n=Qc(r,e);return Pn(n,n.next),Pn(r,r.next)}function S_(e,t){var r=t,n=e.x,i=e.y,o=-1/0,a;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var u=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(u<=n&&u>o&&(o=u,a=r.x<r.next.x?r:r.next,u===n))return a}r=r.next}while(r!==t);if(!a)return null;var f=a,h=a.x,d=a.y,p=1/0,c;r=a;do n>=r.x&&r.x>=h&&n!==r.x&&ai(i<d?n:o,i,h,d,i<d?o:n,i,r.x,r.y)&&(c=Math.abs(i-r.y)/(n-r.x),es(r,e)&&(c<p||c===p&&(r.x>a.x||r.x===a.x&&A_(a,r)))&&(a=r,p=c)),r=r.next;while(r!==f);return a}function A_(e,t){return pe(e.prev,e,t.prev)<0&&pe(t.next,e,e.next)<0}function O_(e,t,r,n){var i=e;do i.z===0&&(i.z=fl(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,C_(i)}function C_(e){var t,r,n,i,o,a,u,f,h=1;do{for(r=e,e=null,o=null,a=0;r;){for(a++,n=r,u=0,t=0;t<h&&(u++,n=n.nextZ,!!n);t++);for(f=h;u>0||f>0&&n;)u!==0&&(f===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,u--):(i=n,n=n.nextZ,f--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;r=n}o.nextZ=null,h*=2}while(a>1);return e}function fl(e,t,r,n,i){return e=(e-r)*i|0,t=(t-n)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function R_(e){var t=e,r=e;do(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next;while(t!==e);return r}function ai(e,t,r,n,i,o,a,u){return(i-a)*(t-u)>=(e-a)*(o-u)&&(e-a)*(n-u)>=(r-a)*(t-u)&&(r-a)*(o-u)>=(i-a)*(n-u)}function I_(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!P_(e,t)&&(es(e,t)&&es(t,e)&&N_(e,t)&&(pe(e.prev,e,t.prev)||pe(e,t.prev,t))||Ks(e,t)&&pe(e.prev,e,e.next)>0&&pe(t.prev,t,t.next)>0)}function pe(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function Ks(e,t){return e.x===t.x&&e.y===t.y}function Zc(e,t,r,n){var i=Zs(pe(e,t,r)),o=Zs(pe(e,t,n)),a=Zs(pe(r,n,e)),u=Zs(pe(r,n,t));return!!(i!==o&&a!==u||i===0&&Ys(e,r,t)||o===0&&Ys(e,n,t)||a===0&&Ys(r,e,n)||u===0&&Ys(r,t,n))}function Ys(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function Zs(e){return e>0?1:e<0?-1:0}function P_(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&Zc(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function es(e,t){return pe(e.prev,e,e.next)<0?pe(e,t,e.next)>=0&&pe(e,e.prev,t)>=0:pe(e,t,e.prev)<0||pe(e,e.next,t)<0}function N_(e,t){var r=e,n=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do r.y>o!=r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==e);return n}function Qc(e,t){var r=new cl(e.i,e.x,e.y),n=new cl(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function Jc(e,t,r,n){var i=new cl(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function rs(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 cl(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}Xs.deviation=function(e,t,r,n){var i=t&&t.length,o=i?t[0]*r:e.length,a=Math.abs(hl(e,0,o,r));if(i)for(var u=0,f=t.length;u<f;u++){var h=t[u]*r,d=u<f-1?t[u+1]*r:e.length;a-=Math.abs(hl(e,h,d,r))}var p=0;for(u=0;u<n.length;u+=3){var c=n[u]*r,v=n[u+1]*r,y=n[u+2]*r;p+=Math.abs((e[c]-e[y])*(e[v+1]-e[c+1])-(e[c]-e[v])*(e[y+1]-e[c+1]))}return a===0&&p===0?0:Math.abs((p-a)/a)};function hl(e,t,r,n){for(var i=0,o=t,a=r-n;o<r;o+=n)i+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return i}Xs.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},n=0,i=0;i<e.length;i++){for(var o=0;o<e[i].length;o++)for(var a=0;a<t;a++)r.vertices.push(e[i][o][a]);i>0&&(n+=e[i-1].length,r.holes.push(n))}return r};var M_=ul.exports;const k_=En(M_);var Qs={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */Qs.exports,function(e,t){(function(r){var n=t&&!t.nodeType&&t,i=e&&!e.nodeType&&e,o=typeof Ye=="object"&&Ye;(o.global===o||o.window===o||o.self===o)&&(r=o);var a,u=2147483647,f=36,h=1,d=26,p=38,c=700,v=72,y=128,_="-",b=/^xn--/,m=/[^\x20-\x7E]/,w=/[\x2E\u3002\uFF0E\uFF61]/g,T={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=f-h,E=Math.floor,I=String.fromCharCode,O;function A(D){throw new RangeError(T[D])}function L(D,k){for(var G=D.length,j=[];G--;)j[G]=k(D[G]);return j}function R(D,k){var G=D.split("@"),j="";G.length>1&&(j=G[0]+"@",D=G[1]),D=D.replace(w,".");var Q=D.split("."),K=L(Q,k).join(".");return j+K}function C(D){for(var k=[],G=0,j=D.length,Q,K;G<j;)Q=D.charCodeAt(G++),Q>=55296&&Q<=56319&&G<j?(K=D.charCodeAt(G++),(K&64512)==56320?k.push(((Q&1023)<<10)+(K&1023)+65536):(k.push(Q),G--)):k.push(Q);return k}function P(D){return L(D,function(k){var G="";return k>65535&&(k-=65536,G+=I(k>>>10&1023|55296),k=56320|k&1023),G+=I(k),G}).join("")}function M(D){return D-48<10?D-22:D-65<26?D-65:D-97<26?D-97:f}function F(D,k){return D+22+75*(D<26)-((k!=0)<<5)}function q(D,k,G){var j=0;for(D=G?E(D/c):D>>1,D+=E(D/k);D>x*d>>1;j+=f)D=E(D/x);return E(j+(x+1)*D/(D+p))}function Z(D){var k=[],G=D.length,j,Q=0,K=y,$=v,W,et,Y,rt,ot,pt,vt,_t,At;for(W=D.lastIndexOf(_),W<0&&(W=0),et=0;et<W;++et)D.charCodeAt(et)>=128&&A("not-basic"),k.push(D.charCodeAt(et));for(Y=W>0?W+1:0;Y<G;){for(rt=Q,ot=1,pt=f;Y>=G&&A("invalid-input"),vt=M(D.charCodeAt(Y++)),(vt>=f||vt>E((u-Q)/ot))&&A("overflow"),Q+=vt*ot,_t=pt<=$?h:pt>=$+d?d:pt-$,!(vt<_t);pt+=f)At=f-_t,ot>E(u/At)&&A("overflow"),ot*=At;j=k.length+1,$=q(Q-rt,j,rt==0),E(Q/j)>u-K&&A("overflow"),K+=E(Q/j),Q%=j,k.splice(Q++,0,K)}return P(k)}function z(D){var k,G,j,Q,K,$,W,et,Y,rt,ot,pt=[],vt,_t,At,ne;for(D=C(D),vt=D.length,k=y,G=0,K=v,$=0;$<vt;++$)ot=D[$],ot<128&&pt.push(I(ot));for(j=Q=pt.length,Q&&pt.push(_);j<vt;){for(W=u,$=0;$<vt;++$)ot=D[$],ot>=k&&ot<W&&(W=ot);for(_t=j+1,W-k>E((u-G)/_t)&&A("overflow"),G+=(W-k)*_t,k=W,$=0;$<vt;++$)if(ot=D[$],ot<k&&++G>u&&A("overflow"),ot==k){for(et=G,Y=f;rt=Y<=K?h:Y>=K+d?d:Y-K,!(et<rt);Y+=f)ne=et-rt,At=f-rt,pt.push(I(F(rt+ne%At,0))),et=E(ne/At);pt.push(I(F(et,0))),K=q(G,_t,j==Q),G=0,++j}++G,++k}return pt.join("")}function nt(D){return R(D,function(k){return b.test(k)?Z(k.slice(4).toLowerCase()):k})}function V(D){return R(D,function(k){return m.test(k)?"xn--"+z(k):k})}if(a={version:"1.4.1",ucs2:{decode:C,encode:P},decode:Z,encode:z,toASCII:V,toUnicode:nt},n&&i)if(e.exports==n)i.exports=a;else for(O in a)a.hasOwnProperty(O)&&(n[O]=a[O]);else r.punycode=a})(Ye)}(Qs,Qs.exports);var L_=Qs.exports,F_=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,r);if(a.value!==i||a.enumerable!==!0)return!1}return!0},th=typeof Symbol<"u"&&Symbol,B_=F_,D_=function(){return typeof th!="function"||typeof Symbol!="function"||typeof th("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:B_()},eh={foo:{}},U_=Object,$_=function(){return{__proto__:eh}.foo===eh.foo&&!({__proto__:null}instanceof U_)},G_="Function.prototype.bind called on incompatible ",dl=Array.prototype.slice,j_=Object.prototype.toString,q_="[object Function]",z_=function(t){var r=this;if(typeof r!="function"||j_.call(r)!==q_)throw new TypeError(G_+r);for(var n=dl.call(arguments,1),i,o=function(){if(this instanceof i){var d=r.apply(this,n.concat(dl.call(arguments)));return Object(d)===d?d:this}else return r.apply(t,n.concat(dl.call(arguments)))},a=Math.max(0,r.length-n.length),u=[],f=0;f<a;f++)u.push("$"+f);if(i=Function("binder","return function ("+u.join(",")+"){ return binder.apply(this,arguments); }")(o),r.prototype){var h=function(){};h.prototype=r.prototype,i.prototype=new h,h.prototype=null}return i},H_=z_,pl=Function.prototype.bind||H_,V_=pl,W_=V_.call(Function.call,Object.prototype.hasOwnProperty),Gt,li=SyntaxError,rh=Function,ui=TypeError,vl=function(e){try{return rh('"use strict"; return ('+e+").constructor;")()}catch{}},Nn=Object.getOwnPropertyDescriptor;if(Nn)try{Nn({},"")}catch{Nn=null}var gl=function(){throw new ui},X_=Nn?function(){try{return arguments.callee,gl}catch{try{return Nn(arguments,"callee").get}catch{return gl}}}():gl,fi=D_(),K_=$_(),Ce=Object.getPrototypeOf||(K_?function(e){return e.__proto__}:null),ci={},Y_=typeof Uint8Array>"u"||!Ce?Gt:Ce(Uint8Array),Mn={"%AggregateError%":typeof AggregateError>"u"?Gt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Gt:ArrayBuffer,"%ArrayIteratorPrototype%":fi&&Ce?Ce([][Symbol.iterator]()):Gt,"%AsyncFromSyncIteratorPrototype%":Gt,"%AsyncFunction%":ci,"%AsyncGenerator%":ci,"%AsyncGeneratorFunction%":ci,"%AsyncIteratorPrototype%":ci,"%Atomics%":typeof Atomics>"u"?Gt:Atomics,"%BigInt%":typeof BigInt>"u"?Gt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Gt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Gt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Gt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?Gt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Gt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Gt:FinalizationRegistry,"%Function%":rh,"%GeneratorFunction%":ci,"%Int8Array%":typeof Int8Array>"u"?Gt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Gt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Gt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":fi&&Ce?Ce(Ce([][Symbol.iterator]())):Gt,"%JSON%":typeof JSON=="object"?JSON:Gt,"%Map%":typeof Map>"u"?Gt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!fi||!Ce?Gt:Ce(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Gt:Promise,"%Proxy%":typeof Proxy>"u"?Gt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?Gt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Gt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!fi||!Ce?Gt:Ce(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Gt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":fi&&Ce?Ce(""[Symbol.iterator]()):Gt,"%Symbol%":fi?Symbol:Gt,"%SyntaxError%":li,"%ThrowTypeError%":X_,"%TypedArray%":Y_,"%TypeError%":ui,"%Uint8Array%":typeof Uint8Array>"u"?Gt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Gt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Gt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Gt:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?Gt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Gt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Gt:WeakSet};if(Ce)try{null.error}catch(e){var Z_=Ce(Ce(e));Mn["%Error.prototype%"]=Z_}var Q_=function e(t){var r;if(t==="%AsyncFunction%")r=vl("async function () {}");else if(t==="%GeneratorFunction%")r=vl("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=vl("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Ce&&(r=Ce(i.prototype))}return Mn[t]=r,r},nh={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ns=pl,Js=W_,J_=ns.call(Function.call,Array.prototype.concat),tb=ns.call(Function.apply,Array.prototype.splice),ih=ns.call(Function.call,String.prototype.replace),to=ns.call(Function.call,String.prototype.slice),eb=ns.call(Function.call,RegExp.prototype.exec),rb=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,nb=/\\(\\)?/g,ib=function(t){var r=to(t,0,1),n=to(t,-1);if(r==="%"&&n!=="%")throw new li("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new li("invalid intrinsic syntax, expected opening `%`");var i=[];return ih(t,rb,function(o,a,u,f){i[i.length]=u?ih(f,nb,"$1"):a||o}),i},sb=function(t,r){var n=t,i;if(Js(nh,n)&&(i=nh[n],n="%"+i[0]+"%"),Js(Mn,n)){var o=Mn[n];if(o===ci&&(o=Q_(n)),typeof o>"u"&&!r)throw new ui("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new li("intrinsic "+t+" does not exist!")},ml=function(t,r){if(typeof t!="string"||t.length===0)throw new ui("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new ui('"allowMissing" argument must be a boolean');if(eb(/^%?[^%]*%?$/,t)===null)throw new li("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=ib(t),i=n.length>0?n[0]:"",o=sb("%"+i+"%",r),a=o.name,u=o.value,f=!1,h=o.alias;h&&(i=h[0],tb(n,J_([0,1],h)));for(var d=1,p=!0;d<n.length;d+=1){var c=n[d],v=to(c,0,1),y=to(c,-1);if((v==='"'||v==="'"||v==="`"||y==='"'||y==="'"||y==="`")&&v!==y)throw new li("property names with quotes must have matching quotes");if((c==="constructor"||!p)&&(f=!0),i+="."+c,a="%"+i+"%",Js(Mn,a))u=Mn[a];else if(u!=null){if(!(c in u)){if(!r)throw new ui("base intrinsic for "+t+" exists, but the property is not available.");return}if(Nn&&d+1>=n.length){var _=Nn(u,c);p=!!_,p&&"get"in _&&!("originalValue"in _.get)?u=_.get:u=u[c]}else p=Js(u,c),u=u[c];p&&!f&&(Mn[a]=u)}}return u},sh={exports:{}};(function(e){var t=pl,r=ml,n=r("%Function.prototype.apply%"),i=r("%Function.prototype.call%"),o=r("%Reflect.apply%",!0)||t.call(i,n),a=r("%Object.getOwnPropertyDescriptor%",!0),u=r("%Object.defineProperty%",!0),f=r("%Math.max%");if(u)try{u({},"a",{value:1})}catch{u=null}e.exports=function(p){var c=o(t,i,arguments);if(a&&u){var v=a(c,"length");v.configurable&&u(c,"length",{value:1+f(0,p.length-(arguments.length-1))})}return c};var h=function(){return o(t,n,arguments)};u?u(e.exports,"apply",{value:h}):e.exports.apply=h})(sh);var ob=sh.exports,oh=ml,ah=ob,ab=ah(oh("String.prototype.indexOf")),lb=function(t,r){var n=oh(t,!!r);return typeof n=="function"&&ab(t,".prototype.")>-1?ah(n):n};const ub=uy(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var yl=typeof Map=="function"&&Map.prototype,_l=Object.getOwnPropertyDescriptor&&yl?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,eo=yl&&_l&&typeof _l.get=="function"?_l.get:null,lh=yl&&Map.prototype.forEach,bl=typeof Set=="function"&&Set.prototype,xl=Object.getOwnPropertyDescriptor&&bl?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ro=bl&&xl&&typeof xl.get=="function"?xl.get:null,uh=bl&&Set.prototype.forEach,fb=typeof WeakMap=="function"&&WeakMap.prototype,is=fb?WeakMap.prototype.has:null,cb=typeof WeakSet=="function"&&WeakSet.prototype,ss=cb?WeakSet.prototype.has:null,hb=typeof WeakRef=="function"&&WeakRef.prototype,fh=hb?WeakRef.prototype.deref:null,db=Boolean.prototype.valueOf,pb=Object.prototype.toString,vb=Function.prototype.toString,gb=String.prototype.match,wl=String.prototype.slice,un=String.prototype.replace,mb=String.prototype.toUpperCase,ch=String.prototype.toLowerCase,hh=RegExp.prototype.test,dh=Array.prototype.concat,Br=Array.prototype.join,yb=Array.prototype.slice,ph=Math.floor,Tl=typeof BigInt=="function"?BigInt.prototype.valueOf:null,El=Object.getOwnPropertySymbols,Sl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,hi=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Le=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===hi||"symbol")?Symbol.toStringTag:null,vh=Object.prototype.propertyIsEnumerable,gh=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function mh(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||hh.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-ph(-e):ph(e);if(n!==e){var i=String(n),o=wl.call(t,i.length+1);return un.call(i,r,"$&_")+"."+un.call(un.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return un.call(t,r,"$&_")}var Al=ub,yh=Al.custom,_h=wh(yh)?yh:null,_b=function e(t,r,n,i){var o=r||{};if(fn(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(fn(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=fn(o,"customInspect")?o.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(fn(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(fn(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var u=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Eh(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var f=String(t);return u?mh(t,f):f}if(typeof t=="bigint"){var h=String(t)+"n";return u?mh(t,h):h}var d=typeof o.depth>"u"?5:o.depth;if(typeof n>"u"&&(n=0),n>=d&&d>0&&typeof t=="object")return Ol(t)?"[Array]":"[Object]";var p=Bb(o,n);if(typeof i>"u")i=[];else if(Th(i,t)>=0)return"[Circular]";function c(M,F,q){if(F&&(i=yb.call(i),i.push(F)),q){var Z={depth:o.depth};return fn(o,"quoteStyle")&&(Z.quoteStyle=o.quoteStyle),e(M,Z,n+1,i)}return e(M,o,n+1,i)}if(typeof t=="function"&&!xh(t)){var v=Cb(t),y=no(t,c);return"[Function"+(v?": "+v:" (anonymous)")+"]"+(y.length>0?" { "+Br.call(y,", ")+" }":"")}if(wh(t)){var _=hi?un.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Sl.call(t);return typeof t=="object"&&!hi?os(_):_}if(kb(t)){for(var b="<"+ch.call(String(t.nodeName)),m=t.attributes||[],w=0;w<m.length;w++)b+=" "+m[w].name+"="+bh(bb(m[w].value),"double",o);return b+=">",t.childNodes&&t.childNodes.length&&(b+="..."),b+="</"+ch.call(String(t.nodeName))+">",b}if(Ol(t)){if(t.length===0)return"[]";var T=no(t,c);return p&&!Fb(T)?"["+Rl(T,p)+"]":"[ "+Br.call(T,", ")+" ]"}if(wb(t)){var x=no(t,c);return!("cause"in Error.prototype)&&"cause"in t&&!vh.call(t,"cause")?"{ ["+String(t)+"] "+Br.call(dh.call("[cause]: "+c(t.cause),x),", ")+" }":x.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Br.call(x,", ")+" }"}if(typeof t=="object"&&a){if(_h&&typeof t[_h]=="function"&&Al)return Al(t,{depth:d-n});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Rb(t)){var E=[];return lh&&lh.call(t,function(M,F){E.push(c(F,t,!0)+" => "+c(M,t))}),Sh("Map",eo.call(t),E,p)}if(Nb(t)){var I=[];return uh&&uh.call(t,function(M){I.push(c(M,t))}),Sh("Set",ro.call(t),I,p)}if(Ib(t))return Cl("WeakMap");if(Mb(t))return Cl("WeakSet");if(Pb(t))return Cl("WeakRef");if(Eb(t))return os(c(Number(t)));if(Ab(t))return os(c(Tl.call(t)));if(Sb(t))return os(db.call(t));if(Tb(t))return os(c(String(t)));if(!xb(t)&&!xh(t)){var O=no(t,c),A=gh?gh(t)===Object.prototype:t instanceof Object||t.constructor===Object,L=t instanceof Object?"":"null prototype",R=!A&&Le&&Object(t)===t&&Le in t?wl.call(cn(t),8,-1):L?"Object":"",C=A||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",P=C+(R||L?"["+Br.call(dh.call([],R||[],L||[]),": ")+"] ":"");return O.length===0?P+"{}":p?P+"{"+Rl(O,p)+"}":P+"{ "+Br.call(O,", ")+" }"}return String(t)};function bh(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function bb(e){return un.call(String(e),/"/g,"&quot;")}function Ol(e){return cn(e)==="[object Array]"&&(!Le||!(typeof e=="object"&&Le in e))}function xb(e){return cn(e)==="[object Date]"&&(!Le||!(typeof e=="object"&&Le in e))}function xh(e){return cn(e)==="[object RegExp]"&&(!Le||!(typeof e=="object"&&Le in e))}function wb(e){return cn(e)==="[object Error]"&&(!Le||!(typeof e=="object"&&Le in e))}function Tb(e){return cn(e)==="[object String]"&&(!Le||!(typeof e=="object"&&Le in e))}function Eb(e){return cn(e)==="[object Number]"&&(!Le||!(typeof e=="object"&&Le in e))}function Sb(e){return cn(e)==="[object Boolean]"&&(!Le||!(typeof e=="object"&&Le in e))}function wh(e){if(hi)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Sl)return!1;try{return Sl.call(e),!0}catch{}return!1}function Ab(e){if(!e||typeof e!="object"||!Tl)return!1;try{return Tl.call(e),!0}catch{}return!1}var Ob=Object.prototype.hasOwnProperty||function(e){return e in this};function fn(e,t){return Ob.call(e,t)}function cn(e){return pb.call(e)}function Cb(e){if(e.name)return e.name;var t=gb.call(vb.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Th(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function Rb(e){if(!eo||!e||typeof e!="object")return!1;try{eo.call(e);try{ro.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function Ib(e){if(!is||!e||typeof e!="object")return!1;try{is.call(e,is);try{ss.call(e,ss)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function Pb(e){if(!fh||!e||typeof e!="object")return!1;try{return fh.call(e),!0}catch{}return!1}function Nb(e){if(!ro||!e||typeof e!="object")return!1;try{ro.call(e);try{eo.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function Mb(e){if(!ss||!e||typeof e!="object")return!1;try{ss.call(e,ss);try{is.call(e,is)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function kb(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Eh(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Eh(wl.call(e,0,t.maxStringLength),t)+n}var i=un.call(un.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Lb);return bh(i,"single",t)}function Lb(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+mb.call(t.toString(16))}function os(e){return"Object("+e+")"}function Cl(e){return e+" { ? }"}function Sh(e,t,r,n){var i=n?Rl(r,n):Br.call(r,", ");return e+" ("+t+") {"+i+"}"}function Fb(e){for(var t=0;t<e.length;t++)if(Th(e[t],`
10
+ `)>=0)return!1;return!0}function Bb(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=Br.call(Array(e.indent+1)," ");else return null;return{base:r,prev:Br.call(Array(t+1),r)}}function Rl(e,t){if(e.length===0)return"";var r=`
11
11
  `+t.prev+t.base;return r+Br.call(e,","+r)+`
12
- `+t.prev}function ro(e,t){var r=Al(e),n=[];if(r){n.length=e.length;for(var i=0;i<e.length;i++)n[i]=fn(e,i)?t(e[i],e):""}var o=typeof Tl=="function"?Tl(e):[],a;if(hi){a={};for(var u=0;u<o.length;u++)a["$"+o[u]]=o[u]}for(var f in e)fn(e,f)&&(r&&String(Number(f))===f&&f<e.length||hi&&a["$"+f]instanceof Symbol||(hh.call(/[^\w$]/,f)?n.push(t(f,e)+": "+t(e[f],e)):n.push(f+": "+t(e[f],e))));if(typeof Tl=="function")for(var h=0;h<o.length;h++)vh.call(e,o[h])&&n.push("["+t(o[h])+"]: "+t(e[o[h]],e));return n}var Rl=gl,di=lb,Db=_b,Ub=Rl("%TypeError%"),no=Rl("%WeakMap%",!0),io=Rl("%Map%",!0),$b=di("WeakMap.prototype.get",!0),Gb=di("WeakMap.prototype.set",!0),jb=di("WeakMap.prototype.has",!0),qb=di("Map.prototype.get",!0),zb=di("Map.prototype.set",!0),Hb=di("Map.prototype.has",!0),Il=function(e,t){for(var r=e,n;(n=r.next)!==null;r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n},Vb=function(e,t){var r=Il(e,t);return r&&r.value},Wb=function(e,t,r){var n=Il(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},Xb=function(e,t){return!!Il(e,t)},Kb=function(){var t,r,n,i={assert:function(o){if(!i.has(o))throw new Ub("Side channel does not contain "+Db(o))},get:function(o){if(no&&o&&(typeof o=="object"||typeof o=="function")){if(t)return $b(t,o)}else if(io){if(r)return qb(r,o)}else if(n)return Vb(n,o)},has:function(o){if(no&&o&&(typeof o=="object"||typeof o=="function")){if(t)return jb(t,o)}else if(io){if(r)return Hb(r,o)}else if(n)return Xb(n,o);return!1},set:function(o,a){no&&o&&(typeof o=="object"||typeof o=="function")?(t||(t=new no),Gb(t,o,a)):io?(r||(r=new io),zb(r,o,a)):(n||(n={key:{},next:null}),Wb(n,o,a))}};return i},Yb=String.prototype.replace,Zb=/%20/g,Pl={RFC1738:"RFC1738",RFC3986:"RFC3986"},Nl={default:Pl.RFC3986,formatters:{RFC1738:function(e){return Yb.call(e,Zb,"+")},RFC3986:function(e){return String(e)}},RFC1738:Pl.RFC1738,RFC3986:Pl.RFC3986},Qb=Nl,Ml=Object.prototype.hasOwnProperty,kn=Array.isArray,Dr=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Jb=function(t){for(;t.length>1;){var r=t.pop(),n=r.obj[r.prop];if(kn(n)){for(var i=[],o=0;o<n.length;++o)typeof n[o]<"u"&&i.push(n[o]);r.obj[r.prop]=i}}},Ah=function(t,r){for(var n=r&&r.plainObjects?Object.create(null):{},i=0;i<t.length;++i)typeof t[i]<"u"&&(n[i]=t[i]);return n},tx=function e(t,r,n){if(!r)return t;if(typeof r!="object"){if(kn(t))t.push(r);else if(t&&typeof t=="object")(n&&(n.plainObjects||n.allowPrototypes)||!Ml.call(Object.prototype,r))&&(t[r]=!0);else return[t,r];return t}if(!t||typeof t!="object")return[t].concat(r);var i=t;return kn(t)&&!kn(r)&&(i=Ah(t,n)),kn(t)&&kn(r)?(r.forEach(function(o,a){if(Ml.call(t,a)){var u=t[a];u&&typeof u=="object"&&o&&typeof o=="object"?t[a]=e(u,o,n):t.push(o)}else t[a]=o}),t):Object.keys(r).reduce(function(o,a){var u=r[a];return Ml.call(o,a)?o[a]=e(o[a],u,n):o[a]=u,o},i)},ex=function(t,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},t)},rx=function(e,t,r){var n=e.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},nx=function(t,r,n,i,o){if(t.length===0)return t;var a=t;if(typeof t=="symbol"?a=Symbol.prototype.toString.call(t):typeof t!="string"&&(a=String(t)),n==="iso-8859-1")return escape(a).replace(/%u[0-9a-f]{4}/gi,function(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var u="",f=0;f<a.length;++f){var h=a.charCodeAt(f);if(h===45||h===46||h===95||h===126||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||o===Qb.RFC1738&&(h===40||h===41)){u+=a.charAt(f);continue}if(h<128){u=u+Dr[h];continue}if(h<2048){u=u+(Dr[192|h>>6]+Dr[128|h&63]);continue}if(h<55296||h>=57344){u=u+(Dr[224|h>>12]+Dr[128|h>>6&63]+Dr[128|h&63]);continue}f+=1,h=65536+((h&1023)<<10|a.charCodeAt(f)&1023),u+=Dr[240|h>>18]+Dr[128|h>>12&63]+Dr[128|h>>6&63]+Dr[128|h&63]}return u},ix=function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],i=0;i<r.length;++i)for(var o=r[i],a=o.obj[o.prop],u=Object.keys(a),f=0;f<u.length;++f){var h=u[f],d=a[h];typeof d=="object"&&d!==null&&n.indexOf(d)===-1&&(r.push({obj:a,prop:h}),n.push(d))}return Jb(r),t},sx=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},ox=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},ax=function(t,r){return[].concat(t,r)},lx=function(t,r){if(kn(t)){for(var n=[],i=0;i<t.length;i+=1)n.push(r(t[i]));return n}return r(t)},Oh={arrayToObject:Ah,assign:ex,combine:ax,compact:ix,decode:rx,encode:nx,isBuffer:ox,isRegExp:sx,maybeMap:lx,merge:tx},Ch=Kb,so=Oh,os=Nl,ux=Object.prototype.hasOwnProperty,Rh={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,r){return t+"["+r+"]"},repeat:function(t){return t}},Vr=Array.isArray,fx=Array.prototype.push,Ih=function(e,t){fx.apply(e,Vr(t)?t:[t])},cx=Date.prototype.toISOString,Ph=os.default,Fe={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:so.encode,encodeValuesOnly:!1,format:Ph,formatter:os.formatters[Ph],indices:!1,serializeDate:function(t){return cx.call(t)},skipNulls:!1,strictNullHandling:!1},hx=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},kl={},dx=function e(t,r,n,i,o,a,u,f,h,d,p,c,v,y,b,_){for(var m=t,w=_,T=0,x=!1;(w=w.get(kl))!==void 0&&!x;){var E=w.get(t);if(T+=1,typeof E<"u"){if(E===T)throw new RangeError("Cyclic object value");x=!0}typeof w.get(kl)>"u"&&(T=0)}if(typeof f=="function"?m=f(r,m):m instanceof Date?m=p(m):n==="comma"&&Vr(m)&&(m=so.maybeMap(m,function(Z){return Z instanceof Date?p(Z):Z})),m===null){if(o)return u&&!y?u(r,Fe.encoder,b,"key",c):r;m=""}if(hx(m)||so.isBuffer(m)){if(u){var I=y?r:u(r,Fe.encoder,b,"key",c);return[v(I)+"="+v(u(m,Fe.encoder,b,"value",c))]}return[v(r)+"="+v(String(m))]}var A=[];if(typeof m>"u")return A;var O;if(n==="comma"&&Vr(m))y&&u&&(m=so.maybeMap(m,u)),O=[{value:m.length>0?m.join(",")||null:void 0}];else if(Vr(f))O=f;else{var L=Object.keys(m);O=h?L.sort(h):L}for(var R=i&&Vr(m)&&m.length===1?r+"[]":r,C=0;C<O.length;++C){var P=O[C],M=typeof P=="object"&&typeof P.value<"u"?P.value:m[P];if(!(a&&M===null)){var F=Vr(m)?typeof n=="function"?n(R,P):R:R+(d?"."+P:"["+P+"]");_.set(t,T);var q=Ch();q.set(kl,_),Ih(A,e(M,F,n,i,o,a,n==="comma"&&y&&Vr(m)?null:u,f,h,d,p,c,v,y,b,q))}}return A},px=function(t){if(!t)return Fe;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=t.charset||Fe.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=os.default;if(typeof t.format<"u"){if(!ux.call(os.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var i=os.formatters[n],o=Fe.filter;return(typeof t.filter=="function"||Vr(t.filter))&&(o=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Fe.addQueryPrefix,allowDots:typeof t.allowDots>"u"?Fe.allowDots:!!t.allowDots,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Fe.charsetSentinel,delimiter:typeof t.delimiter>"u"?Fe.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Fe.encode,encoder:typeof t.encoder=="function"?t.encoder:Fe.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Fe.encodeValuesOnly,filter:o,format:n,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Fe.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Fe.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Fe.strictNullHandling}},vx=function(e,t){var r=e,n=px(t),i,o;typeof n.filter=="function"?(o=n.filter,r=o("",r)):Vr(n.filter)&&(o=n.filter,i=o);var a=[];if(typeof r!="object"||r===null)return"";var u;t&&t.arrayFormat in Rh?u=t.arrayFormat:t&&"indices"in t?u=t.indices?"indices":"repeat":u="indices";var f=Rh[u];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var h=f==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var d=Ch(),p=0;p<i.length;++p){var c=i[p];n.skipNulls&&r[c]===null||Ih(a,dx(r[c],c,f,h,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,d))}var v=a.join(n.delimiter),y=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),v.length>0?y+v:""},pi=Oh,Ll=Object.prototype.hasOwnProperty,gx=Array.isArray,Re={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:pi.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},mx=function(e){return e.replace(/&#(\d+);/g,function(t,r){return String.fromCharCode(parseInt(r,10))})},Nh=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},yx="utf8=%26%2310003%3B",_x="utf8=%E2%9C%93",bx=function(t,r){var n={__proto__:null},i=r.ignoreQueryPrefix?t.replace(/^\?/,""):t,o=r.parameterLimit===1/0?void 0:r.parameterLimit,a=i.split(r.delimiter,o),u=-1,f,h=r.charset;if(r.charsetSentinel)for(f=0;f<a.length;++f)a[f].indexOf("utf8=")===0&&(a[f]===_x?h="utf-8":a[f]===yx&&(h="iso-8859-1"),u=f,f=a.length);for(f=0;f<a.length;++f)if(f!==u){var d=a[f],p=d.indexOf("]="),c=p===-1?d.indexOf("="):p+1,v,y;c===-1?(v=r.decoder(d,Re.decoder,h,"key"),y=r.strictNullHandling?null:""):(v=r.decoder(d.slice(0,c),Re.decoder,h,"key"),y=pi.maybeMap(Nh(d.slice(c+1),r),function(b){return r.decoder(b,Re.decoder,h,"value")})),y&&r.interpretNumericEntities&&h==="iso-8859-1"&&(y=mx(y)),d.indexOf("[]=")>-1&&(y=gx(y)?[y]:y),Ll.call(n,v)?n[v]=pi.combine(n[v],y):n[v]=y}return n},xx=function(e,t,r,n){for(var i=n?t:Nh(t,r),o=e.length-1;o>=0;--o){var a,u=e[o];if(u==="[]"&&r.parseArrays)a=[].concat(i);else{a=r.plainObjects?Object.create(null):{};var f=u.charAt(0)==="["&&u.charAt(u.length-1)==="]"?u.slice(1,-1):u,h=parseInt(f,10);!r.parseArrays&&f===""?a={0:i}:!isNaN(h)&&u!==f&&String(h)===f&&h>=0&&r.parseArrays&&h<=r.arrayLimit?(a=[],a[h]=i):f!=="__proto__"&&(a[f]=i)}i=a}return i},wx=function(t,r,n,i){if(t){var o=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/,u=/(\[[^[\]]*])/g,f=n.depth>0&&a.exec(o),h=f?o.slice(0,f.index):o,d=[];if(h){if(!n.plainObjects&&Ll.call(Object.prototype,h)&&!n.allowPrototypes)return;d.push(h)}for(var p=0;n.depth>0&&(f=u.exec(o))!==null&&p<n.depth;){if(p+=1,!n.plainObjects&&Ll.call(Object.prototype,f[1].slice(1,-1))&&!n.allowPrototypes)return;d.push(f[1])}return f&&d.push("["+o.slice(f.index)+"]"),xx(d,r,n,i)}},Tx=function(t){if(!t)return Re;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof t.charset>"u"?Re.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Re.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Re.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Re.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Re.arrayLimit,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Re.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Re.comma,decoder:typeof t.decoder=="function"?t.decoder:Re.decoder,delimiter:typeof t.delimiter=="string"||pi.isRegExp(t.delimiter)?t.delimiter:Re.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Re.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Re.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Re.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Re.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Re.strictNullHandling}},Ex=function(e,t){var r=Tx(t);if(e===""||e===null||typeof e>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof e=="string"?bx(e,r):e,i=r.plainObjects?Object.create(null):{},o=Object.keys(n),a=0;a<o.length;++a){var u=o[a],f=wx(u,n[u],r,typeof e=="string");i=pi.merge(i,f,r)}return r.allowSparse===!0?i:pi.compact(i)},Sx=vx,Ax=Ex,Ox=Nl,Cx={formats:Ox,parse:Ax,stringify:Sx},Rx=L_;function yr(){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}var Ix=/^([a-z0-9.+-]+:)/i,Px=/:[0-9]*$/,Nx=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,Mx=["<",">",'"',"`"," ","\r",`
13
- `," "],kx=["{","}","|","\\","^","`"].concat(Mx),Fl=["'"].concat(kx),Mh=["%","/","?",";","#"].concat(Fl),kh=["/","?","#"],Lx=255,Lh=/^[+a-z0-9A-Z_-]{0,63}$/,Fx=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Bx={javascript:!0,"javascript:":!0},Bl={javascript:!0,"javascript:":!0},vi={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Dl=Cx;function oo(e,t,r){if(e&&typeof e=="object"&&e instanceof yr)return e;var n=new yr;return n.parse(e,t,r),n}yr.prototype.parse=function(e,t,r){if(typeof e!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),i=n!==-1&&n<e.indexOf("#")?"?":"#",o=e.split(i),a=/\\/g;o[0]=o[0].replace(a,"/"),e=o.join(i);var u=e;if(u=u.trim(),!r&&e.split("#").length===1){var f=Nx.exec(u);if(f)return this.path=u,this.href=u,this.pathname=f[1],f[2]?(this.search=f[2],t?this.query=Dl.parse(this.search.substr(1)):this.query=this.search.substr(1)):t&&(this.search="",this.query={}),this}var h=Ix.exec(u);if(h){h=h[0];var d=h.toLowerCase();this.protocol=d,u=u.substr(h.length)}if(r||h||u.match(/^\/\/[^@/]+@[^@/]+/)){var p=u.substr(0,2)==="//";p&&!(h&&Bl[h])&&(u=u.substr(2),this.slashes=!0)}if(!Bl[h]&&(p||h&&!vi[h])){for(var c=-1,v=0;v<kh.length;v++){var y=u.indexOf(kh[v]);y!==-1&&(c===-1||y<c)&&(c=y)}var b,_;c===-1?_=u.lastIndexOf("@"):_=u.lastIndexOf("@",c),_!==-1&&(b=u.slice(0,_),u=u.slice(_+1),this.auth=decodeURIComponent(b)),c=-1;for(var v=0;v<Mh.length;v++){var y=u.indexOf(Mh[v]);y!==-1&&(c===-1||y<c)&&(c=y)}c===-1&&(c=u.length),this.host=u.slice(0,c),u=u.slice(c),this.parseHost(),this.hostname=this.hostname||"";var m=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!m)for(var w=this.hostname.split(/\./),v=0,T=w.length;v<T;v++){var x=w[v];if(x&&!x.match(Lh)){for(var E="",I=0,A=x.length;I<A;I++)x.charCodeAt(I)>127?E+="x":E+=x[I];if(!E.match(Lh)){var O=w.slice(0,v),L=w.slice(v+1),R=x.match(Fx);R&&(O.push(R[1]),L.unshift(R[2])),L.length&&(u="/"+L.join(".")+u),this.hostname=O.join(".");break}}}this.hostname.length>Lx?this.hostname="":this.hostname=this.hostname.toLowerCase(),m||(this.hostname=Rx.toASCII(this.hostname));var C=this.port?":"+this.port:"",P=this.hostname||"";this.host=P+C,this.href+=this.host,m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),u[0]!=="/"&&(u="/"+u))}if(!Bx[d])for(var v=0,T=Fl.length;v<T;v++){var M=Fl[v];if(u.indexOf(M)!==-1){var F=encodeURIComponent(M);F===M&&(F=escape(M)),u=u.split(M).join(F)}}var q=u.indexOf("#");q!==-1&&(this.hash=u.substr(q),u=u.slice(0,q));var Z=u.indexOf("?");if(Z!==-1?(this.search=u.substr(Z),this.query=u.substr(Z+1),t&&(this.query=Dl.parse(this.query)),u=u.slice(0,Z)):t&&(this.search="",this.query={}),u&&(this.pathname=u),vi[d]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var C=this.pathname||"",z=this.search||"";this.path=C+z}return this.href=this.format(),this};function Dx(e){return typeof e=="string"&&(e=oo(e)),e instanceof yr?e.format():yr.prototype.format.call(e)}yr.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(o=Dl.stringify(this.query));var a=this.search||o&&"?"+o||"";return t&&t.substr(-1)!==":"&&(t+=":"),this.slashes||(!t||vi[t])&&i!==!1?(i="//"+(i||""),r&&r.charAt(0)!=="/"&&(r="/"+r)):i||(i=""),n&&n.charAt(0)!=="#"&&(n="#"+n),a&&a.charAt(0)!=="?"&&(a="?"+a),r=r.replace(/[?#]/g,function(u){return encodeURIComponent(u)}),a=a.replace("#","%23"),t+i+r+a+n};function Ux(e,t){return oo(e,!1,!0).resolve(t)}yr.prototype.resolve=function(e){return this.resolveObject(oo(e,!1,!0)).format()},yr.prototype.resolveObject=function(e){if(typeof e=="string"){var t=new yr;t.parse(e,!1,!0),e=t}for(var r=new yr,n=Object.keys(this),i=0;i<n.length;i++){var o=n[i];r[o]=this[o]}if(r.hash=e.hash,e.href==="")return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var a=Object.keys(e),u=0;u<a.length;u++){var f=a[u];f!=="protocol"&&(r[f]=e[f])}return vi[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!vi[e.protocol]){for(var h=Object.keys(e),d=0;d<h.length;d++){var p=h[d];r[p]=e[p]}return r.href=r.format(),r}if(r.protocol=e.protocol,!e.host&&!Bl[e.protocol]){for(var T=(e.pathname||"").split("/");T.length&&!(e.host=T.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),T[0]!==""&&T.unshift(""),T.length<2&&T.unshift(""),r.pathname=T.join("/")}else r.pathname=e.pathname;if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var c=r.pathname||"",v=r.search||"";r.path=c+v}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var y=r.pathname&&r.pathname.charAt(0)==="/",b=e.host||e.pathname&&e.pathname.charAt(0)==="/",_=b||y||r.host&&e.pathname,m=_,w=r.pathname&&r.pathname.split("/")||[],T=e.pathname&&e.pathname.split("/")||[],x=r.protocol&&!vi[r.protocol];if(x&&(r.hostname="",r.port=null,r.host&&(w[0]===""?w[0]=r.host:w.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(T[0]===""?T[0]=e.host:T.unshift(e.host)),e.host=null),_=_&&(T[0]===""||w[0]==="")),b)r.host=e.host||e.host===""?e.host:r.host,r.hostname=e.hostname||e.hostname===""?e.hostname:r.hostname,r.search=e.search,r.query=e.query,w=T;else if(T.length)w||(w=[]),w.pop(),w=w.concat(T),r.search=e.search,r.query=e.query;else if(e.search!=null){if(x){r.host=w.shift(),r.hostname=r.host;var E=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;E&&(r.auth=E.shift(),r.hostname=E.shift(),r.host=r.hostname)}return r.search=e.search,r.query=e.query,(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!w.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var I=w.slice(-1)[0],A=(r.host||e.host||w.length>1)&&(I==="."||I==="..")||I==="",O=0,L=w.length;L>=0;L--)I=w[L],I==="."?w.splice(L,1):I===".."?(w.splice(L,1),O++):O&&(w.splice(L,1),O--);if(!_&&!m)for(;O--;O)w.unshift("..");_&&w[0]!==""&&(!w[0]||w[0].charAt(0)!=="/")&&w.unshift(""),A&&w.join("/").substr(-1)!=="/"&&w.push("");var R=w[0]===""||w[0]&&w[0].charAt(0)==="/";if(x){r.hostname=R?"":w.length?w.shift():"",r.host=r.hostname;var E=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;E&&(r.auth=E.shift(),r.hostname=E.shift(),r.host=r.hostname)}return _=_||r.host&&w.length,_&&!R&&w.unshift(""),w.length>0?r.pathname=w.join("/"):(r.pathname=null,r.path=null),(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},yr.prototype.parseHost=function(){var e=this.host,t=Px.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var $x=oo,Gx=Ux,jx=Dx;const qx={parse:$x,format:jx,resolve:Gx},Fh={};function zt(e,t,r=3){if(Fh[t])return;let n=new Error().stack;typeof n>"u"?console.warn("PixiJS Deprecation Warning: ",`${t}
12
+ `+t.prev}function no(e,t){var r=Ol(e),n=[];if(r){n.length=e.length;for(var i=0;i<e.length;i++)n[i]=fn(e,i)?t(e[i],e):""}var o=typeof El=="function"?El(e):[],a;if(hi){a={};for(var u=0;u<o.length;u++)a["$"+o[u]]=o[u]}for(var f in e)fn(e,f)&&(r&&String(Number(f))===f&&f<e.length||hi&&a["$"+f]instanceof Symbol||(hh.call(/[^\w$]/,f)?n.push(t(f,e)+": "+t(e[f],e)):n.push(f+": "+t(e[f],e))));if(typeof El=="function")for(var h=0;h<o.length;h++)vh.call(e,o[h])&&n.push("["+t(o[h])+"]: "+t(e[o[h]],e));return n}var Il=ml,di=lb,Db=_b,Ub=Il("%TypeError%"),io=Il("%WeakMap%",!0),so=Il("%Map%",!0),$b=di("WeakMap.prototype.get",!0),Gb=di("WeakMap.prototype.set",!0),jb=di("WeakMap.prototype.has",!0),qb=di("Map.prototype.get",!0),zb=di("Map.prototype.set",!0),Hb=di("Map.prototype.has",!0),Pl=function(e,t){for(var r=e,n;(n=r.next)!==null;r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n},Vb=function(e,t){var r=Pl(e,t);return r&&r.value},Wb=function(e,t,r){var n=Pl(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},Xb=function(e,t){return!!Pl(e,t)},Kb=function(){var t,r,n,i={assert:function(o){if(!i.has(o))throw new Ub("Side channel does not contain "+Db(o))},get:function(o){if(io&&o&&(typeof o=="object"||typeof o=="function")){if(t)return $b(t,o)}else if(so){if(r)return qb(r,o)}else if(n)return Vb(n,o)},has:function(o){if(io&&o&&(typeof o=="object"||typeof o=="function")){if(t)return jb(t,o)}else if(so){if(r)return Hb(r,o)}else if(n)return Xb(n,o);return!1},set:function(o,a){io&&o&&(typeof o=="object"||typeof o=="function")?(t||(t=new io),Gb(t,o,a)):so?(r||(r=new so),zb(r,o,a)):(n||(n={key:{},next:null}),Wb(n,o,a))}};return i},Yb=String.prototype.replace,Zb=/%20/g,Nl={RFC1738:"RFC1738",RFC3986:"RFC3986"},Ml={default:Nl.RFC3986,formatters:{RFC1738:function(e){return Yb.call(e,Zb,"+")},RFC3986:function(e){return String(e)}},RFC1738:Nl.RFC1738,RFC3986:Nl.RFC3986},Qb=Ml,kl=Object.prototype.hasOwnProperty,kn=Array.isArray,Dr=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Jb=function(t){for(;t.length>1;){var r=t.pop(),n=r.obj[r.prop];if(kn(n)){for(var i=[],o=0;o<n.length;++o)typeof n[o]<"u"&&i.push(n[o]);r.obj[r.prop]=i}}},Ah=function(t,r){for(var n=r&&r.plainObjects?Object.create(null):{},i=0;i<t.length;++i)typeof t[i]<"u"&&(n[i]=t[i]);return n},tx=function e(t,r,n){if(!r)return t;if(typeof r!="object"){if(kn(t))t.push(r);else if(t&&typeof t=="object")(n&&(n.plainObjects||n.allowPrototypes)||!kl.call(Object.prototype,r))&&(t[r]=!0);else return[t,r];return t}if(!t||typeof t!="object")return[t].concat(r);var i=t;return kn(t)&&!kn(r)&&(i=Ah(t,n)),kn(t)&&kn(r)?(r.forEach(function(o,a){if(kl.call(t,a)){var u=t[a];u&&typeof u=="object"&&o&&typeof o=="object"?t[a]=e(u,o,n):t.push(o)}else t[a]=o}),t):Object.keys(r).reduce(function(o,a){var u=r[a];return kl.call(o,a)?o[a]=e(o[a],u,n):o[a]=u,o},i)},ex=function(t,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},t)},rx=function(e,t,r){var n=e.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},nx=function(t,r,n,i,o){if(t.length===0)return t;var a=t;if(typeof t=="symbol"?a=Symbol.prototype.toString.call(t):typeof t!="string"&&(a=String(t)),n==="iso-8859-1")return escape(a).replace(/%u[0-9a-f]{4}/gi,function(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var u="",f=0;f<a.length;++f){var h=a.charCodeAt(f);if(h===45||h===46||h===95||h===126||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||o===Qb.RFC1738&&(h===40||h===41)){u+=a.charAt(f);continue}if(h<128){u=u+Dr[h];continue}if(h<2048){u=u+(Dr[192|h>>6]+Dr[128|h&63]);continue}if(h<55296||h>=57344){u=u+(Dr[224|h>>12]+Dr[128|h>>6&63]+Dr[128|h&63]);continue}f+=1,h=65536+((h&1023)<<10|a.charCodeAt(f)&1023),u+=Dr[240|h>>18]+Dr[128|h>>12&63]+Dr[128|h>>6&63]+Dr[128|h&63]}return u},ix=function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],i=0;i<r.length;++i)for(var o=r[i],a=o.obj[o.prop],u=Object.keys(a),f=0;f<u.length;++f){var h=u[f],d=a[h];typeof d=="object"&&d!==null&&n.indexOf(d)===-1&&(r.push({obj:a,prop:h}),n.push(d))}return Jb(r),t},sx=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},ox=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},ax=function(t,r){return[].concat(t,r)},lx=function(t,r){if(kn(t)){for(var n=[],i=0;i<t.length;i+=1)n.push(r(t[i]));return n}return r(t)},Oh={arrayToObject:Ah,assign:ex,combine:ax,compact:ix,decode:rx,encode:nx,isBuffer:ox,isRegExp:sx,maybeMap:lx,merge:tx},Ch=Kb,oo=Oh,as=Ml,ux=Object.prototype.hasOwnProperty,Rh={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,r){return t+"["+r+"]"},repeat:function(t){return t}},Vr=Array.isArray,fx=Array.prototype.push,Ih=function(e,t){fx.apply(e,Vr(t)?t:[t])},cx=Date.prototype.toISOString,Ph=as.default,Fe={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:oo.encode,encodeValuesOnly:!1,format:Ph,formatter:as.formatters[Ph],indices:!1,serializeDate:function(t){return cx.call(t)},skipNulls:!1,strictNullHandling:!1},hx=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Ll={},dx=function e(t,r,n,i,o,a,u,f,h,d,p,c,v,y,_,b){for(var m=t,w=b,T=0,x=!1;(w=w.get(Ll))!==void 0&&!x;){var E=w.get(t);if(T+=1,typeof E<"u"){if(E===T)throw new RangeError("Cyclic object value");x=!0}typeof w.get(Ll)>"u"&&(T=0)}if(typeof f=="function"?m=f(r,m):m instanceof Date?m=p(m):n==="comma"&&Vr(m)&&(m=oo.maybeMap(m,function(Z){return Z instanceof Date?p(Z):Z})),m===null){if(o)return u&&!y?u(r,Fe.encoder,_,"key",c):r;m=""}if(hx(m)||oo.isBuffer(m)){if(u){var I=y?r:u(r,Fe.encoder,_,"key",c);return[v(I)+"="+v(u(m,Fe.encoder,_,"value",c))]}return[v(r)+"="+v(String(m))]}var O=[];if(typeof m>"u")return O;var A;if(n==="comma"&&Vr(m))y&&u&&(m=oo.maybeMap(m,u)),A=[{value:m.length>0?m.join(",")||null:void 0}];else if(Vr(f))A=f;else{var L=Object.keys(m);A=h?L.sort(h):L}for(var R=i&&Vr(m)&&m.length===1?r+"[]":r,C=0;C<A.length;++C){var P=A[C],M=typeof P=="object"&&typeof P.value<"u"?P.value:m[P];if(!(a&&M===null)){var F=Vr(m)?typeof n=="function"?n(R,P):R:R+(d?"."+P:"["+P+"]");b.set(t,T);var q=Ch();q.set(Ll,b),Ih(O,e(M,F,n,i,o,a,n==="comma"&&y&&Vr(m)?null:u,f,h,d,p,c,v,y,_,q))}}return O},px=function(t){if(!t)return Fe;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=t.charset||Fe.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=as.default;if(typeof t.format<"u"){if(!ux.call(as.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var i=as.formatters[n],o=Fe.filter;return(typeof t.filter=="function"||Vr(t.filter))&&(o=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Fe.addQueryPrefix,allowDots:typeof t.allowDots>"u"?Fe.allowDots:!!t.allowDots,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Fe.charsetSentinel,delimiter:typeof t.delimiter>"u"?Fe.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Fe.encode,encoder:typeof t.encoder=="function"?t.encoder:Fe.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Fe.encodeValuesOnly,filter:o,format:n,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Fe.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Fe.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Fe.strictNullHandling}},vx=function(e,t){var r=e,n=px(t),i,o;typeof n.filter=="function"?(o=n.filter,r=o("",r)):Vr(n.filter)&&(o=n.filter,i=o);var a=[];if(typeof r!="object"||r===null)return"";var u;t&&t.arrayFormat in Rh?u=t.arrayFormat:t&&"indices"in t?u=t.indices?"indices":"repeat":u="indices";var f=Rh[u];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var h=f==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var d=Ch(),p=0;p<i.length;++p){var c=i[p];n.skipNulls&&r[c]===null||Ih(a,dx(r[c],c,f,h,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,d))}var v=a.join(n.delimiter),y=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),v.length>0?y+v:""},pi=Oh,Fl=Object.prototype.hasOwnProperty,gx=Array.isArray,Re={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:pi.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},mx=function(e){return e.replace(/&#(\d+);/g,function(t,r){return String.fromCharCode(parseInt(r,10))})},Nh=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},yx="utf8=%26%2310003%3B",_x="utf8=%E2%9C%93",bx=function(t,r){var n={__proto__:null},i=r.ignoreQueryPrefix?t.replace(/^\?/,""):t,o=r.parameterLimit===1/0?void 0:r.parameterLimit,a=i.split(r.delimiter,o),u=-1,f,h=r.charset;if(r.charsetSentinel)for(f=0;f<a.length;++f)a[f].indexOf("utf8=")===0&&(a[f]===_x?h="utf-8":a[f]===yx&&(h="iso-8859-1"),u=f,f=a.length);for(f=0;f<a.length;++f)if(f!==u){var d=a[f],p=d.indexOf("]="),c=p===-1?d.indexOf("="):p+1,v,y;c===-1?(v=r.decoder(d,Re.decoder,h,"key"),y=r.strictNullHandling?null:""):(v=r.decoder(d.slice(0,c),Re.decoder,h,"key"),y=pi.maybeMap(Nh(d.slice(c+1),r),function(_){return r.decoder(_,Re.decoder,h,"value")})),y&&r.interpretNumericEntities&&h==="iso-8859-1"&&(y=mx(y)),d.indexOf("[]=")>-1&&(y=gx(y)?[y]:y),Fl.call(n,v)?n[v]=pi.combine(n[v],y):n[v]=y}return n},xx=function(e,t,r,n){for(var i=n?t:Nh(t,r),o=e.length-1;o>=0;--o){var a,u=e[o];if(u==="[]"&&r.parseArrays)a=[].concat(i);else{a=r.plainObjects?Object.create(null):{};var f=u.charAt(0)==="["&&u.charAt(u.length-1)==="]"?u.slice(1,-1):u,h=parseInt(f,10);!r.parseArrays&&f===""?a={0:i}:!isNaN(h)&&u!==f&&String(h)===f&&h>=0&&r.parseArrays&&h<=r.arrayLimit?(a=[],a[h]=i):f!=="__proto__"&&(a[f]=i)}i=a}return i},wx=function(t,r,n,i){if(t){var o=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/,u=/(\[[^[\]]*])/g,f=n.depth>0&&a.exec(o),h=f?o.slice(0,f.index):o,d=[];if(h){if(!n.plainObjects&&Fl.call(Object.prototype,h)&&!n.allowPrototypes)return;d.push(h)}for(var p=0;n.depth>0&&(f=u.exec(o))!==null&&p<n.depth;){if(p+=1,!n.plainObjects&&Fl.call(Object.prototype,f[1].slice(1,-1))&&!n.allowPrototypes)return;d.push(f[1])}return f&&d.push("["+o.slice(f.index)+"]"),xx(d,r,n,i)}},Tx=function(t){if(!t)return Re;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof t.charset>"u"?Re.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Re.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Re.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Re.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Re.arrayLimit,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Re.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Re.comma,decoder:typeof t.decoder=="function"?t.decoder:Re.decoder,delimiter:typeof t.delimiter=="string"||pi.isRegExp(t.delimiter)?t.delimiter:Re.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Re.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Re.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Re.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Re.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Re.strictNullHandling}},Ex=function(e,t){var r=Tx(t);if(e===""||e===null||typeof e>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof e=="string"?bx(e,r):e,i=r.plainObjects?Object.create(null):{},o=Object.keys(n),a=0;a<o.length;++a){var u=o[a],f=wx(u,n[u],r,typeof e=="string");i=pi.merge(i,f,r)}return r.allowSparse===!0?i:pi.compact(i)},Sx=vx,Ax=Ex,Ox=Ml,Cx={formats:Ox,parse:Ax,stringify:Sx},Rx=L_;function yr(){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}var Ix=/^([a-z0-9.+-]+:)/i,Px=/:[0-9]*$/,Nx=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,Mx=["<",">",'"',"`"," ","\r",`
13
+ `," "],kx=["{","}","|","\\","^","`"].concat(Mx),Bl=["'"].concat(kx),Mh=["%","/","?",";","#"].concat(Bl),kh=["/","?","#"],Lx=255,Lh=/^[+a-z0-9A-Z_-]{0,63}$/,Fx=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Bx={javascript:!0,"javascript:":!0},Dl={javascript:!0,"javascript:":!0},vi={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Ul=Cx;function ao(e,t,r){if(e&&typeof e=="object"&&e instanceof yr)return e;var n=new yr;return n.parse(e,t,r),n}yr.prototype.parse=function(e,t,r){if(typeof e!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),i=n!==-1&&n<e.indexOf("#")?"?":"#",o=e.split(i),a=/\\/g;o[0]=o[0].replace(a,"/"),e=o.join(i);var u=e;if(u=u.trim(),!r&&e.split("#").length===1){var f=Nx.exec(u);if(f)return this.path=u,this.href=u,this.pathname=f[1],f[2]?(this.search=f[2],t?this.query=Ul.parse(this.search.substr(1)):this.query=this.search.substr(1)):t&&(this.search="",this.query={}),this}var h=Ix.exec(u);if(h){h=h[0];var d=h.toLowerCase();this.protocol=d,u=u.substr(h.length)}if(r||h||u.match(/^\/\/[^@/]+@[^@/]+/)){var p=u.substr(0,2)==="//";p&&!(h&&Dl[h])&&(u=u.substr(2),this.slashes=!0)}if(!Dl[h]&&(p||h&&!vi[h])){for(var c=-1,v=0;v<kh.length;v++){var y=u.indexOf(kh[v]);y!==-1&&(c===-1||y<c)&&(c=y)}var _,b;c===-1?b=u.lastIndexOf("@"):b=u.lastIndexOf("@",c),b!==-1&&(_=u.slice(0,b),u=u.slice(b+1),this.auth=decodeURIComponent(_)),c=-1;for(var v=0;v<Mh.length;v++){var y=u.indexOf(Mh[v]);y!==-1&&(c===-1||y<c)&&(c=y)}c===-1&&(c=u.length),this.host=u.slice(0,c),u=u.slice(c),this.parseHost(),this.hostname=this.hostname||"";var m=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!m)for(var w=this.hostname.split(/\./),v=0,T=w.length;v<T;v++){var x=w[v];if(x&&!x.match(Lh)){for(var E="",I=0,O=x.length;I<O;I++)x.charCodeAt(I)>127?E+="x":E+=x[I];if(!E.match(Lh)){var A=w.slice(0,v),L=w.slice(v+1),R=x.match(Fx);R&&(A.push(R[1]),L.unshift(R[2])),L.length&&(u="/"+L.join(".")+u),this.hostname=A.join(".");break}}}this.hostname.length>Lx?this.hostname="":this.hostname=this.hostname.toLowerCase(),m||(this.hostname=Rx.toASCII(this.hostname));var C=this.port?":"+this.port:"",P=this.hostname||"";this.host=P+C,this.href+=this.host,m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),u[0]!=="/"&&(u="/"+u))}if(!Bx[d])for(var v=0,T=Bl.length;v<T;v++){var M=Bl[v];if(u.indexOf(M)!==-1){var F=encodeURIComponent(M);F===M&&(F=escape(M)),u=u.split(M).join(F)}}var q=u.indexOf("#");q!==-1&&(this.hash=u.substr(q),u=u.slice(0,q));var Z=u.indexOf("?");if(Z!==-1?(this.search=u.substr(Z),this.query=u.substr(Z+1),t&&(this.query=Ul.parse(this.query)),u=u.slice(0,Z)):t&&(this.search="",this.query={}),u&&(this.pathname=u),vi[d]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var C=this.pathname||"",z=this.search||"";this.path=C+z}return this.href=this.format(),this};function Dx(e){return typeof e=="string"&&(e=ao(e)),e instanceof yr?e.format():yr.prototype.format.call(e)}yr.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(o=Ul.stringify(this.query));var a=this.search||o&&"?"+o||"";return t&&t.substr(-1)!==":"&&(t+=":"),this.slashes||(!t||vi[t])&&i!==!1?(i="//"+(i||""),r&&r.charAt(0)!=="/"&&(r="/"+r)):i||(i=""),n&&n.charAt(0)!=="#"&&(n="#"+n),a&&a.charAt(0)!=="?"&&(a="?"+a),r=r.replace(/[?#]/g,function(u){return encodeURIComponent(u)}),a=a.replace("#","%23"),t+i+r+a+n};function Ux(e,t){return ao(e,!1,!0).resolve(t)}yr.prototype.resolve=function(e){return this.resolveObject(ao(e,!1,!0)).format()},yr.prototype.resolveObject=function(e){if(typeof e=="string"){var t=new yr;t.parse(e,!1,!0),e=t}for(var r=new yr,n=Object.keys(this),i=0;i<n.length;i++){var o=n[i];r[o]=this[o]}if(r.hash=e.hash,e.href==="")return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var a=Object.keys(e),u=0;u<a.length;u++){var f=a[u];f!=="protocol"&&(r[f]=e[f])}return vi[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!vi[e.protocol]){for(var h=Object.keys(e),d=0;d<h.length;d++){var p=h[d];r[p]=e[p]}return r.href=r.format(),r}if(r.protocol=e.protocol,!e.host&&!Dl[e.protocol]){for(var T=(e.pathname||"").split("/");T.length&&!(e.host=T.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),T[0]!==""&&T.unshift(""),T.length<2&&T.unshift(""),r.pathname=T.join("/")}else r.pathname=e.pathname;if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var c=r.pathname||"",v=r.search||"";r.path=c+v}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var y=r.pathname&&r.pathname.charAt(0)==="/",_=e.host||e.pathname&&e.pathname.charAt(0)==="/",b=_||y||r.host&&e.pathname,m=b,w=r.pathname&&r.pathname.split("/")||[],T=e.pathname&&e.pathname.split("/")||[],x=r.protocol&&!vi[r.protocol];if(x&&(r.hostname="",r.port=null,r.host&&(w[0]===""?w[0]=r.host:w.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(T[0]===""?T[0]=e.host:T.unshift(e.host)),e.host=null),b=b&&(T[0]===""||w[0]==="")),_)r.host=e.host||e.host===""?e.host:r.host,r.hostname=e.hostname||e.hostname===""?e.hostname:r.hostname,r.search=e.search,r.query=e.query,w=T;else if(T.length)w||(w=[]),w.pop(),w=w.concat(T),r.search=e.search,r.query=e.query;else if(e.search!=null){if(x){r.host=w.shift(),r.hostname=r.host;var E=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;E&&(r.auth=E.shift(),r.hostname=E.shift(),r.host=r.hostname)}return r.search=e.search,r.query=e.query,(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!w.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var I=w.slice(-1)[0],O=(r.host||e.host||w.length>1)&&(I==="."||I==="..")||I==="",A=0,L=w.length;L>=0;L--)I=w[L],I==="."?w.splice(L,1):I===".."?(w.splice(L,1),A++):A&&(w.splice(L,1),A--);if(!b&&!m)for(;A--;A)w.unshift("..");b&&w[0]!==""&&(!w[0]||w[0].charAt(0)!=="/")&&w.unshift(""),O&&w.join("/").substr(-1)!=="/"&&w.push("");var R=w[0]===""||w[0]&&w[0].charAt(0)==="/";if(x){r.hostname=R?"":w.length?w.shift():"",r.host=r.hostname;var E=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;E&&(r.auth=E.shift(),r.hostname=E.shift(),r.host=r.hostname)}return b=b||r.host&&w.length,b&&!R&&w.unshift(""),w.length>0?r.pathname=w.join("/"):(r.pathname=null,r.path=null),(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},yr.prototype.parseHost=function(){var e=this.host,t=Px.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var $x=ao,Gx=Ux,jx=Dx;const qx={parse:$x,format:jx,resolve:Gx},Fh={};function Ht(e,t,r=3){if(Fh[t])return;let n=new Error().stack;typeof n>"u"?console.warn("PixiJS Deprecation Warning: ",`${t}
14
14
  Deprecated since v${e}`):(n=n.split(`
15
15
  `).splice(r).join(`
16
16
  `),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${t}
17
17
  Deprecated since v${e}`),console.warn(n),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${t}
18
- Deprecated since v${e}`),console.warn(n))),Fh[t]=!0}let Ul;function zx(){return typeof Ul>"u"&&(Ul=function(){var r;const t={stencil:!0,failIfMajorPerformanceCaveat:Dt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!Dt.ADAPTER.getWebGLRenderingContext())return!1;const n=Dt.ADAPTER.createCanvas();let i=n.getContext("webgl",t)||n.getContext("experimental-webgl",t);const o=!!((r=i==null?void 0:i.getContextAttributes())!=null&&r.stencil);if(i){const a=i.getExtension("WEBGL_lose_context");a&&a.loseContext()}return i=null,o}catch{return!1}}()),Ul}var Hx={grad:.9,turn:360,rad:360/(2*Math.PI)},Wr=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Ie=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},lr=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},Bh=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Dh=function(e){return{r:lr(e.r,0,255),g:lr(e.g,0,255),b:lr(e.b,0,255),a:lr(e.a)}},$l=function(e){return{r:Ie(e.r),g:Ie(e.g),b:Ie(e.b),a:Ie(e.a,3)}},Vx=/^#([0-9a-f]{3,8})$/i,ao=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Uh=function(e){var t=e.r,r=e.g,n=e.b,i=e.a,o=Math.max(t,r,n),a=o-Math.min(t,r,n),u=a?o===t?(r-n)/a:o===r?2+(n-t)/a:4+(t-r)/a:0;return{h:60*(u<0?u+6:u),s:o?a/o*100:0,v:o/255*100,a:i}},$h=function(e){var t=e.h,r=e.s,n=e.v,i=e.a;t=t/360*6,r/=100,n/=100;var o=Math.floor(t),a=n*(1-r),u=n*(1-(t-o)*r),f=n*(1-(1-t+o)*r),h=o%6;return{r:255*[n,u,a,a,f,n][h],g:255*[f,n,n,u,a,a][h],b:255*[a,a,f,n,n,u][h],a:i}},Gh=function(e){return{h:Bh(e.h),s:lr(e.s,0,100),l:lr(e.l,0,100),a:lr(e.a)}},jh=function(e){return{h:Ie(e.h),s:Ie(e.s),l:Ie(e.l),a:Ie(e.a,3)}},qh=function(e){return $h((r=(t=e).s,{h:t.h,s:(r*=((n=t.l)<50?n:100-n)/100)>0?2*r/(n+r)*100:0,v:n+r,a:t.a}));var t,r,n},as=function(e){return{h:(t=Uh(e)).h,s:(i=(200-(r=t.s))*(n=t.v)/100)>0&&i<200?r*n/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,r,n,i},Wx=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Xx=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Kx=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Yx=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Gl={string:[[function(e){var t=Vx.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Ie(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?Ie(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Kx.exec(e)||Yx.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Dh({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Wx.exec(e)||Xx.exec(e);if(!t)return null;var r,n,i=Gh({h:(r=t[1],n=t[2],n===void 0&&(n="deg"),Number(r)*(Hx[n]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return qh(i)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,n=e.b,i=e.a,o=i===void 0?1:i;return Wr(t)&&Wr(r)&&Wr(n)?Dh({r:Number(t),g:Number(r),b:Number(n),a:Number(o)}):null},"rgb"],[function(e){var t=e.h,r=e.s,n=e.l,i=e.a,o=i===void 0?1:i;if(!Wr(t)||!Wr(r)||!Wr(n))return null;var a=Gh({h:Number(t),s:Number(r),l:Number(n),a:Number(o)});return qh(a)},"hsl"],[function(e){var t=e.h,r=e.s,n=e.v,i=e.a,o=i===void 0?1:i;if(!Wr(t)||!Wr(r)||!Wr(n))return null;var a=function(u){return{h:Bh(u.h),s:lr(u.s,0,100),v:lr(u.v,0,100),a:lr(u.a)}}({h:Number(t),s:Number(r),v:Number(n),a:Number(o)});return $h(a)},"hsv"]]},zh=function(e,t){for(var r=0;r<t.length;r++){var n=t[r][0](e);if(n)return[n,t[r][1]]}return[null,void 0]},Zx=function(e){return typeof e=="string"?zh(e.trim(),Gl.string):typeof e=="object"&&e!==null?zh(e,Gl.object):[null,void 0]},jl=function(e,t){var r=as(e);return{h:r.h,s:lr(r.s+100*t,0,100),l:r.l,a:r.a}},ql=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Hh=function(e,t){var r=as(e);return{h:r.h,s:r.s,l:lr(r.l+100*t,0,100),a:r.a}},zl=function(){function e(t){this.parsed=Zx(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return Ie(ql(this.rgba),2)},e.prototype.isDark=function(){return ql(this.rgba)<.5},e.prototype.isLight=function(){return ql(this.rgba)>=.5},e.prototype.toHex=function(){return t=$l(this.rgba),r=t.r,n=t.g,i=t.b,a=(o=t.a)<1?ao(Ie(255*o)):"","#"+ao(r)+ao(n)+ao(i)+a;var t,r,n,i,o,a},e.prototype.toRgb=function(){return $l(this.rgba)},e.prototype.toRgbString=function(){return t=$l(this.rgba),r=t.r,n=t.g,i=t.b,(o=t.a)<1?"rgba("+r+", "+n+", "+i+", "+o+")":"rgb("+r+", "+n+", "+i+")";var t,r,n,i,o},e.prototype.toHsl=function(){return jh(as(this.rgba))},e.prototype.toHslString=function(){return t=jh(as(this.rgba)),r=t.h,n=t.s,i=t.l,(o=t.a)<1?"hsla("+r+", "+n+"%, "+i+"%, "+o+")":"hsl("+r+", "+n+"%, "+i+"%)";var t,r,n,i,o},e.prototype.toHsv=function(){return t=Uh(this.rgba),{h:Ie(t.h),s:Ie(t.s),v:Ie(t.v),a:Ie(t.a,3)};var t},e.prototype.invert=function(){return Ur({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),Ur(jl(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Ur(jl(this.rgba,-t))},e.prototype.grayscale=function(){return Ur(jl(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Ur(Hh(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Ur(Hh(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?Ur({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):Ie(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=as(this.rgba);return typeof t=="number"?Ur({h:t,s:r.s,l:r.l,a:r.a}):Ie(r.h)},e.prototype.isEqual=function(t){return this.toHex()===Ur(t).toHex()},e}(),Ur=function(e){return e instanceof zl?e:new zl(e)},Vh=[],Qx=function(e){e.forEach(function(t){Vh.indexOf(t)<0&&(t(zl,Gl),Vh.push(t))})};function Jx(e,t){var r={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},n={};for(var i in r)n[r[i]]=i;var o={};e.prototype.toName=function(a){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var u,f,h=n[this.toHex()];if(h)return h;if(a!=null&&a.closest){var d=this.toRgb(),p=1/0,c="black";if(!o.length)for(var v in r)o[v]=new e(r[v]).toRgb();for(var y in r){var b=(u=d,f=o[y],Math.pow(u.r-f.r,2)+Math.pow(u.g-f.g,2)+Math.pow(u.b-f.b,2));b<p&&(p=b,c=y)}return c}},t.string.push([function(a){var u=a.toLowerCase(),f=u==="transparent"?"#0000":r[u];return f?new e(f).toRgb():null},"name"])}Qx([Jx]);const gi=class{constructor(e=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=e}get red(){return this._components[0]}get green(){return this._components[1]}get blue(){return this._components[2]}get alpha(){return this._components[3]}setValue(e){return this.value=e,this}set value(e){if(e instanceof gi)this._value=this.cloneSource(e._value),this._int=e._int,this._components.set(e._components);else{if(e===null)throw new Error("Cannot set PIXI.Color#value to null");(this._value===null||!this.isSourceEqual(this._value,e))&&(this.normalize(e),this._value=this.cloneSource(e))}}get value(){return this._value}cloneSource(e){return typeof e=="string"||typeof e=="number"||e instanceof Number||e===null?e:Array.isArray(e)||ArrayBuffer.isView(e)?e.slice(0):typeof e=="object"&&e!==null?{...e}:e}isSourceEqual(e,t){const r=typeof e;if(r!==typeof t)return!1;if(r==="number"||r==="string"||e instanceof Number)return e===t;if(Array.isArray(e)&&Array.isArray(t)||ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return e.length!==t.length?!1:e.every((i,o)=>i===t[o]);if(e!==null&&t!==null){const i=Object.keys(e),o=Object.keys(t);return i.length!==o.length?!1:i.every(a=>e[a]===t[a])}return e===t}toRgba(){const[e,t,r,n]=this._components;return{r:e,g:t,b:r,a:n}}toRgb(){const[e,t,r]=this._components;return{r:e,g:t,b:r}}toRgbaString(){const[e,t,r]=this.toUint8RgbArray();return`rgba(${e},${t},${r},${this.alpha})`}toUint8RgbArray(e){const[t,r,n]=this._components;return e=e??[],e[0]=Math.round(t*255),e[1]=Math.round(r*255),e[2]=Math.round(n*255),e}toRgbArray(e){e=e??[];const[t,r,n]=this._components;return e[0]=t,e[1]=r,e[2]=n,e}toNumber(){return this._int}toLittleEndianNumber(){const e=this._int;return(e>>16)+(e&65280)+((e&255)<<16)}multiply(e){const[t,r,n,i]=gi.temp.setValue(e)._components;return this._components[0]*=t,this._components[1]*=r,this._components[2]*=n,this._components[3]*=i,this.refreshInt(),this._value=null,this}premultiply(e,t=!0){return t&&(this._components[0]*=e,this._components[1]*=e,this._components[2]*=e),this._components[3]=e,this.refreshInt(),this._value=null,this}toPremultiplied(e){if(e===1)return(e*255<<24)+this._int;if(e===0)return 0;let t=this._int>>16&255,r=this._int>>8&255,n=this._int&255;return t=t*e+.5|0,r=r*e+.5|0,n=n*e+.5|0,(e*255<<24)+(t<<16)+(r<<8)+n}toHex(){const e=this._int.toString(16);return`#${"000000".substring(0,6-e.length)+e}`}toHexa(){const t=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-t.length)+t}setAlpha(e){return this._components[3]=this._clamp(e),this}round(e){const[t,r,n]=this._components;return this._components[0]=Math.round(t*e)/e,this._components[1]=Math.round(r*e)/e,this._components[2]=Math.round(n*e)/e,this.refreshInt(),this._value=null,this}toArray(e){e=e??[];const[t,r,n,i]=this._components;return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}normalize(e){let t;if((typeof e=="number"||e instanceof Number)&&e>=0&&e<=16777215){const r=e;t=[(r>>16&255)/255,(r>>8&255)/255,(r&255)/255,1]}else if((Array.isArray(e)||e instanceof Float32Array)&&e.length>=3&&e.length<=4){e=this._clamp(e);const[r,n,i,o=1]=e;t=[r,n,i,o]}else if((e instanceof Uint8Array||e instanceof Uint8ClampedArray)&&e.length>=3&&e.length<=4){e=this._clamp(e,0,255);const[r,n,i,o=255]=e;t=[r/255,n/255,i/255,o/255]}else if(typeof e=="string"||typeof e=="object"){if(typeof e=="string"){const n=gi.HEX_PATTERN.exec(e);n&&(e=`#${n[2]}`)}const r=Ur(e);if(r.isValid()){const{r:n,g:i,b:o,a}=r.rgba;t=[n/255,i/255,o/255,a]}}if(t)this._components.set(t),this.refreshInt();else throw new Error(`Unable to convert color ${e}`)}refreshInt(){this._clamp(this._components);const[e,t,r]=this._components;this._int=(e*255<<16)+(t*255<<8)+(r*255|0)}_clamp(e,t=0,r=1){return typeof e=="number"?Math.min(Math.max(e,t),r):(e.forEach((n,i)=>{e[i]=Math.min(Math.max(n,t),r)}),e)}};let Be=gi;Be.shared=new gi,Be.temp=new gi,Be.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function lo(e,t=[]){return zt("7.2.0","utils.hex2rgb is deprecated, use Color#toRgbArray instead"),Be.shared.setValue(e).toRgbArray(t)}function Hl(e){return zt("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),Be.shared.setValue(e).toNumber()}function tw(){const e=[],t=[];for(let n=0;n<32;n++)e[n]=n,t[n]=n;e[Rt.NORMAL_NPM]=Rt.NORMAL,e[Rt.ADD_NPM]=Rt.ADD,e[Rt.SCREEN_NPM]=Rt.SCREEN,t[Rt.NORMAL]=Rt.NORMAL_NPM,t[Rt.ADD]=Rt.ADD_NPM,t[Rt.SCREEN]=Rt.SCREEN_NPM;const r=[];return r.push(t),r.push(e),r}const ew=tw();function Wh(e){if(e.BYTES_PER_ELEMENT===4)return e instanceof Float32Array?"Float32Array":e instanceof Uint32Array?"Uint32Array":"Int32Array";if(e.BYTES_PER_ELEMENT===2){if(e instanceof Uint16Array)return"Uint16Array"}else if(e.BYTES_PER_ELEMENT===1&&e instanceof Uint8Array)return"Uint8Array";return null}function uo(e){return e+=e===0?1:0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1}function Xh(e){return!(e&e-1)&&!!e}function Kh(e){let t=(e>65535?1:0)<<4;e>>>=t;let r=(e>255?1:0)<<3;return e>>>=r,t|=r,r=(e>15?1:0)<<2,e>>>=r,t|=r,r=(e>3?1:0)<<1,e>>>=r,t|=r,t|e>>1}function fo(e,t,r){const n=e.length;let i;if(t>=n||r===0)return;r=t+r>n?n-t:r;const o=n-r;for(i=t;i<o;++i)e[i]=e[i+r];e.length=o}let rw=0;function ls(){return++rw}const Yh={},$r=Object.create(null),hn=Object.create(null);let co;function nw(e,t=globalThis.location){if(e.startsWith("data:"))return"";t=t||globalThis.location,co||(co=document.createElement("a")),co.href=e;const r=qx.parse(co.href),n=!r.port&&t.port===""||r.port===t.port;return r.hostname!==t.hostname||!n||r.protocol!==t.protocol?"anonymous":""}function Zh(e,t=1){var n;const r=(n=Dt.RETINA_PREFIX)==null?void 0:n.exec(e);return r?parseFloat(r[1]):t}var jt=(e=>(e.Renderer="renderer",e.Application="application",e.RendererSystem="renderer-webgl-system",e.RendererPlugin="renderer-webgl-plugin",e.CanvasRendererSystem="renderer-canvas-system",e.CanvasRendererPlugin="renderer-canvas-plugin",e.Asset="asset",e.LoadParser="load-parser",e.ResolveParser="resolve-parser",e.CacheParser="cache-parser",e.DetectionParser="detection-parser",e))(jt||{});const Vl=e=>{if(typeof e=="function"||typeof e=="object"&&e.extension){if(!e.extension)throw new Error("Extension class must have an extension object");e={...typeof e.extension!="object"?{type:e.extension}:e.extension,ref:e}}if(typeof e=="object")e={...e};else throw new Error("Invalid extension type");return typeof e.type=="string"&&(e.type=[e.type]),e},Qh=(e,t)=>Vl(e).priority??t,te={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...e){return e.map(Vl).forEach(t=>{t.type.forEach(r=>{var n,i;return(i=(n=this._removeHandlers)[r])==null?void 0:i.call(n,t)})}),this},add(...e){return e.map(Vl).forEach(t=>{t.type.forEach(r=>{const n=this._addHandlers,i=this._queue;n[r]?n[r](t):(i[r]=i[r]||[],i[r].push(t))})}),this},handle(e,t,r){const n=this._addHandlers,i=this._removeHandlers;if(n[e]||i[e])throw new Error(`Extension type ${e} already has a handler`);n[e]=t,i[e]=r;const o=this._queue;return o[e]&&(o[e].forEach(a=>t(a)),delete o[e]),this},handleByMap(e,t){return this.handle(e,r=>{t[r.name]=r.ref},r=>{delete t[r.name]})},handleByList(e,t,r=-1){return this.handle(e,n=>{t.includes(n.ref)||(t.push(n.ref),t.sort((i,o)=>Qh(o,r)-Qh(i,r)))},n=>{const i=t.indexOf(n.ref);i!==-1&&t.splice(i,1)})}};class iw{constructor(t){typeof t=="number"?this.rawBinaryData=new ArrayBuffer(t):t instanceof Uint8Array?this.rawBinaryData=t.buffer:this.rawBinaryData=t,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(t){return this[`${t}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(t){switch(t){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${t} isn't a valid view type`)}}}const sw=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
18
+ Deprecated since v${e}`),console.warn(n))),Fh[t]=!0}let $l;function zx(){return typeof $l>"u"&&($l=function(){var r;const t={stencil:!0,failIfMajorPerformanceCaveat:Dt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!Dt.ADAPTER.getWebGLRenderingContext())return!1;const n=Dt.ADAPTER.createCanvas();let i=n.getContext("webgl",t)||n.getContext("experimental-webgl",t);const o=!!((r=i==null?void 0:i.getContextAttributes())!=null&&r.stencil);if(i){const a=i.getExtension("WEBGL_lose_context");a&&a.loseContext()}return i=null,o}catch{return!1}}()),$l}var Hx={grad:.9,turn:360,rad:360/(2*Math.PI)},Wr=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Ie=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},lr=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},Bh=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Dh=function(e){return{r:lr(e.r,0,255),g:lr(e.g,0,255),b:lr(e.b,0,255),a:lr(e.a)}},Gl=function(e){return{r:Ie(e.r),g:Ie(e.g),b:Ie(e.b),a:Ie(e.a,3)}},Vx=/^#([0-9a-f]{3,8})$/i,lo=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Uh=function(e){var t=e.r,r=e.g,n=e.b,i=e.a,o=Math.max(t,r,n),a=o-Math.min(t,r,n),u=a?o===t?(r-n)/a:o===r?2+(n-t)/a:4+(t-r)/a:0;return{h:60*(u<0?u+6:u),s:o?a/o*100:0,v:o/255*100,a:i}},$h=function(e){var t=e.h,r=e.s,n=e.v,i=e.a;t=t/360*6,r/=100,n/=100;var o=Math.floor(t),a=n*(1-r),u=n*(1-(t-o)*r),f=n*(1-(1-t+o)*r),h=o%6;return{r:255*[n,u,a,a,f,n][h],g:255*[f,n,n,u,a,a][h],b:255*[a,a,f,n,n,u][h],a:i}},Gh=function(e){return{h:Bh(e.h),s:lr(e.s,0,100),l:lr(e.l,0,100),a:lr(e.a)}},jh=function(e){return{h:Ie(e.h),s:Ie(e.s),l:Ie(e.l),a:Ie(e.a,3)}},qh=function(e){return $h((r=(t=e).s,{h:t.h,s:(r*=((n=t.l)<50?n:100-n)/100)>0?2*r/(n+r)*100:0,v:n+r,a:t.a}));var t,r,n},ls=function(e){return{h:(t=Uh(e)).h,s:(i=(200-(r=t.s))*(n=t.v)/100)>0&&i<200?r*n/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,r,n,i},Wx=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Xx=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Kx=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Yx=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,jl={string:[[function(e){var t=Vx.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Ie(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?Ie(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Kx.exec(e)||Yx.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Dh({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Wx.exec(e)||Xx.exec(e);if(!t)return null;var r,n,i=Gh({h:(r=t[1],n=t[2],n===void 0&&(n="deg"),Number(r)*(Hx[n]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return qh(i)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,n=e.b,i=e.a,o=i===void 0?1:i;return Wr(t)&&Wr(r)&&Wr(n)?Dh({r:Number(t),g:Number(r),b:Number(n),a:Number(o)}):null},"rgb"],[function(e){var t=e.h,r=e.s,n=e.l,i=e.a,o=i===void 0?1:i;if(!Wr(t)||!Wr(r)||!Wr(n))return null;var a=Gh({h:Number(t),s:Number(r),l:Number(n),a:Number(o)});return qh(a)},"hsl"],[function(e){var t=e.h,r=e.s,n=e.v,i=e.a,o=i===void 0?1:i;if(!Wr(t)||!Wr(r)||!Wr(n))return null;var a=function(u){return{h:Bh(u.h),s:lr(u.s,0,100),v:lr(u.v,0,100),a:lr(u.a)}}({h:Number(t),s:Number(r),v:Number(n),a:Number(o)});return $h(a)},"hsv"]]},zh=function(e,t){for(var r=0;r<t.length;r++){var n=t[r][0](e);if(n)return[n,t[r][1]]}return[null,void 0]},Zx=function(e){return typeof e=="string"?zh(e.trim(),jl.string):typeof e=="object"&&e!==null?zh(e,jl.object):[null,void 0]},ql=function(e,t){var r=ls(e);return{h:r.h,s:lr(r.s+100*t,0,100),l:r.l,a:r.a}},zl=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Hh=function(e,t){var r=ls(e);return{h:r.h,s:r.s,l:lr(r.l+100*t,0,100),a:r.a}},Hl=function(){function e(t){this.parsed=Zx(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return Ie(zl(this.rgba),2)},e.prototype.isDark=function(){return zl(this.rgba)<.5},e.prototype.isLight=function(){return zl(this.rgba)>=.5},e.prototype.toHex=function(){return t=Gl(this.rgba),r=t.r,n=t.g,i=t.b,a=(o=t.a)<1?lo(Ie(255*o)):"","#"+lo(r)+lo(n)+lo(i)+a;var t,r,n,i,o,a},e.prototype.toRgb=function(){return Gl(this.rgba)},e.prototype.toRgbString=function(){return t=Gl(this.rgba),r=t.r,n=t.g,i=t.b,(o=t.a)<1?"rgba("+r+", "+n+", "+i+", "+o+")":"rgb("+r+", "+n+", "+i+")";var t,r,n,i,o},e.prototype.toHsl=function(){return jh(ls(this.rgba))},e.prototype.toHslString=function(){return t=jh(ls(this.rgba)),r=t.h,n=t.s,i=t.l,(o=t.a)<1?"hsla("+r+", "+n+"%, "+i+"%, "+o+")":"hsl("+r+", "+n+"%, "+i+"%)";var t,r,n,i,o},e.prototype.toHsv=function(){return t=Uh(this.rgba),{h:Ie(t.h),s:Ie(t.s),v:Ie(t.v),a:Ie(t.a,3)};var t},e.prototype.invert=function(){return Ur({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),Ur(ql(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Ur(ql(this.rgba,-t))},e.prototype.grayscale=function(){return Ur(ql(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Ur(Hh(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Ur(Hh(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?Ur({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):Ie(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=ls(this.rgba);return typeof t=="number"?Ur({h:t,s:r.s,l:r.l,a:r.a}):Ie(r.h)},e.prototype.isEqual=function(t){return this.toHex()===Ur(t).toHex()},e}(),Ur=function(e){return e instanceof Hl?e:new Hl(e)},Vh=[],Qx=function(e){e.forEach(function(t){Vh.indexOf(t)<0&&(t(Hl,jl),Vh.push(t))})};function Jx(e,t){var r={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},n={};for(var i in r)n[r[i]]=i;var o={};e.prototype.toName=function(a){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var u,f,h=n[this.toHex()];if(h)return h;if(a!=null&&a.closest){var d=this.toRgb(),p=1/0,c="black";if(!o.length)for(var v in r)o[v]=new e(r[v]).toRgb();for(var y in r){var _=(u=d,f=o[y],Math.pow(u.r-f.r,2)+Math.pow(u.g-f.g,2)+Math.pow(u.b-f.b,2));_<p&&(p=_,c=y)}return c}},t.string.push([function(a){var u=a.toLowerCase(),f=u==="transparent"?"#0000":r[u];return f?new e(f).toRgb():null},"name"])}Qx([Jx]);const gi=class{constructor(e=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=e}get red(){return this._components[0]}get green(){return this._components[1]}get blue(){return this._components[2]}get alpha(){return this._components[3]}setValue(e){return this.value=e,this}set value(e){if(e instanceof gi)this._value=this.cloneSource(e._value),this._int=e._int,this._components.set(e._components);else{if(e===null)throw new Error("Cannot set PIXI.Color#value to null");(this._value===null||!this.isSourceEqual(this._value,e))&&(this.normalize(e),this._value=this.cloneSource(e))}}get value(){return this._value}cloneSource(e){return typeof e=="string"||typeof e=="number"||e instanceof Number||e===null?e:Array.isArray(e)||ArrayBuffer.isView(e)?e.slice(0):typeof e=="object"&&e!==null?{...e}:e}isSourceEqual(e,t){const r=typeof e;if(r!==typeof t)return!1;if(r==="number"||r==="string"||e instanceof Number)return e===t;if(Array.isArray(e)&&Array.isArray(t)||ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return e.length!==t.length?!1:e.every((i,o)=>i===t[o]);if(e!==null&&t!==null){const i=Object.keys(e),o=Object.keys(t);return i.length!==o.length?!1:i.every(a=>e[a]===t[a])}return e===t}toRgba(){const[e,t,r,n]=this._components;return{r:e,g:t,b:r,a:n}}toRgb(){const[e,t,r]=this._components;return{r:e,g:t,b:r}}toRgbaString(){const[e,t,r]=this.toUint8RgbArray();return`rgba(${e},${t},${r},${this.alpha})`}toUint8RgbArray(e){const[t,r,n]=this._components;return e=e??[],e[0]=Math.round(t*255),e[1]=Math.round(r*255),e[2]=Math.round(n*255),e}toRgbArray(e){e=e??[];const[t,r,n]=this._components;return e[0]=t,e[1]=r,e[2]=n,e}toNumber(){return this._int}toLittleEndianNumber(){const e=this._int;return(e>>16)+(e&65280)+((e&255)<<16)}multiply(e){const[t,r,n,i]=gi.temp.setValue(e)._components;return this._components[0]*=t,this._components[1]*=r,this._components[2]*=n,this._components[3]*=i,this.refreshInt(),this._value=null,this}premultiply(e,t=!0){return t&&(this._components[0]*=e,this._components[1]*=e,this._components[2]*=e),this._components[3]=e,this.refreshInt(),this._value=null,this}toPremultiplied(e){if(e===1)return(e*255<<24)+this._int;if(e===0)return 0;let t=this._int>>16&255,r=this._int>>8&255,n=this._int&255;return t=t*e+.5|0,r=r*e+.5|0,n=n*e+.5|0,(e*255<<24)+(t<<16)+(r<<8)+n}toHex(){const e=this._int.toString(16);return`#${"000000".substring(0,6-e.length)+e}`}toHexa(){const t=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-t.length)+t}setAlpha(e){return this._components[3]=this._clamp(e),this}round(e){const[t,r,n]=this._components;return this._components[0]=Math.round(t*e)/e,this._components[1]=Math.round(r*e)/e,this._components[2]=Math.round(n*e)/e,this.refreshInt(),this._value=null,this}toArray(e){e=e??[];const[t,r,n,i]=this._components;return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}normalize(e){let t;if((typeof e=="number"||e instanceof Number)&&e>=0&&e<=16777215){const r=e;t=[(r>>16&255)/255,(r>>8&255)/255,(r&255)/255,1]}else if((Array.isArray(e)||e instanceof Float32Array)&&e.length>=3&&e.length<=4){e=this._clamp(e);const[r,n,i,o=1]=e;t=[r,n,i,o]}else if((e instanceof Uint8Array||e instanceof Uint8ClampedArray)&&e.length>=3&&e.length<=4){e=this._clamp(e,0,255);const[r,n,i,o=255]=e;t=[r/255,n/255,i/255,o/255]}else if(typeof e=="string"||typeof e=="object"){if(typeof e=="string"){const n=gi.HEX_PATTERN.exec(e);n&&(e=`#${n[2]}`)}const r=Ur(e);if(r.isValid()){const{r:n,g:i,b:o,a}=r.rgba;t=[n/255,i/255,o/255,a]}}if(t)this._components.set(t),this.refreshInt();else throw new Error(`Unable to convert color ${e}`)}refreshInt(){this._clamp(this._components);const[e,t,r]=this._components;this._int=(e*255<<16)+(t*255<<8)+(r*255|0)}_clamp(e,t=0,r=1){return typeof e=="number"?Math.min(Math.max(e,t),r):(e.forEach((n,i)=>{e[i]=Math.min(Math.max(n,t),r)}),e)}};let Be=gi;Be.shared=new gi,Be.temp=new gi,Be.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function uo(e,t=[]){return Ht("7.2.0","utils.hex2rgb is deprecated, use Color#toRgbArray instead"),Be.shared.setValue(e).toRgbArray(t)}function Vl(e){return Ht("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),Be.shared.setValue(e).toNumber()}function tw(){const e=[],t=[];for(let n=0;n<32;n++)e[n]=n,t[n]=n;e[Pt.NORMAL_NPM]=Pt.NORMAL,e[Pt.ADD_NPM]=Pt.ADD,e[Pt.SCREEN_NPM]=Pt.SCREEN,t[Pt.NORMAL]=Pt.NORMAL_NPM,t[Pt.ADD]=Pt.ADD_NPM,t[Pt.SCREEN]=Pt.SCREEN_NPM;const r=[];return r.push(t),r.push(e),r}const ew=tw();function Wh(e){if(e.BYTES_PER_ELEMENT===4)return e instanceof Float32Array?"Float32Array":e instanceof Uint32Array?"Uint32Array":"Int32Array";if(e.BYTES_PER_ELEMENT===2){if(e instanceof Uint16Array)return"Uint16Array"}else if(e.BYTES_PER_ELEMENT===1&&e instanceof Uint8Array)return"Uint8Array";return null}function fo(e){return e+=e===0?1:0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1}function Xh(e){return!(e&e-1)&&!!e}function Kh(e){let t=(e>65535?1:0)<<4;e>>>=t;let r=(e>255?1:0)<<3;return e>>>=r,t|=r,r=(e>15?1:0)<<2,e>>>=r,t|=r,r=(e>3?1:0)<<1,e>>>=r,t|=r,t|e>>1}function co(e,t,r){const n=e.length;let i;if(t>=n||r===0)return;r=t+r>n?n-t:r;const o=n-r;for(i=t;i<o;++i)e[i]=e[i+r];e.length=o}let rw=0;function us(){return++rw}const Yh={},$r=Object.create(null),hn=Object.create(null);let ho;function nw(e,t=globalThis.location){if(e.startsWith("data:"))return"";t=t||globalThis.location,ho||(ho=document.createElement("a")),ho.href=e;const r=qx.parse(ho.href),n=!r.port&&t.port===""||r.port===t.port;return r.hostname!==t.hostname||!n||r.protocol!==t.protocol?"anonymous":""}function Zh(e,t=1){var n;const r=(n=Dt.RETINA_PREFIX)==null?void 0:n.exec(e);return r?parseFloat(r[1]):t}var qt=(e=>(e.Renderer="renderer",e.Application="application",e.RendererSystem="renderer-webgl-system",e.RendererPlugin="renderer-webgl-plugin",e.CanvasRendererSystem="renderer-canvas-system",e.CanvasRendererPlugin="renderer-canvas-plugin",e.Asset="asset",e.LoadParser="load-parser",e.ResolveParser="resolve-parser",e.CacheParser="cache-parser",e.DetectionParser="detection-parser",e))(qt||{});const Wl=e=>{if(typeof e=="function"||typeof e=="object"&&e.extension){if(!e.extension)throw new Error("Extension class must have an extension object");e={...typeof e.extension!="object"?{type:e.extension}:e.extension,ref:e}}if(typeof e=="object")e={...e};else throw new Error("Invalid extension type");return typeof e.type=="string"&&(e.type=[e.type]),e},Qh=(e,t)=>Wl(e).priority??t,te={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...e){return e.map(Wl).forEach(t=>{t.type.forEach(r=>{var n,i;return(i=(n=this._removeHandlers)[r])==null?void 0:i.call(n,t)})}),this},add(...e){return e.map(Wl).forEach(t=>{t.type.forEach(r=>{const n=this._addHandlers,i=this._queue;n[r]?n[r](t):(i[r]=i[r]||[],i[r].push(t))})}),this},handle(e,t,r){const n=this._addHandlers,i=this._removeHandlers;if(n[e]||i[e])throw new Error(`Extension type ${e} already has a handler`);n[e]=t,i[e]=r;const o=this._queue;return o[e]&&(o[e].forEach(a=>t(a)),delete o[e]),this},handleByMap(e,t){return this.handle(e,r=>{t[r.name]=r.ref},r=>{delete t[r.name]})},handleByList(e,t,r=-1){return this.handle(e,n=>{t.includes(n.ref)||(t.push(n.ref),t.sort((i,o)=>Qh(o,r)-Qh(i,r)))},n=>{const i=t.indexOf(n.ref);i!==-1&&t.splice(i,1)})}};class iw{constructor(t){typeof t=="number"?this.rawBinaryData=new ArrayBuffer(t):t instanceof Uint8Array?this.rawBinaryData=t.buffer:this.rawBinaryData=t,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(t){return this[`${t}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(t){switch(t){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${t} isn't a valid view type`)}}}const sw=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
19
19
  `);function ow(e){let t="";for(let r=0;r<e;++r)r>0&&(t+=`
20
- else `),r<e-1&&(t+=`if(test == ${r}.0){}`);return t}function aw(e,t){if(e===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const r=t.createShader(t.FRAGMENT_SHADER);for(;;){const n=sw.replace(/%forloop%/gi,ow(e));if(t.shaderSource(r,n),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS))e=e/2|0;else break}return e}const Wl=0,Xl=1,Kl=2,Yl=3,Zl=4,Ql=5;let ho=class ny{constructor(){this.data=0,this.blendMode=Rt.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<Wl)}set blend(t){!!(this.data&1<<Wl)!==t&&(this.data^=1<<Wl)}get offsets(){return!!(this.data&1<<Xl)}set offsets(t){!!(this.data&1<<Xl)!==t&&(this.data^=1<<Xl)}get culling(){return!!(this.data&1<<Kl)}set culling(t){!!(this.data&1<<Kl)!==t&&(this.data^=1<<Kl)}get depthTest(){return!!(this.data&1<<Yl)}set depthTest(t){!!(this.data&1<<Yl)!==t&&(this.data^=1<<Yl)}get depthMask(){return!!(this.data&1<<Ql)}set depthMask(t){!!(this.data&1<<Ql)!==t&&(this.data^=1<<Ql)}get clockwiseFrontFace(){return!!(this.data&1<<Zl)}set clockwiseFrontFace(t){!!(this.data&1<<Zl)!==t&&(this.data^=1<<Zl)}get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!==Rt.NONE,this._blendMode=t}get polygonOffset(){return this._polygonOffset}set polygonOffset(t){this.offsets=!!t,this._polygonOffset=t}toString(){return`[@pixi/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){const t=new ny;return t.depthTest=!1,t.blend=!0,t}};const Jl=[];function Jh(e,t){if(!e)return null;let r="";if(typeof e=="string"){const n=/\.(\w{3,4})(?:$|\?|#)/i.exec(e);n&&(r=n[1].toLowerCase())}for(let n=Jl.length-1;n>=0;--n){const i=Jl[n];if(i.test&&i.test(e,r))return new i(e,t)}throw new Error("Unrecognized source type to auto-detect Resource")}class _r{constructor(t){this.items=[],this._name=t,this._aliasCount=0}emit(t,r,n,i,o,a,u,f){if(arguments.length>8)throw new Error("max arguments reached");const{name:h,items:d}=this;this._aliasCount++;for(let p=0,c=d.length;p<c;p++)d[p][h](t,r,n,i,o,a,u,f);return d===this.items&&this._aliasCount--,this}ensureNonAliasedItems(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this}remove(t){const r=this.items.indexOf(t);return r!==-1&&(this.ensureNonAliasedItems(),this.items.splice(r,1)),this}contains(t){return this.items.includes(t)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(_r.prototype,{dispatch:{value:_r.prototype.emit},run:{value:_r.prototype.emit}});class us{constructor(t=0,r=0){this._width=t,this._height=r,this.destroyed=!1,this.internal=!1,this.onResize=new _r("setRealSize"),this.onUpdate=new _r("update"),this.onError=new _r("onError")}bind(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)}resize(t,r){(t!==this._width||r!==this._height)&&(this._width=t,this._height=r,this.onResize.emit(t,r))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(t,r,n){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(t,r){return!1}}class tu extends us{constructor(t,r){const{width:n,height:i}=r||{};if(!n||!i)throw new Error("BufferResource width or height invalid");super(n,i),this.data=t}upload(t,r,n){const i=t.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===ln.UNPACK);const o=r.realWidth,a=r.realHeight;return n.width===o&&n.height===a?i.texSubImage2D(r.target,0,0,0,o,a,r.format,n.type,this.data):(n.width=o,n.height=a,i.texImage2D(r.target,0,n.internalFormat,o,a,0,r.format,n.type,this.data)),!0}dispose(){this.data=null}static test(t){return t instanceof Float32Array||t instanceof Uint8Array||t instanceof Uint32Array}}const lw={scaleMode:Lr.NEAREST,format:_t.RGBA,alphaMode:ln.NPM},mi=class extends Vs{constructor(e=null,t=null){super(),t=Object.assign({},mi.defaultOptions,t);const{alphaMode:r,mipmap:n,anisotropicLevel:i,scaleMode:o,width:a,height:u,wrapMode:f,format:h,type:d,target:p,resolution:c,resourceOptions:v}=t;e&&!(e instanceof us)&&(e=Jh(e,v),e.internal=!0),this.resolution=c||Dt.RESOLUTION,this.width=Math.round((a||0)*this.resolution)/this.resolution,this.height=Math.round((u||0)*this.resolution)/this.resolution,this._mipmap=n,this.anisotropicLevel=i,this._wrapMode=f,this._scaleMode=o,this.format=h,this.type=d,this.target=p,this.alphaMode=r,this.uid=ls(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=a>0&&u>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(e)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)}setStyle(e,t){let r;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,r=!0),t!==void 0&&t!==this.mipmap&&(this.mipmap=t,r=!0),r&&this.dirtyStyleId++,this}setSize(e,t,r){return r=r||this.resolution,this.setRealSize(e*r,t*r,r)}setRealSize(e,t,r){return this.resolution=r||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(t)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=Xh(this.realWidth)&&Xh(this.realHeight)}setResolution(e){const t=this.resolution;return t===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*t)/e,this.height=Math.round(this.height*t)/e,this.emit("update",this)),this._refreshPOT(),this)}setResource(e){if(this.resource===e)return this;if(this.resource)throw new Error("Resource can be set only once");return e.bind(this),this.resource=e,this}update(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))}onError(e){this.emit("error",this,e)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete hn[this.cacheId],delete $r[this.cacheId],this.cacheId=null),this.dispose(),mi.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(e,t,r=Dt.STRICT_TEXTURE_CACHE){const n=typeof e=="string";let i=null;if(n)i=e;else{if(!e._pixiId){const a=(t==null?void 0:t.pixiIdPrefix)||"pixiid";e._pixiId=`${a}_${ls()}`}i=e._pixiId}let o=hn[i];if(n&&r&&!o)throw new Error(`The cacheId "${i}" does not exist in BaseTextureCache.`);return o||(o=new mi(e,t),o.cacheId=i,mi.addToCache(o,i)),o}static fromBuffer(e,t,r,n){e=e||new Float32Array(t*r*4);const i=new tu(e,{width:t,height:r}),o=e instanceof Float32Array?Xt.FLOAT:Xt.UNSIGNED_BYTE;return new mi(i,Object.assign({},lw,n||{width:t,height:r,type:o}))}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),hn[t]&&hn[t]!==e&&console.warn(`BaseTexture added to the cache with an id [${t}] that already had an entry`),hn[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=hn[e];if(t){const r=t.textureCacheIds.indexOf(e);return r>-1&&t.textureCacheIds.splice(r,1),delete hn[e],t}}else if(e!=null&&e.textureCacheIds){for(let t=0;t<e.textureCacheIds.length;++t)delete hn[e.textureCacheIds[t]];return e.textureCacheIds.length=0,e}return null}};let Kt=mi;Kt.defaultOptions={mipmap:Rn.POW2,anisotropicLevel:0,scaleMode:Lr.LINEAR,wrapMode:Qi.CLAMP,alphaMode:ln.UNPACK,target:ii.TEXTURE_2D,format:_t.RGBA,type:Xt.UNSIGNED_BYTE},Kt._globalBatch=0;class eu{constructor(){this.texArray=null,this.blend=0,this.type=an.TRIANGLES,this.start=0,this.size=0,this.data=null}}let uw=0,Qe=class iy{constructor(t,r=!0,n=!1){this.data=t||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=n,this.static=r,this.id=uw++,this.disposeRunner=new _r("disposeBuffer")}update(t){t instanceof Array&&(t=new Float32Array(t)),this.data=t||this.data,this._updateID++}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.data=null}set index(t){this.type=t?Fr.ELEMENT_ARRAY_BUFFER:Fr.ARRAY_BUFFER}get index(){return this.type===Fr.ELEMENT_ARRAY_BUFFER}static from(t){return t instanceof Array&&(t=new Float32Array(t)),new iy(t)}};class po{constructor(t,r=0,n=!1,i=Xt.FLOAT,o,a,u,f=1){this.buffer=t,this.size=r,this.normalized=n,this.type=i,this.stride=o,this.start=a,this.instance=u,this.divisor=f}destroy(){this.buffer=null}static from(t,r,n,i,o){return new po(t,r,n,i,o)}}const fw={Float32Array,Uint32Array,Int32Array,Uint8Array};function cw(e,t){let r=0,n=0;const i={};for(let f=0;f<e.length;f++)n+=t[f],r+=e[f].length;const o=new ArrayBuffer(r*4);let a=null,u=0;for(let f=0;f<e.length;f++){const h=t[f],d=e[f],p=Wh(d);i[p]||(i[p]=new fw[p](o)),a=i[p];for(let c=0;c<d.length;c++){const v=(c/h|0)*n+u,y=c%h;a[v+y]=d[c]}u+=h}return new Float32Array(o)}const td={5126:4,5123:2,5121:1};let hw=0;const dw={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array};class yi{constructor(t=[],r={}){this.buffers=t,this.indexBuffer=null,this.attributes=r,this.glVertexArrayObjects={},this.id=hw++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new _r("disposeGeometry"),this.refCount=0}addAttribute(t,r,n=0,i=!1,o,a,u,f=!1){if(!r)throw new Error("You must pass a buffer when creating an attribute");r instanceof Qe||(r instanceof Array&&(r=new Float32Array(r)),r=new Qe(r));const h=t.split("|");if(h.length>1){for(let p=0;p<h.length;p++)this.addAttribute(h[p],r,n,i,o);return this}let d=this.buffers.indexOf(r);return d===-1&&(this.buffers.push(r),d=this.buffers.length-1),this.attributes[t]=new po(d,n,i,o,a,u,f),this.instanced=this.instanced||f,this}getAttribute(t){return this.attributes[t]}getBuffer(t){return this.buffers[this.getAttribute(t).buffer]}addIndex(t){return t instanceof Qe||(t instanceof Array&&(t=new Uint16Array(t)),t=new Qe(t)),t.type=Fr.ELEMENT_ARRAY_BUFFER,this.indexBuffer=t,this.buffers.includes(t)||this.buffers.push(t),this}getIndex(){return this.indexBuffer}interleave(){if(this.buffers.length===1||this.buffers.length===2&&this.indexBuffer)return this;const t=[],r=[],n=new Qe;let i;for(i in this.attributes){const o=this.attributes[i],a=this.buffers[o.buffer];t.push(a.data),r.push(o.size*td[o.type]/4),o.buffer=0}for(n.data=cw(t,r),i=0;i<this.buffers.length;i++)this.buffers[i]!==this.indexBuffer&&this.buffers[i].destroy();return this.buffers=[n],this.indexBuffer&&this.buffers.push(this.indexBuffer),this}getSize(){for(const t in this.attributes){const r=this.attributes[t];return this.buffers[r.buffer].data.length/(r.stride/4||r.size)}return 0}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.buffers=null,this.indexBuffer=null,this.attributes=null}clone(){const t=new yi;for(let r=0;r<this.buffers.length;r++)t.buffers[r]=new Qe(this.buffers[r].data.slice(0));for(const r in this.attributes){const n=this.attributes[r];t.attributes[r]=new po(n.buffer,n.size,n.normalized,n.type,n.stride,n.start,n.instance)}return this.indexBuffer&&(t.indexBuffer=t.buffers[this.buffers.indexOf(this.indexBuffer)],t.indexBuffer.type=Fr.ELEMENT_ARRAY_BUFFER),t}static merge(t){const r=new yi,n=[],i=[],o=[];let a;for(let u=0;u<t.length;u++){a=t[u];for(let f=0;f<a.buffers.length;f++)i[f]=i[f]||0,i[f]+=a.buffers[f].data.length,o[f]=0}for(let u=0;u<a.buffers.length;u++)n[u]=new dw[Wh(a.buffers[u].data)](i[u]),r.buffers[u]=new Qe(n[u]);for(let u=0;u<t.length;u++){a=t[u];for(let f=0;f<a.buffers.length;f++)n[f].set(a.buffers[f].data,o[f]),o[f]+=a.buffers[f].data.length}if(r.attributes=a.attributes,a.indexBuffer){r.indexBuffer=r.buffers[a.buffers.indexOf(a.indexBuffer)],r.indexBuffer.type=Fr.ELEMENT_ARRAY_BUFFER;let u=0,f=0,h=0,d=0;for(let p=0;p<a.buffers.length;p++)if(a.buffers[p]!==a.indexBuffer){d=p;break}for(const p in a.attributes){const c=a.attributes[p];(c.buffer|0)===d&&(f+=c.size*td[c.type]/4)}for(let p=0;p<t.length;p++){const c=t[p].indexBuffer.data;for(let v=0;v<c.length;v++)r.indexBuffer.data[v+h]+=u;u+=t[p].buffers[d].data.length/f,h+=c.length}}return r}}class ed extends yi{constructor(t=!1){super(),this._buffer=new Qe(null,t,!1),this._indexBuffer=new Qe(null,t,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,Xt.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,Xt.FLOAT).addAttribute("aColor",this._buffer,4,!0,Xt.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,Xt.FLOAT).addIndex(this._indexBuffer)}}const vo=Math.PI*2,pw=180/Math.PI,fs=Math.PI/180;var Ne=(e=>(e[e.POLY=0]="POLY",e[e.RECT=1]="RECT",e[e.CIRC=2]="CIRC",e[e.ELIP=3]="ELIP",e[e.RREC=4]="RREC",e))(Ne||{});class se{constructor(t=0,r=0){this.x=0,this.y=0,this.x=t,this.y=r}clone(){return new se(this.x,this.y)}copyFrom(t){return this.set(t.x,t.y),this}copyTo(t){return t.set(this.x,this.y),t}equals(t){return t.x===this.x&&t.y===this.y}set(t=0,r=t){return this.x=t,this.y=r,this}toString(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`}}const go=[new se,new se,new se,new se];class ne{constructor(t=0,r=0,n=0,i=0){this.x=Number(t),this.y=Number(r),this.width=Number(n),this.height=Number(i),this.type=Ne.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new ne(0,0,0,0)}clone(){return new ne(this.x,this.y,this.width,this.height)}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}contains(t,r){return this.width<=0||this.height<=0?!1:t>=this.x&&t<this.x+this.width&&r>=this.y&&r<this.y+this.height}intersects(t,r){if(!r){const O=this.x<t.x?t.x:this.x;if((this.right>t.right?t.right:this.right)<=O)return!1;const R=this.y<t.y?t.y:this.y;return(this.bottom>t.bottom?t.bottom:this.bottom)>R}const n=this.left,i=this.right,o=this.top,a=this.bottom;if(i<=n||a<=o)return!1;const u=go[0].set(t.left,t.top),f=go[1].set(t.left,t.bottom),h=go[2].set(t.right,t.top),d=go[3].set(t.right,t.bottom);if(h.x<=u.x||f.y<=u.y)return!1;const p=Math.sign(r.a*r.d-r.b*r.c);if(p===0||(r.apply(u,u),r.apply(f,f),r.apply(h,h),r.apply(d,d),Math.max(u.x,f.x,h.x,d.x)<=n||Math.min(u.x,f.x,h.x,d.x)>=i||Math.max(u.y,f.y,h.y,d.y)<=o||Math.min(u.y,f.y,h.y,d.y)>=a))return!1;const c=p*(f.y-u.y),v=p*(u.x-f.x),y=c*n+v*o,b=c*i+v*o,_=c*n+v*a,m=c*i+v*a;if(Math.max(y,b,_,m)<=c*u.x+v*u.y||Math.min(y,b,_,m)>=c*d.x+v*d.y)return!1;const w=p*(u.y-h.y),T=p*(h.x-u.x),x=w*n+T*o,E=w*i+T*o,I=w*n+T*a,A=w*i+T*a;return!(Math.max(x,E,I,A)<=w*u.x+T*u.y||Math.min(x,E,I,A)>=w*d.x+T*d.y)}pad(t=0,r=t){return this.x-=t,this.y-=r,this.width+=t*2,this.height+=r*2,this}fit(t){const r=Math.max(this.x,t.x),n=Math.min(this.x+this.width,t.x+t.width),i=Math.max(this.y,t.y),o=Math.min(this.y+this.height,t.y+t.height);return this.x=r,this.width=Math.max(n-r,0),this.y=i,this.height=Math.max(o-i,0),this}ceil(t=1,r=.001){const n=Math.ceil((this.x+this.width-r)*t)/t,i=Math.ceil((this.y+this.height-r)*t)/t;return this.x=Math.floor((this.x+r)*t)/t,this.y=Math.floor((this.y+r)*t)/t,this.width=n-this.x,this.height=i-this.y,this}enlarge(t){const r=Math.min(this.x,t.x),n=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),o=Math.max(this.y+this.height,t.y+t.height);return this.x=r,this.width=n-r,this.y=i,this.height=o-i,this}toString(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}class ru{constructor(t=0,r=0,n=0){this.x=t,this.y=r,this.radius=n,this.type=Ne.CIRC}clone(){return new ru(this.x,this.y,this.radius)}contains(t,r){if(this.radius<=0)return!1;const n=this.radius*this.radius;let i=this.x-t,o=this.y-r;return i*=i,o*=o,i+o<=n}getBounds(){return new ne(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)}toString(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}}let vw=class sy{constructor(t=0,r=0,n=0,i=0){this.x=t,this.y=r,this.width=n,this.height=i,this.type=Ne.ELIP}clone(){return new sy(this.x,this.y,this.width,this.height)}contains(t,r){if(this.width<=0||this.height<=0)return!1;let n=(t-this.x)/this.width,i=(r-this.y)/this.height;return n*=n,i*=i,n+i<=1}getBounds(){return new ne(this.x-this.width,this.y-this.height,this.width,this.height)}toString(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}};class cs{constructor(...t){let r=Array.isArray(t[0])?t[0]:t;if(typeof r[0]!="number"){const n=[];for(let i=0,o=r.length;i<o;i++)n.push(r[i].x,r[i].y);r=n}this.points=r,this.type=Ne.POLY,this.closeStroke=!0}clone(){const t=this.points.slice(),r=new cs(t);return r.closeStroke=this.closeStroke,r}contains(t,r){let n=!1;const i=this.points.length/2;for(let o=0,a=i-1;o<i;a=o++){const u=this.points[o*2],f=this.points[o*2+1],h=this.points[a*2],d=this.points[a*2+1];f>r!=d>r&&t<(h-u)*((r-f)/(d-f))+u&&(n=!n)}return n}toString(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((t,r)=>`${t}, ${r}`,"")}]`}}class nu{constructor(t=0,r=0,n=0,i=0,o=20){this.x=t,this.y=r,this.width=n,this.height=i,this.radius=o,this.type=Ne.RREC}clone(){return new nu(this.x,this.y,this.width,this.height,this.radius)}contains(t,r){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&r>=this.y&&r<=this.y+this.height){const n=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(r>=this.y+n&&r<=this.y+this.height-n||t>=this.x+n&&t<=this.x+this.width-n)return!0;let i=t-(this.x+n),o=r-(this.y+n);const a=n*n;if(i*i+o*o<=a||(i=t-(this.x+this.width-n),i*i+o*o<=a)||(o=r-(this.y+this.height-n),i*i+o*o<=a)||(i=t-(this.x+n),i*i+o*o<=a))return!0}return!1}toString(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}let $e=class qa{constructor(t=1,r=0,n=0,i=1,o=0,a=0){this.array=null,this.a=t,this.b=r,this.c=n,this.d=i,this.tx=o,this.ty=a}fromArray(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]}set(t,r,n,i,o,a){return this.a=t,this.b=r,this.c=n,this.d=i,this.tx=o,this.ty=a,this}toArray(t,r){this.array||(this.array=new Float32Array(9));const n=r||this.array;return t?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n}apply(t,r){r=r||new se;const n=t.x,i=t.y;return r.x=this.a*n+this.c*i+this.tx,r.y=this.b*n+this.d*i+this.ty,r}applyInverse(t,r){r=r||new se;const n=1/(this.a*this.d+this.c*-this.b),i=t.x,o=t.y;return r.x=this.d*n*i+-this.c*n*o+(this.ty*this.c-this.tx*this.d)*n,r.y=this.a*n*o+-this.b*n*i+(-this.ty*this.a+this.tx*this.b)*n,r}translate(t,r){return this.tx+=t,this.ty+=r,this}scale(t,r){return this.a*=t,this.d*=r,this.c*=t,this.b*=r,this.tx*=t,this.ty*=r,this}rotate(t){const r=Math.cos(t),n=Math.sin(t),i=this.a,o=this.c,a=this.tx;return this.a=i*r-this.b*n,this.b=i*n+this.b*r,this.c=o*r-this.d*n,this.d=o*n+this.d*r,this.tx=a*r-this.ty*n,this.ty=a*n+this.ty*r,this}append(t){const r=this.a,n=this.b,i=this.c,o=this.d;return this.a=t.a*r+t.b*i,this.b=t.a*n+t.b*o,this.c=t.c*r+t.d*i,this.d=t.c*n+t.d*o,this.tx=t.tx*r+t.ty*i+this.tx,this.ty=t.tx*n+t.ty*o+this.ty,this}setTransform(t,r,n,i,o,a,u,f,h){return this.a=Math.cos(u+h)*o,this.b=Math.sin(u+h)*o,this.c=-Math.sin(u-f)*a,this.d=Math.cos(u-f)*a,this.tx=t-(n*this.a+i*this.c),this.ty=r-(n*this.b+i*this.d),this}prepend(t){const r=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){const n=this.a,i=this.c;this.a=n*t.a+this.b*t.c,this.b=n*t.b+this.b*t.d,this.c=i*t.a+this.d*t.c,this.d=i*t.b+this.d*t.d}return this.tx=r*t.a+this.ty*t.c+t.tx,this.ty=r*t.b+this.ty*t.d+t.ty,this}decompose(t){const r=this.a,n=this.b,i=this.c,o=this.d,a=t.pivot,u=-Math.atan2(-i,o),f=Math.atan2(n,r),h=Math.abs(u+f);return h<1e-5||Math.abs(vo-h)<1e-5?(t.rotation=f,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=u,t.skew.y=f),t.scale.x=Math.sqrt(r*r+n*n),t.scale.y=Math.sqrt(i*i+o*o),t.position.x=this.tx+(a.x*r+a.y*i),t.position.y=this.ty+(a.x*n+a.y*o),t}invert(){const t=this.a,r=this.b,n=this.c,i=this.d,o=this.tx,a=t*i-r*n;return this.a=i/a,this.b=-r/a,this.c=-n/a,this.d=t/a,this.tx=(n*this.ty-i*o)/a,this.ty=-(t*this.ty-r*o)/a,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const t=new qa;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyTo(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyFrom(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this}toString(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return new qa}static get TEMP_MATRIX(){return new qa}};const Ln=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Fn=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Bn=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Dn=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],iu=[],rd=[],mo=Math.sign;function gw(){for(let e=0;e<16;e++){const t=[];iu.push(t);for(let r=0;r<16;r++){const n=mo(Ln[e]*Ln[r]+Bn[e]*Fn[r]),i=mo(Fn[e]*Ln[r]+Dn[e]*Fn[r]),o=mo(Ln[e]*Bn[r]+Bn[e]*Dn[r]),a=mo(Fn[e]*Bn[r]+Dn[e]*Dn[r]);for(let u=0;u<16;u++)if(Ln[u]===n&&Fn[u]===i&&Bn[u]===o&&Dn[u]===a){t.push(u);break}}}for(let e=0;e<16;e++){const t=new $e;t.set(Ln[e],Fn[e],Bn[e],Dn[e],0,0),rd.push(t)}}gw();const ve={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:e=>Ln[e],uY:e=>Fn[e],vX:e=>Bn[e],vY:e=>Dn[e],inv:e=>e&8?e&15:-e&7,add:(e,t)=>iu[e][t],sub:(e,t)=>iu[e][ve.inv(t)],rotate180:e=>e^4,isVertical:e=>(e&3)===2,byDirection:(e,t)=>Math.abs(e)*2<=Math.abs(t)?t>=0?ve.S:ve.N:Math.abs(t)*2<=Math.abs(e)?e>0?ve.E:ve.W:t>0?e>0?ve.SE:ve.SW:e>0?ve.NE:ve.NW,matrixAppendRotationInv:(e,t,r=0,n=0)=>{const i=rd[ve.inv(t)];i.tx=r,i.ty=n,e.append(i)}};class Un{constructor(t,r,n=0,i=0){this._x=n,this._y=i,this.cb=t,this.scope=r}clone(t=this.cb,r=this.scope){return new Un(t,r,this._x,this._y)}set(t=0,r=t){return(this._x!==t||this._y!==r)&&(this._x=t,this._y=r,this.cb.call(this.scope)),this}copyFrom(t){return(this._x!==t.x||this._y!==t.y)&&(this._x=t.x,this._y=t.y,this.cb.call(this.scope)),this}copyTo(t){return t.set(this._x,this._y),t}equals(t){return t.x===this._x&&t.y===this._y}toString(){return`[@pixi/math:ObservablePoint x=0 y=0 scope=${this.scope}]`}get x(){return this._x}set x(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))}get y(){return this._y}set y(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))}}const nd=class{constructor(){this.worldTransform=new $e,this.localTransform=new $e,this.position=new Un(this.onChange,this,0,0),this.scale=new Un(this.onChange,this,1,1),this.pivot=new Un(this.onChange,this,0,0),this.skew=new Un(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}onChange(){this._localID++}updateSkew(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++}toString(){return`[@pixi/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`}updateLocalTransform(){const e=this.localTransform;this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(e){const t=this.localTransform;if(this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==e._worldID){const r=e.worldTransform,n=this.worldTransform;n.a=t.a*r.a+t.b*r.c,n.b=t.a*r.b+t.b*r.d,n.c=t.c*r.a+t.d*r.c,n.d=t.c*r.b+t.d*r.d,n.tx=t.tx*r.a+t.ty*r.c+r.tx,n.ty=t.tx*r.b+t.ty*r.d+r.ty,this._parentID=e._worldID,this._worldID++}}setFromMatrix(e){e.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(e){this._rotation!==e&&(this._rotation=e,this.updateSkew())}};let su=nd;su.IDENTITY=new nd;var mw=`varying vec2 vTextureCoord;
20
+ else `),r<e-1&&(t+=`if(test == ${r}.0){}`);return t}function aw(e,t){if(e===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const r=t.createShader(t.FRAGMENT_SHADER);for(;;){const n=sw.replace(/%forloop%/gi,ow(e));if(t.shaderSource(r,n),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS))e=e/2|0;else break}return e}const Xl=0,Kl=1,Yl=2,Zl=3,Ql=4,Jl=5;let po=class ny{constructor(){this.data=0,this.blendMode=Pt.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<Xl)}set blend(t){!!(this.data&1<<Xl)!==t&&(this.data^=1<<Xl)}get offsets(){return!!(this.data&1<<Kl)}set offsets(t){!!(this.data&1<<Kl)!==t&&(this.data^=1<<Kl)}get culling(){return!!(this.data&1<<Yl)}set culling(t){!!(this.data&1<<Yl)!==t&&(this.data^=1<<Yl)}get depthTest(){return!!(this.data&1<<Zl)}set depthTest(t){!!(this.data&1<<Zl)!==t&&(this.data^=1<<Zl)}get depthMask(){return!!(this.data&1<<Jl)}set depthMask(t){!!(this.data&1<<Jl)!==t&&(this.data^=1<<Jl)}get clockwiseFrontFace(){return!!(this.data&1<<Ql)}set clockwiseFrontFace(t){!!(this.data&1<<Ql)!==t&&(this.data^=1<<Ql)}get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!==Pt.NONE,this._blendMode=t}get polygonOffset(){return this._polygonOffset}set polygonOffset(t){this.offsets=!!t,this._polygonOffset=t}toString(){return`[@pixi/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){const t=new ny;return t.depthTest=!1,t.blend=!0,t}};const tu=[];function Jh(e,t){if(!e)return null;let r="";if(typeof e=="string"){const n=/\.(\w{3,4})(?:$|\?|#)/i.exec(e);n&&(r=n[1].toLowerCase())}for(let n=tu.length-1;n>=0;--n){const i=tu[n];if(i.test&&i.test(e,r))return new i(e,t)}throw new Error("Unrecognized source type to auto-detect Resource")}class _r{constructor(t){this.items=[],this._name=t,this._aliasCount=0}emit(t,r,n,i,o,a,u,f){if(arguments.length>8)throw new Error("max arguments reached");const{name:h,items:d}=this;this._aliasCount++;for(let p=0,c=d.length;p<c;p++)d[p][h](t,r,n,i,o,a,u,f);return d===this.items&&this._aliasCount--,this}ensureNonAliasedItems(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this}remove(t){const r=this.items.indexOf(t);return r!==-1&&(this.ensureNonAliasedItems(),this.items.splice(r,1)),this}contains(t){return this.items.includes(t)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(_r.prototype,{dispatch:{value:_r.prototype.emit},run:{value:_r.prototype.emit}});class fs{constructor(t=0,r=0){this._width=t,this._height=r,this.destroyed=!1,this.internal=!1,this.onResize=new _r("setRealSize"),this.onUpdate=new _r("update"),this.onError=new _r("onError")}bind(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)}resize(t,r){(t!==this._width||r!==this._height)&&(this._width=t,this._height=r,this.onResize.emit(t,r))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(t,r,n){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(t,r){return!1}}class eu extends fs{constructor(t,r){const{width:n,height:i}=r||{};if(!n||!i)throw new Error("BufferResource width or height invalid");super(n,i),this.data=t}upload(t,r,n){const i=t.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===ln.UNPACK);const o=r.realWidth,a=r.realHeight;return n.width===o&&n.height===a?i.texSubImage2D(r.target,0,0,0,o,a,r.format,n.type,this.data):(n.width=o,n.height=a,i.texImage2D(r.target,0,n.internalFormat,o,a,0,r.format,n.type,this.data)),!0}dispose(){this.data=null}static test(t){return t instanceof Float32Array||t instanceof Uint8Array||t instanceof Uint32Array}}const lw={scaleMode:Lr.NEAREST,format:bt.RGBA,alphaMode:ln.NPM},mi=class extends Ws{constructor(e=null,t=null){super(),t=Object.assign({},mi.defaultOptions,t);const{alphaMode:r,mipmap:n,anisotropicLevel:i,scaleMode:o,width:a,height:u,wrapMode:f,format:h,type:d,target:p,resolution:c,resourceOptions:v}=t;e&&!(e instanceof fs)&&(e=Jh(e,v),e.internal=!0),this.resolution=c||Dt.RESOLUTION,this.width=Math.round((a||0)*this.resolution)/this.resolution,this.height=Math.round((u||0)*this.resolution)/this.resolution,this._mipmap=n,this.anisotropicLevel=i,this._wrapMode=f,this._scaleMode=o,this.format=h,this.type=d,this.target=p,this.alphaMode=r,this.uid=us(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=a>0&&u>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(e)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)}setStyle(e,t){let r;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,r=!0),t!==void 0&&t!==this.mipmap&&(this.mipmap=t,r=!0),r&&this.dirtyStyleId++,this}setSize(e,t,r){return r=r||this.resolution,this.setRealSize(e*r,t*r,r)}setRealSize(e,t,r){return this.resolution=r||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(t)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=Xh(this.realWidth)&&Xh(this.realHeight)}setResolution(e){const t=this.resolution;return t===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*t)/e,this.height=Math.round(this.height*t)/e,this.emit("update",this)),this._refreshPOT(),this)}setResource(e){if(this.resource===e)return this;if(this.resource)throw new Error("Resource can be set only once");return e.bind(this),this.resource=e,this}update(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))}onError(e){this.emit("error",this,e)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete hn[this.cacheId],delete $r[this.cacheId],this.cacheId=null),this.dispose(),mi.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(e,t,r=Dt.STRICT_TEXTURE_CACHE){const n=typeof e=="string";let i=null;if(n)i=e;else{if(!e._pixiId){const a=(t==null?void 0:t.pixiIdPrefix)||"pixiid";e._pixiId=`${a}_${us()}`}i=e._pixiId}let o=hn[i];if(n&&r&&!o)throw new Error(`The cacheId "${i}" does not exist in BaseTextureCache.`);return o||(o=new mi(e,t),o.cacheId=i,mi.addToCache(o,i)),o}static fromBuffer(e,t,r,n){e=e||new Float32Array(t*r*4);const i=new eu(e,{width:t,height:r}),o=e instanceof Float32Array?Xt.FLOAT:Xt.UNSIGNED_BYTE;return new mi(i,Object.assign({},lw,n||{width:t,height:r,type:o}))}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),hn[t]&&hn[t]!==e&&console.warn(`BaseTexture added to the cache with an id [${t}] that already had an entry`),hn[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=hn[e];if(t){const r=t.textureCacheIds.indexOf(e);return r>-1&&t.textureCacheIds.splice(r,1),delete hn[e],t}}else if(e!=null&&e.textureCacheIds){for(let t=0;t<e.textureCacheIds.length;++t)delete hn[e.textureCacheIds[t]];return e.textureCacheIds.length=0,e}return null}};let Kt=mi;Kt.defaultOptions={mipmap:Rn.POW2,anisotropicLevel:0,scaleMode:Lr.LINEAR,wrapMode:Ji.CLAMP,alphaMode:ln.UNPACK,target:ii.TEXTURE_2D,format:bt.RGBA,type:Xt.UNSIGNED_BYTE},Kt._globalBatch=0;class ru{constructor(){this.texArray=null,this.blend=0,this.type=an.TRIANGLES,this.start=0,this.size=0,this.data=null}}let uw=0,Qe=class iy{constructor(t,r=!0,n=!1){this.data=t||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=n,this.static=r,this.id=uw++,this.disposeRunner=new _r("disposeBuffer")}update(t){t instanceof Array&&(t=new Float32Array(t)),this.data=t||this.data,this._updateID++}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.data=null}set index(t){this.type=t?Fr.ELEMENT_ARRAY_BUFFER:Fr.ARRAY_BUFFER}get index(){return this.type===Fr.ELEMENT_ARRAY_BUFFER}static from(t){return t instanceof Array&&(t=new Float32Array(t)),new iy(t)}};class vo{constructor(t,r=0,n=!1,i=Xt.FLOAT,o,a,u,f=1){this.buffer=t,this.size=r,this.normalized=n,this.type=i,this.stride=o,this.start=a,this.instance=u,this.divisor=f}destroy(){this.buffer=null}static from(t,r,n,i,o){return new vo(t,r,n,i,o)}}const fw={Float32Array,Uint32Array,Int32Array,Uint8Array};function cw(e,t){let r=0,n=0;const i={};for(let f=0;f<e.length;f++)n+=t[f],r+=e[f].length;const o=new ArrayBuffer(r*4);let a=null,u=0;for(let f=0;f<e.length;f++){const h=t[f],d=e[f],p=Wh(d);i[p]||(i[p]=new fw[p](o)),a=i[p];for(let c=0;c<d.length;c++){const v=(c/h|0)*n+u,y=c%h;a[v+y]=d[c]}u+=h}return new Float32Array(o)}const td={5126:4,5123:2,5121:1};let hw=0;const dw={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array};class yi{constructor(t=[],r={}){this.buffers=t,this.indexBuffer=null,this.attributes=r,this.glVertexArrayObjects={},this.id=hw++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new _r("disposeGeometry"),this.refCount=0}addAttribute(t,r,n=0,i=!1,o,a,u,f=!1){if(!r)throw new Error("You must pass a buffer when creating an attribute");r instanceof Qe||(r instanceof Array&&(r=new Float32Array(r)),r=new Qe(r));const h=t.split("|");if(h.length>1){for(let p=0;p<h.length;p++)this.addAttribute(h[p],r,n,i,o);return this}let d=this.buffers.indexOf(r);return d===-1&&(this.buffers.push(r),d=this.buffers.length-1),this.attributes[t]=new vo(d,n,i,o,a,u,f),this.instanced=this.instanced||f,this}getAttribute(t){return this.attributes[t]}getBuffer(t){return this.buffers[this.getAttribute(t).buffer]}addIndex(t){return t instanceof Qe||(t instanceof Array&&(t=new Uint16Array(t)),t=new Qe(t)),t.type=Fr.ELEMENT_ARRAY_BUFFER,this.indexBuffer=t,this.buffers.includes(t)||this.buffers.push(t),this}getIndex(){return this.indexBuffer}interleave(){if(this.buffers.length===1||this.buffers.length===2&&this.indexBuffer)return this;const t=[],r=[],n=new Qe;let i;for(i in this.attributes){const o=this.attributes[i],a=this.buffers[o.buffer];t.push(a.data),r.push(o.size*td[o.type]/4),o.buffer=0}for(n.data=cw(t,r),i=0;i<this.buffers.length;i++)this.buffers[i]!==this.indexBuffer&&this.buffers[i].destroy();return this.buffers=[n],this.indexBuffer&&this.buffers.push(this.indexBuffer),this}getSize(){for(const t in this.attributes){const r=this.attributes[t];return this.buffers[r.buffer].data.length/(r.stride/4||r.size)}return 0}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.buffers=null,this.indexBuffer=null,this.attributes=null}clone(){const t=new yi;for(let r=0;r<this.buffers.length;r++)t.buffers[r]=new Qe(this.buffers[r].data.slice(0));for(const r in this.attributes){const n=this.attributes[r];t.attributes[r]=new vo(n.buffer,n.size,n.normalized,n.type,n.stride,n.start,n.instance)}return this.indexBuffer&&(t.indexBuffer=t.buffers[this.buffers.indexOf(this.indexBuffer)],t.indexBuffer.type=Fr.ELEMENT_ARRAY_BUFFER),t}static merge(t){const r=new yi,n=[],i=[],o=[];let a;for(let u=0;u<t.length;u++){a=t[u];for(let f=0;f<a.buffers.length;f++)i[f]=i[f]||0,i[f]+=a.buffers[f].data.length,o[f]=0}for(let u=0;u<a.buffers.length;u++)n[u]=new dw[Wh(a.buffers[u].data)](i[u]),r.buffers[u]=new Qe(n[u]);for(let u=0;u<t.length;u++){a=t[u];for(let f=0;f<a.buffers.length;f++)n[f].set(a.buffers[f].data,o[f]),o[f]+=a.buffers[f].data.length}if(r.attributes=a.attributes,a.indexBuffer){r.indexBuffer=r.buffers[a.buffers.indexOf(a.indexBuffer)],r.indexBuffer.type=Fr.ELEMENT_ARRAY_BUFFER;let u=0,f=0,h=0,d=0;for(let p=0;p<a.buffers.length;p++)if(a.buffers[p]!==a.indexBuffer){d=p;break}for(const p in a.attributes){const c=a.attributes[p];(c.buffer|0)===d&&(f+=c.size*td[c.type]/4)}for(let p=0;p<t.length;p++){const c=t[p].indexBuffer.data;for(let v=0;v<c.length;v++)r.indexBuffer.data[v+h]+=u;u+=t[p].buffers[d].data.length/f,h+=c.length}}return r}}class ed extends yi{constructor(t=!1){super(),this._buffer=new Qe(null,t,!1),this._indexBuffer=new Qe(null,t,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,Xt.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,Xt.FLOAT).addAttribute("aColor",this._buffer,4,!0,Xt.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,Xt.FLOAT).addIndex(this._indexBuffer)}}const go=Math.PI*2,pw=180/Math.PI,cs=Math.PI/180;var Ne=(e=>(e[e.POLY=0]="POLY",e[e.RECT=1]="RECT",e[e.CIRC=2]="CIRC",e[e.ELIP=3]="ELIP",e[e.RREC=4]="RREC",e))(Ne||{});class oe{constructor(t=0,r=0){this.x=0,this.y=0,this.x=t,this.y=r}clone(){return new oe(this.x,this.y)}copyFrom(t){return this.set(t.x,t.y),this}copyTo(t){return t.set(this.x,this.y),t}equals(t){return t.x===this.x&&t.y===this.y}set(t=0,r=t){return this.x=t,this.y=r,this}toString(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`}}const mo=[new oe,new oe,new oe,new oe];class ie{constructor(t=0,r=0,n=0,i=0){this.x=Number(t),this.y=Number(r),this.width=Number(n),this.height=Number(i),this.type=Ne.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new ie(0,0,0,0)}clone(){return new ie(this.x,this.y,this.width,this.height)}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}contains(t,r){return this.width<=0||this.height<=0?!1:t>=this.x&&t<this.x+this.width&&r>=this.y&&r<this.y+this.height}intersects(t,r){if(!r){const A=this.x<t.x?t.x:this.x;if((this.right>t.right?t.right:this.right)<=A)return!1;const R=this.y<t.y?t.y:this.y;return(this.bottom>t.bottom?t.bottom:this.bottom)>R}const n=this.left,i=this.right,o=this.top,a=this.bottom;if(i<=n||a<=o)return!1;const u=mo[0].set(t.left,t.top),f=mo[1].set(t.left,t.bottom),h=mo[2].set(t.right,t.top),d=mo[3].set(t.right,t.bottom);if(h.x<=u.x||f.y<=u.y)return!1;const p=Math.sign(r.a*r.d-r.b*r.c);if(p===0||(r.apply(u,u),r.apply(f,f),r.apply(h,h),r.apply(d,d),Math.max(u.x,f.x,h.x,d.x)<=n||Math.min(u.x,f.x,h.x,d.x)>=i||Math.max(u.y,f.y,h.y,d.y)<=o||Math.min(u.y,f.y,h.y,d.y)>=a))return!1;const c=p*(f.y-u.y),v=p*(u.x-f.x),y=c*n+v*o,_=c*i+v*o,b=c*n+v*a,m=c*i+v*a;if(Math.max(y,_,b,m)<=c*u.x+v*u.y||Math.min(y,_,b,m)>=c*d.x+v*d.y)return!1;const w=p*(u.y-h.y),T=p*(h.x-u.x),x=w*n+T*o,E=w*i+T*o,I=w*n+T*a,O=w*i+T*a;return!(Math.max(x,E,I,O)<=w*u.x+T*u.y||Math.min(x,E,I,O)>=w*d.x+T*d.y)}pad(t=0,r=t){return this.x-=t,this.y-=r,this.width+=t*2,this.height+=r*2,this}fit(t){const r=Math.max(this.x,t.x),n=Math.min(this.x+this.width,t.x+t.width),i=Math.max(this.y,t.y),o=Math.min(this.y+this.height,t.y+t.height);return this.x=r,this.width=Math.max(n-r,0),this.y=i,this.height=Math.max(o-i,0),this}ceil(t=1,r=.001){const n=Math.ceil((this.x+this.width-r)*t)/t,i=Math.ceil((this.y+this.height-r)*t)/t;return this.x=Math.floor((this.x+r)*t)/t,this.y=Math.floor((this.y+r)*t)/t,this.width=n-this.x,this.height=i-this.y,this}enlarge(t){const r=Math.min(this.x,t.x),n=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),o=Math.max(this.y+this.height,t.y+t.height);return this.x=r,this.width=n-r,this.y=i,this.height=o-i,this}toString(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}class nu{constructor(t=0,r=0,n=0){this.x=t,this.y=r,this.radius=n,this.type=Ne.CIRC}clone(){return new nu(this.x,this.y,this.radius)}contains(t,r){if(this.radius<=0)return!1;const n=this.radius*this.radius;let i=this.x-t,o=this.y-r;return i*=i,o*=o,i+o<=n}getBounds(){return new ie(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)}toString(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}}let vw=class sy{constructor(t=0,r=0,n=0,i=0){this.x=t,this.y=r,this.width=n,this.height=i,this.type=Ne.ELIP}clone(){return new sy(this.x,this.y,this.width,this.height)}contains(t,r){if(this.width<=0||this.height<=0)return!1;let n=(t-this.x)/this.width,i=(r-this.y)/this.height;return n*=n,i*=i,n+i<=1}getBounds(){return new ie(this.x-this.width,this.y-this.height,this.width,this.height)}toString(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}};class hs{constructor(...t){let r=Array.isArray(t[0])?t[0]:t;if(typeof r[0]!="number"){const n=[];for(let i=0,o=r.length;i<o;i++)n.push(r[i].x,r[i].y);r=n}this.points=r,this.type=Ne.POLY,this.closeStroke=!0}clone(){const t=this.points.slice(),r=new hs(t);return r.closeStroke=this.closeStroke,r}contains(t,r){let n=!1;const i=this.points.length/2;for(let o=0,a=i-1;o<i;a=o++){const u=this.points[o*2],f=this.points[o*2+1],h=this.points[a*2],d=this.points[a*2+1];f>r!=d>r&&t<(h-u)*((r-f)/(d-f))+u&&(n=!n)}return n}toString(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((t,r)=>`${t}, ${r}`,"")}]`}}class iu{constructor(t=0,r=0,n=0,i=0,o=20){this.x=t,this.y=r,this.width=n,this.height=i,this.radius=o,this.type=Ne.RREC}clone(){return new iu(this.x,this.y,this.width,this.height,this.radius)}contains(t,r){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&r>=this.y&&r<=this.y+this.height){const n=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(r>=this.y+n&&r<=this.y+this.height-n||t>=this.x+n&&t<=this.x+this.width-n)return!0;let i=t-(this.x+n),o=r-(this.y+n);const a=n*n;if(i*i+o*o<=a||(i=t-(this.x+this.width-n),i*i+o*o<=a)||(o=r-(this.y+this.height-n),i*i+o*o<=a)||(i=t-(this.x+n),i*i+o*o<=a))return!0}return!1}toString(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}let $e=class za{constructor(t=1,r=0,n=0,i=1,o=0,a=0){this.array=null,this.a=t,this.b=r,this.c=n,this.d=i,this.tx=o,this.ty=a}fromArray(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]}set(t,r,n,i,o,a){return this.a=t,this.b=r,this.c=n,this.d=i,this.tx=o,this.ty=a,this}toArray(t,r){this.array||(this.array=new Float32Array(9));const n=r||this.array;return t?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n}apply(t,r){r=r||new oe;const n=t.x,i=t.y;return r.x=this.a*n+this.c*i+this.tx,r.y=this.b*n+this.d*i+this.ty,r}applyInverse(t,r){r=r||new oe;const n=1/(this.a*this.d+this.c*-this.b),i=t.x,o=t.y;return r.x=this.d*n*i+-this.c*n*o+(this.ty*this.c-this.tx*this.d)*n,r.y=this.a*n*o+-this.b*n*i+(-this.ty*this.a+this.tx*this.b)*n,r}translate(t,r){return this.tx+=t,this.ty+=r,this}scale(t,r){return this.a*=t,this.d*=r,this.c*=t,this.b*=r,this.tx*=t,this.ty*=r,this}rotate(t){const r=Math.cos(t),n=Math.sin(t),i=this.a,o=this.c,a=this.tx;return this.a=i*r-this.b*n,this.b=i*n+this.b*r,this.c=o*r-this.d*n,this.d=o*n+this.d*r,this.tx=a*r-this.ty*n,this.ty=a*n+this.ty*r,this}append(t){const r=this.a,n=this.b,i=this.c,o=this.d;return this.a=t.a*r+t.b*i,this.b=t.a*n+t.b*o,this.c=t.c*r+t.d*i,this.d=t.c*n+t.d*o,this.tx=t.tx*r+t.ty*i+this.tx,this.ty=t.tx*n+t.ty*o+this.ty,this}setTransform(t,r,n,i,o,a,u,f,h){return this.a=Math.cos(u+h)*o,this.b=Math.sin(u+h)*o,this.c=-Math.sin(u-f)*a,this.d=Math.cos(u-f)*a,this.tx=t-(n*this.a+i*this.c),this.ty=r-(n*this.b+i*this.d),this}prepend(t){const r=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){const n=this.a,i=this.c;this.a=n*t.a+this.b*t.c,this.b=n*t.b+this.b*t.d,this.c=i*t.a+this.d*t.c,this.d=i*t.b+this.d*t.d}return this.tx=r*t.a+this.ty*t.c+t.tx,this.ty=r*t.b+this.ty*t.d+t.ty,this}decompose(t){const r=this.a,n=this.b,i=this.c,o=this.d,a=t.pivot,u=-Math.atan2(-i,o),f=Math.atan2(n,r),h=Math.abs(u+f);return h<1e-5||Math.abs(go-h)<1e-5?(t.rotation=f,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=u,t.skew.y=f),t.scale.x=Math.sqrt(r*r+n*n),t.scale.y=Math.sqrt(i*i+o*o),t.position.x=this.tx+(a.x*r+a.y*i),t.position.y=this.ty+(a.x*n+a.y*o),t}invert(){const t=this.a,r=this.b,n=this.c,i=this.d,o=this.tx,a=t*i-r*n;return this.a=i/a,this.b=-r/a,this.c=-n/a,this.d=t/a,this.tx=(n*this.ty-i*o)/a,this.ty=-(t*this.ty-r*o)/a,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const t=new za;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyTo(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyFrom(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this}toString(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return new za}static get TEMP_MATRIX(){return new za}};const Ln=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Fn=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Bn=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Dn=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],su=[],rd=[],yo=Math.sign;function gw(){for(let e=0;e<16;e++){const t=[];su.push(t);for(let r=0;r<16;r++){const n=yo(Ln[e]*Ln[r]+Bn[e]*Fn[r]),i=yo(Fn[e]*Ln[r]+Dn[e]*Fn[r]),o=yo(Ln[e]*Bn[r]+Bn[e]*Dn[r]),a=yo(Fn[e]*Bn[r]+Dn[e]*Dn[r]);for(let u=0;u<16;u++)if(Ln[u]===n&&Fn[u]===i&&Bn[u]===o&&Dn[u]===a){t.push(u);break}}}for(let e=0;e<16;e++){const t=new $e;t.set(Ln[e],Fn[e],Bn[e],Dn[e],0,0),rd.push(t)}}gw();const ve={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:e=>Ln[e],uY:e=>Fn[e],vX:e=>Bn[e],vY:e=>Dn[e],inv:e=>e&8?e&15:-e&7,add:(e,t)=>su[e][t],sub:(e,t)=>su[e][ve.inv(t)],rotate180:e=>e^4,isVertical:e=>(e&3)===2,byDirection:(e,t)=>Math.abs(e)*2<=Math.abs(t)?t>=0?ve.S:ve.N:Math.abs(t)*2<=Math.abs(e)?e>0?ve.E:ve.W:t>0?e>0?ve.SE:ve.SW:e>0?ve.NE:ve.NW,matrixAppendRotationInv:(e,t,r=0,n=0)=>{const i=rd[ve.inv(t)];i.tx=r,i.ty=n,e.append(i)}};class Un{constructor(t,r,n=0,i=0){this._x=n,this._y=i,this.cb=t,this.scope=r}clone(t=this.cb,r=this.scope){return new Un(t,r,this._x,this._y)}set(t=0,r=t){return(this._x!==t||this._y!==r)&&(this._x=t,this._y=r,this.cb.call(this.scope)),this}copyFrom(t){return(this._x!==t.x||this._y!==t.y)&&(this._x=t.x,this._y=t.y,this.cb.call(this.scope)),this}copyTo(t){return t.set(this._x,this._y),t}equals(t){return t.x===this._x&&t.y===this._y}toString(){return`[@pixi/math:ObservablePoint x=0 y=0 scope=${this.scope}]`}get x(){return this._x}set x(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))}get y(){return this._y}set y(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))}}const nd=class{constructor(){this.worldTransform=new $e,this.localTransform=new $e,this.position=new Un(this.onChange,this,0,0),this.scale=new Un(this.onChange,this,1,1),this.pivot=new Un(this.onChange,this,0,0),this.skew=new Un(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}onChange(){this._localID++}updateSkew(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++}toString(){return`[@pixi/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`}updateLocalTransform(){const e=this.localTransform;this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(e){const t=this.localTransform;if(this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==e._worldID){const r=e.worldTransform,n=this.worldTransform;n.a=t.a*r.a+t.b*r.c,n.b=t.a*r.b+t.b*r.d,n.c=t.c*r.a+t.d*r.c,n.d=t.c*r.b+t.d*r.d,n.tx=t.tx*r.a+t.ty*r.c+r.tx,n.ty=t.tx*r.b+t.ty*r.d+r.ty,this._parentID=e._worldID,this._worldID++}}setFromMatrix(e){e.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(e){this._rotation!==e&&(this._rotation=e,this.updateSkew())}};let ou=nd;ou.IDENTITY=new nd;var mw=`varying vec2 vTextureCoord;
21
21
 
22
22
  uniform sampler2D uSampler;
23
23
 
@@ -34,7 +34,7 @@ void main(void){
34
34
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
35
35
  vTextureCoord = aTextureCoord;
36
36
  }
37
- `;function id(e,t,r){const n=e.createShader(t);return e.shaderSource(n,r),e.compileShader(n),n}function ou(e){const t=new Array(e);for(let r=0;r<t.length;r++)t[r]=!1;return t}function sd(e,t){switch(e){case"float":return 0;case"vec2":return new Float32Array(2*t);case"vec3":return new Float32Array(3*t);case"vec4":return new Float32Array(4*t);case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*t);case"ivec3":return new Int32Array(3*t);case"ivec4":return new Int32Array(4*t);case"uvec2":return new Uint32Array(2*t);case"uvec3":return new Uint32Array(3*t);case"uvec4":return new Uint32Array(4*t);case"bool":return!1;case"bvec2":return ou(2*t);case"bvec3":return ou(3*t);case"bvec4":return ou(4*t);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}const _i=[{test:e=>e.type==="float"&&e.size===1&&!e.isArray,code:e=>`
37
+ `;function id(e,t,r){const n=e.createShader(t);return e.shaderSource(n,r),e.compileShader(n),n}function au(e){const t=new Array(e);for(let r=0;r<t.length;r++)t[r]=!1;return t}function sd(e,t){switch(e){case"float":return 0;case"vec2":return new Float32Array(2*t);case"vec3":return new Float32Array(3*t);case"vec4":return new Float32Array(4*t);case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*t);case"ivec3":return new Int32Array(3*t);case"ivec4":return new Int32Array(4*t);case"uvec2":return new Uint32Array(2*t);case"uvec3":return new Uint32Array(3*t);case"uvec4":return new Uint32Array(4*t);case"bool":return!1;case"bvec2":return au(2*t);case"bvec3":return au(3*t);case"bvec4":return au(4*t);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}const _i=[{test:e=>e.type==="float"&&e.size===1&&!e.isArray,code:e=>`
38
38
  if(uv["${e}"] !== ud["${e}"].value)
39
39
  {
40
40
  ud["${e}"].value = uv["${e}"]
@@ -305,13 +305,13 @@ void main(void){
305
305
  cv = cu.value;
306
306
  v = uv["${i}"];
307
307
  ${h};`)}}return new Function("ud","uv","renderer","syncData",r.join(`
308
- `))}const od={};let bi=od;function ww(){if(bi===od||bi!=null&&bi.isContextLost()){const e=Dt.ADAPTER.createCanvas();let t;Dt.PREFER_ENV>=Cn.WEBGL2&&(t=e.getContext("webgl2",{})),t||(t=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}),t?t.getExtension("WEBGL_draw_buffers"):t=null),bi=t}return bi}let yo;function Tw(){if(!yo){yo=ar.MEDIUM;const e=ww();e&&e.getShaderPrecisionFormat&&(yo=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision?ar.HIGH:ar.MEDIUM)}return yo}function ad(e,t){const r=e.getShaderSource(t).split(`
308
+ `))}const od={};let bi=od;function ww(){if(bi===od||bi!=null&&bi.isContextLost()){const e=Dt.ADAPTER.createCanvas();let t;Dt.PREFER_ENV>=Cn.WEBGL2&&(t=e.getContext("webgl2",{})),t||(t=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}),t?t.getExtension("WEBGL_draw_buffers"):t=null),bi=t}return bi}let _o;function Tw(){if(!_o){_o=ar.MEDIUM;const e=ww();e&&e.getShaderPrecisionFormat&&(_o=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision?ar.HIGH:ar.MEDIUM)}return _o}function ad(e,t){const r=e.getShaderSource(t).split(`
309
309
  `).map((h,d)=>`${d}: ${h}`),n=e.getShaderInfoLog(t),i=n.split(`
310
310
  `),o={},a=i.map(h=>parseFloat(h.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(h=>h&&!o[h]?(o[h]=!0,!0):!1),u=[""];a.forEach(h=>{r[h-1]=`%c${r[h-1]}%c`,u.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});const f=r.join(`
311
- `);u[0]=f,console.error(n),console.groupCollapsed("click to view full shader code"),console.warn(...u),console.groupEnd()}function Ew(e,t,r,n){e.getProgramParameter(t,e.LINK_STATUS)||(e.getShaderParameter(r,e.COMPILE_STATUS)||ad(e,r),e.getShaderParameter(n,e.COMPILE_STATUS)||ad(e,n),console.error("PixiJS Error: Could not initialize shader."),e.getProgramInfoLog(t)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",e.getProgramInfoLog(t)))}const Sw={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function ld(e){return Sw[e]}let _o=null;const ud={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function fd(e,t){if(!_o){const r=Object.keys(ud);_o={};for(let n=0;n<r.length;++n){const i=r[n];_o[e[i]]=ud[i]}}return _o[t]}function cd(e,t,r){if(e.substring(0,9)!=="precision"){let n=t;return t===ar.HIGH&&r!==ar.HIGH&&(n=ar.MEDIUM),`precision ${n} float;
312
- ${e}`}else if(r!==ar.HIGH&&e.substring(0,15)==="precision highp")return e.replace("precision highp","precision mediump");return e}let hs;function Aw(){if(typeof hs=="boolean")return hs;try{hs=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{hs=!1}return hs}let Ow=0;const bo={},xi=class{constructor(e,t,r="pixi-shader",n={}){this.extra={},this.id=Ow++,this.vertexSrc=e||xi.defaultVertexSrc,this.fragmentSrc=t||xi.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.extra=n,this.vertexSrc.substring(0,8)!=="#version"&&(r=r.replace(/\s+/g,"-"),bo[r]?(bo[r]++,r+=`-${bo[r]}`):bo[r]=1,this.vertexSrc=`#define SHADER_NAME ${r}
311
+ `);u[0]=f,console.error(n),console.groupCollapsed("click to view full shader code"),console.warn(...u),console.groupEnd()}function Ew(e,t,r,n){e.getProgramParameter(t,e.LINK_STATUS)||(e.getShaderParameter(r,e.COMPILE_STATUS)||ad(e,r),e.getShaderParameter(n,e.COMPILE_STATUS)||ad(e,n),console.error("PixiJS Error: Could not initialize shader."),e.getProgramInfoLog(t)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",e.getProgramInfoLog(t)))}const Sw={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function ld(e){return Sw[e]}let bo=null;const ud={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function fd(e,t){if(!bo){const r=Object.keys(ud);bo={};for(let n=0;n<r.length;++n){const i=r[n];bo[e[i]]=ud[i]}}return bo[t]}function cd(e,t,r){if(e.substring(0,9)!=="precision"){let n=t;return t===ar.HIGH&&r!==ar.HIGH&&(n=ar.MEDIUM),`precision ${n} float;
312
+ ${e}`}else if(r!==ar.HIGH&&e.substring(0,15)==="precision highp")return e.replace("precision highp","precision mediump");return e}let ds;function Aw(){if(typeof ds=="boolean")return ds;try{ds=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{ds=!1}return ds}let Ow=0;const xo={},xi=class{constructor(e,t,r="pixi-shader",n={}){this.extra={},this.id=Ow++,this.vertexSrc=e||xi.defaultVertexSrc,this.fragmentSrc=t||xi.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.extra=n,this.vertexSrc.substring(0,8)!=="#version"&&(r=r.replace(/\s+/g,"-"),xo[r]?(xo[r]++,r+=`-${xo[r]}`):xo[r]=1,this.vertexSrc=`#define SHADER_NAME ${r}
313
313
  ${this.vertexSrc}`,this.fragmentSrc=`#define SHADER_NAME ${r}
314
- ${this.fragmentSrc}`,this.vertexSrc=cd(this.vertexSrc,xi.defaultVertexPrecision,ar.HIGH),this.fragmentSrc=cd(this.fragmentSrc,xi.defaultFragmentPrecision,Tw())),this.glPrograms={},this.syncUniforms=null}static get defaultVertexSrc(){return yw}static get defaultFragmentSrc(){return mw}static from(e,t,r){const n=e+t;let i=Yh[n];return i||(Yh[n]=i=new xi(e,t,r)),i}};let Xr=xi;Xr.defaultVertexPrecision=ar.HIGH,Xr.defaultFragmentPrecision=oi.apple.device?ar.HIGH:ar.MEDIUM;let Cw=0;class br{constructor(t,r,n){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=Cw++,this.static=!!r,this.ubo=!!n,t instanceof Qe?(this.buffer=t,this.buffer.type=Fr.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=t,this.ubo&&(this.buffer=new Qe(new Float32Array(1)),this.buffer.type=Fr.UNIFORM_BUFFER,this.autoManage=!0))}update(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()}add(t,r,n){if(!this.ubo)this.uniforms[t]=new br(r,n);else throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them")}static from(t,r,n){return new br(t,r,n)}static uboFrom(t,r){return new br(t,r??!0,!0)}}class ds{constructor(t,r){this.uniformBindCount=0,this.program=t,r?r instanceof br?this.uniformGroup=r:this.uniformGroup=new br(r):this.uniformGroup=new br({}),this.disposeRunner=new _r("disposeShader")}checkUniformExists(t,r){if(r.uniforms[t])return!0;for(const n in r.uniforms){const i=r.uniforms[n];if(i.group&&this.checkUniformExists(t,i))return!0}return!1}destroy(){this.uniformGroup=null,this.disposeRunner.emit(this),this.disposeRunner.destroy()}get uniforms(){return this.uniformGroup.uniforms}static from(t,r,n){const i=Xr.from(t,r);return new ds(i,n)}}class Rw{constructor(t,r){if(this.vertexSrc=t,this.fragTemplate=r,this.programCache={},this.defaultGroupCache={},!r.includes("%count%"))throw new Error('Fragment template must contain "%count%".');if(!r.includes("%forloop%"))throw new Error('Fragment template must contain "%forloop%".')}generateShader(t){if(!this.programCache[t]){const n=new Int32Array(t);for(let o=0;o<t;o++)n[o]=o;this.defaultGroupCache[t]=br.from({uSamplers:n},!0);let i=this.fragTemplate;i=i.replace(/%count%/gi,`${t}`),i=i.replace(/%forloop%/gi,this.generateSampleSrc(t)),this.programCache[t]=new Xr(this.vertexSrc,i)}const r={tint:new Float32Array([1,1,1,1]),translationMatrix:new $e,default:this.defaultGroupCache[t]};return new ds(this.programCache[t],r)}generateSampleSrc(t){let r="";r+=`
314
+ ${this.fragmentSrc}`,this.vertexSrc=cd(this.vertexSrc,xi.defaultVertexPrecision,ar.HIGH),this.fragmentSrc=cd(this.fragmentSrc,xi.defaultFragmentPrecision,Tw())),this.glPrograms={},this.syncUniforms=null}static get defaultVertexSrc(){return yw}static get defaultFragmentSrc(){return mw}static from(e,t,r){const n=e+t;let i=Yh[n];return i||(Yh[n]=i=new xi(e,t,r)),i}};let Xr=xi;Xr.defaultVertexPrecision=ar.HIGH,Xr.defaultFragmentPrecision=oi.apple.device?ar.HIGH:ar.MEDIUM;let Cw=0;class br{constructor(t,r,n){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=Cw++,this.static=!!r,this.ubo=!!n,t instanceof Qe?(this.buffer=t,this.buffer.type=Fr.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=t,this.ubo&&(this.buffer=new Qe(new Float32Array(1)),this.buffer.type=Fr.UNIFORM_BUFFER,this.autoManage=!0))}update(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()}add(t,r,n){if(!this.ubo)this.uniforms[t]=new br(r,n);else throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them")}static from(t,r,n){return new br(t,r,n)}static uboFrom(t,r){return new br(t,r??!0,!0)}}class ps{constructor(t,r){this.uniformBindCount=0,this.program=t,r?r instanceof br?this.uniformGroup=r:this.uniformGroup=new br(r):this.uniformGroup=new br({}),this.disposeRunner=new _r("disposeShader")}checkUniformExists(t,r){if(r.uniforms[t])return!0;for(const n in r.uniforms){const i=r.uniforms[n];if(i.group&&this.checkUniformExists(t,i))return!0}return!1}destroy(){this.uniformGroup=null,this.disposeRunner.emit(this),this.disposeRunner.destroy()}get uniforms(){return this.uniformGroup.uniforms}static from(t,r,n){const i=Xr.from(t,r);return new ps(i,n)}}class Rw{constructor(t,r){if(this.vertexSrc=t,this.fragTemplate=r,this.programCache={},this.defaultGroupCache={},!r.includes("%count%"))throw new Error('Fragment template must contain "%count%".');if(!r.includes("%forloop%"))throw new Error('Fragment template must contain "%forloop%".')}generateShader(t){if(!this.programCache[t]){const n=new Int32Array(t);for(let o=0;o<t;o++)n[o]=o;this.defaultGroupCache[t]=br.from({uSamplers:n},!0);let i=this.fragTemplate;i=i.replace(/%count%/gi,`${t}`),i=i.replace(/%forloop%/gi,this.generateSampleSrc(t)),this.programCache[t]=new Xr(this.vertexSrc,i)}const r={tint:new Float32Array([1,1,1,1]),translationMatrix:new $e,default:this.defaultGroupCache[t]};return new ps(this.programCache[t],r)}generateSampleSrc(t){let r="";r+=`
315
315
  `,r+=`
316
316
  `;for(let n=0;n<t;n++)n>0&&(r+=`
317
317
  else `),n<t-1&&(r+=`if(vTextureId < ${n}.5)`),r+=`
@@ -319,7 +319,7 @@ else `),n<t-1&&(r+=`if(vTextureId < ${n}.5)`),r+=`
319
319
  color = texture2D(uSamplers[${n}], vTextureCoord);`,r+=`
320
320
  }`;return r+=`
321
321
  `,r+=`
322
- `,r}}class au{constructor(){this.elements=[],this.ids=[],this.count=0}clear(){for(let t=0;t<this.count;t++)this.elements[t]=null;this.count=0}}function Iw(){return!oi.apple.device}function Pw(e){let t=!0;const r=Dt.ADAPTER.getNavigator();if(oi.tablet||oi.phone){if(oi.apple.device){const n=r.userAgent.match(/OS (\d+)_(\d+)?/);n&&parseInt(n[1],10)<11&&(t=!1)}if(oi.android.device){const n=r.userAgent.match(/Android\s([0-9.]*)/);n&&parseInt(n[1],10)<7&&(t=!1)}}return t?e:4}class hd{constructor(t){this.renderer=t}flush(){}destroy(){this.renderer=null}start(){}stop(){this.flush()}render(t){}}var Nw=`varying vec2 vTextureCoord;
322
+ `,r}}class lu{constructor(){this.elements=[],this.ids=[],this.count=0}clear(){for(let t=0;t<this.count;t++)this.elements[t]=null;this.count=0}}function Iw(){return!oi.apple.device}function Pw(e){let t=!0;const r=Dt.ADAPTER.getNavigator();if(oi.tablet||oi.phone){if(oi.apple.device){const n=r.userAgent.match(/OS (\d+)_(\d+)?/);n&&parseInt(n[1],10)<11&&(t=!1)}if(oi.android.device){const n=r.userAgent.match(/Android\s([0-9.]*)/);n&&parseInt(n[1],10)<7&&(t=!1)}}return t?e:4}class hd{constructor(t){this.renderer=t}flush(){}destroy(){this.renderer=null}start(){}stop(){this.flush()}render(t){}}var Nw=`varying vec2 vTextureCoord;
323
323
  varying vec4 vColor;
324
324
  varying float vTextureId;
325
325
  uniform sampler2D uSamplers[%count%];
@@ -350,7 +350,7 @@ void main(void){
350
350
  vTextureId = aTextureId;
351
351
  vColor = aColor * tint;
352
352
  }
353
- `;const xr=class extends hd{constructor(e){super(e),this.setShaderGenerator(),this.geometryClass=ed,this.vertexSize=6,this.state=ho.for2d(),this.size=xr.defaultBatchSize*4,this._vertexCount=0,this._indexCount=0,this._bufferedElements=[],this._bufferedTextures=[],this._bufferSize=0,this._shader=null,this._packedGeometries=[],this._packedGeometryPoolSize=2,this._flushId=0,this._aBuffers={},this._iBuffers={},this.maxTextures=1,this.renderer.on("prerender",this.onPrerender,this),e.runners.contextChange.add(this),this._dcIndex=0,this._aIndex=0,this._iIndex=0,this._attributeBuffer=null,this._indexBuffer=null,this._tempBoundTextures=[]}static get defaultMaxTextures(){return this._defaultMaxTextures=this._defaultMaxTextures??Pw(32),this._defaultMaxTextures}static set defaultMaxTextures(e){this._defaultMaxTextures=e}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??Iw(),this._canUploadSameBuffer}static set canUploadSameBuffer(e){this._canUploadSameBuffer=e}get MAX_TEXTURES(){return zt("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return Mw}static get defaultFragmentTemplate(){return Nw}setShaderGenerator({vertex:e=xr.defaultVertexSrc,fragment:t=xr.defaultFragmentTemplate}={}){this.shaderGenerator=new Rw(e,t)}contextChange(){const e=this.renderer.gl;Dt.PREFER_ENV===Cn.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),xr.defaultMaxTextures),this.maxTextures=aw(this.maxTextures,e)),this._shader=this.shaderGenerator.generateShader(this.maxTextures);for(let t=0;t<this._packedGeometryPoolSize;t++)this._packedGeometries[t]=new this.geometryClass;this.initFlushBuffers()}initFlushBuffers(){const{_drawCallPool:e,_textureArrayPool:t}=xr,r=this.size/4,n=Math.floor(r/this.maxTextures)+1;for(;e.length<r;)e.push(new eu);for(;t.length<n;)t.push(new au);for(let i=0;i<this.maxTextures;i++)this._tempBoundTextures[i]=null}onPrerender(){this._flushId=0}render(e){e._texture.valid&&(this._vertexCount+e.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)}buildTexturesAndDrawCalls(){const{_bufferedTextures:e,maxTextures:t}=this,r=xr._textureArrayPool,n=this.renderer.batch,i=this._tempBoundTextures,o=this.renderer.textureGC.count;let a=++Kt._globalBatch,u=0,f=r[0],h=0;n.copyBoundTextures(i,t);for(let d=0;d<this._bufferSize;++d){const p=e[d];e[d]=null,p._batchEnabled!==a&&(f.count>=t&&(n.boundArray(f,i,a,t),this.buildDrawCalls(f,h,d),h=d,f=r[++u],++a),p._batchEnabled=a,p.touched=o,f.elements[f.count++]=p)}f.count>0&&(n.boundArray(f,i,a,t),this.buildDrawCalls(f,h,this._bufferSize),++u,++a);for(let d=0;d<i.length;d++)i[d]=null;Kt._globalBatch=a}buildDrawCalls(e,t,r){const{_bufferedElements:n,_attributeBuffer:i,_indexBuffer:o,vertexSize:a}=this,u=xr._drawCallPool;let f=this._dcIndex,h=this._aIndex,d=this._iIndex,p=u[f];p.start=this._iIndex,p.texArray=e;for(let c=t;c<r;++c){const v=n[c],y=v._texture.baseTexture,b=ew[y.alphaMode?1:0][v.blendMode];n[c]=null,t<c&&p.blend!==b&&(p.size=d-p.start,t=c,p=u[++f],p.texArray=e,p.start=d),this.packInterleavedGeometry(v,i,o,h,d),h+=v.vertexData.length/2*a,d+=v.indices.length,p.blend=b}t<r&&(p.size=d-p.start,++f),this._dcIndex=f,this._aIndex=h,this._iIndex=d}bindAndClearTexArray(e){const t=this.renderer.texture;for(let r=0;r<e.count;r++)t.bind(e.elements[r],e.ids[r]),e.elements[r]=null;e.count=0}updateGeometry(){const{_packedGeometries:e,_attributeBuffer:t,_indexBuffer:r}=this;xr.canUploadSameBuffer?(e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(r),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,e[this._flushId]=new this.geometryClass),e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(r),this.renderer.geometry.bind(e[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)}drawBatches(){const e=this._dcIndex,{gl:t,state:r}=this.renderer,n=xr._drawCallPool;let i=null;for(let o=0;o<e;o++){const{texArray:a,type:u,size:f,start:h,blend:d}=n[o];i!==a&&(i=a,this.bindAndClearTexArray(a)),this.state.blendMode=d,r.set(this.state),t.drawElements(u,f,t.UNSIGNED_SHORT,h*2)}}flush(){this._vertexCount!==0&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)}start(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.maxTextures),this.renderer.shader.bind(this._shader),xr.canUploadSameBuffer&&this.renderer.geometry.bind(this._packedGeometries[this._flushId])}stop(){this.flush()}destroy(){for(let e=0;e<this._packedGeometryPoolSize;e++)this._packedGeometries[e]&&this._packedGeometries[e].destroy();this.renderer.off("prerender",this.onPrerender,this),this._aBuffers=null,this._iBuffers=null,this._packedGeometries=null,this._attributeBuffer=null,this._indexBuffer=null,this._shader&&(this._shader.destroy(),this._shader=null),super.destroy()}getAttributeBuffer(e){const t=uo(Math.ceil(e/8)),r=Kh(t),n=t*8;this._aBuffers.length<=r&&(this._iBuffers.length=r+1);let i=this._aBuffers[n];return i||(this._aBuffers[n]=i=new iw(n*this.vertexSize*4)),i}getIndexBuffer(e){const t=uo(Math.ceil(e/12)),r=Kh(t),n=t*12;this._iBuffers.length<=r&&(this._iBuffers.length=r+1);let i=this._iBuffers[r];return i||(this._iBuffers[r]=i=new Uint16Array(n)),i}packInterleavedGeometry(e,t,r,n,i){const{uint32View:o,float32View:a}=t,u=n/this.vertexSize,f=e.uvs,h=e.indices,d=e.vertexData,p=e._texture.baseTexture._batchLocation,c=Math.min(e.worldAlpha,1),v=Be.shared.setValue(e._tintRGB).toPremultiplied(c);for(let y=0;y<d.length;y+=2)a[n++]=d[y],a[n++]=d[y+1],a[n++]=f[y],a[n++]=f[y+1],o[n++]=v,a[n++]=p;for(let y=0;y<h.length;y++)r[i++]=u+h[y]}};let wr=xr;wr.defaultBatchSize=4096,wr.extension={name:"batch",type:jt.RendererPlugin},wr._drawCallPool=[],wr._textureArrayPool=[],te.add(wr);var kw=`varying vec2 vTextureCoord;
353
+ `;const xr=class extends hd{constructor(e){super(e),this.setShaderGenerator(),this.geometryClass=ed,this.vertexSize=6,this.state=po.for2d(),this.size=xr.defaultBatchSize*4,this._vertexCount=0,this._indexCount=0,this._bufferedElements=[],this._bufferedTextures=[],this._bufferSize=0,this._shader=null,this._packedGeometries=[],this._packedGeometryPoolSize=2,this._flushId=0,this._aBuffers={},this._iBuffers={},this.maxTextures=1,this.renderer.on("prerender",this.onPrerender,this),e.runners.contextChange.add(this),this._dcIndex=0,this._aIndex=0,this._iIndex=0,this._attributeBuffer=null,this._indexBuffer=null,this._tempBoundTextures=[]}static get defaultMaxTextures(){return this._defaultMaxTextures=this._defaultMaxTextures??Pw(32),this._defaultMaxTextures}static set defaultMaxTextures(e){this._defaultMaxTextures=e}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??Iw(),this._canUploadSameBuffer}static set canUploadSameBuffer(e){this._canUploadSameBuffer=e}get MAX_TEXTURES(){return Ht("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return Mw}static get defaultFragmentTemplate(){return Nw}setShaderGenerator({vertex:e=xr.defaultVertexSrc,fragment:t=xr.defaultFragmentTemplate}={}){this.shaderGenerator=new Rw(e,t)}contextChange(){const e=this.renderer.gl;Dt.PREFER_ENV===Cn.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),xr.defaultMaxTextures),this.maxTextures=aw(this.maxTextures,e)),this._shader=this.shaderGenerator.generateShader(this.maxTextures);for(let t=0;t<this._packedGeometryPoolSize;t++)this._packedGeometries[t]=new this.geometryClass;this.initFlushBuffers()}initFlushBuffers(){const{_drawCallPool:e,_textureArrayPool:t}=xr,r=this.size/4,n=Math.floor(r/this.maxTextures)+1;for(;e.length<r;)e.push(new ru);for(;t.length<n;)t.push(new lu);for(let i=0;i<this.maxTextures;i++)this._tempBoundTextures[i]=null}onPrerender(){this._flushId=0}render(e){e._texture.valid&&(this._vertexCount+e.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)}buildTexturesAndDrawCalls(){const{_bufferedTextures:e,maxTextures:t}=this,r=xr._textureArrayPool,n=this.renderer.batch,i=this._tempBoundTextures,o=this.renderer.textureGC.count;let a=++Kt._globalBatch,u=0,f=r[0],h=0;n.copyBoundTextures(i,t);for(let d=0;d<this._bufferSize;++d){const p=e[d];e[d]=null,p._batchEnabled!==a&&(f.count>=t&&(n.boundArray(f,i,a,t),this.buildDrawCalls(f,h,d),h=d,f=r[++u],++a),p._batchEnabled=a,p.touched=o,f.elements[f.count++]=p)}f.count>0&&(n.boundArray(f,i,a,t),this.buildDrawCalls(f,h,this._bufferSize),++u,++a);for(let d=0;d<i.length;d++)i[d]=null;Kt._globalBatch=a}buildDrawCalls(e,t,r){const{_bufferedElements:n,_attributeBuffer:i,_indexBuffer:o,vertexSize:a}=this,u=xr._drawCallPool;let f=this._dcIndex,h=this._aIndex,d=this._iIndex,p=u[f];p.start=this._iIndex,p.texArray=e;for(let c=t;c<r;++c){const v=n[c],y=v._texture.baseTexture,_=ew[y.alphaMode?1:0][v.blendMode];n[c]=null,t<c&&p.blend!==_&&(p.size=d-p.start,t=c,p=u[++f],p.texArray=e,p.start=d),this.packInterleavedGeometry(v,i,o,h,d),h+=v.vertexData.length/2*a,d+=v.indices.length,p.blend=_}t<r&&(p.size=d-p.start,++f),this._dcIndex=f,this._aIndex=h,this._iIndex=d}bindAndClearTexArray(e){const t=this.renderer.texture;for(let r=0;r<e.count;r++)t.bind(e.elements[r],e.ids[r]),e.elements[r]=null;e.count=0}updateGeometry(){const{_packedGeometries:e,_attributeBuffer:t,_indexBuffer:r}=this;xr.canUploadSameBuffer?(e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(r),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,e[this._flushId]=new this.geometryClass),e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(r),this.renderer.geometry.bind(e[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)}drawBatches(){const e=this._dcIndex,{gl:t,state:r}=this.renderer,n=xr._drawCallPool;let i=null;for(let o=0;o<e;o++){const{texArray:a,type:u,size:f,start:h,blend:d}=n[o];i!==a&&(i=a,this.bindAndClearTexArray(a)),this.state.blendMode=d,r.set(this.state),t.drawElements(u,f,t.UNSIGNED_SHORT,h*2)}}flush(){this._vertexCount!==0&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)}start(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.maxTextures),this.renderer.shader.bind(this._shader),xr.canUploadSameBuffer&&this.renderer.geometry.bind(this._packedGeometries[this._flushId])}stop(){this.flush()}destroy(){for(let e=0;e<this._packedGeometryPoolSize;e++)this._packedGeometries[e]&&this._packedGeometries[e].destroy();this.renderer.off("prerender",this.onPrerender,this),this._aBuffers=null,this._iBuffers=null,this._packedGeometries=null,this._attributeBuffer=null,this._indexBuffer=null,this._shader&&(this._shader.destroy(),this._shader=null),super.destroy()}getAttributeBuffer(e){const t=fo(Math.ceil(e/8)),r=Kh(t),n=t*8;this._aBuffers.length<=r&&(this._iBuffers.length=r+1);let i=this._aBuffers[n];return i||(this._aBuffers[n]=i=new iw(n*this.vertexSize*4)),i}getIndexBuffer(e){const t=fo(Math.ceil(e/12)),r=Kh(t),n=t*12;this._iBuffers.length<=r&&(this._iBuffers.length=r+1);let i=this._iBuffers[r];return i||(this._iBuffers[r]=i=new Uint16Array(n)),i}packInterleavedGeometry(e,t,r,n,i){const{uint32View:o,float32View:a}=t,u=n/this.vertexSize,f=e.uvs,h=e.indices,d=e.vertexData,p=e._texture.baseTexture._batchLocation,c=Math.min(e.worldAlpha,1),v=Be.shared.setValue(e._tintRGB).toPremultiplied(c);for(let y=0;y<d.length;y+=2)a[n++]=d[y],a[n++]=d[y+1],a[n++]=f[y],a[n++]=f[y+1],o[n++]=v,a[n++]=p;for(let y=0;y<h.length;y++)r[i++]=u+h[y]}};let wr=xr;wr.defaultBatchSize=4096,wr.extension={name:"batch",type:qt.RendererPlugin},wr._drawCallPool=[],wr._textureArrayPool=[],te.add(wr);var kw=`varying vec2 vTextureCoord;
354
354
 
355
355
  uniform sampler2D uSampler;
356
356
 
@@ -383,7 +383,7 @@ void main(void)
383
383
  gl_Position = filterVertexPosition();
384
384
  vTextureCoord = filterTextureCoord();
385
385
  }
386
- `;const ps=class extends ds{constructor(e,t,r){const n=Xr.from(e||ps.defaultVertexSrc,t||ps.defaultFragmentSrc);super(n,r),this.padding=0,this.resolution=ps.defaultResolution,this.multisample=ps.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new ho}apply(e,t,r,n,i){e.applyFilter(this,t,r,n)}get blendMode(){return this.state.blendMode}set blendMode(e){this.state.blendMode=e}get resolution(){return this._resolution}set resolution(e){this._resolution=e}static get defaultVertexSrc(){return Lw}static get defaultFragmentSrc(){return kw}};let Zt=ps;Zt.defaultResolution=1,Zt.defaultMultisample=Te.NONE;class xo{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new Be(0),this.alpha=1}init(t){this.clearBeforeRender=t.clearBeforeRender;const{backgroundColor:r,background:n,backgroundAlpha:i}=t,o=n??r;o!==void 0&&(this.color=o),this.alpha=i}get color(){return this._backgroundColor.value}set color(t){this._backgroundColor.setValue(t)}get alpha(){return this._backgroundColor.alpha}set alpha(t){this._backgroundColor.setAlpha(t)}get backgroundColor(){return this._backgroundColor}destroy(){}}xo.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0},xo.extension={type:[jt.RendererSystem,jt.CanvasRendererSystem],name:"background"},te.add(xo);class dd{constructor(t){this.renderer=t,this.emptyRenderer=new hd(t),this.currentRenderer=this.emptyRenderer}setObjectRenderer(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())}flush(){this.setObjectRenderer(this.emptyRenderer)}reset(){this.setObjectRenderer(this.emptyRenderer)}copyBoundTextures(t,r){const{boundTextures:n}=this.renderer.texture;for(let i=r-1;i>=0;--i)t[i]=n[i]||null,t[i]&&(t[i]._batchLocation=i)}boundArray(t,r,n,i){const{elements:o,ids:a,count:u}=t;let f=0;for(let h=0;h<u;h++){const d=o[h],p=d._batchLocation;if(p>=0&&p<i&&r[p]===d){a[h]=p;continue}for(;f<i;){const c=r[f];if(c&&c._batchEnabled===n&&c._batchLocation===f){f++;continue}a[h]=f,d._batchLocation=f,r[f]=d;break}}}destroy(){this.renderer=null}}dd.extension={type:jt.RendererSystem,name:"batch"},te.add(dd);let pd=0;class wo{constructor(t){this.renderer=t,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this)}get isLost(){return!this.gl||this.gl.isContextLost()}contextChange(t){this.gl=t,this.renderer.gl=t,this.renderer.CONTEXT_UID=pd++}init(t){if(t.context)this.initFromContext(t.context);else{const r=this.renderer.background.alpha<1,n=t.premultipliedAlpha;this.preserveDrawingBuffer=t.preserveDrawingBuffer,this.useContextAlpha=t.useContextAlpha,this.powerPreference=t.powerPreference,this.initFromOptions({alpha:r,premultipliedAlpha:n,antialias:t.antialias,stencil:!0,preserveDrawingBuffer:t.preserveDrawingBuffer,powerPreference:t.powerPreference})}}initFromContext(t){this.gl=t,this.validateContext(t),this.renderer.gl=t,this.renderer.CONTEXT_UID=pd++,this.renderer.runners.contextChange.emit(t);const r=this.renderer.view;r.addEventListener!==void 0&&(r.addEventListener("webglcontextlost",this.handleContextLost,!1),r.addEventListener("webglcontextrestored",this.handleContextRestored,!1))}initFromOptions(t){const r=this.createContext(this.renderer.view,t);this.initFromContext(r)}createContext(t,r){let n;if(Dt.PREFER_ENV>=Cn.WEBGL2&&(n=t.getContext("webgl2",r)),n)this.webGLVersion=2;else if(this.webGLVersion=1,n=t.getContext("webgl",r)||t.getContext("experimental-webgl",r),!n)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=n,this.getExtensions(),this.gl}getExtensions(){const{gl:t}=this,r={loseContext:t.getExtension("WEBGL_lose_context"),anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),s3tc:t.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:t.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:t.getExtension("WEBGL_compressed_texture_etc"),etc1:t.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:t.getExtension("WEBGL_compressed_texture_atc"),astc:t.getExtension("WEBGL_compressed_texture_astc")};this.webGLVersion===1?Object.assign(this.extensions,r,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,r,{colorBufferFloat:t.getExtension("EXT_color_buffer_float")})}handleContextLost(t){t.preventDefault(),setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()},0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){const t=this.renderer.view;this.renderer=null,t.removeEventListener!==void 0&&(t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(t){const r=t.getContextAttributes(),n="WebGL2RenderingContext"in globalThis&&t instanceof globalThis.WebGL2RenderingContext;n&&(this.webGLVersion=2),r&&!r.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const i=n||!!t.getExtension("OES_element_index_uint");this.supports.uint32Indices=i,i||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}wo.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"},wo.extension={type:jt.RendererSystem,name:"context"},te.add(wo);class Fw extends tu{upload(t,r,n){const i=t.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===ln.UNPACK);const o=r.realWidth,a=r.realHeight;return n.width===o&&n.height===a?i.texSubImage2D(r.target,0,0,0,o,a,r.format,n.type,this.data):(n.width=o,n.height=a,i.texImage2D(r.target,0,n.internalFormat,o,a,0,r.format,n.type,this.data)),!0}}class lu{constructor(t,r){this.width=Math.round(t||100),this.height=Math.round(r||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new _r("disposeFramebuffer"),this.multisample=Te.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(t=0,r){return this.colorTextures[t]=r||new Kt(null,{scaleMode:Lr.NEAREST,resolution:1,mipmap:Rn.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(t){return this.depthTexture=t||new Kt(new Fw(null,{width:this.width,height:this.height}),{scaleMode:Lr.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:Rn.OFF,format:_t.DEPTH_COMPONENT,type:Xt.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this}enableDepth(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this}enableStencil(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this}resize(t,r){if(t=Math.round(t),r=Math.round(r),!(t===this.width&&r===this.height)){this.width=t,this.height=r,this.dirtyId++,this.dirtySize++;for(let n=0;n<this.colorTextures.length;n++){const i=this.colorTextures[n],o=i.resolution;i.setSize(t/o,r/o)}if(this.depthTexture){const n=this.depthTexture.resolution;this.depthTexture.setSize(t/n,r/n)}}}dispose(){this.disposeRunner.emit(this,!1)}destroyDepthTexture(){this.depthTexture&&(this.depthTexture.destroy(),this.depthTexture=null,++this.dirtyId,++this.dirtyFormat)}}class vd extends Kt{constructor(t={}){if(typeof t=="number"){const r=arguments[0],n=arguments[1],i=arguments[2],o=arguments[3];t={width:r,height:n,scaleMode:i,resolution:o}}t.width=t.width||100,t.height=t.height||100,t.multisample??(t.multisample=Te.NONE),super(null,t),this.mipmap=Rn.OFF,this.valid=!0,this._clear=new Be([0,0,0,0]),this.framebuffer=new lu(this.realWidth,this.realHeight).addColorTexture(0,this),this.framebuffer.multisample=t.multisample,this.maskStack=[],this.filterStack=[{}]}set clearColor(t){this._clear.setValue(t)}get clearColor(){return this._clear.value}get clear(){return this._clear}resize(t,r){this.framebuffer.resize(t*this.resolution,r*this.resolution),this.setRealSize(this.framebuffer.width,this.framebuffer.height)}dispose(){this.framebuffer.dispose(),super.dispose()}destroy(){super.destroy(),this.framebuffer.destroyDepthTexture(),this.framebuffer=null}}class dn extends us{constructor(t){const r=t,n=r.naturalWidth||r.videoWidth||r.width,i=r.naturalHeight||r.videoHeight||r.height;super(n,i),this.source=t,this.noSubImage=!1}static crossOrigin(t,r,n){n===void 0&&!r.startsWith("data:")?t.crossOrigin=nw(r):n!==!1&&(t.crossOrigin=typeof n=="string"?n:"anonymous")}upload(t,r,n,i){const o=t.gl,a=r.realWidth,u=r.realHeight;if(i=i||this.source,typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement){if(!i.complete||i.naturalWidth===0)return!1}else if(typeof HTMLVideoElement<"u"&&i instanceof HTMLVideoElement&&i.readyState<=1&&i.buffered.length===0)return!1;return o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===ln.UNPACK),!this.noSubImage&&r.target===o.TEXTURE_2D&&n.width===a&&n.height===u?o.texSubImage2D(o.TEXTURE_2D,0,0,0,r.format,n.type,i):(n.width=a,n.height=u,o.texImage2D(r.target,0,n.internalFormat,r.format,n.type,i)),!0}update(){if(this.destroyed)return;const t=this.source,r=t.naturalWidth||t.videoWidth||t.width,n=t.naturalHeight||t.videoHeight||t.height;this.resize(r,n),super.update()}dispose(){this.source=null}}class gd extends dn{constructor(t,r){if(r=r||{},typeof t=="string"){const n=new Image;dn.crossOrigin(n,t,r.crossorigin),n.src=t,t=n}super(t),!t.complete&&this._width&&this._height&&(this._width=0,this._height=0),this.url=t.src,this._process=null,this.preserveBitmap=!1,this.createBitmap=(r.createBitmap??Dt.CREATE_IMAGE_BITMAP)&&!!globalThis.createImageBitmap,this.alphaMode=typeof r.alphaMode=="number"?r.alphaMode:null,this.bitmap=null,this._load=null,r.autoLoad!==!1&&this.load()}load(t){return this._load?this._load:(t!==void 0&&(this.createBitmap=t),this._load=new Promise((r,n)=>{const i=this.source;this.url=i.src;const o=()=>{this.destroyed||(i.onload=null,i.onerror=null,this.resize(i.width,i.height),this._load=null,this.createBitmap?r(this.process()):r(this))};i.complete&&i.src?o():(i.onload=o,i.onerror=a=>{n(a),this.onError.emit(a)})}),this._load)}process(){const t=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);const r=globalThis.createImageBitmap,n=!t.crossOrigin||t.crossOrigin==="anonymous";return this._process=fetch(t.src,{mode:n?"cors":"no-cors"}).then(i=>i.blob()).then(i=>r(i,0,0,t.width,t.height,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===ln.UNPACK?"premultiply":"none"})).then(i=>this.destroyed?Promise.reject():(this.bitmap=i,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(t,r,n){if(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(t,r,n);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(t,r,n,this.bitmap),!this.preserveBitmap){let i=!0;const o=r._glTextures;for(const a in o){const u=o[a];if(u!==n&&u.dirtyId!==r.dirtyId){i=!1;break}}i&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(t){return typeof HTMLImageElement<"u"&&(typeof t=="string"||t instanceof HTMLImageElement)}}class md{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(t,r,n){const i=r.width,o=r.height;if(n){const a=t.width/2/i,u=t.height/2/o,f=t.x/i+a,h=t.y/o+u;n=ve.add(n,ve.NW),this.x0=f+a*ve.uX(n),this.y0=h+u*ve.uY(n),n=ve.add(n,2),this.x1=f+a*ve.uX(n),this.y1=h+u*ve.uY(n),n=ve.add(n,2),this.x2=f+a*ve.uX(n),this.y2=h+u*ve.uY(n),n=ve.add(n,2),this.x3=f+a*ve.uX(n),this.y3=h+u*ve.uY(n)}else this.x0=t.x/i,this.y0=t.y/o,this.x1=(t.x+t.width)/i,this.y1=t.y/o,this.x2=(t.x+t.width)/i,this.y2=(t.y+t.height)/o,this.x3=t.x/i,this.y3=(t.y+t.height)/o;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3}toString(){return`[@pixi/core:TextureUvs x0=${this.x0} y0=${this.y0} x1=${this.x1} y1=${this.y1} x2=${this.x2} y2=${this.y2} x3=${this.x3} y3=${this.y3}]`}}const yd=new md;function To(e){e.destroy=function(){},e.on=function(){},e.once=function(){},e.emit=function(){}}class Wt extends Vs{constructor(t,r,n,i,o,a,u){if(super(),this.noFrame=!1,r||(this.noFrame=!0,r=new ne(0,0,1,1)),t instanceof Wt&&(t=t.baseTexture),this.baseTexture=t,this._frame=r,this.trim=i,this.valid=!1,this._uvs=yd,this.uvMatrix=null,this.orig=n||r,this._rotate=Number(o||0),o===!0)this._rotate=2;else if(this._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=a?new se(a.x,a.y):new se(0,0),this.defaultBorders=u,this._updateID=0,this.textureCacheIds=[],t.valid?this.noFrame?t.valid&&this.onBaseTextureUpdated(t):this.frame=r:t.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&t.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(t){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=t.width,this._frame.height=t.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(t){if(this.baseTexture){if(t){const{resource:r}=this.baseTexture;r!=null&&r.url&&$r[r.url]&&Wt.removeFromCache(r.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,Wt.removeFromCache(this),this.textureCacheIds=null}clone(){var i;const t=this._frame.clone(),r=this._frame===this.orig?t:this.orig.clone(),n=new Wt(this.baseTexture,!this.noFrame&&t,r,(i=this.trim)==null?void 0:i.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(n._frame=t),n}updateUvs(){this._uvs===yd&&(this._uvs=new md),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(t,r={},n=Dt.STRICT_TEXTURE_CACHE){const i=typeof t=="string";let o=null;if(i)o=t;else if(t instanceof Kt){if(!t.cacheId){const u=(r==null?void 0:r.pixiIdPrefix)||"pixiid";t.cacheId=`${u}-${ls()}`,Kt.addToCache(t,t.cacheId)}o=t.cacheId}else{if(!t._pixiId){const u=(r==null?void 0:r.pixiIdPrefix)||"pixiid";t._pixiId=`${u}_${ls()}`}o=t._pixiId}let a=$r[o];if(i&&n&&!a)throw new Error(`The cacheId "${o}" does not exist in TextureCache.`);return!a&&!(t instanceof Kt)?(r.resolution||(r.resolution=Zh(t)),a=new Wt(new Kt(t,r)),a.baseTexture.cacheId=o,Kt.addToCache(a.baseTexture,o),Wt.addToCache(a,o)):!a&&t instanceof Kt&&(a=new Wt(t),Wt.addToCache(a,o)),a}static fromURL(t,r){const n=Object.assign({autoLoad:!1},r==null?void 0:r.resourceOptions),i=Wt.from(t,Object.assign({resourceOptions:n},r),!1),o=i.baseTexture.resource;return i.baseTexture.valid?Promise.resolve(i):o.load().then(()=>Promise.resolve(i))}static fromBuffer(t,r,n,i){return new Wt(Kt.fromBuffer(t,r,n,i))}static fromLoader(t,r,n,i){const o=new Kt(t,Object.assign({scaleMode:Kt.defaultOptions.scaleMode,resolution:Zh(r)},i)),{resource:a}=o;a instanceof gd&&(a.url=r);const u=new Wt(o);return n||(n=r),Kt.addToCache(u.baseTexture,n),Wt.addToCache(u,n),n!==r&&(Kt.addToCache(u.baseTexture,r),Wt.addToCache(u,r)),u.baseTexture.valid?Promise.resolve(u):new Promise(f=>{u.baseTexture.once("loaded",()=>f(u))})}static addToCache(t,r){r&&(t.textureCacheIds.includes(r)||t.textureCacheIds.push(r),$r[r]&&$r[r]!==t&&console.warn(`Texture added to the cache with an id [${r}] that already had an entry`),$r[r]=t)}static removeFromCache(t){if(typeof t=="string"){const r=$r[t];if(r){const n=r.textureCacheIds.indexOf(t);return n>-1&&r.textureCacheIds.splice(n,1),delete $r[t],r}}else if(t!=null&&t.textureCacheIds){for(let r=0;r<t.textureCacheIds.length;++r)$r[t.textureCacheIds[r]]===t&&delete $r[t.textureCacheIds[r]];return t.textureCacheIds.length=0,t}return null}get resolution(){return this.baseTexture.resolution}get frame(){return this._frame}set frame(t){this._frame=t,this.noFrame=!1;const{x:r,y:n,width:i,height:o}=t,a=r+i>this.baseTexture.width,u=n+o>this.baseTexture.height;if(a||u){const f=a&&u?"and":"or",h=`X: ${r} + ${i} = ${r+i} > ${this.baseTexture.width}`,d=`Y: ${n} + ${o} = ${n+o} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${h} ${f} ${d}`)}this.valid=i&&o&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=t),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(t){this._rotate=t,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return Wt._EMPTY||(Wt._EMPTY=new Wt(new Kt),To(Wt._EMPTY),To(Wt._EMPTY.baseTexture)),Wt._EMPTY}static get WHITE(){if(!Wt._WHITE){const t=Dt.ADAPTER.createCanvas(16,16),r=t.getContext("2d");t.width=16,t.height=16,r.fillStyle="white",r.fillRect(0,0,16,16),Wt._WHITE=new Wt(Kt.from(t)),To(Wt._WHITE),To(Wt._WHITE.baseTexture)}return Wt._WHITE}}class Eo extends Wt{constructor(t,r){super(t,r),this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}get framebuffer(){return this.baseTexture.framebuffer}get multisample(){return this.framebuffer.multisample}set multisample(t){this.framebuffer.multisample=t}resize(t,r,n=!0){const i=this.baseTexture.resolution,o=Math.round(t*i)/i,a=Math.round(r*i)/i;this.valid=o>0&&a>0,this._frame.width=this.orig.width=o,this._frame.height=this.orig.height=a,n&&this.baseTexture.resize(o,a),this.updateUvs()}setResolution(t){const{baseTexture:r}=this;r.resolution!==t&&(r.setResolution(t),this.resize(r.width,r.height,!1))}static create(t){return new Eo(new vd(t))}}class _d{constructor(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(t,r,n=Te.NONE){const i=new vd(Object.assign({width:t,height:r,resolution:1,multisample:n},this.textureOptions));return new Eo(i)}getOptimalTexture(t,r,n=1,i=Te.NONE){let o;t=Math.ceil(t*n-1e-6),r=Math.ceil(r*n-1e-6),!this.enableFullScreen||t!==this._pixelsWidth||r!==this._pixelsHeight?(t=uo(t),r=uo(r),o=((t&65535)<<16|r&65535)>>>0,i>1&&(o+=i*4294967296)):o=i>1?-i:-1,this.texturePool[o]||(this.texturePool[o]=[]);let a=this.texturePool[o].pop();return a||(a=this.createTexture(t,r,i)),a.filterPoolKey=o,a.setResolution(n),a}getFilterTexture(t,r,n){const i=this.getOptimalTexture(t.width,t.height,r||t.resolution,n||Te.NONE);return i.filterFrame=t.filterFrame,i}returnTexture(t){const r=t.filterPoolKey;t.filterFrame=null,this.texturePool[r].push(t)}returnFilterTexture(t){this.returnTexture(t)}clear(t){if(t=t!==!1,t)for(const r in this.texturePool){const n=this.texturePool[r];if(n)for(let i=0;i<n.length;i++)n[i].destroy(!0)}this.texturePool={}}setScreenSize(t){if(!(t.width===this._pixelsWidth&&t.height===this._pixelsHeight)){this.enableFullScreen=t.width>0&&t.height>0;for(const r in this.texturePool){if(!(Number(r)<0))continue;const n=this.texturePool[r];if(n)for(let i=0;i<n.length;i++)n[i].destroy(!0);this.texturePool[r]=[]}this._pixelsWidth=t.width,this._pixelsHeight=t.height}}}_d.SCREEN_KEY=-1;class Bw extends yi{constructor(){super(),this.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2])}}class Dw extends yi{constructor(){super(),this.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),this.uvs=new Float32Array([0,0,1,0,1,1,0,1]),this.vertexBuffer=new Qe(this.vertices),this.uvBuffer=new Qe(this.uvs),this.addAttribute("aVertexPosition",this.vertexBuffer).addAttribute("aTextureCoord",this.uvBuffer).addIndex([0,1,2,0,2,3])}map(t,r){let n=0,i=0;return this.uvs[0]=n,this.uvs[1]=i,this.uvs[2]=n+r.width/t.width,this.uvs[3]=i,this.uvs[4]=n+r.width/t.width,this.uvs[5]=i+r.height/t.height,this.uvs[6]=n,this.uvs[7]=i+r.height/t.height,n=r.x,i=r.y,this.vertices[0]=n,this.vertices[1]=i,this.vertices[2]=n+r.width,this.vertices[3]=i,this.vertices[4]=n+r.width,this.vertices[5]=i+r.height,this.vertices[6]=n,this.vertices[7]=i+r.height,this.invalidate(),this}invalidate(){return this.vertexBuffer._updateID++,this.uvBuffer._updateID++,this}}class Uw{constructor(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=Te.NONE,this.sourceFrame=new ne,this.destinationFrame=new ne,this.bindingSourceFrame=new ne,this.bindingDestinationFrame=new ne,this.filters=[],this.transform=null}clear(){this.target=null,this.filters=null,this.renderTexture=null}}const So=[new se,new se,new se,new se],uu=new $e;class bd{constructor(t){this.renderer=t,this.defaultFilterStack=[{}],this.texturePool=new _d,this.statePool=[],this.quad=new Bw,this.quadUv=new Dw,this.tempRect=new ne,this.activeState={},this.globalUniforms=new br({outputFrame:new ne,inputSize:new Float32Array(4),inputPixel:new Float32Array(4),inputClamp:new Float32Array(4),resolution:1,filterArea:new Float32Array(4),filterClamp:new Float32Array(4)},!0),this.forceClear=!1,this.useMaxPadding=!1}init(){this.texturePool.setScreenSize(this.renderer.view)}push(t,r){const n=this.renderer,i=this.defaultFilterStack,o=this.statePool.pop()||new Uw,a=this.renderer.renderTexture;let u=r[0].resolution,f=r[0].multisample,h=r[0].padding,d=r[0].autoFit,p=r[0].legacy??!0;for(let y=1;y<r.length;y++){const b=r[y];u=Math.min(u,b.resolution),f=Math.min(f,b.multisample),h=this.useMaxPadding?Math.max(h,b.padding):h+b.padding,d=d&&b.autoFit,p=p||(b.legacy??!0)}i.length===1&&(this.defaultFilterStack[0].renderTexture=a.current),i.push(o),o.resolution=u,o.multisample=f,o.legacy=p,o.target=t,o.sourceFrame.copyFrom(t.filterArea||t.getBounds(!0)),o.sourceFrame.pad(h);const c=this.tempRect.copyFrom(a.sourceFrame);n.projection.transform&&this.transformAABB(uu.copyFrom(n.projection.transform).invert(),c),d?(o.sourceFrame.fit(c),(o.sourceFrame.width<=0||o.sourceFrame.height<=0)&&(o.sourceFrame.width=0,o.sourceFrame.height=0)):o.sourceFrame.intersects(c)||(o.sourceFrame.width=0,o.sourceFrame.height=0),this.roundFrame(o.sourceFrame,a.current?a.current.resolution:n.resolution,a.sourceFrame,a.destinationFrame,n.projection.transform),o.renderTexture=this.getOptimalFilterTexture(o.sourceFrame.width,o.sourceFrame.height,u,f),o.filters=r,o.destinationFrame.width=o.renderTexture.width,o.destinationFrame.height=o.renderTexture.height;const v=this.tempRect;v.x=0,v.y=0,v.width=o.sourceFrame.width,v.height=o.sourceFrame.height,o.renderTexture.filterFrame=o.sourceFrame,o.bindingSourceFrame.copyFrom(a.sourceFrame),o.bindingDestinationFrame.copyFrom(a.destinationFrame),o.transform=n.projection.transform,n.projection.transform=null,a.bind(o.renderTexture,o.sourceFrame,v),n.framebuffer.clear(0,0,0,0)}pop(){const t=this.defaultFilterStack,r=t.pop(),n=r.filters;this.activeState=r;const i=this.globalUniforms.uniforms;i.outputFrame=r.sourceFrame,i.resolution=r.resolution;const o=i.inputSize,a=i.inputPixel,u=i.inputClamp;if(o[0]=r.destinationFrame.width,o[1]=r.destinationFrame.height,o[2]=1/o[0],o[3]=1/o[1],a[0]=Math.round(o[0]*r.resolution),a[1]=Math.round(o[1]*r.resolution),a[2]=1/a[0],a[3]=1/a[1],u[0]=.5*a[2],u[1]=.5*a[3],u[2]=r.sourceFrame.width*o[2]-.5*a[2],u[3]=r.sourceFrame.height*o[3]-.5*a[3],r.legacy){const h=i.filterArea;h[0]=r.destinationFrame.width,h[1]=r.destinationFrame.height,h[2]=r.sourceFrame.x,h[3]=r.sourceFrame.y,i.filterClamp=i.inputClamp}this.globalUniforms.update();const f=t[t.length-1];if(this.renderer.framebuffer.blit(),n.length===1)n[0].apply(this,r.renderTexture,f.renderTexture,In.BLEND,r),this.returnFilterTexture(r.renderTexture);else{let h=r.renderTexture,d=this.getOptimalFilterTexture(h.width,h.height,r.resolution);d.filterFrame=h.filterFrame;let p=0;for(p=0;p<n.length-1;++p){p===1&&r.multisample>1&&(d=this.getOptimalFilterTexture(h.width,h.height,r.resolution),d.filterFrame=h.filterFrame),n[p].apply(this,h,d,In.CLEAR,r);const c=h;h=d,d=c}n[p].apply(this,h,f.renderTexture,In.BLEND,r),p>1&&r.multisample>1&&this.returnFilterTexture(r.renderTexture),this.returnFilterTexture(h),this.returnFilterTexture(d)}r.clear(),this.statePool.push(r)}bindAndClear(t,r=In.CLEAR){const{renderTexture:n,state:i}=this.renderer;if(t===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,t!=null&&t.filterFrame){const a=this.tempRect;a.x=0,a.y=0,a.width=t.filterFrame.width,a.height=t.filterFrame.height,n.bind(t,t.filterFrame,a)}else t!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?n.bind(t):this.renderer.renderTexture.bind(t,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const o=i.stateId&1||this.forceClear;(r===In.CLEAR||r===In.BLIT&&o)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(t,r,n,i){const o=this.renderer;o.state.set(t.state),this.bindAndClear(n,i),t.uniforms.uSampler=r,t.uniforms.filterGlobals=this.globalUniforms,o.shader.bind(t),t.legacy=!!t.program.attributeData.aTextureCoord,t.legacy?(this.quadUv.map(r._frame,r.filterFrame),o.geometry.bind(this.quadUv),o.geometry.draw(an.TRIANGLES)):(o.geometry.bind(this.quad),o.geometry.draw(an.TRIANGLE_STRIP))}calculateSpriteMatrix(t,r){const{sourceFrame:n,destinationFrame:i}=this.activeState,{orig:o}=r._texture,a=t.set(i.width,0,0,i.height,n.x,n.y),u=r.worldTransform.copyTo($e.TEMP_MATRIX);return u.invert(),a.prepend(u),a.scale(1/o.width,1/o.height),a.translate(r.anchor.x,r.anchor.y),a}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(t,r,n=1,i=Te.NONE){return this.texturePool.getOptimalTexture(t,r,n,i)}getFilterTexture(t,r,n){if(typeof t=="number"){const o=t;t=r,r=o}t=t||this.activeState.renderTexture;const i=this.texturePool.getOptimalTexture(t.width,t.height,r||t.resolution,n||Te.NONE);return i.filterFrame=t.filterFrame,i}returnFilterTexture(t){this.texturePool.returnTexture(t)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(t,r){const n=So[0],i=So[1],o=So[2],a=So[3];n.set(r.left,r.top),i.set(r.left,r.bottom),o.set(r.right,r.top),a.set(r.right,r.bottom),t.apply(n,n),t.apply(i,i),t.apply(o,o),t.apply(a,a);const u=Math.min(n.x,i.x,o.x,a.x),f=Math.min(n.y,i.y,o.y,a.y),h=Math.max(n.x,i.x,o.x,a.x),d=Math.max(n.y,i.y,o.y,a.y);r.x=u,r.y=f,r.width=h-u,r.height=d-f}roundFrame(t,r,n,i,o){if(!(t.width<=0||t.height<=0||n.width<=0||n.height<=0)){if(o){const{a,b:u,c:f,d:h}=o;if((Math.abs(u)>1e-4||Math.abs(f)>1e-4)&&(Math.abs(a)>1e-4||Math.abs(h)>1e-4))return}o=o?uu.copyFrom(o):uu.identity(),o.translate(-n.x,-n.y).scale(i.width/n.width,i.height/n.height).translate(i.x,i.y),this.transformAABB(o,t),t.ceil(r),this.transformAABB(o.invert(),t)}}}bd.extension={type:jt.RendererSystem,name:"filter"},te.add(bd);class $w{constructor(t){this.framebuffer=t,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=Te.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const Gw=new ne;class xd{constructor(t){this.renderer=t,this.managedFramebuffers=[],this.unknownFramebuffer=new lu(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);const t=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new ne,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let r=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;Dt.PREFER_ENV===Cn.WEBGL_LEGACY&&(r=null,n=null),r?t.drawBuffers=i=>r.drawBuffersWEBGL(i):(this.hasMRT=!1,t.drawBuffers=()=>{}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=t.getInternalformatParameter(t.RENDERBUFFER,t.RGBA8,t.SAMPLES)}bind(t,r,n=0){const{gl:i}=this;if(t){const o=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,i.bindFramebuffer(i.FRAMEBUFFER,o.framebuffer)),o.mipLevel!==n&&(t.dirtyId++,t.dirtyFormat++,o.mipLevel=n),o.dirtyId!==t.dirtyId&&(o.dirtyId=t.dirtyId,o.dirtyFormat!==t.dirtyFormat?(o.dirtyFormat=t.dirtyFormat,o.dirtySize=t.dirtySize,this.updateFramebuffer(t,n)):o.dirtySize!==t.dirtySize&&(o.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(let a=0;a<t.colorTextures.length;a++){const u=t.colorTextures[a];this.renderer.texture.unbind(u.parentTextureArray||u)}if(t.depthTexture&&this.renderer.texture.unbind(t.depthTexture),r){const a=r.width>>n,u=r.height>>n,f=a/r.width;this.setViewport(r.x*f,r.y*f,a,u)}else{const a=t.width>>n,u=t.height>>n;this.setViewport(0,0,a,u)}}else this.current&&(this.current=null,i.bindFramebuffer(i.FRAMEBUFFER,null)),r?this.setViewport(r.x,r.y,r.width,r.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(t,r,n,i){const o=this.viewport;t=Math.round(t),r=Math.round(r),n=Math.round(n),i=Math.round(i),(o.width!==n||o.height!==i||o.x!==t||o.y!==r)&&(o.x=t,o.y=r,o.width=n,o.height=i,this.gl.viewport(t,r,n,i))}get size(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}}clear(t,r,n,i,o=nl.COLOR|nl.DEPTH){const{gl:a}=this;a.clearColor(t,r,n,i),a.clear(o)}initFramebuffer(t){const{gl:r}=this,n=new $w(r.createFramebuffer());return n.multisample=this.detectSamples(t.multisample),t.glFramebuffers[this.CONTEXT_UID]=n,this.managedFramebuffers.push(t),t.disposeRunner.add(this),n}resizeFramebuffer(t){const{gl:r}=this,n=t.glFramebuffers[this.CONTEXT_UID];n.stencil&&(r.bindRenderbuffer(r.RENDERBUFFER,n.stencil),n.msaaBuffer?r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,r.DEPTH24_STENCIL8,t.width,t.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t.width,t.height));const i=t.colorTextures;let o=i.length;r.drawBuffers||(o=Math.min(o,1));for(let a=0;a<o;a++){const u=i[a],f=u.parentTextureArray||u;this.renderer.texture.bind(f,0),a===0&&n.msaaBuffer&&(r.bindRenderbuffer(r.RENDERBUFFER,n.msaaBuffer),r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,f._glTextures[this.CONTEXT_UID].internalFormat,t.width,t.height))}t.depthTexture&&this.writeDepthTexture&&this.renderer.texture.bind(t.depthTexture,0)}updateFramebuffer(t,r){const{gl:n}=this,i=t.glFramebuffers[this.CONTEXT_UID],o=t.colorTextures;let a=o.length;n.drawBuffers||(a=Math.min(a,1)),i.multisample>1&&this.canMultisampleFramebuffer(t)?i.msaaBuffer=i.msaaBuffer||n.createRenderbuffer():i.msaaBuffer&&(n.deleteRenderbuffer(i.msaaBuffer),i.msaaBuffer=null,i.blitFramebuffer&&(i.blitFramebuffer.dispose(),i.blitFramebuffer=null));const u=[];for(let f=0;f<a;f++){const h=o[f],d=h.parentTextureArray||h;this.renderer.texture.bind(d,0),f===0&&i.msaaBuffer?(n.bindRenderbuffer(n.RENDERBUFFER,i.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,d._glTextures[this.CONTEXT_UID].internalFormat,t.width,t.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,i.msaaBuffer)):(n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+f,h.target,d._glTextures[this.CONTEXT_UID].texture,r),u.push(n.COLOR_ATTACHMENT0+f))}if(u.length>1&&n.drawBuffers(u),t.depthTexture&&this.writeDepthTexture){const h=t.depthTexture;this.renderer.texture.bind(h,0),n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,h._glTextures[this.CONTEXT_UID].texture,r)}(t.stencil||t.depth)&&!(t.depthTexture&&this.writeDepthTexture)?(i.stencil=i.stencil||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,i.stencil),i.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,n.DEPTH24_STENCIL8,t.width,t.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t.width,t.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,i.stencil)):i.stencil&&(n.deleteRenderbuffer(i.stencil),i.stencil=null)}canMultisampleFramebuffer(t){return this.renderer.context.webGLVersion!==1&&t.colorTextures.length<=1&&!t.depthTexture}detectSamples(t){const{msaaSamples:r}=this;let n=Te.NONE;if(t<=1||r===null)return n;for(let i=0;i<r.length;i++)if(r[i]<=t){n=r[i];break}return n===1&&(n=Te.NONE),n}blit(t,r,n){const{current:i,renderer:o,gl:a,CONTEXT_UID:u}=this;if(o.context.webGLVersion!==2||!i)return;const f=i.glFramebuffers[u];if(!f)return;if(!t){if(!f.msaaBuffer)return;const d=i.colorTextures[0];if(!d)return;f.blitFramebuffer||(f.blitFramebuffer=new lu(i.width,i.height),f.blitFramebuffer.addColorTexture(0,d)),t=f.blitFramebuffer,t.colorTextures[0]!==d&&(t.colorTextures[0]=d,t.dirtyId++,t.dirtyFormat++),(t.width!==i.width||t.height!==i.height)&&(t.width=i.width,t.height=i.height,t.dirtyId++,t.dirtySize++)}r||(r=Gw,r.width=i.width,r.height=i.height),n||(n=r);const h=r.width===n.width&&r.height===n.height;this.bind(t),a.bindFramebuffer(a.READ_FRAMEBUFFER,f.framebuffer),a.blitFramebuffer(r.left,r.top,r.right,r.bottom,n.left,n.top,n.right,n.bottom,a.COLOR_BUFFER_BIT,h?a.NEAREST:a.LINEAR)}disposeFramebuffer(t,r){const n=t.glFramebuffers[this.CONTEXT_UID],i=this.gl;if(!n)return;delete t.glFramebuffers[this.CONTEXT_UID];const o=this.managedFramebuffers.indexOf(t);o>=0&&this.managedFramebuffers.splice(o,1),t.disposeRunner.remove(this),r||(i.deleteFramebuffer(n.framebuffer),n.msaaBuffer&&i.deleteRenderbuffer(n.msaaBuffer),n.stencil&&i.deleteRenderbuffer(n.stencil)),n.blitFramebuffer&&this.disposeFramebuffer(n.blitFramebuffer,r)}disposeAll(t){const r=this.managedFramebuffers;this.managedFramebuffers=[];for(let n=0;n<r.length;n++)this.disposeFramebuffer(r[n],t)}forceStencil(){const t=this.current;if(!t)return;const r=t.glFramebuffers[this.CONTEXT_UID];if(!r||r.stencil)return;t.stencil=!0;const n=t.width,i=t.height,o=this.gl,a=o.createRenderbuffer();o.bindRenderbuffer(o.RENDERBUFFER,a),r.msaaBuffer?o.renderbufferStorageMultisample(o.RENDERBUFFER,r.multisample,o.DEPTH24_STENCIL8,n,i):o.renderbufferStorage(o.RENDERBUFFER,o.DEPTH_STENCIL,n,i),r.stencil=a,o.framebufferRenderbuffer(o.FRAMEBUFFER,o.DEPTH_STENCIL_ATTACHMENT,o.RENDERBUFFER,a)}reset(){this.current=this.unknownFramebuffer,this.viewport=new ne}destroy(){this.renderer=null}}xd.extension={type:jt.RendererSystem,name:"framebuffer"},te.add(xd);const fu={5126:4,5123:2,5121:1};class wd{constructor(t){this.renderer=t,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0,this.canUseUInt32ElementIndex=!1,this.managedGeometries={}}contextChange(){this.disposeAll(!0);const t=this.gl=this.renderer.gl,r=this.renderer.context;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,r.webGLVersion!==2){let n=this.renderer.context.extensions.vertexArrayObject;Dt.PREFER_ENV===Cn.WEBGL_LEGACY&&(n=null),n?(t.createVertexArray=()=>n.createVertexArrayOES(),t.bindVertexArray=i=>n.bindVertexArrayOES(i),t.deleteVertexArray=i=>n.deleteVertexArrayOES(i)):(this.hasVao=!1,t.createVertexArray=()=>null,t.bindVertexArray=()=>null,t.deleteVertexArray=()=>null)}if(r.webGLVersion!==2){const n=t.getExtension("ANGLE_instanced_arrays");n?(t.vertexAttribDivisor=(i,o)=>n.vertexAttribDivisorANGLE(i,o),t.drawElementsInstanced=(i,o,a,u,f)=>n.drawElementsInstancedANGLE(i,o,a,u,f),t.drawArraysInstanced=(i,o,a,u)=>n.drawArraysInstancedANGLE(i,o,a,u)):this.hasInstance=!1}this.canUseUInt32ElementIndex=r.webGLVersion===2||!!r.extensions.uint32ElementIndex}bind(t,r){r=r||this.renderer.shader.shader;const{gl:n}=this;let i=t.glVertexArrayObjects[this.CONTEXT_UID],o=!1;i||(this.managedGeometries[t.id]=t,t.disposeRunner.add(this),t.glVertexArrayObjects[this.CONTEXT_UID]=i={},o=!0);const a=i[r.program.id]||this.initGeometryVao(t,r,o);this._activeGeometry=t,this._activeVao!==a&&(this._activeVao=a,this.hasVao?n.bindVertexArray(a):this.activateVao(t,r.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const t=this._activeGeometry,r=this.renderer.buffer;for(let n=0;n<t.buffers.length;n++){const i=t.buffers[n];r.update(i)}}checkCompatibility(t,r){const n=t.attributes,i=r.attributeData;for(const o in i)if(!n[o])throw new Error(`shader and geometry incompatible, geometry missing the "${o}" attribute`)}getSignature(t,r){const n=t.attributes,i=r.attributeData,o=["g",t.id];for(const a in n)i[a]&&o.push(a,i[a].location);return o.join("-")}initGeometryVao(t,r,n=!0){const i=this.gl,o=this.CONTEXT_UID,a=this.renderer.buffer,u=r.program;u.glPrograms[o]||this.renderer.shader.generateProgram(r),this.checkCompatibility(t,u);const f=this.getSignature(t,u),h=t.glVertexArrayObjects[this.CONTEXT_UID];let d=h[f];if(d)return h[u.id]=d,d;const p=t.buffers,c=t.attributes,v={},y={};for(const b in p)v[b]=0,y[b]=0;for(const b in c)!c[b].size&&u.attributeData[b]?c[b].size=u.attributeData[b].size:c[b].size||console.warn(`PIXI Geometry attribute '${b}' size cannot be determined (likely the bound shader does not have the attribute)`),v[c[b].buffer]+=c[b].size*fu[c[b].type];for(const b in c){const _=c[b],m=_.size;_.stride===void 0&&(v[_.buffer]===m*fu[_.type]?_.stride=0:_.stride=v[_.buffer]),_.start===void 0&&(_.start=y[_.buffer],y[_.buffer]+=m*fu[_.type])}d=i.createVertexArray(),i.bindVertexArray(d);for(let b=0;b<p.length;b++){const _=p[b];a.bind(_),n&&_._glBuffers[o].refCount++}return this.activateVao(t,u),h[u.id]=d,h[f]=d,i.bindVertexArray(null),a.unbind(Fr.ARRAY_BUFFER),d}disposeGeometry(t,r){var u;if(!this.managedGeometries[t.id])return;delete this.managedGeometries[t.id];const n=t.glVertexArrayObjects[this.CONTEXT_UID],i=this.gl,o=t.buffers,a=(u=this.renderer)==null?void 0:u.buffer;if(t.disposeRunner.remove(this),!!n){if(a)for(let f=0;f<o.length;f++){const h=o[f]._glBuffers[this.CONTEXT_UID];h&&(h.refCount--,h.refCount===0&&!r&&a.dispose(o[f],r))}if(!r){for(const f in n)if(f[0]==="g"){const h=n[f];this._activeVao===h&&this.unbind(),i.deleteVertexArray(h)}}delete t.glVertexArrayObjects[this.CONTEXT_UID]}}disposeAll(t){const r=Object.keys(this.managedGeometries);for(let n=0;n<r.length;n++)this.disposeGeometry(this.managedGeometries[r[n]],t)}activateVao(t,r){const n=this.gl,i=this.CONTEXT_UID,o=this.renderer.buffer,a=t.buffers,u=t.attributes;t.indexBuffer&&o.bind(t.indexBuffer);let f=null;for(const h in u){const d=u[h],p=a[d.buffer],c=p._glBuffers[i];if(r.attributeData[h]){f!==c&&(o.bind(p),f=c);const v=r.attributeData[h].location;if(n.enableVertexAttribArray(v),n.vertexAttribPointer(v,d.size,d.type||n.FLOAT,d.normalized,d.stride,d.start),d.instance)if(this.hasInstance)n.vertexAttribDivisor(v,d.divisor);else throw new Error("geometry error, GPU Instancing is not supported on this device")}}}draw(t,r,n,i){const{gl:o}=this,a=this._activeGeometry;if(a.indexBuffer){const u=a.indexBuffer.data.BYTES_PER_ELEMENT,f=u===2?o.UNSIGNED_SHORT:o.UNSIGNED_INT;u===2||u===4&&this.canUseUInt32ElementIndex?a.instanced?o.drawElementsInstanced(t,r||a.indexBuffer.data.length,f,(n||0)*u,i||1):o.drawElements(t,r||a.indexBuffer.data.length,f,(n||0)*u):console.warn("unsupported index buffer type: uint32")}else a.instanced?o.drawArraysInstanced(t,n,r||a.getSize(),i||1):o.drawArrays(t,n,r||a.getSize());return this}unbind(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null}destroy(){this.renderer=null}}wd.extension={type:jt.RendererSystem,name:"geometry"},te.add(wd);const Td=new $e;class jw{constructor(t,r){this._texture=t,this.mapCoord=new $e,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,this.clampMargin=typeof r>"u"?.5:r,this.isSimple=!1}get texture(){return this._texture}set texture(t){this._texture=t,this._textureID=-1}multiplyUvs(t,r){r===void 0&&(r=t);const n=this.mapCoord;for(let i=0;i<t.length;i+=2){const o=t[i],a=t[i+1];r[i]=o*n.a+a*n.c+n.tx,r[i+1]=o*n.b+a*n.d+n.ty}return r}update(t){const r=this._texture;if(!r||!r.valid||!t&&this._textureID===r._updateID)return!1;this._textureID=r._updateID,this._updateID++;const n=r._uvs;this.mapCoord.set(n.x1-n.x0,n.y1-n.y0,n.x3-n.x0,n.y3-n.y0,n.x0,n.y0);const i=r.orig,o=r.trim;o&&(Td.set(i.width/o.width,0,0,i.height/o.height,-o.x/o.width,-o.y/o.height),this.mapCoord.append(Td));const a=r.baseTexture,u=this.uClampFrame,f=this.clampMargin/a.resolution,h=this.clampOffset;return u[0]=(r._frame.x+f+h)/a.width,u[1]=(r._frame.y+f+h)/a.height,u[2]=(r._frame.x+r._frame.width-f+h)/a.width,u[3]=(r._frame.y+r._frame.height-f+h)/a.height,this.uClampOffset[0]=h/a.realWidth,this.uClampOffset[1]=h/a.realHeight,this.isSimple=r._frame.width===a.width&&r._frame.height===a.height&&r.rotate===0,!0}}var qw=`varying vec2 vMaskCoord;
386
+ `;const vs=class extends ps{constructor(e,t,r){const n=Xr.from(e||vs.defaultVertexSrc,t||vs.defaultFragmentSrc);super(n,r),this.padding=0,this.resolution=vs.defaultResolution,this.multisample=vs.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new po}apply(e,t,r,n,i){e.applyFilter(this,t,r,n)}get blendMode(){return this.state.blendMode}set blendMode(e){this.state.blendMode=e}get resolution(){return this._resolution}set resolution(e){this._resolution=e}static get defaultVertexSrc(){return Lw}static get defaultFragmentSrc(){return kw}};let Zt=vs;Zt.defaultResolution=1,Zt.defaultMultisample=Te.NONE;class wo{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new Be(0),this.alpha=1}init(t){this.clearBeforeRender=t.clearBeforeRender;const{backgroundColor:r,background:n,backgroundAlpha:i}=t,o=n??r;o!==void 0&&(this.color=o),this.alpha=i}get color(){return this._backgroundColor.value}set color(t){this._backgroundColor.setValue(t)}get alpha(){return this._backgroundColor.alpha}set alpha(t){this._backgroundColor.setAlpha(t)}get backgroundColor(){return this._backgroundColor}destroy(){}}wo.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0},wo.extension={type:[qt.RendererSystem,qt.CanvasRendererSystem],name:"background"},te.add(wo);class dd{constructor(t){this.renderer=t,this.emptyRenderer=new hd(t),this.currentRenderer=this.emptyRenderer}setObjectRenderer(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())}flush(){this.setObjectRenderer(this.emptyRenderer)}reset(){this.setObjectRenderer(this.emptyRenderer)}copyBoundTextures(t,r){const{boundTextures:n}=this.renderer.texture;for(let i=r-1;i>=0;--i)t[i]=n[i]||null,t[i]&&(t[i]._batchLocation=i)}boundArray(t,r,n,i){const{elements:o,ids:a,count:u}=t;let f=0;for(let h=0;h<u;h++){const d=o[h],p=d._batchLocation;if(p>=0&&p<i&&r[p]===d){a[h]=p;continue}for(;f<i;){const c=r[f];if(c&&c._batchEnabled===n&&c._batchLocation===f){f++;continue}a[h]=f,d._batchLocation=f,r[f]=d;break}}}destroy(){this.renderer=null}}dd.extension={type:qt.RendererSystem,name:"batch"},te.add(dd);let pd=0;class To{constructor(t){this.renderer=t,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this)}get isLost(){return!this.gl||this.gl.isContextLost()}contextChange(t){this.gl=t,this.renderer.gl=t,this.renderer.CONTEXT_UID=pd++}init(t){if(t.context)this.initFromContext(t.context);else{const r=this.renderer.background.alpha<1,n=t.premultipliedAlpha;this.preserveDrawingBuffer=t.preserveDrawingBuffer,this.useContextAlpha=t.useContextAlpha,this.powerPreference=t.powerPreference,this.initFromOptions({alpha:r,premultipliedAlpha:n,antialias:t.antialias,stencil:!0,preserveDrawingBuffer:t.preserveDrawingBuffer,powerPreference:t.powerPreference})}}initFromContext(t){this.gl=t,this.validateContext(t),this.renderer.gl=t,this.renderer.CONTEXT_UID=pd++,this.renderer.runners.contextChange.emit(t);const r=this.renderer.view;r.addEventListener!==void 0&&(r.addEventListener("webglcontextlost",this.handleContextLost,!1),r.addEventListener("webglcontextrestored",this.handleContextRestored,!1))}initFromOptions(t){const r=this.createContext(this.renderer.view,t);this.initFromContext(r)}createContext(t,r){let n;if(Dt.PREFER_ENV>=Cn.WEBGL2&&(n=t.getContext("webgl2",r)),n)this.webGLVersion=2;else if(this.webGLVersion=1,n=t.getContext("webgl",r)||t.getContext("experimental-webgl",r),!n)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=n,this.getExtensions(),this.gl}getExtensions(){const{gl:t}=this,r={loseContext:t.getExtension("WEBGL_lose_context"),anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),s3tc:t.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:t.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:t.getExtension("WEBGL_compressed_texture_etc"),etc1:t.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:t.getExtension("WEBGL_compressed_texture_atc"),astc:t.getExtension("WEBGL_compressed_texture_astc")};this.webGLVersion===1?Object.assign(this.extensions,r,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,r,{colorBufferFloat:t.getExtension("EXT_color_buffer_float")})}handleContextLost(t){t.preventDefault(),setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()},0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){const t=this.renderer.view;this.renderer=null,t.removeEventListener!==void 0&&(t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(t){const r=t.getContextAttributes(),n="WebGL2RenderingContext"in globalThis&&t instanceof globalThis.WebGL2RenderingContext;n&&(this.webGLVersion=2),r&&!r.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const i=n||!!t.getExtension("OES_element_index_uint");this.supports.uint32Indices=i,i||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}To.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"},To.extension={type:qt.RendererSystem,name:"context"},te.add(To);class Fw extends eu{upload(t,r,n){const i=t.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===ln.UNPACK);const o=r.realWidth,a=r.realHeight;return n.width===o&&n.height===a?i.texSubImage2D(r.target,0,0,0,o,a,r.format,n.type,this.data):(n.width=o,n.height=a,i.texImage2D(r.target,0,n.internalFormat,o,a,0,r.format,n.type,this.data)),!0}}class uu{constructor(t,r){this.width=Math.round(t||100),this.height=Math.round(r||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new _r("disposeFramebuffer"),this.multisample=Te.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(t=0,r){return this.colorTextures[t]=r||new Kt(null,{scaleMode:Lr.NEAREST,resolution:1,mipmap:Rn.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(t){return this.depthTexture=t||new Kt(new Fw(null,{width:this.width,height:this.height}),{scaleMode:Lr.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:Rn.OFF,format:bt.DEPTH_COMPONENT,type:Xt.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this}enableDepth(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this}enableStencil(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this}resize(t,r){if(t=Math.round(t),r=Math.round(r),!(t===this.width&&r===this.height)){this.width=t,this.height=r,this.dirtyId++,this.dirtySize++;for(let n=0;n<this.colorTextures.length;n++){const i=this.colorTextures[n],o=i.resolution;i.setSize(t/o,r/o)}if(this.depthTexture){const n=this.depthTexture.resolution;this.depthTexture.setSize(t/n,r/n)}}}dispose(){this.disposeRunner.emit(this,!1)}destroyDepthTexture(){this.depthTexture&&(this.depthTexture.destroy(),this.depthTexture=null,++this.dirtyId,++this.dirtyFormat)}}class vd extends Kt{constructor(t={}){if(typeof t=="number"){const r=arguments[0],n=arguments[1],i=arguments[2],o=arguments[3];t={width:r,height:n,scaleMode:i,resolution:o}}t.width=t.width||100,t.height=t.height||100,t.multisample??(t.multisample=Te.NONE),super(null,t),this.mipmap=Rn.OFF,this.valid=!0,this._clear=new Be([0,0,0,0]),this.framebuffer=new uu(this.realWidth,this.realHeight).addColorTexture(0,this),this.framebuffer.multisample=t.multisample,this.maskStack=[],this.filterStack=[{}]}set clearColor(t){this._clear.setValue(t)}get clearColor(){return this._clear.value}get clear(){return this._clear}resize(t,r){this.framebuffer.resize(t*this.resolution,r*this.resolution),this.setRealSize(this.framebuffer.width,this.framebuffer.height)}dispose(){this.framebuffer.dispose(),super.dispose()}destroy(){super.destroy(),this.framebuffer.destroyDepthTexture(),this.framebuffer=null}}class dn extends fs{constructor(t){const r=t,n=r.naturalWidth||r.videoWidth||r.width,i=r.naturalHeight||r.videoHeight||r.height;super(n,i),this.source=t,this.noSubImage=!1}static crossOrigin(t,r,n){n===void 0&&!r.startsWith("data:")?t.crossOrigin=nw(r):n!==!1&&(t.crossOrigin=typeof n=="string"?n:"anonymous")}upload(t,r,n,i){const o=t.gl,a=r.realWidth,u=r.realHeight;if(i=i||this.source,typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement){if(!i.complete||i.naturalWidth===0)return!1}else if(typeof HTMLVideoElement<"u"&&i instanceof HTMLVideoElement&&i.readyState<=1&&i.buffered.length===0)return!1;return o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===ln.UNPACK),!this.noSubImage&&r.target===o.TEXTURE_2D&&n.width===a&&n.height===u?o.texSubImage2D(o.TEXTURE_2D,0,0,0,r.format,n.type,i):(n.width=a,n.height=u,o.texImage2D(r.target,0,n.internalFormat,r.format,n.type,i)),!0}update(){if(this.destroyed)return;const t=this.source,r=t.naturalWidth||t.videoWidth||t.width,n=t.naturalHeight||t.videoHeight||t.height;this.resize(r,n),super.update()}dispose(){this.source=null}}class gd extends dn{constructor(t,r){if(r=r||{},typeof t=="string"){const n=new Image;dn.crossOrigin(n,t,r.crossorigin),n.src=t,t=n}super(t),!t.complete&&this._width&&this._height&&(this._width=0,this._height=0),this.url=t.src,this._process=null,this.preserveBitmap=!1,this.createBitmap=(r.createBitmap??Dt.CREATE_IMAGE_BITMAP)&&!!globalThis.createImageBitmap,this.alphaMode=typeof r.alphaMode=="number"?r.alphaMode:null,this.bitmap=null,this._load=null,r.autoLoad!==!1&&this.load()}load(t){return this._load?this._load:(t!==void 0&&(this.createBitmap=t),this._load=new Promise((r,n)=>{const i=this.source;this.url=i.src;const o=()=>{this.destroyed||(i.onload=null,i.onerror=null,this.resize(i.width,i.height),this._load=null,this.createBitmap?r(this.process()):r(this))};i.complete&&i.src?o():(i.onload=o,i.onerror=a=>{n(a),this.onError.emit(a)})}),this._load)}process(){const t=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);const r=globalThis.createImageBitmap,n=!t.crossOrigin||t.crossOrigin==="anonymous";return this._process=fetch(t.src,{mode:n?"cors":"no-cors"}).then(i=>i.blob()).then(i=>r(i,0,0,t.width,t.height,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===ln.UNPACK?"premultiply":"none"})).then(i=>this.destroyed?Promise.reject():(this.bitmap=i,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(t,r,n){if(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(t,r,n);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(t,r,n,this.bitmap),!this.preserveBitmap){let i=!0;const o=r._glTextures;for(const a in o){const u=o[a];if(u!==n&&u.dirtyId!==r.dirtyId){i=!1;break}}i&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(t){return typeof HTMLImageElement<"u"&&(typeof t=="string"||t instanceof HTMLImageElement)}}class md{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(t,r,n){const i=r.width,o=r.height;if(n){const a=t.width/2/i,u=t.height/2/o,f=t.x/i+a,h=t.y/o+u;n=ve.add(n,ve.NW),this.x0=f+a*ve.uX(n),this.y0=h+u*ve.uY(n),n=ve.add(n,2),this.x1=f+a*ve.uX(n),this.y1=h+u*ve.uY(n),n=ve.add(n,2),this.x2=f+a*ve.uX(n),this.y2=h+u*ve.uY(n),n=ve.add(n,2),this.x3=f+a*ve.uX(n),this.y3=h+u*ve.uY(n)}else this.x0=t.x/i,this.y0=t.y/o,this.x1=(t.x+t.width)/i,this.y1=t.y/o,this.x2=(t.x+t.width)/i,this.y2=(t.y+t.height)/o,this.x3=t.x/i,this.y3=(t.y+t.height)/o;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3}toString(){return`[@pixi/core:TextureUvs x0=${this.x0} y0=${this.y0} x1=${this.x1} y1=${this.y1} x2=${this.x2} y2=${this.y2} x3=${this.x3} y3=${this.y3}]`}}const yd=new md;function Eo(e){e.destroy=function(){},e.on=function(){},e.once=function(){},e.emit=function(){}}class Wt extends Ws{constructor(t,r,n,i,o,a,u){if(super(),this.noFrame=!1,r||(this.noFrame=!0,r=new ie(0,0,1,1)),t instanceof Wt&&(t=t.baseTexture),this.baseTexture=t,this._frame=r,this.trim=i,this.valid=!1,this._uvs=yd,this.uvMatrix=null,this.orig=n||r,this._rotate=Number(o||0),o===!0)this._rotate=2;else if(this._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=a?new oe(a.x,a.y):new oe(0,0),this.defaultBorders=u,this._updateID=0,this.textureCacheIds=[],t.valid?this.noFrame?t.valid&&this.onBaseTextureUpdated(t):this.frame=r:t.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&t.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(t){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=t.width,this._frame.height=t.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(t){if(this.baseTexture){if(t){const{resource:r}=this.baseTexture;r!=null&&r.url&&$r[r.url]&&Wt.removeFromCache(r.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,Wt.removeFromCache(this),this.textureCacheIds=null}clone(){var i;const t=this._frame.clone(),r=this._frame===this.orig?t:this.orig.clone(),n=new Wt(this.baseTexture,!this.noFrame&&t,r,(i=this.trim)==null?void 0:i.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(n._frame=t),n}updateUvs(){this._uvs===yd&&(this._uvs=new md),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(t,r={},n=Dt.STRICT_TEXTURE_CACHE){const i=typeof t=="string";let o=null;if(i)o=t;else if(t instanceof Kt){if(!t.cacheId){const u=(r==null?void 0:r.pixiIdPrefix)||"pixiid";t.cacheId=`${u}-${us()}`,Kt.addToCache(t,t.cacheId)}o=t.cacheId}else{if(!t._pixiId){const u=(r==null?void 0:r.pixiIdPrefix)||"pixiid";t._pixiId=`${u}_${us()}`}o=t._pixiId}let a=$r[o];if(i&&n&&!a)throw new Error(`The cacheId "${o}" does not exist in TextureCache.`);return!a&&!(t instanceof Kt)?(r.resolution||(r.resolution=Zh(t)),a=new Wt(new Kt(t,r)),a.baseTexture.cacheId=o,Kt.addToCache(a.baseTexture,o),Wt.addToCache(a,o)):!a&&t instanceof Kt&&(a=new Wt(t),Wt.addToCache(a,o)),a}static fromURL(t,r){const n=Object.assign({autoLoad:!1},r==null?void 0:r.resourceOptions),i=Wt.from(t,Object.assign({resourceOptions:n},r),!1),o=i.baseTexture.resource;return i.baseTexture.valid?Promise.resolve(i):o.load().then(()=>Promise.resolve(i))}static fromBuffer(t,r,n,i){return new Wt(Kt.fromBuffer(t,r,n,i))}static fromLoader(t,r,n,i){const o=new Kt(t,Object.assign({scaleMode:Kt.defaultOptions.scaleMode,resolution:Zh(r)},i)),{resource:a}=o;a instanceof gd&&(a.url=r);const u=new Wt(o);return n||(n=r),Kt.addToCache(u.baseTexture,n),Wt.addToCache(u,n),n!==r&&(Kt.addToCache(u.baseTexture,r),Wt.addToCache(u,r)),u.baseTexture.valid?Promise.resolve(u):new Promise(f=>{u.baseTexture.once("loaded",()=>f(u))})}static addToCache(t,r){r&&(t.textureCacheIds.includes(r)||t.textureCacheIds.push(r),$r[r]&&$r[r]!==t&&console.warn(`Texture added to the cache with an id [${r}] that already had an entry`),$r[r]=t)}static removeFromCache(t){if(typeof t=="string"){const r=$r[t];if(r){const n=r.textureCacheIds.indexOf(t);return n>-1&&r.textureCacheIds.splice(n,1),delete $r[t],r}}else if(t!=null&&t.textureCacheIds){for(let r=0;r<t.textureCacheIds.length;++r)$r[t.textureCacheIds[r]]===t&&delete $r[t.textureCacheIds[r]];return t.textureCacheIds.length=0,t}return null}get resolution(){return this.baseTexture.resolution}get frame(){return this._frame}set frame(t){this._frame=t,this.noFrame=!1;const{x:r,y:n,width:i,height:o}=t,a=r+i>this.baseTexture.width,u=n+o>this.baseTexture.height;if(a||u){const f=a&&u?"and":"or",h=`X: ${r} + ${i} = ${r+i} > ${this.baseTexture.width}`,d=`Y: ${n} + ${o} = ${n+o} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${h} ${f} ${d}`)}this.valid=i&&o&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=t),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(t){this._rotate=t,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return Wt._EMPTY||(Wt._EMPTY=new Wt(new Kt),Eo(Wt._EMPTY),Eo(Wt._EMPTY.baseTexture)),Wt._EMPTY}static get WHITE(){if(!Wt._WHITE){const t=Dt.ADAPTER.createCanvas(16,16),r=t.getContext("2d");t.width=16,t.height=16,r.fillStyle="white",r.fillRect(0,0,16,16),Wt._WHITE=new Wt(Kt.from(t)),Eo(Wt._WHITE),Eo(Wt._WHITE.baseTexture)}return Wt._WHITE}}class So extends Wt{constructor(t,r){super(t,r),this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}get framebuffer(){return this.baseTexture.framebuffer}get multisample(){return this.framebuffer.multisample}set multisample(t){this.framebuffer.multisample=t}resize(t,r,n=!0){const i=this.baseTexture.resolution,o=Math.round(t*i)/i,a=Math.round(r*i)/i;this.valid=o>0&&a>0,this._frame.width=this.orig.width=o,this._frame.height=this.orig.height=a,n&&this.baseTexture.resize(o,a),this.updateUvs()}setResolution(t){const{baseTexture:r}=this;r.resolution!==t&&(r.setResolution(t),this.resize(r.width,r.height,!1))}static create(t){return new So(new vd(t))}}class _d{constructor(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(t,r,n=Te.NONE){const i=new vd(Object.assign({width:t,height:r,resolution:1,multisample:n},this.textureOptions));return new So(i)}getOptimalTexture(t,r,n=1,i=Te.NONE){let o;t=Math.ceil(t*n-1e-6),r=Math.ceil(r*n-1e-6),!this.enableFullScreen||t!==this._pixelsWidth||r!==this._pixelsHeight?(t=fo(t),r=fo(r),o=((t&65535)<<16|r&65535)>>>0,i>1&&(o+=i*4294967296)):o=i>1?-i:-1,this.texturePool[o]||(this.texturePool[o]=[]);let a=this.texturePool[o].pop();return a||(a=this.createTexture(t,r,i)),a.filterPoolKey=o,a.setResolution(n),a}getFilterTexture(t,r,n){const i=this.getOptimalTexture(t.width,t.height,r||t.resolution,n||Te.NONE);return i.filterFrame=t.filterFrame,i}returnTexture(t){const r=t.filterPoolKey;t.filterFrame=null,this.texturePool[r].push(t)}returnFilterTexture(t){this.returnTexture(t)}clear(t){if(t=t!==!1,t)for(const r in this.texturePool){const n=this.texturePool[r];if(n)for(let i=0;i<n.length;i++)n[i].destroy(!0)}this.texturePool={}}setScreenSize(t){if(!(t.width===this._pixelsWidth&&t.height===this._pixelsHeight)){this.enableFullScreen=t.width>0&&t.height>0;for(const r in this.texturePool){if(!(Number(r)<0))continue;const n=this.texturePool[r];if(n)for(let i=0;i<n.length;i++)n[i].destroy(!0);this.texturePool[r]=[]}this._pixelsWidth=t.width,this._pixelsHeight=t.height}}}_d.SCREEN_KEY=-1;class Bw extends yi{constructor(){super(),this.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2])}}class Dw extends yi{constructor(){super(),this.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),this.uvs=new Float32Array([0,0,1,0,1,1,0,1]),this.vertexBuffer=new Qe(this.vertices),this.uvBuffer=new Qe(this.uvs),this.addAttribute("aVertexPosition",this.vertexBuffer).addAttribute("aTextureCoord",this.uvBuffer).addIndex([0,1,2,0,2,3])}map(t,r){let n=0,i=0;return this.uvs[0]=n,this.uvs[1]=i,this.uvs[2]=n+r.width/t.width,this.uvs[3]=i,this.uvs[4]=n+r.width/t.width,this.uvs[5]=i+r.height/t.height,this.uvs[6]=n,this.uvs[7]=i+r.height/t.height,n=r.x,i=r.y,this.vertices[0]=n,this.vertices[1]=i,this.vertices[2]=n+r.width,this.vertices[3]=i,this.vertices[4]=n+r.width,this.vertices[5]=i+r.height,this.vertices[6]=n,this.vertices[7]=i+r.height,this.invalidate(),this}invalidate(){return this.vertexBuffer._updateID++,this.uvBuffer._updateID++,this}}class Uw{constructor(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=Te.NONE,this.sourceFrame=new ie,this.destinationFrame=new ie,this.bindingSourceFrame=new ie,this.bindingDestinationFrame=new ie,this.filters=[],this.transform=null}clear(){this.target=null,this.filters=null,this.renderTexture=null}}const Ao=[new oe,new oe,new oe,new oe],fu=new $e;class bd{constructor(t){this.renderer=t,this.defaultFilterStack=[{}],this.texturePool=new _d,this.statePool=[],this.quad=new Bw,this.quadUv=new Dw,this.tempRect=new ie,this.activeState={},this.globalUniforms=new br({outputFrame:new ie,inputSize:new Float32Array(4),inputPixel:new Float32Array(4),inputClamp:new Float32Array(4),resolution:1,filterArea:new Float32Array(4),filterClamp:new Float32Array(4)},!0),this.forceClear=!1,this.useMaxPadding=!1}init(){this.texturePool.setScreenSize(this.renderer.view)}push(t,r){const n=this.renderer,i=this.defaultFilterStack,o=this.statePool.pop()||new Uw,a=this.renderer.renderTexture;let u=r[0].resolution,f=r[0].multisample,h=r[0].padding,d=r[0].autoFit,p=r[0].legacy??!0;for(let y=1;y<r.length;y++){const _=r[y];u=Math.min(u,_.resolution),f=Math.min(f,_.multisample),h=this.useMaxPadding?Math.max(h,_.padding):h+_.padding,d=d&&_.autoFit,p=p||(_.legacy??!0)}i.length===1&&(this.defaultFilterStack[0].renderTexture=a.current),i.push(o),o.resolution=u,o.multisample=f,o.legacy=p,o.target=t,o.sourceFrame.copyFrom(t.filterArea||t.getBounds(!0)),o.sourceFrame.pad(h);const c=this.tempRect.copyFrom(a.sourceFrame);n.projection.transform&&this.transformAABB(fu.copyFrom(n.projection.transform).invert(),c),d?(o.sourceFrame.fit(c),(o.sourceFrame.width<=0||o.sourceFrame.height<=0)&&(o.sourceFrame.width=0,o.sourceFrame.height=0)):o.sourceFrame.intersects(c)||(o.sourceFrame.width=0,o.sourceFrame.height=0),this.roundFrame(o.sourceFrame,a.current?a.current.resolution:n.resolution,a.sourceFrame,a.destinationFrame,n.projection.transform),o.renderTexture=this.getOptimalFilterTexture(o.sourceFrame.width,o.sourceFrame.height,u,f),o.filters=r,o.destinationFrame.width=o.renderTexture.width,o.destinationFrame.height=o.renderTexture.height;const v=this.tempRect;v.x=0,v.y=0,v.width=o.sourceFrame.width,v.height=o.sourceFrame.height,o.renderTexture.filterFrame=o.sourceFrame,o.bindingSourceFrame.copyFrom(a.sourceFrame),o.bindingDestinationFrame.copyFrom(a.destinationFrame),o.transform=n.projection.transform,n.projection.transform=null,a.bind(o.renderTexture,o.sourceFrame,v),n.framebuffer.clear(0,0,0,0)}pop(){const t=this.defaultFilterStack,r=t.pop(),n=r.filters;this.activeState=r;const i=this.globalUniforms.uniforms;i.outputFrame=r.sourceFrame,i.resolution=r.resolution;const o=i.inputSize,a=i.inputPixel,u=i.inputClamp;if(o[0]=r.destinationFrame.width,o[1]=r.destinationFrame.height,o[2]=1/o[0],o[3]=1/o[1],a[0]=Math.round(o[0]*r.resolution),a[1]=Math.round(o[1]*r.resolution),a[2]=1/a[0],a[3]=1/a[1],u[0]=.5*a[2],u[1]=.5*a[3],u[2]=r.sourceFrame.width*o[2]-.5*a[2],u[3]=r.sourceFrame.height*o[3]-.5*a[3],r.legacy){const h=i.filterArea;h[0]=r.destinationFrame.width,h[1]=r.destinationFrame.height,h[2]=r.sourceFrame.x,h[3]=r.sourceFrame.y,i.filterClamp=i.inputClamp}this.globalUniforms.update();const f=t[t.length-1];if(this.renderer.framebuffer.blit(),n.length===1)n[0].apply(this,r.renderTexture,f.renderTexture,In.BLEND,r),this.returnFilterTexture(r.renderTexture);else{let h=r.renderTexture,d=this.getOptimalFilterTexture(h.width,h.height,r.resolution);d.filterFrame=h.filterFrame;let p=0;for(p=0;p<n.length-1;++p){p===1&&r.multisample>1&&(d=this.getOptimalFilterTexture(h.width,h.height,r.resolution),d.filterFrame=h.filterFrame),n[p].apply(this,h,d,In.CLEAR,r);const c=h;h=d,d=c}n[p].apply(this,h,f.renderTexture,In.BLEND,r),p>1&&r.multisample>1&&this.returnFilterTexture(r.renderTexture),this.returnFilterTexture(h),this.returnFilterTexture(d)}r.clear(),this.statePool.push(r)}bindAndClear(t,r=In.CLEAR){const{renderTexture:n,state:i}=this.renderer;if(t===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,t!=null&&t.filterFrame){const a=this.tempRect;a.x=0,a.y=0,a.width=t.filterFrame.width,a.height=t.filterFrame.height,n.bind(t,t.filterFrame,a)}else t!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?n.bind(t):this.renderer.renderTexture.bind(t,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const o=i.stateId&1||this.forceClear;(r===In.CLEAR||r===In.BLIT&&o)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(t,r,n,i){const o=this.renderer;o.state.set(t.state),this.bindAndClear(n,i),t.uniforms.uSampler=r,t.uniforms.filterGlobals=this.globalUniforms,o.shader.bind(t),t.legacy=!!t.program.attributeData.aTextureCoord,t.legacy?(this.quadUv.map(r._frame,r.filterFrame),o.geometry.bind(this.quadUv),o.geometry.draw(an.TRIANGLES)):(o.geometry.bind(this.quad),o.geometry.draw(an.TRIANGLE_STRIP))}calculateSpriteMatrix(t,r){const{sourceFrame:n,destinationFrame:i}=this.activeState,{orig:o}=r._texture,a=t.set(i.width,0,0,i.height,n.x,n.y),u=r.worldTransform.copyTo($e.TEMP_MATRIX);return u.invert(),a.prepend(u),a.scale(1/o.width,1/o.height),a.translate(r.anchor.x,r.anchor.y),a}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(t,r,n=1,i=Te.NONE){return this.texturePool.getOptimalTexture(t,r,n,i)}getFilterTexture(t,r,n){if(typeof t=="number"){const o=t;t=r,r=o}t=t||this.activeState.renderTexture;const i=this.texturePool.getOptimalTexture(t.width,t.height,r||t.resolution,n||Te.NONE);return i.filterFrame=t.filterFrame,i}returnFilterTexture(t){this.texturePool.returnTexture(t)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(t,r){const n=Ao[0],i=Ao[1],o=Ao[2],a=Ao[3];n.set(r.left,r.top),i.set(r.left,r.bottom),o.set(r.right,r.top),a.set(r.right,r.bottom),t.apply(n,n),t.apply(i,i),t.apply(o,o),t.apply(a,a);const u=Math.min(n.x,i.x,o.x,a.x),f=Math.min(n.y,i.y,o.y,a.y),h=Math.max(n.x,i.x,o.x,a.x),d=Math.max(n.y,i.y,o.y,a.y);r.x=u,r.y=f,r.width=h-u,r.height=d-f}roundFrame(t,r,n,i,o){if(!(t.width<=0||t.height<=0||n.width<=0||n.height<=0)){if(o){const{a,b:u,c:f,d:h}=o;if((Math.abs(u)>1e-4||Math.abs(f)>1e-4)&&(Math.abs(a)>1e-4||Math.abs(h)>1e-4))return}o=o?fu.copyFrom(o):fu.identity(),o.translate(-n.x,-n.y).scale(i.width/n.width,i.height/n.height).translate(i.x,i.y),this.transformAABB(o,t),t.ceil(r),this.transformAABB(o.invert(),t)}}}bd.extension={type:qt.RendererSystem,name:"filter"},te.add(bd);class $w{constructor(t){this.framebuffer=t,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=Te.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const Gw=new ie;class xd{constructor(t){this.renderer=t,this.managedFramebuffers=[],this.unknownFramebuffer=new uu(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);const t=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new ie,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let r=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;Dt.PREFER_ENV===Cn.WEBGL_LEGACY&&(r=null,n=null),r?t.drawBuffers=i=>r.drawBuffersWEBGL(i):(this.hasMRT=!1,t.drawBuffers=()=>{}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=t.getInternalformatParameter(t.RENDERBUFFER,t.RGBA8,t.SAMPLES)}bind(t,r,n=0){const{gl:i}=this;if(t){const o=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,i.bindFramebuffer(i.FRAMEBUFFER,o.framebuffer)),o.mipLevel!==n&&(t.dirtyId++,t.dirtyFormat++,o.mipLevel=n),o.dirtyId!==t.dirtyId&&(o.dirtyId=t.dirtyId,o.dirtyFormat!==t.dirtyFormat?(o.dirtyFormat=t.dirtyFormat,o.dirtySize=t.dirtySize,this.updateFramebuffer(t,n)):o.dirtySize!==t.dirtySize&&(o.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(let a=0;a<t.colorTextures.length;a++){const u=t.colorTextures[a];this.renderer.texture.unbind(u.parentTextureArray||u)}if(t.depthTexture&&this.renderer.texture.unbind(t.depthTexture),r){const a=r.width>>n,u=r.height>>n,f=a/r.width;this.setViewport(r.x*f,r.y*f,a,u)}else{const a=t.width>>n,u=t.height>>n;this.setViewport(0,0,a,u)}}else this.current&&(this.current=null,i.bindFramebuffer(i.FRAMEBUFFER,null)),r?this.setViewport(r.x,r.y,r.width,r.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(t,r,n,i){const o=this.viewport;t=Math.round(t),r=Math.round(r),n=Math.round(n),i=Math.round(i),(o.width!==n||o.height!==i||o.x!==t||o.y!==r)&&(o.x=t,o.y=r,o.width=n,o.height=i,this.gl.viewport(t,r,n,i))}get size(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}}clear(t,r,n,i,o=il.COLOR|il.DEPTH){const{gl:a}=this;a.clearColor(t,r,n,i),a.clear(o)}initFramebuffer(t){const{gl:r}=this,n=new $w(r.createFramebuffer());return n.multisample=this.detectSamples(t.multisample),t.glFramebuffers[this.CONTEXT_UID]=n,this.managedFramebuffers.push(t),t.disposeRunner.add(this),n}resizeFramebuffer(t){const{gl:r}=this,n=t.glFramebuffers[this.CONTEXT_UID];n.stencil&&(r.bindRenderbuffer(r.RENDERBUFFER,n.stencil),n.msaaBuffer?r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,r.DEPTH24_STENCIL8,t.width,t.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t.width,t.height));const i=t.colorTextures;let o=i.length;r.drawBuffers||(o=Math.min(o,1));for(let a=0;a<o;a++){const u=i[a],f=u.parentTextureArray||u;this.renderer.texture.bind(f,0),a===0&&n.msaaBuffer&&(r.bindRenderbuffer(r.RENDERBUFFER,n.msaaBuffer),r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,f._glTextures[this.CONTEXT_UID].internalFormat,t.width,t.height))}t.depthTexture&&this.writeDepthTexture&&this.renderer.texture.bind(t.depthTexture,0)}updateFramebuffer(t,r){const{gl:n}=this,i=t.glFramebuffers[this.CONTEXT_UID],o=t.colorTextures;let a=o.length;n.drawBuffers||(a=Math.min(a,1)),i.multisample>1&&this.canMultisampleFramebuffer(t)?i.msaaBuffer=i.msaaBuffer||n.createRenderbuffer():i.msaaBuffer&&(n.deleteRenderbuffer(i.msaaBuffer),i.msaaBuffer=null,i.blitFramebuffer&&(i.blitFramebuffer.dispose(),i.blitFramebuffer=null));const u=[];for(let f=0;f<a;f++){const h=o[f],d=h.parentTextureArray||h;this.renderer.texture.bind(d,0),f===0&&i.msaaBuffer?(n.bindRenderbuffer(n.RENDERBUFFER,i.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,d._glTextures[this.CONTEXT_UID].internalFormat,t.width,t.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,i.msaaBuffer)):(n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+f,h.target,d._glTextures[this.CONTEXT_UID].texture,r),u.push(n.COLOR_ATTACHMENT0+f))}if(u.length>1&&n.drawBuffers(u),t.depthTexture&&this.writeDepthTexture){const h=t.depthTexture;this.renderer.texture.bind(h,0),n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,h._glTextures[this.CONTEXT_UID].texture,r)}(t.stencil||t.depth)&&!(t.depthTexture&&this.writeDepthTexture)?(i.stencil=i.stencil||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,i.stencil),i.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,n.DEPTH24_STENCIL8,t.width,t.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t.width,t.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,i.stencil)):i.stencil&&(n.deleteRenderbuffer(i.stencil),i.stencil=null)}canMultisampleFramebuffer(t){return this.renderer.context.webGLVersion!==1&&t.colorTextures.length<=1&&!t.depthTexture}detectSamples(t){const{msaaSamples:r}=this;let n=Te.NONE;if(t<=1||r===null)return n;for(let i=0;i<r.length;i++)if(r[i]<=t){n=r[i];break}return n===1&&(n=Te.NONE),n}blit(t,r,n){const{current:i,renderer:o,gl:a,CONTEXT_UID:u}=this;if(o.context.webGLVersion!==2||!i)return;const f=i.glFramebuffers[u];if(!f)return;if(!t){if(!f.msaaBuffer)return;const d=i.colorTextures[0];if(!d)return;f.blitFramebuffer||(f.blitFramebuffer=new uu(i.width,i.height),f.blitFramebuffer.addColorTexture(0,d)),t=f.blitFramebuffer,t.colorTextures[0]!==d&&(t.colorTextures[0]=d,t.dirtyId++,t.dirtyFormat++),(t.width!==i.width||t.height!==i.height)&&(t.width=i.width,t.height=i.height,t.dirtyId++,t.dirtySize++)}r||(r=Gw,r.width=i.width,r.height=i.height),n||(n=r);const h=r.width===n.width&&r.height===n.height;this.bind(t),a.bindFramebuffer(a.READ_FRAMEBUFFER,f.framebuffer),a.blitFramebuffer(r.left,r.top,r.right,r.bottom,n.left,n.top,n.right,n.bottom,a.COLOR_BUFFER_BIT,h?a.NEAREST:a.LINEAR)}disposeFramebuffer(t,r){const n=t.glFramebuffers[this.CONTEXT_UID],i=this.gl;if(!n)return;delete t.glFramebuffers[this.CONTEXT_UID];const o=this.managedFramebuffers.indexOf(t);o>=0&&this.managedFramebuffers.splice(o,1),t.disposeRunner.remove(this),r||(i.deleteFramebuffer(n.framebuffer),n.msaaBuffer&&i.deleteRenderbuffer(n.msaaBuffer),n.stencil&&i.deleteRenderbuffer(n.stencil)),n.blitFramebuffer&&this.disposeFramebuffer(n.blitFramebuffer,r)}disposeAll(t){const r=this.managedFramebuffers;this.managedFramebuffers=[];for(let n=0;n<r.length;n++)this.disposeFramebuffer(r[n],t)}forceStencil(){const t=this.current;if(!t)return;const r=t.glFramebuffers[this.CONTEXT_UID];if(!r||r.stencil)return;t.stencil=!0;const n=t.width,i=t.height,o=this.gl,a=o.createRenderbuffer();o.bindRenderbuffer(o.RENDERBUFFER,a),r.msaaBuffer?o.renderbufferStorageMultisample(o.RENDERBUFFER,r.multisample,o.DEPTH24_STENCIL8,n,i):o.renderbufferStorage(o.RENDERBUFFER,o.DEPTH_STENCIL,n,i),r.stencil=a,o.framebufferRenderbuffer(o.FRAMEBUFFER,o.DEPTH_STENCIL_ATTACHMENT,o.RENDERBUFFER,a)}reset(){this.current=this.unknownFramebuffer,this.viewport=new ie}destroy(){this.renderer=null}}xd.extension={type:qt.RendererSystem,name:"framebuffer"},te.add(xd);const cu={5126:4,5123:2,5121:1};class wd{constructor(t){this.renderer=t,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0,this.canUseUInt32ElementIndex=!1,this.managedGeometries={}}contextChange(){this.disposeAll(!0);const t=this.gl=this.renderer.gl,r=this.renderer.context;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,r.webGLVersion!==2){let n=this.renderer.context.extensions.vertexArrayObject;Dt.PREFER_ENV===Cn.WEBGL_LEGACY&&(n=null),n?(t.createVertexArray=()=>n.createVertexArrayOES(),t.bindVertexArray=i=>n.bindVertexArrayOES(i),t.deleteVertexArray=i=>n.deleteVertexArrayOES(i)):(this.hasVao=!1,t.createVertexArray=()=>null,t.bindVertexArray=()=>null,t.deleteVertexArray=()=>null)}if(r.webGLVersion!==2){const n=t.getExtension("ANGLE_instanced_arrays");n?(t.vertexAttribDivisor=(i,o)=>n.vertexAttribDivisorANGLE(i,o),t.drawElementsInstanced=(i,o,a,u,f)=>n.drawElementsInstancedANGLE(i,o,a,u,f),t.drawArraysInstanced=(i,o,a,u)=>n.drawArraysInstancedANGLE(i,o,a,u)):this.hasInstance=!1}this.canUseUInt32ElementIndex=r.webGLVersion===2||!!r.extensions.uint32ElementIndex}bind(t,r){r=r||this.renderer.shader.shader;const{gl:n}=this;let i=t.glVertexArrayObjects[this.CONTEXT_UID],o=!1;i||(this.managedGeometries[t.id]=t,t.disposeRunner.add(this),t.glVertexArrayObjects[this.CONTEXT_UID]=i={},o=!0);const a=i[r.program.id]||this.initGeometryVao(t,r,o);this._activeGeometry=t,this._activeVao!==a&&(this._activeVao=a,this.hasVao?n.bindVertexArray(a):this.activateVao(t,r.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const t=this._activeGeometry,r=this.renderer.buffer;for(let n=0;n<t.buffers.length;n++){const i=t.buffers[n];r.update(i)}}checkCompatibility(t,r){const n=t.attributes,i=r.attributeData;for(const o in i)if(!n[o])throw new Error(`shader and geometry incompatible, geometry missing the "${o}" attribute`)}getSignature(t,r){const n=t.attributes,i=r.attributeData,o=["g",t.id];for(const a in n)i[a]&&o.push(a,i[a].location);return o.join("-")}initGeometryVao(t,r,n=!0){const i=this.gl,o=this.CONTEXT_UID,a=this.renderer.buffer,u=r.program;u.glPrograms[o]||this.renderer.shader.generateProgram(r),this.checkCompatibility(t,u);const f=this.getSignature(t,u),h=t.glVertexArrayObjects[this.CONTEXT_UID];let d=h[f];if(d)return h[u.id]=d,d;const p=t.buffers,c=t.attributes,v={},y={};for(const _ in p)v[_]=0,y[_]=0;for(const _ in c)!c[_].size&&u.attributeData[_]?c[_].size=u.attributeData[_].size:c[_].size||console.warn(`PIXI Geometry attribute '${_}' size cannot be determined (likely the bound shader does not have the attribute)`),v[c[_].buffer]+=c[_].size*cu[c[_].type];for(const _ in c){const b=c[_],m=b.size;b.stride===void 0&&(v[b.buffer]===m*cu[b.type]?b.stride=0:b.stride=v[b.buffer]),b.start===void 0&&(b.start=y[b.buffer],y[b.buffer]+=m*cu[b.type])}d=i.createVertexArray(),i.bindVertexArray(d);for(let _=0;_<p.length;_++){const b=p[_];a.bind(b),n&&b._glBuffers[o].refCount++}return this.activateVao(t,u),h[u.id]=d,h[f]=d,i.bindVertexArray(null),a.unbind(Fr.ARRAY_BUFFER),d}disposeGeometry(t,r){var u;if(!this.managedGeometries[t.id])return;delete this.managedGeometries[t.id];const n=t.glVertexArrayObjects[this.CONTEXT_UID],i=this.gl,o=t.buffers,a=(u=this.renderer)==null?void 0:u.buffer;if(t.disposeRunner.remove(this),!!n){if(a)for(let f=0;f<o.length;f++){const h=o[f]._glBuffers[this.CONTEXT_UID];h&&(h.refCount--,h.refCount===0&&!r&&a.dispose(o[f],r))}if(!r){for(const f in n)if(f[0]==="g"){const h=n[f];this._activeVao===h&&this.unbind(),i.deleteVertexArray(h)}}delete t.glVertexArrayObjects[this.CONTEXT_UID]}}disposeAll(t){const r=Object.keys(this.managedGeometries);for(let n=0;n<r.length;n++)this.disposeGeometry(this.managedGeometries[r[n]],t)}activateVao(t,r){const n=this.gl,i=this.CONTEXT_UID,o=this.renderer.buffer,a=t.buffers,u=t.attributes;t.indexBuffer&&o.bind(t.indexBuffer);let f=null;for(const h in u){const d=u[h],p=a[d.buffer],c=p._glBuffers[i];if(r.attributeData[h]){f!==c&&(o.bind(p),f=c);const v=r.attributeData[h].location;if(n.enableVertexAttribArray(v),n.vertexAttribPointer(v,d.size,d.type||n.FLOAT,d.normalized,d.stride,d.start),d.instance)if(this.hasInstance)n.vertexAttribDivisor(v,d.divisor);else throw new Error("geometry error, GPU Instancing is not supported on this device")}}}draw(t,r,n,i){const{gl:o}=this,a=this._activeGeometry;if(a.indexBuffer){const u=a.indexBuffer.data.BYTES_PER_ELEMENT,f=u===2?o.UNSIGNED_SHORT:o.UNSIGNED_INT;u===2||u===4&&this.canUseUInt32ElementIndex?a.instanced?o.drawElementsInstanced(t,r||a.indexBuffer.data.length,f,(n||0)*u,i||1):o.drawElements(t,r||a.indexBuffer.data.length,f,(n||0)*u):console.warn("unsupported index buffer type: uint32")}else a.instanced?o.drawArraysInstanced(t,n,r||a.getSize(),i||1):o.drawArrays(t,n,r||a.getSize());return this}unbind(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null}destroy(){this.renderer=null}}wd.extension={type:qt.RendererSystem,name:"geometry"},te.add(wd);const Td=new $e;class jw{constructor(t,r){this._texture=t,this.mapCoord=new $e,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,this.clampMargin=typeof r>"u"?.5:r,this.isSimple=!1}get texture(){return this._texture}set texture(t){this._texture=t,this._textureID=-1}multiplyUvs(t,r){r===void 0&&(r=t);const n=this.mapCoord;for(let i=0;i<t.length;i+=2){const o=t[i],a=t[i+1];r[i]=o*n.a+a*n.c+n.tx,r[i+1]=o*n.b+a*n.d+n.ty}return r}update(t){const r=this._texture;if(!r||!r.valid||!t&&this._textureID===r._updateID)return!1;this._textureID=r._updateID,this._updateID++;const n=r._uvs;this.mapCoord.set(n.x1-n.x0,n.y1-n.y0,n.x3-n.x0,n.y3-n.y0,n.x0,n.y0);const i=r.orig,o=r.trim;o&&(Td.set(i.width/o.width,0,0,i.height/o.height,-o.x/o.width,-o.y/o.height),this.mapCoord.append(Td));const a=r.baseTexture,u=this.uClampFrame,f=this.clampMargin/a.resolution,h=this.clampOffset;return u[0]=(r._frame.x+f+h)/a.width,u[1]=(r._frame.y+f+h)/a.height,u[2]=(r._frame.x+r._frame.width-f+h)/a.width,u[3]=(r._frame.y+r._frame.height-f+h)/a.height,this.uClampOffset[0]=h/a.realWidth,this.uClampOffset[1]=h/a.realHeight,this.isSimple=r._frame.width===a.width&&r._frame.height===a.height&&r.rotate===0,!0}}var qw=`varying vec2 vMaskCoord;
387
387
  varying vec2 vTextureCoord;
388
388
 
389
389
  uniform sampler2D uSampler;
@@ -424,7 +424,7 @@ void main(void)
424
424
  vTextureCoord = aTextureCoord;
425
425
  vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;
426
426
  }
427
- `;class Hw extends Zt{constructor(t,r,n){let i=null;typeof t!="string"&&r===void 0&&n===void 0&&(i=t,t=void 0,r=void 0,n=void 0),super(t||zw,r||qw,n),this.maskSprite=i,this.maskMatrix=new $e}get maskSprite(){return this._maskSprite}set maskSprite(t){this._maskSprite=t,this._maskSprite&&(this._maskSprite.renderable=!1)}apply(t,r,n,i){const o=this._maskSprite,a=o._texture;a.valid&&(a.uvMatrix||(a.uvMatrix=new jw(a,0)),a.uvMatrix.update(),this.uniforms.npmAlpha=a.baseTexture.alphaMode?0:1,this.uniforms.mask=a,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,o).prepend(a.uvMatrix.mapCoord),this.uniforms.alpha=o.worldAlpha,this.uniforms.maskClamp=a.uvMatrix.uClampFrame,t.applyFilter(this,r,n,i))}}class Vw{constructor(t=null){this.type=Ee.NONE,this.autoDetect=!0,this.maskObject=t||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=Zt.defaultMultisample,this.enabled=!0,this.colorMask=15,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._colorMask=15,this._target=null}get filter(){return this._filters?this._filters[0]:null}set filter(t){t?this._filters?this._filters[0]=t:this._filters=[t]:this._filters=null}reset(){this.pooled&&(this.maskObject=null,this.type=Ee.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null}copyCountersOrReset(t){t?(this._stencilCounter=t._stencilCounter,this._scissorCounter=t._scissorCounter,this._scissorRect=t._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)}}class Ed{constructor(t){this.renderer=t,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}setMaskStack(t){this.maskStack=t,this.renderer.scissor.setMaskStack(t),this.renderer.stencil.setMaskStack(t)}push(t,r){let n=r;if(!n.isMaskData){const o=this.maskDataPool.pop()||new Vw;o.pooled=!0,o.maskObject=r,n=o}const i=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(n.copyCountersOrReset(i),n._colorMask=i?i._colorMask:15,n.autoDetect&&this.detect(n),n._target=t,n.type!==Ee.SPRITE&&this.maskStack.push(n),n.enabled)switch(n.type){case Ee.SCISSOR:this.renderer.scissor.push(n);break;case Ee.STENCIL:this.renderer.stencil.push(n);break;case Ee.SPRITE:n.copyCountersOrReset(null),this.pushSpriteMask(n);break;case Ee.COLOR:this.pushColorMask(n);break}n.type===Ee.SPRITE&&this.maskStack.push(n)}pop(t){const r=this.maskStack.pop();if(!(!r||r._target!==t)){if(r.enabled)switch(r.type){case Ee.SCISSOR:this.renderer.scissor.pop(r);break;case Ee.STENCIL:this.renderer.stencil.pop(r.maskObject);break;case Ee.SPRITE:this.popSpriteMask(r);break;case Ee.COLOR:this.popColorMask(r);break}if(r.reset(),r.pooled&&this.maskDataPool.push(r),this.maskStack.length!==0){const n=this.maskStack[this.maskStack.length-1];n.type===Ee.SPRITE&&n._filters&&(n._filters[0].maskSprite=n.maskObject)}}}detect(t){const r=t.maskObject;r?r.isSprite?t.type=Ee.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(t)?t.type=Ee.SCISSOR:t.type=Ee.STENCIL:t.type=Ee.COLOR}pushSpriteMask(t){const{maskObject:r}=t,n=t._target;let i=t._filters;i||(i=this.alphaMaskPool[this.alphaMaskIndex],i||(i=this.alphaMaskPool[this.alphaMaskIndex]=[new Hw]));const o=this.renderer,a=o.renderTexture;let u,f;if(a.current){const d=a.current;u=t.resolution||d.resolution,f=t.multisample??d.multisample}else u=t.resolution||o.resolution,f=t.multisample??o.multisample;i[0].resolution=u,i[0].multisample=f,i[0].maskSprite=r;const h=n.filterArea;n.filterArea=r.getBounds(!0),o.filter.push(n,i),n.filterArea=h,t._filters||this.alphaMaskIndex++}popSpriteMask(t){this.renderer.filter.pop(),t._filters?t._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)}pushColorMask(t){const r=t._colorMask,n=t._colorMask=r&t.colorMask;n!==r&&this.renderer.gl.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)}popColorMask(t){const r=t._colorMask,n=this.maskStack.length>0?this.maskStack[this.maskStack.length-1]._colorMask:15;n!==r&&this.renderer.gl.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)}destroy(){this.renderer=null}}Ed.extension={type:jt.RendererSystem,name:"mask"},te.add(Ed);class Sd{constructor(t){this.renderer=t,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(t){const{gl:r}=this.renderer,n=this.getStackLength();this.maskStack=t;const i=this.getStackLength();i!==n&&(i===0?r.disable(this.glConst):(r.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const Ad=new $e,Od=[],Ao=class extends Sd{constructor(e){super(e),this.glConst=Dt.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0}calcScissorRect(e){if(e._scissorRectLocal)return;const t=e._scissorRect,{maskObject:r}=e,{renderer:n}=this,i=n.renderTexture,o=r.getBounds(!0,Od.pop()??new ne);this.roundFrameToPixels(o,i.current?i.current.resolution:n.resolution,i.sourceFrame,i.destinationFrame,n.projection.transform),t&&o.fit(t),e._scissorRectLocal=o}static isMatrixRotated(e){if(!e)return!1;const{a:t,b:r,c:n,d:i}=e;return(Math.abs(r)>1e-4||Math.abs(n)>1e-4)&&(Math.abs(t)>1e-4||Math.abs(i)>1e-4)}testScissor(e){const{maskObject:t}=e;if(!t.isFastRect||!t.isFastRect()||Ao.isMatrixRotated(t.worldTransform)||Ao.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(e);const r=e._scissorRectLocal;return r.width>0&&r.height>0}roundFrameToPixels(e,t,r,n,i){Ao.isMatrixRotated(i)||(i=i?Ad.copyFrom(i):Ad.identity(),i.translate(-r.x,-r.y).scale(n.width/r.width,n.height/r.height).translate(n.x,n.y),this.renderer.filter.transformAABB(i,e),e.fit(n),e.x=Math.round(e.x*t),e.y=Math.round(e.y*t),e.width=Math.round(e.width*t),e.height=Math.round(e.height*t))}push(e){e._scissorRectLocal||this.calcScissorRect(e);const{gl:t}=this.renderer;e._scissorRect||t.enable(t.SCISSOR_TEST),e._scissorCounter++,e._scissorRect=e._scissorRectLocal,this._useCurrent()}pop(e){const{gl:t}=this.renderer;e&&Od.push(e._scissorRectLocal),this.getStackLength()>0?this._useCurrent():t.disable(t.SCISSOR_TEST)}_useCurrent(){const e=this.maskStack[this.maskStack.length-1]._scissorRect;let t;this.renderer.renderTexture.current?t=e.y:t=this.renderer.height-e.height-e.y,this.renderer.gl.scissor(e.x,t,e.width,e.height)}};let Cd=Ao;Cd.extension={type:jt.RendererSystem,name:"scissor"},te.add(Cd);class Rd extends Sd{constructor(t){super(t),this.glConst=Dt.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const t=this.maskStack[this.maskStack.length-1];return t?t._stencilCounter:0}push(t){const r=t.maskObject,{gl:n}=this.renderer,i=t._stencilCounter;i===0&&(this.renderer.framebuffer.forceStencil(),n.clearStencil(0),n.clear(n.STENCIL_BUFFER_BIT),n.enable(n.STENCIL_TEST)),t._stencilCounter++;const o=t._colorMask;o!==0&&(t._colorMask=0,n.colorMask(!1,!1,!1,!1)),n.stencilFunc(n.EQUAL,i,4294967295),n.stencilOp(n.KEEP,n.KEEP,n.INCR),r.renderable=!0,r.render(this.renderer),this.renderer.batch.flush(),r.renderable=!1,o!==0&&(t._colorMask=o,n.colorMask((o&1)!==0,(o&2)!==0,(o&4)!==0,(o&8)!==0)),this._useCurrent()}pop(t){const r=this.renderer.gl;if(this.getStackLength()===0)r.disable(r.STENCIL_TEST);else{const n=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,i=n?n._colorMask:15;i!==0&&(n._colorMask=0,r.colorMask(!1,!1,!1,!1)),r.stencilOp(r.KEEP,r.KEEP,r.DECR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,i!==0&&(n._colorMask=i,r.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)),this._useCurrent()}}_useCurrent(){const t=this.renderer.gl;t.stencilFunc(t.EQUAL,this.getStackLength(),4294967295),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)}}Rd.extension={type:jt.RendererSystem,name:"stencil"},te.add(Rd);class Id{constructor(t){this.renderer=t,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return zt("7.0.0","renderer.plugins.extract has moved to renderer.extract"),t.extract}},prepare:{enumerable:!1,get(){return zt("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),t.prepare}},interaction:{enumerable:!1,get(){return zt("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),t.events}}})}init(){const t=this.rendererPlugins;for(const r in t)this.plugins[r]=new t[r](this.renderer)}destroy(){for(const t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null}}Id.extension={type:[jt.RendererSystem,jt.CanvasRendererSystem],name:"_plugin"},te.add(Id);class Pd{constructor(t){this.renderer=t,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new $e,this.transform=null}update(t,r,n,i){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=r||this.sourceFrame||t,this.calculateProjection(this.destinationFrame,this.sourceFrame,n,i),this.transform&&this.projectionMatrix.append(this.transform);const o=this.renderer;o.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,o.globalUniforms.update(),o.shader.shader&&o.shader.syncUniformGroup(o.shader.shader.uniforms.globals)}calculateProjection(t,r,n,i){const o=this.projectionMatrix,a=i?-1:1;o.identity(),o.a=1/r.width*2,o.d=a*(1/r.height*2),o.tx=-1-r.x*o.a,o.ty=-a-r.y*o.d}setTransform(t){}destroy(){this.renderer=null}}Pd.extension={type:jt.RendererSystem,name:"projection"},te.add(Pd);const Ww=new su;class Nd{constructor(t){this.renderer=t,this._tempMatrix=new $e}generateTexture(t,r){const{region:n,...i}=r||{},o=n||t.getLocalBounds(null,!0);o.width===0&&(o.width=1),o.height===0&&(o.height=1);const a=Eo.create({width:o.width,height:o.height,...i});this._tempMatrix.tx=-o.x,this._tempMatrix.ty=-o.y;const u=t.transform;return t.transform=Ww,this.renderer.render(t,{renderTexture:a,transform:this._tempMatrix,skipUpdateTransform:!!t.parent,blit:!0}),t.transform=u,a}destroy(){}}Nd.extension={type:[jt.RendererSystem,jt.CanvasRendererSystem],name:"textureGenerator"},te.add(Nd);const $n=new ne,vs=new ne;class Md{constructor(t){this.renderer=t,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new ne,this.destinationFrame=new ne,this.viewportFrame=new ne}bind(t=null,r,n){const i=this.renderer;this.current=t;let o,a,u;t?(o=t.baseTexture,u=o.resolution,r||($n.width=t.frame.width,$n.height=t.frame.height,r=$n),n||(vs.x=t.frame.x,vs.y=t.frame.y,vs.width=r.width,vs.height=r.height,n=vs),a=o.framebuffer):(u=i.resolution,r||($n.width=i._view.screen.width,$n.height=i._view.screen.height,r=$n),n||(n=$n,n.width=r.width,n.height=r.height));const f=this.viewportFrame;f.x=n.x*u,f.y=n.y*u,f.width=n.width*u,f.height=n.height*u,t||(f.y=i.view.height-(f.y+f.height)),f.ceil(),this.renderer.framebuffer.bind(a,f),this.renderer.projection.update(n,r,u,!a),t?this.renderer.mask.setMaskStack(o.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(r),this.destinationFrame.copyFrom(n)}clear(t,r){const n=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,i=t?Be.shared.setValue(t):n,o=this.destinationFrame,a=this.current?this.current.baseTexture:this.renderer._view.screen,u=o.width!==a.width||o.height!==a.height;if(u){let{x:f,y:h,width:d,height:p}=this.viewportFrame;f=Math.round(f),h=Math.round(h),d=Math.round(d),p=Math.round(p),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(f,h,d,p)}this.renderer.framebuffer.clear(i.red,i.green,i.blue,i.alpha,r),u&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}Md.extension={type:jt.RendererSystem,name:"renderTexture"},te.add(Md);class Xw{constructor(t,r){this.program=t,this.uniformData=r,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}}function Kw(e,t){const r={},n=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let i=0;i<n;i++){const o=t.getActiveAttrib(e,i);if(o.name.startsWith("gl_"))continue;const a=fd(t,o.type),u={type:a,name:o.name,size:ld(a),location:t.getAttribLocation(e,o.name)};r[o.name]=u}return r}function Yw(e,t){const r={},n=t.getProgramParameter(e,t.ACTIVE_UNIFORMS);for(let i=0;i<n;i++){const o=t.getActiveUniform(e,i),a=o.name.replace(/\[.*?\]$/,""),u=!!o.name.match(/\[.*?\]$/),f=fd(t,o.type);r[a]={name:a,index:i,type:f,size:o.size,isArray:u,value:sd(f,o.size)}}return r}function Zw(e,t){var f;const r=id(e,e.VERTEX_SHADER,t.vertexSrc),n=id(e,e.FRAGMENT_SHADER,t.fragmentSrc),i=e.createProgram();e.attachShader(i,r),e.attachShader(i,n);const o=(f=t.extra)==null?void 0:f.transformFeedbackVaryings;if(o&&(typeof e.transformFeedbackVaryings!="function"?console.warn("TransformFeedback is not supported but TransformFeedbackVaryings are given."):e.transformFeedbackVaryings(i,o.names,o.bufferMode==="separate"?e.SEPARATE_ATTRIBS:e.INTERLEAVED_ATTRIBS)),e.linkProgram(i),e.getProgramParameter(i,e.LINK_STATUS)||Ew(e,i,r,n),t.attributeData=Kw(i,e),t.uniformData=Yw(i,e),!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(t.vertexSrc)){const h=Object.keys(t.attributeData);h.sort((d,p)=>d>p?1:-1);for(let d=0;d<h.length;d++)t.attributeData[h[d]].location=d,e.bindAttribLocation(i,d,h[d]);e.linkProgram(i)}e.deleteShader(r),e.deleteShader(n);const a={};for(const h in t.uniformData){const d=t.uniformData[h];a[h]={location:e.getUniformLocation(i,h),value:sd(d.type,d.size)}}return new Xw(i,a)}function Qw(e,t,r,n,i){r.buffer.update(i)}const Jw={float:`
427
+ `;class Hw extends Zt{constructor(t,r,n){let i=null;typeof t!="string"&&r===void 0&&n===void 0&&(i=t,t=void 0,r=void 0,n=void 0),super(t||zw,r||qw,n),this.maskSprite=i,this.maskMatrix=new $e}get maskSprite(){return this._maskSprite}set maskSprite(t){this._maskSprite=t,this._maskSprite&&(this._maskSprite.renderable=!1)}apply(t,r,n,i){const o=this._maskSprite,a=o._texture;a.valid&&(a.uvMatrix||(a.uvMatrix=new jw(a,0)),a.uvMatrix.update(),this.uniforms.npmAlpha=a.baseTexture.alphaMode?0:1,this.uniforms.mask=a,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,o).prepend(a.uvMatrix.mapCoord),this.uniforms.alpha=o.worldAlpha,this.uniforms.maskClamp=a.uvMatrix.uClampFrame,t.applyFilter(this,r,n,i))}}class Vw{constructor(t=null){this.type=Ee.NONE,this.autoDetect=!0,this.maskObject=t||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=Zt.defaultMultisample,this.enabled=!0,this.colorMask=15,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._colorMask=15,this._target=null}get filter(){return this._filters?this._filters[0]:null}set filter(t){t?this._filters?this._filters[0]=t:this._filters=[t]:this._filters=null}reset(){this.pooled&&(this.maskObject=null,this.type=Ee.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null}copyCountersOrReset(t){t?(this._stencilCounter=t._stencilCounter,this._scissorCounter=t._scissorCounter,this._scissorRect=t._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)}}class Ed{constructor(t){this.renderer=t,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}setMaskStack(t){this.maskStack=t,this.renderer.scissor.setMaskStack(t),this.renderer.stencil.setMaskStack(t)}push(t,r){let n=r;if(!n.isMaskData){const o=this.maskDataPool.pop()||new Vw;o.pooled=!0,o.maskObject=r,n=o}const i=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(n.copyCountersOrReset(i),n._colorMask=i?i._colorMask:15,n.autoDetect&&this.detect(n),n._target=t,n.type!==Ee.SPRITE&&this.maskStack.push(n),n.enabled)switch(n.type){case Ee.SCISSOR:this.renderer.scissor.push(n);break;case Ee.STENCIL:this.renderer.stencil.push(n);break;case Ee.SPRITE:n.copyCountersOrReset(null),this.pushSpriteMask(n);break;case Ee.COLOR:this.pushColorMask(n);break}n.type===Ee.SPRITE&&this.maskStack.push(n)}pop(t){const r=this.maskStack.pop();if(!(!r||r._target!==t)){if(r.enabled)switch(r.type){case Ee.SCISSOR:this.renderer.scissor.pop(r);break;case Ee.STENCIL:this.renderer.stencil.pop(r.maskObject);break;case Ee.SPRITE:this.popSpriteMask(r);break;case Ee.COLOR:this.popColorMask(r);break}if(r.reset(),r.pooled&&this.maskDataPool.push(r),this.maskStack.length!==0){const n=this.maskStack[this.maskStack.length-1];n.type===Ee.SPRITE&&n._filters&&(n._filters[0].maskSprite=n.maskObject)}}}detect(t){const r=t.maskObject;r?r.isSprite?t.type=Ee.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(t)?t.type=Ee.SCISSOR:t.type=Ee.STENCIL:t.type=Ee.COLOR}pushSpriteMask(t){const{maskObject:r}=t,n=t._target;let i=t._filters;i||(i=this.alphaMaskPool[this.alphaMaskIndex],i||(i=this.alphaMaskPool[this.alphaMaskIndex]=[new Hw]));const o=this.renderer,a=o.renderTexture;let u,f;if(a.current){const d=a.current;u=t.resolution||d.resolution,f=t.multisample??d.multisample}else u=t.resolution||o.resolution,f=t.multisample??o.multisample;i[0].resolution=u,i[0].multisample=f,i[0].maskSprite=r;const h=n.filterArea;n.filterArea=r.getBounds(!0),o.filter.push(n,i),n.filterArea=h,t._filters||this.alphaMaskIndex++}popSpriteMask(t){this.renderer.filter.pop(),t._filters?t._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)}pushColorMask(t){const r=t._colorMask,n=t._colorMask=r&t.colorMask;n!==r&&this.renderer.gl.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)}popColorMask(t){const r=t._colorMask,n=this.maskStack.length>0?this.maskStack[this.maskStack.length-1]._colorMask:15;n!==r&&this.renderer.gl.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)}destroy(){this.renderer=null}}Ed.extension={type:qt.RendererSystem,name:"mask"},te.add(Ed);class Sd{constructor(t){this.renderer=t,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(t){const{gl:r}=this.renderer,n=this.getStackLength();this.maskStack=t;const i=this.getStackLength();i!==n&&(i===0?r.disable(this.glConst):(r.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const Ad=new $e,Od=[],Oo=class extends Sd{constructor(e){super(e),this.glConst=Dt.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0}calcScissorRect(e){if(e._scissorRectLocal)return;const t=e._scissorRect,{maskObject:r}=e,{renderer:n}=this,i=n.renderTexture,o=r.getBounds(!0,Od.pop()??new ie);this.roundFrameToPixels(o,i.current?i.current.resolution:n.resolution,i.sourceFrame,i.destinationFrame,n.projection.transform),t&&o.fit(t),e._scissorRectLocal=o}static isMatrixRotated(e){if(!e)return!1;const{a:t,b:r,c:n,d:i}=e;return(Math.abs(r)>1e-4||Math.abs(n)>1e-4)&&(Math.abs(t)>1e-4||Math.abs(i)>1e-4)}testScissor(e){const{maskObject:t}=e;if(!t.isFastRect||!t.isFastRect()||Oo.isMatrixRotated(t.worldTransform)||Oo.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(e);const r=e._scissorRectLocal;return r.width>0&&r.height>0}roundFrameToPixels(e,t,r,n,i){Oo.isMatrixRotated(i)||(i=i?Ad.copyFrom(i):Ad.identity(),i.translate(-r.x,-r.y).scale(n.width/r.width,n.height/r.height).translate(n.x,n.y),this.renderer.filter.transformAABB(i,e),e.fit(n),e.x=Math.round(e.x*t),e.y=Math.round(e.y*t),e.width=Math.round(e.width*t),e.height=Math.round(e.height*t))}push(e){e._scissorRectLocal||this.calcScissorRect(e);const{gl:t}=this.renderer;e._scissorRect||t.enable(t.SCISSOR_TEST),e._scissorCounter++,e._scissorRect=e._scissorRectLocal,this._useCurrent()}pop(e){const{gl:t}=this.renderer;e&&Od.push(e._scissorRectLocal),this.getStackLength()>0?this._useCurrent():t.disable(t.SCISSOR_TEST)}_useCurrent(){const e=this.maskStack[this.maskStack.length-1]._scissorRect;let t;this.renderer.renderTexture.current?t=e.y:t=this.renderer.height-e.height-e.y,this.renderer.gl.scissor(e.x,t,e.width,e.height)}};let Cd=Oo;Cd.extension={type:qt.RendererSystem,name:"scissor"},te.add(Cd);class Rd extends Sd{constructor(t){super(t),this.glConst=Dt.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const t=this.maskStack[this.maskStack.length-1];return t?t._stencilCounter:0}push(t){const r=t.maskObject,{gl:n}=this.renderer,i=t._stencilCounter;i===0&&(this.renderer.framebuffer.forceStencil(),n.clearStencil(0),n.clear(n.STENCIL_BUFFER_BIT),n.enable(n.STENCIL_TEST)),t._stencilCounter++;const o=t._colorMask;o!==0&&(t._colorMask=0,n.colorMask(!1,!1,!1,!1)),n.stencilFunc(n.EQUAL,i,4294967295),n.stencilOp(n.KEEP,n.KEEP,n.INCR),r.renderable=!0,r.render(this.renderer),this.renderer.batch.flush(),r.renderable=!1,o!==0&&(t._colorMask=o,n.colorMask((o&1)!==0,(o&2)!==0,(o&4)!==0,(o&8)!==0)),this._useCurrent()}pop(t){const r=this.renderer.gl;if(this.getStackLength()===0)r.disable(r.STENCIL_TEST);else{const n=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,i=n?n._colorMask:15;i!==0&&(n._colorMask=0,r.colorMask(!1,!1,!1,!1)),r.stencilOp(r.KEEP,r.KEEP,r.DECR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,i!==0&&(n._colorMask=i,r.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)),this._useCurrent()}}_useCurrent(){const t=this.renderer.gl;t.stencilFunc(t.EQUAL,this.getStackLength(),4294967295),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)}}Rd.extension={type:qt.RendererSystem,name:"stencil"},te.add(Rd);class Id{constructor(t){this.renderer=t,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return Ht("7.0.0","renderer.plugins.extract has moved to renderer.extract"),t.extract}},prepare:{enumerable:!1,get(){return Ht("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),t.prepare}},interaction:{enumerable:!1,get(){return Ht("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),t.events}}})}init(){const t=this.rendererPlugins;for(const r in t)this.plugins[r]=new t[r](this.renderer)}destroy(){for(const t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null}}Id.extension={type:[qt.RendererSystem,qt.CanvasRendererSystem],name:"_plugin"},te.add(Id);class Pd{constructor(t){this.renderer=t,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new $e,this.transform=null}update(t,r,n,i){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=r||this.sourceFrame||t,this.calculateProjection(this.destinationFrame,this.sourceFrame,n,i),this.transform&&this.projectionMatrix.append(this.transform);const o=this.renderer;o.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,o.globalUniforms.update(),o.shader.shader&&o.shader.syncUniformGroup(o.shader.shader.uniforms.globals)}calculateProjection(t,r,n,i){const o=this.projectionMatrix,a=i?-1:1;o.identity(),o.a=1/r.width*2,o.d=a*(1/r.height*2),o.tx=-1-r.x*o.a,o.ty=-a-r.y*o.d}setTransform(t){}destroy(){this.renderer=null}}Pd.extension={type:qt.RendererSystem,name:"projection"},te.add(Pd);const Ww=new ou;class Nd{constructor(t){this.renderer=t,this._tempMatrix=new $e}generateTexture(t,r){const{region:n,...i}=r||{},o=n||t.getLocalBounds(null,!0);o.width===0&&(o.width=1),o.height===0&&(o.height=1);const a=So.create({width:o.width,height:o.height,...i});this._tempMatrix.tx=-o.x,this._tempMatrix.ty=-o.y;const u=t.transform;return t.transform=Ww,this.renderer.render(t,{renderTexture:a,transform:this._tempMatrix,skipUpdateTransform:!!t.parent,blit:!0}),t.transform=u,a}destroy(){}}Nd.extension={type:[qt.RendererSystem,qt.CanvasRendererSystem],name:"textureGenerator"},te.add(Nd);const $n=new ie,gs=new ie;class Md{constructor(t){this.renderer=t,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new ie,this.destinationFrame=new ie,this.viewportFrame=new ie}bind(t=null,r,n){const i=this.renderer;this.current=t;let o,a,u;t?(o=t.baseTexture,u=o.resolution,r||($n.width=t.frame.width,$n.height=t.frame.height,r=$n),n||(gs.x=t.frame.x,gs.y=t.frame.y,gs.width=r.width,gs.height=r.height,n=gs),a=o.framebuffer):(u=i.resolution,r||($n.width=i._view.screen.width,$n.height=i._view.screen.height,r=$n),n||(n=$n,n.width=r.width,n.height=r.height));const f=this.viewportFrame;f.x=n.x*u,f.y=n.y*u,f.width=n.width*u,f.height=n.height*u,t||(f.y=i.view.height-(f.y+f.height)),f.ceil(),this.renderer.framebuffer.bind(a,f),this.renderer.projection.update(n,r,u,!a),t?this.renderer.mask.setMaskStack(o.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(r),this.destinationFrame.copyFrom(n)}clear(t,r){const n=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,i=t?Be.shared.setValue(t):n,o=this.destinationFrame,a=this.current?this.current.baseTexture:this.renderer._view.screen,u=o.width!==a.width||o.height!==a.height;if(u){let{x:f,y:h,width:d,height:p}=this.viewportFrame;f=Math.round(f),h=Math.round(h),d=Math.round(d),p=Math.round(p),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(f,h,d,p)}this.renderer.framebuffer.clear(i.red,i.green,i.blue,i.alpha,r),u&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}Md.extension={type:qt.RendererSystem,name:"renderTexture"},te.add(Md);class Xw{constructor(t,r){this.program=t,this.uniformData=r,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}}function Kw(e,t){const r={},n=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let i=0;i<n;i++){const o=t.getActiveAttrib(e,i);if(o.name.startsWith("gl_"))continue;const a=fd(t,o.type),u={type:a,name:o.name,size:ld(a),location:t.getAttribLocation(e,o.name)};r[o.name]=u}return r}function Yw(e,t){const r={},n=t.getProgramParameter(e,t.ACTIVE_UNIFORMS);for(let i=0;i<n;i++){const o=t.getActiveUniform(e,i),a=o.name.replace(/\[.*?\]$/,""),u=!!o.name.match(/\[.*?\]$/),f=fd(t,o.type);r[a]={name:a,index:i,type:f,size:o.size,isArray:u,value:sd(f,o.size)}}return r}function Zw(e,t){var f;const r=id(e,e.VERTEX_SHADER,t.vertexSrc),n=id(e,e.FRAGMENT_SHADER,t.fragmentSrc),i=e.createProgram();e.attachShader(i,r),e.attachShader(i,n);const o=(f=t.extra)==null?void 0:f.transformFeedbackVaryings;if(o&&(typeof e.transformFeedbackVaryings!="function"?console.warn("TransformFeedback is not supported but TransformFeedbackVaryings are given."):e.transformFeedbackVaryings(i,o.names,o.bufferMode==="separate"?e.SEPARATE_ATTRIBS:e.INTERLEAVED_ATTRIBS)),e.linkProgram(i),e.getProgramParameter(i,e.LINK_STATUS)||Ew(e,i,r,n),t.attributeData=Kw(i,e),t.uniformData=Yw(i,e),!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(t.vertexSrc)){const h=Object.keys(t.attributeData);h.sort((d,p)=>d>p?1:-1);for(let d=0;d<h.length;d++)t.attributeData[h[d]].location=d,e.bindAttribLocation(i,d,h[d]);e.linkProgram(i)}e.deleteShader(r),e.deleteShader(n);const a={};for(const h in t.uniformData){const d=t.uniformData[h];a[h]={location:e.getUniformLocation(i,h),value:sd(d.type,d.size)}}return new Xw(i,a)}function Qw(e,t,r,n,i){r.buffer.update(i)}const Jw={float:`
428
428
  data[offset] = v;
429
429
  `,vec2:`
430
430
  data[offset] = v[0];
@@ -494,7 +494,7 @@ void main(void)
494
494
  `)}}return o.push(`
495
495
  renderer.buffer.update(buffer);
496
496
  `),{size:i,syncFunc:new Function("ud","uv","renderer","syncData","buffer",o.join(`
497
- `))}}let nT=0;const Oo={textureCount:0,uboCount:0};class Ld{constructor(t){this.destroyed=!1,this.renderer=t,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=nT++}systemCheck(){if(!Aw())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(t){this.gl=t,this.reset()}bind(t,r){t.disposeRunner.add(this),t.uniforms.globals=this.renderer.globalUniforms;const n=t.program,i=n.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(t);return this.shader=t,this.program!==n&&(this.program=n,this.gl.useProgram(i.program)),r||(Oo.textureCount=0,Oo.uboCount=0,this.syncUniformGroup(t.uniformGroup,Oo)),i}setUniforms(t){const r=this.shader.program,n=r.glPrograms[this.renderer.CONTEXT_UID];r.syncUniforms(n.uniformData,t,this.renderer)}syncUniformGroup(t,r){const n=this.getGlProgram();(!t.static||t.dirtyId!==n.uniformDirtyGroups[t.id])&&(n.uniformDirtyGroups[t.id]=t.dirtyId,this.syncUniforms(t,n,r))}syncUniforms(t,r,n){(t.syncUniforms[this.shader.program.id]||this.createSyncGroups(t))(r.uniformData,t.uniforms,this.renderer,n)}createSyncGroups(t){const r=this.getSignature(t,this.shader.program.uniformData,"u");return this.cache[r]||(this.cache[r]=xw(t,this.shader.program.uniformData)),t.syncUniforms[this.shader.program.id]=this.cache[r],t.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(t,r){const n=this.getGlProgram();if(!t.static||t.dirtyId!==0||!n.uniformGroups[t.id]){t.dirtyId=0;const i=n.uniformGroups[t.id]||this.createSyncBufferGroup(t,n,r);t.buffer.update(),i(n.uniformData,t.uniforms,this.renderer,Oo,t.buffer)}this.renderer.buffer.bindBufferBase(t.buffer,n.uniformBufferBindings[r])}createSyncBufferGroup(t,r,n){const{gl:i}=this.renderer;this.renderer.buffer.bind(t.buffer);const o=this.gl.getUniformBlockIndex(r.program,n);r.uniformBufferBindings[n]=this.shader.uniformBindCount,i.uniformBlockBinding(r.program,o,this.shader.uniformBindCount),this.shader.uniformBindCount++;const a=this.getSignature(t,this.shader.program.uniformData,"ubo");let u=this._uboCache[a];if(u||(u=this._uboCache[a]=rT(t,this.shader.program.uniformData)),t.autoManage){const f=new Float32Array(u.size/4);t.buffer.update(f)}return r.uniformGroups[t.id]=u.syncFunc,r.uniformGroups[t.id]}getSignature(t,r,n){const i=t.uniforms,o=[`${n}-`];for(const a in i)o.push(a),r[a]&&o.push(r[a].type);return o.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(t){const r=this.gl,n=t.program,i=Zw(r,n);return n.glPrograms[this.renderer.CONTEXT_UID]=i,i}reset(){this.program=null,this.shader=null}disposeShader(t){this.shader===t&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}Ld.extension={type:jt.RendererSystem,name:"shader"},te.add(Ld);class Co{constructor(t){this.renderer=t}run(t){const{renderer:r}=this;r.runners.init.emit(r.options),t.hello&&console.log(`PixiJS 7.2.3 - ${r.rendererLogId} - https://pixijs.com`),r.resize(r.screen.width,r.screen.height)}destroy(){}}Co.defaultOptions={hello:!1},Co.extension={type:[jt.RendererSystem,jt.CanvasRendererSystem],name:"startup"},te.add(Co);function iT(e,t=[]){return t[Rt.NORMAL]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.ADD]=[e.ONE,e.ONE],t[Rt.MULTIPLY]=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.SCREEN]=[e.ONE,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.OVERLAY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.DARKEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.LIGHTEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.COLOR_DODGE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.COLOR_BURN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.HARD_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.SOFT_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.DIFFERENCE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.EXCLUSION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.HUE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.SATURATION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.COLOR]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.LUMINOSITY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.NONE]=[0,0],t[Rt.NORMAL_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.ADD_NPM]=[e.SRC_ALPHA,e.ONE,e.ONE,e.ONE],t[Rt.SCREEN_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.SRC_IN]=[e.DST_ALPHA,e.ZERO],t[Rt.SRC_OUT]=[e.ONE_MINUS_DST_ALPHA,e.ZERO],t[Rt.SRC_ATOP]=[e.DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[Rt.DST_OVER]=[e.ONE_MINUS_DST_ALPHA,e.ONE],t[Rt.DST_IN]=[e.ZERO,e.SRC_ALPHA],t[Rt.DST_OUT]=[e.ZERO,e.ONE_MINUS_SRC_ALPHA],t[Rt.DST_ATOP]=[e.ONE_MINUS_DST_ALPHA,e.SRC_ALPHA],t[Rt.XOR]=[e.ONE_MINUS_DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[Rt.SUBTRACT]=[e.ONE,e.ONE,e.ONE,e.ONE,e.FUNC_REVERSE_SUBTRACT,e.FUNC_ADD],t}const sT=0,oT=1,aT=2,lT=3,uT=4,fT=5,cu=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=Rt.NONE,this._blendEq=!1,this.map=[],this.map[sT]=this.setBlend,this.map[oT]=this.setOffset,this.map[aT]=this.setCullFace,this.map[lT]=this.setDepthTest,this.map[uT]=this.setFrontFace,this.map[fT]=this.setDepthMask,this.checks=[],this.defaultState=new ho,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=iT(e),this.set(this.defaultState),this.reset()}set(e){if(e=e||this.defaultState,this.stateId!==e.data){let t=this.stateId^e.data,r=0;for(;t;)t&1&&this.map[r].call(this,!!(e.data&1<<r)),t=t>>1,r++;this.stateId=e.data}for(let t=0;t<this.checks.length;t++)this.checks[t](this,e)}forceState(e){e=e||this.defaultState;for(let t=0;t<this.map.length;t++)this.map[t].call(this,!!(e.data&1<<t));for(let t=0;t<this.checks.length;t++)this.checks[t](this,e);this.stateId=e.data}setBlend(e){this.updateCheck(cu.checkBlendMode,e),this.gl[e?"enable":"disable"](this.gl.BLEND)}setOffset(e){this.updateCheck(cu.checkPolygonOffset,e),this.gl[e?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)}setDepthTest(e){this.gl[e?"enable":"disable"](this.gl.DEPTH_TEST)}setDepthMask(e){this.gl.depthMask(e)}setCullFace(e){this.gl[e?"enable":"disable"](this.gl.CULL_FACE)}setFrontFace(e){this.gl.frontFace(this.gl[e?"CW":"CCW"])}setBlendMode(e){if(e===this.blendMode)return;this.blendMode=e;const t=this.blendModes[e],r=this.gl;t.length===2?r.blendFunc(t[0],t[1]):r.blendFuncSeparate(t[0],t[1],t[2],t[3]),t.length===6?(this._blendEq=!0,r.blendEquationSeparate(t[4],t[5])):this._blendEq&&(this._blendEq=!1,r.blendEquationSeparate(r.FUNC_ADD,r.FUNC_ADD))}setPolygonOffset(e,t){this.gl.polygonOffset(e,t)}reset(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)}updateCheck(e,t){const r=this.checks.indexOf(e);t&&r===-1?this.checks.push(e):!t&&r!==-1&&this.checks.splice(r,1)}static checkBlendMode(e,t){e.setBlendMode(t.blendMode)}static checkPolygonOffset(e,t){e.setPolygonOffset(1,t.polygonOffset)}destroy(){this.gl=null}};let Fd=cu;Fd.extension={type:jt.RendererSystem,name:"state"},te.add(Fd);class cT extends Vs{constructor(){super(...arguments),this.runners={},this._systemsHash={}}setup(t){this.addRunners(...t.runners);const r=(t.priority??[]).filter(i=>t.systems[i]),n=[...r,...Object.keys(t.systems).filter(i=>!r.includes(i))];for(const i of n)this.addSystem(t.systems[i],i)}addRunners(...t){t.forEach(r=>{this.runners[r]=new _r(r)})}addSystem(t,r){const n=new t(this);if(this[r])throw new Error(`Whoops! The name "${r}" is already in use`);this[r]=n,this._systemsHash[r]=n;for(const i in this.runners)this.runners[i].add(n);return this}emitWithCustomOptions(t,r){const n=Object.keys(this._systemsHash);t.items.forEach(i=>{const o=n.find(a=>this._systemsHash[a]===i);i[t.name](r[o])})}destroy(){Object.values(this.runners).forEach(t=>{t.destroy()}),this._systemsHash={}}}const Ro=class{constructor(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=Ro.defaultMaxIdle,this.checkCountMax=Ro.defaultCheckCountMax,this.mode=Ro.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==sl.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const e=this.renderer.texture,t=e.managedTextures;let r=!1;for(let n=0;n<t.length;n++){const i=t[n];!i.framebuffer&&this.count-i.touched>this.maxIdle&&(e.destroyTexture(i,!0),t[n]=null,r=!0)}if(r){let n=0;for(let i=0;i<t.length;i++)t[i]!==null&&(t[n++]=t[i]);t.length=n}}unload(e){const t=this.renderer.texture,r=e._texture;r&&!r.framebuffer&&t.destroyTexture(r);for(let n=e.children.length-1;n>=0;n--)this.unload(e.children[n])}destroy(){this.renderer=null}};let Tr=Ro;Tr.defaultMode=sl.AUTO,Tr.defaultMaxIdle=60*60,Tr.defaultCheckCountMax=60*10,Tr.extension={type:jt.RendererSystem,name:"textureGC"},te.add(Tr);class hu{constructor(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=Xt.UNSIGNED_BYTE,this.internalFormat=_t.RGBA,this.samplerType=0}}function hT(e){let t;return"WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext?t={[Xt.UNSIGNED_BYTE]:{[_t.RGBA]:e.RGBA8,[_t.RGB]:e.RGB8,[_t.RG]:e.RG8,[_t.RED]:e.R8,[_t.RGBA_INTEGER]:e.RGBA8UI,[_t.RGB_INTEGER]:e.RGB8UI,[_t.RG_INTEGER]:e.RG8UI,[_t.RED_INTEGER]:e.R8UI,[_t.ALPHA]:e.ALPHA,[_t.LUMINANCE]:e.LUMINANCE,[_t.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[Xt.BYTE]:{[_t.RGBA]:e.RGBA8_SNORM,[_t.RGB]:e.RGB8_SNORM,[_t.RG]:e.RG8_SNORM,[_t.RED]:e.R8_SNORM,[_t.RGBA_INTEGER]:e.RGBA8I,[_t.RGB_INTEGER]:e.RGB8I,[_t.RG_INTEGER]:e.RG8I,[_t.RED_INTEGER]:e.R8I},[Xt.UNSIGNED_SHORT]:{[_t.RGBA_INTEGER]:e.RGBA16UI,[_t.RGB_INTEGER]:e.RGB16UI,[_t.RG_INTEGER]:e.RG16UI,[_t.RED_INTEGER]:e.R16UI,[_t.DEPTH_COMPONENT]:e.DEPTH_COMPONENT16},[Xt.SHORT]:{[_t.RGBA_INTEGER]:e.RGBA16I,[_t.RGB_INTEGER]:e.RGB16I,[_t.RG_INTEGER]:e.RG16I,[_t.RED_INTEGER]:e.R16I},[Xt.UNSIGNED_INT]:{[_t.RGBA_INTEGER]:e.RGBA32UI,[_t.RGB_INTEGER]:e.RGB32UI,[_t.RG_INTEGER]:e.RG32UI,[_t.RED_INTEGER]:e.R32UI,[_t.DEPTH_COMPONENT]:e.DEPTH_COMPONENT24},[Xt.INT]:{[_t.RGBA_INTEGER]:e.RGBA32I,[_t.RGB_INTEGER]:e.RGB32I,[_t.RG_INTEGER]:e.RG32I,[_t.RED_INTEGER]:e.R32I},[Xt.FLOAT]:{[_t.RGBA]:e.RGBA32F,[_t.RGB]:e.RGB32F,[_t.RG]:e.RG32F,[_t.RED]:e.R32F,[_t.DEPTH_COMPONENT]:e.DEPTH_COMPONENT32F},[Xt.HALF_FLOAT]:{[_t.RGBA]:e.RGBA16F,[_t.RGB]:e.RGB16F,[_t.RG]:e.RG16F,[_t.RED]:e.R16F},[Xt.UNSIGNED_SHORT_5_6_5]:{[_t.RGB]:e.RGB565},[Xt.UNSIGNED_SHORT_4_4_4_4]:{[_t.RGBA]:e.RGBA4},[Xt.UNSIGNED_SHORT_5_5_5_1]:{[_t.RGBA]:e.RGB5_A1},[Xt.UNSIGNED_INT_2_10_10_10_REV]:{[_t.RGBA]:e.RGB10_A2,[_t.RGBA_INTEGER]:e.RGB10_A2UI},[Xt.UNSIGNED_INT_10F_11F_11F_REV]:{[_t.RGB]:e.R11F_G11F_B10F},[Xt.UNSIGNED_INT_5_9_9_9_REV]:{[_t.RGB]:e.RGB9_E5},[Xt.UNSIGNED_INT_24_8]:{[_t.DEPTH_STENCIL]:e.DEPTH24_STENCIL8},[Xt.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[_t.DEPTH_STENCIL]:e.DEPTH32F_STENCIL8}}:t={[Xt.UNSIGNED_BYTE]:{[_t.RGBA]:e.RGBA,[_t.RGB]:e.RGB,[_t.ALPHA]:e.ALPHA,[_t.LUMINANCE]:e.LUMINANCE,[_t.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[Xt.UNSIGNED_SHORT_5_6_5]:{[_t.RGB]:e.RGB},[Xt.UNSIGNED_SHORT_4_4_4_4]:{[_t.RGBA]:e.RGBA},[Xt.UNSIGNED_SHORT_5_5_5_1]:{[_t.RGBA]:e.RGBA}},t}class Bd{constructor(t){this.renderer=t,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Kt,this.hasIntegerTextures=!1}contextChange(){const t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=hT(t);const r=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=r;for(let i=0;i<r;i++)this.boundTextures[i]=null;this.emptyTextures={};const n=new hu(t.createTexture());t.bindTexture(t.TEXTURE_2D,n.texture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[t.TEXTURE_2D]=n,this.emptyTextures[t.TEXTURE_CUBE_MAP]=new hu(t.createTexture()),t.bindTexture(t.TEXTURE_CUBE_MAP,this.emptyTextures[t.TEXTURE_CUBE_MAP].texture);for(let i=0;i<6;i++)t.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,null);t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MIN_FILTER,t.LINEAR);for(let i=0;i<this.boundTextures.length;i++)this.bind(null,i)}bind(t,r=0){const{gl:n}=this;if(t=t==null?void 0:t.castToBaseTexture(),t!=null&&t.valid&&!t.parentTextureArray){t.touched=this.renderer.textureGC.count;const i=t._glTextures[this.CONTEXT_UID]||this.initTexture(t);this.boundTextures[r]!==t&&(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(t.target,i.texture)),i.dirtyId!==t.dirtyId?(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),this.updateTexture(t)):i.dirtyStyleId!==t.dirtyStyleId&&this.updateTextureStyle(t),this.boundTextures[r]=t}else this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(n.TEXTURE_2D,this.emptyTextures[n.TEXTURE_2D].texture),this.boundTextures[r]=null}reset(){this._unknownBoundTextures=!0,this.hasIntegerTextures=!1,this.currentLocation=-1;for(let t=0;t<this.boundTextures.length;t++)this.boundTextures[t]=this.unknownTexture}unbind(t){const{gl:r,boundTextures:n}=this;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(let i=0;i<n.length;i++)n[i]===this.unknownTexture&&this.bind(null,i)}for(let i=0;i<n.length;i++)n[i]===t&&(this.currentLocation!==i&&(r.activeTexture(r.TEXTURE0+i),this.currentLocation=i),r.bindTexture(t.target,this.emptyTextures[t.target].texture),n[i]=null)}ensureSamplerType(t){const{boundTextures:r,hasIntegerTextures:n,CONTEXT_UID:i}=this;if(n)for(let o=t-1;o>=0;--o){const a=r[o];a&&a._glTextures[i].samplerType!==il.FLOAT&&this.renderer.texture.unbind(a)}}initTexture(t){const r=new hu(this.gl.createTexture());return r.dirtyId=-1,t._glTextures[this.CONTEXT_UID]=r,this.managedTextures.push(t),t.on("dispose",this.destroyTexture,this),r}initTextureType(t,r){var n;r.internalFormat=((n=this.internalFormats[t.type])==null?void 0:n[t.format])??t.format,this.webGLVersion===2&&t.type===Xt.HALF_FLOAT?r.type=this.gl.HALF_FLOAT:r.type=t.type}updateTexture(t){var i;const r=t._glTextures[this.CONTEXT_UID];if(!r)return;const n=this.renderer;if(this.initTextureType(t,r),(i=t.resource)!=null&&i.upload(n,t,r))r.samplerType!==il.FLOAT&&(this.hasIntegerTextures=!0);else{const o=t.realWidth,a=t.realHeight,u=n.gl;(r.width!==o||r.height!==a||r.dirtyId<0)&&(r.width=o,r.height=a,u.texImage2D(t.target,0,r.internalFormat,o,a,0,t.format,r.type,null))}t.dirtyStyleId!==r.dirtyStyleId&&this.updateTextureStyle(t),r.dirtyId=t.dirtyId}destroyTexture(t,r){const{gl:n}=this;if(t=t.castToBaseTexture(),t._glTextures[this.CONTEXT_UID]&&(this.unbind(t),n.deleteTexture(t._glTextures[this.CONTEXT_UID].texture),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.CONTEXT_UID],!r)){const i=this.managedTextures.indexOf(t);i!==-1&&fo(this.managedTextures,i,1)}}updateTextureStyle(t){var n;const r=t._glTextures[this.CONTEXT_UID];r&&((t.mipmap===Rn.POW2||this.webGLVersion!==2)&&!t.isPowerOfTwo?r.mipmap=!1:r.mipmap=t.mipmap>=1,this.webGLVersion!==2&&!t.isPowerOfTwo?r.wrapMode=Qi.CLAMP:r.wrapMode=t.wrapMode,(n=t.resource)!=null&&n.style(this.renderer,t,r)||this.setStyle(t,r),r.dirtyStyleId=t.dirtyStyleId)}setStyle(t,r){const n=this.gl;if(r.mipmap&&t.mipmap!==Rn.ON_MANUAL&&n.generateMipmap(t.target),n.texParameteri(t.target,n.TEXTURE_WRAP_S,r.wrapMode),n.texParameteri(t.target,n.TEXTURE_WRAP_T,r.wrapMode),r.mipmap){n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===Lr.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);const i=this.renderer.context.extensions.anisotropicFiltering;if(i&&t.anisotropicLevel>0&&t.scaleMode===Lr.LINEAR){const o=Math.min(t.anisotropicLevel,n.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(t.target,i.TEXTURE_MAX_ANISOTROPY_EXT,o)}}else n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===Lr.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(t.target,n.TEXTURE_MAG_FILTER,t.scaleMode===Lr.LINEAR?n.LINEAR:n.NEAREST)}destroy(){this.renderer=null}}Bd.extension={type:jt.RendererSystem,name:"texture"},te.add(Bd);class Dd{constructor(t){this.renderer=t}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(t){const{gl:r,CONTEXT_UID:n}=this,i=t._glTransformFeedbacks[n]||this.createGLTransformFeedback(t);r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,i)}unbind(){const{gl:t}=this;t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(t,r){const{gl:n,renderer:i}=this;r&&i.shader.bind(r),n.beginTransformFeedback(t)}endTransformFeedback(){const{gl:t}=this;t.endTransformFeedback()}createGLTransformFeedback(t){const{gl:r,renderer:n,CONTEXT_UID:i}=this,o=r.createTransformFeedback();t._glTransformFeedbacks[i]=o,r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,o);for(let a=0;a<t.buffers.length;a++){const u=t.buffers[a];u&&(n.buffer.update(u),u._glBuffers[i].refCount++,r.bindBufferBase(r.TRANSFORM_FEEDBACK_BUFFER,a,u._glBuffers[i].buffer||null))}return r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,null),t.disposeRunner.add(this),o}disposeTransformFeedback(t,r){const n=t._glTransformFeedbacks[this.CONTEXT_UID],i=this.gl;t.disposeRunner.remove(this);const o=this.renderer.buffer;if(o)for(let a=0;a<t.buffers.length;a++){const u=t.buffers[a];if(!u)continue;const f=u._glBuffers[this.CONTEXT_UID];f&&(f.refCount--,f.refCount===0&&!r&&o.dispose(u,r))}n&&(r||i.deleteTransformFeedback(n),delete t._glTransformFeedbacks[this.CONTEXT_UID])}destroy(){this.renderer=null}}Dd.extension={type:jt.RendererSystem,name:"transformFeedback"},te.add(Dd);class Io{constructor(t){this.renderer=t}init(t){this.screen=new ne(0,0,t.width,t.height),this.element=t.view||Dt.ADAPTER.createCanvas(),this.resolution=t.resolution||Dt.RESOLUTION,this.autoDensity=!!t.autoDensity}resizeView(t,r){this.element.width=Math.round(t*this.resolution),this.element.height=Math.round(r*this.resolution);const n=this.element.width/this.resolution,i=this.element.height/this.resolution;this.screen.width=n,this.screen.height=i,this.autoDensity&&(this.element.style.width=`${n}px`,this.element.style.height=`${i}px`),this.renderer.emit("resize",n,i),this.renderer.runners.resize.emit(this.screen.width,this.screen.height)}destroy(t){var r;t&&((r=this.element.parentNode)==null||r.removeChild(this.element)),this.renderer=null,this.element=null,this.screen=null}}Io.defaultOptions={width:800,height:600,resolution:Dt.RESOLUTION,autoDensity:!1},Io.extension={type:[jt.RendererSystem,jt.CanvasRendererSystem],name:"_view"},te.add(Io),Dt.PREFER_ENV=Cn.WEBGL2,Dt.STRICT_TEXTURE_CACHE=!1,Dt.RENDER_OPTIONS={...wo.defaultOptions,...xo.defaultOptions,...Io.defaultOptions,...Co.defaultOptions},Object.defineProperties(Dt,{WRAP_MODE:{get(){return Kt.defaultOptions.wrapMode},set(e){zt("7.1.0","settings.WRAP_MODE is deprecated, use BaseTexture.defaultOptions.wrapMode"),Kt.defaultOptions.wrapMode=e}},SCALE_MODE:{get(){return Kt.defaultOptions.scaleMode},set(e){zt("7.1.0","settings.SCALE_MODE is deprecated, use BaseTexture.defaultOptions.scaleMode"),Kt.defaultOptions.scaleMode=e}},MIPMAP_TEXTURES:{get(){return Kt.defaultOptions.mipmap},set(e){zt("7.1.0","settings.MIPMAP_TEXTURES is deprecated, use BaseTexture.defaultOptions.mipmap"),Kt.defaultOptions.mipmap=e}},ANISOTROPIC_LEVEL:{get(){return Kt.defaultOptions.anisotropicLevel},set(e){zt("7.1.0","settings.ANISOTROPIC_LEVEL is deprecated, use BaseTexture.defaultOptions.anisotropicLevel"),Kt.defaultOptions.anisotropicLevel=e}},FILTER_RESOLUTION:{get(){return zt("7.1.0","settings.FILTER_RESOLUTION is deprecated, use Filter.defaultResolution"),Zt.defaultResolution},set(e){Zt.defaultResolution=e}},FILTER_MULTISAMPLE:{get(){return zt("7.1.0","settings.FILTER_MULTISAMPLE is deprecated, use Filter.defaultMultisample"),Zt.defaultMultisample},set(e){Zt.defaultMultisample=e}},SPRITE_MAX_TEXTURES:{get(){return wr.defaultMaxTextures},set(e){zt("7.1.0","settings.SPRITE_MAX_TEXTURES is deprecated, use BatchRenderer.defaultMaxTextures"),wr.defaultMaxTextures=e}},SPRITE_BATCH_SIZE:{get(){return wr.defaultBatchSize},set(e){zt("7.1.0","settings.SPRITE_BATCH_SIZE is deprecated, use BatchRenderer.defaultBatchSize"),wr.defaultBatchSize=e}},CAN_UPLOAD_SAME_BUFFER:{get(){return wr.canUploadSameBuffer},set(e){zt("7.1.0","settings.CAN_UPLOAD_SAME_BUFFER is deprecated, use BatchRenderer.canUploadSameBuffer"),wr.canUploadSameBuffer=e}},GC_MODE:{get(){return Tr.defaultMode},set(e){zt("7.1.0","settings.GC_MODE is deprecated, use TextureGCSystem.defaultMode"),Tr.defaultMode=e}},GC_MAX_IDLE:{get(){return Tr.defaultMaxIdle},set(e){zt("7.1.0","settings.GC_MAX_IDLE is deprecated, use TextureGCSystem.defaultMaxIdle"),Tr.defaultMaxIdle=e}},GC_MAX_CHECK_COUNT:{get(){return Tr.defaultCheckCountMax},set(e){zt("7.1.0","settings.GC_MAX_CHECK_COUNT is deprecated, use TextureGCSystem.defaultCheckCountMax"),Tr.defaultCheckCountMax=e}},PRECISION_VERTEX:{get(){return Xr.defaultVertexPrecision},set(e){zt("7.1.0","settings.PRECISION_VERTEX is deprecated, use Program.defaultVertexPrecision"),Xr.defaultVertexPrecision=e}},PRECISION_FRAGMENT:{get(){return Xr.defaultFragmentPrecision},set(e){zt("7.1.0","settings.PRECISION_FRAGMENT is deprecated, use Program.defaultFragmentPrecision"),Xr.defaultFragmentPrecision=e}}});var Po=(e=>(e[e.INTERACTION=50]="INTERACTION",e[e.HIGH=25]="HIGH",e[e.NORMAL=0]="NORMAL",e[e.LOW=-25]="LOW",e[e.UTILITY=-50]="UTILITY",e))(Po||{});class du{constructor(t,r=null,n=0,i=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=t,this.context=r,this.priority=n,this.once=i}match(t,r=null){return this.fn===t&&this.context===r}emit(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));const r=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),r}connect(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this}destroy(t=!1){this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const r=this.next;return this.next=t?null:r,this.previous=null,r}}const Je=class{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new du(null,null,1/0),this.deltaMS=1/Je.targetFPMS,this.elapsedMS=1/Je.targetFPMS,this._tick=e=>{this._requestId=null,this.started&&(this.update(e),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(e,t,r=Po.NORMAL){return this._addListener(new du(e,t,r))}addOnce(e,t,r=Po.NORMAL){return this._addListener(new du(e,t,r,!0))}_addListener(e){let t=this._head.next,r=this._head;if(!t)e.connect(r);else{for(;t;){if(e.priority>t.priority){e.connect(r);break}r=t,t=t.next}e.previous||e.connect(r)}return this._startIfPossible(),this}remove(e,t){let r=this._head.next;for(;r;)r.match(e,t)?r=r.destroy():r=r.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let e=0,t=this._head;for(;t=t.next;)e++;return e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let e=this._head.next;for(;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}}update(e=performance.now()){let t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){const i=e-this._lastFrame|0;if(i<this._minElapsedMS)return;this._lastFrame=e-i%this._minElapsedMS}this.deltaMS=t,this.deltaTime=this.deltaMS*Je.targetFPMS;const r=this._head;let n=r.next;for(;n;)n=n.emit(this.deltaTime);r.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=e}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(e){const t=Math.min(this.maxFPS,e),r=Math.min(Math.max(0,t)/1e3,Je.targetFPMS);this._maxElapsedMS=1/r}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(e){if(e===0)this._minElapsedMS=0;else{const t=Math.max(this.minFPS,e);this._minElapsedMS=1/(t/1e3)}}static get shared(){if(!Je._shared){const e=Je._shared=new Je;e.autoStart=!0,e._protected=!0}return Je._shared}static get system(){if(!Je._system){const e=Je._system=new Je;e.autoStart=!0,e._protected=!0}return Je._system}};let Er=Je;Er.targetFPMS=.06,Object.defineProperties(Dt,{TARGET_FPMS:{get(){return Er.targetFPMS},set(e){zt("7.1.0","settings.TARGET_FPMS is deprecated, use Ticker.targetFPMS"),Er.targetFPMS=e}}});class Ud{static init(t){t=Object.assign({autoStart:!0,sharedTicker:!1},t),Object.defineProperty(this,"ticker",{set(r){this._ticker&&this._ticker.remove(this.render,this),this._ticker=r,r&&r.add(this.render,this,Po.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?Er.shared:new Er,t.autoStart&&this.start()}static destroy(){if(this._ticker){const t=this._ticker;this.ticker=null,t.destroy()}}}Ud.extension=jt.Application,te.add(Ud);const dT=[];te.handleByList(jt.Renderer,dT);class $d{constructor(t){this.renderer=t}contextChange(t){let r;if(this.renderer.context.webGLVersion===1){const n=t.getParameter(t.FRAMEBUFFER_BINDING);t.bindFramebuffer(t.FRAMEBUFFER,null),r=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.FRAMEBUFFER,n)}else{const n=t.getParameter(t.DRAW_FRAMEBUFFER_BINDING);t.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),r=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,n)}r>=Te.HIGH?this.multisample=Te.HIGH:r>=Te.MEDIUM?this.multisample=Te.MEDIUM:r>=Te.LOW?this.multisample=Te.LOW:this.multisample=Te.NONE}destroy(){}}$d.extension={type:jt.RendererSystem,name:"_multisample"},te.add($d);class pT{constructor(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class Gd{constructor(t){this.renderer=t,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(t){const{gl:r,CONTEXT_UID:n}=this,i=t._glBuffers[n]||this.createGLBuffer(t);r.bindBuffer(t.type,i.buffer)}unbind(t){const{gl:r}=this;r.bindBuffer(t,null)}bindBufferBase(t,r){const{gl:n,CONTEXT_UID:i}=this;if(this.boundBufferBases[r]!==t){const o=t._glBuffers[i]||this.createGLBuffer(t);this.boundBufferBases[r]=t,n.bindBufferBase(n.UNIFORM_BUFFER,r,o.buffer)}}bindBufferRange(t,r,n){const{gl:i,CONTEXT_UID:o}=this;n=n||0;const a=t._glBuffers[o]||this.createGLBuffer(t);i.bindBufferRange(i.UNIFORM_BUFFER,r||0,a.buffer,n*256,256)}update(t){const{gl:r,CONTEXT_UID:n}=this,i=t._glBuffers[n]||this.createGLBuffer(t);if(t._updateID!==i.updateID)if(i.updateID=t._updateID,r.bindBuffer(t.type,i.buffer),i.byteLength>=t.data.byteLength)r.bufferSubData(t.type,0,t.data);else{const o=t.static?r.STATIC_DRAW:r.DYNAMIC_DRAW;i.byteLength=t.data.byteLength,r.bufferData(t.type,t.data,o)}}dispose(t,r){if(!this.managedBuffers[t.id])return;delete this.managedBuffers[t.id];const n=t._glBuffers[this.CONTEXT_UID],i=this.gl;t.disposeRunner.remove(this),n&&(r||i.deleteBuffer(n.buffer),delete t._glBuffers[this.CONTEXT_UID])}disposeAll(t){const r=Object.keys(this.managedBuffers);for(let n=0;n<r.length;n++)this.dispose(this.managedBuffers[r[n]],t)}createGLBuffer(t){const{CONTEXT_UID:r,gl:n}=this;return t._glBuffers[r]=new pT(n.createBuffer()),this.managedBuffers[t.id]=t,t.disposeRunner.add(this),t._glBuffers[r]}}Gd.extension={type:jt.RendererSystem,name:"buffer"},te.add(Gd);class jd{constructor(t){this.renderer=t}render(t,r){const n=this.renderer;let i,o,a,u;if(r&&(i=r.renderTexture,o=r.clear,a=r.transform,u=r.skipUpdateTransform),this.renderingToScreen=!i,n.runners.prerender.emit(),n.emit("prerender"),n.projection.transform=a,!n.context.isLost){if(i||(this.lastObjectRendered=t),!u){const f=t.enableTempParent();t.updateTransform(),t.disableTempParent(f)}n.renderTexture.bind(i),n.batch.currentRenderer.start(),(o??n.background.clearBeforeRender)&&n.renderTexture.clear(),t.render(n),n.batch.currentRenderer.flush(),i&&(r.blit&&n.framebuffer.blit(),i.baseTexture.update()),n.runners.postrender.emit(),n.projection.transform=null,n.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}jd.extension={type:jt.RendererSystem,name:"objectRenderer"},te.add(jd);const pu=class extends cT{constructor(e){super(),this.type=Fc.WEBGL,e=Object.assign({},Dt.RENDER_OPTIONS,e),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new br({projectionMatrix:new $e},!0);const t={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:pu.__systems,priority:["_view","textureGenerator","background","_plugin","startup","context","state","texture","buffer","geometry","framebuffer","transformFeedback","mask","scissor","stencil","projection","textureGC","filter","renderTexture","batch","objectRenderer","_multisample"]};this.setup(t),"useContextAlpha"in e&&(zt("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),e.premultipliedAlpha=e.useContextAlpha&&e.useContextAlpha!=="notMultiplied",e.backgroundAlpha=e.useContextAlpha===!1?1:e.backgroundAlpha),this._plugin.rendererPlugins=pu.__plugins,this.options=e,this.startup.run(this.options)}static test(e){return e!=null&&e.forceCanvas?!1:zx()}render(e,t){this.objectRenderer.render(e,t)}resize(e,t){this._view.resizeView(e,t)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(e=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:e}),super.destroy()}get plugins(){return this._plugin.plugins}get multisample(){return this._multisample.multisample}get width(){return this._view.element.width}get height(){return this._view.element.height}get resolution(){return this._view.resolution}set resolution(e){this._view.resolution=e,this.runners.resolutionChange.emit(e)}get autoDensity(){return this._view.autoDensity}get view(){return this._view.element}get screen(){return this._view.screen}get lastObjectRendered(){return this.objectRenderer.lastObjectRendered}get renderingToScreen(){return this.objectRenderer.renderingToScreen}get rendererLogId(){return`WebGL ${this.context.webGLVersion}`}get clearBeforeRender(){return zt("7.0.0","renderer.clearBeforeRender has been deprecated, please use renderer.background.clearBeforeRender instead."),this.background.clearBeforeRender}get useContextAlpha(){return zt("7.0.0","renderer.useContextAlpha has been deprecated, please use renderer.context.premultipliedAlpha instead."),this.context.useContextAlpha}get preserveDrawingBuffer(){return zt("7.0.0","renderer.preserveDrawingBuffer has been deprecated, we cannot truly know this unless pixi created the context"),this.context.preserveDrawingBuffer}get backgroundColor(){return zt("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color}set backgroundColor(e){zt("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color=e}get backgroundAlpha(){return zt("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha}set backgroundAlpha(e){zt("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha=e}get powerPreference(){return zt("7.0.0","renderer.powerPreference has been deprecated, we can only know this if pixi creates the context"),this.context.powerPreference}generateTexture(e,t){return this.textureGenerator.generateTexture(e,t)}};let wi=pu;wi.extension={type:jt.Renderer,priority:1},wi.__plugins={},wi.__systems={},te.handleByMap(jt.RendererPlugin,wi.__plugins),te.handleByMap(jt.RendererSystem,wi.__systems),te.add(wi);class qd extends us{constructor(t,r){const{width:n,height:i}=r||{};super(n,i),this.items=[],this.itemDirtyIds=[];for(let o=0;o<t;o++){const a=new Kt;this.items.push(a),this.itemDirtyIds.push(-2)}this.length=t,this._load=null,this.baseTexture=null}initFromArray(t,r){for(let n=0;n<this.length;n++)t[n]&&(t[n].castToBaseTexture?this.addBaseTextureAt(t[n].castToBaseTexture(),n):t[n]instanceof us?this.addResourceAt(t[n],n):this.addResourceAt(Jh(t[n],r),n))}dispose(){for(let t=0,r=this.length;t<r;t++)this.items[t].destroy();this.items=null,this.itemDirtyIds=null,this._load=null}addResourceAt(t,r){if(!this.items[r])throw new Error(`Index ${r} is out of bounds`);return t.valid&&!this.valid&&this.resize(t.width,t.height),this.items[r].setResource(t),this}bind(t){if(this.baseTexture!==null)throw new Error("Only one base texture per TextureArray is allowed");super.bind(t);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=t,this.items[r].on("update",t.update,t)}unbind(t){super.unbind(t);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=null,this.items[r].off("update",t.update,t)}load(){if(this._load)return this._load;const r=this.items.map(n=>n.resource).filter(n=>n).map(n=>n.load());return this._load=Promise.all(r).then(()=>{const{realWidth:n,realHeight:i}=this.items[0];return this.resize(n,i),Promise.resolve(this)}),this._load}}class vT extends qd{constructor(t,r){const{width:n,height:i}=r||{};let o,a;Array.isArray(t)?(o=t,a=t.length):a=t,super(a,{width:n,height:i}),o&&this.initFromArray(o,r)}addBaseTextureAt(t,r){if(t.resource)this.addResourceAt(t.resource,r);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(t){super.bind(t),t.target=ii.TEXTURE_2D_ARRAY}upload(t,r,n){const{length:i,itemDirtyIds:o,items:a}=this,{gl:u}=t;n.dirtyId<0&&u.texImage3D(u.TEXTURE_2D_ARRAY,0,n.internalFormat,this._width,this._height,i,0,r.format,n.type,null);for(let f=0;f<i;f++){const h=a[f];o[f]<h.dirtyId&&(o[f]=h.dirtyId,h.valid&&u.texSubImage3D(u.TEXTURE_2D_ARRAY,0,0,0,f,h.resource.width,h.resource.height,1,r.format,n.type,h.resource.source))}return!0}}class gT extends dn{constructor(t){super(t)}static test(t){const{OffscreenCanvas:r}=globalThis;return r&&t instanceof r?!0:globalThis.HTMLCanvasElement&&t instanceof HTMLCanvasElement}}const gs=class extends qd{constructor(e,t){const{width:r,height:n,autoLoad:i,linkBaseTexture:o}=t||{};if(e&&e.length!==gs.SIDES)throw new Error(`Invalid length. Got ${e.length}, expected 6`);super(6,{width:r,height:n});for(let a=0;a<gs.SIDES;a++)this.items[a].target=ii.TEXTURE_CUBE_MAP_POSITIVE_X+a;this.linkBaseTexture=o!==!1,e&&this.initFromArray(e,t),i!==!1&&this.load()}bind(e){super.bind(e),e.target=ii.TEXTURE_CUBE_MAP}addBaseTextureAt(e,t,r){if(r===void 0&&(r=this.linkBaseTexture),!this.items[t])throw new Error(`Index ${t} is out of bounds`);if(!this.linkBaseTexture||e.parentTextureArray||Object.keys(e._glTextures).length>0)if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("CubeResource does not support copying of renderTexture.");else e.target=ii.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.parentTextureArray=this.baseTexture,this.items[t]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[t]=e,this}upload(e,t,r){const n=this.itemDirtyIds;for(let i=0;i<gs.SIDES;i++){const o=this.items[i];(n[i]<o.dirtyId||r.dirtyId<t.dirtyId)&&(o.valid&&o.resource?(o.resource.upload(e,o,r),n[i]=o.dirtyId):n[i]<-1&&(e.gl.texImage2D(o.target,0,r.internalFormat,t.realWidth,t.realHeight,0,t.format,r.type,null),n[i]=-1))}return!0}static test(e){return Array.isArray(e)&&e.length===gs.SIDES}};let zd=gs;zd.SIDES=6;class Ti extends dn{constructor(t,r){r=r||{};let n,i;typeof t=="string"?(n=Ti.EMPTY,i=t):(n=t,i=null),super(n),this.url=i,this.crossOrigin=r.crossOrigin??!0,this.alphaMode=typeof r.alphaMode=="number"?r.alphaMode:null,this._load=null,r.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(async(t,r)=>{if(this.url===null){t(this);return}try{const n=await Dt.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const i=await n.blob();if(this.destroyed)return;const o=await createImageBitmap(i,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===ln.UNPACK?"premultiply":"none"});if(this.destroyed)return;this.source=o,this.update(),t(this)}catch(n){if(this.destroyed)return;r(n),this.onError.emit(n)}}),this._load)}upload(t,r,n){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),super.upload(t,r,n)):(this.load(),!1)}dispose(){this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(t){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof t=="string"||t instanceof ImageBitmap)}static get EMPTY(){return Ti._EMPTY=Ti._EMPTY??Dt.ADAPTER.createCanvas(0,0),Ti._EMPTY}}const No=class extends dn{constructor(e,t){t=t||{},super(Dt.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=e,this.scale=t.scale||1,this._overrideWidth=t.width,this._overrideHeight=t.height,this._resolve=null,this._crossorigin=t.crossorigin,this._load=null,t.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(e=>{if(this._resolve=()=>{this.resize(this.source.width,this.source.height),e(this)},No.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}),this._load)}_loadSvg(){const e=new Image;dn.crossOrigin(e,this.svg,this._crossorigin),e.src=this.svg,e.onerror=t=>{this._resolve&&(e.onerror=null,this.onError.emit(t))},e.onload=()=>{if(!this._resolve)return;const t=e.width,r=e.height;if(!t||!r)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let n=t*this.scale,i=r*this.scale;(this._overrideWidth||this._overrideHeight)&&(n=this._overrideWidth||this._overrideHeight/r*t,i=this._overrideHeight||this._overrideWidth/t*r),n=Math.round(n),i=Math.round(i);const o=this.source;o.width=n,o.height=i,o._pixiId=`canvas_${ls()}`,o.getContext("2d").drawImage(e,0,0,t,r,0,0,n,i),this._resolve(),this._resolve=null}}static getSize(e){const t=No.SVG_SIZE.exec(e),r={};return t&&(r[t[1]]=Math.round(parseFloat(t[3])),r[t[5]]=Math.round(parseFloat(t[7]))),r}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(e,t){return t==="svg"||typeof e=="string"&&e.startsWith("data:image/svg+xml")||typeof e=="string"&&No.SVG_XML.test(e)}};let vu=No;vu.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m,vu.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;const gu=class extends dn{constructor(e,t){if(t=t||{},!(e instanceof HTMLVideoElement)){const r=document.createElement("video");r.setAttribute("preload","auto"),r.setAttribute("webkit-playsinline",""),r.setAttribute("playsinline",""),typeof e=="string"&&(e=[e]);const n=e[0].src||e[0];dn.crossOrigin(r,n,t.crossorigin);for(let i=0;i<e.length;++i){const o=document.createElement("source");let{src:a,mime:u}=e[i];a=a||e[i];const f=a.split("?").shift().toLowerCase(),h=f.slice(f.lastIndexOf(".")+1);u=u||gu.MIME_TYPES[h]||`video/${h}`,o.src=a,o.type=u,r.appendChild(o)}e=r}super(e),this.noSubImage=!0,this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=t.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=t.autoPlay!==!1,this._load=null,this._resolve=null,this._onCanPlay=this._onCanPlay.bind(this),this._onError=this._onError.bind(this),t.autoLoad!==!1&&this.load()}update(e=0){if(!this.destroyed){const t=Er.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-t),(!this._updateFPS||this._msToNextUpdate<=0)&&(super.update(),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}}load(){if(this._load)return this._load;const e=this.source;return(e.readyState===e.HAVE_ENOUGH_DATA||e.readyState===e.HAVE_FUTURE_DATA)&&e.width&&e.height&&(e.complete=!0),e.addEventListener("play",this._onPlayStart.bind(this)),e.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(e.addEventListener("canplay",this._onCanPlay),e.addEventListener("canplaythrough",this._onCanPlay),e.addEventListener("error",this._onError,!0)),this._load=new Promise(t=>{this.valid?t(this):(this._resolve=t,e.load())}),this._load}_onError(e){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(e)}_isSourcePlaying(){const e=this.source;return!e.paused&&!e.ended&&this._isSourceReady()}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(Er.shared.add(this.update,this),this._isConnectedToTicker=!0)}_onPlayStop(){this._isConnectedToTicker&&(Er.shared.remove(this.update,this),this._isConnectedToTicker=!1)}_onCanPlay(){const e=this.source;e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay);const t=this.valid;this.resize(e.videoWidth,e.videoHeight),!t&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()}dispose(){this._isConnectedToTicker&&(Er.shared.remove(this.update,this),this._isConnectedToTicker=!1);const e=this.source;e&&(e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?(Er.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Er.shared.add(this.update,this),this._isConnectedToTicker=!0))}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e)}static test(e,t){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||gu.TYPES.includes(t)}};let mu=gu;mu.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],mu.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},Jl.push(Ti,gd,gT,mu,vu,tu,zd,vT);var mT=`attribute vec2 aVertexPosition;
497
+ `))}}let nT=0;const Co={textureCount:0,uboCount:0};class Ld{constructor(t){this.destroyed=!1,this.renderer=t,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=nT++}systemCheck(){if(!Aw())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(t){this.gl=t,this.reset()}bind(t,r){t.disposeRunner.add(this),t.uniforms.globals=this.renderer.globalUniforms;const n=t.program,i=n.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(t);return this.shader=t,this.program!==n&&(this.program=n,this.gl.useProgram(i.program)),r||(Co.textureCount=0,Co.uboCount=0,this.syncUniformGroup(t.uniformGroup,Co)),i}setUniforms(t){const r=this.shader.program,n=r.glPrograms[this.renderer.CONTEXT_UID];r.syncUniforms(n.uniformData,t,this.renderer)}syncUniformGroup(t,r){const n=this.getGlProgram();(!t.static||t.dirtyId!==n.uniformDirtyGroups[t.id])&&(n.uniformDirtyGroups[t.id]=t.dirtyId,this.syncUniforms(t,n,r))}syncUniforms(t,r,n){(t.syncUniforms[this.shader.program.id]||this.createSyncGroups(t))(r.uniformData,t.uniforms,this.renderer,n)}createSyncGroups(t){const r=this.getSignature(t,this.shader.program.uniformData,"u");return this.cache[r]||(this.cache[r]=xw(t,this.shader.program.uniformData)),t.syncUniforms[this.shader.program.id]=this.cache[r],t.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(t,r){const n=this.getGlProgram();if(!t.static||t.dirtyId!==0||!n.uniformGroups[t.id]){t.dirtyId=0;const i=n.uniformGroups[t.id]||this.createSyncBufferGroup(t,n,r);t.buffer.update(),i(n.uniformData,t.uniforms,this.renderer,Co,t.buffer)}this.renderer.buffer.bindBufferBase(t.buffer,n.uniformBufferBindings[r])}createSyncBufferGroup(t,r,n){const{gl:i}=this.renderer;this.renderer.buffer.bind(t.buffer);const o=this.gl.getUniformBlockIndex(r.program,n);r.uniformBufferBindings[n]=this.shader.uniformBindCount,i.uniformBlockBinding(r.program,o,this.shader.uniformBindCount),this.shader.uniformBindCount++;const a=this.getSignature(t,this.shader.program.uniformData,"ubo");let u=this._uboCache[a];if(u||(u=this._uboCache[a]=rT(t,this.shader.program.uniformData)),t.autoManage){const f=new Float32Array(u.size/4);t.buffer.update(f)}return r.uniformGroups[t.id]=u.syncFunc,r.uniformGroups[t.id]}getSignature(t,r,n){const i=t.uniforms,o=[`${n}-`];for(const a in i)o.push(a),r[a]&&o.push(r[a].type);return o.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(t){const r=this.gl,n=t.program,i=Zw(r,n);return n.glPrograms[this.renderer.CONTEXT_UID]=i,i}reset(){this.program=null,this.shader=null}disposeShader(t){this.shader===t&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}Ld.extension={type:qt.RendererSystem,name:"shader"},te.add(Ld);class Ro{constructor(t){this.renderer=t}run(t){const{renderer:r}=this;r.runners.init.emit(r.options),t.hello&&console.log(`PixiJS 7.2.3 - ${r.rendererLogId} - https://pixijs.com`),r.resize(r.screen.width,r.screen.height)}destroy(){}}Ro.defaultOptions={hello:!1},Ro.extension={type:[qt.RendererSystem,qt.CanvasRendererSystem],name:"startup"},te.add(Ro);function iT(e,t=[]){return t[Pt.NORMAL]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.ADD]=[e.ONE,e.ONE],t[Pt.MULTIPLY]=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.SCREEN]=[e.ONE,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.OVERLAY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.DARKEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.LIGHTEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.COLOR_DODGE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.COLOR_BURN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.HARD_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.SOFT_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.DIFFERENCE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.EXCLUSION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.HUE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.SATURATION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.COLOR]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.LUMINOSITY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.NONE]=[0,0],t[Pt.NORMAL_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.ADD_NPM]=[e.SRC_ALPHA,e.ONE,e.ONE,e.ONE],t[Pt.SCREEN_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.SRC_IN]=[e.DST_ALPHA,e.ZERO],t[Pt.SRC_OUT]=[e.ONE_MINUS_DST_ALPHA,e.ZERO],t[Pt.SRC_ATOP]=[e.DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[Pt.DST_OVER]=[e.ONE_MINUS_DST_ALPHA,e.ONE],t[Pt.DST_IN]=[e.ZERO,e.SRC_ALPHA],t[Pt.DST_OUT]=[e.ZERO,e.ONE_MINUS_SRC_ALPHA],t[Pt.DST_ATOP]=[e.ONE_MINUS_DST_ALPHA,e.SRC_ALPHA],t[Pt.XOR]=[e.ONE_MINUS_DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[Pt.SUBTRACT]=[e.ONE,e.ONE,e.ONE,e.ONE,e.FUNC_REVERSE_SUBTRACT,e.FUNC_ADD],t}const sT=0,oT=1,aT=2,lT=3,uT=4,fT=5,hu=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=Pt.NONE,this._blendEq=!1,this.map=[],this.map[sT]=this.setBlend,this.map[oT]=this.setOffset,this.map[aT]=this.setCullFace,this.map[lT]=this.setDepthTest,this.map[uT]=this.setFrontFace,this.map[fT]=this.setDepthMask,this.checks=[],this.defaultState=new po,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=iT(e),this.set(this.defaultState),this.reset()}set(e){if(e=e||this.defaultState,this.stateId!==e.data){let t=this.stateId^e.data,r=0;for(;t;)t&1&&this.map[r].call(this,!!(e.data&1<<r)),t=t>>1,r++;this.stateId=e.data}for(let t=0;t<this.checks.length;t++)this.checks[t](this,e)}forceState(e){e=e||this.defaultState;for(let t=0;t<this.map.length;t++)this.map[t].call(this,!!(e.data&1<<t));for(let t=0;t<this.checks.length;t++)this.checks[t](this,e);this.stateId=e.data}setBlend(e){this.updateCheck(hu.checkBlendMode,e),this.gl[e?"enable":"disable"](this.gl.BLEND)}setOffset(e){this.updateCheck(hu.checkPolygonOffset,e),this.gl[e?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)}setDepthTest(e){this.gl[e?"enable":"disable"](this.gl.DEPTH_TEST)}setDepthMask(e){this.gl.depthMask(e)}setCullFace(e){this.gl[e?"enable":"disable"](this.gl.CULL_FACE)}setFrontFace(e){this.gl.frontFace(this.gl[e?"CW":"CCW"])}setBlendMode(e){if(e===this.blendMode)return;this.blendMode=e;const t=this.blendModes[e],r=this.gl;t.length===2?r.blendFunc(t[0],t[1]):r.blendFuncSeparate(t[0],t[1],t[2],t[3]),t.length===6?(this._blendEq=!0,r.blendEquationSeparate(t[4],t[5])):this._blendEq&&(this._blendEq=!1,r.blendEquationSeparate(r.FUNC_ADD,r.FUNC_ADD))}setPolygonOffset(e,t){this.gl.polygonOffset(e,t)}reset(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)}updateCheck(e,t){const r=this.checks.indexOf(e);t&&r===-1?this.checks.push(e):!t&&r!==-1&&this.checks.splice(r,1)}static checkBlendMode(e,t){e.setBlendMode(t.blendMode)}static checkPolygonOffset(e,t){e.setPolygonOffset(1,t.polygonOffset)}destroy(){this.gl=null}};let Fd=hu;Fd.extension={type:qt.RendererSystem,name:"state"},te.add(Fd);class cT extends Ws{constructor(){super(...arguments),this.runners={},this._systemsHash={}}setup(t){this.addRunners(...t.runners);const r=(t.priority??[]).filter(i=>t.systems[i]),n=[...r,...Object.keys(t.systems).filter(i=>!r.includes(i))];for(const i of n)this.addSystem(t.systems[i],i)}addRunners(...t){t.forEach(r=>{this.runners[r]=new _r(r)})}addSystem(t,r){const n=new t(this);if(this[r])throw new Error(`Whoops! The name "${r}" is already in use`);this[r]=n,this._systemsHash[r]=n;for(const i in this.runners)this.runners[i].add(n);return this}emitWithCustomOptions(t,r){const n=Object.keys(this._systemsHash);t.items.forEach(i=>{const o=n.find(a=>this._systemsHash[a]===i);i[t.name](r[o])})}destroy(){Object.values(this.runners).forEach(t=>{t.destroy()}),this._systemsHash={}}}const Io=class{constructor(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=Io.defaultMaxIdle,this.checkCountMax=Io.defaultCheckCountMax,this.mode=Io.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==ol.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const e=this.renderer.texture,t=e.managedTextures;let r=!1;for(let n=0;n<t.length;n++){const i=t[n];!i.framebuffer&&this.count-i.touched>this.maxIdle&&(e.destroyTexture(i,!0),t[n]=null,r=!0)}if(r){let n=0;for(let i=0;i<t.length;i++)t[i]!==null&&(t[n++]=t[i]);t.length=n}}unload(e){const t=this.renderer.texture,r=e._texture;r&&!r.framebuffer&&t.destroyTexture(r);for(let n=e.children.length-1;n>=0;n--)this.unload(e.children[n])}destroy(){this.renderer=null}};let Tr=Io;Tr.defaultMode=ol.AUTO,Tr.defaultMaxIdle=60*60,Tr.defaultCheckCountMax=60*10,Tr.extension={type:qt.RendererSystem,name:"textureGC"},te.add(Tr);class du{constructor(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=Xt.UNSIGNED_BYTE,this.internalFormat=bt.RGBA,this.samplerType=0}}function hT(e){let t;return"WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext?t={[Xt.UNSIGNED_BYTE]:{[bt.RGBA]:e.RGBA8,[bt.RGB]:e.RGB8,[bt.RG]:e.RG8,[bt.RED]:e.R8,[bt.RGBA_INTEGER]:e.RGBA8UI,[bt.RGB_INTEGER]:e.RGB8UI,[bt.RG_INTEGER]:e.RG8UI,[bt.RED_INTEGER]:e.R8UI,[bt.ALPHA]:e.ALPHA,[bt.LUMINANCE]:e.LUMINANCE,[bt.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[Xt.BYTE]:{[bt.RGBA]:e.RGBA8_SNORM,[bt.RGB]:e.RGB8_SNORM,[bt.RG]:e.RG8_SNORM,[bt.RED]:e.R8_SNORM,[bt.RGBA_INTEGER]:e.RGBA8I,[bt.RGB_INTEGER]:e.RGB8I,[bt.RG_INTEGER]:e.RG8I,[bt.RED_INTEGER]:e.R8I},[Xt.UNSIGNED_SHORT]:{[bt.RGBA_INTEGER]:e.RGBA16UI,[bt.RGB_INTEGER]:e.RGB16UI,[bt.RG_INTEGER]:e.RG16UI,[bt.RED_INTEGER]:e.R16UI,[bt.DEPTH_COMPONENT]:e.DEPTH_COMPONENT16},[Xt.SHORT]:{[bt.RGBA_INTEGER]:e.RGBA16I,[bt.RGB_INTEGER]:e.RGB16I,[bt.RG_INTEGER]:e.RG16I,[bt.RED_INTEGER]:e.R16I},[Xt.UNSIGNED_INT]:{[bt.RGBA_INTEGER]:e.RGBA32UI,[bt.RGB_INTEGER]:e.RGB32UI,[bt.RG_INTEGER]:e.RG32UI,[bt.RED_INTEGER]:e.R32UI,[bt.DEPTH_COMPONENT]:e.DEPTH_COMPONENT24},[Xt.INT]:{[bt.RGBA_INTEGER]:e.RGBA32I,[bt.RGB_INTEGER]:e.RGB32I,[bt.RG_INTEGER]:e.RG32I,[bt.RED_INTEGER]:e.R32I},[Xt.FLOAT]:{[bt.RGBA]:e.RGBA32F,[bt.RGB]:e.RGB32F,[bt.RG]:e.RG32F,[bt.RED]:e.R32F,[bt.DEPTH_COMPONENT]:e.DEPTH_COMPONENT32F},[Xt.HALF_FLOAT]:{[bt.RGBA]:e.RGBA16F,[bt.RGB]:e.RGB16F,[bt.RG]:e.RG16F,[bt.RED]:e.R16F},[Xt.UNSIGNED_SHORT_5_6_5]:{[bt.RGB]:e.RGB565},[Xt.UNSIGNED_SHORT_4_4_4_4]:{[bt.RGBA]:e.RGBA4},[Xt.UNSIGNED_SHORT_5_5_5_1]:{[bt.RGBA]:e.RGB5_A1},[Xt.UNSIGNED_INT_2_10_10_10_REV]:{[bt.RGBA]:e.RGB10_A2,[bt.RGBA_INTEGER]:e.RGB10_A2UI},[Xt.UNSIGNED_INT_10F_11F_11F_REV]:{[bt.RGB]:e.R11F_G11F_B10F},[Xt.UNSIGNED_INT_5_9_9_9_REV]:{[bt.RGB]:e.RGB9_E5},[Xt.UNSIGNED_INT_24_8]:{[bt.DEPTH_STENCIL]:e.DEPTH24_STENCIL8},[Xt.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[bt.DEPTH_STENCIL]:e.DEPTH32F_STENCIL8}}:t={[Xt.UNSIGNED_BYTE]:{[bt.RGBA]:e.RGBA,[bt.RGB]:e.RGB,[bt.ALPHA]:e.ALPHA,[bt.LUMINANCE]:e.LUMINANCE,[bt.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[Xt.UNSIGNED_SHORT_5_6_5]:{[bt.RGB]:e.RGB},[Xt.UNSIGNED_SHORT_4_4_4_4]:{[bt.RGBA]:e.RGBA},[Xt.UNSIGNED_SHORT_5_5_5_1]:{[bt.RGBA]:e.RGBA}},t}class Bd{constructor(t){this.renderer=t,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Kt,this.hasIntegerTextures=!1}contextChange(){const t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=hT(t);const r=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=r;for(let i=0;i<r;i++)this.boundTextures[i]=null;this.emptyTextures={};const n=new du(t.createTexture());t.bindTexture(t.TEXTURE_2D,n.texture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[t.TEXTURE_2D]=n,this.emptyTextures[t.TEXTURE_CUBE_MAP]=new du(t.createTexture()),t.bindTexture(t.TEXTURE_CUBE_MAP,this.emptyTextures[t.TEXTURE_CUBE_MAP].texture);for(let i=0;i<6;i++)t.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,null);t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MIN_FILTER,t.LINEAR);for(let i=0;i<this.boundTextures.length;i++)this.bind(null,i)}bind(t,r=0){const{gl:n}=this;if(t=t==null?void 0:t.castToBaseTexture(),t!=null&&t.valid&&!t.parentTextureArray){t.touched=this.renderer.textureGC.count;const i=t._glTextures[this.CONTEXT_UID]||this.initTexture(t);this.boundTextures[r]!==t&&(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(t.target,i.texture)),i.dirtyId!==t.dirtyId?(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),this.updateTexture(t)):i.dirtyStyleId!==t.dirtyStyleId&&this.updateTextureStyle(t),this.boundTextures[r]=t}else this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(n.TEXTURE_2D,this.emptyTextures[n.TEXTURE_2D].texture),this.boundTextures[r]=null}reset(){this._unknownBoundTextures=!0,this.hasIntegerTextures=!1,this.currentLocation=-1;for(let t=0;t<this.boundTextures.length;t++)this.boundTextures[t]=this.unknownTexture}unbind(t){const{gl:r,boundTextures:n}=this;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(let i=0;i<n.length;i++)n[i]===this.unknownTexture&&this.bind(null,i)}for(let i=0;i<n.length;i++)n[i]===t&&(this.currentLocation!==i&&(r.activeTexture(r.TEXTURE0+i),this.currentLocation=i),r.bindTexture(t.target,this.emptyTextures[t.target].texture),n[i]=null)}ensureSamplerType(t){const{boundTextures:r,hasIntegerTextures:n,CONTEXT_UID:i}=this;if(n)for(let o=t-1;o>=0;--o){const a=r[o];a&&a._glTextures[i].samplerType!==sl.FLOAT&&this.renderer.texture.unbind(a)}}initTexture(t){const r=new du(this.gl.createTexture());return r.dirtyId=-1,t._glTextures[this.CONTEXT_UID]=r,this.managedTextures.push(t),t.on("dispose",this.destroyTexture,this),r}initTextureType(t,r){var n;r.internalFormat=((n=this.internalFormats[t.type])==null?void 0:n[t.format])??t.format,this.webGLVersion===2&&t.type===Xt.HALF_FLOAT?r.type=this.gl.HALF_FLOAT:r.type=t.type}updateTexture(t){var i;const r=t._glTextures[this.CONTEXT_UID];if(!r)return;const n=this.renderer;if(this.initTextureType(t,r),(i=t.resource)!=null&&i.upload(n,t,r))r.samplerType!==sl.FLOAT&&(this.hasIntegerTextures=!0);else{const o=t.realWidth,a=t.realHeight,u=n.gl;(r.width!==o||r.height!==a||r.dirtyId<0)&&(r.width=o,r.height=a,u.texImage2D(t.target,0,r.internalFormat,o,a,0,t.format,r.type,null))}t.dirtyStyleId!==r.dirtyStyleId&&this.updateTextureStyle(t),r.dirtyId=t.dirtyId}destroyTexture(t,r){const{gl:n}=this;if(t=t.castToBaseTexture(),t._glTextures[this.CONTEXT_UID]&&(this.unbind(t),n.deleteTexture(t._glTextures[this.CONTEXT_UID].texture),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.CONTEXT_UID],!r)){const i=this.managedTextures.indexOf(t);i!==-1&&co(this.managedTextures,i,1)}}updateTextureStyle(t){var n;const r=t._glTextures[this.CONTEXT_UID];r&&((t.mipmap===Rn.POW2||this.webGLVersion!==2)&&!t.isPowerOfTwo?r.mipmap=!1:r.mipmap=t.mipmap>=1,this.webGLVersion!==2&&!t.isPowerOfTwo?r.wrapMode=Ji.CLAMP:r.wrapMode=t.wrapMode,(n=t.resource)!=null&&n.style(this.renderer,t,r)||this.setStyle(t,r),r.dirtyStyleId=t.dirtyStyleId)}setStyle(t,r){const n=this.gl;if(r.mipmap&&t.mipmap!==Rn.ON_MANUAL&&n.generateMipmap(t.target),n.texParameteri(t.target,n.TEXTURE_WRAP_S,r.wrapMode),n.texParameteri(t.target,n.TEXTURE_WRAP_T,r.wrapMode),r.mipmap){n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===Lr.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);const i=this.renderer.context.extensions.anisotropicFiltering;if(i&&t.anisotropicLevel>0&&t.scaleMode===Lr.LINEAR){const o=Math.min(t.anisotropicLevel,n.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(t.target,i.TEXTURE_MAX_ANISOTROPY_EXT,o)}}else n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===Lr.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(t.target,n.TEXTURE_MAG_FILTER,t.scaleMode===Lr.LINEAR?n.LINEAR:n.NEAREST)}destroy(){this.renderer=null}}Bd.extension={type:qt.RendererSystem,name:"texture"},te.add(Bd);class Dd{constructor(t){this.renderer=t}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(t){const{gl:r,CONTEXT_UID:n}=this,i=t._glTransformFeedbacks[n]||this.createGLTransformFeedback(t);r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,i)}unbind(){const{gl:t}=this;t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(t,r){const{gl:n,renderer:i}=this;r&&i.shader.bind(r),n.beginTransformFeedback(t)}endTransformFeedback(){const{gl:t}=this;t.endTransformFeedback()}createGLTransformFeedback(t){const{gl:r,renderer:n,CONTEXT_UID:i}=this,o=r.createTransformFeedback();t._glTransformFeedbacks[i]=o,r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,o);for(let a=0;a<t.buffers.length;a++){const u=t.buffers[a];u&&(n.buffer.update(u),u._glBuffers[i].refCount++,r.bindBufferBase(r.TRANSFORM_FEEDBACK_BUFFER,a,u._glBuffers[i].buffer||null))}return r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,null),t.disposeRunner.add(this),o}disposeTransformFeedback(t,r){const n=t._glTransformFeedbacks[this.CONTEXT_UID],i=this.gl;t.disposeRunner.remove(this);const o=this.renderer.buffer;if(o)for(let a=0;a<t.buffers.length;a++){const u=t.buffers[a];if(!u)continue;const f=u._glBuffers[this.CONTEXT_UID];f&&(f.refCount--,f.refCount===0&&!r&&o.dispose(u,r))}n&&(r||i.deleteTransformFeedback(n),delete t._glTransformFeedbacks[this.CONTEXT_UID])}destroy(){this.renderer=null}}Dd.extension={type:qt.RendererSystem,name:"transformFeedback"},te.add(Dd);class Po{constructor(t){this.renderer=t}init(t){this.screen=new ie(0,0,t.width,t.height),this.element=t.view||Dt.ADAPTER.createCanvas(),this.resolution=t.resolution||Dt.RESOLUTION,this.autoDensity=!!t.autoDensity}resizeView(t,r){this.element.width=Math.round(t*this.resolution),this.element.height=Math.round(r*this.resolution);const n=this.element.width/this.resolution,i=this.element.height/this.resolution;this.screen.width=n,this.screen.height=i,this.autoDensity&&(this.element.style.width=`${n}px`,this.element.style.height=`${i}px`),this.renderer.emit("resize",n,i),this.renderer.runners.resize.emit(this.screen.width,this.screen.height)}destroy(t){var r;t&&((r=this.element.parentNode)==null||r.removeChild(this.element)),this.renderer=null,this.element=null,this.screen=null}}Po.defaultOptions={width:800,height:600,resolution:Dt.RESOLUTION,autoDensity:!1},Po.extension={type:[qt.RendererSystem,qt.CanvasRendererSystem],name:"_view"},te.add(Po),Dt.PREFER_ENV=Cn.WEBGL2,Dt.STRICT_TEXTURE_CACHE=!1,Dt.RENDER_OPTIONS={...To.defaultOptions,...wo.defaultOptions,...Po.defaultOptions,...Ro.defaultOptions},Object.defineProperties(Dt,{WRAP_MODE:{get(){return Kt.defaultOptions.wrapMode},set(e){Ht("7.1.0","settings.WRAP_MODE is deprecated, use BaseTexture.defaultOptions.wrapMode"),Kt.defaultOptions.wrapMode=e}},SCALE_MODE:{get(){return Kt.defaultOptions.scaleMode},set(e){Ht("7.1.0","settings.SCALE_MODE is deprecated, use BaseTexture.defaultOptions.scaleMode"),Kt.defaultOptions.scaleMode=e}},MIPMAP_TEXTURES:{get(){return Kt.defaultOptions.mipmap},set(e){Ht("7.1.0","settings.MIPMAP_TEXTURES is deprecated, use BaseTexture.defaultOptions.mipmap"),Kt.defaultOptions.mipmap=e}},ANISOTROPIC_LEVEL:{get(){return Kt.defaultOptions.anisotropicLevel},set(e){Ht("7.1.0","settings.ANISOTROPIC_LEVEL is deprecated, use BaseTexture.defaultOptions.anisotropicLevel"),Kt.defaultOptions.anisotropicLevel=e}},FILTER_RESOLUTION:{get(){return Ht("7.1.0","settings.FILTER_RESOLUTION is deprecated, use Filter.defaultResolution"),Zt.defaultResolution},set(e){Zt.defaultResolution=e}},FILTER_MULTISAMPLE:{get(){return Ht("7.1.0","settings.FILTER_MULTISAMPLE is deprecated, use Filter.defaultMultisample"),Zt.defaultMultisample},set(e){Zt.defaultMultisample=e}},SPRITE_MAX_TEXTURES:{get(){return wr.defaultMaxTextures},set(e){Ht("7.1.0","settings.SPRITE_MAX_TEXTURES is deprecated, use BatchRenderer.defaultMaxTextures"),wr.defaultMaxTextures=e}},SPRITE_BATCH_SIZE:{get(){return wr.defaultBatchSize},set(e){Ht("7.1.0","settings.SPRITE_BATCH_SIZE is deprecated, use BatchRenderer.defaultBatchSize"),wr.defaultBatchSize=e}},CAN_UPLOAD_SAME_BUFFER:{get(){return wr.canUploadSameBuffer},set(e){Ht("7.1.0","settings.CAN_UPLOAD_SAME_BUFFER is deprecated, use BatchRenderer.canUploadSameBuffer"),wr.canUploadSameBuffer=e}},GC_MODE:{get(){return Tr.defaultMode},set(e){Ht("7.1.0","settings.GC_MODE is deprecated, use TextureGCSystem.defaultMode"),Tr.defaultMode=e}},GC_MAX_IDLE:{get(){return Tr.defaultMaxIdle},set(e){Ht("7.1.0","settings.GC_MAX_IDLE is deprecated, use TextureGCSystem.defaultMaxIdle"),Tr.defaultMaxIdle=e}},GC_MAX_CHECK_COUNT:{get(){return Tr.defaultCheckCountMax},set(e){Ht("7.1.0","settings.GC_MAX_CHECK_COUNT is deprecated, use TextureGCSystem.defaultCheckCountMax"),Tr.defaultCheckCountMax=e}},PRECISION_VERTEX:{get(){return Xr.defaultVertexPrecision},set(e){Ht("7.1.0","settings.PRECISION_VERTEX is deprecated, use Program.defaultVertexPrecision"),Xr.defaultVertexPrecision=e}},PRECISION_FRAGMENT:{get(){return Xr.defaultFragmentPrecision},set(e){Ht("7.1.0","settings.PRECISION_FRAGMENT is deprecated, use Program.defaultFragmentPrecision"),Xr.defaultFragmentPrecision=e}}});var No=(e=>(e[e.INTERACTION=50]="INTERACTION",e[e.HIGH=25]="HIGH",e[e.NORMAL=0]="NORMAL",e[e.LOW=-25]="LOW",e[e.UTILITY=-50]="UTILITY",e))(No||{});class pu{constructor(t,r=null,n=0,i=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=t,this.context=r,this.priority=n,this.once=i}match(t,r=null){return this.fn===t&&this.context===r}emit(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));const r=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),r}connect(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this}destroy(t=!1){this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const r=this.next;return this.next=t?null:r,this.previous=null,r}}const Je=class{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new pu(null,null,1/0),this.deltaMS=1/Je.targetFPMS,this.elapsedMS=1/Je.targetFPMS,this._tick=e=>{this._requestId=null,this.started&&(this.update(e),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(e,t,r=No.NORMAL){return this._addListener(new pu(e,t,r))}addOnce(e,t,r=No.NORMAL){return this._addListener(new pu(e,t,r,!0))}_addListener(e){let t=this._head.next,r=this._head;if(!t)e.connect(r);else{for(;t;){if(e.priority>t.priority){e.connect(r);break}r=t,t=t.next}e.previous||e.connect(r)}return this._startIfPossible(),this}remove(e,t){let r=this._head.next;for(;r;)r.match(e,t)?r=r.destroy():r=r.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let e=0,t=this._head;for(;t=t.next;)e++;return e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let e=this._head.next;for(;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}}update(e=performance.now()){let t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){const i=e-this._lastFrame|0;if(i<this._minElapsedMS)return;this._lastFrame=e-i%this._minElapsedMS}this.deltaMS=t,this.deltaTime=this.deltaMS*Je.targetFPMS;const r=this._head;let n=r.next;for(;n;)n=n.emit(this.deltaTime);r.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=e}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(e){const t=Math.min(this.maxFPS,e),r=Math.min(Math.max(0,t)/1e3,Je.targetFPMS);this._maxElapsedMS=1/r}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(e){if(e===0)this._minElapsedMS=0;else{const t=Math.max(this.minFPS,e);this._minElapsedMS=1/(t/1e3)}}static get shared(){if(!Je._shared){const e=Je._shared=new Je;e.autoStart=!0,e._protected=!0}return Je._shared}static get system(){if(!Je._system){const e=Je._system=new Je;e.autoStart=!0,e._protected=!0}return Je._system}};let Er=Je;Er.targetFPMS=.06,Object.defineProperties(Dt,{TARGET_FPMS:{get(){return Er.targetFPMS},set(e){Ht("7.1.0","settings.TARGET_FPMS is deprecated, use Ticker.targetFPMS"),Er.targetFPMS=e}}});class Ud{static init(t){t=Object.assign({autoStart:!0,sharedTicker:!1},t),Object.defineProperty(this,"ticker",{set(r){this._ticker&&this._ticker.remove(this.render,this),this._ticker=r,r&&r.add(this.render,this,No.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?Er.shared:new Er,t.autoStart&&this.start()}static destroy(){if(this._ticker){const t=this._ticker;this.ticker=null,t.destroy()}}}Ud.extension=qt.Application,te.add(Ud);const dT=[];te.handleByList(qt.Renderer,dT);class $d{constructor(t){this.renderer=t}contextChange(t){let r;if(this.renderer.context.webGLVersion===1){const n=t.getParameter(t.FRAMEBUFFER_BINDING);t.bindFramebuffer(t.FRAMEBUFFER,null),r=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.FRAMEBUFFER,n)}else{const n=t.getParameter(t.DRAW_FRAMEBUFFER_BINDING);t.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),r=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,n)}r>=Te.HIGH?this.multisample=Te.HIGH:r>=Te.MEDIUM?this.multisample=Te.MEDIUM:r>=Te.LOW?this.multisample=Te.LOW:this.multisample=Te.NONE}destroy(){}}$d.extension={type:qt.RendererSystem,name:"_multisample"},te.add($d);class pT{constructor(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class Gd{constructor(t){this.renderer=t,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(t){const{gl:r,CONTEXT_UID:n}=this,i=t._glBuffers[n]||this.createGLBuffer(t);r.bindBuffer(t.type,i.buffer)}unbind(t){const{gl:r}=this;r.bindBuffer(t,null)}bindBufferBase(t,r){const{gl:n,CONTEXT_UID:i}=this;if(this.boundBufferBases[r]!==t){const o=t._glBuffers[i]||this.createGLBuffer(t);this.boundBufferBases[r]=t,n.bindBufferBase(n.UNIFORM_BUFFER,r,o.buffer)}}bindBufferRange(t,r,n){const{gl:i,CONTEXT_UID:o}=this;n=n||0;const a=t._glBuffers[o]||this.createGLBuffer(t);i.bindBufferRange(i.UNIFORM_BUFFER,r||0,a.buffer,n*256,256)}update(t){const{gl:r,CONTEXT_UID:n}=this,i=t._glBuffers[n]||this.createGLBuffer(t);if(t._updateID!==i.updateID)if(i.updateID=t._updateID,r.bindBuffer(t.type,i.buffer),i.byteLength>=t.data.byteLength)r.bufferSubData(t.type,0,t.data);else{const o=t.static?r.STATIC_DRAW:r.DYNAMIC_DRAW;i.byteLength=t.data.byteLength,r.bufferData(t.type,t.data,o)}}dispose(t,r){if(!this.managedBuffers[t.id])return;delete this.managedBuffers[t.id];const n=t._glBuffers[this.CONTEXT_UID],i=this.gl;t.disposeRunner.remove(this),n&&(r||i.deleteBuffer(n.buffer),delete t._glBuffers[this.CONTEXT_UID])}disposeAll(t){const r=Object.keys(this.managedBuffers);for(let n=0;n<r.length;n++)this.dispose(this.managedBuffers[r[n]],t)}createGLBuffer(t){const{CONTEXT_UID:r,gl:n}=this;return t._glBuffers[r]=new pT(n.createBuffer()),this.managedBuffers[t.id]=t,t.disposeRunner.add(this),t._glBuffers[r]}}Gd.extension={type:qt.RendererSystem,name:"buffer"},te.add(Gd);class jd{constructor(t){this.renderer=t}render(t,r){const n=this.renderer;let i,o,a,u;if(r&&(i=r.renderTexture,o=r.clear,a=r.transform,u=r.skipUpdateTransform),this.renderingToScreen=!i,n.runners.prerender.emit(),n.emit("prerender"),n.projection.transform=a,!n.context.isLost){if(i||(this.lastObjectRendered=t),!u){const f=t.enableTempParent();t.updateTransform(),t.disableTempParent(f)}n.renderTexture.bind(i),n.batch.currentRenderer.start(),(o??n.background.clearBeforeRender)&&n.renderTexture.clear(),t.render(n),n.batch.currentRenderer.flush(),i&&(r.blit&&n.framebuffer.blit(),i.baseTexture.update()),n.runners.postrender.emit(),n.projection.transform=null,n.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}jd.extension={type:qt.RendererSystem,name:"objectRenderer"},te.add(jd);const vu=class extends cT{constructor(e){super(),this.type=Fc.WEBGL,e=Object.assign({},Dt.RENDER_OPTIONS,e),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new br({projectionMatrix:new $e},!0);const t={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:vu.__systems,priority:["_view","textureGenerator","background","_plugin","startup","context","state","texture","buffer","geometry","framebuffer","transformFeedback","mask","scissor","stencil","projection","textureGC","filter","renderTexture","batch","objectRenderer","_multisample"]};this.setup(t),"useContextAlpha"in e&&(Ht("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),e.premultipliedAlpha=e.useContextAlpha&&e.useContextAlpha!=="notMultiplied",e.backgroundAlpha=e.useContextAlpha===!1?1:e.backgroundAlpha),this._plugin.rendererPlugins=vu.__plugins,this.options=e,this.startup.run(this.options)}static test(e){return e!=null&&e.forceCanvas?!1:zx()}render(e,t){this.objectRenderer.render(e,t)}resize(e,t){this._view.resizeView(e,t)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(e=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:e}),super.destroy()}get plugins(){return this._plugin.plugins}get multisample(){return this._multisample.multisample}get width(){return this._view.element.width}get height(){return this._view.element.height}get resolution(){return this._view.resolution}set resolution(e){this._view.resolution=e,this.runners.resolutionChange.emit(e)}get autoDensity(){return this._view.autoDensity}get view(){return this._view.element}get screen(){return this._view.screen}get lastObjectRendered(){return this.objectRenderer.lastObjectRendered}get renderingToScreen(){return this.objectRenderer.renderingToScreen}get rendererLogId(){return`WebGL ${this.context.webGLVersion}`}get clearBeforeRender(){return Ht("7.0.0","renderer.clearBeforeRender has been deprecated, please use renderer.background.clearBeforeRender instead."),this.background.clearBeforeRender}get useContextAlpha(){return Ht("7.0.0","renderer.useContextAlpha has been deprecated, please use renderer.context.premultipliedAlpha instead."),this.context.useContextAlpha}get preserveDrawingBuffer(){return Ht("7.0.0","renderer.preserveDrawingBuffer has been deprecated, we cannot truly know this unless pixi created the context"),this.context.preserveDrawingBuffer}get backgroundColor(){return Ht("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color}set backgroundColor(e){Ht("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color=e}get backgroundAlpha(){return Ht("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha}set backgroundAlpha(e){Ht("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha=e}get powerPreference(){return Ht("7.0.0","renderer.powerPreference has been deprecated, we can only know this if pixi creates the context"),this.context.powerPreference}generateTexture(e,t){return this.textureGenerator.generateTexture(e,t)}};let wi=vu;wi.extension={type:qt.Renderer,priority:1},wi.__plugins={},wi.__systems={},te.handleByMap(qt.RendererPlugin,wi.__plugins),te.handleByMap(qt.RendererSystem,wi.__systems),te.add(wi);class qd extends fs{constructor(t,r){const{width:n,height:i}=r||{};super(n,i),this.items=[],this.itemDirtyIds=[];for(let o=0;o<t;o++){const a=new Kt;this.items.push(a),this.itemDirtyIds.push(-2)}this.length=t,this._load=null,this.baseTexture=null}initFromArray(t,r){for(let n=0;n<this.length;n++)t[n]&&(t[n].castToBaseTexture?this.addBaseTextureAt(t[n].castToBaseTexture(),n):t[n]instanceof fs?this.addResourceAt(t[n],n):this.addResourceAt(Jh(t[n],r),n))}dispose(){for(let t=0,r=this.length;t<r;t++)this.items[t].destroy();this.items=null,this.itemDirtyIds=null,this._load=null}addResourceAt(t,r){if(!this.items[r])throw new Error(`Index ${r} is out of bounds`);return t.valid&&!this.valid&&this.resize(t.width,t.height),this.items[r].setResource(t),this}bind(t){if(this.baseTexture!==null)throw new Error("Only one base texture per TextureArray is allowed");super.bind(t);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=t,this.items[r].on("update",t.update,t)}unbind(t){super.unbind(t);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=null,this.items[r].off("update",t.update,t)}load(){if(this._load)return this._load;const r=this.items.map(n=>n.resource).filter(n=>n).map(n=>n.load());return this._load=Promise.all(r).then(()=>{const{realWidth:n,realHeight:i}=this.items[0];return this.resize(n,i),Promise.resolve(this)}),this._load}}class vT extends qd{constructor(t,r){const{width:n,height:i}=r||{};let o,a;Array.isArray(t)?(o=t,a=t.length):a=t,super(a,{width:n,height:i}),o&&this.initFromArray(o,r)}addBaseTextureAt(t,r){if(t.resource)this.addResourceAt(t.resource,r);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(t){super.bind(t),t.target=ii.TEXTURE_2D_ARRAY}upload(t,r,n){const{length:i,itemDirtyIds:o,items:a}=this,{gl:u}=t;n.dirtyId<0&&u.texImage3D(u.TEXTURE_2D_ARRAY,0,n.internalFormat,this._width,this._height,i,0,r.format,n.type,null);for(let f=0;f<i;f++){const h=a[f];o[f]<h.dirtyId&&(o[f]=h.dirtyId,h.valid&&u.texSubImage3D(u.TEXTURE_2D_ARRAY,0,0,0,f,h.resource.width,h.resource.height,1,r.format,n.type,h.resource.source))}return!0}}class gT extends dn{constructor(t){super(t)}static test(t){const{OffscreenCanvas:r}=globalThis;return r&&t instanceof r?!0:globalThis.HTMLCanvasElement&&t instanceof HTMLCanvasElement}}const ms=class extends qd{constructor(e,t){const{width:r,height:n,autoLoad:i,linkBaseTexture:o}=t||{};if(e&&e.length!==ms.SIDES)throw new Error(`Invalid length. Got ${e.length}, expected 6`);super(6,{width:r,height:n});for(let a=0;a<ms.SIDES;a++)this.items[a].target=ii.TEXTURE_CUBE_MAP_POSITIVE_X+a;this.linkBaseTexture=o!==!1,e&&this.initFromArray(e,t),i!==!1&&this.load()}bind(e){super.bind(e),e.target=ii.TEXTURE_CUBE_MAP}addBaseTextureAt(e,t,r){if(r===void 0&&(r=this.linkBaseTexture),!this.items[t])throw new Error(`Index ${t} is out of bounds`);if(!this.linkBaseTexture||e.parentTextureArray||Object.keys(e._glTextures).length>0)if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("CubeResource does not support copying of renderTexture.");else e.target=ii.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.parentTextureArray=this.baseTexture,this.items[t]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[t]=e,this}upload(e,t,r){const n=this.itemDirtyIds;for(let i=0;i<ms.SIDES;i++){const o=this.items[i];(n[i]<o.dirtyId||r.dirtyId<t.dirtyId)&&(o.valid&&o.resource?(o.resource.upload(e,o,r),n[i]=o.dirtyId):n[i]<-1&&(e.gl.texImage2D(o.target,0,r.internalFormat,t.realWidth,t.realHeight,0,t.format,r.type,null),n[i]=-1))}return!0}static test(e){return Array.isArray(e)&&e.length===ms.SIDES}};let zd=ms;zd.SIDES=6;class Ti extends dn{constructor(t,r){r=r||{};let n,i;typeof t=="string"?(n=Ti.EMPTY,i=t):(n=t,i=null),super(n),this.url=i,this.crossOrigin=r.crossOrigin??!0,this.alphaMode=typeof r.alphaMode=="number"?r.alphaMode:null,this._load=null,r.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(async(t,r)=>{if(this.url===null){t(this);return}try{const n=await Dt.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const i=await n.blob();if(this.destroyed)return;const o=await createImageBitmap(i,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===ln.UNPACK?"premultiply":"none"});if(this.destroyed)return;this.source=o,this.update(),t(this)}catch(n){if(this.destroyed)return;r(n),this.onError.emit(n)}}),this._load)}upload(t,r,n){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),super.upload(t,r,n)):(this.load(),!1)}dispose(){this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(t){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof t=="string"||t instanceof ImageBitmap)}static get EMPTY(){return Ti._EMPTY=Ti._EMPTY??Dt.ADAPTER.createCanvas(0,0),Ti._EMPTY}}const Mo=class extends dn{constructor(e,t){t=t||{},super(Dt.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=e,this.scale=t.scale||1,this._overrideWidth=t.width,this._overrideHeight=t.height,this._resolve=null,this._crossorigin=t.crossorigin,this._load=null,t.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(e=>{if(this._resolve=()=>{this.resize(this.source.width,this.source.height),e(this)},Mo.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}),this._load)}_loadSvg(){const e=new Image;dn.crossOrigin(e,this.svg,this._crossorigin),e.src=this.svg,e.onerror=t=>{this._resolve&&(e.onerror=null,this.onError.emit(t))},e.onload=()=>{if(!this._resolve)return;const t=e.width,r=e.height;if(!t||!r)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let n=t*this.scale,i=r*this.scale;(this._overrideWidth||this._overrideHeight)&&(n=this._overrideWidth||this._overrideHeight/r*t,i=this._overrideHeight||this._overrideWidth/t*r),n=Math.round(n),i=Math.round(i);const o=this.source;o.width=n,o.height=i,o._pixiId=`canvas_${us()}`,o.getContext("2d").drawImage(e,0,0,t,r,0,0,n,i),this._resolve(),this._resolve=null}}static getSize(e){const t=Mo.SVG_SIZE.exec(e),r={};return t&&(r[t[1]]=Math.round(parseFloat(t[3])),r[t[5]]=Math.round(parseFloat(t[7]))),r}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(e,t){return t==="svg"||typeof e=="string"&&e.startsWith("data:image/svg+xml")||typeof e=="string"&&Mo.SVG_XML.test(e)}};let gu=Mo;gu.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m,gu.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;const mu=class extends dn{constructor(e,t){if(t=t||{},!(e instanceof HTMLVideoElement)){const r=document.createElement("video");r.setAttribute("preload","auto"),r.setAttribute("webkit-playsinline",""),r.setAttribute("playsinline",""),typeof e=="string"&&(e=[e]);const n=e[0].src||e[0];dn.crossOrigin(r,n,t.crossorigin);for(let i=0;i<e.length;++i){const o=document.createElement("source");let{src:a,mime:u}=e[i];a=a||e[i];const f=a.split("?").shift().toLowerCase(),h=f.slice(f.lastIndexOf(".")+1);u=u||mu.MIME_TYPES[h]||`video/${h}`,o.src=a,o.type=u,r.appendChild(o)}e=r}super(e),this.noSubImage=!0,this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=t.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=t.autoPlay!==!1,this._load=null,this._resolve=null,this._onCanPlay=this._onCanPlay.bind(this),this._onError=this._onError.bind(this),t.autoLoad!==!1&&this.load()}update(e=0){if(!this.destroyed){const t=Er.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-t),(!this._updateFPS||this._msToNextUpdate<=0)&&(super.update(),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}}load(){if(this._load)return this._load;const e=this.source;return(e.readyState===e.HAVE_ENOUGH_DATA||e.readyState===e.HAVE_FUTURE_DATA)&&e.width&&e.height&&(e.complete=!0),e.addEventListener("play",this._onPlayStart.bind(this)),e.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(e.addEventListener("canplay",this._onCanPlay),e.addEventListener("canplaythrough",this._onCanPlay),e.addEventListener("error",this._onError,!0)),this._load=new Promise(t=>{this.valid?t(this):(this._resolve=t,e.load())}),this._load}_onError(e){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(e)}_isSourcePlaying(){const e=this.source;return!e.paused&&!e.ended&&this._isSourceReady()}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(Er.shared.add(this.update,this),this._isConnectedToTicker=!0)}_onPlayStop(){this._isConnectedToTicker&&(Er.shared.remove(this.update,this),this._isConnectedToTicker=!1)}_onCanPlay(){const e=this.source;e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay);const t=this.valid;this.resize(e.videoWidth,e.videoHeight),!t&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()}dispose(){this._isConnectedToTicker&&(Er.shared.remove(this.update,this),this._isConnectedToTicker=!1);const e=this.source;e&&(e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?(Er.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Er.shared.add(this.update,this),this._isConnectedToTicker=!0))}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e)}static test(e,t){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||mu.TYPES.includes(t)}};let yu=mu;yu.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],yu.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},tu.push(Ti,gd,gT,yu,gu,eu,zd,vT);var mT=`attribute vec2 aVertexPosition;
498
498
  attribute vec2 aTextureCoord;
499
499
 
500
500
  uniform mat3 projectionMatrix;
@@ -601,7 +601,7 @@ void main(void)
601
601
 
602
602
  gl_FragColor = color;
603
603
  }
604
- `;let ms=class extends Zt{constructor(t=4,r=3,n=!1){super(bT,n?wT:xT),this._kernels=[],this._blur=4,this._quality=3,this.uniforms.uOffset=new Float32Array(2),this._pixelSize=new se,this.pixelSize=1,this._clamp=n,Array.isArray(t)?this.kernels=t:(this._blur=t,this.quality=r)}apply(t,r,n,i){const o=this._pixelSize.x/r._frame.width,a=this._pixelSize.y/r._frame.height;let u;if(this._quality===1||this._blur===0)u=this._kernels[0]+.5,this.uniforms.uOffset[0]=u*o,this.uniforms.uOffset[1]=u*a,t.applyFilter(this,r,n,i);else{const f=t.getFilterTexture();let h=r,d=f,p;const c=this._quality-1;for(let v=0;v<c;v++)u=this._kernels[v]+.5,this.uniforms.uOffset[0]=u*o,this.uniforms.uOffset[1]=u*a,t.applyFilter(this,h,d,1),p=h,h=d,d=p;u=this._kernels[c]+.5,this.uniforms.uOffset[0]=u*o,this.uniforms.uOffset[1]=u*a,t.applyFilter(this,h,n,i),t.returnFilterTexture(f)}}_updatePadding(){this.padding=Math.ceil(this._kernels.reduce((t,r)=>t+r+.5,0))}_generateKernels(){const t=this._blur,r=this._quality,n=[t];if(t>0){let i=t;const o=t/r;for(let a=1;a<r;a++)i-=o,n.push(i)}this._kernels=n,this._updatePadding()}get kernels(){return this._kernels}set kernels(t){Array.isArray(t)&&t.length>0?(this._kernels=t,this._quality=t.length,this._blur=Math.max(...t)):(this._kernels=[0],this._quality=1)}get clamp(){return this._clamp}set pixelSize(t){typeof t=="number"?(this._pixelSize.x=t,this._pixelSize.y=t):Array.isArray(t)?(this._pixelSize.x=t[0],this._pixelSize.y=t[1]):t instanceof se?(this._pixelSize.x=t.x,this._pixelSize.y=t.y):(this._pixelSize.x=1,this._pixelSize.y=1)}get pixelSize(){return this._pixelSize}get quality(){return this._quality}set quality(t){this._quality=Math.max(1,Math.round(t)),this._generateKernels()}get blur(){return this._blur}set blur(t){this._blur=t,this._generateKernels()}};var Hd=`attribute vec2 aVertexPosition;
604
+ `;let ys=class extends Zt{constructor(t=4,r=3,n=!1){super(bT,n?wT:xT),this._kernels=[],this._blur=4,this._quality=3,this.uniforms.uOffset=new Float32Array(2),this._pixelSize=new oe,this.pixelSize=1,this._clamp=n,Array.isArray(t)?this.kernels=t:(this._blur=t,this.quality=r)}apply(t,r,n,i){const o=this._pixelSize.x/r._frame.width,a=this._pixelSize.y/r._frame.height;let u;if(this._quality===1||this._blur===0)u=this._kernels[0]+.5,this.uniforms.uOffset[0]=u*o,this.uniforms.uOffset[1]=u*a,t.applyFilter(this,r,n,i);else{const f=t.getFilterTexture();let h=r,d=f,p;const c=this._quality-1;for(let v=0;v<c;v++)u=this._kernels[v]+.5,this.uniforms.uOffset[0]=u*o,this.uniforms.uOffset[1]=u*a,t.applyFilter(this,h,d,1),p=h,h=d,d=p;u=this._kernels[c]+.5,this.uniforms.uOffset[0]=u*o,this.uniforms.uOffset[1]=u*a,t.applyFilter(this,h,n,i),t.returnFilterTexture(f)}}_updatePadding(){this.padding=Math.ceil(this._kernels.reduce((t,r)=>t+r+.5,0))}_generateKernels(){const t=this._blur,r=this._quality,n=[t];if(t>0){let i=t;const o=t/r;for(let a=1;a<r;a++)i-=o,n.push(i)}this._kernels=n,this._updatePadding()}get kernels(){return this._kernels}set kernels(t){Array.isArray(t)&&t.length>0?(this._kernels=t,this._quality=t.length,this._blur=Math.max(...t)):(this._kernels=[0],this._quality=1)}get clamp(){return this._clamp}set pixelSize(t){typeof t=="number"?(this._pixelSize.x=t,this._pixelSize.y=t):Array.isArray(t)?(this._pixelSize.x=t[0],this._pixelSize.y=t[1]):t instanceof oe?(this._pixelSize.x=t.x,this._pixelSize.y=t.y):(this._pixelSize.x=1,this._pixelSize.y=1)}get pixelSize(){return this._pixelSize}get quality(){return this._quality}set quality(t){this._quality=Math.max(1,Math.round(t)),this._generateKernels()}get blur(){return this._blur}set blur(t){this._blur=t,this._generateKernels()}};var Hd=`attribute vec2 aVertexPosition;
605
605
  attribute vec2 aTextureCoord;
606
606
 
607
607
  uniform mat3 projectionMatrix;
@@ -647,7 +647,7 @@ void main() {
647
647
  bloomColor.rgb *= bloomScale;
648
648
  gl_FragColor = color + bloomColor;
649
649
  }
650
- `;const Vd=class extends Zt{constructor(t){super(Hd,ST),this.bloomScale=1,this.brightness=1,this._resolution=Dt.FILTER_RESOLUTION,typeof t=="number"&&(t={threshold:t});const r=Object.assign(Vd.defaults,t);this.bloomScale=r.bloomScale,this.brightness=r.brightness;const{kernels:n,blur:i,quality:o,pixelSize:a,resolution:u}=r;this._extractFilter=new ET(r.threshold),this._extractFilter.resolution=u,this._blurFilter=n?new ms(n):new ms(i,o),this.pixelSize=a,this.resolution=u}apply(t,r,n,i,o){const a=t.getFilterTexture();this._extractFilter.apply(t,r,a,1,o);const u=t.getFilterTexture();this._blurFilter.apply(t,a,u,1),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=u,t.applyFilter(this,r,n,i),t.returnFilterTexture(u),t.returnFilterTexture(a)}get resolution(){return this._resolution}set resolution(t){this._resolution=t,this._extractFilter&&(this._extractFilter.resolution=t),this._blurFilter&&(this._blurFilter.resolution=t)}get threshold(){return this._extractFilter.threshold}set threshold(t){this._extractFilter.threshold=t}get kernels(){return this._blurFilter.kernels}set kernels(t){this._blurFilter.kernels=t}get blur(){return this._blurFilter.blur}set blur(t){this._blurFilter.blur=t}get quality(){return this._blurFilter.quality}set quality(t){this._blurFilter.quality=t}get pixelSize(){return this._blurFilter.pixelSize}set pixelSize(t){this._blurFilter.pixelSize=t}};let AT=Vd;AT.defaults={threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:Dt.FILTER_RESOLUTION};var OT=`attribute vec2 aVertexPosition;
650
+ `;const Vd=class extends Zt{constructor(t){super(Hd,ST),this.bloomScale=1,this.brightness=1,this._resolution=Dt.FILTER_RESOLUTION,typeof t=="number"&&(t={threshold:t});const r=Object.assign(Vd.defaults,t);this.bloomScale=r.bloomScale,this.brightness=r.brightness;const{kernels:n,blur:i,quality:o,pixelSize:a,resolution:u}=r;this._extractFilter=new ET(r.threshold),this._extractFilter.resolution=u,this._blurFilter=n?new ys(n):new ys(i,o),this.pixelSize=a,this.resolution=u}apply(t,r,n,i,o){const a=t.getFilterTexture();this._extractFilter.apply(t,r,a,1,o);const u=t.getFilterTexture();this._blurFilter.apply(t,a,u,1),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=u,t.applyFilter(this,r,n,i),t.returnFilterTexture(u),t.returnFilterTexture(a)}get resolution(){return this._resolution}set resolution(t){this._resolution=t,this._extractFilter&&(this._extractFilter.resolution=t),this._blurFilter&&(this._blurFilter.resolution=t)}get threshold(){return this._extractFilter.threshold}set threshold(t){this._extractFilter.threshold=t}get kernels(){return this._blurFilter.kernels}set kernels(t){this._blurFilter.kernels=t}get blur(){return this._blurFilter.blur}set blur(t){this._blurFilter.blur=t}get quality(){return this._blurFilter.quality}set quality(t){this._blurFilter.quality=t}get pixelSize(){return this._blurFilter.pixelSize}set pixelSize(t){this._blurFilter.pixelSize=t}};let AT=Vd;AT.defaults={threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:Dt.FILTER_RESOLUTION};var OT=`attribute vec2 aVertexPosition;
651
651
  attribute vec2 aTextureCoord;
652
652
 
653
653
  uniform mat3 projectionMatrix;
@@ -834,7 +834,7 @@ void main(void)
834
834
  vTextureCoord = aTextureCoord;
835
835
  vFilterCoord = vTextureCoord * inputSize.xy / outputFrame.zw;
836
836
  }
837
- `,Gn=Gn||{};Gn.stringify=function(){var e={"visit_linear-gradient":function(t){return e.visit_gradient(t)},"visit_repeating-linear-gradient":function(t){return e.visit_gradient(t)},"visit_radial-gradient":function(t){return e.visit_gradient(t)},"visit_repeating-radial-gradient":function(t){return e.visit_gradient(t)},visit_gradient:function(t){var r=e.visit(t.orientation);return r&&(r+=", "),t.type+"("+r+e.visit(t.colorStops)+")"},visit_shape:function(t){var r=t.value,n=e.visit(t.at),i=e.visit(t.style);return i&&(r+=" "+i),n&&(r+=" at "+n),r},"visit_default-radial":function(t){var r="",n=e.visit(t.at);return n&&(r+=n),r},"visit_extent-keyword":function(t){var r=t.value,n=e.visit(t.at);return n&&(r+=" at "+n),r},"visit_position-keyword":function(t){return t.value},visit_position:function(t){return e.visit(t.value.x)+" "+e.visit(t.value.y)},"visit_%":function(t){return t.value+"%"},visit_em:function(t){return t.value+"em"},visit_px:function(t){return t.value+"px"},visit_literal:function(t){return e.visit_color(t.value,t)},visit_hex:function(t){return e.visit_color("#"+t.value,t)},visit_rgb:function(t){return e.visit_color("rgb("+t.value.join(", ")+")",t)},visit_rgba:function(t){return e.visit_color("rgba("+t.value.join(", ")+")",t)},visit_color:function(t,r){var n=t,i=e.visit(r.length);return i&&(n+=" "+i),n},visit_angular:function(t){return t.value+"deg"},visit_directional:function(t){return"to "+t.value},visit_array:function(t){var r="",n=t.length;return t.forEach(function(i,o){r+=e.visit(i),o<n-1&&(r+=", ")}),r},visit:function(t){if(!t)return"";var r="";if(t instanceof Array)return e.visit_array(t,r);if(t.type){var n=e["visit_"+t.type];if(n)return n(t);throw Error("Missing visitor visit_"+t.type)}else throw Error("Invalid node.")}};return function(t){return e.visit(t)}}();var Gn=Gn||{};Gn.parse=function(){var e={linearGradient:/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,repeatingLinearGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,radialGradient:/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,repeatingRadialGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},t="";function r(z){var nt=new Error(t+": "+z);throw nt.source=t,nt}function n(){var z=i();return t.length>0&&r("Invalid input not EOF"),z}function i(){return T(o)}function o(){return a("linear-gradient",e.linearGradient,f)||a("repeating-linear-gradient",e.repeatingLinearGradient,f)||a("radial-gradient",e.radialGradient,p)||a("repeating-radial-gradient",e.repeatingRadialGradient,p)}function a(z,nt,V){return u(nt,function(U){var k=V();return k&&(q(e.comma)||r("Missing comma before color stops")),{type:z,orientation:k,colorStops:T(x)}})}function u(z,nt){var V=q(z);if(V){q(e.startCall)||r("Missing (");var U=nt(V);return q(e.endCall)||r("Missing )"),U}}function f(){return h()||d()}function h(){return F("directional",e.sideOrCorner,1)}function d(){return F("angular",e.angleValue,1)}function p(){var z,nt=c(),V;return nt&&(z=[],z.push(nt),V=t,q(e.comma)&&(nt=c(),nt?z.push(nt):t=V)),z}function c(){var z=v()||y();if(z)z.at=_();else{var nt=b();if(nt){z=nt;var V=_();V&&(z.at=V)}else{var U=m();U&&(z={type:"default-radial",at:U})}}return z}function v(){var z=F("shape",/^(circle)/i,0);return z&&(z.style=M()||b()),z}function y(){var z=F("shape",/^(ellipse)/i,0);return z&&(z.style=C()||b()),z}function b(){return F("extent-keyword",e.extentKeywords,1)}function _(){if(F("position",/^at/,0)){var z=m();return z||r("Missing positioning value"),z}}function m(){var z=w();if(z.x||z.y)return{type:"position",value:z}}function w(){return{x:C(),y:C()}}function T(z){var nt=z(),V=[];if(nt)for(V.push(nt);q(e.comma);)nt=z(),nt?V.push(nt):r("One extra comma");return V}function x(){var z=E();return z||r("Expected color definition"),z.length=C(),z}function E(){return A()||L()||O()||I()}function I(){return F("literal",e.literalColor,0)}function A(){return F("hex",e.hexColor,1)}function O(){return u(e.rgbColor,function(){return{type:"rgb",value:T(R)}})}function L(){return u(e.rgbaColor,function(){return{type:"rgba",value:T(R)}})}function R(){return q(e.number)[1]}function C(){return F("%",e.percentageValue,1)||P()||M()}function P(){return F("position-keyword",e.positionKeywords,1)}function M(){return F("px",e.pixelValue,1)||F("em",e.emValue,1)}function F(z,nt,V){var U=q(nt);if(U)return{type:z,value:U[V]}}function q(z){var nt,V;return V=/^[\n\r\t\s]+/.exec(t),V&&Z(V[0].length),nt=z.exec(t),nt&&Z(nt[0].length),nt}function Z(z){t=t.substr(z)}return function(z){return t=z.toString(),n()}}();var NT=Gn.parse;Gn.stringify;var Xd={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Kd={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function MT(e){var t,r=[],n=1,i;if(typeof e=="string")if(Xd[e])r=Xd[e].slice(),i="rgb";else if(e==="transparent")n=0,i="rgb",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var o=e.slice(1),a=o.length,u=a<=4;n=1,u?(r=[parseInt(o[0]+o[0],16),parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16)],a===4&&(n=parseInt(o[3]+o[3],16)/255)):(r=[parseInt(o[0]+o[1],16),parseInt(o[2]+o[3],16),parseInt(o[4]+o[5],16)],a===8&&(n=parseInt(o[6]+o[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),i="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var f=t[1],h=f==="rgb",o=f.replace(/a$/,"");i=o;var a=o==="cmyk"?4:o==="gray"?1:3;r=t[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(c,v){if(/%$/.test(c))return v===a?parseFloat(c)/100:o==="rgb"?parseFloat(c)*255/100:parseFloat(c);if(o[v]==="h"){if(/deg$/.test(c))return parseFloat(c);if(Kd[c]!==void 0)return Kd[c]}return parseFloat(c)}),f===o&&r.push(1),n=h||r[a]===void 0?1:r[a],r=r.slice(0,a)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(r=e.match(/([0-9]+)/g).map(function(d){return parseFloat(d)}),i=e.match(/([a-z])/ig).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(r=[e[0],e[1],e[2]],i="rgb",n=e.length===4?e[3]:1):e instanceof Object&&(e.r!=null||e.red!=null||e.R!=null?(i="rgb",r=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(i="hsl",r=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),n=e.a||e.alpha||e.opacity||1,e.opacity!=null&&(n/=100)):(i="rgb",r=[e>>>16,(e&65280)>>>8,e&255]);return{space:i,values:r,alpha:n}}var yu={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},_u={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100,i,o,a,u,f;if(r===0)return f=n*255,[f,f,f];n<.5?o=n*(1+r):o=n+r-n*r,i=2*n-o,u=[0,0,0];for(var h=0;h<3;h++)a=t+1/3*-(h-1),a<0?a++:a>1&&a--,6*a<1?f=i+(o-i)*6*a:2*a<1?f=o:3*a<2?f=i+(o-i)*(2/3-a)*6:f=i,u[h]=f*255;return u}};yu.hsl=function(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=o-i,u,f,h;return o===i?u=0:t===o?u=(r-n)/a:r===o?u=2+(n-t)/a:n===o&&(u=4+(t-r)/a),u=Math.min(u*60,360),u<0&&(u+=360),h=(i+o)/2,o===i?f=0:h<=.5?f=a/(o+i):f=a/(2-o-i),[u,f*100,h*100]};function kT(e){Array.isArray(e)&&e.raw&&(e=String.raw(...arguments));var t,r=MT(e);if(!r.space)return[];const n=r.space[0]==="h"?_u.min:yu.min,i=r.space[0]==="h"?_u.max:yu.max;return t=Array(3),t[0]=Math.min(Math.max(r.values[0],n[0]),i[0]),t[1]=Math.min(Math.max(r.values[1],n[1]),i[1]),t[2]=Math.min(Math.max(r.values[2],n[2]),i[2]),r.space[0]==="h"&&(t=_u.rgb(t)),t.push(Math.min(Math.max(r.alpha,0),1)),t}function Yd(e){switch(typeof e){case"string":return LT(e);case"number":return lo(e);default:return e}}function LT(e){const t=kT(e);if(!t)throw new Error(`Unable to parse color "${e}" as RGBA.`);return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function FT(e){const t=NT(HT(e));if(t.length===0)throw new Error("Invalid CSS gradient.");if(t.length!==1)throw new Error("Unsupported CSS gradient (multiple gradients is not supported).");const r=t[0],n=BT(r.type),i=DT(r.colorStops),o=qT(r.orientation);return{type:n,stops:i,angle:o}}function BT(e){const t={"linear-gradient":0,"radial-gradient":1};if(!(e in t))throw new Error(`Unsupported gradient type "${e}"`);return t[e]}function DT(e){const t=GT(e),r=[];for(let n=0;n<e.length;n++){const i=UT(e[n]);r.push({offset:t[n],color:i.slice(0,3),alpha:i[3]})}return r}function UT(e){return Yd($T(e))}function $T(e){switch(e.type){case"hex":return`#${e.value}`;case"literal":return e.value;default:return`${e.type}(${e.value.join(",")})`}}function GT(e){const t=[];for(let i=0;i<e.length;i++){const o=e[i];let a=-1;o.type==="literal"&&o.length&&"type"in o.length&&o.length.type==="%"&&"value"in o.length&&(a=parseFloat(o.length.value)/100),t.push(a)}const r=i=>{for(let o=i;o<t.length;o++)if(t[o]!==-1)return{indexDelta:o-i,offset:t[o]};return{indexDelta:t.length-1-i,offset:1}};let n=0;for(let i=0;i<t.length;i++){const o=t[i];if(o!==-1)n=o;else if(i===0)t[i]=0;else if(i+1===t.length)t[i]=1;else{const a=r(i),u=(a.offset-n)/(1+a.indexDelta);for(let f=0;f<=a.indexDelta;f++)t[i+f]=n+(f+1)*u;i+=a.indexDelta,n=t[i]}}return t.map(jT)}function jT(e){return e.toString().length>6?parseFloat(e.toString().substring(0,6)):e}function qT(e){if(typeof e>"u")return 0;if("type"in e&&"value"in e)switch(e.type){case"angular":return parseFloat(e.value);case"directional":return zT(e.value)}return 0}function zT(e){const t={left:270,top:0,bottom:180,right:90,"left top":315,"top left":315,"left bottom":225,"bottom left":225,"right top":45,"top right":45,"right bottom":135,"bottom right":135};if(!(e in t))throw new Error(`Unsupported directional value "${e}"`);return t[e]}function HT(e){let t=e.replace(/\s{2,}/gu," ");return t=t.replace(/;/g,""),t=t.replace(/ ,/g,","),t=t.replace(/\( /g,"("),t=t.replace(/ \)/g,")"),t.trim()}var VT=Object.defineProperty,WT=Object.defineProperties,XT=Object.getOwnPropertyDescriptors,Zd=Object.getOwnPropertySymbols,KT=Object.prototype.hasOwnProperty,YT=Object.prototype.propertyIsEnumerable,Qd=(e,t,r)=>t in e?VT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,bu=(e,t)=>{for(var r in t||(t={}))KT.call(t,r)&&Qd(e,r,t[r]);if(Zd)for(var r of Zd(t))YT.call(t,r)&&Qd(e,r,t[r]);return e},ZT=(e,t)=>WT(e,XT(t));const Jd=90;function QT(e){return[...e].sort((t,r)=>t.offset-r.offset)}const xu=class extends Zt{constructor(t){t&&"css"in t&&(t=ZT(bu({},FT(t.css||"")),{alpha:t.alpha,maxColors:t.maxColors}));const r=bu(bu({},xu.defaults),t);if(!r.stops||r.stops.length<2)throw new Error("ColorGradientFilter requires at least 2 color stops.");super(PT,IT),this._stops=[],this.autoFit=!1,Object.assign(this,r)}get stops(){return this._stops}set stops(t){const r=QT(t),n=new Float32Array(r.length*3),i=0,o=1,a=2;for(let u=0;u<r.length;u++){const f=Yd(r[u].color),h=u*3;n[h+i]=f[i],n[h+o]=f[o],n[h+a]=f[a]}this.uniforms.uColors=n,this.uniforms.uOffsets=r.map(u=>u.offset),this.uniforms.uAlphas=r.map(u=>u.alpha),this.uniforms.uNumStops=r.length,this._stops=r}set type(t){this.uniforms.uType=t}get type(){return this.uniforms.uType}set angle(t){this.uniforms.uAngle=t-Jd}get angle(){return this.uniforms.uAngle+Jd}set alpha(t){this.uniforms.uAlpha=t}get alpha(){return this.uniforms.uAlpha}set maxColors(t){this.uniforms.uMaxColors=t}get maxColors(){return this.uniforms.uMaxColors}};let Mo=xu;Mo.LINEAR=0,Mo.RADIAL=1,Mo.CONIC=2,Mo.defaults={type:xu.LINEAR,stops:[{offset:0,color:16711680,alpha:1},{offset:1,color:255,alpha:1}],alpha:1,angle:90,maxColors:0};var JT=`attribute vec2 aVertexPosition;
837
+ `,Gn=Gn||{};Gn.stringify=function(){var e={"visit_linear-gradient":function(t){return e.visit_gradient(t)},"visit_repeating-linear-gradient":function(t){return e.visit_gradient(t)},"visit_radial-gradient":function(t){return e.visit_gradient(t)},"visit_repeating-radial-gradient":function(t){return e.visit_gradient(t)},visit_gradient:function(t){var r=e.visit(t.orientation);return r&&(r+=", "),t.type+"("+r+e.visit(t.colorStops)+")"},visit_shape:function(t){var r=t.value,n=e.visit(t.at),i=e.visit(t.style);return i&&(r+=" "+i),n&&(r+=" at "+n),r},"visit_default-radial":function(t){var r="",n=e.visit(t.at);return n&&(r+=n),r},"visit_extent-keyword":function(t){var r=t.value,n=e.visit(t.at);return n&&(r+=" at "+n),r},"visit_position-keyword":function(t){return t.value},visit_position:function(t){return e.visit(t.value.x)+" "+e.visit(t.value.y)},"visit_%":function(t){return t.value+"%"},visit_em:function(t){return t.value+"em"},visit_px:function(t){return t.value+"px"},visit_literal:function(t){return e.visit_color(t.value,t)},visit_hex:function(t){return e.visit_color("#"+t.value,t)},visit_rgb:function(t){return e.visit_color("rgb("+t.value.join(", ")+")",t)},visit_rgba:function(t){return e.visit_color("rgba("+t.value.join(", ")+")",t)},visit_color:function(t,r){var n=t,i=e.visit(r.length);return i&&(n+=" "+i),n},visit_angular:function(t){return t.value+"deg"},visit_directional:function(t){return"to "+t.value},visit_array:function(t){var r="",n=t.length;return t.forEach(function(i,o){r+=e.visit(i),o<n-1&&(r+=", ")}),r},visit:function(t){if(!t)return"";var r="";if(t instanceof Array)return e.visit_array(t,r);if(t.type){var n=e["visit_"+t.type];if(n)return n(t);throw Error("Missing visitor visit_"+t.type)}else throw Error("Invalid node.")}};return function(t){return e.visit(t)}}();var Gn=Gn||{};Gn.parse=function(){var e={linearGradient:/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,repeatingLinearGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,radialGradient:/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,repeatingRadialGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},t="";function r(z){var nt=new Error(t+": "+z);throw nt.source=t,nt}function n(){var z=i();return t.length>0&&r("Invalid input not EOF"),z}function i(){return T(o)}function o(){return a("linear-gradient",e.linearGradient,f)||a("repeating-linear-gradient",e.repeatingLinearGradient,f)||a("radial-gradient",e.radialGradient,p)||a("repeating-radial-gradient",e.repeatingRadialGradient,p)}function a(z,nt,V){return u(nt,function(D){var k=V();return k&&(q(e.comma)||r("Missing comma before color stops")),{type:z,orientation:k,colorStops:T(x)}})}function u(z,nt){var V=q(z);if(V){q(e.startCall)||r("Missing (");var D=nt(V);return q(e.endCall)||r("Missing )"),D}}function f(){return h()||d()}function h(){return F("directional",e.sideOrCorner,1)}function d(){return F("angular",e.angleValue,1)}function p(){var z,nt=c(),V;return nt&&(z=[],z.push(nt),V=t,q(e.comma)&&(nt=c(),nt?z.push(nt):t=V)),z}function c(){var z=v()||y();if(z)z.at=b();else{var nt=_();if(nt){z=nt;var V=b();V&&(z.at=V)}else{var D=m();D&&(z={type:"default-radial",at:D})}}return z}function v(){var z=F("shape",/^(circle)/i,0);return z&&(z.style=M()||_()),z}function y(){var z=F("shape",/^(ellipse)/i,0);return z&&(z.style=C()||_()),z}function _(){return F("extent-keyword",e.extentKeywords,1)}function b(){if(F("position",/^at/,0)){var z=m();return z||r("Missing positioning value"),z}}function m(){var z=w();if(z.x||z.y)return{type:"position",value:z}}function w(){return{x:C(),y:C()}}function T(z){var nt=z(),V=[];if(nt)for(V.push(nt);q(e.comma);)nt=z(),nt?V.push(nt):r("One extra comma");return V}function x(){var z=E();return z||r("Expected color definition"),z.length=C(),z}function E(){return O()||L()||A()||I()}function I(){return F("literal",e.literalColor,0)}function O(){return F("hex",e.hexColor,1)}function A(){return u(e.rgbColor,function(){return{type:"rgb",value:T(R)}})}function L(){return u(e.rgbaColor,function(){return{type:"rgba",value:T(R)}})}function R(){return q(e.number)[1]}function C(){return F("%",e.percentageValue,1)||P()||M()}function P(){return F("position-keyword",e.positionKeywords,1)}function M(){return F("px",e.pixelValue,1)||F("em",e.emValue,1)}function F(z,nt,V){var D=q(nt);if(D)return{type:z,value:D[V]}}function q(z){var nt,V;return V=/^[\n\r\t\s]+/.exec(t),V&&Z(V[0].length),nt=z.exec(t),nt&&Z(nt[0].length),nt}function Z(z){t=t.substr(z)}return function(z){return t=z.toString(),n()}}();var NT=Gn.parse;Gn.stringify;var Xd={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Kd={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function MT(e){var t,r=[],n=1,i;if(typeof e=="string")if(Xd[e])r=Xd[e].slice(),i="rgb";else if(e==="transparent")n=0,i="rgb",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var o=e.slice(1),a=o.length,u=a<=4;n=1,u?(r=[parseInt(o[0]+o[0],16),parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16)],a===4&&(n=parseInt(o[3]+o[3],16)/255)):(r=[parseInt(o[0]+o[1],16),parseInt(o[2]+o[3],16),parseInt(o[4]+o[5],16)],a===8&&(n=parseInt(o[6]+o[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),i="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var f=t[1],h=f==="rgb",o=f.replace(/a$/,"");i=o;var a=o==="cmyk"?4:o==="gray"?1:3;r=t[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(c,v){if(/%$/.test(c))return v===a?parseFloat(c)/100:o==="rgb"?parseFloat(c)*255/100:parseFloat(c);if(o[v]==="h"){if(/deg$/.test(c))return parseFloat(c);if(Kd[c]!==void 0)return Kd[c]}return parseFloat(c)}),f===o&&r.push(1),n=h||r[a]===void 0?1:r[a],r=r.slice(0,a)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(r=e.match(/([0-9]+)/g).map(function(d){return parseFloat(d)}),i=e.match(/([a-z])/ig).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(r=[e[0],e[1],e[2]],i="rgb",n=e.length===4?e[3]:1):e instanceof Object&&(e.r!=null||e.red!=null||e.R!=null?(i="rgb",r=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(i="hsl",r=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),n=e.a||e.alpha||e.opacity||1,e.opacity!=null&&(n/=100)):(i="rgb",r=[e>>>16,(e&65280)>>>8,e&255]);return{space:i,values:r,alpha:n}}var _u={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},bu={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100,i,o,a,u,f;if(r===0)return f=n*255,[f,f,f];n<.5?o=n*(1+r):o=n+r-n*r,i=2*n-o,u=[0,0,0];for(var h=0;h<3;h++)a=t+1/3*-(h-1),a<0?a++:a>1&&a--,6*a<1?f=i+(o-i)*6*a:2*a<1?f=o:3*a<2?f=i+(o-i)*(2/3-a)*6:f=i,u[h]=f*255;return u}};_u.hsl=function(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=o-i,u,f,h;return o===i?u=0:t===o?u=(r-n)/a:r===o?u=2+(n-t)/a:n===o&&(u=4+(t-r)/a),u=Math.min(u*60,360),u<0&&(u+=360),h=(i+o)/2,o===i?f=0:h<=.5?f=a/(o+i):f=a/(2-o-i),[u,f*100,h*100]};function kT(e){Array.isArray(e)&&e.raw&&(e=String.raw(...arguments));var t,r=MT(e);if(!r.space)return[];const n=r.space[0]==="h"?bu.min:_u.min,i=r.space[0]==="h"?bu.max:_u.max;return t=Array(3),t[0]=Math.min(Math.max(r.values[0],n[0]),i[0]),t[1]=Math.min(Math.max(r.values[1],n[1]),i[1]),t[2]=Math.min(Math.max(r.values[2],n[2]),i[2]),r.space[0]==="h"&&(t=bu.rgb(t)),t.push(Math.min(Math.max(r.alpha,0),1)),t}function Yd(e){switch(typeof e){case"string":return LT(e);case"number":return uo(e);default:return e}}function LT(e){const t=kT(e);if(!t)throw new Error(`Unable to parse color "${e}" as RGBA.`);return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function FT(e){const t=NT(HT(e));if(t.length===0)throw new Error("Invalid CSS gradient.");if(t.length!==1)throw new Error("Unsupported CSS gradient (multiple gradients is not supported).");const r=t[0],n=BT(r.type),i=DT(r.colorStops),o=qT(r.orientation);return{type:n,stops:i,angle:o}}function BT(e){const t={"linear-gradient":0,"radial-gradient":1};if(!(e in t))throw new Error(`Unsupported gradient type "${e}"`);return t[e]}function DT(e){const t=GT(e),r=[];for(let n=0;n<e.length;n++){const i=UT(e[n]);r.push({offset:t[n],color:i.slice(0,3),alpha:i[3]})}return r}function UT(e){return Yd($T(e))}function $T(e){switch(e.type){case"hex":return`#${e.value}`;case"literal":return e.value;default:return`${e.type}(${e.value.join(",")})`}}function GT(e){const t=[];for(let i=0;i<e.length;i++){const o=e[i];let a=-1;o.type==="literal"&&o.length&&"type"in o.length&&o.length.type==="%"&&"value"in o.length&&(a=parseFloat(o.length.value)/100),t.push(a)}const r=i=>{for(let o=i;o<t.length;o++)if(t[o]!==-1)return{indexDelta:o-i,offset:t[o]};return{indexDelta:t.length-1-i,offset:1}};let n=0;for(let i=0;i<t.length;i++){const o=t[i];if(o!==-1)n=o;else if(i===0)t[i]=0;else if(i+1===t.length)t[i]=1;else{const a=r(i),u=(a.offset-n)/(1+a.indexDelta);for(let f=0;f<=a.indexDelta;f++)t[i+f]=n+(f+1)*u;i+=a.indexDelta,n=t[i]}}return t.map(jT)}function jT(e){return e.toString().length>6?parseFloat(e.toString().substring(0,6)):e}function qT(e){if(typeof e>"u")return 0;if("type"in e&&"value"in e)switch(e.type){case"angular":return parseFloat(e.value);case"directional":return zT(e.value)}return 0}function zT(e){const t={left:270,top:0,bottom:180,right:90,"left top":315,"top left":315,"left bottom":225,"bottom left":225,"right top":45,"top right":45,"right bottom":135,"bottom right":135};if(!(e in t))throw new Error(`Unsupported directional value "${e}"`);return t[e]}function HT(e){let t=e.replace(/\s{2,}/gu," ");return t=t.replace(/;/g,""),t=t.replace(/ ,/g,","),t=t.replace(/\( /g,"("),t=t.replace(/ \)/g,")"),t.trim()}var VT=Object.defineProperty,WT=Object.defineProperties,XT=Object.getOwnPropertyDescriptors,Zd=Object.getOwnPropertySymbols,KT=Object.prototype.hasOwnProperty,YT=Object.prototype.propertyIsEnumerable,Qd=(e,t,r)=>t in e?VT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xu=(e,t)=>{for(var r in t||(t={}))KT.call(t,r)&&Qd(e,r,t[r]);if(Zd)for(var r of Zd(t))YT.call(t,r)&&Qd(e,r,t[r]);return e},ZT=(e,t)=>WT(e,XT(t));const Jd=90;function QT(e){return[...e].sort((t,r)=>t.offset-r.offset)}const wu=class extends Zt{constructor(t){t&&"css"in t&&(t=ZT(xu({},FT(t.css||"")),{alpha:t.alpha,maxColors:t.maxColors}));const r=xu(xu({},wu.defaults),t);if(!r.stops||r.stops.length<2)throw new Error("ColorGradientFilter requires at least 2 color stops.");super(PT,IT),this._stops=[],this.autoFit=!1,Object.assign(this,r)}get stops(){return this._stops}set stops(t){const r=QT(t),n=new Float32Array(r.length*3),i=0,o=1,a=2;for(let u=0;u<r.length;u++){const f=Yd(r[u].color),h=u*3;n[h+i]=f[i],n[h+o]=f[o],n[h+a]=f[a]}this.uniforms.uColors=n,this.uniforms.uOffsets=r.map(u=>u.offset),this.uniforms.uAlphas=r.map(u=>u.alpha),this.uniforms.uNumStops=r.length,this._stops=r}set type(t){this.uniforms.uType=t}get type(){return this.uniforms.uType}set angle(t){this.uniforms.uAngle=t-Jd}get angle(){return this.uniforms.uAngle+Jd}set alpha(t){this.uniforms.uAlpha=t}get alpha(){return this.uniforms.uAlpha}set maxColors(t){this.uniforms.uMaxColors=t}get maxColors(){return this.uniforms.uMaxColors}};let ko=wu;ko.LINEAR=0,ko.RADIAL=1,ko.CONIC=2,ko.defaults={type:wu.LINEAR,stops:[{offset:0,color:16711680,alpha:1},{offset:1,color:255,alpha:1}],alpha:1,angle:90,maxColors:0};var JT=`attribute vec2 aVertexPosition;
838
838
  attribute vec2 aTextureCoord;
839
839
 
840
840
  uniform mat3 projectionMatrix;
@@ -980,7 +980,7 @@ void main(void){
980
980
  sample *= alpha;
981
981
 
982
982
  gl_FragColor = sample;
983
- }`,aE=Object.defineProperty,ep=Object.getOwnPropertySymbols,lE=Object.prototype.hasOwnProperty,uE=Object.prototype.propertyIsEnumerable,rp=(e,t,r)=>t in e?aE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,np=(e,t)=>{for(var r in t||(t={}))lE.call(t,r)&&rp(e,r,t[r]);if(ep)for(var r of ep(t))uE.call(t,r)&&rp(e,r,t[r]);return e};const wu=class extends Zt{constructor(t){super(),this.angle=45,this._distance=5,this._resolution=Dt.FILTER_RESOLUTION;const r=t?np(np({},wu.defaults),t):wu.defaults,{kernels:n,blur:i,quality:o,pixelSize:a,resolution:u}=r;this._offset=new Un(this._updatePadding,this),this._tintFilter=new Zt(sE,oE),this._tintFilter.uniforms.color=new Float32Array(4),this._tintFilter.uniforms.shift=this._offset,this._tintFilter.resolution=u,this._blurFilter=n?new ms(n):new ms(i,o),this.pixelSize=a,this.resolution=u;const{shadowOnly:f,rotation:h,distance:d,offset:p,alpha:c,color:v}=r;this.shadowOnly=f,h!==void 0&&d!==void 0?(this.rotation=h,this.distance=d):this.offset=p,this.alpha=c,this.color=v}apply(t,r,n,i){const o=t.getFilterTexture();this._tintFilter.apply(t,r,o,1),this._blurFilter.apply(t,o,n,i),this.shadowOnly!==!0&&t.applyFilter(this,r,n,0),t.returnFilterTexture(o)}_updatePadding(){const t=Math.max(Math.abs(this._offset.x),Math.abs(this._offset.y));this.padding=t+this.blur*2}_updateShift(){this._tintFilter.uniforms.shift.set(this.distance*Math.cos(this.angle),this.distance*Math.sin(this.angle))}set offset(t){this._offset.copyFrom(t),this._updatePadding()}get offset(){return this._offset}get resolution(){return this._resolution}set resolution(t){this._resolution=t,this._tintFilter&&(this._tintFilter.resolution=t),this._blurFilter&&(this._blurFilter.resolution=t)}get distance(){return this._distance}set distance(t){zt("5.3.0","DropShadowFilter distance is deprecated, use offset"),this._distance=t,this._updatePadding(),this._updateShift()}get rotation(){return this.angle/fs}set rotation(t){zt("5.3.0","DropShadowFilter rotation is deprecated, use offset"),this.angle=t*fs,this._updateShift()}get alpha(){return this._tintFilter.uniforms.alpha}set alpha(t){this._tintFilter.uniforms.alpha=t}get color(){return Hl(this._tintFilter.uniforms.color)}set color(t){lo(t,this._tintFilter.uniforms.color)}get kernels(){return this._blurFilter.kernels}set kernels(t){this._blurFilter.kernels=t}get blur(){return this._blurFilter.blur}set blur(t){this._blurFilter.blur=t,this._updatePadding()}get quality(){return this._blurFilter.quality}set quality(t){this._blurFilter.quality=t}get pixelSize(){return this._blurFilter.pixelSize}set pixelSize(t){this._blurFilter.pixelSize=t}};let fE=wu;fE.defaults={offset:{x:4,y:4},color:0,alpha:.5,shadowOnly:!1,kernels:null,blur:2,quality:3,pixelSize:1,resolution:Dt.FILTER_RESOLUTION};var cE=`attribute vec2 aVertexPosition;
983
+ }`,aE=Object.defineProperty,ep=Object.getOwnPropertySymbols,lE=Object.prototype.hasOwnProperty,uE=Object.prototype.propertyIsEnumerable,rp=(e,t,r)=>t in e?aE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,np=(e,t)=>{for(var r in t||(t={}))lE.call(t,r)&&rp(e,r,t[r]);if(ep)for(var r of ep(t))uE.call(t,r)&&rp(e,r,t[r]);return e};const Tu=class extends Zt{constructor(t){super(),this.angle=45,this._distance=5,this._resolution=Dt.FILTER_RESOLUTION;const r=t?np(np({},Tu.defaults),t):Tu.defaults,{kernels:n,blur:i,quality:o,pixelSize:a,resolution:u}=r;this._offset=new Un(this._updatePadding,this),this._tintFilter=new Zt(sE,oE),this._tintFilter.uniforms.color=new Float32Array(4),this._tintFilter.uniforms.shift=this._offset,this._tintFilter.resolution=u,this._blurFilter=n?new ys(n):new ys(i,o),this.pixelSize=a,this.resolution=u;const{shadowOnly:f,rotation:h,distance:d,offset:p,alpha:c,color:v}=r;this.shadowOnly=f,h!==void 0&&d!==void 0?(this.rotation=h,this.distance=d):this.offset=p,this.alpha=c,this.color=v}apply(t,r,n,i){const o=t.getFilterTexture();this._tintFilter.apply(t,r,o,1),this._blurFilter.apply(t,o,n,i),this.shadowOnly!==!0&&t.applyFilter(this,r,n,0),t.returnFilterTexture(o)}_updatePadding(){const t=Math.max(Math.abs(this._offset.x),Math.abs(this._offset.y));this.padding=t+this.blur*2}_updateShift(){this._tintFilter.uniforms.shift.set(this.distance*Math.cos(this.angle),this.distance*Math.sin(this.angle))}set offset(t){this._offset.copyFrom(t),this._updatePadding()}get offset(){return this._offset}get resolution(){return this._resolution}set resolution(t){this._resolution=t,this._tintFilter&&(this._tintFilter.resolution=t),this._blurFilter&&(this._blurFilter.resolution=t)}get distance(){return this._distance}set distance(t){Ht("5.3.0","DropShadowFilter distance is deprecated, use offset"),this._distance=t,this._updatePadding(),this._updateShift()}get rotation(){return this.angle/cs}set rotation(t){Ht("5.3.0","DropShadowFilter rotation is deprecated, use offset"),this.angle=t*cs,this._updateShift()}get alpha(){return this._tintFilter.uniforms.alpha}set alpha(t){this._tintFilter.uniforms.alpha=t}get color(){return Vl(this._tintFilter.uniforms.color)}set color(t){uo(t,this._tintFilter.uniforms.color)}get kernels(){return this._blurFilter.kernels}set kernels(t){this._blurFilter.kernels=t}get blur(){return this._blurFilter.blur}set blur(t){this._blurFilter.blur=t,this._updatePadding()}get quality(){return this._blurFilter.quality}set quality(t){this._blurFilter.quality=t}get pixelSize(){return this._blurFilter.pixelSize}set pixelSize(t){this._blurFilter.pixelSize=t}};let fE=Tu;fE.defaults={offset:{x:4,y:4},color:0,alpha:.5,shadowOnly:!1,kernels:null,blur:2,quality:3,pixelSize:1,resolution:Dt.FILTER_RESOLUTION};var cE=`attribute vec2 aVertexPosition;
984
984
  attribute vec2 aTextureCoord;
985
985
 
986
986
  uniform mat3 projectionMatrix;
@@ -1087,7 +1087,7 @@ void main(void)
1087
1087
  gl_FragColor.b = texture2D(uSampler, coord + blue * (1.0 - seed * 0.2) / filterArea.xy).b;
1088
1088
  gl_FragColor.a = texture2D(uSampler, coord).a;
1089
1089
  }
1090
- `;const Tu=class extends Zt{constructor(t){super(cE,hE),this.offset=100,this.fillMode=Tu.TRANSPARENT,this.average=!1,this.seed=0,this.minSize=8,this.sampleSize=512,this._slices=0,this._offsets=new Float32Array(1),this._sizes=new Float32Array(1),this._direction=-1,this.uniforms.dimensions=new Float32Array(2),this._canvas=document.createElement("canvas"),this._canvas.width=4,this._canvas.height=this.sampleSize,this.texture=Wt.from(this._canvas,{scaleMode:Lr.NEAREST}),Object.assign(this,Tu.defaults,t)}apply(t,r,n,i){const{width:o,height:a}=r.filterFrame;this.uniforms.dimensions[0]=o,this.uniforms.dimensions[1]=a,this.uniforms.aspect=a/o,this.uniforms.seed=this.seed,this.uniforms.offset=this.offset,this.uniforms.fillMode=this.fillMode,t.applyFilter(this,r,n,i)}_randomizeSizes(){const t=this._sizes,r=this._slices-1,n=this.sampleSize,i=Math.min(this.minSize/n,.9/this._slices);if(this.average){const o=this._slices;let a=1;for(let u=0;u<r;u++){const f=a/(o-u),h=Math.max(f*(1-Math.random()*.6),i);t[u]=h,a-=h}t[r]=a}else{let o=1;const a=Math.sqrt(1/this._slices);for(let u=0;u<r;u++){const f=Math.max(a*o*Math.random(),i);t[u]=f,o-=f}t[r]=o}this.shuffle()}shuffle(){const t=this._sizes,r=this._slices-1;for(let n=r;n>0;n--){const i=Math.random()*n>>0,o=t[n];t[n]=t[i],t[i]=o}}_randomizeOffsets(){for(let t=0;t<this._slices;t++)this._offsets[t]=Math.random()*(Math.random()<.5?-1:1)}refresh(){this._randomizeSizes(),this._randomizeOffsets(),this.redraw()}redraw(){const t=this.sampleSize,r=this.texture,n=this._canvas.getContext("2d");n.clearRect(0,0,8,t);let i,o=0;for(let a=0;a<this._slices;a++){i=Math.floor(this._offsets[a]*256);const u=this._sizes[a]*t,f=i>0?i:0,h=i<0?-i:0;n.fillStyle=`rgba(${f}, ${h}, 0, 1)`,n.fillRect(0,o>>0,t,u+1>>0),o+=u}r.baseTexture.update(),this.uniforms.displacementMap=r}set sizes(t){const r=Math.min(this._slices,t.length);for(let n=0;n<r;n++)this._sizes[n]=t[n]}get sizes(){return this._sizes}set offsets(t){const r=Math.min(this._slices,t.length);for(let n=0;n<r;n++)this._offsets[n]=t[n]}get offsets(){return this._offsets}get slices(){return this._slices}set slices(t){this._slices!==t&&(this._slices=t,this.uniforms.slices=t,this._sizes=this.uniforms.slicesWidth=new Float32Array(t),this._offsets=this.uniforms.slicesOffset=new Float32Array(t),this.refresh())}get direction(){return this._direction}set direction(t){if(this._direction===t)return;this._direction=t;const r=t*fs;this.uniforms.sinDir=Math.sin(r),this.uniforms.cosDir=Math.cos(r)}get red(){return this.uniforms.red}set red(t){this.uniforms.red=t}get green(){return this.uniforms.green}set green(t){this.uniforms.green=t}get blue(){return this.uniforms.blue}set blue(t){this.uniforms.blue=t}destroy(){var t;(t=this.texture)==null||t.destroy(!0),this.texture=this._canvas=this.red=this.green=this.blue=this._sizes=this._offsets=null}};let Ei=Tu;Ei.defaults={slices:5,offset:100,direction:0,fillMode:0,average:!1,seed:0,red:[0,0],green:[0,0],blue:[0,0],minSize:8,sampleSize:512},Ei.TRANSPARENT=0,Ei.ORIGINAL=1,Ei.LOOP=2,Ei.CLAMP=3,Ei.MIRROR=4;var dE=`attribute vec2 aVertexPosition;
1090
+ `;const Eu=class extends Zt{constructor(t){super(cE,hE),this.offset=100,this.fillMode=Eu.TRANSPARENT,this.average=!1,this.seed=0,this.minSize=8,this.sampleSize=512,this._slices=0,this._offsets=new Float32Array(1),this._sizes=new Float32Array(1),this._direction=-1,this.uniforms.dimensions=new Float32Array(2),this._canvas=document.createElement("canvas"),this._canvas.width=4,this._canvas.height=this.sampleSize,this.texture=Wt.from(this._canvas,{scaleMode:Lr.NEAREST}),Object.assign(this,Eu.defaults,t)}apply(t,r,n,i){const{width:o,height:a}=r.filterFrame;this.uniforms.dimensions[0]=o,this.uniforms.dimensions[1]=a,this.uniforms.aspect=a/o,this.uniforms.seed=this.seed,this.uniforms.offset=this.offset,this.uniforms.fillMode=this.fillMode,t.applyFilter(this,r,n,i)}_randomizeSizes(){const t=this._sizes,r=this._slices-1,n=this.sampleSize,i=Math.min(this.minSize/n,.9/this._slices);if(this.average){const o=this._slices;let a=1;for(let u=0;u<r;u++){const f=a/(o-u),h=Math.max(f*(1-Math.random()*.6),i);t[u]=h,a-=h}t[r]=a}else{let o=1;const a=Math.sqrt(1/this._slices);for(let u=0;u<r;u++){const f=Math.max(a*o*Math.random(),i);t[u]=f,o-=f}t[r]=o}this.shuffle()}shuffle(){const t=this._sizes,r=this._slices-1;for(let n=r;n>0;n--){const i=Math.random()*n>>0,o=t[n];t[n]=t[i],t[i]=o}}_randomizeOffsets(){for(let t=0;t<this._slices;t++)this._offsets[t]=Math.random()*(Math.random()<.5?-1:1)}refresh(){this._randomizeSizes(),this._randomizeOffsets(),this.redraw()}redraw(){const t=this.sampleSize,r=this.texture,n=this._canvas.getContext("2d");n.clearRect(0,0,8,t);let i,o=0;for(let a=0;a<this._slices;a++){i=Math.floor(this._offsets[a]*256);const u=this._sizes[a]*t,f=i>0?i:0,h=i<0?-i:0;n.fillStyle=`rgba(${f}, ${h}, 0, 1)`,n.fillRect(0,o>>0,t,u+1>>0),o+=u}r.baseTexture.update(),this.uniforms.displacementMap=r}set sizes(t){const r=Math.min(this._slices,t.length);for(let n=0;n<r;n++)this._sizes[n]=t[n]}get sizes(){return this._sizes}set offsets(t){const r=Math.min(this._slices,t.length);for(let n=0;n<r;n++)this._offsets[n]=t[n]}get offsets(){return this._offsets}get slices(){return this._slices}set slices(t){this._slices!==t&&(this._slices=t,this.uniforms.slices=t,this._sizes=this.uniforms.slicesWidth=new Float32Array(t),this._offsets=this.uniforms.slicesOffset=new Float32Array(t),this.refresh())}get direction(){return this._direction}set direction(t){if(this._direction===t)return;this._direction=t;const r=t*cs;this.uniforms.sinDir=Math.sin(r),this.uniforms.cosDir=Math.cos(r)}get red(){return this.uniforms.red}set red(t){this.uniforms.red=t}get green(){return this.uniforms.green}set green(t){this.uniforms.green=t}get blue(){return this.uniforms.blue}set blue(t){this.uniforms.blue=t}destroy(){var t;(t=this.texture)==null||t.destroy(!0),this.texture=this._canvas=this.red=this.green=this.blue=this._sizes=this._offsets=null}};let Ei=Eu;Ei.defaults={slices:5,offset:100,direction:0,fillMode:0,average:!1,seed:0,red:[0,0],green:[0,0],blue:[0,0],minSize:8,sampleSize:512},Ei.TRANSPARENT=0,Ei.ORIGINAL=1,Ei.LOOP=2,Ei.CLAMP=3,Ei.MIRROR=4;var dE=`attribute vec2 aVertexPosition;
1091
1091
  attribute vec2 aTextureCoord;
1092
1092
 
1093
1093
  uniform mat3 projectionMatrix;
@@ -1164,7 +1164,7 @@ void main(void) {
1164
1164
  gl_FragColor = innerColor + outerGlowColor;
1165
1165
  }
1166
1166
  }
1167
- `;const ip=class extends Zt{constructor(e){const t=Object.assign({},ip.defaults,e),{outerStrength:r,innerStrength:n,color:i,knockout:o,quality:a,alpha:u}=t,f=Math.round(t.distance);super(dE,pE.replace(/__ANGLE_STEP_SIZE__/gi,`${(1/a/f).toFixed(7)}`).replace(/__DIST__/gi,`${f.toFixed(0)}.0`)),this.uniforms.glowColor=new Float32Array([0,0,0,1]),this.uniforms.alpha=1,Object.assign(this,{color:i,outerStrength:r,innerStrength:n,padding:f,knockout:o,alpha:u})}get color(){return Hl(this.uniforms.glowColor)}set color(e){lo(e,this.uniforms.glowColor)}get outerStrength(){return this.uniforms.outerStrength}set outerStrength(e){this.uniforms.outerStrength=e}get innerStrength(){return this.uniforms.innerStrength}set innerStrength(e){this.uniforms.innerStrength=e}get knockout(){return this.uniforms.knockout}set knockout(e){this.uniforms.knockout=e}get alpha(){return this.uniforms.alpha}set alpha(e){this.uniforms.alpha=e}};let vE=ip;vE.defaults={distance:10,outerStrength:4,innerStrength:0,color:16777215,quality:.1,knockout:!1,alpha:1};var gE=`attribute vec2 aVertexPosition;
1167
+ `;const ip=class extends Zt{constructor(e){const t=Object.assign({},ip.defaults,e),{outerStrength:r,innerStrength:n,color:i,knockout:o,quality:a,alpha:u}=t,f=Math.round(t.distance);super(dE,pE.replace(/__ANGLE_STEP_SIZE__/gi,`${(1/a/f).toFixed(7)}`).replace(/__DIST__/gi,`${f.toFixed(0)}.0`)),this.uniforms.glowColor=new Float32Array([0,0,0,1]),this.uniforms.alpha=1,Object.assign(this,{color:i,outerStrength:r,innerStrength:n,padding:f,knockout:o,alpha:u})}get color(){return Vl(this.uniforms.glowColor)}set color(e){uo(e,this.uniforms.glowColor)}get outerStrength(){return this.uniforms.outerStrength}set outerStrength(e){this.uniforms.outerStrength=e}get innerStrength(){return this.uniforms.innerStrength}set innerStrength(e){this.uniforms.innerStrength=e}get knockout(){return this.uniforms.knockout}set knockout(e){this.uniforms.knockout=e}get alpha(){return this.uniforms.alpha}set alpha(e){this.uniforms.alpha=e}};let vE=ip;vE.defaults={distance:10,outerStrength:4,innerStrength:0,color:16777215,quality:.1,knockout:!1,alpha:1};var gE=`attribute vec2 aVertexPosition;
1168
1168
  attribute vec2 aTextureCoord;
1169
1169
 
1170
1170
  uniform mat3 projectionMatrix;
@@ -1315,7 +1315,7 @@ void main(void) {
1315
1315
  gl_FragColor = texture2D(uSampler, vTextureCoord) + mist;
1316
1316
 
1317
1317
  }
1318
- `;const sp=class extends Zt{constructor(t){super(gE,yE.replace("${perlin}",mE)),this.parallel=!0,this.time=0,this._angle=0,this.uniforms.dimensions=new Float32Array(2);const r=Object.assign(sp.defaults,t);this._angleLight=new se,this.angle=r.angle,this.gain=r.gain,this.lacunarity=r.lacunarity,this.alpha=r.alpha,this.parallel=r.parallel,this.center=r.center,this.time=r.time}apply(t,r,n,i){const{width:o,height:a}=r.filterFrame;this.uniforms.light=this.parallel?this._angleLight:this.center,this.uniforms.parallel=this.parallel,this.uniforms.dimensions[0]=o,this.uniforms.dimensions[1]=a,this.uniforms.aspect=a/o,this.uniforms.time=this.time,this.uniforms.alpha=this.alpha,t.applyFilter(this,r,n,i)}get angle(){return this._angle}set angle(t){this._angle=t;const r=t*fs;this._angleLight.x=Math.cos(r),this._angleLight.y=Math.sin(r)}get gain(){return this.uniforms.gain}set gain(t){this.uniforms.gain=t}get lacunarity(){return this.uniforms.lacunarity}set lacunarity(t){this.uniforms.lacunarity=t}get alpha(){return this.uniforms.alpha}set alpha(t){this.uniforms.alpha=t}};let _E=sp;_E.defaults={angle:30,gain:.5,lacunarity:2.5,time:0,parallel:!0,center:[0,0],alpha:1};var bE=`attribute vec2 aVertexPosition;
1318
+ `;const sp=class extends Zt{constructor(t){super(gE,yE.replace("${perlin}",mE)),this.parallel=!0,this.time=0,this._angle=0,this.uniforms.dimensions=new Float32Array(2);const r=Object.assign(sp.defaults,t);this._angleLight=new oe,this.angle=r.angle,this.gain=r.gain,this.lacunarity=r.lacunarity,this.alpha=r.alpha,this.parallel=r.parallel,this.center=r.center,this.time=r.time}apply(t,r,n,i){const{width:o,height:a}=r.filterFrame;this.uniforms.light=this.parallel?this._angleLight:this.center,this.uniforms.parallel=this.parallel,this.uniforms.dimensions[0]=o,this.uniforms.dimensions[1]=a,this.uniforms.aspect=a/o,this.uniforms.time=this.time,this.uniforms.alpha=this.alpha,t.applyFilter(this,r,n,i)}get angle(){return this._angle}set angle(t){this._angle=t;const r=t*cs;this._angleLight.x=Math.cos(r),this._angleLight.y=Math.sin(r)}get gain(){return this.uniforms.gain}set gain(t){this.uniforms.gain=t}get lacunarity(){return this.uniforms.lacunarity}set lacunarity(t){this.uniforms.lacunarity=t}get alpha(){return this.uniforms.alpha}set alpha(t){this.uniforms.alpha=t}};let _E=sp;_E.defaults={angle:30,gain:.5,lacunarity:2.5,time:0,parallel:!0,center:[0,0],alpha:1};var bE=`attribute vec2 aVertexPosition;
1319
1319
  attribute vec2 aTextureCoord;
1320
1320
 
1321
1321
  uniform mat3 projectionMatrix;
@@ -1548,7 +1548,7 @@ void main(void) {
1548
1548
  vec4 outlineColor = vec4(vec3(uColor) * outlineAlpha, outlineAlpha);
1549
1549
  gl_FragColor = contentColor + outlineColor;
1550
1550
  }
1551
- `;const ko=class extends Zt{constructor(t=1,r=0,n=.1,i=1,o=!1){super(AE,OE.replace(/\$\{angleStep\}/,ko.getAngleStep(n))),this._thickness=1,this._alpha=1,this._knockout=!1,this.uniforms.uThickness=new Float32Array([0,0]),this.uniforms.uColor=new Float32Array([0,0,0,1]),this.uniforms.uAlpha=i,this.uniforms.uKnockout=o,Object.assign(this,{thickness:t,color:r,quality:n,alpha:i,knockout:o})}static getAngleStep(t){const r=Math.max(t*ko.MAX_SAMPLES,ko.MIN_SAMPLES);return(Math.PI*2/r).toFixed(7)}apply(t,r,n,i){this.uniforms.uThickness[0]=this._thickness/r._frame.width,this.uniforms.uThickness[1]=this._thickness/r._frame.height,this.uniforms.uAlpha=this._alpha,this.uniforms.uKnockout=this._knockout,t.applyFilter(this,r,n,i)}get alpha(){return this._alpha}set alpha(t){this._alpha=t}get color(){return Hl(this.uniforms.uColor)}set color(t){lo(t,this.uniforms.uColor)}get knockout(){return this._knockout}set knockout(t){this._knockout=t}get thickness(){return this._thickness}set thickness(t){this._thickness=t,this.padding=t}};let lp=ko;lp.MIN_SAMPLES=1,lp.MAX_SAMPLES=100;var CE=`attribute vec2 aVertexPosition;
1551
+ `;const Lo=class extends Zt{constructor(t=1,r=0,n=.1,i=1,o=!1){super(AE,OE.replace(/\$\{angleStep\}/,Lo.getAngleStep(n))),this._thickness=1,this._alpha=1,this._knockout=!1,this.uniforms.uThickness=new Float32Array([0,0]),this.uniforms.uColor=new Float32Array([0,0,0,1]),this.uniforms.uAlpha=i,this.uniforms.uKnockout=o,Object.assign(this,{thickness:t,color:r,quality:n,alpha:i,knockout:o})}static getAngleStep(t){const r=Math.max(t*Lo.MAX_SAMPLES,Lo.MIN_SAMPLES);return(Math.PI*2/r).toFixed(7)}apply(t,r,n,i){this.uniforms.uThickness[0]=this._thickness/r._frame.width,this.uniforms.uThickness[1]=this._thickness/r._frame.height,this.uniforms.uAlpha=this._alpha,this.uniforms.uKnockout=this._knockout,t.applyFilter(this,r,n,i)}get alpha(){return this._alpha}set alpha(t){this._alpha=t}get color(){return Vl(this.uniforms.uColor)}set color(t){uo(t,this.uniforms.uColor)}get knockout(){return this._knockout}set knockout(t){this._knockout=t}get thickness(){return this._thickness}set thickness(t){this._thickness=t,this.padding=t}};let lp=Lo;lp.MIN_SAMPLES=1,lp.MAX_SAMPLES=100;var CE=`attribute vec2 aVertexPosition;
1552
1552
  attribute vec2 aTextureCoord;
1553
1553
 
1554
1554
  uniform mat3 projectionMatrix;
@@ -1733,7 +1733,7 @@ void main(void)
1733
1733
 
1734
1734
  gl_FragColor = color;
1735
1735
  }
1736
- `;let cp=class extends Zt{constructor(t){var r,n;super(kE,LE),this.uniforms.blur=t.blur,this.uniforms.gradientBlur=t.gradientBlur,this.uniforms.start=(r=t.start)!=null?r:new se(0,window.innerHeight/2),this.uniforms.end=(n=t.end)!=null?n:new se(600,window.innerHeight/2),this.uniforms.delta=new se(30,30),this.uniforms.texSize=new se(window.innerWidth,window.innerHeight),this.updateDelta()}updateDelta(){this.uniforms.delta.x=0,this.uniforms.delta.y=0}get blur(){return this.uniforms.blur}set blur(t){this.uniforms.blur=t}get gradientBlur(){return this.uniforms.gradientBlur}set gradientBlur(t){this.uniforms.gradientBlur=t}get start(){return this.uniforms.start}set start(t){this.uniforms.start=t,this.updateDelta()}get end(){return this.uniforms.end}set end(t){this.uniforms.end=t,this.updateDelta()}},FE=class extends cp{updateDelta(){const t=this.uniforms.end.x-this.uniforms.start.x,r=this.uniforms.end.y-this.uniforms.start.y,n=Math.sqrt(t*t+r*r);this.uniforms.delta.x=t/n,this.uniforms.delta.y=r/n}},BE=class extends cp{updateDelta(){const t=this.uniforms.end.x-this.uniforms.start.x,r=this.uniforms.end.y-this.uniforms.start.y,n=Math.sqrt(t*t+r*r);this.uniforms.delta.x=-r/n,this.uniforms.delta.y=t/n}};const hp=class extends Zt{constructor(t,r,n,i){super(),typeof t=="number"&&(zt("5.3.0","TiltShiftFilter constructor arguments is deprecated, use options."),t={blur:t,gradientBlur:r,start:n,end:i}),t=Object.assign({},hp.defaults,t),this.tiltShiftXFilter=new FE(t),this.tiltShiftYFilter=new BE(t)}apply(t,r,n,i){const o=t.getFilterTexture();this.tiltShiftXFilter.apply(t,r,o,1),this.tiltShiftYFilter.apply(t,o,n,i),t.returnFilterTexture(o)}get blur(){return this.tiltShiftXFilter.blur}set blur(t){this.tiltShiftXFilter.blur=this.tiltShiftYFilter.blur=t}get gradientBlur(){return this.tiltShiftXFilter.gradientBlur}set gradientBlur(t){this.tiltShiftXFilter.gradientBlur=this.tiltShiftYFilter.gradientBlur=t}get start(){return this.tiltShiftXFilter.start}set start(t){this.tiltShiftXFilter.start=this.tiltShiftYFilter.start=t}get end(){return this.tiltShiftXFilter.end}set end(t){this.tiltShiftXFilter.end=this.tiltShiftYFilter.end=t}};let DE=hp;DE.defaults={blur:100,gradientBlur:600,start:void 0,end:void 0};var UE=`attribute vec2 aVertexPosition;
1736
+ `;let cp=class extends Zt{constructor(t){var r,n;super(kE,LE),this.uniforms.blur=t.blur,this.uniforms.gradientBlur=t.gradientBlur,this.uniforms.start=(r=t.start)!=null?r:new oe(0,window.innerHeight/2),this.uniforms.end=(n=t.end)!=null?n:new oe(600,window.innerHeight/2),this.uniforms.delta=new oe(30,30),this.uniforms.texSize=new oe(window.innerWidth,window.innerHeight),this.updateDelta()}updateDelta(){this.uniforms.delta.x=0,this.uniforms.delta.y=0}get blur(){return this.uniforms.blur}set blur(t){this.uniforms.blur=t}get gradientBlur(){return this.uniforms.gradientBlur}set gradientBlur(t){this.uniforms.gradientBlur=t}get start(){return this.uniforms.start}set start(t){this.uniforms.start=t,this.updateDelta()}get end(){return this.uniforms.end}set end(t){this.uniforms.end=t,this.updateDelta()}},FE=class extends cp{updateDelta(){const t=this.uniforms.end.x-this.uniforms.start.x,r=this.uniforms.end.y-this.uniforms.start.y,n=Math.sqrt(t*t+r*r);this.uniforms.delta.x=t/n,this.uniforms.delta.y=r/n}},BE=class extends cp{updateDelta(){const t=this.uniforms.end.x-this.uniforms.start.x,r=this.uniforms.end.y-this.uniforms.start.y,n=Math.sqrt(t*t+r*r);this.uniforms.delta.x=-r/n,this.uniforms.delta.y=t/n}};const hp=class extends Zt{constructor(t,r,n,i){super(),typeof t=="number"&&(Ht("5.3.0","TiltShiftFilter constructor arguments is deprecated, use options."),t={blur:t,gradientBlur:r,start:n,end:i}),t=Object.assign({},hp.defaults,t),this.tiltShiftXFilter=new FE(t),this.tiltShiftYFilter=new BE(t)}apply(t,r,n,i){const o=t.getFilterTexture();this.tiltShiftXFilter.apply(t,r,o,1),this.tiltShiftYFilter.apply(t,o,n,i),t.returnFilterTexture(o)}get blur(){return this.tiltShiftXFilter.blur}set blur(t){this.tiltShiftXFilter.blur=this.tiltShiftYFilter.blur=t}get gradientBlur(){return this.tiltShiftXFilter.gradientBlur}set gradientBlur(t){this.tiltShiftXFilter.gradientBlur=this.tiltShiftYFilter.gradientBlur=t}get start(){return this.tiltShiftXFilter.start}set start(t){this.tiltShiftXFilter.start=this.tiltShiftYFilter.start=t}get end(){return this.tiltShiftXFilter.end}set end(t){this.tiltShiftXFilter.end=this.tiltShiftYFilter.end=t}};let DE=hp;DE.defaults={blur:100,gradientBlur:600,start:void 0,end:void 0};var UE=`attribute vec2 aVertexPosition;
1737
1737
  attribute vec2 aTextureCoord;
1738
1738
 
1739
1739
  uniform mat3 projectionMatrix;
@@ -1800,7 +1800,7 @@ void main(void)
1800
1800
  gl_FragColor = texture2D(uSampler, coord );
1801
1801
 
1802
1802
  }
1803
- `;const dp=class extends Zt{constructor(e){super(UE,$E),Object.assign(this,dp.defaults,e)}get offset(){return this.uniforms.offset}set offset(e){this.uniforms.offset=e}get radius(){return this.uniforms.radius}set radius(e){this.uniforms.radius=e}get angle(){return this.uniforms.angle}set angle(e){this.uniforms.angle=e}};let GE=dp;GE.defaults={radius:200,angle:4,padding:20,offset:new se};var jE=`attribute vec2 aVertexPosition;
1803
+ `;const dp=class extends Zt{constructor(e){super(UE,$E),Object.assign(this,dp.defaults,e)}get offset(){return this.uniforms.offset}set offset(e){this.uniforms.offset=e}get radius(){return this.uniforms.radius}set radius(e){this.uniforms.radius=e}get angle(){return this.uniforms.angle}set angle(e){this.uniforms.angle=e}};let GE=dp;GE.defaults={radius:200,angle:4,padding:20,offset:new oe};var jE=`attribute vec2 aVertexPosition;
1804
1804
  attribute vec2 aTextureCoord;
1805
1805
 
1806
1806
  uniform mat3 projectionMatrix;
@@ -1897,7 +1897,7 @@ void main() {
1897
1897
 
1898
1898
  gl_FragColor = color;
1899
1899
  }
1900
- `,pp=Object.getOwnPropertySymbols,zE=Object.prototype.hasOwnProperty,HE=Object.prototype.propertyIsEnumerable,VE=(e,t)=>{var r={};for(var n in e)zE.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&pp)for(var n of pp(e))t.indexOf(n)<0&&HE.call(e,n)&&(r[n]=e[n]);return r};const vp=class extends Zt{constructor(e){const t=Object.assign(vp.defaults,e),{maxKernelSize:r}=t,n=VE(t,["maxKernelSize"]);super(jE,qE.replace("${maxKernelSize}",r.toFixed(1))),Object.assign(this,n)}get center(){return this.uniforms.uCenter}set center(e){this.uniforms.uCenter=e}get strength(){return this.uniforms.uStrength}set strength(e){this.uniforms.uStrength=e}get innerRadius(){return this.uniforms.uInnerRadius}set innerRadius(e){this.uniforms.uInnerRadius=e}get radius(){return this.uniforms.uRadius}set radius(e){(e<0||e===1/0)&&(e=-1),this.uniforms.uRadius=e}};let WE=vp;WE.defaults={strength:.1,center:[0,0],innerRadius:0,radius:-1,maxKernelSize:32};const ys=e=>{const{contrast:t=1,saturation:r=1,brightness:n=1,alpha:i=1,red:o=1,blue:a=1,gamma:u=1,green:f=1,blurRadius:h=0,temperature:d=0,hue:p=0,sharpness:c=0}=e||{},v=new zr.Filter(null,`
1900
+ `,pp=Object.getOwnPropertySymbols,zE=Object.prototype.hasOwnProperty,HE=Object.prototype.propertyIsEnumerable,VE=(e,t)=>{var r={};for(var n in e)zE.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&pp)for(var n of pp(e))t.indexOf(n)<0&&HE.call(e,n)&&(r[n]=e[n]);return r};const vp=class extends Zt{constructor(e){const t=Object.assign(vp.defaults,e),{maxKernelSize:r}=t,n=VE(t,["maxKernelSize"]);super(jE,qE.replace("${maxKernelSize}",r.toFixed(1))),Object.assign(this,n)}get center(){return this.uniforms.uCenter}set center(e){this.uniforms.uCenter=e}get strength(){return this.uniforms.uStrength}set strength(e){this.uniforms.uStrength=e}get innerRadius(){return this.uniforms.uInnerRadius}set innerRadius(e){this.uniforms.uInnerRadius=e}get radius(){return this.uniforms.uRadius}set radius(e){(e<0||e===1/0)&&(e=-1),this.uniforms.uRadius=e}};let WE=vp;WE.defaults={strength:.1,center:[0,0],innerRadius:0,radius:-1,maxKernelSize:32};const _s=e=>{const{contrast:t=1,saturation:r=1,brightness:n=1,alpha:i=1,red:o=1,blue:a=1,gamma:u=1,green:f=1,blurRadius:h=0,temperature:d=0,hue:p=0,sharpness:c=0}=e||{},v=new zr.Filter(null,`
1901
1901
  precision mediump float;
1902
1902
  varying vec2 vTextureCoord;
1903
1903
  uniform sampler2D uSampler;
@@ -1909,7 +1909,7 @@ void main() {
1909
1909
  color.b = color.b - (temperature / 100.0);
1910
1910
  gl_FragColor = color;
1911
1911
  }
1912
- `);v.uniforms.temperature=d;const y=new eE([0,-c,0,-c,1+4*c,-c,0,-c,0]),b=new zr.filters.ColorMatrixFilter;b.hue(p,!1);const _=new ms(h,1,!0);return{adjustmentFilter:new _T({...u&&{gamma:u},...n&&{brightness:n},...t&&{contrast:t},...r&&{saturation:r},...o&&{red:o},...f&&{green:f},...a&&{blue:a},...i&&{alpha:i}}),blurFilter:_,hueFilter:b,sharpnessFilter:y,temperatureFilter:v}},XE=()=>{const e=new zr.Filter(null,`
1912
+ `);v.uniforms.temperature=d;const y=new eE([0,-c,0,-c,1+4*c,-c,0,-c,0]),_=new zr.filters.ColorMatrixFilter;_.hue(p,!1);const b=new ys(h,1,!0);return{adjustmentFilter:new _T({...u&&{gamma:u},...n&&{brightness:n},...t&&{contrast:t},...r&&{saturation:r},...o&&{red:o},...f&&{green:f},...a&&{blue:a},...i&&{alpha:i}}),blurFilter:b,hueFilter:_,sharpnessFilter:y,temperatureFilter:v}},XE=()=>{const e=new zr.Filter(null,`
1913
1913
  precision mediump float;
1914
1914
  uniform mat3 uNightVisionMatrix;
1915
1915
  varying vec2 vTextureCoord;
@@ -1920,7 +1920,7 @@ void main() {
1920
1920
  vec3 color = texColor.rgb;
1921
1921
  gl_FragColor = vec4(uNightVisionMatrix * vec3(color), texColor.a);
1922
1922
  }
1923
- `),t=[.393,.769,.189,.349,.686,.168,.272,.534,.131];return e.uniforms.uNightVisionMatrix=t,{nightVisionFilter:e}},gp=Et.forwardRef((e,t)=>{const r=mt.useRef(null),n=mt.useRef(null),{src:i,transformation:{x:o,y:a,width:u,height:f,anchor:h,colorCorrection:d={},effect:p},pointerdown:c}=e;console.log("PixiImageSprite props",e);const{blurRadius:v=0}=d,{temperatureFilter:y,sharpnessFilter:b,hueFilter:_,blurFilter:m,adjustmentFilter:w}=ys(d),{nightVisionFilter:T}=XE();return Et.useEffect(()=>()=>{console.log("PixiImageSprite unmounting")},[]),Vt.jsx(ni,{...e,ref:t,children:Vt.jsx(le.Container,{ref:n,children:Vt.jsx(le.Sprite,{image:i,width:u,height:f,anchor:h,ref:r,x:o,y:a,interactive:!0,pointerdown:c,filters:[y,b,_,w,...v>0?[m]:[],...p===Sn.NightVision?[T]:[]]})})})});gp.whyDidYouRender={logOnDifferentValues:!0,customName:"ImageSprite"};const Lo={build(e){const t=e.points;let r,n,i,o,a,u;if(e.type===Ne.CIRC){const y=e.shape;r=y.x,n=y.y,a=u=y.radius,i=o=0}else if(e.type===Ne.ELIP){const y=e.shape;r=y.x,n=y.y,a=y.width,u=y.height,i=o=0}else{const y=e.shape,b=y.width/2,_=y.height/2;r=y.x+b,n=y.y+_,a=u=Math.max(0,Math.min(y.radius,Math.min(b,_))),i=b-a,o=_-u}if(!(a>=0&&u>=0&&i>=0&&o>=0)){t.length=0;return}const f=Math.ceil(2.3*Math.sqrt(a+u)),h=f*8+(i?4:0)+(o?4:0);if(t.length=h,h===0)return;if(f===0){t.length=8,t[0]=t[6]=r+i,t[1]=t[3]=n+o,t[2]=t[4]=r-i,t[5]=t[7]=n-o;return}let d=0,p=f*4+(i?2:0)+2,c=p,v=h;{const y=i+a,b=o,_=r+y,m=r-y,w=n+b;if(t[d++]=_,t[d++]=w,t[--p]=w,t[--p]=m,o){const T=n-b;t[c++]=m,t[c++]=T,t[--v]=T,t[--v]=_}}for(let y=1;y<f;y++){const b=Math.PI/2*(y/f),_=i+Math.cos(b)*a,m=o+Math.sin(b)*u,w=r+_,T=r-_,x=n+m,E=n-m;t[d++]=w,t[d++]=x,t[--p]=x,t[--p]=T,t[c++]=T,t[c++]=E,t[--v]=E,t[--v]=w}{const y=i,b=o+u,_=r+y,m=r-y,w=n+b,T=n-b;t[d++]=_,t[d++]=w,t[--v]=T,t[--v]=_,i&&(t[d++]=m,t[d++]=w,t[--v]=T,t[--v]=m)}},triangulate(e,t){const r=e.points,n=t.points,i=t.indices;if(r.length===0)return;let o=n.length/2;const a=o;let u,f;if(e.type!==Ne.RREC){const d=e.shape;u=d.x,f=d.y}else{const d=e.shape;u=d.x+d.width/2,f=d.y+d.height/2}const h=e.matrix;n.push(e.matrix?h.a*u+h.c*f+h.tx:u,e.matrix?h.b*u+h.d*f+h.ty:f),o++,n.push(r[0],r[1]);for(let d=2;d<r.length;d+=2)n.push(r[d],r[d+1]),i.push(o++,a,o);i.push(a+1,a,o)}};function mp(e,t=!1){const r=e.length;if(r<6)return;let n=0;for(let i=0,o=e[r-2],a=e[r-1];i<r;i+=2){const u=e[i],f=e[i+1];n+=(u-o)*(f+a),o=u,a=f}if(!t&&n>0||t&&n<=0){const i=r/2;for(let o=i+i%2;o<r;o+=2){const a=r-o-2,u=r-o-1,f=o,h=o+1;[e[a],e[f]]=[e[f],e[a]],[e[u],e[h]]=[e[h],e[u]]}}}const yp={build(e){e.points=e.shape.points.slice()},triangulate(e,t){let r=e.points;const n=e.holes,i=t.points,o=t.indices;if(r.length>=6){mp(r,!1);const a=[];for(let h=0;h<n.length;h++){const d=n[h];mp(d.points,!0),a.push(r.length/2),r=r.concat(d.points)}const u=k_(r,a,2);if(!u)return;const f=i.length/2;for(let h=0;h<u.length;h+=3)o.push(u[h]+f),o.push(u[h+1]+f),o.push(u[h+2]+f);for(let h=0;h<r.length;h++)i.push(r[h])}}},KE={build(e){const t=e.shape,r=t.x,n=t.y,i=t.width,o=t.height,a=e.points;a.length=0,i>=0&&o>=0&&a.push(r,n,r+i,n,r+i,n+o,r,n+o)},triangulate(e,t){const r=e.points,n=t.points;if(r.length===0)return;const i=n.length/2;n.push(r[0],r[1],r[2],r[3],r[6],r[7],r[4],r[5]),t.indices.push(i,i+1,i+2,i+1,i+2,i+3)}},YE={build(e){Lo.build(e)},triangulate(e,t){Lo.triangulate(e,t)}};var Sr=(e=>(e.MITER="miter",e.BEVEL="bevel",e.ROUND="round",e))(Sr||{}),jn=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))(jn||{});const Si={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(e,t=20){if(!this.adaptive||!e||isNaN(e))return t;let r=Math.ceil(e/this.maxLength);return r<this.minSegments?r=this.minSegments:r>this.maxSegments&&(r=this.maxSegments),r}};class _p{static curveTo(t,r,n,i,o,a){const u=a[a.length-2],h=a[a.length-1]-r,d=u-t,p=i-r,c=n-t,v=Math.abs(h*c-d*p);if(v<1e-8||o===0)return(a[a.length-2]!==t||a[a.length-1]!==r)&&a.push(t,r),null;const y=h*h+d*d,b=p*p+c*c,_=h*p+d*c,m=o*Math.sqrt(y)/v,w=o*Math.sqrt(b)/v,T=m*_/y,x=w*_/b,E=m*c+w*d,I=m*p+w*h,A=d*(w+T),O=h*(w+T),L=c*(m+x),R=p*(m+x),C=Math.atan2(O-I,A-E),P=Math.atan2(R-I,L-E);return{cx:E+t,cy:I+r,radius:o,startAngle:C,endAngle:P,anticlockwise:d*p>c*h}}static arc(t,r,n,i,o,a,u,f,h){const d=u-a,p=Si._segmentsCount(Math.abs(d)*o,Math.ceil(Math.abs(d)/vo)*40),c=d/(p*2),v=c*2,y=Math.cos(c),b=Math.sin(c),_=p-1,m=_%1/_;for(let w=0;w<=_;++w){const T=w+m*w,x=c+a+v*T,E=Math.cos(x),I=-Math.sin(x);h.push((y*E+b*I)*o+n,(y*-I+b*E)*o+i)}}}class ZE{constructor(){this.reset()}begin(t,r,n){this.reset(),this.style=t,this.start=r,this.attribStart=n}end(t,r){this.attribSize=r-this.attribStart,this.size=t-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}}class Eu{static curveLength(t,r,n,i,o,a,u,f){let d=0,p=0,c=0,v=0,y=0,b=0,_=0,m=0,w=0,T=0,x=0,E=t,I=r;for(let A=1;A<=10;++A)p=A/10,c=p*p,v=c*p,y=1-p,b=y*y,_=b*y,m=_*t+3*b*p*n+3*y*c*o+v*u,w=_*r+3*b*p*i+3*y*c*a+v*f,T=E-m,x=I-w,E=m,I=w,d+=Math.sqrt(T*T+x*x);return d}static curveTo(t,r,n,i,o,a,u){const f=u[u.length-2],h=u[u.length-1];u.length-=2;const d=Si._segmentsCount(Eu.curveLength(f,h,t,r,n,i,o,a));let p=0,c=0,v=0,y=0,b=0;u.push(f,h);for(let _=1,m=0;_<=d;++_)m=_/d,p=1-m,c=p*p,v=c*p,y=m*m,b=y*m,u.push(v*f+3*c*m*t+3*p*y*n+b*o,v*h+3*c*m*r+3*p*y*i+b*a)}}function bp(e,t,r,n,i,o,a,u){const f=e-r*i,h=t-n*i,d=e+r*o,p=t+n*o;let c,v;a?(c=n,v=-r):(c=-n,v=r);const y=f+c,b=h+v,_=d+c,m=p+v;return u.push(y,b,_,m),2}function qn(e,t,r,n,i,o,a,u){const f=r-e,h=n-t;let d=Math.atan2(f,h),p=Math.atan2(i-e,o-t);u&&d<p?d+=Math.PI*2:!u&&d>p&&(p+=Math.PI*2);let c=d;const v=p-d,y=Math.abs(v),b=Math.sqrt(f*f+h*h),_=(15*y*Math.sqrt(b)/Math.PI>>0)+1,m=v/_;if(c+=m,u){a.push(e,t,r,n);for(let w=1,T=c;w<_;w++,T+=m)a.push(e,t,e+Math.sin(T)*b,t+Math.cos(T)*b);a.push(e,t,i,o)}else{a.push(r,n,e,t);for(let w=1,T=c;w<_;w++,T+=m)a.push(e+Math.sin(T)*b,t+Math.cos(T)*b,e,t);a.push(i,o,e,t)}return _*2}function QE(e,t){const r=e.shape;let n=e.points||r.points.slice();const i=t.closePointEps;if(n.length===0)return;const o=e.lineStyle,a=new se(n[0],n[1]),u=new se(n[n.length-2],n[n.length-1]),f=r.type!==Ne.POLY||r.closeStroke,h=Math.abs(a.x-u.x)<i&&Math.abs(a.y-u.y)<i;if(f){n=n.slice(),h&&(n.pop(),n.pop(),u.set(n[n.length-2],n[n.length-1]));const z=(a.x+u.x)*.5,nt=(u.y+a.y)*.5;n.unshift(z,nt),n.push(z,nt)}const d=t.points,p=n.length/2;let c=n.length;const v=d.length/2,y=o.width/2,b=y*y,_=o.miterLimit*o.miterLimit;let m=n[0],w=n[1],T=n[2],x=n[3],E=0,I=0,A=-(w-x),O=m-T,L=0,R=0,C=Math.sqrt(A*A+O*O);A/=C,O/=C,A*=y,O*=y;const P=o.alignment,M=(1-P)*2,F=P*2;f||(o.cap===jn.ROUND?c+=qn(m-A*(M-F)*.5,w-O*(M-F)*.5,m-A*M,w-O*M,m+A*F,w+O*F,d,!0)+2:o.cap===jn.SQUARE&&(c+=bp(m,w,A,O,M,F,!0,d))),d.push(m-A*M,w-O*M,m+A*F,w+O*F);for(let z=1;z<p-1;++z){m=n[(z-1)*2],w=n[(z-1)*2+1],T=n[z*2],x=n[z*2+1],E=n[(z+1)*2],I=n[(z+1)*2+1],A=-(w-x),O=m-T,C=Math.sqrt(A*A+O*O),A/=C,O/=C,A*=y,O*=y,L=-(x-I),R=T-E,C=Math.sqrt(L*L+R*R),L/=C,R/=C,L*=y,R*=y;const nt=T-m,V=w-x,U=T-E,k=I-x,j=nt*U+V*k,G=V*U-k*nt,X=G<0;if(Math.abs(G)<.001*Math.abs(j)){d.push(T-A*M,x-O*M,T+A*F,x+O*F),j>=0&&(o.join===Sr.ROUND?c+=qn(T,x,T-A*M,x-O*M,T-L*M,x-R*M,d,!1)+4:c+=2,d.push(T-L*F,x-R*F,T+L*M,x+R*M));continue}const Y=(-A+m)*(-O+x)-(-A+T)*(-O+w),$=(-L+E)*(-R+x)-(-L+T)*(-R+I),W=(nt*$-U*Y)/G,et=(k*Y-V*$)/G,J=(W-T)*(W-T)+(et-x)*(et-x),it=T+(W-T)*M,lt=x+(et-x)*M,pt=T-(W-T)*F,yt=x-(et-x)*F,xt=Math.min(nt*nt+V*V,U*U+k*k),At=X?M:F,oe=xt+At*At*b,Ht=J<=oe;let rt=o.join;if(rt===Sr.MITER&&J/b>_&&(rt=Sr.BEVEL),Ht)switch(rt){case Sr.MITER:{d.push(it,lt,pt,yt);break}case Sr.BEVEL:{X?d.push(it,lt,T+A*F,x+O*F,it,lt,T+L*F,x+R*F):d.push(T-A*M,x-O*M,pt,yt,T-L*M,x-R*M,pt,yt),c+=2;break}case Sr.ROUND:{X?(d.push(it,lt,T+A*F,x+O*F),c+=qn(T,x,T+A*F,x+O*F,T+L*F,x+R*F,d,!0)+4,d.push(it,lt,T+L*F,x+R*F)):(d.push(T-A*M,x-O*M,pt,yt),c+=qn(T,x,T-A*M,x-O*M,T-L*M,x-R*M,d,!1)+4,d.push(T-L*M,x-R*M,pt,yt));break}}else{switch(d.push(T-A*M,x-O*M,T+A*F,x+O*F),rt){case Sr.MITER:{X?d.push(pt,yt,pt,yt):d.push(it,lt,it,lt),c+=2;break}case Sr.ROUND:{X?c+=qn(T,x,T+A*F,x+O*F,T+L*F,x+R*F,d,!0)+2:c+=qn(T,x,T-A*M,x-O*M,T-L*M,x-R*M,d,!1)+2;break}}d.push(T-L*M,x-R*M,T+L*F,x+R*F),c+=2}}m=n[(p-2)*2],w=n[(p-2)*2+1],T=n[(p-1)*2],x=n[(p-1)*2+1],A=-(w-x),O=m-T,C=Math.sqrt(A*A+O*O),A/=C,O/=C,A*=y,O*=y,d.push(T-A*M,x-O*M,T+A*F,x+O*F),f||(o.cap===jn.ROUND?c+=qn(T-A*(M-F)*.5,x-O*(M-F)*.5,T-A*M,x-O*M,T+A*F,x+O*F,d,!1)+2:o.cap===jn.SQUARE&&(c+=bp(T,x,A,O,M,F,!1,d)));const q=t.indices,Z=Si.epsilon*Si.epsilon;for(let z=v;z<c+v-2;++z)m=d[z*2],w=d[z*2+1],T=d[(z+1)*2],x=d[(z+1)*2+1],E=d[(z+2)*2],I=d[(z+2)*2+1],!(Math.abs(m*(x-I)+T*(I-w)+E*(w-x))<Z)&&q.push(z,z+1,z+2)}function JE(e,t){let r=0;const n=e.shape,i=e.points||n.points,o=n.type!==Ne.POLY||n.closeStroke;if(i.length===0)return;const a=t.points,u=t.indices,f=i.length/2,h=a.length/2;let d=h;for(a.push(i[0],i[1]),r=1;r<f;r++)a.push(i[r*2],i[r*2+1]),u.push(d,d+1),d++;o&&u.push(d,h)}function xp(e,t){e.lineStyle.native?JE(e,t):QE(e,t)}class Su{static curveLength(t,r,n,i,o,a){const u=t-2*n+o,f=r-2*i+a,h=2*n-2*t,d=2*i-2*r,p=4*(u*u+f*f),c=4*(u*h+f*d),v=h*h+d*d,y=2*Math.sqrt(p+c+v),b=Math.sqrt(p),_=2*p*b,m=2*Math.sqrt(v),w=c/b;return(_*y+b*c*(y-m)+(4*v*p-c*c)*Math.log((2*b+w+y)/(w+m)))/(4*_)}static curveTo(t,r,n,i,o){const a=o[o.length-2],u=o[o.length-1],f=Si._segmentsCount(Su.curveLength(a,u,t,r,n,i));let h=0,d=0;for(let p=1;p<=f;++p){const c=p/f;h=a+(t-a)*c,d=u+(r-u)*c,o.push(h+(t+(n-t)*c-h)*c,d+(r+(i-r)*c-d)*c)}}}const Au={[Ne.POLY]:yp,[Ne.CIRC]:Lo,[Ne.ELIP]:Lo,[Ne.RECT]:KE,[Ne.RREC]:YE},wp=[],Fo=[];class Ou{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(t){return this.minX>this.maxX||this.minY>this.maxY?ne.EMPTY:(t=t||new ne(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)}addPoint(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)}addPointMatrix(t,r){const{a:n,b:i,c:o,d:a,tx:u,ty:f}=t,h=n*r.x+o*r.y+u,d=i*r.x+a*r.y+f;this.minX=Math.min(this.minX,h),this.maxX=Math.max(this.maxX,h),this.minY=Math.min(this.minY,d),this.maxY=Math.max(this.maxY,d)}addQuad(t){let r=this.minX,n=this.minY,i=this.maxX,o=this.maxY,a=t[0],u=t[1];r=a<r?a:r,n=u<n?u:n,i=a>i?a:i,o=u>o?u:o,a=t[2],u=t[3],r=a<r?a:r,n=u<n?u:n,i=a>i?a:i,o=u>o?u:o,a=t[4],u=t[5],r=a<r?a:r,n=u<n?u:n,i=a>i?a:i,o=u>o?u:o,a=t[6],u=t[7],r=a<r?a:r,n=u<n?u:n,i=a>i?a:i,o=u>o?u:o,this.minX=r,this.minY=n,this.maxX=i,this.maxY=o}addFrame(t,r,n,i,o){this.addFrameMatrix(t.worldTransform,r,n,i,o)}addFrameMatrix(t,r,n,i,o){const a=t.a,u=t.b,f=t.c,h=t.d,d=t.tx,p=t.ty;let c=this.minX,v=this.minY,y=this.maxX,b=this.maxY,_=a*r+f*n+d,m=u*r+h*n+p;c=_<c?_:c,v=m<v?m:v,y=_>y?_:y,b=m>b?m:b,_=a*i+f*n+d,m=u*i+h*n+p,c=_<c?_:c,v=m<v?m:v,y=_>y?_:y,b=m>b?m:b,_=a*r+f*o+d,m=u*r+h*o+p,c=_<c?_:c,v=m<v?m:v,y=_>y?_:y,b=m>b?m:b,_=a*i+f*o+d,m=u*i+h*o+p,c=_<c?_:c,v=m<v?m:v,y=_>y?_:y,b=m>b?m:b,this.minX=c,this.minY=v,this.maxX=y,this.maxY=b}addVertexData(t,r,n){let i=this.minX,o=this.minY,a=this.maxX,u=this.maxY;for(let f=r;f<n;f+=2){const h=t[f],d=t[f+1];i=h<i?h:i,o=d<o?d:o,a=h>a?h:a,u=d>u?d:u}this.minX=i,this.minY=o,this.maxX=a,this.maxY=u}addVertices(t,r,n,i){this.addVerticesMatrix(t.worldTransform,r,n,i)}addVerticesMatrix(t,r,n,i,o=0,a=o){const u=t.a,f=t.b,h=t.c,d=t.d,p=t.tx,c=t.ty;let v=this.minX,y=this.minY,b=this.maxX,_=this.maxY;for(let m=n;m<i;m+=2){const w=r[m],T=r[m+1],x=u*w+h*T+p,E=d*T+f*w+c;v=Math.min(v,x-o),b=Math.max(b,x+o),y=Math.min(y,E-a),_=Math.max(_,E+a)}this.minX=v,this.minY=y,this.maxX=b,this.maxY=_}addBounds(t){const r=this.minX,n=this.minY,i=this.maxX,o=this.maxY;this.minX=t.minX<r?t.minX:r,this.minY=t.minY<n?t.minY:n,this.maxX=t.maxX>i?t.maxX:i,this.maxY=t.maxY>o?t.maxY:o}addBoundsMask(t,r){const n=t.minX>r.minX?t.minX:r.minX,i=t.minY>r.minY?t.minY:r.minY,o=t.maxX<r.maxX?t.maxX:r.maxX,a=t.maxY<r.maxY?t.maxY:r.maxY;if(n<=o&&i<=a){const u=this.minX,f=this.minY,h=this.maxX,d=this.maxY;this.minX=n<u?n:u,this.minY=i<f?i:f,this.maxX=o>h?o:h,this.maxY=a>d?a:d}}addBoundsMatrix(t,r){this.addFrameMatrix(r,t.minX,t.minY,t.maxX,t.maxY)}addBoundsArea(t,r){const n=t.minX>r.x?t.minX:r.x,i=t.minY>r.y?t.minY:r.y,o=t.maxX<r.x+r.width?t.maxX:r.x+r.width,a=t.maxY<r.y+r.height?t.maxY:r.y+r.height;if(n<=o&&i<=a){const u=this.minX,f=this.minY,h=this.maxX,d=this.maxY;this.minX=n<u?n:u,this.minY=i<f?i:f,this.maxX=o>h?o:h,this.maxY=a>d?a:d}}pad(t=0,r=t){this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=r,this.maxY+=r)}addFramePad(t,r,n,i,o,a){t-=o,r-=a,n+=o,i+=a,this.minX=this.minX<t?this.minX:t,this.maxX=this.maxX>n?this.maxX:n,this.minY=this.minY<r?this.minY:r,this.maxY=this.maxY>i?this.maxY:i}}class Ai extends Vs{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new su,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new Ou,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(t){const r=Object.keys(t);for(let n=0;n<r.length;++n){const i=r[n];Object.defineProperty(Ai.prototype,i,Object.getOwnPropertyDescriptor(t,i))}}get destroyed(){return this._destroyed}_recursivePostUpdateTransform(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)}updateTransform(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha}getBounds(t,r){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),r||(this._boundsRect||(this._boundsRect=new ne),r=this._boundsRect),this._bounds.getRectangle(r)}getLocalBounds(t){t||(this._localBoundsRect||(this._localBoundsRect=new ne),t=this._localBoundsRect),this._localBounds||(this._localBounds=new Ou);const r=this.transform,n=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;const i=this._bounds,o=this._boundsID;this._bounds=this._localBounds;const a=this.getBounds(!1,t);return this.parent=n,this.transform=r,this._bounds=i,this._bounds.updateID+=this._boundsID-o,a}toGlobal(t,r,n=!1){return n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,r)}toLocal(t,r,n,i){return r&&(t=r.toGlobal(t,n,i)),i||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,n)}setParent(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t}removeFromParent(){var t;(t=this.parent)==null||t.removeChild(this)}setTransform(t=0,r=0,n=1,i=1,o=0,a=0,u=0,f=0,h=0){return this.position.x=t,this.position.y=r,this.scale.x=n||1,this.scale.y=i||1,this.rotation=o,this.skew.x=a,this.skew.y=u,this.pivot.x=f,this.pivot.y=h,this}destroy(t){this.removeFromParent(),this._destroyed=!0,this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.cullArea=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.eventMode="auto",this.interactiveChildren=!1,this.emit("destroyed"),this.removeAllListeners()}get _tempDisplayObjectParent(){return this.tempDisplayObjectParent===null&&(this.tempDisplayObjectParent=new t2),this.tempDisplayObjectParent}enableTempParent(){const t=this.parent;return this.parent=this._tempDisplayObjectParent,t}disableTempParent(t){this.parent=t}get x(){return this.position.x}set x(t){this.transform.position.x=t}get y(){return this.position.y}set y(t){this.transform.position.y=t}get worldTransform(){return this.transform.worldTransform}get localTransform(){return this.transform.localTransform}get position(){return this.transform.position}set position(t){this.transform.position.copyFrom(t)}get scale(){return this.transform.scale}set scale(t){this.transform.scale.copyFrom(t)}get pivot(){return this.transform.pivot}set pivot(t){this.transform.pivot.copyFrom(t)}get skew(){return this.transform.skew}set skew(t){this.transform.skew.copyFrom(t)}get rotation(){return this.transform.rotation}set rotation(t){this.transform.rotation=t}get angle(){return this.transform.rotation*pw}set angle(t){this.transform.rotation=t*fs}get zIndex(){return this._zIndex}set zIndex(t){this._zIndex=t,this.parent&&(this.parent.sortDirty=!0)}get worldVisible(){let t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0}get mask(){return this._mask}set mask(t){if(this._mask!==t){if(this._mask){const r=this._mask.isMaskData?this._mask.maskObject:this._mask;r&&(r._maskRefCount--,r._maskRefCount===0&&(r.renderable=!0,r.isMask=!1))}if(this._mask=t,this._mask){const r=this._mask.isMaskData?this._mask.maskObject:this._mask;r&&(r._maskRefCount===0&&(r.renderable=!1,r.isMask=!0),r._maskRefCount++)}}}}class t2 extends Ai{constructor(){super(...arguments),this.sortDirty=null}}Ai.prototype.displayObjectUpdateTransform=Ai.prototype.updateTransform;const e2=new $e;function r2(e,t){return e.zIndex===t.zIndex?e._lastSortedIndex-t._lastSortedIndex:e.zIndex-t.zIndex}const Cu=class extends Ai{constructor(){super(),this.children=[],this.sortableChildren=Cu.defaultSortableChildren,this.sortDirty=!1}onChildrenChange(e){}addChild(...e){if(e.length>1)for(let t=0;t<e.length;t++)this.addChild(e[t]);else{const t=e[0];t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.push(t),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",t,this,this.children.length-1),t.emit("added",this)}return e[0]}addChildAt(e,t){if(t<0||t>this.children.length)throw new Error(`${e}addChildAt: The index ${t} supplied is out of bounds ${this.children.length}`);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(t,0,e),this._boundsID++,this.onChildrenChange(t),e.emit("added",this),this.emit("childAdded",e,this,t),e}swapChildren(e,t){if(e===t)return;const r=this.getChildIndex(e),n=this.getChildIndex(t);this.children[r]=t,this.children[n]=e,this.onChildrenChange(r<n?r:n)}getChildIndex(e){const t=this.children.indexOf(e);if(t===-1)throw new Error("The supplied DisplayObject must be a child of the caller");return t}setChildIndex(e,t){if(t<0||t>=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);const r=this.getChildIndex(e);fo(this.children,r,1),this.children.splice(t,0,e),this.onChildrenChange(t)}getChildAt(e){if(e<0||e>=this.children.length)throw new Error(`getChildAt: Index (${e}) does not exist.`);return this.children[e]}removeChild(...e){if(e.length>1)for(let t=0;t<e.length;t++)this.removeChild(e[t]);else{const t=e[0],r=this.children.indexOf(t);if(r===-1)return null;t.parent=null,t.transform._parentID=-1,fo(this.children,r,1),this._boundsID++,this.onChildrenChange(r),t.emit("removed",this),this.emit("childRemoved",t,this,r)}return e[0]}removeChildAt(e){const t=this.getChildAt(e);return t.parent=null,t.transform._parentID=-1,fo(this.children,e,1),this._boundsID++,this.onChildrenChange(e),t.emit("removed",this),this.emit("childRemoved",t,this,e),t}removeChildren(e=0,t=this.children.length){const r=e,n=t,i=n-r;let o;if(i>0&&i<=n){o=this.children.splice(r,i);for(let a=0;a<o.length;++a)o[a].parent=null,o[a].transform&&(o[a].transform._parentID=-1);this._boundsID++,this.onChildrenChange(e);for(let a=0;a<o.length;++a)o[a].emit("removed",this),this.emit("childRemoved",o[a],this,a);return o}else if(i===0&&this.children.length===0)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")}sortChildren(){let e=!1;for(let t=0,r=this.children.length;t<r;++t){const n=this.children[t];n._lastSortedIndex=t,!e&&n.zIndex!==0&&(e=!0)}e&&this.children.length>1&&this.children.sort(r2),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let e=0,t=this.children.length;e<t;++e){const r=this.children[e];r.visible&&r.updateTransform()}}calculateBounds(){this._bounds.clear(),this._calculateBounds();for(let e=0;e<this.children.length;e++){const t=this.children[e];if(!(!t.visible||!t.renderable))if(t.calculateBounds(),t._mask){const r=t._mask.isMaskData?t._mask.maskObject:t._mask;r?(r.calculateBounds(),this._bounds.addBoundsMask(t._bounds,r._bounds)):this._bounds.addBounds(t._bounds)}else t.filterArea?this._bounds.addBoundsArea(t._bounds,t.filterArea):this._bounds.addBounds(t._bounds)}this._bounds.updateID=this._boundsID}getLocalBounds(e,t=!1){const r=super.getLocalBounds(e);if(!t)for(let n=0,i=this.children.length;n<i;++n){const o=this.children[n];o.visible&&o.updateTransform()}return r}_calculateBounds(){}_renderWithCulling(e){const t=e.renderTexture.sourceFrame;if(!(t.width>0&&t.height>0))return;let r,n;this.cullArea?(r=this.cullArea,n=this.worldTransform):this._render!==Cu.prototype._render&&(r=this.getBounds(!0));const i=e.projection.transform;if(i&&(n?(n=e2.copyFrom(n),n.prepend(i)):n=i),r&&t.intersects(r,n))this._render(e);else if(this.cullArea)return;for(let o=0,a=this.children.length;o<a;++o){const u=this.children[o],f=u.cullable;u.cullable=f||!this.cullArea,u.render(e),u.cullable=f}}render(e){var t;if(!(!this.visible||this.worldAlpha<=0||!this.renderable))if(this._mask||(t=this.filters)!=null&&t.length)this.renderAdvanced(e);else if(this.cullable)this._renderWithCulling(e);else{this._render(e);for(let r=0,n=this.children.length;r<n;++r)this.children[r].render(e)}}renderAdvanced(e){var i,o,a;const t=this.filters,r=this._mask;if(t){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(let u=0;u<t.length;u++)t[u].enabled&&this._enabledFilters.push(t[u])}const n=t&&((i=this._enabledFilters)==null?void 0:i.length)||r&&(!r.isMaskData||r.enabled&&(r.autoDetect||r.type!==Ee.NONE));if(n&&e.batch.flush(),t&&((o=this._enabledFilters)!=null&&o.length)&&e.filter.push(this,this._enabledFilters),r&&e.mask.push(this,this._mask),this.cullable)this._renderWithCulling(e);else{this._render(e);for(let u=0,f=this.children.length;u<f;++u)this.children[u].render(e)}n&&e.batch.flush(),r&&e.mask.pop(this),t&&((a=this._enabledFilters)!=null&&a.length)&&e.filter.pop()}_render(e){}destroy(e){super.destroy(),this.sortDirty=!1;const t=typeof e=="boolean"?e:e==null?void 0:e.children,r=this.removeChildren(0,this.children.length);if(t)for(let n=0;n<r.length;++n)r[n].destroy(e)}get width(){return this.scale.x*this.getLocalBounds().width}set width(e){const t=this.getLocalBounds().width;t!==0?this.scale.x=e/t:this.scale.x=1,this._width=e}get height(){return this.scale.y*this.getLocalBounds().height}set height(e){const t=this.getLocalBounds().height;t!==0?this.scale.y=e/t:this.scale.y=1,this._height=e}};let Oi=Cu;Oi.defaultSortableChildren=!1,Oi.prototype.containerUpdateTransform=Oi.prototype.updateTransform,Object.defineProperties(Dt,{SORTABLE_CHILDREN:{get(){return Oi.defaultSortableChildren},set(e){zt("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),Oi.defaultSortableChildren=e}}});class Bo{constructor(t,r=null,n=null,i=null){this.points=[],this.holes=[],this.shape=t,this.lineStyle=n,this.fillStyle=r,this.matrix=i,this.type=t.type}clone(){return new Bo(this.shape,this.fillStyle,this.lineStyle,this.matrix)}destroy(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null}}const Ci=new se,Tp=class extends ed{constructor(){super(),this.closePointEps=1e-4,this.boundsPadding=0,this.uvsFloat32=null,this.indicesUint16=null,this.batchable=!1,this.points=[],this.colors=[],this.uvs=[],this.indices=[],this.textureIds=[],this.graphicsData=[],this.drawCalls=[],this.batchDirty=-1,this.batches=[],this.dirty=0,this.cacheDirty=-1,this.clearDirty=0,this.shapeIndex=0,this._bounds=new Ou,this.boundsDirty=-1}get bounds(){return this.updateBatches(),this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds}invalidate(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(let e=0;e<this.drawCalls.length;e++)this.drawCalls[e].texArray.clear(),Fo.push(this.drawCalls[e]);this.drawCalls.length=0;for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t.reset(),wp.push(t)}this.batches.length=0}clear(){return this.graphicsData.length>0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(e,t=null,r=null,n=null){const i=new Bo(e,t,r,n);return this.graphicsData.push(i),this.dirty++,this}drawHole(e,t=null){if(!this.graphicsData.length)return null;const r=new Bo(e,null,null,t),n=this.graphicsData[this.graphicsData.length-1];return r.lineStyle=n.lineStyle,n.holes.push(r),this.dirty++,this}destroy(){super.destroy();for(let e=0;e<this.graphicsData.length;++e)this.graphicsData[e].destroy();this.points.length=0,this.points=null,this.colors.length=0,this.colors=null,this.uvs.length=0,this.uvs=null,this.indices.length=0,this.indices=null,this.indexBuffer.destroy(),this.indexBuffer=null,this.graphicsData.length=0,this.graphicsData=null,this.drawCalls.length=0,this.drawCalls=null,this.batches.length=0,this.batches=null,this._bounds=null}containsPoint(e){const t=this.graphicsData;for(let r=0;r<t.length;++r){const n=t[r];if(n.fillStyle.visible&&n.shape&&(n.matrix?n.matrix.applyInverse(e,Ci):Ci.copyFrom(e),n.shape.contains(Ci.x,Ci.y))){let i=!1;if(n.holes){for(let o=0;o<n.holes.length;o++)if(n.holes[o].shape.contains(Ci.x,Ci.y)){i=!0;break}}if(!i)return!0}}return!1}updateBatches(){if(!this.graphicsData.length){this.batchable=!0;return}if(!this.validateBatching())return;this.cacheDirty=this.dirty;const e=this.uvs,t=this.graphicsData;let r=null,n=null;this.batches.length>0&&(r=this.batches[this.batches.length-1],n=r.style);for(let u=this.shapeIndex;u<t.length;u++){this.shapeIndex++;const f=t[u],h=f.fillStyle,d=f.lineStyle;Au[f.type].build(f),f.matrix&&this.transformPoints(f.points,f.matrix),(h.visible||d.visible)&&this.processHoles(f.holes);for(let c=0;c<2;c++){const v=c===0?h:d;if(!v.visible)continue;const y=v.texture.baseTexture,b=this.indices.length,_=this.points.length/2;y.wrapMode=Qi.REPEAT,c===0?this.processFill(f):this.processLine(f);const m=this.points.length/2-_;m!==0&&(r&&!this._compareStyles(n,v)&&(r.end(b,_),r=null),r||(r=wp.pop()||new ZE,r.begin(v,b,_),this.batches.push(r),n=v),this.addUvs(this.points,e,v.texture,_,m,v.matrix))}}const i=this.indices.length,o=this.points.length/2;if(r&&r.end(i,o),this.batches.length===0){this.batchable=!0;return}const a=o>65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&a===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=a?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(e,t){return!(!e||!t||e.texture.baseTexture!==t.texture.baseTexture||e.color+e.alpha!==t.color+t.alpha||!!e.native!=!!t.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let e=0,t=this.graphicsData.length;e<t;e++){const r=this.graphicsData[e],n=r.fillStyle,i=r.lineStyle;if(n&&!n.texture.baseTexture.valid||i&&!i.texture.baseTexture.valid)return!1}return!0}packBatches(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);const e=this.batches;for(let t=0,r=e.length;t<r;t++){const n=e[t];for(let i=0;i<n.size;i++){const o=n.start+i;this.indicesUint16[o]=this.indicesUint16[o]-n.attribStart}}}isBatchable(){if(this.points.length>65535*2)return!1;const e=this.batches;for(let t=0;t<e.length;t++)if(e[t].style.native)return!1;return this.points.length<Tp.BATCHABLE_SIZE*2}buildDrawCalls(){let e=++Kt._globalBatch;for(let d=0;d<this.drawCalls.length;d++)this.drawCalls[d].texArray.clear(),Fo.push(this.drawCalls[d]);this.drawCalls.length=0;const t=this.colors,r=this.textureIds;let n=Fo.pop();n||(n=new eu,n.texArray=new au),n.texArray.count=0,n.start=0,n.size=0,n.type=an.TRIANGLES;let i=0,o=null,a=0,u=!1,f=an.TRIANGLES,h=0;this.drawCalls.push(n);for(let d=0;d<this.batches.length;d++){const p=this.batches[d],c=8,v=p.style,y=v.texture.baseTexture;u!==!!v.native&&(u=!!v.native,f=u?an.LINES:an.TRIANGLES,o=null,i=c,e++),o!==y&&(o=y,y._batchEnabled!==e&&(i===c&&(e++,i=0,n.size>0&&(n=Fo.pop(),n||(n=new eu,n.texArray=new au),this.drawCalls.push(n)),n.start=h,n.size=0,n.texArray.count=0,n.type=f),y.touched=1,y._batchEnabled=e,y._batchLocation=i,y.wrapMode=Qi.REPEAT,n.texArray.elements[n.texArray.count++]=y,i++)),n.size+=p.size,h+=p.size,a=y._batchLocation,this.addColors(t,v.color,v.alpha,p.attribSize,p.attribStart),this.addTextureIds(r,a,p.attribSize,p.attribStart)}Kt._globalBatch=e,this.packAttributes()}packAttributes(){const e=this.points,t=this.uvs,r=this.colors,n=this.textureIds,i=new ArrayBuffer(e.length*3*4),o=new Float32Array(i),a=new Uint32Array(i);let u=0;for(let f=0;f<e.length/2;f++)o[u++]=e[f*2],o[u++]=e[f*2+1],o[u++]=t[f*2],o[u++]=t[f*2+1],a[u++]=r[f],o[u++]=n[f];this._buffer.update(i),this._indexBuffer.update(this.indicesUint16)}processFill(e){e.holes.length?yp.triangulate(e,this):Au[e.type].triangulate(e,this)}processLine(e){xp(e,this);for(let t=0;t<e.holes.length;t++)xp(e.holes[t],this)}processHoles(e){for(let t=0;t<e.length;t++){const r=e[t];Au[r.type].build(r),r.matrix&&this.transformPoints(r.points,r.matrix)}}calculateBounds(){const e=this._bounds;e.clear(),e.addVertexData(this.points,0,this.points.length),e.pad(this.boundsPadding,this.boundsPadding)}transformPoints(e,t){for(let r=0;r<e.length/2;r++){const n=e[r*2],i=e[r*2+1];e[r*2]=t.a*n+t.c*i+t.tx,e[r*2+1]=t.b*n+t.d*i+t.ty}}addColors(e,t,r,n,i=0){const o=Be.shared.setValue(t).toLittleEndianNumber(),a=Be.shared.setValue(o).toPremultiplied(r);e.length=Math.max(e.length,i+n);for(let u=0;u<n;u++)e[i+u]=a}addTextureIds(e,t,r,n=0){e.length=Math.max(e.length,n+r);for(let i=0;i<r;i++)e[n+i]=t}addUvs(e,t,r,n,i,o=null){let a=0;const u=t.length,f=r.frame;for(;a<i;){let d=e[(n+a)*2],p=e[(n+a)*2+1];if(o){const c=o.a*d+o.c*p+o.tx;p=o.b*d+o.d*p+o.ty,d=c}a++,t.push(d/f.width,p/f.height)}const h=r.baseTexture;(f.width<h.width||f.height<h.height)&&this.adjustUvs(t,r,u,i)}adjustUvs(e,t,r,n){const i=t.baseTexture,o=1e-6,a=r+n*2,u=t.frame,f=u.width/i.width,h=u.height/i.height;let d=u.x/u.width,p=u.y/u.height,c=Math.floor(e[r]+o),v=Math.floor(e[r+1]+o);for(let y=r+2;y<a;y+=2)c=Math.min(c,Math.floor(e[y]+o)),v=Math.min(v,Math.floor(e[y+1]+o));d-=c,p-=v;for(let y=r;y<a;y+=2)e[y]=(e[y]+d)*f,e[y+1]=(e[y+1]+p)*h}};let Ep=Tp;Ep.BATCHABLE_SIZE=100;class Do{constructor(){this.color=16777215,this.alpha=1,this.texture=Wt.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){const t=new Do;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t}reset(){this.color=16777215,this.alpha=1,this.texture=Wt.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class Ru extends Do{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=jn.BUTT,this.join=Sr.MITER,this.miterLimit=10}clone(){const t=new Ru;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t.width=this.width,t.alignment=this.alignment,t.native=this.native,t.cap=this.cap,t.join=this.join,t.miterLimit=this.miterLimit,t}reset(){super.reset(),this.color=0,this.alignment=.5,this.width=0,this.native=!1}}const Iu={},Uo=class extends Oi{constructor(e=null){super(),this.shader=null,this.pluginName="batch",this.currentPath=null,this.batches=[],this.batchTint=-1,this.batchDirty=-1,this.vertexData=null,this._fillStyle=new Do,this._lineStyle=new Ru,this._matrix=null,this._holeMode=!1,this.state=ho.for2d(),this._geometry=e||new Ep,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Be(16777215),this.blendMode=Rt.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new Uo(this._geometry)}set blendMode(e){this.state.blendMode=e}get blendMode(){return this.state.blendMode}get tint(){return this._tintColor.value}set tint(e){this._tintColor.setValue(e)}get fill(){return this._fillStyle}get line(){return this._lineStyle}lineStyle(e=null,t=0,r,n=.5,i=!1){return typeof e=="number"&&(e={width:e,color:t,alpha:r,alignment:n,native:i}),this.lineTextureStyle(e)}lineTextureStyle(e){const t={width:0,texture:Wt.WHITE,color:e!=null&&e.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:jn.BUTT,join:Sr.MITER,miterLimit:10};e=Object.assign(t,e),this.normalizeColor(e),this.currentPath&&this.startPoly();const r=e.width>0&&e.alpha>0;return r?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:r},e)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const e=this.currentPath.points,t=this.currentPath.points.length;t>2&&(this.drawShape(this.currentPath),this.currentPath=new cs,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new cs,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(e,t){return this.startPoly(),this.currentPath.points[0]=e,this.currentPath.points[1]=t,this}lineTo(e,t){this.currentPath||this.moveTo(0,0);const r=this.currentPath.points,n=r[r.length-2],i=r[r.length-1];return(n!==e||i!==t)&&r.push(e,t),this}_initCurve(e=0,t=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[e,t]):this.moveTo(e,t)}quadraticCurveTo(e,t,r,n){this._initCurve();const i=this.currentPath.points;return i.length===0&&this.moveTo(0,0),Su.curveTo(e,t,r,n,i),this}bezierCurveTo(e,t,r,n,i,o){return this._initCurve(),Eu.curveTo(e,t,r,n,i,o,this.currentPath.points),this}arcTo(e,t,r,n,i){this._initCurve(e,t);const o=this.currentPath.points,a=_p.curveTo(e,t,r,n,i,o);if(a){const{cx:u,cy:f,radius:h,startAngle:d,endAngle:p,anticlockwise:c}=a;this.arc(u,f,h,d,p,c)}return this}arc(e,t,r,n,i,o=!1){if(n===i)return this;if(!o&&i<=n?i+=vo:o&&n<=i&&(n+=vo),i-n===0)return this;const u=e+Math.cos(n)*r,f=t+Math.sin(n)*r,h=this._geometry.closePointEps;let d=this.currentPath?this.currentPath.points:null;if(d){const p=Math.abs(d[d.length-2]-u),c=Math.abs(d[d.length-1]-f);p<h&&c<h||d.push(u,f)}else this.moveTo(u,f),d=this.currentPath.points;return _p.arc(u,f,e,t,r,n,i,o,d),this}beginFill(e=0,t){return this.beginTextureFill({texture:Wt.WHITE,color:e,alpha:t})}normalizeColor(e){const t=Be.shared.setValue(e.color??0);e.color=t.toNumber(),e.alpha??(e.alpha=t.alpha)}beginTextureFill(e){const t={texture:Wt.WHITE,color:16777215,matrix:null};e=Object.assign(t,e),this.normalizeColor(e),this.currentPath&&this.startPoly();const r=e.alpha>0;return r?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._fillStyle,{visible:r},e)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(e,t,r,n){return this.drawShape(new ne(e,t,r,n))}drawRoundedRect(e,t,r,n,i){return this.drawShape(new nu(e,t,r,n,i))}drawCircle(e,t,r){return this.drawShape(new ru(e,t,r))}drawEllipse(e,t,r,n){return this.drawShape(new vw(e,t,r,n))}drawPolygon(...e){let t,r=!0;const n=e[0];n.points?(r=n.closeStroke,t=n.points):Array.isArray(e[0])?t=e[0]:t=e;const i=new cs(t);return i.closeStroke=r,this.drawShape(i),this}drawShape(e){return this._holeMode?this._geometry.drawHole(e,this._matrix):this._geometry.drawShape(e,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const e=this._geometry.graphicsData;return e.length===1&&e[0].shape.type===Ne.RECT&&!e[0].matrix&&!e[0].holes.length&&!(e[0].lineStyle.visible&&e[0].lineStyle.width)}_render(e){this.finishPoly();const t=this._geometry;t.updateBatches(),t.batchable?(this.batchDirty!==t.batchDirty&&this._populateBatches(),this._renderBatched(e)):(e.batch.flush(),this._renderDirect(e))}_populateBatches(){const e=this._geometry,t=this.blendMode,r=e.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=e.batchDirty,this.batches.length=r,this.vertexData=new Float32Array(e.points);for(let n=0;n<r;n++){const i=e.batches[n],o=i.style.color,a=new Float32Array(this.vertexData.buffer,i.attribStart*4*2,i.attribSize*2),u=new Float32Array(e.uvsFloat32.buffer,i.attribStart*4*2,i.attribSize*2),f=new Uint16Array(e.indicesUint16.buffer,i.start*2,i.size),h={vertexData:a,blendMode:t,indices:f,uvs:u,_batchRGB:Be.shared.setValue(o).toRgbArray(),_tintRGB:o,_texture:i.style.texture,alpha:i.style.alpha,worldAlpha:1};this.batches[n]=h}}_renderBatched(e){if(this.batches.length){e.batch.setObjectRenderer(e.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(let t=0,r=this.batches.length;t<r;t++){const n=this.batches[t];n.worldAlpha=this.worldAlpha*n.alpha,e.plugins[this.pluginName].render(n)}}}_renderDirect(e){const t=this._resolveDirectShader(e),r=this._geometry,n=this.worldAlpha,i=t.uniforms,o=r.drawCalls;i.translationMatrix=this.transform.worldTransform,Be.shared.setValue(this._tintColor).premultiply(n).toArray(i.tint),e.shader.bind(t),e.geometry.bind(r,t),e.state.set(this.state);for(let a=0,u=o.length;a<u;a++)this._renderDrawCallDirect(e,r.drawCalls[a])}_renderDrawCallDirect(e,t){const{texArray:r,type:n,size:i,start:o}=t,a=r.count;for(let u=0;u<a;u++)e.texture.bind(r.elements[u],u);e.geometry.draw(n,i,o)}_resolveDirectShader(e){let t=this.shader;const r=this.pluginName;if(!t){if(!Iu[r]){const{maxTextures:n}=e.plugins[r],i=new Int32Array(n);for(let u=0;u<n;u++)i[u]=u;const o={tint:new Float32Array([1,1,1,1]),translationMatrix:new $e,default:br.from({uSamplers:i},!0)},a=e.plugins[r]._shader.program;Iu[r]=new ds(a,o)}t=Iu[r]}return t}_calculateBounds(){this.finishPoly();const e=this._geometry;if(!e.graphicsData.length)return;const{minX:t,minY:r,maxX:n,maxY:i}=e.bounds;this._bounds.addFrame(this.transform,t,r,n,i)}containsPoint(e){return this.worldTransform.applyInverse(e,Uo._TEMP_POINT),this._geometry.containsPoint(Uo._TEMP_POINT)}calculateTints(){if(this.batchTint!==this.tint){this.batchTint=this._tintColor.toNumber();for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t._tintRGB=Be.shared.setValue(this._tintColor).multiply(t._batchRGB).toLittleEndianNumber()}}}calculateVertices(){const e=this.transform._worldID;if(this._transformID===e)return;this._transformID=e;const t=this.transform.worldTransform,r=t.a,n=t.b,i=t.c,o=t.d,a=t.tx,u=t.ty,f=this._geometry.points,h=this.vertexData;let d=0;for(let p=0;p<f.length;p+=2){const c=f[p],v=f[p+1];h[d++]=r*c+i*v+a,h[d++]=o*v+n*c+u}}closePath(){const e=this.currentPath;return e&&(e.closeStroke=!0,this.finishPoly()),this}setMatrix(e){return this._matrix=e,this}beginHole(){return this.finishPoly(),this._holeMode=!0,this}endHole(){return this.finishPoly(),this._holeMode=!1,this}destroy(e){this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose(),this._matrix=null,this.currentPath=null,this._lineStyle.destroy(),this._lineStyle=null,this._fillStyle.destroy(),this._fillStyle=null,this._geometry=null,this.shader=null,this.vertexData=null,this.batches.length=0,this.batches=null,super.destroy(e)}};let Pu=Uo;Pu.curves=Si,Pu._TEMP_POINT=new se;var n2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Nu={},i2={get exports(){return Nu},set exports(e){Nu=e}};/*!
1923
+ `),t=[.393,.769,.189,.349,.686,.168,.272,.534,.131];return e.uniforms.uNightVisionMatrix=t,{nightVisionFilter:e}},gp=Et.forwardRef((e,t)=>{const r=mt.useRef(null),n=mt.useRef(null),{src:i,visible:o,transformation:{x:a,y:u,width:f,height:h,anchor:d,colorCorrection:p={},effect:c},pointerdown:v}=e;console.log("PixiImageSprite props",e);const{blurRadius:y=0}=p,{temperatureFilter:_,sharpnessFilter:b,hueFilter:m,blurFilter:w,adjustmentFilter:T}=_s(p),{nightVisionFilter:x}=XE();return Et.useEffect(()=>()=>{console.log("PixiImageSprite unmounting")},[]),Vt.jsx(ni,{...e,ref:t,children:Vt.jsx(le.Container,{ref:n,children:Vt.jsx(le.Sprite,{image:i,width:f,height:h,anchor:d,ref:r,alpha:o?1:0,x:a,y:u,...o&&{interactive:!0,pointerdown:v},filters:[_,b,m,T,...y>0?[w]:[],...c===Sn.NightVision?[x]:[]]})})})});gp.whyDidYouRender={logOnDifferentValues:!0,customName:"ImageSprite"};const Fo={build(e){const t=e.points;let r,n,i,o,a,u;if(e.type===Ne.CIRC){const y=e.shape;r=y.x,n=y.y,a=u=y.radius,i=o=0}else if(e.type===Ne.ELIP){const y=e.shape;r=y.x,n=y.y,a=y.width,u=y.height,i=o=0}else{const y=e.shape,_=y.width/2,b=y.height/2;r=y.x+_,n=y.y+b,a=u=Math.max(0,Math.min(y.radius,Math.min(_,b))),i=_-a,o=b-u}if(!(a>=0&&u>=0&&i>=0&&o>=0)){t.length=0;return}const f=Math.ceil(2.3*Math.sqrt(a+u)),h=f*8+(i?4:0)+(o?4:0);if(t.length=h,h===0)return;if(f===0){t.length=8,t[0]=t[6]=r+i,t[1]=t[3]=n+o,t[2]=t[4]=r-i,t[5]=t[7]=n-o;return}let d=0,p=f*4+(i?2:0)+2,c=p,v=h;{const y=i+a,_=o,b=r+y,m=r-y,w=n+_;if(t[d++]=b,t[d++]=w,t[--p]=w,t[--p]=m,o){const T=n-_;t[c++]=m,t[c++]=T,t[--v]=T,t[--v]=b}}for(let y=1;y<f;y++){const _=Math.PI/2*(y/f),b=i+Math.cos(_)*a,m=o+Math.sin(_)*u,w=r+b,T=r-b,x=n+m,E=n-m;t[d++]=w,t[d++]=x,t[--p]=x,t[--p]=T,t[c++]=T,t[c++]=E,t[--v]=E,t[--v]=w}{const y=i,_=o+u,b=r+y,m=r-y,w=n+_,T=n-_;t[d++]=b,t[d++]=w,t[--v]=T,t[--v]=b,i&&(t[d++]=m,t[d++]=w,t[--v]=T,t[--v]=m)}},triangulate(e,t){const r=e.points,n=t.points,i=t.indices;if(r.length===0)return;let o=n.length/2;const a=o;let u,f;if(e.type!==Ne.RREC){const d=e.shape;u=d.x,f=d.y}else{const d=e.shape;u=d.x+d.width/2,f=d.y+d.height/2}const h=e.matrix;n.push(e.matrix?h.a*u+h.c*f+h.tx:u,e.matrix?h.b*u+h.d*f+h.ty:f),o++,n.push(r[0],r[1]);for(let d=2;d<r.length;d+=2)n.push(r[d],r[d+1]),i.push(o++,a,o);i.push(a+1,a,o)}};function mp(e,t=!1){const r=e.length;if(r<6)return;let n=0;for(let i=0,o=e[r-2],a=e[r-1];i<r;i+=2){const u=e[i],f=e[i+1];n+=(u-o)*(f+a),o=u,a=f}if(!t&&n>0||t&&n<=0){const i=r/2;for(let o=i+i%2;o<r;o+=2){const a=r-o-2,u=r-o-1,f=o,h=o+1;[e[a],e[f]]=[e[f],e[a]],[e[u],e[h]]=[e[h],e[u]]}}}const yp={build(e){e.points=e.shape.points.slice()},triangulate(e,t){let r=e.points;const n=e.holes,i=t.points,o=t.indices;if(r.length>=6){mp(r,!1);const a=[];for(let h=0;h<n.length;h++){const d=n[h];mp(d.points,!0),a.push(r.length/2),r=r.concat(d.points)}const u=k_(r,a,2);if(!u)return;const f=i.length/2;for(let h=0;h<u.length;h+=3)o.push(u[h]+f),o.push(u[h+1]+f),o.push(u[h+2]+f);for(let h=0;h<r.length;h++)i.push(r[h])}}},KE={build(e){const t=e.shape,r=t.x,n=t.y,i=t.width,o=t.height,a=e.points;a.length=0,i>=0&&o>=0&&a.push(r,n,r+i,n,r+i,n+o,r,n+o)},triangulate(e,t){const r=e.points,n=t.points;if(r.length===0)return;const i=n.length/2;n.push(r[0],r[1],r[2],r[3],r[6],r[7],r[4],r[5]),t.indices.push(i,i+1,i+2,i+1,i+2,i+3)}},YE={build(e){Fo.build(e)},triangulate(e,t){Fo.triangulate(e,t)}};var Sr=(e=>(e.MITER="miter",e.BEVEL="bevel",e.ROUND="round",e))(Sr||{}),jn=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))(jn||{});const Si={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(e,t=20){if(!this.adaptive||!e||isNaN(e))return t;let r=Math.ceil(e/this.maxLength);return r<this.minSegments?r=this.minSegments:r>this.maxSegments&&(r=this.maxSegments),r}};class _p{static curveTo(t,r,n,i,o,a){const u=a[a.length-2],h=a[a.length-1]-r,d=u-t,p=i-r,c=n-t,v=Math.abs(h*c-d*p);if(v<1e-8||o===0)return(a[a.length-2]!==t||a[a.length-1]!==r)&&a.push(t,r),null;const y=h*h+d*d,_=p*p+c*c,b=h*p+d*c,m=o*Math.sqrt(y)/v,w=o*Math.sqrt(_)/v,T=m*b/y,x=w*b/_,E=m*c+w*d,I=m*p+w*h,O=d*(w+T),A=h*(w+T),L=c*(m+x),R=p*(m+x),C=Math.atan2(A-I,O-E),P=Math.atan2(R-I,L-E);return{cx:E+t,cy:I+r,radius:o,startAngle:C,endAngle:P,anticlockwise:d*p>c*h}}static arc(t,r,n,i,o,a,u,f,h){const d=u-a,p=Si._segmentsCount(Math.abs(d)*o,Math.ceil(Math.abs(d)/go)*40),c=d/(p*2),v=c*2,y=Math.cos(c),_=Math.sin(c),b=p-1,m=b%1/b;for(let w=0;w<=b;++w){const T=w+m*w,x=c+a+v*T,E=Math.cos(x),I=-Math.sin(x);h.push((y*E+_*I)*o+n,(y*-I+_*E)*o+i)}}}class ZE{constructor(){this.reset()}begin(t,r,n){this.reset(),this.style=t,this.start=r,this.attribStart=n}end(t,r){this.attribSize=r-this.attribStart,this.size=t-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}}class Su{static curveLength(t,r,n,i,o,a,u,f){let d=0,p=0,c=0,v=0,y=0,_=0,b=0,m=0,w=0,T=0,x=0,E=t,I=r;for(let O=1;O<=10;++O)p=O/10,c=p*p,v=c*p,y=1-p,_=y*y,b=_*y,m=b*t+3*_*p*n+3*y*c*o+v*u,w=b*r+3*_*p*i+3*y*c*a+v*f,T=E-m,x=I-w,E=m,I=w,d+=Math.sqrt(T*T+x*x);return d}static curveTo(t,r,n,i,o,a,u){const f=u[u.length-2],h=u[u.length-1];u.length-=2;const d=Si._segmentsCount(Su.curveLength(f,h,t,r,n,i,o,a));let p=0,c=0,v=0,y=0,_=0;u.push(f,h);for(let b=1,m=0;b<=d;++b)m=b/d,p=1-m,c=p*p,v=c*p,y=m*m,_=y*m,u.push(v*f+3*c*m*t+3*p*y*n+_*o,v*h+3*c*m*r+3*p*y*i+_*a)}}function bp(e,t,r,n,i,o,a,u){const f=e-r*i,h=t-n*i,d=e+r*o,p=t+n*o;let c,v;a?(c=n,v=-r):(c=-n,v=r);const y=f+c,_=h+v,b=d+c,m=p+v;return u.push(y,_,b,m),2}function qn(e,t,r,n,i,o,a,u){const f=r-e,h=n-t;let d=Math.atan2(f,h),p=Math.atan2(i-e,o-t);u&&d<p?d+=Math.PI*2:!u&&d>p&&(p+=Math.PI*2);let c=d;const v=p-d,y=Math.abs(v),_=Math.sqrt(f*f+h*h),b=(15*y*Math.sqrt(_)/Math.PI>>0)+1,m=v/b;if(c+=m,u){a.push(e,t,r,n);for(let w=1,T=c;w<b;w++,T+=m)a.push(e,t,e+Math.sin(T)*_,t+Math.cos(T)*_);a.push(e,t,i,o)}else{a.push(r,n,e,t);for(let w=1,T=c;w<b;w++,T+=m)a.push(e+Math.sin(T)*_,t+Math.cos(T)*_,e,t);a.push(i,o,e,t)}return b*2}function QE(e,t){const r=e.shape;let n=e.points||r.points.slice();const i=t.closePointEps;if(n.length===0)return;const o=e.lineStyle,a=new oe(n[0],n[1]),u=new oe(n[n.length-2],n[n.length-1]),f=r.type!==Ne.POLY||r.closeStroke,h=Math.abs(a.x-u.x)<i&&Math.abs(a.y-u.y)<i;if(f){n=n.slice(),h&&(n.pop(),n.pop(),u.set(n[n.length-2],n[n.length-1]));const z=(a.x+u.x)*.5,nt=(u.y+a.y)*.5;n.unshift(z,nt),n.push(z,nt)}const d=t.points,p=n.length/2;let c=n.length;const v=d.length/2,y=o.width/2,_=y*y,b=o.miterLimit*o.miterLimit;let m=n[0],w=n[1],T=n[2],x=n[3],E=0,I=0,O=-(w-x),A=m-T,L=0,R=0,C=Math.sqrt(O*O+A*A);O/=C,A/=C,O*=y,A*=y;const P=o.alignment,M=(1-P)*2,F=P*2;f||(o.cap===jn.ROUND?c+=qn(m-O*(M-F)*.5,w-A*(M-F)*.5,m-O*M,w-A*M,m+O*F,w+A*F,d,!0)+2:o.cap===jn.SQUARE&&(c+=bp(m,w,O,A,M,F,!0,d))),d.push(m-O*M,w-A*M,m+O*F,w+A*F);for(let z=1;z<p-1;++z){m=n[(z-1)*2],w=n[(z-1)*2+1],T=n[z*2],x=n[z*2+1],E=n[(z+1)*2],I=n[(z+1)*2+1],O=-(w-x),A=m-T,C=Math.sqrt(O*O+A*A),O/=C,A/=C,O*=y,A*=y,L=-(x-I),R=T-E,C=Math.sqrt(L*L+R*R),L/=C,R/=C,L*=y,R*=y;const nt=T-m,V=w-x,D=T-E,k=I-x,G=nt*D+V*k,j=V*D-k*nt,Q=j<0;if(Math.abs(j)<.001*Math.abs(G)){d.push(T-O*M,x-A*M,T+O*F,x+A*F),G>=0&&(o.join===Sr.ROUND?c+=qn(T,x,T-O*M,x-A*M,T-L*M,x-R*M,d,!1)+4:c+=2,d.push(T-L*F,x-R*F,T+L*M,x+R*M));continue}const K=(-O+m)*(-A+x)-(-O+T)*(-A+w),$=(-L+E)*(-R+x)-(-L+T)*(-R+I),W=(nt*$-D*K)/j,et=(k*K-V*$)/j,Y=(W-T)*(W-T)+(et-x)*(et-x),rt=T+(W-T)*M,ot=x+(et-x)*M,pt=T-(W-T)*F,vt=x-(et-x)*F,_t=Math.min(nt*nt+V*V,D*D+k*k),At=Q?M:F,ne=_t+At*At*_,Ut=Y<=ne;let it=o.join;if(it===Sr.MITER&&Y/_>b&&(it=Sr.BEVEL),Ut)switch(it){case Sr.MITER:{d.push(rt,ot,pt,vt);break}case Sr.BEVEL:{Q?d.push(rt,ot,T+O*F,x+A*F,rt,ot,T+L*F,x+R*F):d.push(T-O*M,x-A*M,pt,vt,T-L*M,x-R*M,pt,vt),c+=2;break}case Sr.ROUND:{Q?(d.push(rt,ot,T+O*F,x+A*F),c+=qn(T,x,T+O*F,x+A*F,T+L*F,x+R*F,d,!0)+4,d.push(rt,ot,T+L*F,x+R*F)):(d.push(T-O*M,x-A*M,pt,vt),c+=qn(T,x,T-O*M,x-A*M,T-L*M,x-R*M,d,!1)+4,d.push(T-L*M,x-R*M,pt,vt));break}}else{switch(d.push(T-O*M,x-A*M,T+O*F,x+A*F),it){case Sr.MITER:{Q?d.push(pt,vt,pt,vt):d.push(rt,ot,rt,ot),c+=2;break}case Sr.ROUND:{Q?c+=qn(T,x,T+O*F,x+A*F,T+L*F,x+R*F,d,!0)+2:c+=qn(T,x,T-O*M,x-A*M,T-L*M,x-R*M,d,!1)+2;break}}d.push(T-L*M,x-R*M,T+L*F,x+R*F),c+=2}}m=n[(p-2)*2],w=n[(p-2)*2+1],T=n[(p-1)*2],x=n[(p-1)*2+1],O=-(w-x),A=m-T,C=Math.sqrt(O*O+A*A),O/=C,A/=C,O*=y,A*=y,d.push(T-O*M,x-A*M,T+O*F,x+A*F),f||(o.cap===jn.ROUND?c+=qn(T-O*(M-F)*.5,x-A*(M-F)*.5,T-O*M,x-A*M,T+O*F,x+A*F,d,!1)+2:o.cap===jn.SQUARE&&(c+=bp(T,x,O,A,M,F,!1,d)));const q=t.indices,Z=Si.epsilon*Si.epsilon;for(let z=v;z<c+v-2;++z)m=d[z*2],w=d[z*2+1],T=d[(z+1)*2],x=d[(z+1)*2+1],E=d[(z+2)*2],I=d[(z+2)*2+1],!(Math.abs(m*(x-I)+T*(I-w)+E*(w-x))<Z)&&q.push(z,z+1,z+2)}function JE(e,t){let r=0;const n=e.shape,i=e.points||n.points,o=n.type!==Ne.POLY||n.closeStroke;if(i.length===0)return;const a=t.points,u=t.indices,f=i.length/2,h=a.length/2;let d=h;for(a.push(i[0],i[1]),r=1;r<f;r++)a.push(i[r*2],i[r*2+1]),u.push(d,d+1),d++;o&&u.push(d,h)}function xp(e,t){e.lineStyle.native?JE(e,t):QE(e,t)}class Au{static curveLength(t,r,n,i,o,a){const u=t-2*n+o,f=r-2*i+a,h=2*n-2*t,d=2*i-2*r,p=4*(u*u+f*f),c=4*(u*h+f*d),v=h*h+d*d,y=2*Math.sqrt(p+c+v),_=Math.sqrt(p),b=2*p*_,m=2*Math.sqrt(v),w=c/_;return(b*y+_*c*(y-m)+(4*v*p-c*c)*Math.log((2*_+w+y)/(w+m)))/(4*b)}static curveTo(t,r,n,i,o){const a=o[o.length-2],u=o[o.length-1],f=Si._segmentsCount(Au.curveLength(a,u,t,r,n,i));let h=0,d=0;for(let p=1;p<=f;++p){const c=p/f;h=a+(t-a)*c,d=u+(r-u)*c,o.push(h+(t+(n-t)*c-h)*c,d+(r+(i-r)*c-d)*c)}}}const Ou={[Ne.POLY]:yp,[Ne.CIRC]:Fo,[Ne.ELIP]:Fo,[Ne.RECT]:KE,[Ne.RREC]:YE},wp=[],Bo=[];class Cu{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(t){return this.minX>this.maxX||this.minY>this.maxY?ie.EMPTY:(t=t||new ie(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)}addPoint(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)}addPointMatrix(t,r){const{a:n,b:i,c:o,d:a,tx:u,ty:f}=t,h=n*r.x+o*r.y+u,d=i*r.x+a*r.y+f;this.minX=Math.min(this.minX,h),this.maxX=Math.max(this.maxX,h),this.minY=Math.min(this.minY,d),this.maxY=Math.max(this.maxY,d)}addQuad(t){let r=this.minX,n=this.minY,i=this.maxX,o=this.maxY,a=t[0],u=t[1];r=a<r?a:r,n=u<n?u:n,i=a>i?a:i,o=u>o?u:o,a=t[2],u=t[3],r=a<r?a:r,n=u<n?u:n,i=a>i?a:i,o=u>o?u:o,a=t[4],u=t[5],r=a<r?a:r,n=u<n?u:n,i=a>i?a:i,o=u>o?u:o,a=t[6],u=t[7],r=a<r?a:r,n=u<n?u:n,i=a>i?a:i,o=u>o?u:o,this.minX=r,this.minY=n,this.maxX=i,this.maxY=o}addFrame(t,r,n,i,o){this.addFrameMatrix(t.worldTransform,r,n,i,o)}addFrameMatrix(t,r,n,i,o){const a=t.a,u=t.b,f=t.c,h=t.d,d=t.tx,p=t.ty;let c=this.minX,v=this.minY,y=this.maxX,_=this.maxY,b=a*r+f*n+d,m=u*r+h*n+p;c=b<c?b:c,v=m<v?m:v,y=b>y?b:y,_=m>_?m:_,b=a*i+f*n+d,m=u*i+h*n+p,c=b<c?b:c,v=m<v?m:v,y=b>y?b:y,_=m>_?m:_,b=a*r+f*o+d,m=u*r+h*o+p,c=b<c?b:c,v=m<v?m:v,y=b>y?b:y,_=m>_?m:_,b=a*i+f*o+d,m=u*i+h*o+p,c=b<c?b:c,v=m<v?m:v,y=b>y?b:y,_=m>_?m:_,this.minX=c,this.minY=v,this.maxX=y,this.maxY=_}addVertexData(t,r,n){let i=this.minX,o=this.minY,a=this.maxX,u=this.maxY;for(let f=r;f<n;f+=2){const h=t[f],d=t[f+1];i=h<i?h:i,o=d<o?d:o,a=h>a?h:a,u=d>u?d:u}this.minX=i,this.minY=o,this.maxX=a,this.maxY=u}addVertices(t,r,n,i){this.addVerticesMatrix(t.worldTransform,r,n,i)}addVerticesMatrix(t,r,n,i,o=0,a=o){const u=t.a,f=t.b,h=t.c,d=t.d,p=t.tx,c=t.ty;let v=this.minX,y=this.minY,_=this.maxX,b=this.maxY;for(let m=n;m<i;m+=2){const w=r[m],T=r[m+1],x=u*w+h*T+p,E=d*T+f*w+c;v=Math.min(v,x-o),_=Math.max(_,x+o),y=Math.min(y,E-a),b=Math.max(b,E+a)}this.minX=v,this.minY=y,this.maxX=_,this.maxY=b}addBounds(t){const r=this.minX,n=this.minY,i=this.maxX,o=this.maxY;this.minX=t.minX<r?t.minX:r,this.minY=t.minY<n?t.minY:n,this.maxX=t.maxX>i?t.maxX:i,this.maxY=t.maxY>o?t.maxY:o}addBoundsMask(t,r){const n=t.minX>r.minX?t.minX:r.minX,i=t.minY>r.minY?t.minY:r.minY,o=t.maxX<r.maxX?t.maxX:r.maxX,a=t.maxY<r.maxY?t.maxY:r.maxY;if(n<=o&&i<=a){const u=this.minX,f=this.minY,h=this.maxX,d=this.maxY;this.minX=n<u?n:u,this.minY=i<f?i:f,this.maxX=o>h?o:h,this.maxY=a>d?a:d}}addBoundsMatrix(t,r){this.addFrameMatrix(r,t.minX,t.minY,t.maxX,t.maxY)}addBoundsArea(t,r){const n=t.minX>r.x?t.minX:r.x,i=t.minY>r.y?t.minY:r.y,o=t.maxX<r.x+r.width?t.maxX:r.x+r.width,a=t.maxY<r.y+r.height?t.maxY:r.y+r.height;if(n<=o&&i<=a){const u=this.minX,f=this.minY,h=this.maxX,d=this.maxY;this.minX=n<u?n:u,this.minY=i<f?i:f,this.maxX=o>h?o:h,this.maxY=a>d?a:d}}pad(t=0,r=t){this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=r,this.maxY+=r)}addFramePad(t,r,n,i,o,a){t-=o,r-=a,n+=o,i+=a,this.minX=this.minX<t?this.minX:t,this.maxX=this.maxX>n?this.maxX:n,this.minY=this.minY<r?this.minY:r,this.maxY=this.maxY>i?this.maxY:i}}class Ai extends Ws{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new ou,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new Cu,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(t){const r=Object.keys(t);for(let n=0;n<r.length;++n){const i=r[n];Object.defineProperty(Ai.prototype,i,Object.getOwnPropertyDescriptor(t,i))}}get destroyed(){return this._destroyed}_recursivePostUpdateTransform(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)}updateTransform(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha}getBounds(t,r){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),r||(this._boundsRect||(this._boundsRect=new ie),r=this._boundsRect),this._bounds.getRectangle(r)}getLocalBounds(t){t||(this._localBoundsRect||(this._localBoundsRect=new ie),t=this._localBoundsRect),this._localBounds||(this._localBounds=new Cu);const r=this.transform,n=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;const i=this._bounds,o=this._boundsID;this._bounds=this._localBounds;const a=this.getBounds(!1,t);return this.parent=n,this.transform=r,this._bounds=i,this._bounds.updateID+=this._boundsID-o,a}toGlobal(t,r,n=!1){return n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,r)}toLocal(t,r,n,i){return r&&(t=r.toGlobal(t,n,i)),i||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,n)}setParent(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t}removeFromParent(){var t;(t=this.parent)==null||t.removeChild(this)}setTransform(t=0,r=0,n=1,i=1,o=0,a=0,u=0,f=0,h=0){return this.position.x=t,this.position.y=r,this.scale.x=n||1,this.scale.y=i||1,this.rotation=o,this.skew.x=a,this.skew.y=u,this.pivot.x=f,this.pivot.y=h,this}destroy(t){this.removeFromParent(),this._destroyed=!0,this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.cullArea=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.eventMode="auto",this.interactiveChildren=!1,this.emit("destroyed"),this.removeAllListeners()}get _tempDisplayObjectParent(){return this.tempDisplayObjectParent===null&&(this.tempDisplayObjectParent=new t2),this.tempDisplayObjectParent}enableTempParent(){const t=this.parent;return this.parent=this._tempDisplayObjectParent,t}disableTempParent(t){this.parent=t}get x(){return this.position.x}set x(t){this.transform.position.x=t}get y(){return this.position.y}set y(t){this.transform.position.y=t}get worldTransform(){return this.transform.worldTransform}get localTransform(){return this.transform.localTransform}get position(){return this.transform.position}set position(t){this.transform.position.copyFrom(t)}get scale(){return this.transform.scale}set scale(t){this.transform.scale.copyFrom(t)}get pivot(){return this.transform.pivot}set pivot(t){this.transform.pivot.copyFrom(t)}get skew(){return this.transform.skew}set skew(t){this.transform.skew.copyFrom(t)}get rotation(){return this.transform.rotation}set rotation(t){this.transform.rotation=t}get angle(){return this.transform.rotation*pw}set angle(t){this.transform.rotation=t*cs}get zIndex(){return this._zIndex}set zIndex(t){this._zIndex=t,this.parent&&(this.parent.sortDirty=!0)}get worldVisible(){let t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0}get mask(){return this._mask}set mask(t){if(this._mask!==t){if(this._mask){const r=this._mask.isMaskData?this._mask.maskObject:this._mask;r&&(r._maskRefCount--,r._maskRefCount===0&&(r.renderable=!0,r.isMask=!1))}if(this._mask=t,this._mask){const r=this._mask.isMaskData?this._mask.maskObject:this._mask;r&&(r._maskRefCount===0&&(r.renderable=!1,r.isMask=!0),r._maskRefCount++)}}}}class t2 extends Ai{constructor(){super(...arguments),this.sortDirty=null}}Ai.prototype.displayObjectUpdateTransform=Ai.prototype.updateTransform;const e2=new $e;function r2(e,t){return e.zIndex===t.zIndex?e._lastSortedIndex-t._lastSortedIndex:e.zIndex-t.zIndex}const Ru=class extends Ai{constructor(){super(),this.children=[],this.sortableChildren=Ru.defaultSortableChildren,this.sortDirty=!1}onChildrenChange(e){}addChild(...e){if(e.length>1)for(let t=0;t<e.length;t++)this.addChild(e[t]);else{const t=e[0];t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.push(t),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",t,this,this.children.length-1),t.emit("added",this)}return e[0]}addChildAt(e,t){if(t<0||t>this.children.length)throw new Error(`${e}addChildAt: The index ${t} supplied is out of bounds ${this.children.length}`);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(t,0,e),this._boundsID++,this.onChildrenChange(t),e.emit("added",this),this.emit("childAdded",e,this,t),e}swapChildren(e,t){if(e===t)return;const r=this.getChildIndex(e),n=this.getChildIndex(t);this.children[r]=t,this.children[n]=e,this.onChildrenChange(r<n?r:n)}getChildIndex(e){const t=this.children.indexOf(e);if(t===-1)throw new Error("The supplied DisplayObject must be a child of the caller");return t}setChildIndex(e,t){if(t<0||t>=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);const r=this.getChildIndex(e);co(this.children,r,1),this.children.splice(t,0,e),this.onChildrenChange(t)}getChildAt(e){if(e<0||e>=this.children.length)throw new Error(`getChildAt: Index (${e}) does not exist.`);return this.children[e]}removeChild(...e){if(e.length>1)for(let t=0;t<e.length;t++)this.removeChild(e[t]);else{const t=e[0],r=this.children.indexOf(t);if(r===-1)return null;t.parent=null,t.transform._parentID=-1,co(this.children,r,1),this._boundsID++,this.onChildrenChange(r),t.emit("removed",this),this.emit("childRemoved",t,this,r)}return e[0]}removeChildAt(e){const t=this.getChildAt(e);return t.parent=null,t.transform._parentID=-1,co(this.children,e,1),this._boundsID++,this.onChildrenChange(e),t.emit("removed",this),this.emit("childRemoved",t,this,e),t}removeChildren(e=0,t=this.children.length){const r=e,n=t,i=n-r;let o;if(i>0&&i<=n){o=this.children.splice(r,i);for(let a=0;a<o.length;++a)o[a].parent=null,o[a].transform&&(o[a].transform._parentID=-1);this._boundsID++,this.onChildrenChange(e);for(let a=0;a<o.length;++a)o[a].emit("removed",this),this.emit("childRemoved",o[a],this,a);return o}else if(i===0&&this.children.length===0)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")}sortChildren(){let e=!1;for(let t=0,r=this.children.length;t<r;++t){const n=this.children[t];n._lastSortedIndex=t,!e&&n.zIndex!==0&&(e=!0)}e&&this.children.length>1&&this.children.sort(r2),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let e=0,t=this.children.length;e<t;++e){const r=this.children[e];r.visible&&r.updateTransform()}}calculateBounds(){this._bounds.clear(),this._calculateBounds();for(let e=0;e<this.children.length;e++){const t=this.children[e];if(!(!t.visible||!t.renderable))if(t.calculateBounds(),t._mask){const r=t._mask.isMaskData?t._mask.maskObject:t._mask;r?(r.calculateBounds(),this._bounds.addBoundsMask(t._bounds,r._bounds)):this._bounds.addBounds(t._bounds)}else t.filterArea?this._bounds.addBoundsArea(t._bounds,t.filterArea):this._bounds.addBounds(t._bounds)}this._bounds.updateID=this._boundsID}getLocalBounds(e,t=!1){const r=super.getLocalBounds(e);if(!t)for(let n=0,i=this.children.length;n<i;++n){const o=this.children[n];o.visible&&o.updateTransform()}return r}_calculateBounds(){}_renderWithCulling(e){const t=e.renderTexture.sourceFrame;if(!(t.width>0&&t.height>0))return;let r,n;this.cullArea?(r=this.cullArea,n=this.worldTransform):this._render!==Ru.prototype._render&&(r=this.getBounds(!0));const i=e.projection.transform;if(i&&(n?(n=e2.copyFrom(n),n.prepend(i)):n=i),r&&t.intersects(r,n))this._render(e);else if(this.cullArea)return;for(let o=0,a=this.children.length;o<a;++o){const u=this.children[o],f=u.cullable;u.cullable=f||!this.cullArea,u.render(e),u.cullable=f}}render(e){var t;if(!(!this.visible||this.worldAlpha<=0||!this.renderable))if(this._mask||(t=this.filters)!=null&&t.length)this.renderAdvanced(e);else if(this.cullable)this._renderWithCulling(e);else{this._render(e);for(let r=0,n=this.children.length;r<n;++r)this.children[r].render(e)}}renderAdvanced(e){var i,o,a;const t=this.filters,r=this._mask;if(t){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(let u=0;u<t.length;u++)t[u].enabled&&this._enabledFilters.push(t[u])}const n=t&&((i=this._enabledFilters)==null?void 0:i.length)||r&&(!r.isMaskData||r.enabled&&(r.autoDetect||r.type!==Ee.NONE));if(n&&e.batch.flush(),t&&((o=this._enabledFilters)!=null&&o.length)&&e.filter.push(this,this._enabledFilters),r&&e.mask.push(this,this._mask),this.cullable)this._renderWithCulling(e);else{this._render(e);for(let u=0,f=this.children.length;u<f;++u)this.children[u].render(e)}n&&e.batch.flush(),r&&e.mask.pop(this),t&&((a=this._enabledFilters)!=null&&a.length)&&e.filter.pop()}_render(e){}destroy(e){super.destroy(),this.sortDirty=!1;const t=typeof e=="boolean"?e:e==null?void 0:e.children,r=this.removeChildren(0,this.children.length);if(t)for(let n=0;n<r.length;++n)r[n].destroy(e)}get width(){return this.scale.x*this.getLocalBounds().width}set width(e){const t=this.getLocalBounds().width;t!==0?this.scale.x=e/t:this.scale.x=1,this._width=e}get height(){return this.scale.y*this.getLocalBounds().height}set height(e){const t=this.getLocalBounds().height;t!==0?this.scale.y=e/t:this.scale.y=1,this._height=e}};let Oi=Ru;Oi.defaultSortableChildren=!1,Oi.prototype.containerUpdateTransform=Oi.prototype.updateTransform,Object.defineProperties(Dt,{SORTABLE_CHILDREN:{get(){return Oi.defaultSortableChildren},set(e){Ht("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),Oi.defaultSortableChildren=e}}});class Do{constructor(t,r=null,n=null,i=null){this.points=[],this.holes=[],this.shape=t,this.lineStyle=n,this.fillStyle=r,this.matrix=i,this.type=t.type}clone(){return new Do(this.shape,this.fillStyle,this.lineStyle,this.matrix)}destroy(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null}}const Ci=new oe,Tp=class extends ed{constructor(){super(),this.closePointEps=1e-4,this.boundsPadding=0,this.uvsFloat32=null,this.indicesUint16=null,this.batchable=!1,this.points=[],this.colors=[],this.uvs=[],this.indices=[],this.textureIds=[],this.graphicsData=[],this.drawCalls=[],this.batchDirty=-1,this.batches=[],this.dirty=0,this.cacheDirty=-1,this.clearDirty=0,this.shapeIndex=0,this._bounds=new Cu,this.boundsDirty=-1}get bounds(){return this.updateBatches(),this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds}invalidate(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(let e=0;e<this.drawCalls.length;e++)this.drawCalls[e].texArray.clear(),Bo.push(this.drawCalls[e]);this.drawCalls.length=0;for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t.reset(),wp.push(t)}this.batches.length=0}clear(){return this.graphicsData.length>0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(e,t=null,r=null,n=null){const i=new Do(e,t,r,n);return this.graphicsData.push(i),this.dirty++,this}drawHole(e,t=null){if(!this.graphicsData.length)return null;const r=new Do(e,null,null,t),n=this.graphicsData[this.graphicsData.length-1];return r.lineStyle=n.lineStyle,n.holes.push(r),this.dirty++,this}destroy(){super.destroy();for(let e=0;e<this.graphicsData.length;++e)this.graphicsData[e].destroy();this.points.length=0,this.points=null,this.colors.length=0,this.colors=null,this.uvs.length=0,this.uvs=null,this.indices.length=0,this.indices=null,this.indexBuffer.destroy(),this.indexBuffer=null,this.graphicsData.length=0,this.graphicsData=null,this.drawCalls.length=0,this.drawCalls=null,this.batches.length=0,this.batches=null,this._bounds=null}containsPoint(e){const t=this.graphicsData;for(let r=0;r<t.length;++r){const n=t[r];if(n.fillStyle.visible&&n.shape&&(n.matrix?n.matrix.applyInverse(e,Ci):Ci.copyFrom(e),n.shape.contains(Ci.x,Ci.y))){let i=!1;if(n.holes){for(let o=0;o<n.holes.length;o++)if(n.holes[o].shape.contains(Ci.x,Ci.y)){i=!0;break}}if(!i)return!0}}return!1}updateBatches(){if(!this.graphicsData.length){this.batchable=!0;return}if(!this.validateBatching())return;this.cacheDirty=this.dirty;const e=this.uvs,t=this.graphicsData;let r=null,n=null;this.batches.length>0&&(r=this.batches[this.batches.length-1],n=r.style);for(let u=this.shapeIndex;u<t.length;u++){this.shapeIndex++;const f=t[u],h=f.fillStyle,d=f.lineStyle;Ou[f.type].build(f),f.matrix&&this.transformPoints(f.points,f.matrix),(h.visible||d.visible)&&this.processHoles(f.holes);for(let c=0;c<2;c++){const v=c===0?h:d;if(!v.visible)continue;const y=v.texture.baseTexture,_=this.indices.length,b=this.points.length/2;y.wrapMode=Ji.REPEAT,c===0?this.processFill(f):this.processLine(f);const m=this.points.length/2-b;m!==0&&(r&&!this._compareStyles(n,v)&&(r.end(_,b),r=null),r||(r=wp.pop()||new ZE,r.begin(v,_,b),this.batches.push(r),n=v),this.addUvs(this.points,e,v.texture,b,m,v.matrix))}}const i=this.indices.length,o=this.points.length/2;if(r&&r.end(i,o),this.batches.length===0){this.batchable=!0;return}const a=o>65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&a===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=a?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(e,t){return!(!e||!t||e.texture.baseTexture!==t.texture.baseTexture||e.color+e.alpha!==t.color+t.alpha||!!e.native!=!!t.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let e=0,t=this.graphicsData.length;e<t;e++){const r=this.graphicsData[e],n=r.fillStyle,i=r.lineStyle;if(n&&!n.texture.baseTexture.valid||i&&!i.texture.baseTexture.valid)return!1}return!0}packBatches(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);const e=this.batches;for(let t=0,r=e.length;t<r;t++){const n=e[t];for(let i=0;i<n.size;i++){const o=n.start+i;this.indicesUint16[o]=this.indicesUint16[o]-n.attribStart}}}isBatchable(){if(this.points.length>65535*2)return!1;const e=this.batches;for(let t=0;t<e.length;t++)if(e[t].style.native)return!1;return this.points.length<Tp.BATCHABLE_SIZE*2}buildDrawCalls(){let e=++Kt._globalBatch;for(let d=0;d<this.drawCalls.length;d++)this.drawCalls[d].texArray.clear(),Bo.push(this.drawCalls[d]);this.drawCalls.length=0;const t=this.colors,r=this.textureIds;let n=Bo.pop();n||(n=new ru,n.texArray=new lu),n.texArray.count=0,n.start=0,n.size=0,n.type=an.TRIANGLES;let i=0,o=null,a=0,u=!1,f=an.TRIANGLES,h=0;this.drawCalls.push(n);for(let d=0;d<this.batches.length;d++){const p=this.batches[d],c=8,v=p.style,y=v.texture.baseTexture;u!==!!v.native&&(u=!!v.native,f=u?an.LINES:an.TRIANGLES,o=null,i=c,e++),o!==y&&(o=y,y._batchEnabled!==e&&(i===c&&(e++,i=0,n.size>0&&(n=Bo.pop(),n||(n=new ru,n.texArray=new lu),this.drawCalls.push(n)),n.start=h,n.size=0,n.texArray.count=0,n.type=f),y.touched=1,y._batchEnabled=e,y._batchLocation=i,y.wrapMode=Ji.REPEAT,n.texArray.elements[n.texArray.count++]=y,i++)),n.size+=p.size,h+=p.size,a=y._batchLocation,this.addColors(t,v.color,v.alpha,p.attribSize,p.attribStart),this.addTextureIds(r,a,p.attribSize,p.attribStart)}Kt._globalBatch=e,this.packAttributes()}packAttributes(){const e=this.points,t=this.uvs,r=this.colors,n=this.textureIds,i=new ArrayBuffer(e.length*3*4),o=new Float32Array(i),a=new Uint32Array(i);let u=0;for(let f=0;f<e.length/2;f++)o[u++]=e[f*2],o[u++]=e[f*2+1],o[u++]=t[f*2],o[u++]=t[f*2+1],a[u++]=r[f],o[u++]=n[f];this._buffer.update(i),this._indexBuffer.update(this.indicesUint16)}processFill(e){e.holes.length?yp.triangulate(e,this):Ou[e.type].triangulate(e,this)}processLine(e){xp(e,this);for(let t=0;t<e.holes.length;t++)xp(e.holes[t],this)}processHoles(e){for(let t=0;t<e.length;t++){const r=e[t];Ou[r.type].build(r),r.matrix&&this.transformPoints(r.points,r.matrix)}}calculateBounds(){const e=this._bounds;e.clear(),e.addVertexData(this.points,0,this.points.length),e.pad(this.boundsPadding,this.boundsPadding)}transformPoints(e,t){for(let r=0;r<e.length/2;r++){const n=e[r*2],i=e[r*2+1];e[r*2]=t.a*n+t.c*i+t.tx,e[r*2+1]=t.b*n+t.d*i+t.ty}}addColors(e,t,r,n,i=0){const o=Be.shared.setValue(t).toLittleEndianNumber(),a=Be.shared.setValue(o).toPremultiplied(r);e.length=Math.max(e.length,i+n);for(let u=0;u<n;u++)e[i+u]=a}addTextureIds(e,t,r,n=0){e.length=Math.max(e.length,n+r);for(let i=0;i<r;i++)e[n+i]=t}addUvs(e,t,r,n,i,o=null){let a=0;const u=t.length,f=r.frame;for(;a<i;){let d=e[(n+a)*2],p=e[(n+a)*2+1];if(o){const c=o.a*d+o.c*p+o.tx;p=o.b*d+o.d*p+o.ty,d=c}a++,t.push(d/f.width,p/f.height)}const h=r.baseTexture;(f.width<h.width||f.height<h.height)&&this.adjustUvs(t,r,u,i)}adjustUvs(e,t,r,n){const i=t.baseTexture,o=1e-6,a=r+n*2,u=t.frame,f=u.width/i.width,h=u.height/i.height;let d=u.x/u.width,p=u.y/u.height,c=Math.floor(e[r]+o),v=Math.floor(e[r+1]+o);for(let y=r+2;y<a;y+=2)c=Math.min(c,Math.floor(e[y]+o)),v=Math.min(v,Math.floor(e[y+1]+o));d-=c,p-=v;for(let y=r;y<a;y+=2)e[y]=(e[y]+d)*f,e[y+1]=(e[y+1]+p)*h}};let Ep=Tp;Ep.BATCHABLE_SIZE=100;class Uo{constructor(){this.color=16777215,this.alpha=1,this.texture=Wt.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){const t=new Uo;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t}reset(){this.color=16777215,this.alpha=1,this.texture=Wt.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class Iu extends Uo{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=jn.BUTT,this.join=Sr.MITER,this.miterLimit=10}clone(){const t=new Iu;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t.width=this.width,t.alignment=this.alignment,t.native=this.native,t.cap=this.cap,t.join=this.join,t.miterLimit=this.miterLimit,t}reset(){super.reset(),this.color=0,this.alignment=.5,this.width=0,this.native=!1}}const Pu={},$o=class extends Oi{constructor(e=null){super(),this.shader=null,this.pluginName="batch",this.currentPath=null,this.batches=[],this.batchTint=-1,this.batchDirty=-1,this.vertexData=null,this._fillStyle=new Uo,this._lineStyle=new Iu,this._matrix=null,this._holeMode=!1,this.state=po.for2d(),this._geometry=e||new Ep,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Be(16777215),this.blendMode=Pt.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new $o(this._geometry)}set blendMode(e){this.state.blendMode=e}get blendMode(){return this.state.blendMode}get tint(){return this._tintColor.value}set tint(e){this._tintColor.setValue(e)}get fill(){return this._fillStyle}get line(){return this._lineStyle}lineStyle(e=null,t=0,r,n=.5,i=!1){return typeof e=="number"&&(e={width:e,color:t,alpha:r,alignment:n,native:i}),this.lineTextureStyle(e)}lineTextureStyle(e){const t={width:0,texture:Wt.WHITE,color:e!=null&&e.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:jn.BUTT,join:Sr.MITER,miterLimit:10};e=Object.assign(t,e),this.normalizeColor(e),this.currentPath&&this.startPoly();const r=e.width>0&&e.alpha>0;return r?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:r},e)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const e=this.currentPath.points,t=this.currentPath.points.length;t>2&&(this.drawShape(this.currentPath),this.currentPath=new hs,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new hs,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(e,t){return this.startPoly(),this.currentPath.points[0]=e,this.currentPath.points[1]=t,this}lineTo(e,t){this.currentPath||this.moveTo(0,0);const r=this.currentPath.points,n=r[r.length-2],i=r[r.length-1];return(n!==e||i!==t)&&r.push(e,t),this}_initCurve(e=0,t=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[e,t]):this.moveTo(e,t)}quadraticCurveTo(e,t,r,n){this._initCurve();const i=this.currentPath.points;return i.length===0&&this.moveTo(0,0),Au.curveTo(e,t,r,n,i),this}bezierCurveTo(e,t,r,n,i,o){return this._initCurve(),Su.curveTo(e,t,r,n,i,o,this.currentPath.points),this}arcTo(e,t,r,n,i){this._initCurve(e,t);const o=this.currentPath.points,a=_p.curveTo(e,t,r,n,i,o);if(a){const{cx:u,cy:f,radius:h,startAngle:d,endAngle:p,anticlockwise:c}=a;this.arc(u,f,h,d,p,c)}return this}arc(e,t,r,n,i,o=!1){if(n===i)return this;if(!o&&i<=n?i+=go:o&&n<=i&&(n+=go),i-n===0)return this;const u=e+Math.cos(n)*r,f=t+Math.sin(n)*r,h=this._geometry.closePointEps;let d=this.currentPath?this.currentPath.points:null;if(d){const p=Math.abs(d[d.length-2]-u),c=Math.abs(d[d.length-1]-f);p<h&&c<h||d.push(u,f)}else this.moveTo(u,f),d=this.currentPath.points;return _p.arc(u,f,e,t,r,n,i,o,d),this}beginFill(e=0,t){return this.beginTextureFill({texture:Wt.WHITE,color:e,alpha:t})}normalizeColor(e){const t=Be.shared.setValue(e.color??0);e.color=t.toNumber(),e.alpha??(e.alpha=t.alpha)}beginTextureFill(e){const t={texture:Wt.WHITE,color:16777215,matrix:null};e=Object.assign(t,e),this.normalizeColor(e),this.currentPath&&this.startPoly();const r=e.alpha>0;return r?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._fillStyle,{visible:r},e)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(e,t,r,n){return this.drawShape(new ie(e,t,r,n))}drawRoundedRect(e,t,r,n,i){return this.drawShape(new iu(e,t,r,n,i))}drawCircle(e,t,r){return this.drawShape(new nu(e,t,r))}drawEllipse(e,t,r,n){return this.drawShape(new vw(e,t,r,n))}drawPolygon(...e){let t,r=!0;const n=e[0];n.points?(r=n.closeStroke,t=n.points):Array.isArray(e[0])?t=e[0]:t=e;const i=new hs(t);return i.closeStroke=r,this.drawShape(i),this}drawShape(e){return this._holeMode?this._geometry.drawHole(e,this._matrix):this._geometry.drawShape(e,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const e=this._geometry.graphicsData;return e.length===1&&e[0].shape.type===Ne.RECT&&!e[0].matrix&&!e[0].holes.length&&!(e[0].lineStyle.visible&&e[0].lineStyle.width)}_render(e){this.finishPoly();const t=this._geometry;t.updateBatches(),t.batchable?(this.batchDirty!==t.batchDirty&&this._populateBatches(),this._renderBatched(e)):(e.batch.flush(),this._renderDirect(e))}_populateBatches(){const e=this._geometry,t=this.blendMode,r=e.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=e.batchDirty,this.batches.length=r,this.vertexData=new Float32Array(e.points);for(let n=0;n<r;n++){const i=e.batches[n],o=i.style.color,a=new Float32Array(this.vertexData.buffer,i.attribStart*4*2,i.attribSize*2),u=new Float32Array(e.uvsFloat32.buffer,i.attribStart*4*2,i.attribSize*2),f=new Uint16Array(e.indicesUint16.buffer,i.start*2,i.size),h={vertexData:a,blendMode:t,indices:f,uvs:u,_batchRGB:Be.shared.setValue(o).toRgbArray(),_tintRGB:o,_texture:i.style.texture,alpha:i.style.alpha,worldAlpha:1};this.batches[n]=h}}_renderBatched(e){if(this.batches.length){e.batch.setObjectRenderer(e.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(let t=0,r=this.batches.length;t<r;t++){const n=this.batches[t];n.worldAlpha=this.worldAlpha*n.alpha,e.plugins[this.pluginName].render(n)}}}_renderDirect(e){const t=this._resolveDirectShader(e),r=this._geometry,n=this.worldAlpha,i=t.uniforms,o=r.drawCalls;i.translationMatrix=this.transform.worldTransform,Be.shared.setValue(this._tintColor).premultiply(n).toArray(i.tint),e.shader.bind(t),e.geometry.bind(r,t),e.state.set(this.state);for(let a=0,u=o.length;a<u;a++)this._renderDrawCallDirect(e,r.drawCalls[a])}_renderDrawCallDirect(e,t){const{texArray:r,type:n,size:i,start:o}=t,a=r.count;for(let u=0;u<a;u++)e.texture.bind(r.elements[u],u);e.geometry.draw(n,i,o)}_resolveDirectShader(e){let t=this.shader;const r=this.pluginName;if(!t){if(!Pu[r]){const{maxTextures:n}=e.plugins[r],i=new Int32Array(n);for(let u=0;u<n;u++)i[u]=u;const o={tint:new Float32Array([1,1,1,1]),translationMatrix:new $e,default:br.from({uSamplers:i},!0)},a=e.plugins[r]._shader.program;Pu[r]=new ps(a,o)}t=Pu[r]}return t}_calculateBounds(){this.finishPoly();const e=this._geometry;if(!e.graphicsData.length)return;const{minX:t,minY:r,maxX:n,maxY:i}=e.bounds;this._bounds.addFrame(this.transform,t,r,n,i)}containsPoint(e){return this.worldTransform.applyInverse(e,$o._TEMP_POINT),this._geometry.containsPoint($o._TEMP_POINT)}calculateTints(){if(this.batchTint!==this.tint){this.batchTint=this._tintColor.toNumber();for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t._tintRGB=Be.shared.setValue(this._tintColor).multiply(t._batchRGB).toLittleEndianNumber()}}}calculateVertices(){const e=this.transform._worldID;if(this._transformID===e)return;this._transformID=e;const t=this.transform.worldTransform,r=t.a,n=t.b,i=t.c,o=t.d,a=t.tx,u=t.ty,f=this._geometry.points,h=this.vertexData;let d=0;for(let p=0;p<f.length;p+=2){const c=f[p],v=f[p+1];h[d++]=r*c+i*v+a,h[d++]=o*v+n*c+u}}closePath(){const e=this.currentPath;return e&&(e.closeStroke=!0,this.finishPoly()),this}setMatrix(e){return this._matrix=e,this}beginHole(){return this.finishPoly(),this._holeMode=!0,this}endHole(){return this.finishPoly(),this._holeMode=!1,this}destroy(e){this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose(),this._matrix=null,this.currentPath=null,this._lineStyle.destroy(),this._lineStyle=null,this._fillStyle.destroy(),this._fillStyle=null,this._geometry=null,this.shader=null,this.vertexData=null,this.batches.length=0,this.batches=null,super.destroy(e)}};let Nu=$o;Nu.curves=Si,Nu._TEMP_POINT=new oe;var n2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Mu={},i2={get exports(){return Mu},set exports(e){Mu=e}};/*!
1924
1924
  * d-path-parser - v1.0.0
1925
1925
  * by Massimo Artizzu (MaxArt2501)
1926
1926
  *
@@ -1928,46 +1928,46 @@ void main() {
1928
1928
  *
1929
1929
  * Licensed under the MIT License
1930
1930
  * See LICENSE for details
1931
- */(function(e,t){(function(r,n){e.exports=n()})(n2,function(){return function(n){for(var i={command:/\s*([achlmqstvz])/gi,number:/\s*([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/gi,comma:/\s*(?:(,)|\s)/g,flag:/\s*([01])/g},o={number:function(b){return+v("number",b)},"coordinate pair":function(b){var _=v("number",b);if(_===null&&!b)return null;v("comma");var m=v("number",!0);return{x:+_,y:+m}},"arc definition":function(b){var _=o["coordinate pair"](b);if(!_&&!b)return null;v("comma");var m=+v("number",!0);v("comma",!0);var w=!!+v("flag",!0);v("comma");var T=!!+v("flag",!0);v("comma");var x=o["coordinate pair"](!0);return{radii:_,rotation:m,large:w,clockwise:T,end:x}}},a=0,u=[];a<n.length;){var f=v("command"),h=f.toUpperCase(),d=f!==h,p;switch(h){case"M":p=y("coordinate pair").map(function(b,_){return _===1&&(f=d?"l":"L"),c({end:b})});break;case"L":case"T":p=y("coordinate pair").map(function(b){return c({end:b})});break;case"C":if(p=y("coordinate pair"),p.length%3)throw Error("Expected coordinate pair triplet at position "+a);p=p.reduce(function(b,_,m){var w=m%3;if(!w)b.push(c({cp1:_}));else{var T=b[b.length-1];T[w===1?"cp2":"end"]=_}return b},[]);break;case"Q":case"S":if(p=y("coordinate pair"),p.length&1)throw Error("Expected coordinate pair couple at position "+a);p=p.reduce(function(b,_,m){var w=m&1;if(!w)b.push(c({cp:_}));else{var T=b[b.length-1];T.end=_}return b},[]);break;case"H":case"V":p=y("number").map(function(b){return c({value:b})});break;case"A":p=y("arc definition").map(c);break;case"Z":p=[{code:"Z"}];break}u.push.apply(u,p)}return u;function c(b){return b.code=f,b.relative=d,b}function v(b,_){i[b].lastIndex=a;var m=i[b].exec(n);if(!m||m.index!==a){if(!_)return null;throw Error("Expected "+b+" at position "+a)}return a=i[b].lastIndex,m[1]}function y(b){for(var _=[],m,w=!0;m=o[b](w);)_.push(m),w=!!v("comma");return _}}})})(i2);const s2=/^\s+/,o2=/\s+$/;function Tt(e,t){if(e=e||"",t=t||{},e instanceof Tt)return e;if(!(this instanceof Tt))return new Tt(e,t);var r=a2(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}Tt.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),t,r,n,i,o,a;return t=e.r/255,r=e.g/255,n=e.b/255,t<=.03928?i=t/12.92:i=Math.pow((t+.055)/1.055,2.4),r<=.03928?o=r/12.92:o=Math.pow((r+.055)/1.055,2.4),n<=.03928?a=n/12.92:a=Math.pow((n+.055)/1.055,2.4),.2126*i+.7152*o+.0722*a},setAlpha:function(e){return this._a=Ip(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Ap(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Ap(this._r,this._g,this._b),t=Math.round(e.h*360),r=Math.round(e.s*100),n=Math.round(e.v*100);return this._a==1?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=Sp(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Sp(this._r,this._g,this._b),t=Math.round(e.h*360),r=Math.round(e.s*100),n=Math.round(e.l*100);return this._a==1?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return Op(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return c2(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(ce(this._r,255)*100)+"%",g:Math.round(ce(this._g,255)*100)+"%",b:Math.round(ce(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(ce(this._r,255)*100)+"%, "+Math.round(ce(this._g,255)*100)+"%, "+Math.round(ce(this._b,255)*100)+"%)":"rgba("+Math.round(ce(this._r,255)*100)+"%, "+Math.round(ce(this._g,255)*100)+"%, "+Math.round(ce(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:T2[Op(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t="#"+Cp(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var i=Tt(e);r="#"+Cp(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0,i=!t&&n&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return i?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return Tt(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(v2,arguments)},brighten:function(){return this._applyModification(g2,arguments)},darken:function(){return this._applyModification(m2,arguments)},desaturate:function(){return this._applyModification(h2,arguments)},saturate:function(){return this._applyModification(d2,arguments)},greyscale:function(){return this._applyModification(p2,arguments)},spin:function(){return this._applyModification(y2,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(x2,arguments)},complement:function(){return this._applyCombination(_2,arguments)},monochromatic:function(){return this._applyCombination(w2,arguments)},splitcomplement:function(){return this._applyCombination(b2,arguments)},triad:function(){return this._applyCombination(Rp,[3])},tetrad:function(){return this._applyCombination(Rp,[4])}},Tt.fromRatio=function(e,t){if(typeof e=="object"){var r={};for(var n in e)e.hasOwnProperty(n)&&(n==="a"?r[n]=e[n]:r[n]=_s(e[n]));e=r}return Tt(e,t)};function a2(e){var t={r:0,g:0,b:0},r=1,n=null,i=null,o=null,a=!1,u=!1;return typeof e=="string"&&(e=O2(e)),typeof e=="object"&&(Kr(e.r)&&Kr(e.g)&&Kr(e.b)?(t=l2(e.r,e.g,e.b),a=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Kr(e.h)&&Kr(e.s)&&Kr(e.v)?(n=_s(e.s),i=_s(e.v),t=f2(e.h,n,i),a=!0,u="hsv"):Kr(e.h)&&Kr(e.s)&&Kr(e.l)&&(n=_s(e.s),o=_s(e.l),t=u2(e.h,n,o),a=!0,u="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=Ip(r),{ok:a,format:e.format||u,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}function l2(e,t,r){return{r:ce(e,255)*255,g:ce(t,255)*255,b:ce(r,255)*255}}function Sp(e,t,r){e=ce(e,255),t=ce(t,255),r=ce(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),o,a,u=(n+i)/2;if(n==i)o=a=0;else{var f=n-i;switch(a=u>.5?f/(2-n-i):f/(n+i),n){case e:o=(t-r)/f+(t<r?6:0);break;case t:o=(r-e)/f+2;break;case r:o=(e-t)/f+4;break}o/=6}return{h:o,s:a,l:u}}function u2(e,t,r){var n,i,o;e=ce(e,360),t=ce(t,100),r=ce(r,100);function a(h,d,p){return p<0&&(p+=1),p>1&&(p-=1),p<1/6?h+(d-h)*6*p:p<1/2?d:p<2/3?h+(d-h)*(2/3-p)*6:h}if(t===0)n=i=o=r;else{var u=r<.5?r*(1+t):r+t-r*t,f=2*r-u;n=a(f,u,e+1/3),i=a(f,u,e),o=a(f,u,e-1/3)}return{r:n*255,g:i*255,b:o*255}}function Ap(e,t,r){e=ce(e,255),t=ce(t,255),r=ce(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),o,a,u=n,f=n-i;if(a=n===0?0:f/n,n==i)o=0;else{switch(n){case e:o=(t-r)/f+(t<r?6:0);break;case t:o=(r-e)/f+2;break;case r:o=(e-t)/f+4;break}o/=6}return{h:o,s:a,v:u}}function f2(e,t,r){e=ce(e,360)*6,t=ce(t,100),r=ce(r,100);var n=Math.floor(e),i=e-n,o=r*(1-t),a=r*(1-i*t),u=r*(1-(1-i)*t),f=n%6,h=[r,a,o,o,u,r][f],d=[u,r,r,a,o,o][f],p=[o,o,u,r,r,a][f];return{r:h*255,g:d*255,b:p*255}}function Op(e,t,r,n){var i=[Ar(Math.round(e).toString(16)),Ar(Math.round(t).toString(16)),Ar(Math.round(r).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function c2(e,t,r,n,i){var o=[Ar(Math.round(e).toString(16)),Ar(Math.round(t).toString(16)),Ar(Math.round(r).toString(16)),Ar(Pp(n))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function Cp(e,t,r,n){var i=[Ar(Pp(n)),Ar(Math.round(e).toString(16)),Ar(Math.round(t).toString(16)),Ar(Math.round(r).toString(16))];return i.join("")}Tt.equals=function(e,t){return!e||!t?!1:Tt(e).toRgbString()==Tt(t).toRgbString()},Tt.random=function(){return Tt.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function h2(e,t){t=t===0?0:t||10;var r=Tt(e).toHsl();return r.s-=t/100,r.s=$o(r.s),Tt(r)}function d2(e,t){t=t===0?0:t||10;var r=Tt(e).toHsl();return r.s+=t/100,r.s=$o(r.s),Tt(r)}function p2(e){return Tt(e).desaturate(100)}function v2(e,t){t=t===0?0:t||10;var r=Tt(e).toHsl();return r.l+=t/100,r.l=$o(r.l),Tt(r)}function g2(e,t){t=t===0?0:t||10;var r=Tt(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),Tt(r)}function m2(e,t){t=t===0?0:t||10;var r=Tt(e).toHsl();return r.l-=t/100,r.l=$o(r.l),Tt(r)}function y2(e,t){var r=Tt(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,Tt(r)}function _2(e){var t=Tt(e).toHsl();return t.h=(t.h+180)%360,Tt(t)}function Rp(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=Tt(e).toHsl(),n=[Tt(e)],i=360/t,o=1;o<t;o++)n.push(Tt({h:(r.h+o*i)%360,s:r.s,l:r.l}));return n}function b2(e){var t=Tt(e).toHsl(),r=t.h;return[Tt(e),Tt({h:(r+72)%360,s:t.s,l:t.l}),Tt({h:(r+216)%360,s:t.s,l:t.l})]}function x2(e,t,r){t=t||6,r=r||30;var n=Tt(e).toHsl(),i=360/r,o=[Tt(e)];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,o.push(Tt(n));return o}function w2(e,t){t=t||6;for(var r=Tt(e).toHsv(),n=r.h,i=r.s,o=r.v,a=[],u=1/t;t--;)a.push(Tt({h:n,s:i,v:o})),o=(o+u)%1;return a}Tt.mix=function(e,t,r){r=r===0?0:r||50;var n=Tt(e).toRgb(),i=Tt(t).toRgb(),o=r/100,a={r:(i.r-n.r)*o+n.r,g:(i.g-n.g)*o+n.g,b:(i.b-n.b)*o+n.b,a:(i.a-n.a)*o+n.a};return Tt(a)},Tt.readability=function(e,t){var r=Tt(e),n=Tt(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},Tt.isReadable=function(e,t,r){var n=Tt.readability(e,t),i,o;switch(o=!1,i=C2(r),i.level+i.size){case"AAsmall":case"AAAlarge":o=n>=4.5;break;case"AAlarge":o=n>=3;break;case"AAAsmall":o=n>=7;break}return o},Tt.mostReadable=function(e,t,r){var n=null,i=0,o,a,u,f;r=r||{},a=r.includeFallbackColors,u=r.level,f=r.size;for(var h=0;h<t.length;h++)o=Tt.readability(e,t[h]),o>i&&(i=o,n=Tt(t[h]));return Tt.isReadable(e,n,{level:u,size:f})||!a?n:(r.includeFallbackColors=!1,Tt.mostReadable(e,["#fff","#000"],r))};var Mu=Tt.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},T2=Tt.hexNames=E2(Mu);function E2(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function Ip(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function ce(e,t){S2(e)&&(e="100%");var r=A2(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function $o(e){return Math.min(1,Math.max(0,e))}function tr(e){return parseInt(e,16)}function S2(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function A2(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Ar(e){return e.length==1?"0"+e:""+e}function _s(e){return e<=1&&(e=e*100+"%"),e}function Pp(e){return Math.round(parseFloat(e)*255).toString(16)}function Np(e){return tr(e)/255}var Or=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",r="(?:"+t+")|(?:"+e+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Kr(e){return!!Or.CSS_UNIT.exec(e)}function O2(e){e=e.replace(s2,"").replace(o2,"").toLowerCase();var t=!1;if(Mu[e])e=Mu[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=Or.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=Or.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Or.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=Or.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Or.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=Or.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Or.hex8.exec(e))?{r:tr(r[1]),g:tr(r[2]),b:tr(r[3]),a:Np(r[4]),format:t?"name":"hex8"}:(r=Or.hex6.exec(e))?{r:tr(r[1]),g:tr(r[2]),b:tr(r[3]),format:t?"name":"hex"}:(r=Or.hex4.exec(e))?{r:tr(r[1]+""+r[1]),g:tr(r[2]+""+r[2]),b:tr(r[3]+""+r[3]),a:Np(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=Or.hex3.exec(e))?{r:tr(r[1]+""+r[1]),g:tr(r[2]+""+r[2]),b:tr(r[3]+""+r[3]),format:t?"name":"hex"}:!1}function C2(e){var t,r;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:t,size:r}}var R2=function(){function e(t,r){var n=[],i=!0,o=!1,a=void 0;try{for(var u=t[Symbol.iterator](),f;!(i=(f=u.next()).done)&&(n.push(f.value),!(r&&n.length===r));i=!0);}catch(h){o=!0,a=h}finally{try{!i&&u.return&&u.return()}finally{if(o)throw a}}return n}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),bs=Math.PI*2,ku=function(t,r,n,i,o,a,u){var f=t.x,h=t.y;f*=r,h*=n;var d=i*f-o*h,p=o*f+i*h;return{x:d+a,y:p+u}},I2=function(t,r){var n=r===1.5707963267948966?.551915024494:r===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(r/4),i=Math.cos(t),o=Math.sin(t),a=Math.cos(t+r),u=Math.sin(t+r);return[{x:i-o*n,y:o+i*n},{x:a+u*n,y:u-a*n},{x:a,y:u}]},Mp=function(t,r,n,i){var o=t*i-r*n<0?-1:1,a=t*n+r*i;return a>1&&(a=1),a<-1&&(a=-1),o*Math.acos(a)},P2=function(t,r,n,i,o,a,u,f,h,d,p,c){var v=Math.pow(o,2),y=Math.pow(a,2),b=Math.pow(p,2),_=Math.pow(c,2),m=v*y-v*_-y*b;m<0&&(m=0),m/=v*_+y*b,m=Math.sqrt(m)*(u===f?-1:1);var w=m*o/a*c,T=m*-a/o*p,x=d*w-h*T+(t+n)/2,E=h*w+d*T+(r+i)/2,I=(p-w)/o,A=(c-T)/a,O=(-p-w)/o,L=(-c-T)/a,R=Mp(1,0,I,A),C=Mp(I,A,O,L);return f===0&&C>0&&(C-=bs),f===1&&C<0&&(C+=bs),[x,E,R,C]},kp=function(t){var r=t.px,n=t.py,i=t.cx,o=t.cy,a=t.rx,u=t.ry,f=t.xAxisRotation,h=f===void 0?0:f,d=t.largeArcFlag,p=d===void 0?0:d,c=t.sweepFlag,v=c===void 0?0:c,y=[];if(a===0||u===0)return[];var b=Math.sin(h*bs/360),_=Math.cos(h*bs/360),m=_*(r-i)/2+b*(n-o)/2,w=-b*(r-i)/2+_*(n-o)/2;if(m===0&&w===0)return[];a=Math.abs(a),u=Math.abs(u);var T=Math.pow(m,2)/Math.pow(a,2)+Math.pow(w,2)/Math.pow(u,2);T>1&&(a*=Math.sqrt(T),u*=Math.sqrt(T));var x=P2(r,n,i,o,a,u,p,v,b,_,m,w),E=R2(x,4),I=E[0],A=E[1],O=E[2],L=E[3],R=Math.abs(L)/(bs/4);Math.abs(1-R)<1e-7&&(R=1);var C=Math.max(Math.ceil(R),1);L/=C;for(var P=0;P<C;P++)y.push(I2(O,L)),O+=L;return y.map(function(M){var F=ku(M[0],a,u,_,b,I,A),q=F.x,Z=F.y,z=ku(M[1],a,u,_,b,I,A),nt=z.x,V=z.y,U=ku(M[2],a,u,_,b,I,A),k=U.x,j=U.y;return{x1:q,y1:Z,x2:nt,y2:V,x:k,y:j}})};class N2 extends Pu{constructor(t){super(),this.lineColor=null,t&&this.drawSVG(t)}drawSVG(t){if(typeof t=="string"){const r=document.createElement("div");r.innerHTML=t.trim(),t=r.querySelector("svg")}if(!t)throw new Error("Missing <svg> element in SVG constructor");return this._svgFill(t),this._svgChildren(t.children),this}_svgChildren(t,r=!1){for(let n=0;n<t.length;n++){const i=t[n];switch(this._svgFill(i,r),i.nodeName.toLowerCase()){case"path":{this._svgPath(i);break}case"circle":case"ellipse":{this._svgCircle(i);break}case"rect":{this._svgRect(i);break}case"polygon":{this._svgPoly(i,!0);break}case"polyline":{this._svgPoly(i);break}case"g":break;default:{console.info(`[PIXI.SVG] <${i.nodeName}> elements unsupported`);break}}this._svgChildren(i.children,!0)}}_hexToUint(t){if(t[0]==="#")return t=t.substr(1),t.length===3&&(t=t.replace(/([a-f0-9])/ig,"$1$1")),parseInt(t,16);const{r,g:n,b:i}=Tt(t).toRgb();return(r<<16)+(n<<8)+i}_svgCircle(t){let r="r",n="r";const i=t.nodeName==="elipse";i&&(r+="x",n+="y");const o=parseFloat(t.getAttribute(n)),a=parseFloat(t.getAttribute(r)),u=t.getAttribute("cx"),f=t.getAttribute("cy");let h=0,d=0;u!==null&&(h=parseFloat(u)),f!==null&&(d=parseFloat(f)),i?this.drawEllipse(h,d,o,a):this.drawCircle(h,d,o)}_svgRect(t){const r=parseFloat(t.getAttribute("x")),n=parseFloat(t.getAttribute("y")),i=parseFloat(t.getAttribute("width")),o=parseFloat(t.getAttribute("height")),a=parseFloat(t.getAttribute("rx"));a?this.drawRoundedRect(r,n,i,o,a):this.drawRect(r,n,i,o)}_convertStyleName(t){return t.trim().replace("-width","Width").replace(/.*-(line)?/,"")}_svgStyle(t){const r=t.getAttribute("style"),n=t.getAttribute("opacity"),i={fill:t.getAttribute("fill"),opacity:n||t.getAttribute("fill-opacity"),stroke:t.getAttribute("stroke"),strokeOpacity:n||t.getAttribute("stroke-opacity"),strokeWidth:t.getAttribute("stroke-width"),cap:t.getAttribute("stroke-linecap"),join:t.getAttribute("stroke-linejoin"),miterLimit:t.getAttribute("stroke-miterlimit")};return r!==null&&r.split(";").forEach(o=>{const[a,u]=o.split(":");if(a){const f=this._convertStyleName(a);i[f]||(i[f]=u.trim())}}),i}_svgPoly(t,r){const n=t.getAttribute("points").split(/[ ,]/g).map(i=>parseInt(i,10));this.drawPolygon(n),r&&this.closePath()}_svgFill(t,r){const{fill:n,opacity:i,stroke:o,strokeOpacity:a,strokeWidth:u,cap:f,join:h,miterLimit:d}=this._svgStyle(t),c=u!==null?parseFloat(u):o!==null?1:0,v=o!==null?this._hexToUint(o):this.lineColor;n?n==="none"?this.beginFill(0,0):this.beginFill(this._hexToUint(n),i!==null?parseFloat(i):1):r||this.beginFill(0),this.lineStyle({width:o===null&&u===null&&r?this.line.width:c,alpha:a===null?this.line.alpha:parseFloat(a),color:o===null&&r?this.line.color:v,cap:f===null&&r?this.line.cap:f,join:h===null&&r?this.line.join:h,miterLimit:d===null&&r?this.line.miterLimit:parseFloat(d)}),t.getAttribute("fill-rule")&&console.info('[PIXI.SVG] "fill-rule" attribute is not supported')}_svgPath(t){const r=t.getAttribute("d");let n=0,i=0;const o=Nu(r.trim());for(let a=0;a<o.length;a++){const u=o[a];switch(u.code){case"m":{this.moveTo(n+=u.end.x,i+=u.end.y);break}case"M":{this.moveTo(n=u.end.x,i=u.end.y);break}case"H":{this.lineTo(n=u.value,i);break}case"h":{this.lineTo(n+=u.value,i);break}case"V":{this.lineTo(n,i=u.value);break}case"v":{this.lineTo(n,i+=u.value);break}case"Z":{this.closePath();break}case"L":{this.lineTo(n=u.end.x,i=u.end.y);break}case"l":{this.lineTo(n+=u.end.x,i+=u.end.y);break}case"C":{this.bezierCurveTo(u.cp1.x,u.cp1.y,u.cp2.x,u.cp2.y,n=u.end.x,i=u.end.y);break}case"c":{const f=n,h=i;this.bezierCurveTo(f+u.cp1.x,h+u.cp1.y,f+u.cp2.x,h+u.cp2.y,n+=u.end.x,i+=u.end.y);break}case"s":case"q":{const f=n,h=i;this.quadraticCurveTo(f+u.cp.x,h+u.cp.y,n+=u.end.x,i+=u.end.y);break}case"S":case"Q":{this.quadraticCurveTo(u.cp.x,u.cp.y,n=u.end.x,i=u.end.y);break}case"a":{kp({px:n,py:i,cx:n+=u.end.x,cy:i+=u.end.y,rx:u.radii.x,ry:u.radii.y,xAxisRotation:u.rotation,largeArcFlag:u.large?1:0,sweepFlag:u.clockwise?1:0}).forEach(({x1:f,y1:h,x2:d,y2:p,x:c,y:v})=>this.bezierCurveTo(f,h,d,p,c,v));break}case"A":{kp({px:n,py:i,cx:n=u.end.x,cy:i=u.end.y,rx:u.radii.x,ry:u.radii.y,xAxisRotation:u.rotation,largeArcFlag:u.large?1:0,sweepFlag:u.clockwise?1:0}).forEach(({x1:f,y1:h,x2:d,y2:p,x:c,y:v})=>this.bezierCurveTo(f,h,d,p,c,v));break}default:{console.info("[PIXI.SVG] Draw command not supported:",u.code,u);break}}}}}var Go={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},M2=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function k2(e){return e===10||e===13||e===8232||e===8233||e===32||e===9||e===11||e===12||e===160||e>=5760&&M2.indexOf(e)>=0}function L2(e){switch(e|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:case 114:return!0}return!1}function F2(e){return(e|32)===97}function Ri(e){return e>=48&&e<=57}function B2(e){return e>=48&&e<=57||e===43||e===45||e===46}function D2(e){this.index=0,this.path=e,this.max=e.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function jo(e){for(;e.index<e.max&&k2(e.path.charCodeAt(e.index));)e.index++}function U2(e){var t=e.path.charCodeAt(e.index);if(t===48){e.param=0,e.index++;return}if(t===49){e.param=1,e.index++;return}e.err="SvgPath: arc flag can be 0 or 1 only (at pos "+e.index+")"}function $2(e){var t=e.index,r=t,n=e.max,i=!1,o=!1,a=!1,u=!1,f;if(r>=n){e.err="SvgPath: missed param (at pos "+r+")";return}if(f=e.path.charCodeAt(r),(f===43||f===45)&&(r++,f=r<n?e.path.charCodeAt(r):0),!Ri(f)&&f!==46){e.err="SvgPath: param should start with 0..9 or `.` (at pos "+r+")";return}if(f!==46){if(i=f===48,r++,f=r<n?e.path.charCodeAt(r):0,i&&r<n&&f&&Ri(f)){e.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+t+")";return}for(;r<n&&Ri(e.path.charCodeAt(r));)r++,o=!0;f=r<n?e.path.charCodeAt(r):0}if(f===46){for(u=!0,r++;Ri(e.path.charCodeAt(r));)r++,a=!0;f=r<n?e.path.charCodeAt(r):0}if(f===101||f===69){if(u&&!o&&!a){e.err="SvgPath: invalid float exponent (at pos "+r+")";return}if(r++,f=r<n?e.path.charCodeAt(r):0,(f===43||f===45)&&r++,r<n&&Ri(e.path.charCodeAt(r)))for(;r<n&&Ri(e.path.charCodeAt(r));)r++;else{e.err="SvgPath: invalid float exponent (at pos "+r+")";return}}e.index=r,e.param=parseFloat(e.path.slice(t,r))+0}function Lu(e){var t,r;t=e.path[e.segmentStart],r=t.toLowerCase();var n=e.data;if(r==="m"&&n.length>2&&(e.result.push([t,n[0],n[1]]),n=n.slice(2),r="l",t=t==="m"?"l":"L"),r==="r")e.result.push([t].concat(n));else for(;n.length>=Go[r]&&(e.result.push([t].concat(n.splice(0,Go[r]))),!!Go[r]););}function G2(e){var t=e.max,r,n,i,o,a;if(e.segmentStart=e.index,r=e.path.charCodeAt(e.index),n=F2(r),!L2(r)){e.err="SvgPath: bad command "+e.path[e.index]+" (at pos "+e.index+")";return}if(o=Go[e.path[e.index].toLowerCase()],e.index++,jo(e),e.data=[],!o){Lu(e);return}for(i=!1;;){for(a=o;a>0;a--){if(n&&(a===3||a===4)?U2(e):$2(e),e.err.length){Lu(e);return}e.data.push(e.param),jo(e),i=!1,e.index<t&&e.path.charCodeAt(e.index)===44&&(e.index++,jo(e),i=!0)}if(!i&&(e.index>=e.max||!B2(e.path.charCodeAt(e.index))))break}Lu(e)}var j2=function(t){var r=new D2(t),n=r.max;for(jo(r);r.index<n&&!r.err.length;)G2(r);return r.result.length&&("mM".indexOf(r.result[0][0])<0?(r.err="SvgPath: string should start with `M` or `m`",r.result=[]):r.result[0][0]="M"),{err:r.err,segments:r.result}};function q2(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}function Cr(){if(!(this instanceof Cr))return new Cr;this.queue=[],this.cache=null}Cr.prototype.matrix=function(e){return e[0]===1&&e[1]===0&&e[2]===0&&e[3]===1&&e[4]===0&&e[5]===0?this:(this.cache=null,this.queue.push(e),this)},Cr.prototype.translate=function(e,t){return(e!==0||t!==0)&&(this.cache=null,this.queue.push([1,0,0,1,e,t])),this},Cr.prototype.scale=function(e,t){return(e!==1||t!==1)&&(this.cache=null,this.queue.push([e,0,0,t,0,0])),this},Cr.prototype.rotate=function(e,t,r){var n,i,o;return e!==0&&(this.translate(t,r),n=e*Math.PI/180,i=Math.cos(n),o=Math.sin(n),this.queue.push([i,o,-o,i,0,0]),this.cache=null,this.translate(-t,-r)),this},Cr.prototype.skewX=function(e){return e!==0&&(this.cache=null,this.queue.push([1,0,Math.tan(e*Math.PI/180),1,0,0])),this},Cr.prototype.skewY=function(e){return e!==0&&(this.cache=null,this.queue.push([1,Math.tan(e*Math.PI/180),0,1,0,0])),this},Cr.prototype.toArray=function(){if(this.cache)return this.cache;if(!this.queue.length)return this.cache=[1,0,0,1,0,0],this.cache;if(this.cache=this.queue[0],this.queue.length===1)return this.cache;for(var e=1;e<this.queue.length;e++)this.cache=q2(this.cache,this.queue[e]);return this.cache},Cr.prototype.calc=function(e,t,r){var n;return this.queue.length?(this.cache||(this.cache=this.toArray()),n=this.cache,[e*n[0]+t*n[2]+(r?0:n[4]),e*n[1]+t*n[3]+(r?0:n[5])]):[e,t]};var Lp=Cr,z2=Lp,H2={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},V2=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,W2=/[\s,]+/,X2=function(t){var r=new z2,n,i;return t.split(V2).forEach(function(o){if(o.length){if(typeof H2[o]<"u"){n=o;return}switch(i=o.split(W2).map(function(a){return+a||0}),n){case"matrix":i.length===6&&r.matrix(i);return;case"scale":i.length===1?r.scale(i[0],i[0]):i.length===2&&r.scale(i[0],i[1]);return;case"rotate":i.length===1?r.rotate(i[0],0,0):i.length===3&&r.rotate(i[0],i[1],i[2]);return;case"translate":i.length===1?r.translate(i[0],0):i.length===2&&r.translate(i[0],i[1]);return;case"skewX":i.length===1&&r.skewX(i[0]);return;case"skewY":i.length===1&&r.skewY(i[0]);return}}}),r},xs=Math.PI*2;function Fp(e,t,r,n){var i=e*n-t*r<0?-1:1,o=e*r+t*n;return o>1&&(o=1),o<-1&&(o=-1),i*Math.acos(o)}function K2(e,t,r,n,i,o,a,u,f,h){var d=h*(e-r)/2+f*(t-n)/2,p=-f*(e-r)/2+h*(t-n)/2,c=a*a,v=u*u,y=d*d,b=p*p,_=c*v-c*b-v*y;_<0&&(_=0),_/=c*b+v*y,_=Math.sqrt(_)*(i===o?-1:1);var m=_*a/u*p,w=_*-u/a*d,T=h*m-f*w+(e+r)/2,x=f*m+h*w+(t+n)/2,E=(d-m)/a,I=(p-w)/u,A=(-d-m)/a,O=(-p-w)/u,L=Fp(1,0,E,I),R=Fp(E,I,A,O);return o===0&&R>0&&(R-=xs),o===1&&R<0&&(R+=xs),[T,x,L,R]}function Y2(e,t){var r=1.3333333333333333*Math.tan(t/4),n=Math.cos(e),i=Math.sin(e),o=Math.cos(e+t),a=Math.sin(e+t);return[n,i,n-i*r,i+n*r,o+a*r,a-o*r,o,a]}var Z2=function(t,r,n,i,o,a,u,f,h){var d=Math.sin(h*xs/360),p=Math.cos(h*xs/360),c=p*(t-n)/2+d*(r-i)/2,v=-d*(t-n)/2+p*(r-i)/2;if(c===0&&v===0)return[];if(u===0||f===0)return[];u=Math.abs(u),f=Math.abs(f);var y=c*c/(u*u)+v*v/(f*f);y>1&&(u*=Math.sqrt(y),f*=Math.sqrt(y));var b=K2(t,r,n,i,o,a,u,f,d,p),_=[],m=b[2],w=b[3],T=Math.max(Math.ceil(Math.abs(w)/(xs/4)),1);w/=T;for(var x=0;x<T;x++)_.push(Y2(m,w)),m+=w;return _.map(function(E){for(var I=0;I<E.length;I+=2){var A=E[I+0],O=E[I+1];A*=u,O*=f;var L=p*A-d*O,R=d*A+p*O;E[I+0]=L+b[0],E[I+1]=R+b[1]}return E})},ws=1e-10,Bp=Math.PI/180;function Ts(e,t,r){if(!(this instanceof Ts))return new Ts(e,t,r);this.rx=e,this.ry=t,this.ax=r}Ts.prototype.transform=function(e){var t=Math.cos(this.ax*Bp),r=Math.sin(this.ax*Bp),n=[this.rx*(e[0]*t+e[2]*r),this.rx*(e[1]*t+e[3]*r),this.ry*(-e[0]*r+e[2]*t),this.ry*(-e[1]*r+e[3]*t)],i=n[0]*n[0]+n[2]*n[2],o=n[1]*n[1]+n[3]*n[3],a=((n[0]-n[3])*(n[0]-n[3])+(n[2]+n[1])*(n[2]+n[1]))*((n[0]+n[3])*(n[0]+n[3])+(n[2]-n[1])*(n[2]-n[1])),u=(i+o)/2;if(a<ws*u)return this.rx=this.ry=Math.sqrt(u),this.ax=0,this;var f=n[0]*n[1]+n[2]*n[3];a=Math.sqrt(a);var h=u+a/2,d=u-a/2;return this.ax=Math.abs(f)<ws&&Math.abs(h-o)<ws?90:Math.atan(Math.abs(f)>Math.abs(h-o)?(h-i)/f:f/(h-o))*180/Math.PI,this.ax>=0?(this.rx=Math.sqrt(h),this.ry=Math.sqrt(d)):(this.ax+=90,this.rx=Math.sqrt(d),this.ry=Math.sqrt(h)),this},Ts.prototype.isDegenerate=function(){return this.rx<ws*this.ry||this.ry<ws*this.rx};var Q2=Ts,J2=j2,tS=X2,pn=Lp,eS=Z2,rS=Q2;function ge(e){if(!(this instanceof ge))return new ge(e);var t=J2(e);this.segments=t.segments,this.err=t.err,this.__stack=[]}ge.from=function(e){if(typeof e=="string")return new ge(e);if(e instanceof ge){var t=new ge("");return t.err=e.err,t.segments=e.segments.map(function(r){return r.slice()}),t.__stack=e.__stack.map(function(r){return pn().matrix(r.toArray())}),t}throw new Error("SvgPath.from: invalid param type "+e)},ge.prototype.__matrix=function(e){var t=this,r;e.queue.length&&this.iterate(function(n,i,o,a){var u,f,h,d;switch(n[0]){case"v":u=e.calc(0,n[1],!0),f=u[0]===0?["v",u[1]]:["l",u[0],u[1]];break;case"V":u=e.calc(o,n[1],!1),f=u[0]===e.calc(o,a,!1)[0]?["V",u[1]]:["L",u[0],u[1]];break;case"h":u=e.calc(n[1],0,!0),f=u[1]===0?["h",u[0]]:["l",u[0],u[1]];break;case"H":u=e.calc(n[1],a,!1),f=u[1]===e.calc(o,a,!1)[1]?["H",u[0]]:["L",u[0],u[1]];break;case"a":case"A":var p=e.toArray(),c=rS(n[1],n[2],n[3]).transform(p);if(p[0]*p[3]-p[1]*p[2]<0&&(n[5]=n[5]?"0":"1"),u=e.calc(n[6],n[7],n[0]==="a"),n[0]==="A"&&n[6]===o&&n[7]===a||n[0]==="a"&&n[6]===0&&n[7]===0){f=[n[0]==="a"?"l":"L",u[0],u[1]];break}c.isDegenerate()?f=[n[0]==="a"?"l":"L",u[0],u[1]]:f=[n[0],c.rx,c.ry,c.ax,n[4],n[5],u[0],u[1]];break;case"m":d=i>0,u=e.calc(n[1],n[2],d),f=["m",u[0],u[1]];break;default:for(h=n[0],f=[h],d=h.toLowerCase()===h,r=1;r<n.length;r+=2)u=e.calc(n[r],n[r+1],d),f.push(u[0],u[1])}t.segments[i]=f},!0)},ge.prototype.__evaluateStack=function(){var e,t;if(this.__stack.length){if(this.__stack.length===1){this.__matrix(this.__stack[0]),this.__stack=[];return}for(e=pn(),t=this.__stack.length;--t>=0;)e.matrix(this.__stack[t].toArray());this.__matrix(e),this.__stack=[]}},ge.prototype.toString=function(){var e="",t="",r=!1;this.__evaluateStack();for(var n=0,i=this.segments.length;n<i;n++){var o=this.segments[n],a=o[0];a!==t||a==="m"||a==="M"?(a==="m"&&t==="z"&&(e+=" "),e+=a,r=!1):r=!0;for(var u=1;u<o.length;u++){var f=o[u];u===1?r&&f>=0&&(e+=" "):f>=0&&(e+=" "),e+=f}t=a}return e},ge.prototype.translate=function(e,t){return this.__stack.push(pn().translate(e,t||0)),this},ge.prototype.scale=function(e,t){return this.__stack.push(pn().scale(e,!t&&t!==0?e:t)),this},ge.prototype.rotate=function(e,t,r){return this.__stack.push(pn().rotate(e,t||0,r||0)),this},ge.prototype.skewX=function(e){return this.__stack.push(pn().skewX(e)),this},ge.prototype.skewY=function(e){return this.__stack.push(pn().skewY(e)),this},ge.prototype.matrix=function(e){return this.__stack.push(pn().matrix(e)),this},ge.prototype.transform=function(e){return e.trim()?(this.__stack.push(tS(e)),this):this},ge.prototype.round=function(e){var t=0,r=0,n=0,i=0,o;return e=e||0,this.__evaluateStack(),this.segments.forEach(function(a){var u=a[0].toLowerCase()===a[0];switch(a[0]){case"H":case"h":u&&(a[1]+=n),n=a[1]-a[1].toFixed(e),a[1]=+a[1].toFixed(e);return;case"V":case"v":u&&(a[1]+=i),i=a[1]-a[1].toFixed(e),a[1]=+a[1].toFixed(e);return;case"Z":case"z":n=t,i=r;return;case"M":case"m":u&&(a[1]+=n,a[2]+=i),n=a[1]-a[1].toFixed(e),i=a[2]-a[2].toFixed(e),t=n,r=i,a[1]=+a[1].toFixed(e),a[2]=+a[2].toFixed(e);return;case"A":case"a":u&&(a[6]+=n,a[7]+=i),n=a[6]-a[6].toFixed(e),i=a[7]-a[7].toFixed(e),a[1]=+a[1].toFixed(e),a[2]=+a[2].toFixed(e),a[3]=+a[3].toFixed(e+2),a[6]=+a[6].toFixed(e),a[7]=+a[7].toFixed(e);return;default:o=a.length,u&&(a[o-2]+=n,a[o-1]+=i),n=a[o-2]-a[o-2].toFixed(e),i=a[o-1]-a[o-1].toFixed(e),a.forEach(function(f,h){h&&(a[h]=+a[h].toFixed(e))});return}}),this},ge.prototype.iterate=function(e,t){var r=this.segments,n={},i=!1,o=0,a=0,u=0,f=0,h,d,p;if(t||this.__evaluateStack(),r.forEach(function(c,v){var y=e(c,v,o,a);Array.isArray(y)&&(n[v]=y,i=!0);var b=c[0]===c[0].toLowerCase();switch(c[0]){case"m":case"M":o=c[1]+(b?o:0),a=c[2]+(b?a:0),u=o,f=a;return;case"h":case"H":o=c[1]+(b?o:0);return;case"v":case"V":a=c[1]+(b?a:0);return;case"z":case"Z":o=u,a=f;return;default:o=c[c.length-2]+(b?o:0),a=c[c.length-1]+(b?a:0)}}),!i)return this;for(p=[],h=0;h<r.length;h++)if(typeof n[h]<"u")for(d=0;d<n[h].length;d++)p.push(n[h][d]);else p.push(r[h]);return this.segments=p,this},ge.prototype.abs=function(){return this.iterate(function(e,t,r,n){var i=e[0],o=i.toUpperCase(),a;if(i!==o)switch(e[0]=o,i){case"v":e[1]+=n;return;case"a":e[6]+=r,e[7]+=n;return;default:for(a=1;a<e.length;a++)e[a]+=a%2?r:n}},!0),this},ge.prototype.rel=function(){return this.iterate(function(e,t,r,n){var i=e[0],o=i.toLowerCase(),a;if(i!==o&&!(t===0&&i==="M"))switch(e[0]=o,i){case"V":e[1]-=n;return;case"A":e[6]-=r,e[7]-=n;return;default:for(a=1;a<e.length;a++)e[a]-=a%2?r:n}},!0),this},ge.prototype.unarc=function(){return this.iterate(function(e,t,r,n){var i,o,a,u=[],f=e[0];return f!=="A"&&f!=="a"?null:(f==="a"?(o=r+e[6],a=n+e[7]):(o=e[6],a=e[7]),i=eS(r,n,o,a,e[4],e[5],e[1],e[2],e[3]),i.length===0?[[e[0]==="a"?"l":"L",e[6],e[7]]]:(i.forEach(function(h){u.push(["C",h[2],h[3],h[4],h[5],h[6],h[7]])}),u))}),this},ge.prototype.unshort=function(){var e=this.segments,t,r,n,i,o;return this.iterate(function(a,u,f,h){var d=a[0],p=d.toUpperCase(),c;u&&(p==="T"?(c=d==="t",n=e[u-1],n[0]==="Q"?(t=n[1]-f,r=n[2]-h):n[0]==="q"?(t=n[1]-n[3],r=n[2]-n[4]):(t=0,r=0),i=-t,o=-r,c||(i+=f,o+=h),e[u]=[c?"q":"Q",i,o,a[1],a[2]]):p==="S"&&(c=d==="s",n=e[u-1],n[0]==="C"?(t=n[3]-f,r=n[4]-h):n[0]==="c"?(t=n[3]-n[5],r=n[4]-n[6]):(t=0,r=0),i=-t,o=-r,c||(i+=f,o+=h),e[u]=[c?"c":"C",i,o,a[1],a[2],a[3],a[4]]))}),this};var nS=ge,iS=nS;const sS=En(iS),oS=Et.forwardRef((e,t)=>{const[r,n]=Et.useState(null),i=mt.useRef(null),o=mt.useRef(null),a=mt.useRef(null),{path:u,transformation:{x:f,y:h,width:d,height:p,anchor:c,hexColor:v,fill:y,stroke:b="none",strokeWidth:_=0,colorCorrection:m={}},pointerdown:w,pointerup:T}=e,x=le.useApp(),{temperatureFilter:E,sharpnessFilter:I,hueFilter:A,blurFilter:O,adjustmentFilter:L}=ys(m),{blurRadius:R=0}=m;return Et.useEffect(()=>{const C=sS(u).scale(5).translate(0,0).toString(),P=`<svg xmlns="http://www.w3.org/2000/svg" width="${d}" height="${p}">
1932
- <path stroke="${b}" stroke-width="${_}" fill="${v||y}" d="${C}">
1931
+ */(function(e,t){(function(r,n){e.exports=n()})(n2,function(){return function(n){for(var i={command:/\s*([achlmqstvz])/gi,number:/\s*([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/gi,comma:/\s*(?:(,)|\s)/g,flag:/\s*([01])/g},o={number:function(_){return+v("number",_)},"coordinate pair":function(_){var b=v("number",_);if(b===null&&!_)return null;v("comma");var m=v("number",!0);return{x:+b,y:+m}},"arc definition":function(_){var b=o["coordinate pair"](_);if(!b&&!_)return null;v("comma");var m=+v("number",!0);v("comma",!0);var w=!!+v("flag",!0);v("comma");var T=!!+v("flag",!0);v("comma");var x=o["coordinate pair"](!0);return{radii:b,rotation:m,large:w,clockwise:T,end:x}}},a=0,u=[];a<n.length;){var f=v("command"),h=f.toUpperCase(),d=f!==h,p;switch(h){case"M":p=y("coordinate pair").map(function(_,b){return b===1&&(f=d?"l":"L"),c({end:_})});break;case"L":case"T":p=y("coordinate pair").map(function(_){return c({end:_})});break;case"C":if(p=y("coordinate pair"),p.length%3)throw Error("Expected coordinate pair triplet at position "+a);p=p.reduce(function(_,b,m){var w=m%3;if(!w)_.push(c({cp1:b}));else{var T=_[_.length-1];T[w===1?"cp2":"end"]=b}return _},[]);break;case"Q":case"S":if(p=y("coordinate pair"),p.length&1)throw Error("Expected coordinate pair couple at position "+a);p=p.reduce(function(_,b,m){var w=m&1;if(!w)_.push(c({cp:b}));else{var T=_[_.length-1];T.end=b}return _},[]);break;case"H":case"V":p=y("number").map(function(_){return c({value:_})});break;case"A":p=y("arc definition").map(c);break;case"Z":p=[{code:"Z"}];break}u.push.apply(u,p)}return u;function c(_){return _.code=f,_.relative=d,_}function v(_,b){i[_].lastIndex=a;var m=i[_].exec(n);if(!m||m.index!==a){if(!b)return null;throw Error("Expected "+_+" at position "+a)}return a=i[_].lastIndex,m[1]}function y(_){for(var b=[],m,w=!0;m=o[_](w);)b.push(m),w=!!v("comma");return b}}})})(i2);const s2=/^\s+/,o2=/\s+$/;function Tt(e,t){if(e=e||"",t=t||{},e instanceof Tt)return e;if(!(this instanceof Tt))return new Tt(e,t);var r=a2(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}Tt.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),t,r,n,i,o,a;return t=e.r/255,r=e.g/255,n=e.b/255,t<=.03928?i=t/12.92:i=Math.pow((t+.055)/1.055,2.4),r<=.03928?o=r/12.92:o=Math.pow((r+.055)/1.055,2.4),n<=.03928?a=n/12.92:a=Math.pow((n+.055)/1.055,2.4),.2126*i+.7152*o+.0722*a},setAlpha:function(e){return this._a=Ip(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Ap(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Ap(this._r,this._g,this._b),t=Math.round(e.h*360),r=Math.round(e.s*100),n=Math.round(e.v*100);return this._a==1?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=Sp(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Sp(this._r,this._g,this._b),t=Math.round(e.h*360),r=Math.round(e.s*100),n=Math.round(e.l*100);return this._a==1?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return Op(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return c2(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(ce(this._r,255)*100)+"%",g:Math.round(ce(this._g,255)*100)+"%",b:Math.round(ce(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(ce(this._r,255)*100)+"%, "+Math.round(ce(this._g,255)*100)+"%, "+Math.round(ce(this._b,255)*100)+"%)":"rgba("+Math.round(ce(this._r,255)*100)+"%, "+Math.round(ce(this._g,255)*100)+"%, "+Math.round(ce(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:T2[Op(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t="#"+Cp(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var i=Tt(e);r="#"+Cp(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0,i=!t&&n&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return i?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return Tt(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(v2,arguments)},brighten:function(){return this._applyModification(g2,arguments)},darken:function(){return this._applyModification(m2,arguments)},desaturate:function(){return this._applyModification(h2,arguments)},saturate:function(){return this._applyModification(d2,arguments)},greyscale:function(){return this._applyModification(p2,arguments)},spin:function(){return this._applyModification(y2,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(x2,arguments)},complement:function(){return this._applyCombination(_2,arguments)},monochromatic:function(){return this._applyCombination(w2,arguments)},splitcomplement:function(){return this._applyCombination(b2,arguments)},triad:function(){return this._applyCombination(Rp,[3])},tetrad:function(){return this._applyCombination(Rp,[4])}},Tt.fromRatio=function(e,t){if(typeof e=="object"){var r={};for(var n in e)e.hasOwnProperty(n)&&(n==="a"?r[n]=e[n]:r[n]=bs(e[n]));e=r}return Tt(e,t)};function a2(e){var t={r:0,g:0,b:0},r=1,n=null,i=null,o=null,a=!1,u=!1;return typeof e=="string"&&(e=O2(e)),typeof e=="object"&&(Kr(e.r)&&Kr(e.g)&&Kr(e.b)?(t=l2(e.r,e.g,e.b),a=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Kr(e.h)&&Kr(e.s)&&Kr(e.v)?(n=bs(e.s),i=bs(e.v),t=f2(e.h,n,i),a=!0,u="hsv"):Kr(e.h)&&Kr(e.s)&&Kr(e.l)&&(n=bs(e.s),o=bs(e.l),t=u2(e.h,n,o),a=!0,u="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=Ip(r),{ok:a,format:e.format||u,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}function l2(e,t,r){return{r:ce(e,255)*255,g:ce(t,255)*255,b:ce(r,255)*255}}function Sp(e,t,r){e=ce(e,255),t=ce(t,255),r=ce(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),o,a,u=(n+i)/2;if(n==i)o=a=0;else{var f=n-i;switch(a=u>.5?f/(2-n-i):f/(n+i),n){case e:o=(t-r)/f+(t<r?6:0);break;case t:o=(r-e)/f+2;break;case r:o=(e-t)/f+4;break}o/=6}return{h:o,s:a,l:u}}function u2(e,t,r){var n,i,o;e=ce(e,360),t=ce(t,100),r=ce(r,100);function a(h,d,p){return p<0&&(p+=1),p>1&&(p-=1),p<1/6?h+(d-h)*6*p:p<1/2?d:p<2/3?h+(d-h)*(2/3-p)*6:h}if(t===0)n=i=o=r;else{var u=r<.5?r*(1+t):r+t-r*t,f=2*r-u;n=a(f,u,e+1/3),i=a(f,u,e),o=a(f,u,e-1/3)}return{r:n*255,g:i*255,b:o*255}}function Ap(e,t,r){e=ce(e,255),t=ce(t,255),r=ce(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),o,a,u=n,f=n-i;if(a=n===0?0:f/n,n==i)o=0;else{switch(n){case e:o=(t-r)/f+(t<r?6:0);break;case t:o=(r-e)/f+2;break;case r:o=(e-t)/f+4;break}o/=6}return{h:o,s:a,v:u}}function f2(e,t,r){e=ce(e,360)*6,t=ce(t,100),r=ce(r,100);var n=Math.floor(e),i=e-n,o=r*(1-t),a=r*(1-i*t),u=r*(1-(1-i)*t),f=n%6,h=[r,a,o,o,u,r][f],d=[u,r,r,a,o,o][f],p=[o,o,u,r,r,a][f];return{r:h*255,g:d*255,b:p*255}}function Op(e,t,r,n){var i=[Ar(Math.round(e).toString(16)),Ar(Math.round(t).toString(16)),Ar(Math.round(r).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function c2(e,t,r,n,i){var o=[Ar(Math.round(e).toString(16)),Ar(Math.round(t).toString(16)),Ar(Math.round(r).toString(16)),Ar(Pp(n))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function Cp(e,t,r,n){var i=[Ar(Pp(n)),Ar(Math.round(e).toString(16)),Ar(Math.round(t).toString(16)),Ar(Math.round(r).toString(16))];return i.join("")}Tt.equals=function(e,t){return!e||!t?!1:Tt(e).toRgbString()==Tt(t).toRgbString()},Tt.random=function(){return Tt.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function h2(e,t){t=t===0?0:t||10;var r=Tt(e).toHsl();return r.s-=t/100,r.s=Go(r.s),Tt(r)}function d2(e,t){t=t===0?0:t||10;var r=Tt(e).toHsl();return r.s+=t/100,r.s=Go(r.s),Tt(r)}function p2(e){return Tt(e).desaturate(100)}function v2(e,t){t=t===0?0:t||10;var r=Tt(e).toHsl();return r.l+=t/100,r.l=Go(r.l),Tt(r)}function g2(e,t){t=t===0?0:t||10;var r=Tt(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),Tt(r)}function m2(e,t){t=t===0?0:t||10;var r=Tt(e).toHsl();return r.l-=t/100,r.l=Go(r.l),Tt(r)}function y2(e,t){var r=Tt(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,Tt(r)}function _2(e){var t=Tt(e).toHsl();return t.h=(t.h+180)%360,Tt(t)}function Rp(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=Tt(e).toHsl(),n=[Tt(e)],i=360/t,o=1;o<t;o++)n.push(Tt({h:(r.h+o*i)%360,s:r.s,l:r.l}));return n}function b2(e){var t=Tt(e).toHsl(),r=t.h;return[Tt(e),Tt({h:(r+72)%360,s:t.s,l:t.l}),Tt({h:(r+216)%360,s:t.s,l:t.l})]}function x2(e,t,r){t=t||6,r=r||30;var n=Tt(e).toHsl(),i=360/r,o=[Tt(e)];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,o.push(Tt(n));return o}function w2(e,t){t=t||6;for(var r=Tt(e).toHsv(),n=r.h,i=r.s,o=r.v,a=[],u=1/t;t--;)a.push(Tt({h:n,s:i,v:o})),o=(o+u)%1;return a}Tt.mix=function(e,t,r){r=r===0?0:r||50;var n=Tt(e).toRgb(),i=Tt(t).toRgb(),o=r/100,a={r:(i.r-n.r)*o+n.r,g:(i.g-n.g)*o+n.g,b:(i.b-n.b)*o+n.b,a:(i.a-n.a)*o+n.a};return Tt(a)},Tt.readability=function(e,t){var r=Tt(e),n=Tt(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},Tt.isReadable=function(e,t,r){var n=Tt.readability(e,t),i,o;switch(o=!1,i=C2(r),i.level+i.size){case"AAsmall":case"AAAlarge":o=n>=4.5;break;case"AAlarge":o=n>=3;break;case"AAAsmall":o=n>=7;break}return o},Tt.mostReadable=function(e,t,r){var n=null,i=0,o,a,u,f;r=r||{},a=r.includeFallbackColors,u=r.level,f=r.size;for(var h=0;h<t.length;h++)o=Tt.readability(e,t[h]),o>i&&(i=o,n=Tt(t[h]));return Tt.isReadable(e,n,{level:u,size:f})||!a?n:(r.includeFallbackColors=!1,Tt.mostReadable(e,["#fff","#000"],r))};var ku=Tt.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},T2=Tt.hexNames=E2(ku);function E2(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function Ip(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function ce(e,t){S2(e)&&(e="100%");var r=A2(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Go(e){return Math.min(1,Math.max(0,e))}function tr(e){return parseInt(e,16)}function S2(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function A2(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Ar(e){return e.length==1?"0"+e:""+e}function bs(e){return e<=1&&(e=e*100+"%"),e}function Pp(e){return Math.round(parseFloat(e)*255).toString(16)}function Np(e){return tr(e)/255}var Or=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",r="(?:"+t+")|(?:"+e+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Kr(e){return!!Or.CSS_UNIT.exec(e)}function O2(e){e=e.replace(s2,"").replace(o2,"").toLowerCase();var t=!1;if(ku[e])e=ku[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=Or.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=Or.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Or.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=Or.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Or.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=Or.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Or.hex8.exec(e))?{r:tr(r[1]),g:tr(r[2]),b:tr(r[3]),a:Np(r[4]),format:t?"name":"hex8"}:(r=Or.hex6.exec(e))?{r:tr(r[1]),g:tr(r[2]),b:tr(r[3]),format:t?"name":"hex"}:(r=Or.hex4.exec(e))?{r:tr(r[1]+""+r[1]),g:tr(r[2]+""+r[2]),b:tr(r[3]+""+r[3]),a:Np(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=Or.hex3.exec(e))?{r:tr(r[1]+""+r[1]),g:tr(r[2]+""+r[2]),b:tr(r[3]+""+r[3]),format:t?"name":"hex"}:!1}function C2(e){var t,r;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:t,size:r}}var R2=function(){function e(t,r){var n=[],i=!0,o=!1,a=void 0;try{for(var u=t[Symbol.iterator](),f;!(i=(f=u.next()).done)&&(n.push(f.value),!(r&&n.length===r));i=!0);}catch(h){o=!0,a=h}finally{try{!i&&u.return&&u.return()}finally{if(o)throw a}}return n}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),xs=Math.PI*2,Lu=function(t,r,n,i,o,a,u){var f=t.x,h=t.y;f*=r,h*=n;var d=i*f-o*h,p=o*f+i*h;return{x:d+a,y:p+u}},I2=function(t,r){var n=r===1.5707963267948966?.551915024494:r===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(r/4),i=Math.cos(t),o=Math.sin(t),a=Math.cos(t+r),u=Math.sin(t+r);return[{x:i-o*n,y:o+i*n},{x:a+u*n,y:u-a*n},{x:a,y:u}]},Mp=function(t,r,n,i){var o=t*i-r*n<0?-1:1,a=t*n+r*i;return a>1&&(a=1),a<-1&&(a=-1),o*Math.acos(a)},P2=function(t,r,n,i,o,a,u,f,h,d,p,c){var v=Math.pow(o,2),y=Math.pow(a,2),_=Math.pow(p,2),b=Math.pow(c,2),m=v*y-v*b-y*_;m<0&&(m=0),m/=v*b+y*_,m=Math.sqrt(m)*(u===f?-1:1);var w=m*o/a*c,T=m*-a/o*p,x=d*w-h*T+(t+n)/2,E=h*w+d*T+(r+i)/2,I=(p-w)/o,O=(c-T)/a,A=(-p-w)/o,L=(-c-T)/a,R=Mp(1,0,I,O),C=Mp(I,O,A,L);return f===0&&C>0&&(C-=xs),f===1&&C<0&&(C+=xs),[x,E,R,C]},kp=function(t){var r=t.px,n=t.py,i=t.cx,o=t.cy,a=t.rx,u=t.ry,f=t.xAxisRotation,h=f===void 0?0:f,d=t.largeArcFlag,p=d===void 0?0:d,c=t.sweepFlag,v=c===void 0?0:c,y=[];if(a===0||u===0)return[];var _=Math.sin(h*xs/360),b=Math.cos(h*xs/360),m=b*(r-i)/2+_*(n-o)/2,w=-_*(r-i)/2+b*(n-o)/2;if(m===0&&w===0)return[];a=Math.abs(a),u=Math.abs(u);var T=Math.pow(m,2)/Math.pow(a,2)+Math.pow(w,2)/Math.pow(u,2);T>1&&(a*=Math.sqrt(T),u*=Math.sqrt(T));var x=P2(r,n,i,o,a,u,p,v,_,b,m,w),E=R2(x,4),I=E[0],O=E[1],A=E[2],L=E[3],R=Math.abs(L)/(xs/4);Math.abs(1-R)<1e-7&&(R=1);var C=Math.max(Math.ceil(R),1);L/=C;for(var P=0;P<C;P++)y.push(I2(A,L)),A+=L;return y.map(function(M){var F=Lu(M[0],a,u,b,_,I,O),q=F.x,Z=F.y,z=Lu(M[1],a,u,b,_,I,O),nt=z.x,V=z.y,D=Lu(M[2],a,u,b,_,I,O),k=D.x,G=D.y;return{x1:q,y1:Z,x2:nt,y2:V,x:k,y:G}})};class N2 extends Nu{constructor(t){super(),this.lineColor=null,t&&this.drawSVG(t)}drawSVG(t){if(typeof t=="string"){const r=document.createElement("div");r.innerHTML=t.trim(),t=r.querySelector("svg")}if(!t)throw new Error("Missing <svg> element in SVG constructor");return this._svgFill(t),this._svgChildren(t.children),this}_svgChildren(t,r=!1){for(let n=0;n<t.length;n++){const i=t[n];switch(this._svgFill(i,r),i.nodeName.toLowerCase()){case"path":{this._svgPath(i);break}case"circle":case"ellipse":{this._svgCircle(i);break}case"rect":{this._svgRect(i);break}case"polygon":{this._svgPoly(i,!0);break}case"polyline":{this._svgPoly(i);break}case"g":break;default:{console.info(`[PIXI.SVG] <${i.nodeName}> elements unsupported`);break}}this._svgChildren(i.children,!0)}}_hexToUint(t){if(t[0]==="#")return t=t.substr(1),t.length===3&&(t=t.replace(/([a-f0-9])/ig,"$1$1")),parseInt(t,16);const{r,g:n,b:i}=Tt(t).toRgb();return(r<<16)+(n<<8)+i}_svgCircle(t){let r="r",n="r";const i=t.nodeName==="elipse";i&&(r+="x",n+="y");const o=parseFloat(t.getAttribute(n)),a=parseFloat(t.getAttribute(r)),u=t.getAttribute("cx"),f=t.getAttribute("cy");let h=0,d=0;u!==null&&(h=parseFloat(u)),f!==null&&(d=parseFloat(f)),i?this.drawEllipse(h,d,o,a):this.drawCircle(h,d,o)}_svgRect(t){const r=parseFloat(t.getAttribute("x")),n=parseFloat(t.getAttribute("y")),i=parseFloat(t.getAttribute("width")),o=parseFloat(t.getAttribute("height")),a=parseFloat(t.getAttribute("rx"));a?this.drawRoundedRect(r,n,i,o,a):this.drawRect(r,n,i,o)}_convertStyleName(t){return t.trim().replace("-width","Width").replace(/.*-(line)?/,"")}_svgStyle(t){const r=t.getAttribute("style"),n=t.getAttribute("opacity"),i={fill:t.getAttribute("fill"),opacity:n||t.getAttribute("fill-opacity"),stroke:t.getAttribute("stroke"),strokeOpacity:n||t.getAttribute("stroke-opacity"),strokeWidth:t.getAttribute("stroke-width"),cap:t.getAttribute("stroke-linecap"),join:t.getAttribute("stroke-linejoin"),miterLimit:t.getAttribute("stroke-miterlimit")};return r!==null&&r.split(";").forEach(o=>{const[a,u]=o.split(":");if(a){const f=this._convertStyleName(a);i[f]||(i[f]=u.trim())}}),i}_svgPoly(t,r){const n=t.getAttribute("points").split(/[ ,]/g).map(i=>parseInt(i,10));this.drawPolygon(n),r&&this.closePath()}_svgFill(t,r){const{fill:n,opacity:i,stroke:o,strokeOpacity:a,strokeWidth:u,cap:f,join:h,miterLimit:d}=this._svgStyle(t),c=u!==null?parseFloat(u):o!==null?1:0,v=o!==null?this._hexToUint(o):this.lineColor;n?n==="none"?this.beginFill(0,0):this.beginFill(this._hexToUint(n),i!==null?parseFloat(i):1):r||this.beginFill(0),this.lineStyle({width:o===null&&u===null&&r?this.line.width:c,alpha:a===null?this.line.alpha:parseFloat(a),color:o===null&&r?this.line.color:v,cap:f===null&&r?this.line.cap:f,join:h===null&&r?this.line.join:h,miterLimit:d===null&&r?this.line.miterLimit:parseFloat(d)}),t.getAttribute("fill-rule")&&console.info('[PIXI.SVG] "fill-rule" attribute is not supported')}_svgPath(t){const r=t.getAttribute("d");let n=0,i=0;const o=Mu(r.trim());for(let a=0;a<o.length;a++){const u=o[a];switch(u.code){case"m":{this.moveTo(n+=u.end.x,i+=u.end.y);break}case"M":{this.moveTo(n=u.end.x,i=u.end.y);break}case"H":{this.lineTo(n=u.value,i);break}case"h":{this.lineTo(n+=u.value,i);break}case"V":{this.lineTo(n,i=u.value);break}case"v":{this.lineTo(n,i+=u.value);break}case"Z":{this.closePath();break}case"L":{this.lineTo(n=u.end.x,i=u.end.y);break}case"l":{this.lineTo(n+=u.end.x,i+=u.end.y);break}case"C":{this.bezierCurveTo(u.cp1.x,u.cp1.y,u.cp2.x,u.cp2.y,n=u.end.x,i=u.end.y);break}case"c":{const f=n,h=i;this.bezierCurveTo(f+u.cp1.x,h+u.cp1.y,f+u.cp2.x,h+u.cp2.y,n+=u.end.x,i+=u.end.y);break}case"s":case"q":{const f=n,h=i;this.quadraticCurveTo(f+u.cp.x,h+u.cp.y,n+=u.end.x,i+=u.end.y);break}case"S":case"Q":{this.quadraticCurveTo(u.cp.x,u.cp.y,n=u.end.x,i=u.end.y);break}case"a":{kp({px:n,py:i,cx:n+=u.end.x,cy:i+=u.end.y,rx:u.radii.x,ry:u.radii.y,xAxisRotation:u.rotation,largeArcFlag:u.large?1:0,sweepFlag:u.clockwise?1:0}).forEach(({x1:f,y1:h,x2:d,y2:p,x:c,y:v})=>this.bezierCurveTo(f,h,d,p,c,v));break}case"A":{kp({px:n,py:i,cx:n=u.end.x,cy:i=u.end.y,rx:u.radii.x,ry:u.radii.y,xAxisRotation:u.rotation,largeArcFlag:u.large?1:0,sweepFlag:u.clockwise?1:0}).forEach(({x1:f,y1:h,x2:d,y2:p,x:c,y:v})=>this.bezierCurveTo(f,h,d,p,c,v));break}default:{console.info("[PIXI.SVG] Draw command not supported:",u.code,u);break}}}}}var jo={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},M2=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function k2(e){return e===10||e===13||e===8232||e===8233||e===32||e===9||e===11||e===12||e===160||e>=5760&&M2.indexOf(e)>=0}function L2(e){switch(e|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:case 114:return!0}return!1}function F2(e){return(e|32)===97}function Ri(e){return e>=48&&e<=57}function B2(e){return e>=48&&e<=57||e===43||e===45||e===46}function D2(e){this.index=0,this.path=e,this.max=e.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function qo(e){for(;e.index<e.max&&k2(e.path.charCodeAt(e.index));)e.index++}function U2(e){var t=e.path.charCodeAt(e.index);if(t===48){e.param=0,e.index++;return}if(t===49){e.param=1,e.index++;return}e.err="SvgPath: arc flag can be 0 or 1 only (at pos "+e.index+")"}function $2(e){var t=e.index,r=t,n=e.max,i=!1,o=!1,a=!1,u=!1,f;if(r>=n){e.err="SvgPath: missed param (at pos "+r+")";return}if(f=e.path.charCodeAt(r),(f===43||f===45)&&(r++,f=r<n?e.path.charCodeAt(r):0),!Ri(f)&&f!==46){e.err="SvgPath: param should start with 0..9 or `.` (at pos "+r+")";return}if(f!==46){if(i=f===48,r++,f=r<n?e.path.charCodeAt(r):0,i&&r<n&&f&&Ri(f)){e.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+t+")";return}for(;r<n&&Ri(e.path.charCodeAt(r));)r++,o=!0;f=r<n?e.path.charCodeAt(r):0}if(f===46){for(u=!0,r++;Ri(e.path.charCodeAt(r));)r++,a=!0;f=r<n?e.path.charCodeAt(r):0}if(f===101||f===69){if(u&&!o&&!a){e.err="SvgPath: invalid float exponent (at pos "+r+")";return}if(r++,f=r<n?e.path.charCodeAt(r):0,(f===43||f===45)&&r++,r<n&&Ri(e.path.charCodeAt(r)))for(;r<n&&Ri(e.path.charCodeAt(r));)r++;else{e.err="SvgPath: invalid float exponent (at pos "+r+")";return}}e.index=r,e.param=parseFloat(e.path.slice(t,r))+0}function Fu(e){var t,r;t=e.path[e.segmentStart],r=t.toLowerCase();var n=e.data;if(r==="m"&&n.length>2&&(e.result.push([t,n[0],n[1]]),n=n.slice(2),r="l",t=t==="m"?"l":"L"),r==="r")e.result.push([t].concat(n));else for(;n.length>=jo[r]&&(e.result.push([t].concat(n.splice(0,jo[r]))),!!jo[r]););}function G2(e){var t=e.max,r,n,i,o,a;if(e.segmentStart=e.index,r=e.path.charCodeAt(e.index),n=F2(r),!L2(r)){e.err="SvgPath: bad command "+e.path[e.index]+" (at pos "+e.index+")";return}if(o=jo[e.path[e.index].toLowerCase()],e.index++,qo(e),e.data=[],!o){Fu(e);return}for(i=!1;;){for(a=o;a>0;a--){if(n&&(a===3||a===4)?U2(e):$2(e),e.err.length){Fu(e);return}e.data.push(e.param),qo(e),i=!1,e.index<t&&e.path.charCodeAt(e.index)===44&&(e.index++,qo(e),i=!0)}if(!i&&(e.index>=e.max||!B2(e.path.charCodeAt(e.index))))break}Fu(e)}var j2=function(t){var r=new D2(t),n=r.max;for(qo(r);r.index<n&&!r.err.length;)G2(r);return r.result.length&&("mM".indexOf(r.result[0][0])<0?(r.err="SvgPath: string should start with `M` or `m`",r.result=[]):r.result[0][0]="M"),{err:r.err,segments:r.result}};function q2(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}function Cr(){if(!(this instanceof Cr))return new Cr;this.queue=[],this.cache=null}Cr.prototype.matrix=function(e){return e[0]===1&&e[1]===0&&e[2]===0&&e[3]===1&&e[4]===0&&e[5]===0?this:(this.cache=null,this.queue.push(e),this)},Cr.prototype.translate=function(e,t){return(e!==0||t!==0)&&(this.cache=null,this.queue.push([1,0,0,1,e,t])),this},Cr.prototype.scale=function(e,t){return(e!==1||t!==1)&&(this.cache=null,this.queue.push([e,0,0,t,0,0])),this},Cr.prototype.rotate=function(e,t,r){var n,i,o;return e!==0&&(this.translate(t,r),n=e*Math.PI/180,i=Math.cos(n),o=Math.sin(n),this.queue.push([i,o,-o,i,0,0]),this.cache=null,this.translate(-t,-r)),this},Cr.prototype.skewX=function(e){return e!==0&&(this.cache=null,this.queue.push([1,0,Math.tan(e*Math.PI/180),1,0,0])),this},Cr.prototype.skewY=function(e){return e!==0&&(this.cache=null,this.queue.push([1,Math.tan(e*Math.PI/180),0,1,0,0])),this},Cr.prototype.toArray=function(){if(this.cache)return this.cache;if(!this.queue.length)return this.cache=[1,0,0,1,0,0],this.cache;if(this.cache=this.queue[0],this.queue.length===1)return this.cache;for(var e=1;e<this.queue.length;e++)this.cache=q2(this.cache,this.queue[e]);return this.cache},Cr.prototype.calc=function(e,t,r){var n;return this.queue.length?(this.cache||(this.cache=this.toArray()),n=this.cache,[e*n[0]+t*n[2]+(r?0:n[4]),e*n[1]+t*n[3]+(r?0:n[5])]):[e,t]};var Lp=Cr,z2=Lp,H2={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},V2=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,W2=/[\s,]+/,X2=function(t){var r=new z2,n,i;return t.split(V2).forEach(function(o){if(o.length){if(typeof H2[o]<"u"){n=o;return}switch(i=o.split(W2).map(function(a){return+a||0}),n){case"matrix":i.length===6&&r.matrix(i);return;case"scale":i.length===1?r.scale(i[0],i[0]):i.length===2&&r.scale(i[0],i[1]);return;case"rotate":i.length===1?r.rotate(i[0],0,0):i.length===3&&r.rotate(i[0],i[1],i[2]);return;case"translate":i.length===1?r.translate(i[0],0):i.length===2&&r.translate(i[0],i[1]);return;case"skewX":i.length===1&&r.skewX(i[0]);return;case"skewY":i.length===1&&r.skewY(i[0]);return}}}),r},ws=Math.PI*2;function Fp(e,t,r,n){var i=e*n-t*r<0?-1:1,o=e*r+t*n;return o>1&&(o=1),o<-1&&(o=-1),i*Math.acos(o)}function K2(e,t,r,n,i,o,a,u,f,h){var d=h*(e-r)/2+f*(t-n)/2,p=-f*(e-r)/2+h*(t-n)/2,c=a*a,v=u*u,y=d*d,_=p*p,b=c*v-c*_-v*y;b<0&&(b=0),b/=c*_+v*y,b=Math.sqrt(b)*(i===o?-1:1);var m=b*a/u*p,w=b*-u/a*d,T=h*m-f*w+(e+r)/2,x=f*m+h*w+(t+n)/2,E=(d-m)/a,I=(p-w)/u,O=(-d-m)/a,A=(-p-w)/u,L=Fp(1,0,E,I),R=Fp(E,I,O,A);return o===0&&R>0&&(R-=ws),o===1&&R<0&&(R+=ws),[T,x,L,R]}function Y2(e,t){var r=1.3333333333333333*Math.tan(t/4),n=Math.cos(e),i=Math.sin(e),o=Math.cos(e+t),a=Math.sin(e+t);return[n,i,n-i*r,i+n*r,o+a*r,a-o*r,o,a]}var Z2=function(t,r,n,i,o,a,u,f,h){var d=Math.sin(h*ws/360),p=Math.cos(h*ws/360),c=p*(t-n)/2+d*(r-i)/2,v=-d*(t-n)/2+p*(r-i)/2;if(c===0&&v===0)return[];if(u===0||f===0)return[];u=Math.abs(u),f=Math.abs(f);var y=c*c/(u*u)+v*v/(f*f);y>1&&(u*=Math.sqrt(y),f*=Math.sqrt(y));var _=K2(t,r,n,i,o,a,u,f,d,p),b=[],m=_[2],w=_[3],T=Math.max(Math.ceil(Math.abs(w)/(ws/4)),1);w/=T;for(var x=0;x<T;x++)b.push(Y2(m,w)),m+=w;return b.map(function(E){for(var I=0;I<E.length;I+=2){var O=E[I+0],A=E[I+1];O*=u,A*=f;var L=p*O-d*A,R=d*O+p*A;E[I+0]=L+_[0],E[I+1]=R+_[1]}return E})},Ts=1e-10,Bp=Math.PI/180;function Es(e,t,r){if(!(this instanceof Es))return new Es(e,t,r);this.rx=e,this.ry=t,this.ax=r}Es.prototype.transform=function(e){var t=Math.cos(this.ax*Bp),r=Math.sin(this.ax*Bp),n=[this.rx*(e[0]*t+e[2]*r),this.rx*(e[1]*t+e[3]*r),this.ry*(-e[0]*r+e[2]*t),this.ry*(-e[1]*r+e[3]*t)],i=n[0]*n[0]+n[2]*n[2],o=n[1]*n[1]+n[3]*n[3],a=((n[0]-n[3])*(n[0]-n[3])+(n[2]+n[1])*(n[2]+n[1]))*((n[0]+n[3])*(n[0]+n[3])+(n[2]-n[1])*(n[2]-n[1])),u=(i+o)/2;if(a<Ts*u)return this.rx=this.ry=Math.sqrt(u),this.ax=0,this;var f=n[0]*n[1]+n[2]*n[3];a=Math.sqrt(a);var h=u+a/2,d=u-a/2;return this.ax=Math.abs(f)<Ts&&Math.abs(h-o)<Ts?90:Math.atan(Math.abs(f)>Math.abs(h-o)?(h-i)/f:f/(h-o))*180/Math.PI,this.ax>=0?(this.rx=Math.sqrt(h),this.ry=Math.sqrt(d)):(this.ax+=90,this.rx=Math.sqrt(d),this.ry=Math.sqrt(h)),this},Es.prototype.isDegenerate=function(){return this.rx<Ts*this.ry||this.ry<Ts*this.rx};var Q2=Es,J2=j2,tS=X2,pn=Lp,eS=Z2,rS=Q2;function ge(e){if(!(this instanceof ge))return new ge(e);var t=J2(e);this.segments=t.segments,this.err=t.err,this.__stack=[]}ge.from=function(e){if(typeof e=="string")return new ge(e);if(e instanceof ge){var t=new ge("");return t.err=e.err,t.segments=e.segments.map(function(r){return r.slice()}),t.__stack=e.__stack.map(function(r){return pn().matrix(r.toArray())}),t}throw new Error("SvgPath.from: invalid param type "+e)},ge.prototype.__matrix=function(e){var t=this,r;e.queue.length&&this.iterate(function(n,i,o,a){var u,f,h,d;switch(n[0]){case"v":u=e.calc(0,n[1],!0),f=u[0]===0?["v",u[1]]:["l",u[0],u[1]];break;case"V":u=e.calc(o,n[1],!1),f=u[0]===e.calc(o,a,!1)[0]?["V",u[1]]:["L",u[0],u[1]];break;case"h":u=e.calc(n[1],0,!0),f=u[1]===0?["h",u[0]]:["l",u[0],u[1]];break;case"H":u=e.calc(n[1],a,!1),f=u[1]===e.calc(o,a,!1)[1]?["H",u[0]]:["L",u[0],u[1]];break;case"a":case"A":var p=e.toArray(),c=rS(n[1],n[2],n[3]).transform(p);if(p[0]*p[3]-p[1]*p[2]<0&&(n[5]=n[5]?"0":"1"),u=e.calc(n[6],n[7],n[0]==="a"),n[0]==="A"&&n[6]===o&&n[7]===a||n[0]==="a"&&n[6]===0&&n[7]===0){f=[n[0]==="a"?"l":"L",u[0],u[1]];break}c.isDegenerate()?f=[n[0]==="a"?"l":"L",u[0],u[1]]:f=[n[0],c.rx,c.ry,c.ax,n[4],n[5],u[0],u[1]];break;case"m":d=i>0,u=e.calc(n[1],n[2],d),f=["m",u[0],u[1]];break;default:for(h=n[0],f=[h],d=h.toLowerCase()===h,r=1;r<n.length;r+=2)u=e.calc(n[r],n[r+1],d),f.push(u[0],u[1])}t.segments[i]=f},!0)},ge.prototype.__evaluateStack=function(){var e,t;if(this.__stack.length){if(this.__stack.length===1){this.__matrix(this.__stack[0]),this.__stack=[];return}for(e=pn(),t=this.__stack.length;--t>=0;)e.matrix(this.__stack[t].toArray());this.__matrix(e),this.__stack=[]}},ge.prototype.toString=function(){var e="",t="",r=!1;this.__evaluateStack();for(var n=0,i=this.segments.length;n<i;n++){var o=this.segments[n],a=o[0];a!==t||a==="m"||a==="M"?(a==="m"&&t==="z"&&(e+=" "),e+=a,r=!1):r=!0;for(var u=1;u<o.length;u++){var f=o[u];u===1?r&&f>=0&&(e+=" "):f>=0&&(e+=" "),e+=f}t=a}return e},ge.prototype.translate=function(e,t){return this.__stack.push(pn().translate(e,t||0)),this},ge.prototype.scale=function(e,t){return this.__stack.push(pn().scale(e,!t&&t!==0?e:t)),this},ge.prototype.rotate=function(e,t,r){return this.__stack.push(pn().rotate(e,t||0,r||0)),this},ge.prototype.skewX=function(e){return this.__stack.push(pn().skewX(e)),this},ge.prototype.skewY=function(e){return this.__stack.push(pn().skewY(e)),this},ge.prototype.matrix=function(e){return this.__stack.push(pn().matrix(e)),this},ge.prototype.transform=function(e){return e.trim()?(this.__stack.push(tS(e)),this):this},ge.prototype.round=function(e){var t=0,r=0,n=0,i=0,o;return e=e||0,this.__evaluateStack(),this.segments.forEach(function(a){var u=a[0].toLowerCase()===a[0];switch(a[0]){case"H":case"h":u&&(a[1]+=n),n=a[1]-a[1].toFixed(e),a[1]=+a[1].toFixed(e);return;case"V":case"v":u&&(a[1]+=i),i=a[1]-a[1].toFixed(e),a[1]=+a[1].toFixed(e);return;case"Z":case"z":n=t,i=r;return;case"M":case"m":u&&(a[1]+=n,a[2]+=i),n=a[1]-a[1].toFixed(e),i=a[2]-a[2].toFixed(e),t=n,r=i,a[1]=+a[1].toFixed(e),a[2]=+a[2].toFixed(e);return;case"A":case"a":u&&(a[6]+=n,a[7]+=i),n=a[6]-a[6].toFixed(e),i=a[7]-a[7].toFixed(e),a[1]=+a[1].toFixed(e),a[2]=+a[2].toFixed(e),a[3]=+a[3].toFixed(e+2),a[6]=+a[6].toFixed(e),a[7]=+a[7].toFixed(e);return;default:o=a.length,u&&(a[o-2]+=n,a[o-1]+=i),n=a[o-2]-a[o-2].toFixed(e),i=a[o-1]-a[o-1].toFixed(e),a.forEach(function(f,h){h&&(a[h]=+a[h].toFixed(e))});return}}),this},ge.prototype.iterate=function(e,t){var r=this.segments,n={},i=!1,o=0,a=0,u=0,f=0,h,d,p;if(t||this.__evaluateStack(),r.forEach(function(c,v){var y=e(c,v,o,a);Array.isArray(y)&&(n[v]=y,i=!0);var _=c[0]===c[0].toLowerCase();switch(c[0]){case"m":case"M":o=c[1]+(_?o:0),a=c[2]+(_?a:0),u=o,f=a;return;case"h":case"H":o=c[1]+(_?o:0);return;case"v":case"V":a=c[1]+(_?a:0);return;case"z":case"Z":o=u,a=f;return;default:o=c[c.length-2]+(_?o:0),a=c[c.length-1]+(_?a:0)}}),!i)return this;for(p=[],h=0;h<r.length;h++)if(typeof n[h]<"u")for(d=0;d<n[h].length;d++)p.push(n[h][d]);else p.push(r[h]);return this.segments=p,this},ge.prototype.abs=function(){return this.iterate(function(e,t,r,n){var i=e[0],o=i.toUpperCase(),a;if(i!==o)switch(e[0]=o,i){case"v":e[1]+=n;return;case"a":e[6]+=r,e[7]+=n;return;default:for(a=1;a<e.length;a++)e[a]+=a%2?r:n}},!0),this},ge.prototype.rel=function(){return this.iterate(function(e,t,r,n){var i=e[0],o=i.toLowerCase(),a;if(i!==o&&!(t===0&&i==="M"))switch(e[0]=o,i){case"V":e[1]-=n;return;case"A":e[6]-=r,e[7]-=n;return;default:for(a=1;a<e.length;a++)e[a]-=a%2?r:n}},!0),this},ge.prototype.unarc=function(){return this.iterate(function(e,t,r,n){var i,o,a,u=[],f=e[0];return f!=="A"&&f!=="a"?null:(f==="a"?(o=r+e[6],a=n+e[7]):(o=e[6],a=e[7]),i=eS(r,n,o,a,e[4],e[5],e[1],e[2],e[3]),i.length===0?[[e[0]==="a"?"l":"L",e[6],e[7]]]:(i.forEach(function(h){u.push(["C",h[2],h[3],h[4],h[5],h[6],h[7]])}),u))}),this},ge.prototype.unshort=function(){var e=this.segments,t,r,n,i,o;return this.iterate(function(a,u,f,h){var d=a[0],p=d.toUpperCase(),c;u&&(p==="T"?(c=d==="t",n=e[u-1],n[0]==="Q"?(t=n[1]-f,r=n[2]-h):n[0]==="q"?(t=n[1]-n[3],r=n[2]-n[4]):(t=0,r=0),i=-t,o=-r,c||(i+=f,o+=h),e[u]=[c?"q":"Q",i,o,a[1],a[2]]):p==="S"&&(c=d==="s",n=e[u-1],n[0]==="C"?(t=n[3]-f,r=n[4]-h):n[0]==="c"?(t=n[3]-n[5],r=n[4]-n[6]):(t=0,r=0),i=-t,o=-r,c||(i+=f,o+=h),e[u]=[c?"c":"C",i,o,a[1],a[2],a[3],a[4]]))}),this};var nS=ge,iS=nS;const sS=En(iS),oS=Et.forwardRef((e,t)=>{const[r,n]=Et.useState(null),i=mt.useRef(null),o=mt.useRef(null),a=mt.useRef(null),{path:u,visible:f,transformation:{x:h,y:d,width:p,height:c,anchor:v,hexColor:y,fill:_,stroke:b="none",strokeWidth:m=0,colorCorrection:w={}},pointerdown:T,pointerup:x}=e,E=le.useApp(),{temperatureFilter:I,sharpnessFilter:O,hueFilter:A,blurFilter:L,adjustmentFilter:R}=_s(w),{blurRadius:C=0}=w;return Et.useEffect(()=>{const P=sS(u).scale(5).translate(0,0).toString(),M=`<svg xmlns="http://www.w3.org/2000/svg" width="${p}" height="${c}">
1932
+ <path stroke="${b}" stroke-width="${m}" fill="${y||_}" d="${P}">
1933
1933
  </path>
1934
- </svg>`,M=new N2(P),F=x.renderer.generateTexture(M);return n(F),()=>{}},[x,u,b,_,v,y]),Vt.jsx(ni,{...e,ref:t,children:Vt.jsx(le.Container,{ref:o,children:Vt.jsx(le.Container,{ref:a,children:r&&Vt.jsx(le.Sprite,{texture:r,width:d,height:p,anchor:c,ref:i,x:f,y:h,interactive:!0,pointerdown:w,pointerup:T,filters:[E,I,A,L,...R>0?[O]:[]]})})})})});var aS=Mr,lS=function(){return aS.Date.now()},uS=lS,fS=/\s/;function cS(e){for(var t=e.length;t--&&fS.test(e.charAt(t)););return t}var hS=cS,dS=hS,pS=/^\s+/;function vS(e){return e&&e.slice(0,dS(e)+1).replace(pS,"")}var gS=vS,mS=Ki,yS=Zi,_S="[object Symbol]";function bS(e){return typeof e=="symbol"||yS(e)&&mS(e)==_S}var qo=bS,xS=gS,Dp=Yi,wS=qo,Up=0/0,TS=/^[-+]0x[0-9a-f]+$/i,ES=/^0b[01]+$/i,SS=/^0o[0-7]+$/i,AS=parseInt;function OS(e){if(typeof e=="number")return e;if(wS(e))return Up;if(Dp(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Dp(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=xS(e);var r=ES.test(e);return r||SS.test(e)?AS(e.slice(2),r?2:8):TS.test(e)?Up:+e}var CS=OS,RS=Yi,Fu=uS,$p=CS,IS="Expected a function",PS=Math.max,NS=Math.min;function MS(e,t,r){var n,i,o,a,u,f,h=0,d=!1,p=!1,c=!0;if(typeof e!="function")throw new TypeError(IS);t=$p(t)||0,RS(r)&&(d=!!r.leading,p="maxWait"in r,o=p?PS($p(r.maxWait)||0,t):o,c="trailing"in r?!!r.trailing:c);function v(I){var A=n,O=i;return n=i=void 0,h=I,a=e.apply(O,A),a}function y(I){return h=I,u=setTimeout(m,t),d?v(I):a}function b(I){var A=I-f,O=I-h,L=t-A;return p?NS(L,o-O):L}function _(I){var A=I-f,O=I-h;return f===void 0||A>=t||A<0||p&&O>=o}function m(){var I=Fu();if(_(I))return w(I);u=setTimeout(m,b(I))}function w(I){return u=void 0,c&&n?v(I):(n=i=void 0,a)}function T(){u!==void 0&&clearTimeout(u),h=0,n=f=i=u=void 0}function x(){return u===void 0?a:w(Fu())}function E(){var I=Fu(),A=_(I);if(n=arguments,i=this,f=I,A){if(u===void 0)return y(f);if(p)return clearTimeout(u),u=setTimeout(m,t),v(f)}return u===void 0&&(u=setTimeout(m,t)),a}return E.cancel=T,E.flush=x,E}var kS=MS;const Bu=En(kS),LS=e=>{const t={isPlaying:!1,progress:0,speed:1,mute:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},[,r]=Et.useState(!1),n=mt.useRef(null),i=mt.useRef(t),o=mt.useRef(null),{tl:a,dragModeRef:u}=mt.useContext(An);console.log("audio props",e);const{uniqueId:f,src:h,startAt:d,endAt:p,mute:c,speed:v,audioStartAt:y,audioEndAt:b}=e,_=Et.useRef(null);Ze(Oe.PAUSE,()=>{var A;n.current&&_.current&&((A=_.current)==null||A.pause(),i.current.isPlaying=!1)}),Et.useEffect(()=>{_.current&&(u.current?(_.current.pause(),i.current.isPlaying=!1,i.current.isDragging=!0):i.current.isDragging=!1)},[u]);const m=(A,O)=>{var L,R;n.current&&((L=_.current)==null||L.play({volume:c?0:1,start:A,end:O,speed:v||1}),u.current?((R=_.current)==null||R.pause(),i.current.isPlaying=!1,i.current.completed=!1):(i.current.isPlaying=!0,i.current.completed=!1))},w=Bu((A,O)=>{var L;_.current&&((L=_.current)==null||L.play({volume:c?0:1,start:A,end:O,speed:v||1}),i.current.isPlaying=!0)},100),T=Bu(()=>{_.current&&(_.current.pause(),i.current.isPlaying=!1)},300),x=()=>{var A;n.current&&((A=_.current)==null||A.stop(),i.current.isPlaying=!1,i.current.completed=!0)},E=(A,O)=>{var R,C,P,M;const L=A+((R=o.current)==null?void 0:R.time());_.current&&u.current?(w(L,O),T(),i.current.isPlaying=!1):n.current&&!i.current.isPlaying&&_.current&&((C=_.current)==null||C.refresh(),(P=_.current)==null||P.refreshPaused(),(M=_.current)==null||M.resume(),i.current.isPlaying=!0)},I=()=>{};return mt.useEffect(()=>{let A=_e.context(()=>{});if(n.current&&a.current){const O={duration:Number(b)-Number(y),onStart:m,onComplete:x,onStartParams:[y,b],onCompleteParams:[],onInterrupt:I,onUpdate:E,onUpdateParams:[y,b]};A=_e.context(()=>{o.current=_e.from(n.current,O,y),a.current.to(n.current,{alpha:1,duration:.01},d).to(n.current,{alpha:0,duration:.1},Number(p)-.09),a.current.add(o.current,d)})}return()=>{o.current&&(o.current.kill(),_e.killTweensOf(o.current)),A.revert()}},[d,p,y,b]),Et.useEffect(()=>{n.current&&r(!0)},[]),Et.useEffect(()=>{n.current&&_.current&&(i.current.mute=c,i.current.speed=v,_.current.volume=c?0:1)},[c,v]),Et.useEffect(()=>(el(h)||(_.current=ly.Sound.from({url:h,preload:!0,singleInstance:!0,loaded:()=>{console.log("audio loaded"),i.current.loaded=!0}})),()=>{_.current&&_.current.pause&&_.current.pause()}),[f,h]),Vt.jsx(le.Container,{ref:n})};function FS(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Gp=FS;function BS(){this.__data__=[],this.size=0}var DS=BS;function US(e,t){return e===t||e!==e&&t!==t}var jp=US,$S=jp;function GS(e,t){for(var r=e.length;r--;)if($S(e[r][0],t))return r;return-1}var zo=GS,jS=zo,qS=Array.prototype,zS=qS.splice;function HS(e){var t=this.__data__,r=jS(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():zS.call(t,r,1),--this.size,!0}var VS=HS,WS=zo;function XS(e){var t=this.__data__,r=WS(t,e);return r<0?void 0:t[r][1]}var KS=XS,YS=zo;function ZS(e){return YS(this.__data__,e)>-1}var QS=ZS,JS=zo;function tA(e,t){var r=this.__data__,n=JS(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var eA=tA,rA=DS,nA=VS,iA=KS,sA=QS,oA=eA;function Ii(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ii.prototype.clear=rA,Ii.prototype.delete=nA,Ii.prototype.get=iA,Ii.prototype.has=sA,Ii.prototype.set=oA;var Ho=Ii,aA=Ho;function lA(){this.__data__=new aA,this.size=0}var uA=lA;function fA(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var cA=fA;function hA(e){return this.__data__.get(e)}var dA=hA;function pA(e){return this.__data__.has(e)}var vA=pA,gA=ei,mA=gA(Object,"create"),Vo=mA,qp=Vo;function yA(){this.__data__=qp?qp(null):{},this.size=0}var _A=yA;function bA(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var xA=bA,wA=Vo,TA="__lodash_hash_undefined__",EA=Object.prototype,SA=EA.hasOwnProperty;function AA(e){var t=this.__data__;if(wA){var r=t[e];return r===TA?void 0:r}return SA.call(t,e)?t[e]:void 0}var OA=AA,CA=Vo,RA=Object.prototype,IA=RA.hasOwnProperty;function PA(e){var t=this.__data__;return CA?t[e]!==void 0:IA.call(t,e)}var NA=PA,MA=Vo,kA="__lodash_hash_undefined__";function LA(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=MA&&t===void 0?kA:t,this}var FA=LA,BA=_A,DA=xA,UA=OA,$A=NA,GA=FA;function Pi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Pi.prototype.clear=BA,Pi.prototype.delete=DA,Pi.prototype.get=UA,Pi.prototype.has=$A,Pi.prototype.set=GA;var jA=Pi,zp=jA,qA=Ho,zA=Ha;function HA(){this.size=0,this.__data__={hash:new zp,map:new(zA||qA),string:new zp}}var VA=HA;function WA(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var XA=WA,KA=XA;function YA(e,t){var r=e.__data__;return KA(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Wo=YA,ZA=Wo;function QA(e){var t=ZA(this,e).delete(e);return this.size-=t?1:0,t}var JA=QA,tO=Wo;function eO(e){return tO(this,e).get(e)}var rO=eO,nO=Wo;function iO(e){return nO(this,e).has(e)}var sO=iO,oO=Wo;function aO(e,t){var r=oO(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var lO=aO,uO=VA,fO=JA,cO=rO,hO=sO,dO=lO;function Ni(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ni.prototype.clear=uO,Ni.prototype.delete=fO,Ni.prototype.get=cO,Ni.prototype.has=hO,Ni.prototype.set=dO;var Du=Ni,pO=Ho,vO=Ha,gO=Du,mO=200;function yO(e,t){var r=this.__data__;if(r instanceof pO){var n=r.__data__;if(!vO||n.length<mO-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new gO(n)}return r.set(e,t),this.size=r.size,this}var _O=yO,bO=Ho,xO=uA,wO=cA,TO=dA,EO=vA,SO=_O;function Mi(e){var t=this.__data__=new bO(e);this.size=t.size}Mi.prototype.clear=xO,Mi.prototype.delete=wO,Mi.prototype.get=TO,Mi.prototype.has=EO,Mi.prototype.set=SO;var Hp=Mi,AO="__lodash_hash_undefined__";function OO(e){return this.__data__.set(e,AO),this}var CO=OO;function RO(e){return this.__data__.has(e)}var IO=RO,PO=Du,NO=CO,MO=IO;function Xo(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new PO;++t<r;)this.add(e[t])}Xo.prototype.add=Xo.prototype.push=NO,Xo.prototype.has=MO;var kO=Xo;function LO(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var FO=LO;function BO(e,t){return e.has(t)}var DO=BO,UO=kO,$O=FO,GO=DO,jO=1,qO=2;function zO(e,t,r,n,i,o){var a=r&jO,u=e.length,f=t.length;if(u!=f&&!(a&&f>u))return!1;var h=o.get(e),d=o.get(t);if(h&&d)return h==t&&d==e;var p=-1,c=!0,v=r&qO?new UO:void 0;for(o.set(e,t),o.set(t,e);++p<u;){var y=e[p],b=t[p];if(n)var _=a?n(b,y,p,t,e,o):n(y,b,p,e,t,o);if(_!==void 0){if(_)continue;c=!1;break}if(v){if(!$O(t,function(m,w){if(!GO(v,w)&&(y===m||i(y,m,r,n,o)))return v.push(w)})){c=!1;break}}else if(!(y===b||i(y,b,r,n,o))){c=!1;break}}return o.delete(e),o.delete(t),c}var Vp=zO,HO=Mr,VO=HO.Uint8Array,WO=VO;function XO(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var KO=XO;function YO(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var ZO=YO,Wp=Gs,Xp=WO,QO=jp,JO=Vp,tC=KO,eC=ZO,rC=1,nC=2,iC="[object Boolean]",sC="[object Date]",oC="[object Error]",aC="[object Map]",lC="[object Number]",uC="[object RegExp]",fC="[object Set]",cC="[object String]",hC="[object Symbol]",dC="[object ArrayBuffer]",pC="[object DataView]",Kp=Wp?Wp.prototype:void 0,Uu=Kp?Kp.valueOf:void 0;function vC(e,t,r,n,i,o,a){switch(r){case pC:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case dC:return!(e.byteLength!=t.byteLength||!o(new Xp(e),new Xp(t)));case iC:case sC:case lC:return QO(+e,+t);case oC:return e.name==t.name&&e.message==t.message;case uC:case cC:return e==t+"";case aC:var u=tC;case fC:var f=n&rC;if(u||(u=eC),e.size!=t.size&&!f)return!1;var h=a.get(e);if(h)return h==t;n|=nC,a.set(e,t);var d=JO(u(e),u(t),n,i,o,a);return a.delete(e),d;case hC:if(Uu)return Uu.call(e)==Uu.call(t)}return!1}var gC=vC;function mC(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var yC=mC,_C=yC,bC=kr;function xC(e,t,r){var n=t(e);return bC(e)?n:_C(n,r(e))}var wC=xC;function TC(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}var EC=TC;function SC(){return[]}var AC=SC,OC=EC,CC=AC,RC=Object.prototype,IC=RC.propertyIsEnumerable,Yp=Object.getOwnPropertySymbols,PC=Yp?function(e){return e==null?[]:(e=Object(e),OC(Yp(e),function(t){return IC.call(e,t)}))}:CC,NC=PC;function MC(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var kC=MC,LC=9007199254740991,FC=/^(?:0|[1-9]\d*)$/;function BC(e,t){var r=typeof e;return t=t??LC,!!t&&(r=="number"||r!="symbol"&&FC.test(e))&&e>-1&&e%1==0&&e<t}var Zp=BC,DC=kC,UC=Za,$C=kr,GC=Ja,jC=Zp,qC=tl,zC=Object.prototype,HC=zC.hasOwnProperty;function VC(e,t){var r=$C(e),n=!r&&UC(e),i=!r&&!n&&GC(e),o=!r&&!n&&!i&&qC(e),a=r||n||i||o,u=a?DC(e.length,String):[],f=u.length;for(var h in e)(t||HC.call(e,h))&&!(a&&(h=="length"||i&&(h=="offset"||h=="parent")||o&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||jC(h,f)))&&u.push(h);return u}var WC=VC,XC=WC,KC=vc,YC=js;function ZC(e){return YC(e)?XC(e):KC(e)}var $u=ZC,QC=wC,JC=NC,tR=$u;function eR(e){return QC(e,tR,JC)}var rR=eR,Qp=rR,nR=1,iR=Object.prototype,sR=iR.hasOwnProperty;function oR(e,t,r,n,i,o){var a=r&nR,u=Qp(e),f=u.length,h=Qp(t),d=h.length;if(f!=d&&!a)return!1;for(var p=f;p--;){var c=u[p];if(!(a?c in t:sR.call(t,c)))return!1}var v=o.get(e),y=o.get(t);if(v&&y)return v==t&&y==e;var b=!0;o.set(e,t),o.set(t,e);for(var _=a;++p<f;){c=u[p];var m=e[c],w=t[c];if(n)var T=a?n(w,m,c,t,e,o):n(m,w,c,e,t,o);if(!(T===void 0?m===w||i(m,w,r,n,o):T)){b=!1;break}_||(_=c=="constructor")}if(b&&!_){var x=e.constructor,E=t.constructor;x!=E&&"constructor"in e&&"constructor"in t&&!(typeof x=="function"&&x instanceof x&&typeof E=="function"&&E instanceof E)&&(b=!1)}return o.delete(e),o.delete(t),b}var aR=oR,Gu=Hp,lR=Vp,uR=gC,fR=aR,Jp=Ic,tv=kr,ev=Ja,cR=tl,hR=1,rv="[object Arguments]",nv="[object Array]",Ko="[object Object]",dR=Object.prototype,iv=dR.hasOwnProperty;function pR(e,t,r,n,i,o){var a=tv(e),u=tv(t),f=a?nv:Jp(e),h=u?nv:Jp(t);f=f==rv?Ko:f,h=h==rv?Ko:h;var d=f==Ko,p=h==Ko,c=f==h;if(c&&ev(e)){if(!ev(t))return!1;a=!0,d=!1}if(c&&!d)return o||(o=new Gu),a||cR(e)?lR(e,t,r,n,i,o):uR(e,t,f,r,n,i,o);if(!(r&hR)){var v=d&&iv.call(e,"__wrapped__"),y=p&&iv.call(t,"__wrapped__");if(v||y){var b=v?e.value():e,_=y?t.value():t;return o||(o=new Gu),i(b,_,r,n,o)}}return c?(o||(o=new Gu),fR(e,t,r,n,i,o)):!1}var vR=pR,gR=vR,sv=Zi;function ov(e,t,r,n,i){return e===t?!0:e==null||t==null||!sv(e)&&!sv(t)?e!==e&&t!==t:gR(e,t,r,n,ov,i)}var av=ov,mR=Hp,yR=av,_R=1,bR=2;function xR(e,t,r,n){var i=r.length,o=i,a=!n;if(e==null)return!o;for(e=Object(e);i--;){var u=r[i];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<o;){u=r[i];var f=u[0],h=e[f],d=u[1];if(a&&u[2]){if(h===void 0&&!(f in e))return!1}else{var p=new mR;if(n)var c=n(h,d,f,e,t,p);if(!(c===void 0?yR(d,h,_R|bR,n,p):c))return!1}}return!0}var wR=xR,TR=Yi;function ER(e){return e===e&&!TR(e)}var lv=ER,SR=lv,AR=$u;function OR(e){for(var t=AR(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,SR(i)]}return t}var CR=OR;function RR(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var uv=RR,IR=wR,PR=CR,NR=uv;function MR(e){var t=PR(e);return t.length==1&&t[0][2]?NR(t[0][0],t[0][1]):function(r){return r===e||IR(r,e,t)}}var kR=MR,LR=kr,FR=qo,BR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,DR=/^\w*$/;function UR(e,t){if(LR(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||FR(e)?!0:DR.test(e)||!BR.test(e)||t!=null&&e in Object(t)}var ju=UR,fv=Du,$R="Expected a function";function qu(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError($R);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(qu.Cache||fv),r}qu.Cache=fv;var GR=qu,jR=GR,qR=500;function zR(e){var t=jR(e,function(n){return r.size===qR&&r.clear(),n}),r=t.cache;return t}var HR=zR,VR=HR,WR=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,XR=/\\(\\)?/g,KR=VR(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(WR,function(r,n,i,o){t.push(i?o.replace(XR,"$1"):n||r)}),t}),YR=KR,cv=Gs,ZR=Gp,QR=kr,JR=qo,tI=1/0,hv=cv?cv.prototype:void 0,dv=hv?hv.toString:void 0;function pv(e){if(typeof e=="string")return e;if(QR(e))return ZR(e,pv)+"";if(JR(e))return dv?dv.call(e):"";var t=e+"";return t=="0"&&1/e==-tI?"-0":t}var eI=pv,rI=eI;function nI(e){return e==null?"":rI(e)}var iI=nI,sI=kr,oI=ju,aI=YR,lI=iI;function uI(e,t){return sI(e)?e:oI(e,t)?[e]:aI(lI(e))}var vv=uI,fI=qo,cI=1/0;function hI(e){if(typeof e=="string"||fI(e))return e;var t=e+"";return t=="0"&&1/e==-cI?"-0":t}var Yo=hI,dI=vv,pI=Yo;function vI(e,t){t=dI(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[pI(t[r++])];return r&&r==n?e:void 0}var gv=vI,gI=gv;function mI(e,t,r){var n=e==null?void 0:gI(e,t);return n===void 0?r:n}var yI=mI;function _I(e,t){return e!=null&&t in Object(e)}var bI=_I,xI=vv,wI=Za,TI=kr,EI=Zp,SI=Qa,AI=Yo;function OI(e,t,r){t=xI(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var a=AI(t[n]);if(!(o=e!=null&&r(e,a)))break;e=e[a]}return o||++n!=i?o:(i=e==null?0:e.length,!!i&&SI(i)&&EI(a,i)&&(TI(e)||wI(e)))}var CI=OI,RI=bI,II=CI;function PI(e,t){return e!=null&&II(e,t,RI)}var NI=PI,MI=av,kI=yI,LI=NI,FI=ju,BI=lv,DI=uv,UI=Yo,$I=1,GI=2;function jI(e,t){return FI(e)&&BI(t)?DI(UI(e),t):function(r){var n=kI(r,e);return n===void 0&&n===t?LI(r,e):MI(t,n,$I|GI)}}var qI=jI;function zI(e){return e}var HI=zI;function VI(e){return function(t){return t==null?void 0:t[e]}}var WI=VI,XI=gv;function KI(e){return function(t){return XI(t,e)}}var YI=KI,ZI=WI,QI=YI,JI=ju,tP=Yo;function eP(e){return JI(e)?ZI(tP(e)):QI(e)}var rP=eP,nP=kR,iP=qI,sP=HI,oP=kr,aP=rP;function lP(e){return typeof e=="function"?e:e==null?sP:typeof e=="object"?oP(e)?iP(e[0],e[1]):nP(e):aP(e)}var uP=lP;function fP(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),u=a.length;u--;){var f=a[e?u:++i];if(r(o[f],f,o)===!1)break}return t}}var cP=fP,hP=cP,dP=hP(),pP=dP,vP=pP,gP=$u;function mP(e,t){return e&&vP(e,t,gP)}var yP=mP,_P=js;function bP(e,t){return function(r,n){if(r==null)return r;if(!_P(r))return e(r,n);for(var i=r.length,o=t?i:-1,a=Object(r);(t?o--:++o<i)&&n(a[o],o,a)!==!1;);return r}}var xP=bP,wP=yP,TP=xP,EP=TP(wP),SP=EP,AP=SP,OP=js;function CP(e,t){var r=-1,n=OP(e)?Array(e.length):[];return AP(e,function(i,o,a){n[++r]=t(i,o,a)}),n}var RP=CP,IP=Gp,PP=uP,NP=RP,MP=kr;function kP(e,t){var r=MP(e)?IP:NP;return r(e,PP(t))}var LP=kP;const FP=En(LP);var zn={},mv={},Yr={};Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.loop=Yr.conditional=Yr.parse=void 0;var BP=function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:n;if(Array.isArray(r))r.forEach(function(a){return e(t,a,n,i)});else if(typeof r=="function")r(t,n,i,e);else{var o=Object.keys(r)[0];Array.isArray(r[o])?(i[o]={},e(t,r[o],n,i[o])):i[o]=r[o](t,n,i,e)}return n};Yr.parse=BP;var DP=function(t,r){return function(n,i,o,a){r(n,i,o)&&a(n,t,i,o)}};Yr.conditional=DP;var UP=function(t,r){return function(n,i,o,a){for(var u=[],f=n.pos;r(n,i,o);){var h={};if(a(n,t,i,h),n.pos===f)break;f=n.pos,u.push(h)}return u}};Yr.loop=UP;var be={};Object.defineProperty(be,"__esModule",{value:!0}),be.readBits=be.readArray=be.readUnsigned=be.readString=be.peekBytes=be.readBytes=be.peekByte=be.readByte=be.buildStream=void 0;var $P=function(t){return{data:t,pos:0}};be.buildStream=$P;var yv=function(){return function(t){return t.data[t.pos++]}};be.readByte=yv;var GP=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(r){return r.data[r.pos+t]}};be.peekByte=GP;var Zo=function(t){return function(r){return r.data.subarray(r.pos,r.pos+=t)}};be.readBytes=Zo;var jP=function(t){return function(r){return r.data.subarray(r.pos,r.pos+t)}};be.peekBytes=jP;var qP=function(t){return function(r){return Array.from(Zo(t)(r)).map(function(n){return String.fromCharCode(n)}).join("")}};be.readString=qP;var zP=function(t){return function(r){var n=Zo(2)(r);return t?(n[1]<<8)+n[0]:(n[0]<<8)+n[1]}};be.readUnsigned=zP;var HP=function(t,r){return function(n,i,o){for(var a=typeof r=="function"?r(n,i,o):r,u=Zo(t),f=new Array(a),h=0;h<a;h++)f[h]=u(n);return f}};be.readArray=HP;var VP=function(t,r,n){for(var i=0,o=0;o<n;o++)i+=t[r+o]&&Math.pow(2,n-o-1);return i},WP=function(t){return function(r){for(var n=yv()(r),i=new Array(8),o=0;o<8;o++)i[7-o]=!!(n&1<<o);return Object.keys(t).reduce(function(a,u){var f=t[u];return f.length?a[u]=VP(i,f.index,f.length):a[u]=i[f.index],a},{})}};be.readBits=WP,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Yr,r=be,n={blocks:function(c){for(var v=0,y=[],b=c.data.length,_=0,m=(0,r.readByte)()(c);m!==v&&m;m=(0,r.readByte)()(c)){if(c.pos+m>=b){var w=b-c.pos;y.push((0,r.readBytes)(w)(c)),_+=w;break}y.push((0,r.readBytes)(m)(c)),_+=m}for(var T=new Uint8Array(_),x=0,E=0;E<y.length;E++)T.set(y[E],x),x+=y[E].length;return T}},i=(0,t.conditional)({gce:[{codes:(0,r.readBytes)(2)},{byteSize:(0,r.readByte)()},{extras:(0,r.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,r.readUnsigned)(!0)},{transparentColorIndex:(0,r.readByte)()},{terminator:(0,r.readByte)()}]},function(p){var c=(0,r.peekBytes)(2)(p);return c[0]===33&&c[1]===249}),o=(0,t.conditional)({image:[{code:(0,r.readByte)()},{descriptor:[{left:(0,r.readUnsigned)(!0)},{top:(0,r.readUnsigned)(!0)},{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{lct:(0,r.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,t.conditional)({lct:(0,r.readArray)(3,function(p,c,v){return Math.pow(2,v.descriptor.lct.size+1)})},function(p,c,v){return v.descriptor.lct.exists}),{data:[{minCodeSize:(0,r.readByte)()},n]}]},function(p){return(0,r.peekByte)()(p)===44}),a=(0,t.conditional)({text:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{preData:function(c,v,y){return(0,r.readBytes)(y.text.blockSize)(c)}},n]},function(p){var c=(0,r.peekBytes)(2)(p);return c[0]===33&&c[1]===1}),u=(0,t.conditional)({application:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{id:function(c,v,y){return(0,r.readString)(y.blockSize)(c)}},n]},function(p){var c=(0,r.peekBytes)(2)(p);return c[0]===33&&c[1]===255}),f=(0,t.conditional)({comment:[{codes:(0,r.readBytes)(2)},n]},function(p){var c=(0,r.peekBytes)(2)(p);return c[0]===33&&c[1]===254}),h=[{header:[{signature:(0,r.readString)(3)},{version:(0,r.readString)(3)}]},{lsd:[{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{gct:(0,r.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,r.readByte)()},{pixelAspectRatio:(0,r.readByte)()}]},(0,t.conditional)({gct:(0,r.readArray)(3,function(p,c){return Math.pow(2,c.lsd.gct.size+1)})},function(p,c){return c.lsd.gct.exists}),{frames:(0,t.loop)([i,u,f,o,a],function(p){var c=(0,r.peekByte)()(p);return c===33||c===44})}],d=h;e.default=d}(mv);var Qo={};Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.deinterlace=void 0;var XP=function(t,r){for(var n=new Array(t.length),i=t.length/r,o=function(c,v){var y=t.slice(v*r,(v+1)*r);n.splice.apply(n,[c*r,r].concat(y))},a=[0,4,2,1],u=[8,8,4,2],f=0,h=0;h<4;h++)for(var d=a[h];d<i;d+=u[h])o(d,f),f++;return n};Qo.deinterlace=XP;var Jo={};Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.lzw=void 0;var KP=function(t,r,n){var i=4096,o=-1,a=n,u,f,h,d,p,c,v,I,y,b,E,_,A,O,R,L,m=new Array(n),w=new Array(i),T=new Array(i),x=new Array(i+1);for(_=t,f=1<<_,p=f+1,u=f+2,v=o,d=_+1,h=(1<<d)-1,y=0;y<f;y++)w[y]=0,T[y]=y;var E,I,A,O,L,R;for(E=I=A=O=L=R=0,b=0;b<a;){if(O===0){if(I<d){E+=r[R]<<I,I+=8,R++;continue}if(y=E&h,E>>=d,I-=d,y>u||y==p)break;if(y==f){d=_+1,h=(1<<d)-1,u=f+2,v=o;continue}if(v==o){x[O++]=T[y],v=y,A=y;continue}for(c=y,y==u&&(x[O++]=A,y=v);y>f;)x[O++]=T[y],y=w[y];A=T[y]&255,x[O++]=A,u<i&&(w[u]=v,T[u]=A,u++,!(u&h)&&u<i&&(d++,h+=u)),v=c}O--,m[L++]=x[O],b++}for(b=L;b<a;b++)m[b]=0;return m};Jo.lzw=KP,Object.defineProperty(zn,"__esModule",{value:!0}),zn.decompressFrames=zn.decompressFrame=zn.parseGIF=void 0;var YP=eN(mv),ZP=Yr,QP=be,JP=Qo,tN=Jo;function eN(e){return e&&e.__esModule?e:{default:e}}var rN=function(t){var r=new Uint8Array(t);return(0,ZP.parse)((0,QP.buildStream)(r),YP.default)};zn.parseGIF=rN;var nN=function(t){for(var r=t.pixels.length,n=new Uint8ClampedArray(r*4),i=0;i<r;i++){var o=i*4,a=t.pixels[i],u=t.colorTable[a]||[0,0,0];n[o]=u[0],n[o+1]=u[1],n[o+2]=u[2],n[o+3]=a!==t.transparentIndex?255:0}return n},_v=function(t,r,n){if(!t.image){console.warn("gif frame does not have associated image.");return}var i=t.image,o=i.descriptor.width*i.descriptor.height,a=(0,tN.lzw)(i.data.minCodeSize,i.data.blocks,o);i.descriptor.lct.interlaced&&(a=(0,JP.deinterlace)(a,i.descriptor.width));var u={pixels:a,dims:{top:t.image.descriptor.top,left:t.image.descriptor.left,width:t.image.descriptor.width,height:t.image.descriptor.height}};return i.descriptor.lct&&i.descriptor.lct.exists?u.colorTable=i.lct:u.colorTable=r,t.gce&&(u.delay=(t.gce.delay||10)*10,u.disposalType=t.gce.extras.disposal,t.gce.extras.transparentColorGiven&&(u.transparentIndex=t.gce.transparentColorIndex)),n&&(u.patch=nN(u)),u};zn.decompressFrame=_v;var iN=function(t,r){return t.frames.filter(function(n){return n.image}).map(function(n){return _v(n,t.gct,r)})};zn.decompressFrames=iN;const bv=(e,t={})=>{typeof t=="function"&&(t=t(e));const r=t.loaded&&e.loaded!==t.loaded,{playing:n,...i}=t,o={...e,...i};return r&&Object.assign(o,{playing:o.autoPlay&&o.loaded}),(t.delays!=null||t.frames!=null)&&Object.assign(o,{length:o.frames.length}),(t.index!=null||t.frames!=null)&&Object.assign(o,{index:o.length===0?0:(o.length+o.index)%o.length}),t.playing!=null&&Object.assign(o,o.loaded?{playing:n}:{autoPlay:n}),o},sN=e=>bv({autoPlay:!0,playing:!1,frames:[],delays:[],index:0,length:0,loaded:!1},e),oN=e=>mt.useReducer(bv,e,sN);var aN='function e(e){var r={exports:{}};return e(r,r.exports),r.exports}var r=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.loop=r.conditional=r.parse=void 0;r.parse=function e(r,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;if(Array.isArray(t))t.forEach((function(t){return e(r,t,n,a)}));else if("function"==typeof t)t(r,n,a,e);else{var i=Object.keys(t)[0];Array.isArray(t[i])?(a[i]={},e(r,t[i],n,a[i])):a[i]=t[i](r,n,a,e)}return n};r.conditional=function(e,r){return function(t,n,a,i){r(t,n,a)&&i(t,e,n,a)}};r.loop=function(e,r){return function(t,n,a,i){for(var o=[];r(t,n,a);){var s={};i(t,e,n,s),o.push(s)}return o}}})),t=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.readBits=r.readArray=r.readUnsigned=r.readString=r.peekBytes=r.readBytes=r.peekByte=r.readByte=r.buildStream=void 0;r.buildStream=function(e){return{data:e,pos:0}};var t=function(){return function(e){return e.data[e.pos++]}};r.readByte=t;r.peekByte=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return function(r){return r.data[r.pos+e]}};var n=function(e){return function(r){return r.data.subarray(r.pos,r.pos+=e)}};r.readBytes=n;r.peekBytes=function(e){return function(r){return r.data.subarray(r.pos,r.pos+e)}};r.readString=function(e){return function(r){return Array.from(n(e)(r)).map((function(e){return String.fromCharCode(e)})).join("")}};r.readUnsigned=function(e){return function(r){var t=n(2)(r);return e?(t[1]<<8)+t[0]:(t[0]<<8)+t[1]}};r.readArray=function(e,r){return function(t,a,i){for(var o="function"==typeof r?r(t,a,i):r,s=n(e),d=new Array(o),c=0;c<o;c++)d[c]=s(t);return d}};r.readBits=function(e){return function(r){for(var t=function(e){return e.data[e.pos++]}(r),n=new Array(8),a=0;a<8;a++)n[7-a]=!!(t&1<<a);return Object.keys(e).reduce((function(r,t){var a=e[t];return a.length?r[t]=function(e,r,t){for(var n=0,a=0;a<t;a++)n+=e[r+a]&&Math.pow(2,t-a-1);return n}(n,a.index,a.length):r[t]=n[a.index],r}),{})}}})),n=e((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a={blocks:function(e){for(var r=[],n=e.data.length,a=0,i=(0,t.readByte)()(e);0!==i;i=(0,t.readByte)()(e)){if(e.pos+i>=n){var o=n-e.pos;r.push((0,t.readBytes)(o)(e)),a+=o;break}r.push((0,t.readBytes)(i)(e)),a+=i}for(var s=new Uint8Array(a),d=0,c=0;c<r.length;c++)s.set(r[c],d),d+=r[c].length;return s}},i=(0,r.conditional)({gce:[{codes:(0,t.readBytes)(2)},{byteSize:(0,t.readByte)()},{extras:(0,t.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,t.readUnsigned)(!0)},{transparentColorIndex:(0,t.readByte)()},{terminator:(0,t.readByte)()}]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&249===r[1]})),o=(0,r.conditional)({image:[{code:(0,t.readByte)()},{descriptor:[{left:(0,t.readUnsigned)(!0)},{top:(0,t.readUnsigned)(!0)},{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{lct:(0,t.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,r.conditional)({lct:(0,t.readArray)(3,(function(e,r,t){return Math.pow(2,t.descriptor.lct.size+1)}))},(function(e,r,t){return t.descriptor.lct.exists})),{data:[{minCodeSize:(0,t.readByte)()},a]}]},(function(e){return 44===(0,t.peekByte)()(e)})),s=(0,r.conditional)({text:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{preData:function(e,r,n){return(0,t.readBytes)(n.text.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&1===r[1]})),d=(0,r.conditional)({application:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{id:function(e,r,n){return(0,t.readString)(n.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&255===r[1]})),c=(0,r.conditional)({comment:[{codes:(0,t.readBytes)(2)},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&254===r[1]})),u=[{header:[{signature:(0,t.readString)(3)},{version:(0,t.readString)(3)}]},{lsd:[{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{gct:(0,t.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,t.readByte)()},{pixelAspectRatio:(0,t.readByte)()}]},(0,r.conditional)({gct:(0,t.readArray)(3,(function(e,r){return Math.pow(2,r.lsd.gct.size+1)}))},(function(e,r){return r.lsd.gct.exists})),{frames:(0,r.loop)([i,d,c,o,s],(function(e){var r=(0,t.peekByte)()(e);return 33===r||44===r}))}];n.default=u})),a=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.deinterlace=void 0;r.deinterlace=function(e,r){for(var t=new Array(e.length),n=e.length/r,a=function(n,a){var i=e.slice(a*r,(a+1)*r);t.splice.apply(t,[n*r,r].concat(i))},i=[0,4,2,1],o=[8,8,4,2],s=0,d=0;d<4;d++)for(var c=i[d];c<n;c+=o[d])a(c,s),s++;return t}})),i=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.lzw=void 0;r.lzw=function(e,r,t){var n,a,i,o,s,d,c,u,l,f,p,g,y,h,v,m,x=4096,B=t,w=new Array(t),b=new Array(x),k=new Array(x),A=new Array(4097);for(s=(a=1<<(f=e))+1,n=a+2,c=-1,i=(1<<(o=f+1))-1,u=0;u<a;u++)b[u]=0,k[u]=u;for(p=g=y=h=v=m=0,l=0;l<B;){if(0===h){if(g<o){p+=r[m]<<g,g+=8,m++;continue}if(u=p&i,p>>=o,g-=o,u>n||u==s)break;if(u==a){i=(1<<(o=f+1))-1,n=a+2,c=-1;continue}if(-1==c){A[h++]=k[u],c=u,y=u;continue}for(d=u,u==n&&(A[h++]=y,u=c);u>a;)A[h++]=k[u],u=b[u];y=255&k[u],A[h++]=y,n<x&&(b[n]=c,k[n]=y,0==(++n&i)&&n<x&&(o++,i+=n)),c=d}h--,w[v++]=A[h],l++}for(l=v;l<B;l++)w[l]=0;return w}})),o=e((function(e,o){Object.defineProperty(o,"__esModule",{value:!0}),o.decompressFrames=o.decompressFrame=o.parseGIF=void 0;var s,d=(s=n)&&s.__esModule?s:{default:s};o.parseGIF=function(e){var n=new Uint8Array(e);return(0,r.parse)((0,t.buildStream)(n),d.default)};var c=function(e,r,t){if(e.image){var n=e.image,o=n.descriptor.width*n.descriptor.height,s=(0,i.lzw)(n.data.minCodeSize,n.data.blocks,o);n.descriptor.lct.interlaced&&(s=(0,a.deinterlace)(s,n.descriptor.width));var d={pixels:s,dims:{top:e.image.descriptor.top,left:e.image.descriptor.left,width:e.image.descriptor.width,height:e.image.descriptor.height}};return n.descriptor.lct&&n.descriptor.lct.exists?d.colorTable=n.lct:d.colorTable=r,e.gce&&(d.delay=10*(e.gce.delay||10),d.disposalType=e.gce.extras.disposal,e.gce.extras.transparentColorGiven&&(d.transparentIndex=e.gce.transparentColorIndex)),t&&(d.patch=function(e){for(var r=e.pixels.length,t=new Uint8ClampedArray(4*r),n=0;n<r;n++){var a=4*n,i=e.pixels[n],o=e.colorTable[i]||[0,0,0];t[a]=o[0],t[a+1]=o[1],t[a+2]=o[2],t[a+3]=i!==e.transparentIndex?255:0}return t}(d)),d}console.warn("gif frame does not have associated image.")};o.decompressFrame=c;o.decompressFrames=function(e,r){return e.frames.filter((function(e){return e.image})).map((function(t){return c(t,e.gct,r)}))}}));const s=(e,r,t)=>{const{width:n,height:a,top:i,left:o}=r.dims,s=i*t.width+o;for(let i=0;i<a;i++)for(let a=0;a<n;a++){const o=i*n+a,d=r.pixels[o];if(d!==r.transparentIndex){const n=s+i*t.width+a,o=r.colorTable[d]||[0,0,0];e[4*n]=o[0],e[4*n+1]=o[1],e[4*n+2]=o[2],e[4*n+3]=255}}return e},d=new Map;self.addEventListener("message",(e=>{const{type:r,src:t}=e.data||e;switch(r){case"parse":if(!d.has(t)){const e=new AbortController,r={signal:e.signal};d.set(t,e),((e,{signal:r})=>fetch(e,{signal:r}).then((e=>{if(!e.headers.get("Content-Type").includes("image/gif"))throw Error(`Wrong content type: "${e.headers.get("Content-Type")}"`);return e.arrayBuffer()})).then((e=>o.parseGIF(e))).then((e=>((e=>{let r=null;for(const t of e.frames)r=t.gce?t.gce:r,"image"in t&&!("gce"in t)&&(t.gce=r)})(e),e))).then((e=>Promise.all([o.decompressFrames(e,!1),{width:e.lsd.width,height:e.lsd.height}]))).then((([e,r])=>{const t=[],n=r.width*r.height*4;for(let a=0;a<e.length;++a){const i=e[a],o=0===a||2===e[a-1].disposalType?new Uint8ClampedArray(n):t[a-1].slice();t.push(s(o,i,r))}return{...r,loaded:!0,delays:e.map((e=>e.delay)),frames:t}})))(t,r).then((e=>{self.postMessage(Object.assign(e,{src:t}),e.frames.map((e=>e.buffer)))})).catch((e=>{self.postMessage({src:t,error:e,loaded:!0})})).finally((()=>{d.delete(t)}))}break;case"cancel":if(d.has(t)){d.get(t).abort(),d.delete(t)}}}));\n';function lN(e){const t=new Blob([aN],{type:"application/javascript"}),r=URL.createObjectURL(t),n=new Worker(r,e);return URL.revokeObjectURL(r),n}const uN=e=>({...e,frames:e.frames.map(t=>{const r=new ImageData(e.width,e.height);return r.data.set(new Uint8ClampedArray(t)),r})}),fN=(e,t)=>{const r={};return()=>(r.instance||(r.instance=e()),mt.useLayoutEffect(()=>(r.timeout?(clearTimeout(r.timeout),delete r.timeout):r.usageCount=(r.usageCount||0)+1,()=>{r.timeout=setTimeout(()=>{r.usageCount=r.usageCount-1,r.usageCount===0&&(t&&t(r.instance),delete r.instance,delete r.timeout)})}),[r,t]),r.instance)},cN=e=>{const t=mt.useRef(e);return mt.useEffect(()=>{t.current=e},[e]),t},hN=e=>{const t=cN(e);return mt.useCallback(r=>t.current&&t.current(r),[])},dN=fN(()=>new lN,e=>e.terminate()),pN=(e,t)=>{const r=hN(t),n=dN();mt.useEffect(()=>{if(typeof e=="string"){const i=o=>{const a=o.data||o;if(a.src===e){const u=a.error?a:uN(a);r(u)}};return n.addEventListener("message",i),n.postMessage({src:e,type:"parse"}),()=>{n.postMessage({src:e,type:"cancel"}),n.removeEventListener("message",i)}}},[n,e])},vN=({isPlaying:e,forwardRef:t,...r})=>{const n=Et.useRef(null);return Et.useImperativeHandle(t,()=>n.current,[n]),Et.useEffect(()=>{if(n.current===null)return;const i=n.current;i[e?"gotoAndPlay":"gotoAndStop"](i.currentFrame)},[e]),Vt.jsx(le.AnimatedSprite,{ref:n,...r,isPlaying:e})},xv=Et.memo(vN);var ta={exports:{}};/**
1934
+ </svg>`,F=new N2(M),q=E.renderer.generateTexture(F);return n(q),()=>{}},[E,u,b,m,y,_]),Vt.jsx(ni,{...e,ref:t,children:Vt.jsx(le.Container,{ref:o,children:Vt.jsx(le.Container,{ref:a,children:r&&Vt.jsx(le.Sprite,{texture:r,width:p,height:c,anchor:v,ref:i,x:h,y:d,alpha:f?1:0,...f&&{interactive:!0,pointerdown:T,pointerup:x},filters:[I,O,A,R,...C>0?[L]:[]]})})})})});var aS=Mr,lS=function(){return aS.Date.now()},uS=lS,fS=/\s/;function cS(e){for(var t=e.length;t--&&fS.test(e.charAt(t)););return t}var hS=cS,dS=hS,pS=/^\s+/;function vS(e){return e&&e.slice(0,dS(e)+1).replace(pS,"")}var gS=vS,mS=Yi,yS=Qi,_S="[object Symbol]";function bS(e){return typeof e=="symbol"||yS(e)&&mS(e)==_S}var zo=bS,xS=gS,Dp=Zi,wS=zo,Up=0/0,TS=/^[-+]0x[0-9a-f]+$/i,ES=/^0b[01]+$/i,SS=/^0o[0-7]+$/i,AS=parseInt;function OS(e){if(typeof e=="number")return e;if(wS(e))return Up;if(Dp(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Dp(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=xS(e);var r=ES.test(e);return r||SS.test(e)?AS(e.slice(2),r?2:8):TS.test(e)?Up:+e}var CS=OS,RS=Zi,Bu=uS,$p=CS,IS="Expected a function",PS=Math.max,NS=Math.min;function MS(e,t,r){var n,i,o,a,u,f,h=0,d=!1,p=!1,c=!0;if(typeof e!="function")throw new TypeError(IS);t=$p(t)||0,RS(r)&&(d=!!r.leading,p="maxWait"in r,o=p?PS($p(r.maxWait)||0,t):o,c="trailing"in r?!!r.trailing:c);function v(I){var O=n,A=i;return n=i=void 0,h=I,a=e.apply(A,O),a}function y(I){return h=I,u=setTimeout(m,t),d?v(I):a}function _(I){var O=I-f,A=I-h,L=t-O;return p?NS(L,o-A):L}function b(I){var O=I-f,A=I-h;return f===void 0||O>=t||O<0||p&&A>=o}function m(){var I=Bu();if(b(I))return w(I);u=setTimeout(m,_(I))}function w(I){return u=void 0,c&&n?v(I):(n=i=void 0,a)}function T(){u!==void 0&&clearTimeout(u),h=0,n=f=i=u=void 0}function x(){return u===void 0?a:w(Bu())}function E(){var I=Bu(),O=b(I);if(n=arguments,i=this,f=I,O){if(u===void 0)return y(f);if(p)return clearTimeout(u),u=setTimeout(m,t),v(f)}return u===void 0&&(u=setTimeout(m,t)),a}return E.cancel=T,E.flush=x,E}var kS=MS;const Ii=En(kS),LS=e=>{const t={isPlaying:!1,progress:0,speed:1,mute:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},[,r]=Et.useState(!1),n=mt.useRef(null),i=mt.useRef(t),o=mt.useRef(null),{tl:a,dragModeRef:u}=mt.useContext(An);console.log("audio props",e);const{uniqueId:f,src:h,startAt:d,endAt:p,mute:c,speed:v,audioStartAt:y,audioEndAt:_,visible:b}=e,m=Et.useRef(null);Ze(Oe.PAUSE,()=>{var A;n.current&&m.current&&((A=m.current)==null||A.pause(),i.current.isPlaying=!1)}),Et.useEffect(()=>{m.current&&(u.current?(m.current.pause(),i.current.isPlaying=!1,i.current.isDragging=!0):i.current.isDragging=!1)},[u]);const w=(A,L)=>{var R,C;n.current&&((R=m.current)==null||R.play({volume:!c&&b?1:0,start:A,end:L,speed:v||1}),u.current?((C=m.current)==null||C.pause(),i.current.isPlaying=!1,i.current.completed=!1):(i.current.isPlaying=!0,i.current.completed=!1))},T=Ii((A,L)=>{var R;m.current&&((R=m.current)==null||R.play({volume:!c&&b?1:0,start:A,end:L,speed:v||1}),i.current.isPlaying=!0)},100),x=Ii(()=>{m.current&&(m.current.pause(),i.current.isPlaying=!1)},300),E=()=>{var A;n.current&&((A=m.current)==null||A.stop(),i.current.isPlaying=!1,i.current.completed=!0)},I=(A,L)=>{var C,P,M,F;const R=A+((C=o.current)==null?void 0:C.time());m.current&&u.current?(T(R,L),x(),i.current.isPlaying=!1):n.current&&!i.current.isPlaying&&m.current&&((P=m.current)==null||P.refresh(),(M=m.current)==null||M.refreshPaused(),(F=m.current)==null||F.resume(),i.current.isPlaying=!0)},O=()=>{};return mt.useEffect(()=>{let A=_e.context(()=>{});if(n.current&&a.current){const L={duration:Number(_)-Number(y),onStart:w,onComplete:E,onStartParams:[y,_],onCompleteParams:[],onInterrupt:O,onUpdate:I,onUpdateParams:[y,_]};A=_e.context(()=>{o.current=_e.from(n.current,L,y),a.current.to(n.current,{alpha:1,duration:.01},d).to(n.current,{alpha:0,duration:.1},Number(p)-.09),a.current.add(o.current,d)})}return()=>{o.current&&(o.current.kill(),_e.killTweensOf(o.current)),A.revert()}},[d,p,y,_]),Et.useEffect(()=>{n.current&&r(!0)},[]),Et.useEffect(()=>{n.current&&m.current&&(i.current.mute=!c&&b?1:0,i.current.speed=v,m.current.volume=c?0:1)},[b,c,v]),Et.useEffect(()=>(rl(h)||(m.current=ly.Sound.from({url:h,preload:!0,singleInstance:!0,loaded:()=>{console.log("audio loaded"),i.current.loaded=!0}})),()=>{m.current&&m.current.pause&&m.current.pause()}),[f,h]),Vt.jsx(le.Container,{ref:n})};function FS(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Gp=FS;function BS(){this.__data__=[],this.size=0}var DS=BS;function US(e,t){return e===t||e!==e&&t!==t}var jp=US,$S=jp;function GS(e,t){for(var r=e.length;r--;)if($S(e[r][0],t))return r;return-1}var Ho=GS,jS=Ho,qS=Array.prototype,zS=qS.splice;function HS(e){var t=this.__data__,r=jS(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():zS.call(t,r,1),--this.size,!0}var VS=HS,WS=Ho;function XS(e){var t=this.__data__,r=WS(t,e);return r<0?void 0:t[r][1]}var KS=XS,YS=Ho;function ZS(e){return YS(this.__data__,e)>-1}var QS=ZS,JS=Ho;function tA(e,t){var r=this.__data__,n=JS(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var eA=tA,rA=DS,nA=VS,iA=KS,sA=QS,oA=eA;function Pi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Pi.prototype.clear=rA,Pi.prototype.delete=nA,Pi.prototype.get=iA,Pi.prototype.has=sA,Pi.prototype.set=oA;var Vo=Pi,aA=Vo;function lA(){this.__data__=new aA,this.size=0}var uA=lA;function fA(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var cA=fA;function hA(e){return this.__data__.get(e)}var dA=hA;function pA(e){return this.__data__.has(e)}var vA=pA,gA=ei,mA=gA(Object,"create"),Wo=mA,qp=Wo;function yA(){this.__data__=qp?qp(null):{},this.size=0}var _A=yA;function bA(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var xA=bA,wA=Wo,TA="__lodash_hash_undefined__",EA=Object.prototype,SA=EA.hasOwnProperty;function AA(e){var t=this.__data__;if(wA){var r=t[e];return r===TA?void 0:r}return SA.call(t,e)?t[e]:void 0}var OA=AA,CA=Wo,RA=Object.prototype,IA=RA.hasOwnProperty;function PA(e){var t=this.__data__;return CA?t[e]!==void 0:IA.call(t,e)}var NA=PA,MA=Wo,kA="__lodash_hash_undefined__";function LA(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=MA&&t===void 0?kA:t,this}var FA=LA,BA=_A,DA=xA,UA=OA,$A=NA,GA=FA;function Ni(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ni.prototype.clear=BA,Ni.prototype.delete=DA,Ni.prototype.get=UA,Ni.prototype.has=$A,Ni.prototype.set=GA;var jA=Ni,zp=jA,qA=Vo,zA=Va;function HA(){this.size=0,this.__data__={hash:new zp,map:new(zA||qA),string:new zp}}var VA=HA;function WA(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var XA=WA,KA=XA;function YA(e,t){var r=e.__data__;return KA(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Xo=YA,ZA=Xo;function QA(e){var t=ZA(this,e).delete(e);return this.size-=t?1:0,t}var JA=QA,tO=Xo;function eO(e){return tO(this,e).get(e)}var rO=eO,nO=Xo;function iO(e){return nO(this,e).has(e)}var sO=iO,oO=Xo;function aO(e,t){var r=oO(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var lO=aO,uO=VA,fO=JA,cO=rO,hO=sO,dO=lO;function Mi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Mi.prototype.clear=uO,Mi.prototype.delete=fO,Mi.prototype.get=cO,Mi.prototype.has=hO,Mi.prototype.set=dO;var Du=Mi,pO=Vo,vO=Va,gO=Du,mO=200;function yO(e,t){var r=this.__data__;if(r instanceof pO){var n=r.__data__;if(!vO||n.length<mO-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new gO(n)}return r.set(e,t),this.size=r.size,this}var _O=yO,bO=Vo,xO=uA,wO=cA,TO=dA,EO=vA,SO=_O;function ki(e){var t=this.__data__=new bO(e);this.size=t.size}ki.prototype.clear=xO,ki.prototype.delete=wO,ki.prototype.get=TO,ki.prototype.has=EO,ki.prototype.set=SO;var Hp=ki,AO="__lodash_hash_undefined__";function OO(e){return this.__data__.set(e,AO),this}var CO=OO;function RO(e){return this.__data__.has(e)}var IO=RO,PO=Du,NO=CO,MO=IO;function Ko(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new PO;++t<r;)this.add(e[t])}Ko.prototype.add=Ko.prototype.push=NO,Ko.prototype.has=MO;var kO=Ko;function LO(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var FO=LO;function BO(e,t){return e.has(t)}var DO=BO,UO=kO,$O=FO,GO=DO,jO=1,qO=2;function zO(e,t,r,n,i,o){var a=r&jO,u=e.length,f=t.length;if(u!=f&&!(a&&f>u))return!1;var h=o.get(e),d=o.get(t);if(h&&d)return h==t&&d==e;var p=-1,c=!0,v=r&qO?new UO:void 0;for(o.set(e,t),o.set(t,e);++p<u;){var y=e[p],_=t[p];if(n)var b=a?n(_,y,p,t,e,o):n(y,_,p,e,t,o);if(b!==void 0){if(b)continue;c=!1;break}if(v){if(!$O(t,function(m,w){if(!GO(v,w)&&(y===m||i(y,m,r,n,o)))return v.push(w)})){c=!1;break}}else if(!(y===_||i(y,_,r,n,o))){c=!1;break}}return o.delete(e),o.delete(t),c}var Vp=zO,HO=Mr,VO=HO.Uint8Array,WO=VO;function XO(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var KO=XO;function YO(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var ZO=YO,Wp=js,Xp=WO,QO=jp,JO=Vp,tC=KO,eC=ZO,rC=1,nC=2,iC="[object Boolean]",sC="[object Date]",oC="[object Error]",aC="[object Map]",lC="[object Number]",uC="[object RegExp]",fC="[object Set]",cC="[object String]",hC="[object Symbol]",dC="[object ArrayBuffer]",pC="[object DataView]",Kp=Wp?Wp.prototype:void 0,Uu=Kp?Kp.valueOf:void 0;function vC(e,t,r,n,i,o,a){switch(r){case pC:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case dC:return!(e.byteLength!=t.byteLength||!o(new Xp(e),new Xp(t)));case iC:case sC:case lC:return QO(+e,+t);case oC:return e.name==t.name&&e.message==t.message;case uC:case cC:return e==t+"";case aC:var u=tC;case fC:var f=n&rC;if(u||(u=eC),e.size!=t.size&&!f)return!1;var h=a.get(e);if(h)return h==t;n|=nC,a.set(e,t);var d=JO(u(e),u(t),n,i,o,a);return a.delete(e),d;case hC:if(Uu)return Uu.call(e)==Uu.call(t)}return!1}var gC=vC;function mC(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var yC=mC,_C=yC,bC=kr;function xC(e,t,r){var n=t(e);return bC(e)?n:_C(n,r(e))}var wC=xC;function TC(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}var EC=TC;function SC(){return[]}var AC=SC,OC=EC,CC=AC,RC=Object.prototype,IC=RC.propertyIsEnumerable,Yp=Object.getOwnPropertySymbols,PC=Yp?function(e){return e==null?[]:(e=Object(e),OC(Yp(e),function(t){return IC.call(e,t)}))}:CC,NC=PC;function MC(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var kC=MC,LC=9007199254740991,FC=/^(?:0|[1-9]\d*)$/;function BC(e,t){var r=typeof e;return t=t??LC,!!t&&(r=="number"||r!="symbol"&&FC.test(e))&&e>-1&&e%1==0&&e<t}var Zp=BC,DC=kC,UC=Qa,$C=kr,GC=tl,jC=Zp,qC=el,zC=Object.prototype,HC=zC.hasOwnProperty;function VC(e,t){var r=$C(e),n=!r&&UC(e),i=!r&&!n&&GC(e),o=!r&&!n&&!i&&qC(e),a=r||n||i||o,u=a?DC(e.length,String):[],f=u.length;for(var h in e)(t||HC.call(e,h))&&!(a&&(h=="length"||i&&(h=="offset"||h=="parent")||o&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||jC(h,f)))&&u.push(h);return u}var WC=VC,XC=WC,KC=vc,YC=qs;function ZC(e){return YC(e)?XC(e):KC(e)}var $u=ZC,QC=wC,JC=NC,tR=$u;function eR(e){return QC(e,tR,JC)}var rR=eR,Qp=rR,nR=1,iR=Object.prototype,sR=iR.hasOwnProperty;function oR(e,t,r,n,i,o){var a=r&nR,u=Qp(e),f=u.length,h=Qp(t),d=h.length;if(f!=d&&!a)return!1;for(var p=f;p--;){var c=u[p];if(!(a?c in t:sR.call(t,c)))return!1}var v=o.get(e),y=o.get(t);if(v&&y)return v==t&&y==e;var _=!0;o.set(e,t),o.set(t,e);for(var b=a;++p<f;){c=u[p];var m=e[c],w=t[c];if(n)var T=a?n(w,m,c,t,e,o):n(m,w,c,e,t,o);if(!(T===void 0?m===w||i(m,w,r,n,o):T)){_=!1;break}b||(b=c=="constructor")}if(_&&!b){var x=e.constructor,E=t.constructor;x!=E&&"constructor"in e&&"constructor"in t&&!(typeof x=="function"&&x instanceof x&&typeof E=="function"&&E instanceof E)&&(_=!1)}return o.delete(e),o.delete(t),_}var aR=oR,Gu=Hp,lR=Vp,uR=gC,fR=aR,Jp=Ic,tv=kr,ev=tl,cR=el,hR=1,rv="[object Arguments]",nv="[object Array]",Yo="[object Object]",dR=Object.prototype,iv=dR.hasOwnProperty;function pR(e,t,r,n,i,o){var a=tv(e),u=tv(t),f=a?nv:Jp(e),h=u?nv:Jp(t);f=f==rv?Yo:f,h=h==rv?Yo:h;var d=f==Yo,p=h==Yo,c=f==h;if(c&&ev(e)){if(!ev(t))return!1;a=!0,d=!1}if(c&&!d)return o||(o=new Gu),a||cR(e)?lR(e,t,r,n,i,o):uR(e,t,f,r,n,i,o);if(!(r&hR)){var v=d&&iv.call(e,"__wrapped__"),y=p&&iv.call(t,"__wrapped__");if(v||y){var _=v?e.value():e,b=y?t.value():t;return o||(o=new Gu),i(_,b,r,n,o)}}return c?(o||(o=new Gu),fR(e,t,r,n,i,o)):!1}var vR=pR,gR=vR,sv=Qi;function ov(e,t,r,n,i){return e===t?!0:e==null||t==null||!sv(e)&&!sv(t)?e!==e&&t!==t:gR(e,t,r,n,ov,i)}var av=ov,mR=Hp,yR=av,_R=1,bR=2;function xR(e,t,r,n){var i=r.length,o=i,a=!n;if(e==null)return!o;for(e=Object(e);i--;){var u=r[i];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<o;){u=r[i];var f=u[0],h=e[f],d=u[1];if(a&&u[2]){if(h===void 0&&!(f in e))return!1}else{var p=new mR;if(n)var c=n(h,d,f,e,t,p);if(!(c===void 0?yR(d,h,_R|bR,n,p):c))return!1}}return!0}var wR=xR,TR=Zi;function ER(e){return e===e&&!TR(e)}var lv=ER,SR=lv,AR=$u;function OR(e){for(var t=AR(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,SR(i)]}return t}var CR=OR;function RR(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var uv=RR,IR=wR,PR=CR,NR=uv;function MR(e){var t=PR(e);return t.length==1&&t[0][2]?NR(t[0][0],t[0][1]):function(r){return r===e||IR(r,e,t)}}var kR=MR,LR=kr,FR=zo,BR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,DR=/^\w*$/;function UR(e,t){if(LR(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||FR(e)?!0:DR.test(e)||!BR.test(e)||t!=null&&e in Object(t)}var ju=UR,fv=Du,$R="Expected a function";function qu(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError($R);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(qu.Cache||fv),r}qu.Cache=fv;var GR=qu,jR=GR,qR=500;function zR(e){var t=jR(e,function(n){return r.size===qR&&r.clear(),n}),r=t.cache;return t}var HR=zR,VR=HR,WR=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,XR=/\\(\\)?/g,KR=VR(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(WR,function(r,n,i,o){t.push(i?o.replace(XR,"$1"):n||r)}),t}),YR=KR,cv=js,ZR=Gp,QR=kr,JR=zo,tI=1/0,hv=cv?cv.prototype:void 0,dv=hv?hv.toString:void 0;function pv(e){if(typeof e=="string")return e;if(QR(e))return ZR(e,pv)+"";if(JR(e))return dv?dv.call(e):"";var t=e+"";return t=="0"&&1/e==-tI?"-0":t}var eI=pv,rI=eI;function nI(e){return e==null?"":rI(e)}var iI=nI,sI=kr,oI=ju,aI=YR,lI=iI;function uI(e,t){return sI(e)?e:oI(e,t)?[e]:aI(lI(e))}var vv=uI,fI=zo,cI=1/0;function hI(e){if(typeof e=="string"||fI(e))return e;var t=e+"";return t=="0"&&1/e==-cI?"-0":t}var Zo=hI,dI=vv,pI=Zo;function vI(e,t){t=dI(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[pI(t[r++])];return r&&r==n?e:void 0}var gv=vI,gI=gv;function mI(e,t,r){var n=e==null?void 0:gI(e,t);return n===void 0?r:n}var yI=mI;function _I(e,t){return e!=null&&t in Object(e)}var bI=_I,xI=vv,wI=Qa,TI=kr,EI=Zp,SI=Ja,AI=Zo;function OI(e,t,r){t=xI(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var a=AI(t[n]);if(!(o=e!=null&&r(e,a)))break;e=e[a]}return o||++n!=i?o:(i=e==null?0:e.length,!!i&&SI(i)&&EI(a,i)&&(TI(e)||wI(e)))}var CI=OI,RI=bI,II=CI;function PI(e,t){return e!=null&&II(e,t,RI)}var NI=PI,MI=av,kI=yI,LI=NI,FI=ju,BI=lv,DI=uv,UI=Zo,$I=1,GI=2;function jI(e,t){return FI(e)&&BI(t)?DI(UI(e),t):function(r){var n=kI(r,e);return n===void 0&&n===t?LI(r,e):MI(t,n,$I|GI)}}var qI=jI;function zI(e){return e}var HI=zI;function VI(e){return function(t){return t==null?void 0:t[e]}}var WI=VI,XI=gv;function KI(e){return function(t){return XI(t,e)}}var YI=KI,ZI=WI,QI=YI,JI=ju,tP=Zo;function eP(e){return JI(e)?ZI(tP(e)):QI(e)}var rP=eP,nP=kR,iP=qI,sP=HI,oP=kr,aP=rP;function lP(e){return typeof e=="function"?e:e==null?sP:typeof e=="object"?oP(e)?iP(e[0],e[1]):nP(e):aP(e)}var uP=lP;function fP(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),u=a.length;u--;){var f=a[e?u:++i];if(r(o[f],f,o)===!1)break}return t}}var cP=fP,hP=cP,dP=hP(),pP=dP,vP=pP,gP=$u;function mP(e,t){return e&&vP(e,t,gP)}var yP=mP,_P=qs;function bP(e,t){return function(r,n){if(r==null)return r;if(!_P(r))return e(r,n);for(var i=r.length,o=t?i:-1,a=Object(r);(t?o--:++o<i)&&n(a[o],o,a)!==!1;);return r}}var xP=bP,wP=yP,TP=xP,EP=TP(wP),SP=EP,AP=SP,OP=qs;function CP(e,t){var r=-1,n=OP(e)?Array(e.length):[];return AP(e,function(i,o,a){n[++r]=t(i,o,a)}),n}var RP=CP,IP=Gp,PP=uP,NP=RP,MP=kr;function kP(e,t){var r=MP(e)?IP:NP;return r(e,PP(t))}var LP=kP;const FP=En(LP);var zn={},mv={},Yr={};Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.loop=Yr.conditional=Yr.parse=void 0;var BP=function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:n;if(Array.isArray(r))r.forEach(function(a){return e(t,a,n,i)});else if(typeof r=="function")r(t,n,i,e);else{var o=Object.keys(r)[0];Array.isArray(r[o])?(i[o]={},e(t,r[o],n,i[o])):i[o]=r[o](t,n,i,e)}return n};Yr.parse=BP;var DP=function(t,r){return function(n,i,o,a){r(n,i,o)&&a(n,t,i,o)}};Yr.conditional=DP;var UP=function(t,r){return function(n,i,o,a){for(var u=[],f=n.pos;r(n,i,o);){var h={};if(a(n,t,i,h),n.pos===f)break;f=n.pos,u.push(h)}return u}};Yr.loop=UP;var be={};Object.defineProperty(be,"__esModule",{value:!0}),be.readBits=be.readArray=be.readUnsigned=be.readString=be.peekBytes=be.readBytes=be.peekByte=be.readByte=be.buildStream=void 0;var $P=function(t){return{data:t,pos:0}};be.buildStream=$P;var yv=function(){return function(t){return t.data[t.pos++]}};be.readByte=yv;var GP=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(r){return r.data[r.pos+t]}};be.peekByte=GP;var Qo=function(t){return function(r){return r.data.subarray(r.pos,r.pos+=t)}};be.readBytes=Qo;var jP=function(t){return function(r){return r.data.subarray(r.pos,r.pos+t)}};be.peekBytes=jP;var qP=function(t){return function(r){return Array.from(Qo(t)(r)).map(function(n){return String.fromCharCode(n)}).join("")}};be.readString=qP;var zP=function(t){return function(r){var n=Qo(2)(r);return t?(n[1]<<8)+n[0]:(n[0]<<8)+n[1]}};be.readUnsigned=zP;var HP=function(t,r){return function(n,i,o){for(var a=typeof r=="function"?r(n,i,o):r,u=Qo(t),f=new Array(a),h=0;h<a;h++)f[h]=u(n);return f}};be.readArray=HP;var VP=function(t,r,n){for(var i=0,o=0;o<n;o++)i+=t[r+o]&&Math.pow(2,n-o-1);return i},WP=function(t){return function(r){for(var n=yv()(r),i=new Array(8),o=0;o<8;o++)i[7-o]=!!(n&1<<o);return Object.keys(t).reduce(function(a,u){var f=t[u];return f.length?a[u]=VP(i,f.index,f.length):a[u]=i[f.index],a},{})}};be.readBits=WP,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Yr,r=be,n={blocks:function(c){for(var v=0,y=[],_=c.data.length,b=0,m=(0,r.readByte)()(c);m!==v&&m;m=(0,r.readByte)()(c)){if(c.pos+m>=_){var w=_-c.pos;y.push((0,r.readBytes)(w)(c)),b+=w;break}y.push((0,r.readBytes)(m)(c)),b+=m}for(var T=new Uint8Array(b),x=0,E=0;E<y.length;E++)T.set(y[E],x),x+=y[E].length;return T}},i=(0,t.conditional)({gce:[{codes:(0,r.readBytes)(2)},{byteSize:(0,r.readByte)()},{extras:(0,r.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,r.readUnsigned)(!0)},{transparentColorIndex:(0,r.readByte)()},{terminator:(0,r.readByte)()}]},function(p){var c=(0,r.peekBytes)(2)(p);return c[0]===33&&c[1]===249}),o=(0,t.conditional)({image:[{code:(0,r.readByte)()},{descriptor:[{left:(0,r.readUnsigned)(!0)},{top:(0,r.readUnsigned)(!0)},{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{lct:(0,r.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,t.conditional)({lct:(0,r.readArray)(3,function(p,c,v){return Math.pow(2,v.descriptor.lct.size+1)})},function(p,c,v){return v.descriptor.lct.exists}),{data:[{minCodeSize:(0,r.readByte)()},n]}]},function(p){return(0,r.peekByte)()(p)===44}),a=(0,t.conditional)({text:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{preData:function(c,v,y){return(0,r.readBytes)(y.text.blockSize)(c)}},n]},function(p){var c=(0,r.peekBytes)(2)(p);return c[0]===33&&c[1]===1}),u=(0,t.conditional)({application:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{id:function(c,v,y){return(0,r.readString)(y.blockSize)(c)}},n]},function(p){var c=(0,r.peekBytes)(2)(p);return c[0]===33&&c[1]===255}),f=(0,t.conditional)({comment:[{codes:(0,r.readBytes)(2)},n]},function(p){var c=(0,r.peekBytes)(2)(p);return c[0]===33&&c[1]===254}),h=[{header:[{signature:(0,r.readString)(3)},{version:(0,r.readString)(3)}]},{lsd:[{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{gct:(0,r.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,r.readByte)()},{pixelAspectRatio:(0,r.readByte)()}]},(0,t.conditional)({gct:(0,r.readArray)(3,function(p,c){return Math.pow(2,c.lsd.gct.size+1)})},function(p,c){return c.lsd.gct.exists}),{frames:(0,t.loop)([i,u,f,o,a],function(p){var c=(0,r.peekByte)()(p);return c===33||c===44})}],d=h;e.default=d}(mv);var Jo={};Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.deinterlace=void 0;var XP=function(t,r){for(var n=new Array(t.length),i=t.length/r,o=function(c,v){var y=t.slice(v*r,(v+1)*r);n.splice.apply(n,[c*r,r].concat(y))},a=[0,4,2,1],u=[8,8,4,2],f=0,h=0;h<4;h++)for(var d=a[h];d<i;d+=u[h])o(d,f),f++;return n};Jo.deinterlace=XP;var ta={};Object.defineProperty(ta,"__esModule",{value:!0}),ta.lzw=void 0;var KP=function(t,r,n){var i=4096,o=-1,a=n,u,f,h,d,p,c,v,I,y,_,E,b,O,A,R,L,m=new Array(n),w=new Array(i),T=new Array(i),x=new Array(i+1);for(b=t,f=1<<b,p=f+1,u=f+2,v=o,d=b+1,h=(1<<d)-1,y=0;y<f;y++)w[y]=0,T[y]=y;var E,I,O,A,L,R;for(E=I=O=A=L=R=0,_=0;_<a;){if(A===0){if(I<d){E+=r[R]<<I,I+=8,R++;continue}if(y=E&h,E>>=d,I-=d,y>u||y==p)break;if(y==f){d=b+1,h=(1<<d)-1,u=f+2,v=o;continue}if(v==o){x[A++]=T[y],v=y,O=y;continue}for(c=y,y==u&&(x[A++]=O,y=v);y>f;)x[A++]=T[y],y=w[y];O=T[y]&255,x[A++]=O,u<i&&(w[u]=v,T[u]=O,u++,!(u&h)&&u<i&&(d++,h+=u)),v=c}A--,m[L++]=x[A],_++}for(_=L;_<a;_++)m[_]=0;return m};ta.lzw=KP,Object.defineProperty(zn,"__esModule",{value:!0}),zn.decompressFrames=zn.decompressFrame=zn.parseGIF=void 0;var YP=eN(mv),ZP=Yr,QP=be,JP=Jo,tN=ta;function eN(e){return e&&e.__esModule?e:{default:e}}var rN=function(t){var r=new Uint8Array(t);return(0,ZP.parse)((0,QP.buildStream)(r),YP.default)};zn.parseGIF=rN;var nN=function(t){for(var r=t.pixels.length,n=new Uint8ClampedArray(r*4),i=0;i<r;i++){var o=i*4,a=t.pixels[i],u=t.colorTable[a]||[0,0,0];n[o]=u[0],n[o+1]=u[1],n[o+2]=u[2],n[o+3]=a!==t.transparentIndex?255:0}return n},_v=function(t,r,n){if(!t.image){console.warn("gif frame does not have associated image.");return}var i=t.image,o=i.descriptor.width*i.descriptor.height,a=(0,tN.lzw)(i.data.minCodeSize,i.data.blocks,o);i.descriptor.lct.interlaced&&(a=(0,JP.deinterlace)(a,i.descriptor.width));var u={pixels:a,dims:{top:t.image.descriptor.top,left:t.image.descriptor.left,width:t.image.descriptor.width,height:t.image.descriptor.height}};return i.descriptor.lct&&i.descriptor.lct.exists?u.colorTable=i.lct:u.colorTable=r,t.gce&&(u.delay=(t.gce.delay||10)*10,u.disposalType=t.gce.extras.disposal,t.gce.extras.transparentColorGiven&&(u.transparentIndex=t.gce.transparentColorIndex)),n&&(u.patch=nN(u)),u};zn.decompressFrame=_v;var iN=function(t,r){return t.frames.filter(function(n){return n.image}).map(function(n){return _v(n,t.gct,r)})};zn.decompressFrames=iN;const bv=(e,t={})=>{typeof t=="function"&&(t=t(e));const r=t.loaded&&e.loaded!==t.loaded,{playing:n,...i}=t,o={...e,...i};return r&&Object.assign(o,{playing:o.autoPlay&&o.loaded}),(t.delays!=null||t.frames!=null)&&Object.assign(o,{length:o.frames.length}),(t.index!=null||t.frames!=null)&&Object.assign(o,{index:o.length===0?0:(o.length+o.index)%o.length}),t.playing!=null&&Object.assign(o,o.loaded?{playing:n}:{autoPlay:n}),o},sN=e=>bv({autoPlay:!0,playing:!1,frames:[],delays:[],index:0,length:0,loaded:!1},e),oN=e=>mt.useReducer(bv,e,sN);var aN='function e(e){var r={exports:{}};return e(r,r.exports),r.exports}var r=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.loop=r.conditional=r.parse=void 0;r.parse=function e(r,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;if(Array.isArray(t))t.forEach((function(t){return e(r,t,n,a)}));else if("function"==typeof t)t(r,n,a,e);else{var i=Object.keys(t)[0];Array.isArray(t[i])?(a[i]={},e(r,t[i],n,a[i])):a[i]=t[i](r,n,a,e)}return n};r.conditional=function(e,r){return function(t,n,a,i){r(t,n,a)&&i(t,e,n,a)}};r.loop=function(e,r){return function(t,n,a,i){for(var o=[];r(t,n,a);){var s={};i(t,e,n,s),o.push(s)}return o}}})),t=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.readBits=r.readArray=r.readUnsigned=r.readString=r.peekBytes=r.readBytes=r.peekByte=r.readByte=r.buildStream=void 0;r.buildStream=function(e){return{data:e,pos:0}};var t=function(){return function(e){return e.data[e.pos++]}};r.readByte=t;r.peekByte=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return function(r){return r.data[r.pos+e]}};var n=function(e){return function(r){return r.data.subarray(r.pos,r.pos+=e)}};r.readBytes=n;r.peekBytes=function(e){return function(r){return r.data.subarray(r.pos,r.pos+e)}};r.readString=function(e){return function(r){return Array.from(n(e)(r)).map((function(e){return String.fromCharCode(e)})).join("")}};r.readUnsigned=function(e){return function(r){var t=n(2)(r);return e?(t[1]<<8)+t[0]:(t[0]<<8)+t[1]}};r.readArray=function(e,r){return function(t,a,i){for(var o="function"==typeof r?r(t,a,i):r,s=n(e),d=new Array(o),c=0;c<o;c++)d[c]=s(t);return d}};r.readBits=function(e){return function(r){for(var t=function(e){return e.data[e.pos++]}(r),n=new Array(8),a=0;a<8;a++)n[7-a]=!!(t&1<<a);return Object.keys(e).reduce((function(r,t){var a=e[t];return a.length?r[t]=function(e,r,t){for(var n=0,a=0;a<t;a++)n+=e[r+a]&&Math.pow(2,t-a-1);return n}(n,a.index,a.length):r[t]=n[a.index],r}),{})}}})),n=e((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a={blocks:function(e){for(var r=[],n=e.data.length,a=0,i=(0,t.readByte)()(e);0!==i;i=(0,t.readByte)()(e)){if(e.pos+i>=n){var o=n-e.pos;r.push((0,t.readBytes)(o)(e)),a+=o;break}r.push((0,t.readBytes)(i)(e)),a+=i}for(var s=new Uint8Array(a),d=0,c=0;c<r.length;c++)s.set(r[c],d),d+=r[c].length;return s}},i=(0,r.conditional)({gce:[{codes:(0,t.readBytes)(2)},{byteSize:(0,t.readByte)()},{extras:(0,t.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,t.readUnsigned)(!0)},{transparentColorIndex:(0,t.readByte)()},{terminator:(0,t.readByte)()}]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&249===r[1]})),o=(0,r.conditional)({image:[{code:(0,t.readByte)()},{descriptor:[{left:(0,t.readUnsigned)(!0)},{top:(0,t.readUnsigned)(!0)},{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{lct:(0,t.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,r.conditional)({lct:(0,t.readArray)(3,(function(e,r,t){return Math.pow(2,t.descriptor.lct.size+1)}))},(function(e,r,t){return t.descriptor.lct.exists})),{data:[{minCodeSize:(0,t.readByte)()},a]}]},(function(e){return 44===(0,t.peekByte)()(e)})),s=(0,r.conditional)({text:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{preData:function(e,r,n){return(0,t.readBytes)(n.text.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&1===r[1]})),d=(0,r.conditional)({application:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{id:function(e,r,n){return(0,t.readString)(n.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&255===r[1]})),c=(0,r.conditional)({comment:[{codes:(0,t.readBytes)(2)},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&254===r[1]})),u=[{header:[{signature:(0,t.readString)(3)},{version:(0,t.readString)(3)}]},{lsd:[{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{gct:(0,t.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,t.readByte)()},{pixelAspectRatio:(0,t.readByte)()}]},(0,r.conditional)({gct:(0,t.readArray)(3,(function(e,r){return Math.pow(2,r.lsd.gct.size+1)}))},(function(e,r){return r.lsd.gct.exists})),{frames:(0,r.loop)([i,d,c,o,s],(function(e){var r=(0,t.peekByte)()(e);return 33===r||44===r}))}];n.default=u})),a=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.deinterlace=void 0;r.deinterlace=function(e,r){for(var t=new Array(e.length),n=e.length/r,a=function(n,a){var i=e.slice(a*r,(a+1)*r);t.splice.apply(t,[n*r,r].concat(i))},i=[0,4,2,1],o=[8,8,4,2],s=0,d=0;d<4;d++)for(var c=i[d];c<n;c+=o[d])a(c,s),s++;return t}})),i=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.lzw=void 0;r.lzw=function(e,r,t){var n,a,i,o,s,d,c,u,l,f,p,g,y,h,v,m,x=4096,B=t,w=new Array(t),b=new Array(x),k=new Array(x),A=new Array(4097);for(s=(a=1<<(f=e))+1,n=a+2,c=-1,i=(1<<(o=f+1))-1,u=0;u<a;u++)b[u]=0,k[u]=u;for(p=g=y=h=v=m=0,l=0;l<B;){if(0===h){if(g<o){p+=r[m]<<g,g+=8,m++;continue}if(u=p&i,p>>=o,g-=o,u>n||u==s)break;if(u==a){i=(1<<(o=f+1))-1,n=a+2,c=-1;continue}if(-1==c){A[h++]=k[u],c=u,y=u;continue}for(d=u,u==n&&(A[h++]=y,u=c);u>a;)A[h++]=k[u],u=b[u];y=255&k[u],A[h++]=y,n<x&&(b[n]=c,k[n]=y,0==(++n&i)&&n<x&&(o++,i+=n)),c=d}h--,w[v++]=A[h],l++}for(l=v;l<B;l++)w[l]=0;return w}})),o=e((function(e,o){Object.defineProperty(o,"__esModule",{value:!0}),o.decompressFrames=o.decompressFrame=o.parseGIF=void 0;var s,d=(s=n)&&s.__esModule?s:{default:s};o.parseGIF=function(e){var n=new Uint8Array(e);return(0,r.parse)((0,t.buildStream)(n),d.default)};var c=function(e,r,t){if(e.image){var n=e.image,o=n.descriptor.width*n.descriptor.height,s=(0,i.lzw)(n.data.minCodeSize,n.data.blocks,o);n.descriptor.lct.interlaced&&(s=(0,a.deinterlace)(s,n.descriptor.width));var d={pixels:s,dims:{top:e.image.descriptor.top,left:e.image.descriptor.left,width:e.image.descriptor.width,height:e.image.descriptor.height}};return n.descriptor.lct&&n.descriptor.lct.exists?d.colorTable=n.lct:d.colorTable=r,e.gce&&(d.delay=10*(e.gce.delay||10),d.disposalType=e.gce.extras.disposal,e.gce.extras.transparentColorGiven&&(d.transparentIndex=e.gce.transparentColorIndex)),t&&(d.patch=function(e){for(var r=e.pixels.length,t=new Uint8ClampedArray(4*r),n=0;n<r;n++){var a=4*n,i=e.pixels[n],o=e.colorTable[i]||[0,0,0];t[a]=o[0],t[a+1]=o[1],t[a+2]=o[2],t[a+3]=i!==e.transparentIndex?255:0}return t}(d)),d}console.warn("gif frame does not have associated image.")};o.decompressFrame=c;o.decompressFrames=function(e,r){return e.frames.filter((function(e){return e.image})).map((function(t){return c(t,e.gct,r)}))}}));const s=(e,r,t)=>{const{width:n,height:a,top:i,left:o}=r.dims,s=i*t.width+o;for(let i=0;i<a;i++)for(let a=0;a<n;a++){const o=i*n+a,d=r.pixels[o];if(d!==r.transparentIndex){const n=s+i*t.width+a,o=r.colorTable[d]||[0,0,0];e[4*n]=o[0],e[4*n+1]=o[1],e[4*n+2]=o[2],e[4*n+3]=255}}return e},d=new Map;self.addEventListener("message",(e=>{const{type:r,src:t}=e.data||e;switch(r){case"parse":if(!d.has(t)){const e=new AbortController,r={signal:e.signal};d.set(t,e),((e,{signal:r})=>fetch(e,{signal:r}).then((e=>{if(!e.headers.get("Content-Type").includes("image/gif"))throw Error(`Wrong content type: "${e.headers.get("Content-Type")}"`);return e.arrayBuffer()})).then((e=>o.parseGIF(e))).then((e=>((e=>{let r=null;for(const t of e.frames)r=t.gce?t.gce:r,"image"in t&&!("gce"in t)&&(t.gce=r)})(e),e))).then((e=>Promise.all([o.decompressFrames(e,!1),{width:e.lsd.width,height:e.lsd.height}]))).then((([e,r])=>{const t=[],n=r.width*r.height*4;for(let a=0;a<e.length;++a){const i=e[a],o=0===a||2===e[a-1].disposalType?new Uint8ClampedArray(n):t[a-1].slice();t.push(s(o,i,r))}return{...r,loaded:!0,delays:e.map((e=>e.delay)),frames:t}})))(t,r).then((e=>{self.postMessage(Object.assign(e,{src:t}),e.frames.map((e=>e.buffer)))})).catch((e=>{self.postMessage({src:t,error:e,loaded:!0})})).finally((()=>{d.delete(t)}))}break;case"cancel":if(d.has(t)){d.get(t).abort(),d.delete(t)}}}));\n';function lN(e){const t=new Blob([aN],{type:"application/javascript"}),r=URL.createObjectURL(t),n=new Worker(r,e);return URL.revokeObjectURL(r),n}const uN=e=>({...e,frames:e.frames.map(t=>{const r=new ImageData(e.width,e.height);return r.data.set(new Uint8ClampedArray(t)),r})}),fN=(e,t)=>{const r={};return()=>(r.instance||(r.instance=e()),mt.useLayoutEffect(()=>(r.timeout?(clearTimeout(r.timeout),delete r.timeout):r.usageCount=(r.usageCount||0)+1,()=>{r.timeout=setTimeout(()=>{r.usageCount=r.usageCount-1,r.usageCount===0&&(t&&t(r.instance),delete r.instance,delete r.timeout)})}),[r,t]),r.instance)},cN=e=>{const t=mt.useRef(e);return mt.useEffect(()=>{t.current=e},[e]),t},hN=e=>{const t=cN(e);return mt.useCallback(r=>t.current&&t.current(r),[])},dN=fN(()=>new lN,e=>e.terminate()),pN=(e,t)=>{const r=hN(t),n=dN();mt.useEffect(()=>{if(typeof e=="string"){const i=o=>{const a=o.data||o;if(a.src===e){const u=a.error?a:uN(a);r(u)}};return n.addEventListener("message",i),n.postMessage({src:e,type:"parse"}),()=>{n.postMessage({src:e,type:"cancel"}),n.removeEventListener("message",i)}}},[n,e])},vN=({isPlaying:e,forwardRef:t,...r})=>{const n=Et.useRef(null);return Et.useImperativeHandle(t,()=>n.current,[n]),Et.useEffect(()=>{if(n.current===null)return;const i=n.current;i[e?"gotoAndPlay":"gotoAndStop"](i.currentFrame)},[e]),Vt.jsx(le.AnimatedSprite,{ref:n,...r,isPlaying:e})},xv=Et.memo(vN);var ea={exports:{}};/**
1935
1935
  * @license
1936
1936
  * Lodash <https://lodash.com/>
1937
1937
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
1938
1938
  * Released under MIT license <https://lodash.com/license>
1939
1939
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
1940
1940
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1941
- */ta.exports,function(e,t){(function(){var r,n="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",u="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",h=500,d="__lodash_placeholder__",p=1,c=2,v=4,y=1,b=2,_=1,m=2,w=4,T=8,x=16,E=32,I=64,A=128,O=256,L=512,R=30,C="...",P=800,M=16,F=1,q=2,Z=3,z=1/0,nt=9007199254740991,V=17976931348623157e292,U=0/0,k=4294967295,j=k-1,G=k>>>1,X=[["ary",A],["bind",_],["bindKey",m],["curry",T],["curryRight",x],["flip",L],["partial",E],["partialRight",I],["rearg",O]],Y="[object Arguments]",$="[object Array]",W="[object AsyncFunction]",et="[object Boolean]",J="[object Date]",it="[object DOMException]",lt="[object Error]",pt="[object Function]",yt="[object GeneratorFunction]",xt="[object Map]",At="[object Number]",oe="[object Null]",Ht="[object Object]",rt="[object Promise]",at="[object Proxy]",dt="[object RegExp]",vt="[object Set]",ct="[object String]",Pt="[object Symbol]",Lt="[object Undefined]",Nt="[object WeakMap]",He="[object WeakSet]",Ge="[object ArrayBuffer]",Qt="[object DataView]",Es="[object Float32Array]",he="[object Float64Array]",ur="[object Int8Array]",zu="[object Int16Array]",Hu="[object Int32Array]",Vu="[object Uint8Array]",Wu="[object Uint8ClampedArray]",Xu="[object Uint16Array]",Ku="[object Uint32Array]",TN=/\b__p \+= '';/g,EN=/\b(__p \+=) '' \+/g,SN=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Cv=/&(?:amp|lt|gt|quot|#39);/g,Rv=/[&<>"']/g,AN=RegExp(Cv.source),ON=RegExp(Rv.source),CN=/<%-([\s\S]+?)%>/g,RN=/<%([\s\S]+?)%>/g,Iv=/<%=([\s\S]+?)%>/g,IN=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,PN=/^\w*$/,NN=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yu=/[\\^$.*+?()[\]{}|]/g,MN=RegExp(Yu.source),Zu=/^\s+/,kN=/\s/,LN=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,FN=/\{\n\/\* \[wrapped with (.+)\] \*/,BN=/,? & /,DN=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,UN=/[()=,{}\[\]\/\s]/,$N=/\\(\\)?/g,GN=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Pv=/\w*$/,jN=/^[-+]0x[0-9a-f]+$/i,qN=/^0b[01]+$/i,zN=/^\[object .+?Constructor\]$/,HN=/^0o[0-7]+$/i,VN=/^(?:0|[1-9]\d*)$/,WN=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ea=/($^)/,XN=/['\n\r\u2028\u2029\\]/g,ra="\\ud800-\\udfff",KN="\\u0300-\\u036f",YN="\\ufe20-\\ufe2f",ZN="\\u20d0-\\u20ff",Nv=KN+YN+ZN,Mv="\\u2700-\\u27bf",kv="a-z\\xdf-\\xf6\\xf8-\\xff",QN="\\xac\\xb1\\xd7\\xf7",JN="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",tM="\\u2000-\\u206f",eM=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Lv="A-Z\\xc0-\\xd6\\xd8-\\xde",Fv="\\ufe0e\\ufe0f",Bv=QN+JN+tM+eM,Qu="['’]",rM="["+ra+"]",Dv="["+Bv+"]",na="["+Nv+"]",Uv="\\d+",nM="["+Mv+"]",$v="["+kv+"]",Gv="[^"+ra+Bv+Uv+Mv+kv+Lv+"]",Ju="\\ud83c[\\udffb-\\udfff]",iM="(?:"+na+"|"+Ju+")",jv="[^"+ra+"]",tf="(?:\\ud83c[\\udde6-\\uddff]){2}",ef="[\\ud800-\\udbff][\\udc00-\\udfff]",ki="["+Lv+"]",qv="\\u200d",zv="(?:"+$v+"|"+Gv+")",sM="(?:"+ki+"|"+Gv+")",Hv="(?:"+Qu+"(?:d|ll|m|re|s|t|ve))?",Vv="(?:"+Qu+"(?:D|LL|M|RE|S|T|VE))?",Wv=iM+"?",Xv="["+Fv+"]?",oM="(?:"+qv+"(?:"+[jv,tf,ef].join("|")+")"+Xv+Wv+")*",aM="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",lM="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Kv=Xv+Wv+oM,uM="(?:"+[nM,tf,ef].join("|")+")"+Kv,fM="(?:"+[jv+na+"?",na,tf,ef,rM].join("|")+")",cM=RegExp(Qu,"g"),hM=RegExp(na,"g"),rf=RegExp(Ju+"(?="+Ju+")|"+fM+Kv,"g"),dM=RegExp([ki+"?"+$v+"+"+Hv+"(?="+[Dv,ki,"$"].join("|")+")",sM+"+"+Vv+"(?="+[Dv,ki+zv,"$"].join("|")+")",ki+"?"+zv+"+"+Hv,ki+"+"+Vv,lM,aM,Uv,uM].join("|"),"g"),pM=RegExp("["+qv+ra+Nv+Fv+"]"),vM=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,gM=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],mM=-1,fe={};fe[Es]=fe[he]=fe[ur]=fe[zu]=fe[Hu]=fe[Vu]=fe[Wu]=fe[Xu]=fe[Ku]=!0,fe[Y]=fe[$]=fe[Ge]=fe[et]=fe[Qt]=fe[J]=fe[lt]=fe[pt]=fe[xt]=fe[At]=fe[Ht]=fe[dt]=fe[vt]=fe[ct]=fe[Nt]=!1;var ae={};ae[Y]=ae[$]=ae[Ge]=ae[Qt]=ae[et]=ae[J]=ae[Es]=ae[he]=ae[ur]=ae[zu]=ae[Hu]=ae[xt]=ae[At]=ae[Ht]=ae[dt]=ae[vt]=ae[ct]=ae[Pt]=ae[Vu]=ae[Wu]=ae[Xu]=ae[Ku]=!0,ae[lt]=ae[pt]=ae[Nt]=!1;var yM={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},_M={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},bM={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},xM={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},wM=parseFloat,TM=parseInt,Yv=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,EM=typeof self=="object"&&self&&self.Object===Object&&self,Me=Yv||EM||Function("return this")(),nf=t&&!t.nodeType&&t,Hn=nf&&!0&&e&&!e.nodeType&&e,Zv=Hn&&Hn.exports===nf,sf=Zv&&Yv.process,fr=function(){try{var Q=Hn&&Hn.require&&Hn.require("util").types;return Q||sf&&sf.binding&&sf.binding("util")}catch{}}(),Qv=fr&&fr.isArrayBuffer,Jv=fr&&fr.isDate,tg=fr&&fr.isMap,eg=fr&&fr.isRegExp,rg=fr&&fr.isSet,ng=fr&&fr.isTypedArray;function er(Q,ot,st){switch(st.length){case 0:return Q.call(ot);case 1:return Q.call(ot,st[0]);case 2:return Q.call(ot,st[0],st[1]);case 3:return Q.call(ot,st[0],st[1],st[2])}return Q.apply(ot,st)}function SM(Q,ot,st,bt){for(var It=-1,Yt=Q==null?0:Q.length;++It<Yt;){var Se=Q[It];ot(bt,Se,st(Se),Q)}return bt}function cr(Q,ot){for(var st=-1,bt=Q==null?0:Q.length;++st<bt&&ot(Q[st],st,Q)!==!1;);return Q}function AM(Q,ot){for(var st=Q==null?0:Q.length;st--&&ot(Q[st],st,Q)!==!1;);return Q}function ig(Q,ot){for(var st=-1,bt=Q==null?0:Q.length;++st<bt;)if(!ot(Q[st],st,Q))return!1;return!0}function vn(Q,ot){for(var st=-1,bt=Q==null?0:Q.length,It=0,Yt=[];++st<bt;){var Se=Q[st];ot(Se,st,Q)&&(Yt[It++]=Se)}return Yt}function ia(Q,ot){var st=Q==null?0:Q.length;return!!st&&Li(Q,ot,0)>-1}function of(Q,ot,st){for(var bt=-1,It=Q==null?0:Q.length;++bt<It;)if(st(ot,Q[bt]))return!0;return!1}function de(Q,ot){for(var st=-1,bt=Q==null?0:Q.length,It=Array(bt);++st<bt;)It[st]=ot(Q[st],st,Q);return It}function gn(Q,ot){for(var st=-1,bt=ot.length,It=Q.length;++st<bt;)Q[It+st]=ot[st];return Q}function af(Q,ot,st,bt){var It=-1,Yt=Q==null?0:Q.length;for(bt&&Yt&&(st=Q[++It]);++It<Yt;)st=ot(st,Q[It],It,Q);return st}function OM(Q,ot,st,bt){var It=Q==null?0:Q.length;for(bt&&It&&(st=Q[--It]);It--;)st=ot(st,Q[It],It,Q);return st}function lf(Q,ot){for(var st=-1,bt=Q==null?0:Q.length;++st<bt;)if(ot(Q[st],st,Q))return!0;return!1}var CM=uf("length");function RM(Q){return Q.split("")}function IM(Q){return Q.match(DN)||[]}function sg(Q,ot,st){var bt;return st(Q,function(It,Yt,Se){if(ot(It,Yt,Se))return bt=Yt,!1}),bt}function sa(Q,ot,st,bt){for(var It=Q.length,Yt=st+(bt?1:-1);bt?Yt--:++Yt<It;)if(ot(Q[Yt],Yt,Q))return Yt;return-1}function Li(Q,ot,st){return ot===ot?jM(Q,ot,st):sa(Q,og,st)}function PM(Q,ot,st,bt){for(var It=st-1,Yt=Q.length;++It<Yt;)if(bt(Q[It],ot))return It;return-1}function og(Q){return Q!==Q}function ag(Q,ot){var st=Q==null?0:Q.length;return st?cf(Q,ot)/st:U}function uf(Q){return function(ot){return ot==null?r:ot[Q]}}function ff(Q){return function(ot){return Q==null?r:Q[ot]}}function lg(Q,ot,st,bt,It){return It(Q,function(Yt,Se,ie){st=bt?(bt=!1,Yt):ot(st,Yt,Se,ie)}),st}function NM(Q,ot){var st=Q.length;for(Q.sort(ot);st--;)Q[st]=Q[st].value;return Q}function cf(Q,ot){for(var st,bt=-1,It=Q.length;++bt<It;){var Yt=ot(Q[bt]);Yt!==r&&(st=st===r?Yt:st+Yt)}return st}function hf(Q,ot){for(var st=-1,bt=Array(Q);++st<Q;)bt[st]=ot(st);return bt}function MM(Q,ot){return de(ot,function(st){return[st,Q[st]]})}function ug(Q){return Q&&Q.slice(0,dg(Q)+1).replace(Zu,"")}function rr(Q){return function(ot){return Q(ot)}}function df(Q,ot){return de(ot,function(st){return Q[st]})}function Ss(Q,ot){return Q.has(ot)}function fg(Q,ot){for(var st=-1,bt=Q.length;++st<bt&&Li(ot,Q[st],0)>-1;);return st}function cg(Q,ot){for(var st=Q.length;st--&&Li(ot,Q[st],0)>-1;);return st}function kM(Q,ot){for(var st=Q.length,bt=0;st--;)Q[st]===ot&&++bt;return bt}var LM=ff(yM),FM=ff(_M);function BM(Q){return"\\"+xM[Q]}function DM(Q,ot){return Q==null?r:Q[ot]}function Fi(Q){return pM.test(Q)}function UM(Q){return vM.test(Q)}function $M(Q){for(var ot,st=[];!(ot=Q.next()).done;)st.push(ot.value);return st}function pf(Q){var ot=-1,st=Array(Q.size);return Q.forEach(function(bt,It){st[++ot]=[It,bt]}),st}function hg(Q,ot){return function(st){return Q(ot(st))}}function mn(Q,ot){for(var st=-1,bt=Q.length,It=0,Yt=[];++st<bt;){var Se=Q[st];(Se===ot||Se===d)&&(Q[st]=d,Yt[It++]=st)}return Yt}function oa(Q){var ot=-1,st=Array(Q.size);return Q.forEach(function(bt){st[++ot]=bt}),st}function GM(Q){var ot=-1,st=Array(Q.size);return Q.forEach(function(bt){st[++ot]=[bt,bt]}),st}function jM(Q,ot,st){for(var bt=st-1,It=Q.length;++bt<It;)if(Q[bt]===ot)return bt;return-1}function qM(Q,ot,st){for(var bt=st+1;bt--;)if(Q[bt]===ot)return bt;return bt}function Bi(Q){return Fi(Q)?HM(Q):CM(Q)}function Rr(Q){return Fi(Q)?VM(Q):RM(Q)}function dg(Q){for(var ot=Q.length;ot--&&kN.test(Q.charAt(ot)););return ot}var zM=ff(bM);function HM(Q){for(var ot=rf.lastIndex=0;rf.test(Q);)++ot;return ot}function VM(Q){return Q.match(rf)||[]}function WM(Q){return Q.match(dM)||[]}var XM=function Q(ot){ot=ot==null?Me:Di.defaults(Me.Object(),ot,Di.pick(Me,gM));var st=ot.Array,bt=ot.Date,It=ot.Error,Yt=ot.Function,Se=ot.Math,ie=ot.Object,vf=ot.RegExp,KM=ot.String,hr=ot.TypeError,aa=st.prototype,YM=Yt.prototype,Ui=ie.prototype,la=ot["__core-js_shared__"],ua=YM.toString,ee=Ui.hasOwnProperty,ZM=0,pg=function(){var s=/[^.]+$/.exec(la&&la.keys&&la.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),fa=Ui.toString,QM=ua.call(ie),JM=Me._,t3=vf("^"+ua.call(ee).replace(Yu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ca=Zv?ot.Buffer:r,yn=ot.Symbol,ha=ot.Uint8Array,vg=ca?ca.allocUnsafe:r,da=hg(ie.getPrototypeOf,ie),gg=ie.create,mg=Ui.propertyIsEnumerable,pa=aa.splice,yg=yn?yn.isConcatSpreadable:r,As=yn?yn.iterator:r,Vn=yn?yn.toStringTag:r,va=function(){try{var s=Zn(ie,"defineProperty");return s({},"",{}),s}catch{}}(),e3=ot.clearTimeout!==Me.clearTimeout&&ot.clearTimeout,r3=bt&&bt.now!==Me.Date.now&&bt.now,n3=ot.setTimeout!==Me.setTimeout&&ot.setTimeout,ga=Se.ceil,ma=Se.floor,gf=ie.getOwnPropertySymbols,i3=ca?ca.isBuffer:r,_g=ot.isFinite,s3=aa.join,o3=hg(ie.keys,ie),Ae=Se.max,De=Se.min,a3=bt.now,l3=ot.parseInt,bg=Se.random,u3=aa.reverse,mf=Zn(ot,"DataView"),Os=Zn(ot,"Map"),yf=Zn(ot,"Promise"),$i=Zn(ot,"Set"),Cs=Zn(ot,"WeakMap"),Rs=Zn(ie,"create"),ya=Cs&&new Cs,Gi={},f3=Qn(mf),c3=Qn(Os),h3=Qn(yf),d3=Qn($i),p3=Qn(Cs),_a=yn?yn.prototype:r,Is=_a?_a.valueOf:r,xg=_a?_a.toString:r;function B(s){if(ye(s)&&!Mt(s)&&!(s instanceof Gt)){if(s instanceof dr)return s;if(ee.call(s,"__wrapped__"))return wm(s)}return new dr(s)}var ji=function(){function s(){}return function(l){if(!me(l))return{};if(gg)return gg(l);s.prototype=l;var g=new s;return s.prototype=r,g}}();function ba(){}function dr(s,l){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!l,this.__index__=0,this.__values__=r}B.templateSettings={escape:CN,evaluate:RN,interpolate:Iv,variable:"",imports:{_:B}},B.prototype=ba.prototype,B.prototype.constructor=B,dr.prototype=ji(ba.prototype),dr.prototype.constructor=dr;function Gt(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=k,this.__views__=[]}function v3(){var s=new Gt(this.__wrapped__);return s.__actions__=Ve(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=Ve(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=Ve(this.__views__),s}function g3(){if(this.__filtered__){var s=new Gt(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function m3(){var s=this.__wrapped__.value(),l=this.__dir__,g=Mt(s),S=l<0,N=g?s.length:0,D=Rk(0,N,this.__views__),H=D.start,K=D.end,tt=K-H,ut=S?K:H-1,ft=this.__iteratees__,ht=ft.length,gt=0,wt=De(tt,this.__takeCount__);if(!g||!S&&N==tt&&wt==tt)return Hg(s,this.__actions__);var Ot=[];t:for(;tt--&&gt<wt;){ut+=l;for(var Ft=-1,Ct=s[ut];++Ft<ht;){var Ut=ft[Ft],qt=Ut.iteratee,sr=Ut.type,ze=qt(Ct);if(sr==q)Ct=ze;else if(!ze){if(sr==F)continue t;break t}}Ot[gt++]=Ct}return Ot}Gt.prototype=ji(ba.prototype),Gt.prototype.constructor=Gt;function Wn(s){var l=-1,g=s==null?0:s.length;for(this.clear();++l<g;){var S=s[l];this.set(S[0],S[1])}}function y3(){this.__data__=Rs?Rs(null):{},this.size=0}function _3(s){var l=this.has(s)&&delete this.__data__[s];return this.size-=l?1:0,l}function b3(s){var l=this.__data__;if(Rs){var g=l[s];return g===f?r:g}return ee.call(l,s)?l[s]:r}function x3(s){var l=this.__data__;return Rs?l[s]!==r:ee.call(l,s)}function w3(s,l){var g=this.__data__;return this.size+=this.has(s)?0:1,g[s]=Rs&&l===r?f:l,this}Wn.prototype.clear=y3,Wn.prototype.delete=_3,Wn.prototype.get=b3,Wn.prototype.has=x3,Wn.prototype.set=w3;function Zr(s){var l=-1,g=s==null?0:s.length;for(this.clear();++l<g;){var S=s[l];this.set(S[0],S[1])}}function T3(){this.__data__=[],this.size=0}function E3(s){var l=this.__data__,g=xa(l,s);if(g<0)return!1;var S=l.length-1;return g==S?l.pop():pa.call(l,g,1),--this.size,!0}function S3(s){var l=this.__data__,g=xa(l,s);return g<0?r:l[g][1]}function A3(s){return xa(this.__data__,s)>-1}function O3(s,l){var g=this.__data__,S=xa(g,s);return S<0?(++this.size,g.push([s,l])):g[S][1]=l,this}Zr.prototype.clear=T3,Zr.prototype.delete=E3,Zr.prototype.get=S3,Zr.prototype.has=A3,Zr.prototype.set=O3;function Qr(s){var l=-1,g=s==null?0:s.length;for(this.clear();++l<g;){var S=s[l];this.set(S[0],S[1])}}function C3(){this.size=0,this.__data__={hash:new Wn,map:new(Os||Zr),string:new Wn}}function R3(s){var l=Ma(this,s).delete(s);return this.size-=l?1:0,l}function I3(s){return Ma(this,s).get(s)}function P3(s){return Ma(this,s).has(s)}function N3(s,l){var g=Ma(this,s),S=g.size;return g.set(s,l),this.size+=g.size==S?0:1,this}Qr.prototype.clear=C3,Qr.prototype.delete=R3,Qr.prototype.get=I3,Qr.prototype.has=P3,Qr.prototype.set=N3;function Xn(s){var l=-1,g=s==null?0:s.length;for(this.__data__=new Qr;++l<g;)this.add(s[l])}function M3(s){return this.__data__.set(s,f),this}function k3(s){return this.__data__.has(s)}Xn.prototype.add=Xn.prototype.push=M3,Xn.prototype.has=k3;function Ir(s){var l=this.__data__=new Zr(s);this.size=l.size}function L3(){this.__data__=new Zr,this.size=0}function F3(s){var l=this.__data__,g=l.delete(s);return this.size=l.size,g}function B3(s){return this.__data__.get(s)}function D3(s){return this.__data__.has(s)}function U3(s,l){var g=this.__data__;if(g instanceof Zr){var S=g.__data__;if(!Os||S.length<i-1)return S.push([s,l]),this.size=++g.size,this;g=this.__data__=new Qr(S)}return g.set(s,l),this.size=g.size,this}Ir.prototype.clear=L3,Ir.prototype.delete=F3,Ir.prototype.get=B3,Ir.prototype.has=D3,Ir.prototype.set=U3;function wg(s,l){var g=Mt(s),S=!g&&Jn(s),N=!g&&!S&&Tn(s),D=!g&&!S&&!N&&Vi(s),H=g||S||N||D,K=H?hf(s.length,KM):[],tt=K.length;for(var ut in s)(l||ee.call(s,ut))&&!(H&&(ut=="length"||N&&(ut=="offset"||ut=="parent")||D&&(ut=="buffer"||ut=="byteLength"||ut=="byteOffset")||rn(ut,tt)))&&K.push(ut);return K}function Tg(s){var l=s.length;return l?s[Rf(0,l-1)]:r}function $3(s,l){return ka(Ve(s),Kn(l,0,s.length))}function G3(s){return ka(Ve(s))}function _f(s,l,g){(g!==r&&!Pr(s[l],g)||g===r&&!(l in s))&&Jr(s,l,g)}function Ps(s,l,g){var S=s[l];(!(ee.call(s,l)&&Pr(S,g))||g===r&&!(l in s))&&Jr(s,l,g)}function xa(s,l){for(var g=s.length;g--;)if(Pr(s[g][0],l))return g;return-1}function j3(s,l,g,S){return _n(s,function(N,D,H){l(S,N,g(N),H)}),S}function Eg(s,l){return s&&jr(l,Pe(l),s)}function q3(s,l){return s&&jr(l,Xe(l),s)}function Jr(s,l,g){l=="__proto__"&&va?va(s,l,{configurable:!0,enumerable:!0,value:g,writable:!0}):s[l]=g}function bf(s,l){for(var g=-1,S=l.length,N=st(S),D=s==null;++g<S;)N[g]=D?r:tc(s,l[g]);return N}function Kn(s,l,g){return s===s&&(g!==r&&(s=s<=g?s:g),l!==r&&(s=s>=l?s:l)),s}function pr(s,l,g,S,N,D){var H,K=l&p,tt=l&c,ut=l&v;if(g&&(H=N?g(s,S,N,D):g(s)),H!==r)return H;if(!me(s))return s;var ft=Mt(s);if(ft){if(H=Pk(s),!K)return Ve(s,H)}else{var ht=Ue(s),gt=ht==pt||ht==yt;if(Tn(s))return Xg(s,K);if(ht==Ht||ht==Y||gt&&!N){if(H=tt||gt?{}:dm(s),!K)return tt?bk(s,q3(H,s)):_k(s,Eg(H,s))}else{if(!ae[ht])return N?s:{};H=Nk(s,ht,K)}}D||(D=new Ir);var wt=D.get(s);if(wt)return wt;D.set(s,H),jm(s)?s.forEach(function(Ct){H.add(pr(Ct,l,g,Ct,s,D))}):$m(s)&&s.forEach(function(Ct,Ut){H.set(Ut,pr(Ct,l,g,Ut,s,D))});var Ot=ut?tt?$f:Uf:tt?Xe:Pe,Ft=ft?r:Ot(s);return cr(Ft||s,function(Ct,Ut){Ft&&(Ut=Ct,Ct=s[Ut]),Ps(H,Ut,pr(Ct,l,g,Ut,s,D))}),H}function z3(s){var l=Pe(s);return function(g){return Sg(g,s,l)}}function Sg(s,l,g){var S=g.length;if(s==null)return!S;for(s=ie(s);S--;){var N=g[S],D=l[N],H=s[N];if(H===r&&!(N in s)||!D(H))return!1}return!0}function Ag(s,l,g){if(typeof s!="function")throw new hr(a);return Ds(function(){s.apply(r,g)},l)}function Ns(s,l,g,S){var N=-1,D=ia,H=!0,K=s.length,tt=[],ut=l.length;if(!K)return tt;g&&(l=de(l,rr(g))),S?(D=of,H=!1):l.length>=i&&(D=Ss,H=!1,l=new Xn(l));t:for(;++N<K;){var ft=s[N],ht=g==null?ft:g(ft);if(ft=S||ft!==0?ft:0,H&&ht===ht){for(var gt=ut;gt--;)if(l[gt]===ht)continue t;tt.push(ft)}else D(l,ht,S)||tt.push(ft)}return tt}var _n=Jg(Gr),Og=Jg(wf,!0);function H3(s,l){var g=!0;return _n(s,function(S,N,D){return g=!!l(S,N,D),g}),g}function wa(s,l,g){for(var S=-1,N=s.length;++S<N;){var D=s[S],H=l(D);if(H!=null&&(K===r?H===H&&!ir(H):g(H,K)))var K=H,tt=D}return tt}function V3(s,l,g,S){var N=s.length;for(g=kt(g),g<0&&(g=-g>N?0:N+g),S=S===r||S>N?N:kt(S),S<0&&(S+=N),S=g>S?0:zm(S);g<S;)s[g++]=l;return s}function Cg(s,l){var g=[];return _n(s,function(S,N,D){l(S,N,D)&&g.push(S)}),g}function ke(s,l,g,S,N){var D=-1,H=s.length;for(g||(g=kk),N||(N=[]);++D<H;){var K=s[D];l>0&&g(K)?l>1?ke(K,l-1,g,S,N):gn(N,K):S||(N[N.length]=K)}return N}var xf=tm(),Rg=tm(!0);function Gr(s,l){return s&&xf(s,l,Pe)}function wf(s,l){return s&&Rg(s,l,Pe)}function Ta(s,l){return vn(l,function(g){return nn(s[g])})}function Yn(s,l){l=xn(l,s);for(var g=0,S=l.length;s!=null&&g<S;)s=s[qr(l[g++])];return g&&g==S?s:r}function Ig(s,l,g){var S=l(s);return Mt(s)?S:gn(S,g(s))}function je(s){return s==null?s===r?Lt:oe:Vn&&Vn in ie(s)?Ck(s):Gk(s)}function Tf(s,l){return s>l}function W3(s,l){return s!=null&&ee.call(s,l)}function X3(s,l){return s!=null&&l in ie(s)}function K3(s,l,g){return s>=De(l,g)&&s<Ae(l,g)}function Ef(s,l,g){for(var S=g?of:ia,N=s[0].length,D=s.length,H=D,K=st(D),tt=1/0,ut=[];H--;){var ft=s[H];H&&l&&(ft=de(ft,rr(l))),tt=De(ft.length,tt),K[H]=!g&&(l||N>=120&&ft.length>=120)?new Xn(H&&ft):r}ft=s[0];var ht=-1,gt=K[0];t:for(;++ht<N&&ut.length<tt;){var wt=ft[ht],Ot=l?l(wt):wt;if(wt=g||wt!==0?wt:0,!(gt?Ss(gt,Ot):S(ut,Ot,g))){for(H=D;--H;){var Ft=K[H];if(!(Ft?Ss(Ft,Ot):S(s[H],Ot,g)))continue t}gt&&gt.push(Ot),ut.push(wt)}}return ut}function Y3(s,l,g,S){return Gr(s,function(N,D,H){l(S,g(N),D,H)}),S}function Ms(s,l,g){l=xn(l,s),s=mm(s,l);var S=s==null?s:s[qr(gr(l))];return S==null?r:er(S,s,g)}function Pg(s){return ye(s)&&je(s)==Y}function Z3(s){return ye(s)&&je(s)==Ge}function Q3(s){return ye(s)&&je(s)==J}function ks(s,l,g,S,N){return s===l?!0:s==null||l==null||!ye(s)&&!ye(l)?s!==s&&l!==l:J3(s,l,g,S,ks,N)}function J3(s,l,g,S,N,D){var H=Mt(s),K=Mt(l),tt=H?$:Ue(s),ut=K?$:Ue(l);tt=tt==Y?Ht:tt,ut=ut==Y?Ht:ut;var ft=tt==Ht,ht=ut==Ht,gt=tt==ut;if(gt&&Tn(s)){if(!Tn(l))return!1;H=!0,ft=!1}if(gt&&!ft)return D||(D=new Ir),H||Vi(s)?fm(s,l,g,S,N,D):Ak(s,l,tt,g,S,N,D);if(!(g&y)){var wt=ft&&ee.call(s,"__wrapped__"),Ot=ht&&ee.call(l,"__wrapped__");if(wt||Ot){var Ft=wt?s.value():s,Ct=Ot?l.value():l;return D||(D=new Ir),N(Ft,Ct,g,S,D)}}return gt?(D||(D=new Ir),Ok(s,l,g,S,N,D)):!1}function tk(s){return ye(s)&&Ue(s)==xt}function Sf(s,l,g,S){var N=g.length,D=N,H=!S;if(s==null)return!D;for(s=ie(s);N--;){var K=g[N];if(H&&K[2]?K[1]!==s[K[0]]:!(K[0]in s))return!1}for(;++N<D;){K=g[N];var tt=K[0],ut=s[tt],ft=K[1];if(H&&K[2]){if(ut===r&&!(tt in s))return!1}else{var ht=new Ir;if(S)var gt=S(ut,ft,tt,s,l,ht);if(!(gt===r?ks(ft,ut,y|b,S,ht):gt))return!1}}return!0}function Ng(s){if(!me(s)||Fk(s))return!1;var l=nn(s)?t3:zN;return l.test(Qn(s))}function ek(s){return ye(s)&&je(s)==dt}function rk(s){return ye(s)&&Ue(s)==vt}function nk(s){return ye(s)&&$a(s.length)&&!!fe[je(s)]}function Mg(s){return typeof s=="function"?s:s==null?Ke:typeof s=="object"?Mt(s)?Fg(s[0],s[1]):Lg(s):ey(s)}function Af(s){if(!Bs(s))return o3(s);var l=[];for(var g in ie(s))ee.call(s,g)&&g!="constructor"&&l.push(g);return l}function ik(s){if(!me(s))return $k(s);var l=Bs(s),g=[];for(var S in s)S=="constructor"&&(l||!ee.call(s,S))||g.push(S);return g}function Of(s,l){return s<l}function kg(s,l){var g=-1,S=We(s)?st(s.length):[];return _n(s,function(N,D,H){S[++g]=l(N,D,H)}),S}function Lg(s){var l=jf(s);return l.length==1&&l[0][2]?vm(l[0][0],l[0][1]):function(g){return g===s||Sf(g,s,l)}}function Fg(s,l){return zf(s)&&pm(l)?vm(qr(s),l):function(g){var S=tc(g,s);return S===r&&S===l?ec(g,s):ks(l,S,y|b)}}function Ea(s,l,g,S,N){s!==l&&xf(l,function(D,H){if(N||(N=new Ir),me(D))sk(s,l,H,g,Ea,S,N);else{var K=S?S(Vf(s,H),D,H+"",s,l,N):r;K===r&&(K=D),_f(s,H,K)}},Xe)}function sk(s,l,g,S,N,D,H){var K=Vf(s,g),tt=Vf(l,g),ut=H.get(tt);if(ut){_f(s,g,ut);return}var ft=D?D(K,tt,g+"",s,l,H):r,ht=ft===r;if(ht){var gt=Mt(tt),wt=!gt&&Tn(tt),Ot=!gt&&!wt&&Vi(tt);ft=tt,gt||wt||Ot?Mt(K)?ft=K:xe(K)?ft=Ve(K):wt?(ht=!1,ft=Xg(tt,!0)):Ot?(ht=!1,ft=Kg(tt,!0)):ft=[]:Us(tt)||Jn(tt)?(ft=K,Jn(K)?ft=Hm(K):(!me(K)||nn(K))&&(ft=dm(tt))):ht=!1}ht&&(H.set(tt,ft),N(ft,tt,S,D,H),H.delete(tt)),_f(s,g,ft)}function Bg(s,l){var g=s.length;if(g)return l+=l<0?g:0,rn(l,g)?s[l]:r}function Dg(s,l,g){l.length?l=de(l,function(D){return Mt(D)?function(H){return Yn(H,D.length===1?D[0]:D)}:D}):l=[Ke];var S=-1;l=de(l,rr(St()));var N=kg(s,function(D,H,K){var tt=de(l,function(ut){return ut(D)});return{criteria:tt,index:++S,value:D}});return NM(N,function(D,H){return yk(D,H,g)})}function ok(s,l){return Ug(s,l,function(g,S){return ec(s,S)})}function Ug(s,l,g){for(var S=-1,N=l.length,D={};++S<N;){var H=l[S],K=Yn(s,H);g(K,H)&&Ls(D,xn(H,s),K)}return D}function ak(s){return function(l){return Yn(l,s)}}function Cf(s,l,g,S){var N=S?PM:Li,D=-1,H=l.length,K=s;for(s===l&&(l=Ve(l)),g&&(K=de(s,rr(g)));++D<H;)for(var tt=0,ut=l[D],ft=g?g(ut):ut;(tt=N(K,ft,tt,S))>-1;)K!==s&&pa.call(K,tt,1),pa.call(s,tt,1);return s}function $g(s,l){for(var g=s?l.length:0,S=g-1;g--;){var N=l[g];if(g==S||N!==D){var D=N;rn(N)?pa.call(s,N,1):Nf(s,N)}}return s}function Rf(s,l){return s+ma(bg()*(l-s+1))}function lk(s,l,g,S){for(var N=-1,D=Ae(ga((l-s)/(g||1)),0),H=st(D);D--;)H[S?D:++N]=s,s+=g;return H}function If(s,l){var g="";if(!s||l<1||l>nt)return g;do l%2&&(g+=s),l=ma(l/2),l&&(s+=s);while(l);return g}function Bt(s,l){return Wf(gm(s,l,Ke),s+"")}function uk(s){return Tg(Wi(s))}function fk(s,l){var g=Wi(s);return ka(g,Kn(l,0,g.length))}function Ls(s,l,g,S){if(!me(s))return s;l=xn(l,s);for(var N=-1,D=l.length,H=D-1,K=s;K!=null&&++N<D;){var tt=qr(l[N]),ut=g;if(tt==="__proto__"||tt==="constructor"||tt==="prototype")return s;if(N!=H){var ft=K[tt];ut=S?S(ft,tt,K):r,ut===r&&(ut=me(ft)?ft:rn(l[N+1])?[]:{})}Ps(K,tt,ut),K=K[tt]}return s}var Gg=ya?function(s,l){return ya.set(s,l),s}:Ke,ck=va?function(s,l){return va(s,"toString",{configurable:!0,enumerable:!1,value:nc(l),writable:!0})}:Ke;function hk(s){return ka(Wi(s))}function vr(s,l,g){var S=-1,N=s.length;l<0&&(l=-l>N?0:N+l),g=g>N?N:g,g<0&&(g+=N),N=l>g?0:g-l>>>0,l>>>=0;for(var D=st(N);++S<N;)D[S]=s[S+l];return D}function dk(s,l){var g;return _n(s,function(S,N,D){return g=l(S,N,D),!g}),!!g}function Sa(s,l,g){var S=0,N=s==null?S:s.length;if(typeof l=="number"&&l===l&&N<=G){for(;S<N;){var D=S+N>>>1,H=s[D];H!==null&&!ir(H)&&(g?H<=l:H<l)?S=D+1:N=D}return N}return Pf(s,l,Ke,g)}function Pf(s,l,g,S){var N=0,D=s==null?0:s.length;if(D===0)return 0;l=g(l);for(var H=l!==l,K=l===null,tt=ir(l),ut=l===r;N<D;){var ft=ma((N+D)/2),ht=g(s[ft]),gt=ht!==r,wt=ht===null,Ot=ht===ht,Ft=ir(ht);if(H)var Ct=S||Ot;else ut?Ct=Ot&&(S||gt):K?Ct=Ot&&gt&&(S||!wt):tt?Ct=Ot&&gt&&!wt&&(S||!Ft):wt||Ft?Ct=!1:Ct=S?ht<=l:ht<l;Ct?N=ft+1:D=ft}return De(D,j)}function jg(s,l){for(var g=-1,S=s.length,N=0,D=[];++g<S;){var H=s[g],K=l?l(H):H;if(!g||!Pr(K,tt)){var tt=K;D[N++]=H===0?0:H}}return D}function qg(s){return typeof s=="number"?s:ir(s)?U:+s}function nr(s){if(typeof s=="string")return s;if(Mt(s))return de(s,nr)+"";if(ir(s))return xg?xg.call(s):"";var l=s+"";return l=="0"&&1/s==-z?"-0":l}function bn(s,l,g){var S=-1,N=ia,D=s.length,H=!0,K=[],tt=K;if(g)H=!1,N=of;else if(D>=i){var ut=l?null:Ek(s);if(ut)return oa(ut);H=!1,N=Ss,tt=new Xn}else tt=l?[]:K;t:for(;++S<D;){var ft=s[S],ht=l?l(ft):ft;if(ft=g||ft!==0?ft:0,H&&ht===ht){for(var gt=tt.length;gt--;)if(tt[gt]===ht)continue t;l&&tt.push(ht),K.push(ft)}else N(tt,ht,g)||(tt!==K&&tt.push(ht),K.push(ft))}return K}function Nf(s,l){return l=xn(l,s),s=mm(s,l),s==null||delete s[qr(gr(l))]}function zg(s,l,g,S){return Ls(s,l,g(Yn(s,l)),S)}function Aa(s,l,g,S){for(var N=s.length,D=S?N:-1;(S?D--:++D<N)&&l(s[D],D,s););return g?vr(s,S?0:D,S?D+1:N):vr(s,S?D+1:0,S?N:D)}function Hg(s,l){var g=s;return g instanceof Gt&&(g=g.value()),af(l,function(S,N){return N.func.apply(N.thisArg,gn([S],N.args))},g)}function Mf(s,l,g){var S=s.length;if(S<2)return S?bn(s[0]):[];for(var N=-1,D=st(S);++N<S;)for(var H=s[N],K=-1;++K<S;)K!=N&&(D[N]=Ns(D[N]||H,s[K],l,g));return bn(ke(D,1),l,g)}function Vg(s,l,g){for(var S=-1,N=s.length,D=l.length,H={};++S<N;){var K=S<D?l[S]:r;g(H,s[S],K)}return H}function kf(s){return xe(s)?s:[]}function Lf(s){return typeof s=="function"?s:Ke}function xn(s,l){return Mt(s)?s:zf(s,l)?[s]:xm(Jt(s))}var pk=Bt;function wn(s,l,g){var S=s.length;return g=g===r?S:g,!l&&g>=S?s:vr(s,l,g)}var Wg=e3||function(s){return Me.clearTimeout(s)};function Xg(s,l){if(l)return s.slice();var g=s.length,S=vg?vg(g):new s.constructor(g);return s.copy(S),S}function Ff(s){var l=new s.constructor(s.byteLength);return new ha(l).set(new ha(s)),l}function vk(s,l){var g=l?Ff(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.byteLength)}function gk(s){var l=new s.constructor(s.source,Pv.exec(s));return l.lastIndex=s.lastIndex,l}function mk(s){return Is?ie(Is.call(s)):{}}function Kg(s,l){var g=l?Ff(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.length)}function Yg(s,l){if(s!==l){var g=s!==r,S=s===null,N=s===s,D=ir(s),H=l!==r,K=l===null,tt=l===l,ut=ir(l);if(!K&&!ut&&!D&&s>l||D&&H&&tt&&!K&&!ut||S&&H&&tt||!g&&tt||!N)return 1;if(!S&&!D&&!ut&&s<l||ut&&g&&N&&!S&&!D||K&&g&&N||!H&&N||!tt)return-1}return 0}function yk(s,l,g){for(var S=-1,N=s.criteria,D=l.criteria,H=N.length,K=g.length;++S<H;){var tt=Yg(N[S],D[S]);if(tt){if(S>=K)return tt;var ut=g[S];return tt*(ut=="desc"?-1:1)}}return s.index-l.index}function Zg(s,l,g,S){for(var N=-1,D=s.length,H=g.length,K=-1,tt=l.length,ut=Ae(D-H,0),ft=st(tt+ut),ht=!S;++K<tt;)ft[K]=l[K];for(;++N<H;)(ht||N<D)&&(ft[g[N]]=s[N]);for(;ut--;)ft[K++]=s[N++];return ft}function Qg(s,l,g,S){for(var N=-1,D=s.length,H=-1,K=g.length,tt=-1,ut=l.length,ft=Ae(D-K,0),ht=st(ft+ut),gt=!S;++N<ft;)ht[N]=s[N];for(var wt=N;++tt<ut;)ht[wt+tt]=l[tt];for(;++H<K;)(gt||N<D)&&(ht[wt+g[H]]=s[N++]);return ht}function Ve(s,l){var g=-1,S=s.length;for(l||(l=st(S));++g<S;)l[g]=s[g];return l}function jr(s,l,g,S){var N=!g;g||(g={});for(var D=-1,H=l.length;++D<H;){var K=l[D],tt=S?S(g[K],s[K],K,g,s):r;tt===r&&(tt=s[K]),N?Jr(g,K,tt):Ps(g,K,tt)}return g}function _k(s,l){return jr(s,qf(s),l)}function bk(s,l){return jr(s,cm(s),l)}function Oa(s,l){return function(g,S){var N=Mt(g)?SM:j3,D=l?l():{};return N(g,s,St(S,2),D)}}function qi(s){return Bt(function(l,g){var S=-1,N=g.length,D=N>1?g[N-1]:r,H=N>2?g[2]:r;for(D=s.length>3&&typeof D=="function"?(N--,D):r,H&&qe(g[0],g[1],H)&&(D=N<3?r:D,N=1),l=ie(l);++S<N;){var K=g[S];K&&s(l,K,S,D)}return l})}function Jg(s,l){return function(g,S){if(g==null)return g;if(!We(g))return s(g,S);for(var N=g.length,D=l?N:-1,H=ie(g);(l?D--:++D<N)&&S(H[D],D,H)!==!1;);return g}}function tm(s){return function(l,g,S){for(var N=-1,D=ie(l),H=S(l),K=H.length;K--;){var tt=H[s?K:++N];if(g(D[tt],tt,D)===!1)break}return l}}function xk(s,l,g){var S=l&_,N=Fs(s);function D(){var H=this&&this!==Me&&this instanceof D?N:s;return H.apply(S?g:this,arguments)}return D}function em(s){return function(l){l=Jt(l);var g=Fi(l)?Rr(l):r,S=g?g[0]:l.charAt(0),N=g?wn(g,1).join(""):l.slice(1);return S[s]()+N}}function zi(s){return function(l){return af(Jm(Qm(l).replace(cM,"")),s,"")}}function Fs(s){return function(){var l=arguments;switch(l.length){case 0:return new s;case 1:return new s(l[0]);case 2:return new s(l[0],l[1]);case 3:return new s(l[0],l[1],l[2]);case 4:return new s(l[0],l[1],l[2],l[3]);case 5:return new s(l[0],l[1],l[2],l[3],l[4]);case 6:return new s(l[0],l[1],l[2],l[3],l[4],l[5]);case 7:return new s(l[0],l[1],l[2],l[3],l[4],l[5],l[6])}var g=ji(s.prototype),S=s.apply(g,l);return me(S)?S:g}}function wk(s,l,g){var S=Fs(s);function N(){for(var D=arguments.length,H=st(D),K=D,tt=Hi(N);K--;)H[K]=arguments[K];var ut=D<3&&H[0]!==tt&&H[D-1]!==tt?[]:mn(H,tt);if(D-=ut.length,D<g)return om(s,l,Ca,N.placeholder,r,H,ut,r,r,g-D);var ft=this&&this!==Me&&this instanceof N?S:s;return er(ft,this,H)}return N}function rm(s){return function(l,g,S){var N=ie(l);if(!We(l)){var D=St(g,3);l=Pe(l),g=function(K){return D(N[K],K,N)}}var H=s(l,g,S);return H>-1?N[D?l[H]:H]:r}}function nm(s){return en(function(l){var g=l.length,S=g,N=dr.prototype.thru;for(s&&l.reverse();S--;){var D=l[S];if(typeof D!="function")throw new hr(a);if(N&&!H&&Na(D)=="wrapper")var H=new dr([],!0)}for(S=H?S:g;++S<g;){D=l[S];var K=Na(D),tt=K=="wrapper"?Gf(D):r;tt&&Hf(tt[0])&&tt[1]==(A|T|E|O)&&!tt[4].length&&tt[9]==1?H=H[Na(tt[0])].apply(H,tt[3]):H=D.length==1&&Hf(D)?H[K]():H.thru(D)}return function(){var ut=arguments,ft=ut[0];if(H&&ut.length==1&&Mt(ft))return H.plant(ft).value();for(var ht=0,gt=g?l[ht].apply(this,ut):ft;++ht<g;)gt=l[ht].call(this,gt);return gt}})}function Ca(s,l,g,S,N,D,H,K,tt,ut){var ft=l&A,ht=l&_,gt=l&m,wt=l&(T|x),Ot=l&L,Ft=gt?r:Fs(s);function Ct(){for(var Ut=arguments.length,qt=st(Ut),sr=Ut;sr--;)qt[sr]=arguments[sr];if(wt)var ze=Hi(Ct),or=kM(qt,ze);if(S&&(qt=Zg(qt,S,N,wt)),D&&(qt=Qg(qt,D,H,wt)),Ut-=or,wt&&Ut<ut){var we=mn(qt,ze);return om(s,l,Ca,Ct.placeholder,g,qt,we,K,tt,ut-Ut)}var Nr=ht?g:this,on=gt?Nr[s]:s;return Ut=qt.length,K?qt=jk(qt,K):Ot&&Ut>1&&qt.reverse(),ft&&tt<Ut&&(qt.length=tt),this&&this!==Me&&this instanceof Ct&&(on=Ft||Fs(on)),on.apply(Nr,qt)}return Ct}function im(s,l){return function(g,S){return Y3(g,s,l(S),{})}}function Ra(s,l){return function(g,S){var N;if(g===r&&S===r)return l;if(g!==r&&(N=g),S!==r){if(N===r)return S;typeof g=="string"||typeof S=="string"?(g=nr(g),S=nr(S)):(g=qg(g),S=qg(S)),N=s(g,S)}return N}}function Bf(s){return en(function(l){return l=de(l,rr(St())),Bt(function(g){var S=this;return s(l,function(N){return er(N,S,g)})})})}function Ia(s,l){l=l===r?" ":nr(l);var g=l.length;if(g<2)return g?If(l,s):l;var S=If(l,ga(s/Bi(l)));return Fi(l)?wn(Rr(S),0,s).join(""):S.slice(0,s)}function Tk(s,l,g,S){var N=l&_,D=Fs(s);function H(){for(var K=-1,tt=arguments.length,ut=-1,ft=S.length,ht=st(ft+tt),gt=this&&this!==Me&&this instanceof H?D:s;++ut<ft;)ht[ut]=S[ut];for(;tt--;)ht[ut++]=arguments[++K];return er(gt,N?g:this,ht)}return H}function sm(s){return function(l,g,S){return S&&typeof S!="number"&&qe(l,g,S)&&(g=S=r),l=sn(l),g===r?(g=l,l=0):g=sn(g),S=S===r?l<g?1:-1:sn(S),lk(l,g,S,s)}}function Pa(s){return function(l,g){return typeof l=="string"&&typeof g=="string"||(l=mr(l),g=mr(g)),s(l,g)}}function om(s,l,g,S,N,D,H,K,tt,ut){var ft=l&T,ht=ft?H:r,gt=ft?r:H,wt=ft?D:r,Ot=ft?r:D;l|=ft?E:I,l&=~(ft?I:E),l&w||(l&=~(_|m));var Ft=[s,l,N,wt,ht,Ot,gt,K,tt,ut],Ct=g.apply(r,Ft);return Hf(s)&&ym(Ct,Ft),Ct.placeholder=S,_m(Ct,s,l)}function Df(s){var l=Se[s];return function(g,S){if(g=mr(g),S=S==null?0:De(kt(S),292),S&&_g(g)){var N=(Jt(g)+"e").split("e"),D=l(N[0]+"e"+(+N[1]+S));return N=(Jt(D)+"e").split("e"),+(N[0]+"e"+(+N[1]-S))}return l(g)}}var Ek=$i&&1/oa(new $i([,-0]))[1]==z?function(s){return new $i(s)}:oc;function am(s){return function(l){var g=Ue(l);return g==xt?pf(l):g==vt?GM(l):MM(l,s(l))}}function tn(s,l,g,S,N,D,H,K){var tt=l&m;if(!tt&&typeof s!="function")throw new hr(a);var ut=S?S.length:0;if(ut||(l&=~(E|I),S=N=r),H=H===r?H:Ae(kt(H),0),K=K===r?K:kt(K),ut-=N?N.length:0,l&I){var ft=S,ht=N;S=N=r}var gt=tt?r:Gf(s),wt=[s,l,g,S,N,ft,ht,D,H,K];if(gt&&Uk(wt,gt),s=wt[0],l=wt[1],g=wt[2],S=wt[3],N=wt[4],K=wt[9]=wt[9]===r?tt?0:s.length:Ae(wt[9]-ut,0),!K&&l&(T|x)&&(l&=~(T|x)),!l||l==_)var Ot=xk(s,l,g);else l==T||l==x?Ot=wk(s,l,K):(l==E||l==(_|E))&&!N.length?Ot=Tk(s,l,g,S):Ot=Ca.apply(r,wt);var Ft=gt?Gg:ym;return _m(Ft(Ot,wt),s,l)}function lm(s,l,g,S){return s===r||Pr(s,Ui[g])&&!ee.call(S,g)?l:s}function um(s,l,g,S,N,D){return me(s)&&me(l)&&(D.set(l,s),Ea(s,l,r,um,D),D.delete(l)),s}function Sk(s){return Us(s)?r:s}function fm(s,l,g,S,N,D){var H=g&y,K=s.length,tt=l.length;if(K!=tt&&!(H&&tt>K))return!1;var ut=D.get(s),ft=D.get(l);if(ut&&ft)return ut==l&&ft==s;var ht=-1,gt=!0,wt=g&b?new Xn:r;for(D.set(s,l),D.set(l,s);++ht<K;){var Ot=s[ht],Ft=l[ht];if(S)var Ct=H?S(Ft,Ot,ht,l,s,D):S(Ot,Ft,ht,s,l,D);if(Ct!==r){if(Ct)continue;gt=!1;break}if(wt){if(!lf(l,function(Ut,qt){if(!Ss(wt,qt)&&(Ot===Ut||N(Ot,Ut,g,S,D)))return wt.push(qt)})){gt=!1;break}}else if(!(Ot===Ft||N(Ot,Ft,g,S,D))){gt=!1;break}}return D.delete(s),D.delete(l),gt}function Ak(s,l,g,S,N,D,H){switch(g){case Qt:if(s.byteLength!=l.byteLength||s.byteOffset!=l.byteOffset)return!1;s=s.buffer,l=l.buffer;case Ge:return!(s.byteLength!=l.byteLength||!D(new ha(s),new ha(l)));case et:case J:case At:return Pr(+s,+l);case lt:return s.name==l.name&&s.message==l.message;case dt:case ct:return s==l+"";case xt:var K=pf;case vt:var tt=S&y;if(K||(K=oa),s.size!=l.size&&!tt)return!1;var ut=H.get(s);if(ut)return ut==l;S|=b,H.set(s,l);var ft=fm(K(s),K(l),S,N,D,H);return H.delete(s),ft;case Pt:if(Is)return Is.call(s)==Is.call(l)}return!1}function Ok(s,l,g,S,N,D){var H=g&y,K=Uf(s),tt=K.length,ut=Uf(l),ft=ut.length;if(tt!=ft&&!H)return!1;for(var ht=tt;ht--;){var gt=K[ht];if(!(H?gt in l:ee.call(l,gt)))return!1}var wt=D.get(s),Ot=D.get(l);if(wt&&Ot)return wt==l&&Ot==s;var Ft=!0;D.set(s,l),D.set(l,s);for(var Ct=H;++ht<tt;){gt=K[ht];var Ut=s[gt],qt=l[gt];if(S)var sr=H?S(qt,Ut,gt,l,s,D):S(Ut,qt,gt,s,l,D);if(!(sr===r?Ut===qt||N(Ut,qt,g,S,D):sr)){Ft=!1;break}Ct||(Ct=gt=="constructor")}if(Ft&&!Ct){var ze=s.constructor,or=l.constructor;ze!=or&&"constructor"in s&&"constructor"in l&&!(typeof ze=="function"&&ze instanceof ze&&typeof or=="function"&&or instanceof or)&&(Ft=!1)}return D.delete(s),D.delete(l),Ft}function en(s){return Wf(gm(s,r,Sm),s+"")}function Uf(s){return Ig(s,Pe,qf)}function $f(s){return Ig(s,Xe,cm)}var Gf=ya?function(s){return ya.get(s)}:oc;function Na(s){for(var l=s.name+"",g=Gi[l],S=ee.call(Gi,l)?g.length:0;S--;){var N=g[S],D=N.func;if(D==null||D==s)return N.name}return l}function Hi(s){var l=ee.call(B,"placeholder")?B:s;return l.placeholder}function St(){var s=B.iteratee||ic;return s=s===ic?Mg:s,arguments.length?s(arguments[0],arguments[1]):s}function Ma(s,l){var g=s.__data__;return Lk(l)?g[typeof l=="string"?"string":"hash"]:g.map}function jf(s){for(var l=Pe(s),g=l.length;g--;){var S=l[g],N=s[S];l[g]=[S,N,pm(N)]}return l}function Zn(s,l){var g=DM(s,l);return Ng(g)?g:r}function Ck(s){var l=ee.call(s,Vn),g=s[Vn];try{s[Vn]=r;var S=!0}catch{}var N=fa.call(s);return S&&(l?s[Vn]=g:delete s[Vn]),N}var qf=gf?function(s){return s==null?[]:(s=ie(s),vn(gf(s),function(l){return mg.call(s,l)}))}:ac,cm=gf?function(s){for(var l=[];s;)gn(l,qf(s)),s=da(s);return l}:ac,Ue=je;(mf&&Ue(new mf(new ArrayBuffer(1)))!=Qt||Os&&Ue(new Os)!=xt||yf&&Ue(yf.resolve())!=rt||$i&&Ue(new $i)!=vt||Cs&&Ue(new Cs)!=Nt)&&(Ue=function(s){var l=je(s),g=l==Ht?s.constructor:r,S=g?Qn(g):"";if(S)switch(S){case f3:return Qt;case c3:return xt;case h3:return rt;case d3:return vt;case p3:return Nt}return l});function Rk(s,l,g){for(var S=-1,N=g.length;++S<N;){var D=g[S],H=D.size;switch(D.type){case"drop":s+=H;break;case"dropRight":l-=H;break;case"take":l=De(l,s+H);break;case"takeRight":s=Ae(s,l-H);break}}return{start:s,end:l}}function Ik(s){var l=s.match(FN);return l?l[1].split(BN):[]}function hm(s,l,g){l=xn(l,s);for(var S=-1,N=l.length,D=!1;++S<N;){var H=qr(l[S]);if(!(D=s!=null&&g(s,H)))break;s=s[H]}return D||++S!=N?D:(N=s==null?0:s.length,!!N&&$a(N)&&rn(H,N)&&(Mt(s)||Jn(s)))}function Pk(s){var l=s.length,g=new s.constructor(l);return l&&typeof s[0]=="string"&&ee.call(s,"index")&&(g.index=s.index,g.input=s.input),g}function dm(s){return typeof s.constructor=="function"&&!Bs(s)?ji(da(s)):{}}function Nk(s,l,g){var S=s.constructor;switch(l){case Ge:return Ff(s);case et:case J:return new S(+s);case Qt:return vk(s,g);case Es:case he:case ur:case zu:case Hu:case Vu:case Wu:case Xu:case Ku:return Kg(s,g);case xt:return new S;case At:case ct:return new S(s);case dt:return gk(s);case vt:return new S;case Pt:return mk(s)}}function Mk(s,l){var g=l.length;if(!g)return s;var S=g-1;return l[S]=(g>1?"& ":"")+l[S],l=l.join(g>2?", ":" "),s.replace(LN,`{
1941
+ */ea.exports,function(e,t){(function(){var r,n="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",u="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",h=500,d="__lodash_placeholder__",p=1,c=2,v=4,y=1,_=2,b=1,m=2,w=4,T=8,x=16,E=32,I=64,O=128,A=256,L=512,R=30,C="...",P=800,M=16,F=1,q=2,Z=3,z=1/0,nt=9007199254740991,V=17976931348623157e292,D=0/0,k=4294967295,G=k-1,j=k>>>1,Q=[["ary",O],["bind",b],["bindKey",m],["curry",T],["curryRight",x],["flip",L],["partial",E],["partialRight",I],["rearg",A]],K="[object Arguments]",$="[object Array]",W="[object AsyncFunction]",et="[object Boolean]",Y="[object Date]",rt="[object DOMException]",ot="[object Error]",pt="[object Function]",vt="[object GeneratorFunction]",_t="[object Map]",At="[object Number]",ne="[object Null]",Ut="[object Object]",it="[object Promise]",ut="[object Proxy]",dt="[object RegExp]",gt="[object Set]",at="[object String]",It="[object Symbol]",St="[object Undefined]",Mt="[object WeakMap]",He="[object WeakSet]",Ge="[object ArrayBuffer]",Qt="[object DataView]",Ss="[object Float32Array]",he="[object Float64Array]",ur="[object Int8Array]",zu="[object Int16Array]",Hu="[object Int32Array]",Vu="[object Uint8Array]",Wu="[object Uint8ClampedArray]",Xu="[object Uint16Array]",Ku="[object Uint32Array]",EN=/\b__p \+= '';/g,SN=/\b(__p \+=) '' \+/g,AN=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Cv=/&(?:amp|lt|gt|quot|#39);/g,Rv=/[&<>"']/g,ON=RegExp(Cv.source),CN=RegExp(Rv.source),RN=/<%-([\s\S]+?)%>/g,IN=/<%([\s\S]+?)%>/g,Iv=/<%=([\s\S]+?)%>/g,PN=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,NN=/^\w*$/,MN=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yu=/[\\^$.*+?()[\]{}|]/g,kN=RegExp(Yu.source),Zu=/^\s+/,LN=/\s/,FN=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,BN=/\{\n\/\* \[wrapped with (.+)\] \*/,DN=/,? & /,UN=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,$N=/[()=,{}\[\]\/\s]/,GN=/\\(\\)?/g,jN=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Pv=/\w*$/,qN=/^[-+]0x[0-9a-f]+$/i,zN=/^0b[01]+$/i,HN=/^\[object .+?Constructor\]$/,VN=/^0o[0-7]+$/i,WN=/^(?:0|[1-9]\d*)$/,XN=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ra=/($^)/,KN=/['\n\r\u2028\u2029\\]/g,na="\\ud800-\\udfff",YN="\\u0300-\\u036f",ZN="\\ufe20-\\ufe2f",QN="\\u20d0-\\u20ff",Nv=YN+ZN+QN,Mv="\\u2700-\\u27bf",kv="a-z\\xdf-\\xf6\\xf8-\\xff",JN="\\xac\\xb1\\xd7\\xf7",tM="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",eM="\\u2000-\\u206f",rM=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Lv="A-Z\\xc0-\\xd6\\xd8-\\xde",Fv="\\ufe0e\\ufe0f",Bv=JN+tM+eM+rM,Qu="['’]",nM="["+na+"]",Dv="["+Bv+"]",ia="["+Nv+"]",Uv="\\d+",iM="["+Mv+"]",$v="["+kv+"]",Gv="[^"+na+Bv+Uv+Mv+kv+Lv+"]",Ju="\\ud83c[\\udffb-\\udfff]",sM="(?:"+ia+"|"+Ju+")",jv="[^"+na+"]",tf="(?:\\ud83c[\\udde6-\\uddff]){2}",ef="[\\ud800-\\udbff][\\udc00-\\udfff]",Li="["+Lv+"]",qv="\\u200d",zv="(?:"+$v+"|"+Gv+")",oM="(?:"+Li+"|"+Gv+")",Hv="(?:"+Qu+"(?:d|ll|m|re|s|t|ve))?",Vv="(?:"+Qu+"(?:D|LL|M|RE|S|T|VE))?",Wv=sM+"?",Xv="["+Fv+"]?",aM="(?:"+qv+"(?:"+[jv,tf,ef].join("|")+")"+Xv+Wv+")*",lM="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",uM="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Kv=Xv+Wv+aM,fM="(?:"+[iM,tf,ef].join("|")+")"+Kv,cM="(?:"+[jv+ia+"?",ia,tf,ef,nM].join("|")+")",hM=RegExp(Qu,"g"),dM=RegExp(ia,"g"),rf=RegExp(Ju+"(?="+Ju+")|"+cM+Kv,"g"),pM=RegExp([Li+"?"+$v+"+"+Hv+"(?="+[Dv,Li,"$"].join("|")+")",oM+"+"+Vv+"(?="+[Dv,Li+zv,"$"].join("|")+")",Li+"?"+zv+"+"+Hv,Li+"+"+Vv,uM,lM,Uv,fM].join("|"),"g"),vM=RegExp("["+qv+na+Nv+Fv+"]"),gM=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,mM=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],yM=-1,fe={};fe[Ss]=fe[he]=fe[ur]=fe[zu]=fe[Hu]=fe[Vu]=fe[Wu]=fe[Xu]=fe[Ku]=!0,fe[K]=fe[$]=fe[Ge]=fe[et]=fe[Qt]=fe[Y]=fe[ot]=fe[pt]=fe[_t]=fe[At]=fe[Ut]=fe[dt]=fe[gt]=fe[at]=fe[Mt]=!1;var ae={};ae[K]=ae[$]=ae[Ge]=ae[Qt]=ae[et]=ae[Y]=ae[Ss]=ae[he]=ae[ur]=ae[zu]=ae[Hu]=ae[_t]=ae[At]=ae[Ut]=ae[dt]=ae[gt]=ae[at]=ae[It]=ae[Vu]=ae[Wu]=ae[Xu]=ae[Ku]=!0,ae[ot]=ae[pt]=ae[Mt]=!1;var _M={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},bM={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},xM={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},wM={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},TM=parseFloat,EM=parseInt,Yv=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,SM=typeof self=="object"&&self&&self.Object===Object&&self,Me=Yv||SM||Function("return this")(),nf=t&&!t.nodeType&&t,Hn=nf&&!0&&e&&!e.nodeType&&e,Zv=Hn&&Hn.exports===nf,sf=Zv&&Yv.process,fr=function(){try{var J=Hn&&Hn.require&&Hn.require("util").types;return J||sf&&sf.binding&&sf.binding("util")}catch{}}(),Qv=fr&&fr.isArrayBuffer,Jv=fr&&fr.isDate,tg=fr&&fr.isMap,eg=fr&&fr.isRegExp,rg=fr&&fr.isSet,ng=fr&&fr.isTypedArray;function er(J,lt,st){switch(st.length){case 0:return J.call(lt);case 1:return J.call(lt,st[0]);case 2:return J.call(lt,st[0],st[1]);case 3:return J.call(lt,st[0],st[1],st[2])}return J.apply(lt,st)}function AM(J,lt,st,xt){for(var Nt=-1,Yt=J==null?0:J.length;++Nt<Yt;){var Se=J[Nt];lt(xt,Se,st(Se),J)}return xt}function cr(J,lt){for(var st=-1,xt=J==null?0:J.length;++st<xt&&lt(J[st],st,J)!==!1;);return J}function OM(J,lt){for(var st=J==null?0:J.length;st--&&lt(J[st],st,J)!==!1;);return J}function ig(J,lt){for(var st=-1,xt=J==null?0:J.length;++st<xt;)if(!lt(J[st],st,J))return!1;return!0}function vn(J,lt){for(var st=-1,xt=J==null?0:J.length,Nt=0,Yt=[];++st<xt;){var Se=J[st];lt(Se,st,J)&&(Yt[Nt++]=Se)}return Yt}function sa(J,lt){var st=J==null?0:J.length;return!!st&&Fi(J,lt,0)>-1}function of(J,lt,st){for(var xt=-1,Nt=J==null?0:J.length;++xt<Nt;)if(st(lt,J[xt]))return!0;return!1}function de(J,lt){for(var st=-1,xt=J==null?0:J.length,Nt=Array(xt);++st<xt;)Nt[st]=lt(J[st],st,J);return Nt}function gn(J,lt){for(var st=-1,xt=lt.length,Nt=J.length;++st<xt;)J[Nt+st]=lt[st];return J}function af(J,lt,st,xt){var Nt=-1,Yt=J==null?0:J.length;for(xt&&Yt&&(st=J[++Nt]);++Nt<Yt;)st=lt(st,J[Nt],Nt,J);return st}function CM(J,lt,st,xt){var Nt=J==null?0:J.length;for(xt&&Nt&&(st=J[--Nt]);Nt--;)st=lt(st,J[Nt],Nt,J);return st}function lf(J,lt){for(var st=-1,xt=J==null?0:J.length;++st<xt;)if(lt(J[st],st,J))return!0;return!1}var RM=uf("length");function IM(J){return J.split("")}function PM(J){return J.match(UN)||[]}function sg(J,lt,st){var xt;return st(J,function(Nt,Yt,Se){if(lt(Nt,Yt,Se))return xt=Yt,!1}),xt}function oa(J,lt,st,xt){for(var Nt=J.length,Yt=st+(xt?1:-1);xt?Yt--:++Yt<Nt;)if(lt(J[Yt],Yt,J))return Yt;return-1}function Fi(J,lt,st){return lt===lt?qM(J,lt,st):oa(J,og,st)}function NM(J,lt,st,xt){for(var Nt=st-1,Yt=J.length;++Nt<Yt;)if(xt(J[Nt],lt))return Nt;return-1}function og(J){return J!==J}function ag(J,lt){var st=J==null?0:J.length;return st?cf(J,lt)/st:D}function uf(J){return function(lt){return lt==null?r:lt[J]}}function ff(J){return function(lt){return J==null?r:J[lt]}}function lg(J,lt,st,xt,Nt){return Nt(J,function(Yt,Se,se){st=xt?(xt=!1,Yt):lt(st,Yt,Se,se)}),st}function MM(J,lt){var st=J.length;for(J.sort(lt);st--;)J[st]=J[st].value;return J}function cf(J,lt){for(var st,xt=-1,Nt=J.length;++xt<Nt;){var Yt=lt(J[xt]);Yt!==r&&(st=st===r?Yt:st+Yt)}return st}function hf(J,lt){for(var st=-1,xt=Array(J);++st<J;)xt[st]=lt(st);return xt}function kM(J,lt){return de(lt,function(st){return[st,J[st]]})}function ug(J){return J&&J.slice(0,dg(J)+1).replace(Zu,"")}function rr(J){return function(lt){return J(lt)}}function df(J,lt){return de(lt,function(st){return J[st]})}function As(J,lt){return J.has(lt)}function fg(J,lt){for(var st=-1,xt=J.length;++st<xt&&Fi(lt,J[st],0)>-1;);return st}function cg(J,lt){for(var st=J.length;st--&&Fi(lt,J[st],0)>-1;);return st}function LM(J,lt){for(var st=J.length,xt=0;st--;)J[st]===lt&&++xt;return xt}var FM=ff(_M),BM=ff(bM);function DM(J){return"\\"+wM[J]}function UM(J,lt){return J==null?r:J[lt]}function Bi(J){return vM.test(J)}function $M(J){return gM.test(J)}function GM(J){for(var lt,st=[];!(lt=J.next()).done;)st.push(lt.value);return st}function pf(J){var lt=-1,st=Array(J.size);return J.forEach(function(xt,Nt){st[++lt]=[Nt,xt]}),st}function hg(J,lt){return function(st){return J(lt(st))}}function mn(J,lt){for(var st=-1,xt=J.length,Nt=0,Yt=[];++st<xt;){var Se=J[st];(Se===lt||Se===d)&&(J[st]=d,Yt[Nt++]=st)}return Yt}function aa(J){var lt=-1,st=Array(J.size);return J.forEach(function(xt){st[++lt]=xt}),st}function jM(J){var lt=-1,st=Array(J.size);return J.forEach(function(xt){st[++lt]=[xt,xt]}),st}function qM(J,lt,st){for(var xt=st-1,Nt=J.length;++xt<Nt;)if(J[xt]===lt)return xt;return-1}function zM(J,lt,st){for(var xt=st+1;xt--;)if(J[xt]===lt)return xt;return xt}function Di(J){return Bi(J)?VM(J):RM(J)}function Rr(J){return Bi(J)?WM(J):IM(J)}function dg(J){for(var lt=J.length;lt--&&LN.test(J.charAt(lt)););return lt}var HM=ff(xM);function VM(J){for(var lt=rf.lastIndex=0;rf.test(J);)++lt;return lt}function WM(J){return J.match(rf)||[]}function XM(J){return J.match(pM)||[]}var KM=function J(lt){lt=lt==null?Me:Ui.defaults(Me.Object(),lt,Ui.pick(Me,mM));var st=lt.Array,xt=lt.Date,Nt=lt.Error,Yt=lt.Function,Se=lt.Math,se=lt.Object,vf=lt.RegExp,YM=lt.String,hr=lt.TypeError,la=st.prototype,ZM=Yt.prototype,$i=se.prototype,ua=lt["__core-js_shared__"],fa=ZM.toString,ee=$i.hasOwnProperty,QM=0,pg=function(){var s=/[^.]+$/.exec(ua&&ua.keys&&ua.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),ca=$i.toString,JM=fa.call(se),t3=Me._,e3=vf("^"+fa.call(ee).replace(Yu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ha=Zv?lt.Buffer:r,yn=lt.Symbol,da=lt.Uint8Array,vg=ha?ha.allocUnsafe:r,pa=hg(se.getPrototypeOf,se),gg=se.create,mg=$i.propertyIsEnumerable,va=la.splice,yg=yn?yn.isConcatSpreadable:r,Os=yn?yn.iterator:r,Vn=yn?yn.toStringTag:r,ga=function(){try{var s=Zn(se,"defineProperty");return s({},"",{}),s}catch{}}(),r3=lt.clearTimeout!==Me.clearTimeout&&lt.clearTimeout,n3=xt&&xt.now!==Me.Date.now&&xt.now,i3=lt.setTimeout!==Me.setTimeout&&lt.setTimeout,ma=Se.ceil,ya=Se.floor,gf=se.getOwnPropertySymbols,s3=ha?ha.isBuffer:r,_g=lt.isFinite,o3=la.join,a3=hg(se.keys,se),Ae=Se.max,De=Se.min,l3=xt.now,u3=lt.parseInt,bg=Se.random,f3=la.reverse,mf=Zn(lt,"DataView"),Cs=Zn(lt,"Map"),yf=Zn(lt,"Promise"),Gi=Zn(lt,"Set"),Rs=Zn(lt,"WeakMap"),Is=Zn(se,"create"),_a=Rs&&new Rs,ji={},c3=Qn(mf),h3=Qn(Cs),d3=Qn(yf),p3=Qn(Gi),v3=Qn(Rs),ba=yn?yn.prototype:r,Ps=ba?ba.valueOf:r,xg=ba?ba.toString:r;function B(s){if(ye(s)&&!kt(s)&&!(s instanceof jt)){if(s instanceof dr)return s;if(ee.call(s,"__wrapped__"))return wm(s)}return new dr(s)}var qi=function(){function s(){}return function(l){if(!me(l))return{};if(gg)return gg(l);s.prototype=l;var g=new s;return s.prototype=r,g}}();function xa(){}function dr(s,l){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!l,this.__index__=0,this.__values__=r}B.templateSettings={escape:RN,evaluate:IN,interpolate:Iv,variable:"",imports:{_:B}},B.prototype=xa.prototype,B.prototype.constructor=B,dr.prototype=qi(xa.prototype),dr.prototype.constructor=dr;function jt(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=k,this.__views__=[]}function g3(){var s=new jt(this.__wrapped__);return s.__actions__=Ve(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=Ve(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=Ve(this.__views__),s}function m3(){if(this.__filtered__){var s=new jt(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function y3(){var s=this.__wrapped__.value(),l=this.__dir__,g=kt(s),S=l<0,N=g?s.length:0,U=Ik(0,N,this.__views__),H=U.start,X=U.end,tt=X-H,ft=S?X:H-1,ct=this.__iteratees__,ht=ct.length,yt=0,wt=De(tt,this.__takeCount__);if(!g||!S&&N==tt&&wt==tt)return Hg(s,this.__actions__);var Ct=[];t:for(;tt--&&yt<wt;){ft+=l;for(var Ft=-1,Rt=s[ft];++Ft<ht;){var $t=ct[Ft],zt=$t.iteratee,sr=$t.type,ze=zt(Rt);if(sr==q)Rt=ze;else if(!ze){if(sr==F)continue t;break t}}Ct[yt++]=Rt}return Ct}jt.prototype=qi(xa.prototype),jt.prototype.constructor=jt;function Wn(s){var l=-1,g=s==null?0:s.length;for(this.clear();++l<g;){var S=s[l];this.set(S[0],S[1])}}function _3(){this.__data__=Is?Is(null):{},this.size=0}function b3(s){var l=this.has(s)&&delete this.__data__[s];return this.size-=l?1:0,l}function x3(s){var l=this.__data__;if(Is){var g=l[s];return g===f?r:g}return ee.call(l,s)?l[s]:r}function w3(s){var l=this.__data__;return Is?l[s]!==r:ee.call(l,s)}function T3(s,l){var g=this.__data__;return this.size+=this.has(s)?0:1,g[s]=Is&&l===r?f:l,this}Wn.prototype.clear=_3,Wn.prototype.delete=b3,Wn.prototype.get=x3,Wn.prototype.has=w3,Wn.prototype.set=T3;function Zr(s){var l=-1,g=s==null?0:s.length;for(this.clear();++l<g;){var S=s[l];this.set(S[0],S[1])}}function E3(){this.__data__=[],this.size=0}function S3(s){var l=this.__data__,g=wa(l,s);if(g<0)return!1;var S=l.length-1;return g==S?l.pop():va.call(l,g,1),--this.size,!0}function A3(s){var l=this.__data__,g=wa(l,s);return g<0?r:l[g][1]}function O3(s){return wa(this.__data__,s)>-1}function C3(s,l){var g=this.__data__,S=wa(g,s);return S<0?(++this.size,g.push([s,l])):g[S][1]=l,this}Zr.prototype.clear=E3,Zr.prototype.delete=S3,Zr.prototype.get=A3,Zr.prototype.has=O3,Zr.prototype.set=C3;function Qr(s){var l=-1,g=s==null?0:s.length;for(this.clear();++l<g;){var S=s[l];this.set(S[0],S[1])}}function R3(){this.size=0,this.__data__={hash:new Wn,map:new(Cs||Zr),string:new Wn}}function I3(s){var l=ka(this,s).delete(s);return this.size-=l?1:0,l}function P3(s){return ka(this,s).get(s)}function N3(s){return ka(this,s).has(s)}function M3(s,l){var g=ka(this,s),S=g.size;return g.set(s,l),this.size+=g.size==S?0:1,this}Qr.prototype.clear=R3,Qr.prototype.delete=I3,Qr.prototype.get=P3,Qr.prototype.has=N3,Qr.prototype.set=M3;function Xn(s){var l=-1,g=s==null?0:s.length;for(this.__data__=new Qr;++l<g;)this.add(s[l])}function k3(s){return this.__data__.set(s,f),this}function L3(s){return this.__data__.has(s)}Xn.prototype.add=Xn.prototype.push=k3,Xn.prototype.has=L3;function Ir(s){var l=this.__data__=new Zr(s);this.size=l.size}function F3(){this.__data__=new Zr,this.size=0}function B3(s){var l=this.__data__,g=l.delete(s);return this.size=l.size,g}function D3(s){return this.__data__.get(s)}function U3(s){return this.__data__.has(s)}function $3(s,l){var g=this.__data__;if(g instanceof Zr){var S=g.__data__;if(!Cs||S.length<i-1)return S.push([s,l]),this.size=++g.size,this;g=this.__data__=new Qr(S)}return g.set(s,l),this.size=g.size,this}Ir.prototype.clear=F3,Ir.prototype.delete=B3,Ir.prototype.get=D3,Ir.prototype.has=U3,Ir.prototype.set=$3;function wg(s,l){var g=kt(s),S=!g&&Jn(s),N=!g&&!S&&Tn(s),U=!g&&!S&&!N&&Wi(s),H=g||S||N||U,X=H?hf(s.length,YM):[],tt=X.length;for(var ft in s)(l||ee.call(s,ft))&&!(H&&(ft=="length"||N&&(ft=="offset"||ft=="parent")||U&&(ft=="buffer"||ft=="byteLength"||ft=="byteOffset")||rn(ft,tt)))&&X.push(ft);return X}function Tg(s){var l=s.length;return l?s[Rf(0,l-1)]:r}function G3(s,l){return La(Ve(s),Kn(l,0,s.length))}function j3(s){return La(Ve(s))}function _f(s,l,g){(g!==r&&!Pr(s[l],g)||g===r&&!(l in s))&&Jr(s,l,g)}function Ns(s,l,g){var S=s[l];(!(ee.call(s,l)&&Pr(S,g))||g===r&&!(l in s))&&Jr(s,l,g)}function wa(s,l){for(var g=s.length;g--;)if(Pr(s[g][0],l))return g;return-1}function q3(s,l,g,S){return _n(s,function(N,U,H){l(S,N,g(N),H)}),S}function Eg(s,l){return s&&jr(l,Pe(l),s)}function z3(s,l){return s&&jr(l,Xe(l),s)}function Jr(s,l,g){l=="__proto__"&&ga?ga(s,l,{configurable:!0,enumerable:!0,value:g,writable:!0}):s[l]=g}function bf(s,l){for(var g=-1,S=l.length,N=st(S),U=s==null;++g<S;)N[g]=U?r:tc(s,l[g]);return N}function Kn(s,l,g){return s===s&&(g!==r&&(s=s<=g?s:g),l!==r&&(s=s>=l?s:l)),s}function pr(s,l,g,S,N,U){var H,X=l&p,tt=l&c,ft=l&v;if(g&&(H=N?g(s,S,N,U):g(s)),H!==r)return H;if(!me(s))return s;var ct=kt(s);if(ct){if(H=Nk(s),!X)return Ve(s,H)}else{var ht=Ue(s),yt=ht==pt||ht==vt;if(Tn(s))return Xg(s,X);if(ht==Ut||ht==K||yt&&!N){if(H=tt||yt?{}:dm(s),!X)return tt?xk(s,z3(H,s)):bk(s,Eg(H,s))}else{if(!ae[ht])return N?s:{};H=Mk(s,ht,X)}}U||(U=new Ir);var wt=U.get(s);if(wt)return wt;U.set(s,H),jm(s)?s.forEach(function(Rt){H.add(pr(Rt,l,g,Rt,s,U))}):$m(s)&&s.forEach(function(Rt,$t){H.set($t,pr(Rt,l,g,$t,s,U))});var Ct=ft?tt?$f:Uf:tt?Xe:Pe,Ft=ct?r:Ct(s);return cr(Ft||s,function(Rt,$t){Ft&&($t=Rt,Rt=s[$t]),Ns(H,$t,pr(Rt,l,g,$t,s,U))}),H}function H3(s){var l=Pe(s);return function(g){return Sg(g,s,l)}}function Sg(s,l,g){var S=g.length;if(s==null)return!S;for(s=se(s);S--;){var N=g[S],U=l[N],H=s[N];if(H===r&&!(N in s)||!U(H))return!1}return!0}function Ag(s,l,g){if(typeof s!="function")throw new hr(a);return Us(function(){s.apply(r,g)},l)}function Ms(s,l,g,S){var N=-1,U=sa,H=!0,X=s.length,tt=[],ft=l.length;if(!X)return tt;g&&(l=de(l,rr(g))),S?(U=of,H=!1):l.length>=i&&(U=As,H=!1,l=new Xn(l));t:for(;++N<X;){var ct=s[N],ht=g==null?ct:g(ct);if(ct=S||ct!==0?ct:0,H&&ht===ht){for(var yt=ft;yt--;)if(l[yt]===ht)continue t;tt.push(ct)}else U(l,ht,S)||tt.push(ct)}return tt}var _n=Jg(Gr),Og=Jg(wf,!0);function V3(s,l){var g=!0;return _n(s,function(S,N,U){return g=!!l(S,N,U),g}),g}function Ta(s,l,g){for(var S=-1,N=s.length;++S<N;){var U=s[S],H=l(U);if(H!=null&&(X===r?H===H&&!ir(H):g(H,X)))var X=H,tt=U}return tt}function W3(s,l,g,S){var N=s.length;for(g=Lt(g),g<0&&(g=-g>N?0:N+g),S=S===r||S>N?N:Lt(S),S<0&&(S+=N),S=g>S?0:zm(S);g<S;)s[g++]=l;return s}function Cg(s,l){var g=[];return _n(s,function(S,N,U){l(S,N,U)&&g.push(S)}),g}function ke(s,l,g,S,N){var U=-1,H=s.length;for(g||(g=Lk),N||(N=[]);++U<H;){var X=s[U];l>0&&g(X)?l>1?ke(X,l-1,g,S,N):gn(N,X):S||(N[N.length]=X)}return N}var xf=tm(),Rg=tm(!0);function Gr(s,l){return s&&xf(s,l,Pe)}function wf(s,l){return s&&Rg(s,l,Pe)}function Ea(s,l){return vn(l,function(g){return nn(s[g])})}function Yn(s,l){l=xn(l,s);for(var g=0,S=l.length;s!=null&&g<S;)s=s[qr(l[g++])];return g&&g==S?s:r}function Ig(s,l,g){var S=l(s);return kt(s)?S:gn(S,g(s))}function je(s){return s==null?s===r?St:ne:Vn&&Vn in se(s)?Rk(s):jk(s)}function Tf(s,l){return s>l}function X3(s,l){return s!=null&&ee.call(s,l)}function K3(s,l){return s!=null&&l in se(s)}function Y3(s,l,g){return s>=De(l,g)&&s<Ae(l,g)}function Ef(s,l,g){for(var S=g?of:sa,N=s[0].length,U=s.length,H=U,X=st(U),tt=1/0,ft=[];H--;){var ct=s[H];H&&l&&(ct=de(ct,rr(l))),tt=De(ct.length,tt),X[H]=!g&&(l||N>=120&&ct.length>=120)?new Xn(H&&ct):r}ct=s[0];var ht=-1,yt=X[0];t:for(;++ht<N&&ft.length<tt;){var wt=ct[ht],Ct=l?l(wt):wt;if(wt=g||wt!==0?wt:0,!(yt?As(yt,Ct):S(ft,Ct,g))){for(H=U;--H;){var Ft=X[H];if(!(Ft?As(Ft,Ct):S(s[H],Ct,g)))continue t}yt&&yt.push(Ct),ft.push(wt)}}return ft}function Z3(s,l,g,S){return Gr(s,function(N,U,H){l(S,g(N),U,H)}),S}function ks(s,l,g){l=xn(l,s),s=mm(s,l);var S=s==null?s:s[qr(gr(l))];return S==null?r:er(S,s,g)}function Pg(s){return ye(s)&&je(s)==K}function Q3(s){return ye(s)&&je(s)==Ge}function J3(s){return ye(s)&&je(s)==Y}function Ls(s,l,g,S,N){return s===l?!0:s==null||l==null||!ye(s)&&!ye(l)?s!==s&&l!==l:tk(s,l,g,S,Ls,N)}function tk(s,l,g,S,N,U){var H=kt(s),X=kt(l),tt=H?$:Ue(s),ft=X?$:Ue(l);tt=tt==K?Ut:tt,ft=ft==K?Ut:ft;var ct=tt==Ut,ht=ft==Ut,yt=tt==ft;if(yt&&Tn(s)){if(!Tn(l))return!1;H=!0,ct=!1}if(yt&&!ct)return U||(U=new Ir),H||Wi(s)?fm(s,l,g,S,N,U):Ok(s,l,tt,g,S,N,U);if(!(g&y)){var wt=ct&&ee.call(s,"__wrapped__"),Ct=ht&&ee.call(l,"__wrapped__");if(wt||Ct){var Ft=wt?s.value():s,Rt=Ct?l.value():l;return U||(U=new Ir),N(Ft,Rt,g,S,U)}}return yt?(U||(U=new Ir),Ck(s,l,g,S,N,U)):!1}function ek(s){return ye(s)&&Ue(s)==_t}function Sf(s,l,g,S){var N=g.length,U=N,H=!S;if(s==null)return!U;for(s=se(s);N--;){var X=g[N];if(H&&X[2]?X[1]!==s[X[0]]:!(X[0]in s))return!1}for(;++N<U;){X=g[N];var tt=X[0],ft=s[tt],ct=X[1];if(H&&X[2]){if(ft===r&&!(tt in s))return!1}else{var ht=new Ir;if(S)var yt=S(ft,ct,tt,s,l,ht);if(!(yt===r?Ls(ct,ft,y|_,S,ht):yt))return!1}}return!0}function Ng(s){if(!me(s)||Bk(s))return!1;var l=nn(s)?e3:HN;return l.test(Qn(s))}function rk(s){return ye(s)&&je(s)==dt}function nk(s){return ye(s)&&Ue(s)==gt}function ik(s){return ye(s)&&Ga(s.length)&&!!fe[je(s)]}function Mg(s){return typeof s=="function"?s:s==null?Ke:typeof s=="object"?kt(s)?Fg(s[0],s[1]):Lg(s):ey(s)}function Af(s){if(!Ds(s))return a3(s);var l=[];for(var g in se(s))ee.call(s,g)&&g!="constructor"&&l.push(g);return l}function sk(s){if(!me(s))return Gk(s);var l=Ds(s),g=[];for(var S in s)S=="constructor"&&(l||!ee.call(s,S))||g.push(S);return g}function Of(s,l){return s<l}function kg(s,l){var g=-1,S=We(s)?st(s.length):[];return _n(s,function(N,U,H){S[++g]=l(N,U,H)}),S}function Lg(s){var l=jf(s);return l.length==1&&l[0][2]?vm(l[0][0],l[0][1]):function(g){return g===s||Sf(g,s,l)}}function Fg(s,l){return zf(s)&&pm(l)?vm(qr(s),l):function(g){var S=tc(g,s);return S===r&&S===l?ec(g,s):Ls(l,S,y|_)}}function Sa(s,l,g,S,N){s!==l&&xf(l,function(U,H){if(N||(N=new Ir),me(U))ok(s,l,H,g,Sa,S,N);else{var X=S?S(Vf(s,H),U,H+"",s,l,N):r;X===r&&(X=U),_f(s,H,X)}},Xe)}function ok(s,l,g,S,N,U,H){var X=Vf(s,g),tt=Vf(l,g),ft=H.get(tt);if(ft){_f(s,g,ft);return}var ct=U?U(X,tt,g+"",s,l,H):r,ht=ct===r;if(ht){var yt=kt(tt),wt=!yt&&Tn(tt),Ct=!yt&&!wt&&Wi(tt);ct=tt,yt||wt||Ct?kt(X)?ct=X:xe(X)?ct=Ve(X):wt?(ht=!1,ct=Xg(tt,!0)):Ct?(ht=!1,ct=Kg(tt,!0)):ct=[]:$s(tt)||Jn(tt)?(ct=X,Jn(X)?ct=Hm(X):(!me(X)||nn(X))&&(ct=dm(tt))):ht=!1}ht&&(H.set(tt,ct),N(ct,tt,S,U,H),H.delete(tt)),_f(s,g,ct)}function Bg(s,l){var g=s.length;if(g)return l+=l<0?g:0,rn(l,g)?s[l]:r}function Dg(s,l,g){l.length?l=de(l,function(U){return kt(U)?function(H){return Yn(H,U.length===1?U[0]:U)}:U}):l=[Ke];var S=-1;l=de(l,rr(Ot()));var N=kg(s,function(U,H,X){var tt=de(l,function(ft){return ft(U)});return{criteria:tt,index:++S,value:U}});return MM(N,function(U,H){return _k(U,H,g)})}function ak(s,l){return Ug(s,l,function(g,S){return ec(s,S)})}function Ug(s,l,g){for(var S=-1,N=l.length,U={};++S<N;){var H=l[S],X=Yn(s,H);g(X,H)&&Fs(U,xn(H,s),X)}return U}function lk(s){return function(l){return Yn(l,s)}}function Cf(s,l,g,S){var N=S?NM:Fi,U=-1,H=l.length,X=s;for(s===l&&(l=Ve(l)),g&&(X=de(s,rr(g)));++U<H;)for(var tt=0,ft=l[U],ct=g?g(ft):ft;(tt=N(X,ct,tt,S))>-1;)X!==s&&va.call(X,tt,1),va.call(s,tt,1);return s}function $g(s,l){for(var g=s?l.length:0,S=g-1;g--;){var N=l[g];if(g==S||N!==U){var U=N;rn(N)?va.call(s,N,1):Nf(s,N)}}return s}function Rf(s,l){return s+ya(bg()*(l-s+1))}function uk(s,l,g,S){for(var N=-1,U=Ae(ma((l-s)/(g||1)),0),H=st(U);U--;)H[S?U:++N]=s,s+=g;return H}function If(s,l){var g="";if(!s||l<1||l>nt)return g;do l%2&&(g+=s),l=ya(l/2),l&&(s+=s);while(l);return g}function Bt(s,l){return Wf(gm(s,l,Ke),s+"")}function fk(s){return Tg(Xi(s))}function ck(s,l){var g=Xi(s);return La(g,Kn(l,0,g.length))}function Fs(s,l,g,S){if(!me(s))return s;l=xn(l,s);for(var N=-1,U=l.length,H=U-1,X=s;X!=null&&++N<U;){var tt=qr(l[N]),ft=g;if(tt==="__proto__"||tt==="constructor"||tt==="prototype")return s;if(N!=H){var ct=X[tt];ft=S?S(ct,tt,X):r,ft===r&&(ft=me(ct)?ct:rn(l[N+1])?[]:{})}Ns(X,tt,ft),X=X[tt]}return s}var Gg=_a?function(s,l){return _a.set(s,l),s}:Ke,hk=ga?function(s,l){return ga(s,"toString",{configurable:!0,enumerable:!1,value:nc(l),writable:!0})}:Ke;function dk(s){return La(Xi(s))}function vr(s,l,g){var S=-1,N=s.length;l<0&&(l=-l>N?0:N+l),g=g>N?N:g,g<0&&(g+=N),N=l>g?0:g-l>>>0,l>>>=0;for(var U=st(N);++S<N;)U[S]=s[S+l];return U}function pk(s,l){var g;return _n(s,function(S,N,U){return g=l(S,N,U),!g}),!!g}function Aa(s,l,g){var S=0,N=s==null?S:s.length;if(typeof l=="number"&&l===l&&N<=j){for(;S<N;){var U=S+N>>>1,H=s[U];H!==null&&!ir(H)&&(g?H<=l:H<l)?S=U+1:N=U}return N}return Pf(s,l,Ke,g)}function Pf(s,l,g,S){var N=0,U=s==null?0:s.length;if(U===0)return 0;l=g(l);for(var H=l!==l,X=l===null,tt=ir(l),ft=l===r;N<U;){var ct=ya((N+U)/2),ht=g(s[ct]),yt=ht!==r,wt=ht===null,Ct=ht===ht,Ft=ir(ht);if(H)var Rt=S||Ct;else ft?Rt=Ct&&(S||yt):X?Rt=Ct&&yt&&(S||!wt):tt?Rt=Ct&&yt&&!wt&&(S||!Ft):wt||Ft?Rt=!1:Rt=S?ht<=l:ht<l;Rt?N=ct+1:U=ct}return De(U,G)}function jg(s,l){for(var g=-1,S=s.length,N=0,U=[];++g<S;){var H=s[g],X=l?l(H):H;if(!g||!Pr(X,tt)){var tt=X;U[N++]=H===0?0:H}}return U}function qg(s){return typeof s=="number"?s:ir(s)?D:+s}function nr(s){if(typeof s=="string")return s;if(kt(s))return de(s,nr)+"";if(ir(s))return xg?xg.call(s):"";var l=s+"";return l=="0"&&1/s==-z?"-0":l}function bn(s,l,g){var S=-1,N=sa,U=s.length,H=!0,X=[],tt=X;if(g)H=!1,N=of;else if(U>=i){var ft=l?null:Sk(s);if(ft)return aa(ft);H=!1,N=As,tt=new Xn}else tt=l?[]:X;t:for(;++S<U;){var ct=s[S],ht=l?l(ct):ct;if(ct=g||ct!==0?ct:0,H&&ht===ht){for(var yt=tt.length;yt--;)if(tt[yt]===ht)continue t;l&&tt.push(ht),X.push(ct)}else N(tt,ht,g)||(tt!==X&&tt.push(ht),X.push(ct))}return X}function Nf(s,l){return l=xn(l,s),s=mm(s,l),s==null||delete s[qr(gr(l))]}function zg(s,l,g,S){return Fs(s,l,g(Yn(s,l)),S)}function Oa(s,l,g,S){for(var N=s.length,U=S?N:-1;(S?U--:++U<N)&&l(s[U],U,s););return g?vr(s,S?0:U,S?U+1:N):vr(s,S?U+1:0,S?N:U)}function Hg(s,l){var g=s;return g instanceof jt&&(g=g.value()),af(l,function(S,N){return N.func.apply(N.thisArg,gn([S],N.args))},g)}function Mf(s,l,g){var S=s.length;if(S<2)return S?bn(s[0]):[];for(var N=-1,U=st(S);++N<S;)for(var H=s[N],X=-1;++X<S;)X!=N&&(U[N]=Ms(U[N]||H,s[X],l,g));return bn(ke(U,1),l,g)}function Vg(s,l,g){for(var S=-1,N=s.length,U=l.length,H={};++S<N;){var X=S<U?l[S]:r;g(H,s[S],X)}return H}function kf(s){return xe(s)?s:[]}function Lf(s){return typeof s=="function"?s:Ke}function xn(s,l){return kt(s)?s:zf(s,l)?[s]:xm(Jt(s))}var vk=Bt;function wn(s,l,g){var S=s.length;return g=g===r?S:g,!l&&g>=S?s:vr(s,l,g)}var Wg=r3||function(s){return Me.clearTimeout(s)};function Xg(s,l){if(l)return s.slice();var g=s.length,S=vg?vg(g):new s.constructor(g);return s.copy(S),S}function Ff(s){var l=new s.constructor(s.byteLength);return new da(l).set(new da(s)),l}function gk(s,l){var g=l?Ff(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.byteLength)}function mk(s){var l=new s.constructor(s.source,Pv.exec(s));return l.lastIndex=s.lastIndex,l}function yk(s){return Ps?se(Ps.call(s)):{}}function Kg(s,l){var g=l?Ff(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.length)}function Yg(s,l){if(s!==l){var g=s!==r,S=s===null,N=s===s,U=ir(s),H=l!==r,X=l===null,tt=l===l,ft=ir(l);if(!X&&!ft&&!U&&s>l||U&&H&&tt&&!X&&!ft||S&&H&&tt||!g&&tt||!N)return 1;if(!S&&!U&&!ft&&s<l||ft&&g&&N&&!S&&!U||X&&g&&N||!H&&N||!tt)return-1}return 0}function _k(s,l,g){for(var S=-1,N=s.criteria,U=l.criteria,H=N.length,X=g.length;++S<H;){var tt=Yg(N[S],U[S]);if(tt){if(S>=X)return tt;var ft=g[S];return tt*(ft=="desc"?-1:1)}}return s.index-l.index}function Zg(s,l,g,S){for(var N=-1,U=s.length,H=g.length,X=-1,tt=l.length,ft=Ae(U-H,0),ct=st(tt+ft),ht=!S;++X<tt;)ct[X]=l[X];for(;++N<H;)(ht||N<U)&&(ct[g[N]]=s[N]);for(;ft--;)ct[X++]=s[N++];return ct}function Qg(s,l,g,S){for(var N=-1,U=s.length,H=-1,X=g.length,tt=-1,ft=l.length,ct=Ae(U-X,0),ht=st(ct+ft),yt=!S;++N<ct;)ht[N]=s[N];for(var wt=N;++tt<ft;)ht[wt+tt]=l[tt];for(;++H<X;)(yt||N<U)&&(ht[wt+g[H]]=s[N++]);return ht}function Ve(s,l){var g=-1,S=s.length;for(l||(l=st(S));++g<S;)l[g]=s[g];return l}function jr(s,l,g,S){var N=!g;g||(g={});for(var U=-1,H=l.length;++U<H;){var X=l[U],tt=S?S(g[X],s[X],X,g,s):r;tt===r&&(tt=s[X]),N?Jr(g,X,tt):Ns(g,X,tt)}return g}function bk(s,l){return jr(s,qf(s),l)}function xk(s,l){return jr(s,cm(s),l)}function Ca(s,l){return function(g,S){var N=kt(g)?AM:q3,U=l?l():{};return N(g,s,Ot(S,2),U)}}function zi(s){return Bt(function(l,g){var S=-1,N=g.length,U=N>1?g[N-1]:r,H=N>2?g[2]:r;for(U=s.length>3&&typeof U=="function"?(N--,U):r,H&&qe(g[0],g[1],H)&&(U=N<3?r:U,N=1),l=se(l);++S<N;){var X=g[S];X&&s(l,X,S,U)}return l})}function Jg(s,l){return function(g,S){if(g==null)return g;if(!We(g))return s(g,S);for(var N=g.length,U=l?N:-1,H=se(g);(l?U--:++U<N)&&S(H[U],U,H)!==!1;);return g}}function tm(s){return function(l,g,S){for(var N=-1,U=se(l),H=S(l),X=H.length;X--;){var tt=H[s?X:++N];if(g(U[tt],tt,U)===!1)break}return l}}function wk(s,l,g){var S=l&b,N=Bs(s);function U(){var H=this&&this!==Me&&this instanceof U?N:s;return H.apply(S?g:this,arguments)}return U}function em(s){return function(l){l=Jt(l);var g=Bi(l)?Rr(l):r,S=g?g[0]:l.charAt(0),N=g?wn(g,1).join(""):l.slice(1);return S[s]()+N}}function Hi(s){return function(l){return af(Jm(Qm(l).replace(hM,"")),s,"")}}function Bs(s){return function(){var l=arguments;switch(l.length){case 0:return new s;case 1:return new s(l[0]);case 2:return new s(l[0],l[1]);case 3:return new s(l[0],l[1],l[2]);case 4:return new s(l[0],l[1],l[2],l[3]);case 5:return new s(l[0],l[1],l[2],l[3],l[4]);case 6:return new s(l[0],l[1],l[2],l[3],l[4],l[5]);case 7:return new s(l[0],l[1],l[2],l[3],l[4],l[5],l[6])}var g=qi(s.prototype),S=s.apply(g,l);return me(S)?S:g}}function Tk(s,l,g){var S=Bs(s);function N(){for(var U=arguments.length,H=st(U),X=U,tt=Vi(N);X--;)H[X]=arguments[X];var ft=U<3&&H[0]!==tt&&H[U-1]!==tt?[]:mn(H,tt);if(U-=ft.length,U<g)return om(s,l,Ra,N.placeholder,r,H,ft,r,r,g-U);var ct=this&&this!==Me&&this instanceof N?S:s;return er(ct,this,H)}return N}function rm(s){return function(l,g,S){var N=se(l);if(!We(l)){var U=Ot(g,3);l=Pe(l),g=function(X){return U(N[X],X,N)}}var H=s(l,g,S);return H>-1?N[U?l[H]:H]:r}}function nm(s){return en(function(l){var g=l.length,S=g,N=dr.prototype.thru;for(s&&l.reverse();S--;){var U=l[S];if(typeof U!="function")throw new hr(a);if(N&&!H&&Ma(U)=="wrapper")var H=new dr([],!0)}for(S=H?S:g;++S<g;){U=l[S];var X=Ma(U),tt=X=="wrapper"?Gf(U):r;tt&&Hf(tt[0])&&tt[1]==(O|T|E|A)&&!tt[4].length&&tt[9]==1?H=H[Ma(tt[0])].apply(H,tt[3]):H=U.length==1&&Hf(U)?H[X]():H.thru(U)}return function(){var ft=arguments,ct=ft[0];if(H&&ft.length==1&&kt(ct))return H.plant(ct).value();for(var ht=0,yt=g?l[ht].apply(this,ft):ct;++ht<g;)yt=l[ht].call(this,yt);return yt}})}function Ra(s,l,g,S,N,U,H,X,tt,ft){var ct=l&O,ht=l&b,yt=l&m,wt=l&(T|x),Ct=l&L,Ft=yt?r:Bs(s);function Rt(){for(var $t=arguments.length,zt=st($t),sr=$t;sr--;)zt[sr]=arguments[sr];if(wt)var ze=Vi(Rt),or=LM(zt,ze);if(S&&(zt=Zg(zt,S,N,wt)),U&&(zt=Qg(zt,U,H,wt)),$t-=or,wt&&$t<ft){var we=mn(zt,ze);return om(s,l,Ra,Rt.placeholder,g,zt,we,X,tt,ft-$t)}var Nr=ht?g:this,on=yt?Nr[s]:s;return $t=zt.length,X?zt=qk(zt,X):Ct&&$t>1&&zt.reverse(),ct&&tt<$t&&(zt.length=tt),this&&this!==Me&&this instanceof Rt&&(on=Ft||Bs(on)),on.apply(Nr,zt)}return Rt}function im(s,l){return function(g,S){return Z3(g,s,l(S),{})}}function Ia(s,l){return function(g,S){var N;if(g===r&&S===r)return l;if(g!==r&&(N=g),S!==r){if(N===r)return S;typeof g=="string"||typeof S=="string"?(g=nr(g),S=nr(S)):(g=qg(g),S=qg(S)),N=s(g,S)}return N}}function Bf(s){return en(function(l){return l=de(l,rr(Ot())),Bt(function(g){var S=this;return s(l,function(N){return er(N,S,g)})})})}function Pa(s,l){l=l===r?" ":nr(l);var g=l.length;if(g<2)return g?If(l,s):l;var S=If(l,ma(s/Di(l)));return Bi(l)?wn(Rr(S),0,s).join(""):S.slice(0,s)}function Ek(s,l,g,S){var N=l&b,U=Bs(s);function H(){for(var X=-1,tt=arguments.length,ft=-1,ct=S.length,ht=st(ct+tt),yt=this&&this!==Me&&this instanceof H?U:s;++ft<ct;)ht[ft]=S[ft];for(;tt--;)ht[ft++]=arguments[++X];return er(yt,N?g:this,ht)}return H}function sm(s){return function(l,g,S){return S&&typeof S!="number"&&qe(l,g,S)&&(g=S=r),l=sn(l),g===r?(g=l,l=0):g=sn(g),S=S===r?l<g?1:-1:sn(S),uk(l,g,S,s)}}function Na(s){return function(l,g){return typeof l=="string"&&typeof g=="string"||(l=mr(l),g=mr(g)),s(l,g)}}function om(s,l,g,S,N,U,H,X,tt,ft){var ct=l&T,ht=ct?H:r,yt=ct?r:H,wt=ct?U:r,Ct=ct?r:U;l|=ct?E:I,l&=~(ct?I:E),l&w||(l&=~(b|m));var Ft=[s,l,N,wt,ht,Ct,yt,X,tt,ft],Rt=g.apply(r,Ft);return Hf(s)&&ym(Rt,Ft),Rt.placeholder=S,_m(Rt,s,l)}function Df(s){var l=Se[s];return function(g,S){if(g=mr(g),S=S==null?0:De(Lt(S),292),S&&_g(g)){var N=(Jt(g)+"e").split("e"),U=l(N[0]+"e"+(+N[1]+S));return N=(Jt(U)+"e").split("e"),+(N[0]+"e"+(+N[1]-S))}return l(g)}}var Sk=Gi&&1/aa(new Gi([,-0]))[1]==z?function(s){return new Gi(s)}:oc;function am(s){return function(l){var g=Ue(l);return g==_t?pf(l):g==gt?jM(l):kM(l,s(l))}}function tn(s,l,g,S,N,U,H,X){var tt=l&m;if(!tt&&typeof s!="function")throw new hr(a);var ft=S?S.length:0;if(ft||(l&=~(E|I),S=N=r),H=H===r?H:Ae(Lt(H),0),X=X===r?X:Lt(X),ft-=N?N.length:0,l&I){var ct=S,ht=N;S=N=r}var yt=tt?r:Gf(s),wt=[s,l,g,S,N,ct,ht,U,H,X];if(yt&&$k(wt,yt),s=wt[0],l=wt[1],g=wt[2],S=wt[3],N=wt[4],X=wt[9]=wt[9]===r?tt?0:s.length:Ae(wt[9]-ft,0),!X&&l&(T|x)&&(l&=~(T|x)),!l||l==b)var Ct=wk(s,l,g);else l==T||l==x?Ct=Tk(s,l,X):(l==E||l==(b|E))&&!N.length?Ct=Ek(s,l,g,S):Ct=Ra.apply(r,wt);var Ft=yt?Gg:ym;return _m(Ft(Ct,wt),s,l)}function lm(s,l,g,S){return s===r||Pr(s,$i[g])&&!ee.call(S,g)?l:s}function um(s,l,g,S,N,U){return me(s)&&me(l)&&(U.set(l,s),Sa(s,l,r,um,U),U.delete(l)),s}function Ak(s){return $s(s)?r:s}function fm(s,l,g,S,N,U){var H=g&y,X=s.length,tt=l.length;if(X!=tt&&!(H&&tt>X))return!1;var ft=U.get(s),ct=U.get(l);if(ft&&ct)return ft==l&&ct==s;var ht=-1,yt=!0,wt=g&_?new Xn:r;for(U.set(s,l),U.set(l,s);++ht<X;){var Ct=s[ht],Ft=l[ht];if(S)var Rt=H?S(Ft,Ct,ht,l,s,U):S(Ct,Ft,ht,s,l,U);if(Rt!==r){if(Rt)continue;yt=!1;break}if(wt){if(!lf(l,function($t,zt){if(!As(wt,zt)&&(Ct===$t||N(Ct,$t,g,S,U)))return wt.push(zt)})){yt=!1;break}}else if(!(Ct===Ft||N(Ct,Ft,g,S,U))){yt=!1;break}}return U.delete(s),U.delete(l),yt}function Ok(s,l,g,S,N,U,H){switch(g){case Qt:if(s.byteLength!=l.byteLength||s.byteOffset!=l.byteOffset)return!1;s=s.buffer,l=l.buffer;case Ge:return!(s.byteLength!=l.byteLength||!U(new da(s),new da(l)));case et:case Y:case At:return Pr(+s,+l);case ot:return s.name==l.name&&s.message==l.message;case dt:case at:return s==l+"";case _t:var X=pf;case gt:var tt=S&y;if(X||(X=aa),s.size!=l.size&&!tt)return!1;var ft=H.get(s);if(ft)return ft==l;S|=_,H.set(s,l);var ct=fm(X(s),X(l),S,N,U,H);return H.delete(s),ct;case It:if(Ps)return Ps.call(s)==Ps.call(l)}return!1}function Ck(s,l,g,S,N,U){var H=g&y,X=Uf(s),tt=X.length,ft=Uf(l),ct=ft.length;if(tt!=ct&&!H)return!1;for(var ht=tt;ht--;){var yt=X[ht];if(!(H?yt in l:ee.call(l,yt)))return!1}var wt=U.get(s),Ct=U.get(l);if(wt&&Ct)return wt==l&&Ct==s;var Ft=!0;U.set(s,l),U.set(l,s);for(var Rt=H;++ht<tt;){yt=X[ht];var $t=s[yt],zt=l[yt];if(S)var sr=H?S(zt,$t,yt,l,s,U):S($t,zt,yt,s,l,U);if(!(sr===r?$t===zt||N($t,zt,g,S,U):sr)){Ft=!1;break}Rt||(Rt=yt=="constructor")}if(Ft&&!Rt){var ze=s.constructor,or=l.constructor;ze!=or&&"constructor"in s&&"constructor"in l&&!(typeof ze=="function"&&ze instanceof ze&&typeof or=="function"&&or instanceof or)&&(Ft=!1)}return U.delete(s),U.delete(l),Ft}function en(s){return Wf(gm(s,r,Sm),s+"")}function Uf(s){return Ig(s,Pe,qf)}function $f(s){return Ig(s,Xe,cm)}var Gf=_a?function(s){return _a.get(s)}:oc;function Ma(s){for(var l=s.name+"",g=ji[l],S=ee.call(ji,l)?g.length:0;S--;){var N=g[S],U=N.func;if(U==null||U==s)return N.name}return l}function Vi(s){var l=ee.call(B,"placeholder")?B:s;return l.placeholder}function Ot(){var s=B.iteratee||ic;return s=s===ic?Mg:s,arguments.length?s(arguments[0],arguments[1]):s}function ka(s,l){var g=s.__data__;return Fk(l)?g[typeof l=="string"?"string":"hash"]:g.map}function jf(s){for(var l=Pe(s),g=l.length;g--;){var S=l[g],N=s[S];l[g]=[S,N,pm(N)]}return l}function Zn(s,l){var g=UM(s,l);return Ng(g)?g:r}function Rk(s){var l=ee.call(s,Vn),g=s[Vn];try{s[Vn]=r;var S=!0}catch{}var N=ca.call(s);return S&&(l?s[Vn]=g:delete s[Vn]),N}var qf=gf?function(s){return s==null?[]:(s=se(s),vn(gf(s),function(l){return mg.call(s,l)}))}:ac,cm=gf?function(s){for(var l=[];s;)gn(l,qf(s)),s=pa(s);return l}:ac,Ue=je;(mf&&Ue(new mf(new ArrayBuffer(1)))!=Qt||Cs&&Ue(new Cs)!=_t||yf&&Ue(yf.resolve())!=it||Gi&&Ue(new Gi)!=gt||Rs&&Ue(new Rs)!=Mt)&&(Ue=function(s){var l=je(s),g=l==Ut?s.constructor:r,S=g?Qn(g):"";if(S)switch(S){case c3:return Qt;case h3:return _t;case d3:return it;case p3:return gt;case v3:return Mt}return l});function Ik(s,l,g){for(var S=-1,N=g.length;++S<N;){var U=g[S],H=U.size;switch(U.type){case"drop":s+=H;break;case"dropRight":l-=H;break;case"take":l=De(l,s+H);break;case"takeRight":s=Ae(s,l-H);break}}return{start:s,end:l}}function Pk(s){var l=s.match(BN);return l?l[1].split(DN):[]}function hm(s,l,g){l=xn(l,s);for(var S=-1,N=l.length,U=!1;++S<N;){var H=qr(l[S]);if(!(U=s!=null&&g(s,H)))break;s=s[H]}return U||++S!=N?U:(N=s==null?0:s.length,!!N&&Ga(N)&&rn(H,N)&&(kt(s)||Jn(s)))}function Nk(s){var l=s.length,g=new s.constructor(l);return l&&typeof s[0]=="string"&&ee.call(s,"index")&&(g.index=s.index,g.input=s.input),g}function dm(s){return typeof s.constructor=="function"&&!Ds(s)?qi(pa(s)):{}}function Mk(s,l,g){var S=s.constructor;switch(l){case Ge:return Ff(s);case et:case Y:return new S(+s);case Qt:return gk(s,g);case Ss:case he:case ur:case zu:case Hu:case Vu:case Wu:case Xu:case Ku:return Kg(s,g);case _t:return new S;case At:case at:return new S(s);case dt:return mk(s);case gt:return new S;case It:return yk(s)}}function kk(s,l){var g=l.length;if(!g)return s;var S=g-1;return l[S]=(g>1?"& ":"")+l[S],l=l.join(g>2?", ":" "),s.replace(FN,`{
1942
1942
  /* [wrapped with `+l+`] */
1943
- `)}function kk(s){return Mt(s)||Jn(s)||!!(yg&&s&&s[yg])}function rn(s,l){var g=typeof s;return l=l??nt,!!l&&(g=="number"||g!="symbol"&&VN.test(s))&&s>-1&&s%1==0&&s<l}function qe(s,l,g){if(!me(g))return!1;var S=typeof l;return(S=="number"?We(g)&&rn(l,g.length):S=="string"&&l in g)?Pr(g[l],s):!1}function zf(s,l){if(Mt(s))return!1;var g=typeof s;return g=="number"||g=="symbol"||g=="boolean"||s==null||ir(s)?!0:PN.test(s)||!IN.test(s)||l!=null&&s in ie(l)}function Lk(s){var l=typeof s;return l=="string"||l=="number"||l=="symbol"||l=="boolean"?s!=="__proto__":s===null}function Hf(s){var l=Na(s),g=B[l];if(typeof g!="function"||!(l in Gt.prototype))return!1;if(s===g)return!0;var S=Gf(g);return!!S&&s===S[0]}function Fk(s){return!!pg&&pg in s}var Bk=la?nn:lc;function Bs(s){var l=s&&s.constructor,g=typeof l=="function"&&l.prototype||Ui;return s===g}function pm(s){return s===s&&!me(s)}function vm(s,l){return function(g){return g==null?!1:g[s]===l&&(l!==r||s in ie(g))}}function Dk(s){var l=Da(s,function(S){return g.size===h&&g.clear(),S}),g=l.cache;return l}function Uk(s,l){var g=s[1],S=l[1],N=g|S,D=N<(_|m|A),H=S==A&&g==T||S==A&&g==O&&s[7].length<=l[8]||S==(A|O)&&l[7].length<=l[8]&&g==T;if(!(D||H))return s;S&_&&(s[2]=l[2],N|=g&_?0:w);var K=l[3];if(K){var tt=s[3];s[3]=tt?Zg(tt,K,l[4]):K,s[4]=tt?mn(s[3],d):l[4]}return K=l[5],K&&(tt=s[5],s[5]=tt?Qg(tt,K,l[6]):K,s[6]=tt?mn(s[5],d):l[6]),K=l[7],K&&(s[7]=K),S&A&&(s[8]=s[8]==null?l[8]:De(s[8],l[8])),s[9]==null&&(s[9]=l[9]),s[0]=l[0],s[1]=N,s}function $k(s){var l=[];if(s!=null)for(var g in ie(s))l.push(g);return l}function Gk(s){return fa.call(s)}function gm(s,l,g){return l=Ae(l===r?s.length-1:l,0),function(){for(var S=arguments,N=-1,D=Ae(S.length-l,0),H=st(D);++N<D;)H[N]=S[l+N];N=-1;for(var K=st(l+1);++N<l;)K[N]=S[N];return K[l]=g(H),er(s,this,K)}}function mm(s,l){return l.length<2?s:Yn(s,vr(l,0,-1))}function jk(s,l){for(var g=s.length,S=De(l.length,g),N=Ve(s);S--;){var D=l[S];s[S]=rn(D,g)?N[D]:r}return s}function Vf(s,l){if(!(l==="constructor"&&typeof s[l]=="function")&&l!="__proto__")return s[l]}var ym=bm(Gg),Ds=n3||function(s,l){return Me.setTimeout(s,l)},Wf=bm(ck);function _m(s,l,g){var S=l+"";return Wf(s,Mk(S,qk(Ik(S),g)))}function bm(s){var l=0,g=0;return function(){var S=a3(),N=M-(S-g);if(g=S,N>0){if(++l>=P)return arguments[0]}else l=0;return s.apply(r,arguments)}}function ka(s,l){var g=-1,S=s.length,N=S-1;for(l=l===r?S:l;++g<l;){var D=Rf(g,N),H=s[D];s[D]=s[g],s[g]=H}return s.length=l,s}var xm=Dk(function(s){var l=[];return s.charCodeAt(0)===46&&l.push(""),s.replace(NN,function(g,S,N,D){l.push(N?D.replace($N,"$1"):S||g)}),l});function qr(s){if(typeof s=="string"||ir(s))return s;var l=s+"";return l=="0"&&1/s==-z?"-0":l}function Qn(s){if(s!=null){try{return ua.call(s)}catch{}try{return s+""}catch{}}return""}function qk(s,l){return cr(X,function(g){var S="_."+g[0];l&g[1]&&!ia(s,S)&&s.push(S)}),s.sort()}function wm(s){if(s instanceof Gt)return s.clone();var l=new dr(s.__wrapped__,s.__chain__);return l.__actions__=Ve(s.__actions__),l.__index__=s.__index__,l.__values__=s.__values__,l}function zk(s,l,g){(g?qe(s,l,g):l===r)?l=1:l=Ae(kt(l),0);var S=s==null?0:s.length;if(!S||l<1)return[];for(var N=0,D=0,H=st(ga(S/l));N<S;)H[D++]=vr(s,N,N+=l);return H}function Hk(s){for(var l=-1,g=s==null?0:s.length,S=0,N=[];++l<g;){var D=s[l];D&&(N[S++]=D)}return N}function Vk(){var s=arguments.length;if(!s)return[];for(var l=st(s-1),g=arguments[0],S=s;S--;)l[S-1]=arguments[S];return gn(Mt(g)?Ve(g):[g],ke(l,1))}var Wk=Bt(function(s,l){return xe(s)?Ns(s,ke(l,1,xe,!0)):[]}),Xk=Bt(function(s,l){var g=gr(l);return xe(g)&&(g=r),xe(s)?Ns(s,ke(l,1,xe,!0),St(g,2)):[]}),Kk=Bt(function(s,l){var g=gr(l);return xe(g)&&(g=r),xe(s)?Ns(s,ke(l,1,xe,!0),r,g):[]});function Yk(s,l,g){var S=s==null?0:s.length;return S?(l=g||l===r?1:kt(l),vr(s,l<0?0:l,S)):[]}function Zk(s,l,g){var S=s==null?0:s.length;return S?(l=g||l===r?1:kt(l),l=S-l,vr(s,0,l<0?0:l)):[]}function Qk(s,l){return s&&s.length?Aa(s,St(l,3),!0,!0):[]}function Jk(s,l){return s&&s.length?Aa(s,St(l,3),!0):[]}function t5(s,l,g,S){var N=s==null?0:s.length;return N?(g&&typeof g!="number"&&qe(s,l,g)&&(g=0,S=N),V3(s,l,g,S)):[]}function Tm(s,l,g){var S=s==null?0:s.length;if(!S)return-1;var N=g==null?0:kt(g);return N<0&&(N=Ae(S+N,0)),sa(s,St(l,3),N)}function Em(s,l,g){var S=s==null?0:s.length;if(!S)return-1;var N=S-1;return g!==r&&(N=kt(g),N=g<0?Ae(S+N,0):De(N,S-1)),sa(s,St(l,3),N,!0)}function Sm(s){var l=s==null?0:s.length;return l?ke(s,1):[]}function e5(s){var l=s==null?0:s.length;return l?ke(s,z):[]}function r5(s,l){var g=s==null?0:s.length;return g?(l=l===r?1:kt(l),ke(s,l)):[]}function n5(s){for(var l=-1,g=s==null?0:s.length,S={};++l<g;){var N=s[l];S[N[0]]=N[1]}return S}function Am(s){return s&&s.length?s[0]:r}function i5(s,l,g){var S=s==null?0:s.length;if(!S)return-1;var N=g==null?0:kt(g);return N<0&&(N=Ae(S+N,0)),Li(s,l,N)}function s5(s){var l=s==null?0:s.length;return l?vr(s,0,-1):[]}var o5=Bt(function(s){var l=de(s,kf);return l.length&&l[0]===s[0]?Ef(l):[]}),a5=Bt(function(s){var l=gr(s),g=de(s,kf);return l===gr(g)?l=r:g.pop(),g.length&&g[0]===s[0]?Ef(g,St(l,2)):[]}),l5=Bt(function(s){var l=gr(s),g=de(s,kf);return l=typeof l=="function"?l:r,l&&g.pop(),g.length&&g[0]===s[0]?Ef(g,r,l):[]});function u5(s,l){return s==null?"":s3.call(s,l)}function gr(s){var l=s==null?0:s.length;return l?s[l-1]:r}function f5(s,l,g){var S=s==null?0:s.length;if(!S)return-1;var N=S;return g!==r&&(N=kt(g),N=N<0?Ae(S+N,0):De(N,S-1)),l===l?qM(s,l,N):sa(s,og,N,!0)}function c5(s,l){return s&&s.length?Bg(s,kt(l)):r}var h5=Bt(Om);function Om(s,l){return s&&s.length&&l&&l.length?Cf(s,l):s}function d5(s,l,g){return s&&s.length&&l&&l.length?Cf(s,l,St(g,2)):s}function p5(s,l,g){return s&&s.length&&l&&l.length?Cf(s,l,r,g):s}var v5=en(function(s,l){var g=s==null?0:s.length,S=bf(s,l);return $g(s,de(l,function(N){return rn(N,g)?+N:N}).sort(Yg)),S});function g5(s,l){var g=[];if(!(s&&s.length))return g;var S=-1,N=[],D=s.length;for(l=St(l,3);++S<D;){var H=s[S];l(H,S,s)&&(g.push(H),N.push(S))}return $g(s,N),g}function Xf(s){return s==null?s:u3.call(s)}function m5(s,l,g){var S=s==null?0:s.length;return S?(g&&typeof g!="number"&&qe(s,l,g)?(l=0,g=S):(l=l==null?0:kt(l),g=g===r?S:kt(g)),vr(s,l,g)):[]}function y5(s,l){return Sa(s,l)}function _5(s,l,g){return Pf(s,l,St(g,2))}function b5(s,l){var g=s==null?0:s.length;if(g){var S=Sa(s,l);if(S<g&&Pr(s[S],l))return S}return-1}function x5(s,l){return Sa(s,l,!0)}function w5(s,l,g){return Pf(s,l,St(g,2),!0)}function T5(s,l){var g=s==null?0:s.length;if(g){var S=Sa(s,l,!0)-1;if(Pr(s[S],l))return S}return-1}function E5(s){return s&&s.length?jg(s):[]}function S5(s,l){return s&&s.length?jg(s,St(l,2)):[]}function A5(s){var l=s==null?0:s.length;return l?vr(s,1,l):[]}function O5(s,l,g){return s&&s.length?(l=g||l===r?1:kt(l),vr(s,0,l<0?0:l)):[]}function C5(s,l,g){var S=s==null?0:s.length;return S?(l=g||l===r?1:kt(l),l=S-l,vr(s,l<0?0:l,S)):[]}function R5(s,l){return s&&s.length?Aa(s,St(l,3),!1,!0):[]}function I5(s,l){return s&&s.length?Aa(s,St(l,3)):[]}var P5=Bt(function(s){return bn(ke(s,1,xe,!0))}),N5=Bt(function(s){var l=gr(s);return xe(l)&&(l=r),bn(ke(s,1,xe,!0),St(l,2))}),M5=Bt(function(s){var l=gr(s);return l=typeof l=="function"?l:r,bn(ke(s,1,xe,!0),r,l)});function k5(s){return s&&s.length?bn(s):[]}function L5(s,l){return s&&s.length?bn(s,St(l,2)):[]}function F5(s,l){return l=typeof l=="function"?l:r,s&&s.length?bn(s,r,l):[]}function Kf(s){if(!(s&&s.length))return[];var l=0;return s=vn(s,function(g){if(xe(g))return l=Ae(g.length,l),!0}),hf(l,function(g){return de(s,uf(g))})}function Cm(s,l){if(!(s&&s.length))return[];var g=Kf(s);return l==null?g:de(g,function(S){return er(l,r,S)})}var B5=Bt(function(s,l){return xe(s)?Ns(s,l):[]}),D5=Bt(function(s){return Mf(vn(s,xe))}),U5=Bt(function(s){var l=gr(s);return xe(l)&&(l=r),Mf(vn(s,xe),St(l,2))}),$5=Bt(function(s){var l=gr(s);return l=typeof l=="function"?l:r,Mf(vn(s,xe),r,l)}),G5=Bt(Kf);function j5(s,l){return Vg(s||[],l||[],Ps)}function q5(s,l){return Vg(s||[],l||[],Ls)}var z5=Bt(function(s){var l=s.length,g=l>1?s[l-1]:r;return g=typeof g=="function"?(s.pop(),g):r,Cm(s,g)});function Rm(s){var l=B(s);return l.__chain__=!0,l}function H5(s,l){return l(s),s}function La(s,l){return l(s)}var V5=en(function(s){var l=s.length,g=l?s[0]:0,S=this.__wrapped__,N=function(D){return bf(D,s)};return l>1||this.__actions__.length||!(S instanceof Gt)||!rn(g)?this.thru(N):(S=S.slice(g,+g+(l?1:0)),S.__actions__.push({func:La,args:[N],thisArg:r}),new dr(S,this.__chain__).thru(function(D){return l&&!D.length&&D.push(r),D}))});function W5(){return Rm(this)}function X5(){return new dr(this.value(),this.__chain__)}function K5(){this.__values__===r&&(this.__values__=qm(this.value()));var s=this.__index__>=this.__values__.length,l=s?r:this.__values__[this.__index__++];return{done:s,value:l}}function Y5(){return this}function Z5(s){for(var l,g=this;g instanceof ba;){var S=wm(g);S.__index__=0,S.__values__=r,l?N.__wrapped__=S:l=S;var N=S;g=g.__wrapped__}return N.__wrapped__=s,l}function Q5(){var s=this.__wrapped__;if(s instanceof Gt){var l=s;return this.__actions__.length&&(l=new Gt(this)),l=l.reverse(),l.__actions__.push({func:La,args:[Xf],thisArg:r}),new dr(l,this.__chain__)}return this.thru(Xf)}function J5(){return Hg(this.__wrapped__,this.__actions__)}var tL=Oa(function(s,l,g){ee.call(s,g)?++s[g]:Jr(s,g,1)});function eL(s,l,g){var S=Mt(s)?ig:H3;return g&&qe(s,l,g)&&(l=r),S(s,St(l,3))}function rL(s,l){var g=Mt(s)?vn:Cg;return g(s,St(l,3))}var nL=rm(Tm),iL=rm(Em);function sL(s,l){return ke(Fa(s,l),1)}function oL(s,l){return ke(Fa(s,l),z)}function aL(s,l,g){return g=g===r?1:kt(g),ke(Fa(s,l),g)}function Im(s,l){var g=Mt(s)?cr:_n;return g(s,St(l,3))}function Pm(s,l){var g=Mt(s)?AM:Og;return g(s,St(l,3))}var lL=Oa(function(s,l,g){ee.call(s,g)?s[g].push(l):Jr(s,g,[l])});function uL(s,l,g,S){s=We(s)?s:Wi(s),g=g&&!S?kt(g):0;var N=s.length;return g<0&&(g=Ae(N+g,0)),Ga(s)?g<=N&&s.indexOf(l,g)>-1:!!N&&Li(s,l,g)>-1}var fL=Bt(function(s,l,g){var S=-1,N=typeof l=="function",D=We(s)?st(s.length):[];return _n(s,function(H){D[++S]=N?er(l,H,g):Ms(H,l,g)}),D}),cL=Oa(function(s,l,g){Jr(s,g,l)});function Fa(s,l){var g=Mt(s)?de:kg;return g(s,St(l,3))}function hL(s,l,g,S){return s==null?[]:(Mt(l)||(l=l==null?[]:[l]),g=S?r:g,Mt(g)||(g=g==null?[]:[g]),Dg(s,l,g))}var dL=Oa(function(s,l,g){s[g?0:1].push(l)},function(){return[[],[]]});function pL(s,l,g){var S=Mt(s)?af:lg,N=arguments.length<3;return S(s,St(l,4),g,N,_n)}function vL(s,l,g){var S=Mt(s)?OM:lg,N=arguments.length<3;return S(s,St(l,4),g,N,Og)}function gL(s,l){var g=Mt(s)?vn:Cg;return g(s,Ua(St(l,3)))}function mL(s){var l=Mt(s)?Tg:uk;return l(s)}function yL(s,l,g){(g?qe(s,l,g):l===r)?l=1:l=kt(l);var S=Mt(s)?$3:fk;return S(s,l)}function _L(s){var l=Mt(s)?G3:hk;return l(s)}function bL(s){if(s==null)return 0;if(We(s))return Ga(s)?Bi(s):s.length;var l=Ue(s);return l==xt||l==vt?s.size:Af(s).length}function xL(s,l,g){var S=Mt(s)?lf:dk;return g&&qe(s,l,g)&&(l=r),S(s,St(l,3))}var wL=Bt(function(s,l){if(s==null)return[];var g=l.length;return g>1&&qe(s,l[0],l[1])?l=[]:g>2&&qe(l[0],l[1],l[2])&&(l=[l[0]]),Dg(s,ke(l,1),[])}),Ba=r3||function(){return Me.Date.now()};function TL(s,l){if(typeof l!="function")throw new hr(a);return s=kt(s),function(){if(--s<1)return l.apply(this,arguments)}}function Nm(s,l,g){return l=g?r:l,l=s&&l==null?s.length:l,tn(s,A,r,r,r,r,l)}function Mm(s,l){var g;if(typeof l!="function")throw new hr(a);return s=kt(s),function(){return--s>0&&(g=l.apply(this,arguments)),s<=1&&(l=r),g}}var Yf=Bt(function(s,l,g){var S=_;if(g.length){var N=mn(g,Hi(Yf));S|=E}return tn(s,S,l,g,N)}),km=Bt(function(s,l,g){var S=_|m;if(g.length){var N=mn(g,Hi(km));S|=E}return tn(l,S,s,g,N)});function Lm(s,l,g){l=g?r:l;var S=tn(s,T,r,r,r,r,r,l);return S.placeholder=Lm.placeholder,S}function Fm(s,l,g){l=g?r:l;var S=tn(s,x,r,r,r,r,r,l);return S.placeholder=Fm.placeholder,S}function Bm(s,l,g){var S,N,D,H,K,tt,ut=0,ft=!1,ht=!1,gt=!0;if(typeof s!="function")throw new hr(a);l=mr(l)||0,me(g)&&(ft=!!g.leading,ht="maxWait"in g,D=ht?Ae(mr(g.maxWait)||0,l):D,gt="trailing"in g?!!g.trailing:gt);function wt(we){var Nr=S,on=N;return S=N=r,ut=we,H=s.apply(on,Nr),H}function Ot(we){return ut=we,K=Ds(Ut,l),ft?wt(we):H}function Ft(we){var Nr=we-tt,on=we-ut,ry=l-Nr;return ht?De(ry,D-on):ry}function Ct(we){var Nr=we-tt,on=we-ut;return tt===r||Nr>=l||Nr<0||ht&&on>=D}function Ut(){var we=Ba();if(Ct(we))return qt(we);K=Ds(Ut,Ft(we))}function qt(we){return K=r,gt&&S?wt(we):(S=N=r,H)}function sr(){K!==r&&Wg(K),ut=0,S=tt=N=K=r}function ze(){return K===r?H:qt(Ba())}function or(){var we=Ba(),Nr=Ct(we);if(S=arguments,N=this,tt=we,Nr){if(K===r)return Ot(tt);if(ht)return Wg(K),K=Ds(Ut,l),wt(tt)}return K===r&&(K=Ds(Ut,l)),H}return or.cancel=sr,or.flush=ze,or}var EL=Bt(function(s,l){return Ag(s,1,l)}),SL=Bt(function(s,l,g){return Ag(s,mr(l)||0,g)});function AL(s){return tn(s,L)}function Da(s,l){if(typeof s!="function"||l!=null&&typeof l!="function")throw new hr(a);var g=function(){var S=arguments,N=l?l.apply(this,S):S[0],D=g.cache;if(D.has(N))return D.get(N);var H=s.apply(this,S);return g.cache=D.set(N,H)||D,H};return g.cache=new(Da.Cache||Qr),g}Da.Cache=Qr;function Ua(s){if(typeof s!="function")throw new hr(a);return function(){var l=arguments;switch(l.length){case 0:return!s.call(this);case 1:return!s.call(this,l[0]);case 2:return!s.call(this,l[0],l[1]);case 3:return!s.call(this,l[0],l[1],l[2])}return!s.apply(this,l)}}function OL(s){return Mm(2,s)}var CL=pk(function(s,l){l=l.length==1&&Mt(l[0])?de(l[0],rr(St())):de(ke(l,1),rr(St()));var g=l.length;return Bt(function(S){for(var N=-1,D=De(S.length,g);++N<D;)S[N]=l[N].call(this,S[N]);return er(s,this,S)})}),Zf=Bt(function(s,l){var g=mn(l,Hi(Zf));return tn(s,E,r,l,g)}),Dm=Bt(function(s,l){var g=mn(l,Hi(Dm));return tn(s,I,r,l,g)}),RL=en(function(s,l){return tn(s,O,r,r,r,l)});function IL(s,l){if(typeof s!="function")throw new hr(a);return l=l===r?l:kt(l),Bt(s,l)}function PL(s,l){if(typeof s!="function")throw new hr(a);return l=l==null?0:Ae(kt(l),0),Bt(function(g){var S=g[l],N=wn(g,0,l);return S&&gn(N,S),er(s,this,N)})}function NL(s,l,g){var S=!0,N=!0;if(typeof s!="function")throw new hr(a);return me(g)&&(S="leading"in g?!!g.leading:S,N="trailing"in g?!!g.trailing:N),Bm(s,l,{leading:S,maxWait:l,trailing:N})}function ML(s){return Nm(s,1)}function kL(s,l){return Zf(Lf(l),s)}function LL(){if(!arguments.length)return[];var s=arguments[0];return Mt(s)?s:[s]}function FL(s){return pr(s,v)}function BL(s,l){return l=typeof l=="function"?l:r,pr(s,v,l)}function DL(s){return pr(s,p|v)}function UL(s,l){return l=typeof l=="function"?l:r,pr(s,p|v,l)}function $L(s,l){return l==null||Sg(s,l,Pe(l))}function Pr(s,l){return s===l||s!==s&&l!==l}var GL=Pa(Tf),jL=Pa(function(s,l){return s>=l}),Jn=Pg(function(){return arguments}())?Pg:function(s){return ye(s)&&ee.call(s,"callee")&&!mg.call(s,"callee")},Mt=st.isArray,qL=Qv?rr(Qv):Z3;function We(s){return s!=null&&$a(s.length)&&!nn(s)}function xe(s){return ye(s)&&We(s)}function zL(s){return s===!0||s===!1||ye(s)&&je(s)==et}var Tn=i3||lc,HL=Jv?rr(Jv):Q3;function VL(s){return ye(s)&&s.nodeType===1&&!Us(s)}function WL(s){if(s==null)return!0;if(We(s)&&(Mt(s)||typeof s=="string"||typeof s.splice=="function"||Tn(s)||Vi(s)||Jn(s)))return!s.length;var l=Ue(s);if(l==xt||l==vt)return!s.size;if(Bs(s))return!Af(s).length;for(var g in s)if(ee.call(s,g))return!1;return!0}function XL(s,l){return ks(s,l)}function KL(s,l,g){g=typeof g=="function"?g:r;var S=g?g(s,l):r;return S===r?ks(s,l,r,g):!!S}function Qf(s){if(!ye(s))return!1;var l=je(s);return l==lt||l==it||typeof s.message=="string"&&typeof s.name=="string"&&!Us(s)}function YL(s){return typeof s=="number"&&_g(s)}function nn(s){if(!me(s))return!1;var l=je(s);return l==pt||l==yt||l==W||l==at}function Um(s){return typeof s=="number"&&s==kt(s)}function $a(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=nt}function me(s){var l=typeof s;return s!=null&&(l=="object"||l=="function")}function ye(s){return s!=null&&typeof s=="object"}var $m=tg?rr(tg):tk;function ZL(s,l){return s===l||Sf(s,l,jf(l))}function QL(s,l,g){return g=typeof g=="function"?g:r,Sf(s,l,jf(l),g)}function JL(s){return Gm(s)&&s!=+s}function tF(s){if(Bk(s))throw new It(o);return Ng(s)}function eF(s){return s===null}function rF(s){return s==null}function Gm(s){return typeof s=="number"||ye(s)&&je(s)==At}function Us(s){if(!ye(s)||je(s)!=Ht)return!1;var l=da(s);if(l===null)return!0;var g=ee.call(l,"constructor")&&l.constructor;return typeof g=="function"&&g instanceof g&&ua.call(g)==QM}var Jf=eg?rr(eg):ek;function nF(s){return Um(s)&&s>=-nt&&s<=nt}var jm=rg?rr(rg):rk;function Ga(s){return typeof s=="string"||!Mt(s)&&ye(s)&&je(s)==ct}function ir(s){return typeof s=="symbol"||ye(s)&&je(s)==Pt}var Vi=ng?rr(ng):nk;function iF(s){return s===r}function sF(s){return ye(s)&&Ue(s)==Nt}function oF(s){return ye(s)&&je(s)==He}var aF=Pa(Of),lF=Pa(function(s,l){return s<=l});function qm(s){if(!s)return[];if(We(s))return Ga(s)?Rr(s):Ve(s);if(As&&s[As])return $M(s[As]());var l=Ue(s),g=l==xt?pf:l==vt?oa:Wi;return g(s)}function sn(s){if(!s)return s===0?s:0;if(s=mr(s),s===z||s===-z){var l=s<0?-1:1;return l*V}return s===s?s:0}function kt(s){var l=sn(s),g=l%1;return l===l?g?l-g:l:0}function zm(s){return s?Kn(kt(s),0,k):0}function mr(s){if(typeof s=="number")return s;if(ir(s))return U;if(me(s)){var l=typeof s.valueOf=="function"?s.valueOf():s;s=me(l)?l+"":l}if(typeof s!="string")return s===0?s:+s;s=ug(s);var g=qN.test(s);return g||HN.test(s)?TM(s.slice(2),g?2:8):jN.test(s)?U:+s}function Hm(s){return jr(s,Xe(s))}function uF(s){return s?Kn(kt(s),-nt,nt):s===0?s:0}function Jt(s){return s==null?"":nr(s)}var fF=qi(function(s,l){if(Bs(l)||We(l)){jr(l,Pe(l),s);return}for(var g in l)ee.call(l,g)&&Ps(s,g,l[g])}),Vm=qi(function(s,l){jr(l,Xe(l),s)}),ja=qi(function(s,l,g,S){jr(l,Xe(l),s,S)}),cF=qi(function(s,l,g,S){jr(l,Pe(l),s,S)}),hF=en(bf);function dF(s,l){var g=ji(s);return l==null?g:Eg(g,l)}var pF=Bt(function(s,l){s=ie(s);var g=-1,S=l.length,N=S>2?l[2]:r;for(N&&qe(l[0],l[1],N)&&(S=1);++g<S;)for(var D=l[g],H=Xe(D),K=-1,tt=H.length;++K<tt;){var ut=H[K],ft=s[ut];(ft===r||Pr(ft,Ui[ut])&&!ee.call(s,ut))&&(s[ut]=D[ut])}return s}),vF=Bt(function(s){return s.push(r,um),er(Wm,r,s)});function gF(s,l){return sg(s,St(l,3),Gr)}function mF(s,l){return sg(s,St(l,3),wf)}function yF(s,l){return s==null?s:xf(s,St(l,3),Xe)}function _F(s,l){return s==null?s:Rg(s,St(l,3),Xe)}function bF(s,l){return s&&Gr(s,St(l,3))}function xF(s,l){return s&&wf(s,St(l,3))}function wF(s){return s==null?[]:Ta(s,Pe(s))}function TF(s){return s==null?[]:Ta(s,Xe(s))}function tc(s,l,g){var S=s==null?r:Yn(s,l);return S===r?g:S}function EF(s,l){return s!=null&&hm(s,l,W3)}function ec(s,l){return s!=null&&hm(s,l,X3)}var SF=im(function(s,l,g){l!=null&&typeof l.toString!="function"&&(l=fa.call(l)),s[l]=g},nc(Ke)),AF=im(function(s,l,g){l!=null&&typeof l.toString!="function"&&(l=fa.call(l)),ee.call(s,l)?s[l].push(g):s[l]=[g]},St),OF=Bt(Ms);function Pe(s){return We(s)?wg(s):Af(s)}function Xe(s){return We(s)?wg(s,!0):ik(s)}function CF(s,l){var g={};return l=St(l,3),Gr(s,function(S,N,D){Jr(g,l(S,N,D),S)}),g}function RF(s,l){var g={};return l=St(l,3),Gr(s,function(S,N,D){Jr(g,N,l(S,N,D))}),g}var IF=qi(function(s,l,g){Ea(s,l,g)}),Wm=qi(function(s,l,g,S){Ea(s,l,g,S)}),PF=en(function(s,l){var g={};if(s==null)return g;var S=!1;l=de(l,function(D){return D=xn(D,s),S||(S=D.length>1),D}),jr(s,$f(s),g),S&&(g=pr(g,p|c|v,Sk));for(var N=l.length;N--;)Nf(g,l[N]);return g});function NF(s,l){return Xm(s,Ua(St(l)))}var MF=en(function(s,l){return s==null?{}:ok(s,l)});function Xm(s,l){if(s==null)return{};var g=de($f(s),function(S){return[S]});return l=St(l),Ug(s,g,function(S,N){return l(S,N[0])})}function kF(s,l,g){l=xn(l,s);var S=-1,N=l.length;for(N||(N=1,s=r);++S<N;){var D=s==null?r:s[qr(l[S])];D===r&&(S=N,D=g),s=nn(D)?D.call(s):D}return s}function LF(s,l,g){return s==null?s:Ls(s,l,g)}function FF(s,l,g,S){return S=typeof S=="function"?S:r,s==null?s:Ls(s,l,g,S)}var Km=am(Pe),Ym=am(Xe);function BF(s,l,g){var S=Mt(s),N=S||Tn(s)||Vi(s);if(l=St(l,4),g==null){var D=s&&s.constructor;N?g=S?new D:[]:me(s)?g=nn(D)?ji(da(s)):{}:g={}}return(N?cr:Gr)(s,function(H,K,tt){return l(g,H,K,tt)}),g}function DF(s,l){return s==null?!0:Nf(s,l)}function UF(s,l,g){return s==null?s:zg(s,l,Lf(g))}function $F(s,l,g,S){return S=typeof S=="function"?S:r,s==null?s:zg(s,l,Lf(g),S)}function Wi(s){return s==null?[]:df(s,Pe(s))}function GF(s){return s==null?[]:df(s,Xe(s))}function jF(s,l,g){return g===r&&(g=l,l=r),g!==r&&(g=mr(g),g=g===g?g:0),l!==r&&(l=mr(l),l=l===l?l:0),Kn(mr(s),l,g)}function qF(s,l,g){return l=sn(l),g===r?(g=l,l=0):g=sn(g),s=mr(s),K3(s,l,g)}function zF(s,l,g){if(g&&typeof g!="boolean"&&qe(s,l,g)&&(l=g=r),g===r&&(typeof l=="boolean"?(g=l,l=r):typeof s=="boolean"&&(g=s,s=r)),s===r&&l===r?(s=0,l=1):(s=sn(s),l===r?(l=s,s=0):l=sn(l)),s>l){var S=s;s=l,l=S}if(g||s%1||l%1){var N=bg();return De(s+N*(l-s+wM("1e-"+((N+"").length-1))),l)}return Rf(s,l)}var HF=zi(function(s,l,g){return l=l.toLowerCase(),s+(g?Zm(l):l)});function Zm(s){return rc(Jt(s).toLowerCase())}function Qm(s){return s=Jt(s),s&&s.replace(WN,LM).replace(hM,"")}function VF(s,l,g){s=Jt(s),l=nr(l);var S=s.length;g=g===r?S:Kn(kt(g),0,S);var N=g;return g-=l.length,g>=0&&s.slice(g,N)==l}function WF(s){return s=Jt(s),s&&ON.test(s)?s.replace(Rv,FM):s}function XF(s){return s=Jt(s),s&&MN.test(s)?s.replace(Yu,"\\$&"):s}var KF=zi(function(s,l,g){return s+(g?"-":"")+l.toLowerCase()}),YF=zi(function(s,l,g){return s+(g?" ":"")+l.toLowerCase()}),ZF=em("toLowerCase");function QF(s,l,g){s=Jt(s),l=kt(l);var S=l?Bi(s):0;if(!l||S>=l)return s;var N=(l-S)/2;return Ia(ma(N),g)+s+Ia(ga(N),g)}function JF(s,l,g){s=Jt(s),l=kt(l);var S=l?Bi(s):0;return l&&S<l?s+Ia(l-S,g):s}function t4(s,l,g){s=Jt(s),l=kt(l);var S=l?Bi(s):0;return l&&S<l?Ia(l-S,g)+s:s}function e4(s,l,g){return g||l==null?l=0:l&&(l=+l),l3(Jt(s).replace(Zu,""),l||0)}function r4(s,l,g){return(g?qe(s,l,g):l===r)?l=1:l=kt(l),If(Jt(s),l)}function n4(){var s=arguments,l=Jt(s[0]);return s.length<3?l:l.replace(s[1],s[2])}var i4=zi(function(s,l,g){return s+(g?"_":"")+l.toLowerCase()});function s4(s,l,g){return g&&typeof g!="number"&&qe(s,l,g)&&(l=g=r),g=g===r?k:g>>>0,g?(s=Jt(s),s&&(typeof l=="string"||l!=null&&!Jf(l))&&(l=nr(l),!l&&Fi(s))?wn(Rr(s),0,g):s.split(l,g)):[]}var o4=zi(function(s,l,g){return s+(g?" ":"")+rc(l)});function a4(s,l,g){return s=Jt(s),g=g==null?0:Kn(kt(g),0,s.length),l=nr(l),s.slice(g,g+l.length)==l}function l4(s,l,g){var S=B.templateSettings;g&&qe(s,l,g)&&(l=r),s=Jt(s),l=ja({},l,S,lm);var N=ja({},l.imports,S.imports,lm),D=Pe(N),H=df(N,D),K,tt,ut=0,ft=l.interpolate||ea,ht="__p += '",gt=vf((l.escape||ea).source+"|"+ft.source+"|"+(ft===Iv?GN:ea).source+"|"+(l.evaluate||ea).source+"|$","g"),wt="//# sourceURL="+(ee.call(l,"sourceURL")?(l.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++mM+"]")+`
1944
- `;s.replace(gt,function(Ct,Ut,qt,sr,ze,or){return qt||(qt=sr),ht+=s.slice(ut,or).replace(XN,BM),Ut&&(K=!0,ht+=`' +
1945
- __e(`+Ut+`) +
1943
+ `)}function Lk(s){return kt(s)||Jn(s)||!!(yg&&s&&s[yg])}function rn(s,l){var g=typeof s;return l=l??nt,!!l&&(g=="number"||g!="symbol"&&WN.test(s))&&s>-1&&s%1==0&&s<l}function qe(s,l,g){if(!me(g))return!1;var S=typeof l;return(S=="number"?We(g)&&rn(l,g.length):S=="string"&&l in g)?Pr(g[l],s):!1}function zf(s,l){if(kt(s))return!1;var g=typeof s;return g=="number"||g=="symbol"||g=="boolean"||s==null||ir(s)?!0:NN.test(s)||!PN.test(s)||l!=null&&s in se(l)}function Fk(s){var l=typeof s;return l=="string"||l=="number"||l=="symbol"||l=="boolean"?s!=="__proto__":s===null}function Hf(s){var l=Ma(s),g=B[l];if(typeof g!="function"||!(l in jt.prototype))return!1;if(s===g)return!0;var S=Gf(g);return!!S&&s===S[0]}function Bk(s){return!!pg&&pg in s}var Dk=ua?nn:lc;function Ds(s){var l=s&&s.constructor,g=typeof l=="function"&&l.prototype||$i;return s===g}function pm(s){return s===s&&!me(s)}function vm(s,l){return function(g){return g==null?!1:g[s]===l&&(l!==r||s in se(g))}}function Uk(s){var l=Ua(s,function(S){return g.size===h&&g.clear(),S}),g=l.cache;return l}function $k(s,l){var g=s[1],S=l[1],N=g|S,U=N<(b|m|O),H=S==O&&g==T||S==O&&g==A&&s[7].length<=l[8]||S==(O|A)&&l[7].length<=l[8]&&g==T;if(!(U||H))return s;S&b&&(s[2]=l[2],N|=g&b?0:w);var X=l[3];if(X){var tt=s[3];s[3]=tt?Zg(tt,X,l[4]):X,s[4]=tt?mn(s[3],d):l[4]}return X=l[5],X&&(tt=s[5],s[5]=tt?Qg(tt,X,l[6]):X,s[6]=tt?mn(s[5],d):l[6]),X=l[7],X&&(s[7]=X),S&O&&(s[8]=s[8]==null?l[8]:De(s[8],l[8])),s[9]==null&&(s[9]=l[9]),s[0]=l[0],s[1]=N,s}function Gk(s){var l=[];if(s!=null)for(var g in se(s))l.push(g);return l}function jk(s){return ca.call(s)}function gm(s,l,g){return l=Ae(l===r?s.length-1:l,0),function(){for(var S=arguments,N=-1,U=Ae(S.length-l,0),H=st(U);++N<U;)H[N]=S[l+N];N=-1;for(var X=st(l+1);++N<l;)X[N]=S[N];return X[l]=g(H),er(s,this,X)}}function mm(s,l){return l.length<2?s:Yn(s,vr(l,0,-1))}function qk(s,l){for(var g=s.length,S=De(l.length,g),N=Ve(s);S--;){var U=l[S];s[S]=rn(U,g)?N[U]:r}return s}function Vf(s,l){if(!(l==="constructor"&&typeof s[l]=="function")&&l!="__proto__")return s[l]}var ym=bm(Gg),Us=i3||function(s,l){return Me.setTimeout(s,l)},Wf=bm(hk);function _m(s,l,g){var S=l+"";return Wf(s,kk(S,zk(Pk(S),g)))}function bm(s){var l=0,g=0;return function(){var S=l3(),N=M-(S-g);if(g=S,N>0){if(++l>=P)return arguments[0]}else l=0;return s.apply(r,arguments)}}function La(s,l){var g=-1,S=s.length,N=S-1;for(l=l===r?S:l;++g<l;){var U=Rf(g,N),H=s[U];s[U]=s[g],s[g]=H}return s.length=l,s}var xm=Uk(function(s){var l=[];return s.charCodeAt(0)===46&&l.push(""),s.replace(MN,function(g,S,N,U){l.push(N?U.replace(GN,"$1"):S||g)}),l});function qr(s){if(typeof s=="string"||ir(s))return s;var l=s+"";return l=="0"&&1/s==-z?"-0":l}function Qn(s){if(s!=null){try{return fa.call(s)}catch{}try{return s+""}catch{}}return""}function zk(s,l){return cr(Q,function(g){var S="_."+g[0];l&g[1]&&!sa(s,S)&&s.push(S)}),s.sort()}function wm(s){if(s instanceof jt)return s.clone();var l=new dr(s.__wrapped__,s.__chain__);return l.__actions__=Ve(s.__actions__),l.__index__=s.__index__,l.__values__=s.__values__,l}function Hk(s,l,g){(g?qe(s,l,g):l===r)?l=1:l=Ae(Lt(l),0);var S=s==null?0:s.length;if(!S||l<1)return[];for(var N=0,U=0,H=st(ma(S/l));N<S;)H[U++]=vr(s,N,N+=l);return H}function Vk(s){for(var l=-1,g=s==null?0:s.length,S=0,N=[];++l<g;){var U=s[l];U&&(N[S++]=U)}return N}function Wk(){var s=arguments.length;if(!s)return[];for(var l=st(s-1),g=arguments[0],S=s;S--;)l[S-1]=arguments[S];return gn(kt(g)?Ve(g):[g],ke(l,1))}var Xk=Bt(function(s,l){return xe(s)?Ms(s,ke(l,1,xe,!0)):[]}),Kk=Bt(function(s,l){var g=gr(l);return xe(g)&&(g=r),xe(s)?Ms(s,ke(l,1,xe,!0),Ot(g,2)):[]}),Yk=Bt(function(s,l){var g=gr(l);return xe(g)&&(g=r),xe(s)?Ms(s,ke(l,1,xe,!0),r,g):[]});function Zk(s,l,g){var S=s==null?0:s.length;return S?(l=g||l===r?1:Lt(l),vr(s,l<0?0:l,S)):[]}function Qk(s,l,g){var S=s==null?0:s.length;return S?(l=g||l===r?1:Lt(l),l=S-l,vr(s,0,l<0?0:l)):[]}function Jk(s,l){return s&&s.length?Oa(s,Ot(l,3),!0,!0):[]}function t5(s,l){return s&&s.length?Oa(s,Ot(l,3),!0):[]}function e5(s,l,g,S){var N=s==null?0:s.length;return N?(g&&typeof g!="number"&&qe(s,l,g)&&(g=0,S=N),W3(s,l,g,S)):[]}function Tm(s,l,g){var S=s==null?0:s.length;if(!S)return-1;var N=g==null?0:Lt(g);return N<0&&(N=Ae(S+N,0)),oa(s,Ot(l,3),N)}function Em(s,l,g){var S=s==null?0:s.length;if(!S)return-1;var N=S-1;return g!==r&&(N=Lt(g),N=g<0?Ae(S+N,0):De(N,S-1)),oa(s,Ot(l,3),N,!0)}function Sm(s){var l=s==null?0:s.length;return l?ke(s,1):[]}function r5(s){var l=s==null?0:s.length;return l?ke(s,z):[]}function n5(s,l){var g=s==null?0:s.length;return g?(l=l===r?1:Lt(l),ke(s,l)):[]}function i5(s){for(var l=-1,g=s==null?0:s.length,S={};++l<g;){var N=s[l];S[N[0]]=N[1]}return S}function Am(s){return s&&s.length?s[0]:r}function s5(s,l,g){var S=s==null?0:s.length;if(!S)return-1;var N=g==null?0:Lt(g);return N<0&&(N=Ae(S+N,0)),Fi(s,l,N)}function o5(s){var l=s==null?0:s.length;return l?vr(s,0,-1):[]}var a5=Bt(function(s){var l=de(s,kf);return l.length&&l[0]===s[0]?Ef(l):[]}),l5=Bt(function(s){var l=gr(s),g=de(s,kf);return l===gr(g)?l=r:g.pop(),g.length&&g[0]===s[0]?Ef(g,Ot(l,2)):[]}),u5=Bt(function(s){var l=gr(s),g=de(s,kf);return l=typeof l=="function"?l:r,l&&g.pop(),g.length&&g[0]===s[0]?Ef(g,r,l):[]});function f5(s,l){return s==null?"":o3.call(s,l)}function gr(s){var l=s==null?0:s.length;return l?s[l-1]:r}function c5(s,l,g){var S=s==null?0:s.length;if(!S)return-1;var N=S;return g!==r&&(N=Lt(g),N=N<0?Ae(S+N,0):De(N,S-1)),l===l?zM(s,l,N):oa(s,og,N,!0)}function h5(s,l){return s&&s.length?Bg(s,Lt(l)):r}var d5=Bt(Om);function Om(s,l){return s&&s.length&&l&&l.length?Cf(s,l):s}function p5(s,l,g){return s&&s.length&&l&&l.length?Cf(s,l,Ot(g,2)):s}function v5(s,l,g){return s&&s.length&&l&&l.length?Cf(s,l,r,g):s}var g5=en(function(s,l){var g=s==null?0:s.length,S=bf(s,l);return $g(s,de(l,function(N){return rn(N,g)?+N:N}).sort(Yg)),S});function m5(s,l){var g=[];if(!(s&&s.length))return g;var S=-1,N=[],U=s.length;for(l=Ot(l,3);++S<U;){var H=s[S];l(H,S,s)&&(g.push(H),N.push(S))}return $g(s,N),g}function Xf(s){return s==null?s:f3.call(s)}function y5(s,l,g){var S=s==null?0:s.length;return S?(g&&typeof g!="number"&&qe(s,l,g)?(l=0,g=S):(l=l==null?0:Lt(l),g=g===r?S:Lt(g)),vr(s,l,g)):[]}function _5(s,l){return Aa(s,l)}function b5(s,l,g){return Pf(s,l,Ot(g,2))}function x5(s,l){var g=s==null?0:s.length;if(g){var S=Aa(s,l);if(S<g&&Pr(s[S],l))return S}return-1}function w5(s,l){return Aa(s,l,!0)}function T5(s,l,g){return Pf(s,l,Ot(g,2),!0)}function E5(s,l){var g=s==null?0:s.length;if(g){var S=Aa(s,l,!0)-1;if(Pr(s[S],l))return S}return-1}function S5(s){return s&&s.length?jg(s):[]}function A5(s,l){return s&&s.length?jg(s,Ot(l,2)):[]}function O5(s){var l=s==null?0:s.length;return l?vr(s,1,l):[]}function C5(s,l,g){return s&&s.length?(l=g||l===r?1:Lt(l),vr(s,0,l<0?0:l)):[]}function R5(s,l,g){var S=s==null?0:s.length;return S?(l=g||l===r?1:Lt(l),l=S-l,vr(s,l<0?0:l,S)):[]}function I5(s,l){return s&&s.length?Oa(s,Ot(l,3),!1,!0):[]}function P5(s,l){return s&&s.length?Oa(s,Ot(l,3)):[]}var N5=Bt(function(s){return bn(ke(s,1,xe,!0))}),M5=Bt(function(s){var l=gr(s);return xe(l)&&(l=r),bn(ke(s,1,xe,!0),Ot(l,2))}),k5=Bt(function(s){var l=gr(s);return l=typeof l=="function"?l:r,bn(ke(s,1,xe,!0),r,l)});function L5(s){return s&&s.length?bn(s):[]}function F5(s,l){return s&&s.length?bn(s,Ot(l,2)):[]}function B5(s,l){return l=typeof l=="function"?l:r,s&&s.length?bn(s,r,l):[]}function Kf(s){if(!(s&&s.length))return[];var l=0;return s=vn(s,function(g){if(xe(g))return l=Ae(g.length,l),!0}),hf(l,function(g){return de(s,uf(g))})}function Cm(s,l){if(!(s&&s.length))return[];var g=Kf(s);return l==null?g:de(g,function(S){return er(l,r,S)})}var D5=Bt(function(s,l){return xe(s)?Ms(s,l):[]}),U5=Bt(function(s){return Mf(vn(s,xe))}),$5=Bt(function(s){var l=gr(s);return xe(l)&&(l=r),Mf(vn(s,xe),Ot(l,2))}),G5=Bt(function(s){var l=gr(s);return l=typeof l=="function"?l:r,Mf(vn(s,xe),r,l)}),j5=Bt(Kf);function q5(s,l){return Vg(s||[],l||[],Ns)}function z5(s,l){return Vg(s||[],l||[],Fs)}var H5=Bt(function(s){var l=s.length,g=l>1?s[l-1]:r;return g=typeof g=="function"?(s.pop(),g):r,Cm(s,g)});function Rm(s){var l=B(s);return l.__chain__=!0,l}function V5(s,l){return l(s),s}function Fa(s,l){return l(s)}var W5=en(function(s){var l=s.length,g=l?s[0]:0,S=this.__wrapped__,N=function(U){return bf(U,s)};return l>1||this.__actions__.length||!(S instanceof jt)||!rn(g)?this.thru(N):(S=S.slice(g,+g+(l?1:0)),S.__actions__.push({func:Fa,args:[N],thisArg:r}),new dr(S,this.__chain__).thru(function(U){return l&&!U.length&&U.push(r),U}))});function X5(){return Rm(this)}function K5(){return new dr(this.value(),this.__chain__)}function Y5(){this.__values__===r&&(this.__values__=qm(this.value()));var s=this.__index__>=this.__values__.length,l=s?r:this.__values__[this.__index__++];return{done:s,value:l}}function Z5(){return this}function Q5(s){for(var l,g=this;g instanceof xa;){var S=wm(g);S.__index__=0,S.__values__=r,l?N.__wrapped__=S:l=S;var N=S;g=g.__wrapped__}return N.__wrapped__=s,l}function J5(){var s=this.__wrapped__;if(s instanceof jt){var l=s;return this.__actions__.length&&(l=new jt(this)),l=l.reverse(),l.__actions__.push({func:Fa,args:[Xf],thisArg:r}),new dr(l,this.__chain__)}return this.thru(Xf)}function tL(){return Hg(this.__wrapped__,this.__actions__)}var eL=Ca(function(s,l,g){ee.call(s,g)?++s[g]:Jr(s,g,1)});function rL(s,l,g){var S=kt(s)?ig:V3;return g&&qe(s,l,g)&&(l=r),S(s,Ot(l,3))}function nL(s,l){var g=kt(s)?vn:Cg;return g(s,Ot(l,3))}var iL=rm(Tm),sL=rm(Em);function oL(s,l){return ke(Ba(s,l),1)}function aL(s,l){return ke(Ba(s,l),z)}function lL(s,l,g){return g=g===r?1:Lt(g),ke(Ba(s,l),g)}function Im(s,l){var g=kt(s)?cr:_n;return g(s,Ot(l,3))}function Pm(s,l){var g=kt(s)?OM:Og;return g(s,Ot(l,3))}var uL=Ca(function(s,l,g){ee.call(s,g)?s[g].push(l):Jr(s,g,[l])});function fL(s,l,g,S){s=We(s)?s:Xi(s),g=g&&!S?Lt(g):0;var N=s.length;return g<0&&(g=Ae(N+g,0)),ja(s)?g<=N&&s.indexOf(l,g)>-1:!!N&&Fi(s,l,g)>-1}var cL=Bt(function(s,l,g){var S=-1,N=typeof l=="function",U=We(s)?st(s.length):[];return _n(s,function(H){U[++S]=N?er(l,H,g):ks(H,l,g)}),U}),hL=Ca(function(s,l,g){Jr(s,g,l)});function Ba(s,l){var g=kt(s)?de:kg;return g(s,Ot(l,3))}function dL(s,l,g,S){return s==null?[]:(kt(l)||(l=l==null?[]:[l]),g=S?r:g,kt(g)||(g=g==null?[]:[g]),Dg(s,l,g))}var pL=Ca(function(s,l,g){s[g?0:1].push(l)},function(){return[[],[]]});function vL(s,l,g){var S=kt(s)?af:lg,N=arguments.length<3;return S(s,Ot(l,4),g,N,_n)}function gL(s,l,g){var S=kt(s)?CM:lg,N=arguments.length<3;return S(s,Ot(l,4),g,N,Og)}function mL(s,l){var g=kt(s)?vn:Cg;return g(s,$a(Ot(l,3)))}function yL(s){var l=kt(s)?Tg:fk;return l(s)}function _L(s,l,g){(g?qe(s,l,g):l===r)?l=1:l=Lt(l);var S=kt(s)?G3:ck;return S(s,l)}function bL(s){var l=kt(s)?j3:dk;return l(s)}function xL(s){if(s==null)return 0;if(We(s))return ja(s)?Di(s):s.length;var l=Ue(s);return l==_t||l==gt?s.size:Af(s).length}function wL(s,l,g){var S=kt(s)?lf:pk;return g&&qe(s,l,g)&&(l=r),S(s,Ot(l,3))}var TL=Bt(function(s,l){if(s==null)return[];var g=l.length;return g>1&&qe(s,l[0],l[1])?l=[]:g>2&&qe(l[0],l[1],l[2])&&(l=[l[0]]),Dg(s,ke(l,1),[])}),Da=n3||function(){return Me.Date.now()};function EL(s,l){if(typeof l!="function")throw new hr(a);return s=Lt(s),function(){if(--s<1)return l.apply(this,arguments)}}function Nm(s,l,g){return l=g?r:l,l=s&&l==null?s.length:l,tn(s,O,r,r,r,r,l)}function Mm(s,l){var g;if(typeof l!="function")throw new hr(a);return s=Lt(s),function(){return--s>0&&(g=l.apply(this,arguments)),s<=1&&(l=r),g}}var Yf=Bt(function(s,l,g){var S=b;if(g.length){var N=mn(g,Vi(Yf));S|=E}return tn(s,S,l,g,N)}),km=Bt(function(s,l,g){var S=b|m;if(g.length){var N=mn(g,Vi(km));S|=E}return tn(l,S,s,g,N)});function Lm(s,l,g){l=g?r:l;var S=tn(s,T,r,r,r,r,r,l);return S.placeholder=Lm.placeholder,S}function Fm(s,l,g){l=g?r:l;var S=tn(s,x,r,r,r,r,r,l);return S.placeholder=Fm.placeholder,S}function Bm(s,l,g){var S,N,U,H,X,tt,ft=0,ct=!1,ht=!1,yt=!0;if(typeof s!="function")throw new hr(a);l=mr(l)||0,me(g)&&(ct=!!g.leading,ht="maxWait"in g,U=ht?Ae(mr(g.maxWait)||0,l):U,yt="trailing"in g?!!g.trailing:yt);function wt(we){var Nr=S,on=N;return S=N=r,ft=we,H=s.apply(on,Nr),H}function Ct(we){return ft=we,X=Us($t,l),ct?wt(we):H}function Ft(we){var Nr=we-tt,on=we-ft,ry=l-Nr;return ht?De(ry,U-on):ry}function Rt(we){var Nr=we-tt,on=we-ft;return tt===r||Nr>=l||Nr<0||ht&&on>=U}function $t(){var we=Da();if(Rt(we))return zt(we);X=Us($t,Ft(we))}function zt(we){return X=r,yt&&S?wt(we):(S=N=r,H)}function sr(){X!==r&&Wg(X),ft=0,S=tt=N=X=r}function ze(){return X===r?H:zt(Da())}function or(){var we=Da(),Nr=Rt(we);if(S=arguments,N=this,tt=we,Nr){if(X===r)return Ct(tt);if(ht)return Wg(X),X=Us($t,l),wt(tt)}return X===r&&(X=Us($t,l)),H}return or.cancel=sr,or.flush=ze,or}var SL=Bt(function(s,l){return Ag(s,1,l)}),AL=Bt(function(s,l,g){return Ag(s,mr(l)||0,g)});function OL(s){return tn(s,L)}function Ua(s,l){if(typeof s!="function"||l!=null&&typeof l!="function")throw new hr(a);var g=function(){var S=arguments,N=l?l.apply(this,S):S[0],U=g.cache;if(U.has(N))return U.get(N);var H=s.apply(this,S);return g.cache=U.set(N,H)||U,H};return g.cache=new(Ua.Cache||Qr),g}Ua.Cache=Qr;function $a(s){if(typeof s!="function")throw new hr(a);return function(){var l=arguments;switch(l.length){case 0:return!s.call(this);case 1:return!s.call(this,l[0]);case 2:return!s.call(this,l[0],l[1]);case 3:return!s.call(this,l[0],l[1],l[2])}return!s.apply(this,l)}}function CL(s){return Mm(2,s)}var RL=vk(function(s,l){l=l.length==1&&kt(l[0])?de(l[0],rr(Ot())):de(ke(l,1),rr(Ot()));var g=l.length;return Bt(function(S){for(var N=-1,U=De(S.length,g);++N<U;)S[N]=l[N].call(this,S[N]);return er(s,this,S)})}),Zf=Bt(function(s,l){var g=mn(l,Vi(Zf));return tn(s,E,r,l,g)}),Dm=Bt(function(s,l){var g=mn(l,Vi(Dm));return tn(s,I,r,l,g)}),IL=en(function(s,l){return tn(s,A,r,r,r,l)});function PL(s,l){if(typeof s!="function")throw new hr(a);return l=l===r?l:Lt(l),Bt(s,l)}function NL(s,l){if(typeof s!="function")throw new hr(a);return l=l==null?0:Ae(Lt(l),0),Bt(function(g){var S=g[l],N=wn(g,0,l);return S&&gn(N,S),er(s,this,N)})}function ML(s,l,g){var S=!0,N=!0;if(typeof s!="function")throw new hr(a);return me(g)&&(S="leading"in g?!!g.leading:S,N="trailing"in g?!!g.trailing:N),Bm(s,l,{leading:S,maxWait:l,trailing:N})}function kL(s){return Nm(s,1)}function LL(s,l){return Zf(Lf(l),s)}function FL(){if(!arguments.length)return[];var s=arguments[0];return kt(s)?s:[s]}function BL(s){return pr(s,v)}function DL(s,l){return l=typeof l=="function"?l:r,pr(s,v,l)}function UL(s){return pr(s,p|v)}function $L(s,l){return l=typeof l=="function"?l:r,pr(s,p|v,l)}function GL(s,l){return l==null||Sg(s,l,Pe(l))}function Pr(s,l){return s===l||s!==s&&l!==l}var jL=Na(Tf),qL=Na(function(s,l){return s>=l}),Jn=Pg(function(){return arguments}())?Pg:function(s){return ye(s)&&ee.call(s,"callee")&&!mg.call(s,"callee")},kt=st.isArray,zL=Qv?rr(Qv):Q3;function We(s){return s!=null&&Ga(s.length)&&!nn(s)}function xe(s){return ye(s)&&We(s)}function HL(s){return s===!0||s===!1||ye(s)&&je(s)==et}var Tn=s3||lc,VL=Jv?rr(Jv):J3;function WL(s){return ye(s)&&s.nodeType===1&&!$s(s)}function XL(s){if(s==null)return!0;if(We(s)&&(kt(s)||typeof s=="string"||typeof s.splice=="function"||Tn(s)||Wi(s)||Jn(s)))return!s.length;var l=Ue(s);if(l==_t||l==gt)return!s.size;if(Ds(s))return!Af(s).length;for(var g in s)if(ee.call(s,g))return!1;return!0}function KL(s,l){return Ls(s,l)}function YL(s,l,g){g=typeof g=="function"?g:r;var S=g?g(s,l):r;return S===r?Ls(s,l,r,g):!!S}function Qf(s){if(!ye(s))return!1;var l=je(s);return l==ot||l==rt||typeof s.message=="string"&&typeof s.name=="string"&&!$s(s)}function ZL(s){return typeof s=="number"&&_g(s)}function nn(s){if(!me(s))return!1;var l=je(s);return l==pt||l==vt||l==W||l==ut}function Um(s){return typeof s=="number"&&s==Lt(s)}function Ga(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=nt}function me(s){var l=typeof s;return s!=null&&(l=="object"||l=="function")}function ye(s){return s!=null&&typeof s=="object"}var $m=tg?rr(tg):ek;function QL(s,l){return s===l||Sf(s,l,jf(l))}function JL(s,l,g){return g=typeof g=="function"?g:r,Sf(s,l,jf(l),g)}function tF(s){return Gm(s)&&s!=+s}function eF(s){if(Dk(s))throw new Nt(o);return Ng(s)}function rF(s){return s===null}function nF(s){return s==null}function Gm(s){return typeof s=="number"||ye(s)&&je(s)==At}function $s(s){if(!ye(s)||je(s)!=Ut)return!1;var l=pa(s);if(l===null)return!0;var g=ee.call(l,"constructor")&&l.constructor;return typeof g=="function"&&g instanceof g&&fa.call(g)==JM}var Jf=eg?rr(eg):rk;function iF(s){return Um(s)&&s>=-nt&&s<=nt}var jm=rg?rr(rg):nk;function ja(s){return typeof s=="string"||!kt(s)&&ye(s)&&je(s)==at}function ir(s){return typeof s=="symbol"||ye(s)&&je(s)==It}var Wi=ng?rr(ng):ik;function sF(s){return s===r}function oF(s){return ye(s)&&Ue(s)==Mt}function aF(s){return ye(s)&&je(s)==He}var lF=Na(Of),uF=Na(function(s,l){return s<=l});function qm(s){if(!s)return[];if(We(s))return ja(s)?Rr(s):Ve(s);if(Os&&s[Os])return GM(s[Os]());var l=Ue(s),g=l==_t?pf:l==gt?aa:Xi;return g(s)}function sn(s){if(!s)return s===0?s:0;if(s=mr(s),s===z||s===-z){var l=s<0?-1:1;return l*V}return s===s?s:0}function Lt(s){var l=sn(s),g=l%1;return l===l?g?l-g:l:0}function zm(s){return s?Kn(Lt(s),0,k):0}function mr(s){if(typeof s=="number")return s;if(ir(s))return D;if(me(s)){var l=typeof s.valueOf=="function"?s.valueOf():s;s=me(l)?l+"":l}if(typeof s!="string")return s===0?s:+s;s=ug(s);var g=zN.test(s);return g||VN.test(s)?EM(s.slice(2),g?2:8):qN.test(s)?D:+s}function Hm(s){return jr(s,Xe(s))}function fF(s){return s?Kn(Lt(s),-nt,nt):s===0?s:0}function Jt(s){return s==null?"":nr(s)}var cF=zi(function(s,l){if(Ds(l)||We(l)){jr(l,Pe(l),s);return}for(var g in l)ee.call(l,g)&&Ns(s,g,l[g])}),Vm=zi(function(s,l){jr(l,Xe(l),s)}),qa=zi(function(s,l,g,S){jr(l,Xe(l),s,S)}),hF=zi(function(s,l,g,S){jr(l,Pe(l),s,S)}),dF=en(bf);function pF(s,l){var g=qi(s);return l==null?g:Eg(g,l)}var vF=Bt(function(s,l){s=se(s);var g=-1,S=l.length,N=S>2?l[2]:r;for(N&&qe(l[0],l[1],N)&&(S=1);++g<S;)for(var U=l[g],H=Xe(U),X=-1,tt=H.length;++X<tt;){var ft=H[X],ct=s[ft];(ct===r||Pr(ct,$i[ft])&&!ee.call(s,ft))&&(s[ft]=U[ft])}return s}),gF=Bt(function(s){return s.push(r,um),er(Wm,r,s)});function mF(s,l){return sg(s,Ot(l,3),Gr)}function yF(s,l){return sg(s,Ot(l,3),wf)}function _F(s,l){return s==null?s:xf(s,Ot(l,3),Xe)}function bF(s,l){return s==null?s:Rg(s,Ot(l,3),Xe)}function xF(s,l){return s&&Gr(s,Ot(l,3))}function wF(s,l){return s&&wf(s,Ot(l,3))}function TF(s){return s==null?[]:Ea(s,Pe(s))}function EF(s){return s==null?[]:Ea(s,Xe(s))}function tc(s,l,g){var S=s==null?r:Yn(s,l);return S===r?g:S}function SF(s,l){return s!=null&&hm(s,l,X3)}function ec(s,l){return s!=null&&hm(s,l,K3)}var AF=im(function(s,l,g){l!=null&&typeof l.toString!="function"&&(l=ca.call(l)),s[l]=g},nc(Ke)),OF=im(function(s,l,g){l!=null&&typeof l.toString!="function"&&(l=ca.call(l)),ee.call(s,l)?s[l].push(g):s[l]=[g]},Ot),CF=Bt(ks);function Pe(s){return We(s)?wg(s):Af(s)}function Xe(s){return We(s)?wg(s,!0):sk(s)}function RF(s,l){var g={};return l=Ot(l,3),Gr(s,function(S,N,U){Jr(g,l(S,N,U),S)}),g}function IF(s,l){var g={};return l=Ot(l,3),Gr(s,function(S,N,U){Jr(g,N,l(S,N,U))}),g}var PF=zi(function(s,l,g){Sa(s,l,g)}),Wm=zi(function(s,l,g,S){Sa(s,l,g,S)}),NF=en(function(s,l){var g={};if(s==null)return g;var S=!1;l=de(l,function(U){return U=xn(U,s),S||(S=U.length>1),U}),jr(s,$f(s),g),S&&(g=pr(g,p|c|v,Ak));for(var N=l.length;N--;)Nf(g,l[N]);return g});function MF(s,l){return Xm(s,$a(Ot(l)))}var kF=en(function(s,l){return s==null?{}:ak(s,l)});function Xm(s,l){if(s==null)return{};var g=de($f(s),function(S){return[S]});return l=Ot(l),Ug(s,g,function(S,N){return l(S,N[0])})}function LF(s,l,g){l=xn(l,s);var S=-1,N=l.length;for(N||(N=1,s=r);++S<N;){var U=s==null?r:s[qr(l[S])];U===r&&(S=N,U=g),s=nn(U)?U.call(s):U}return s}function FF(s,l,g){return s==null?s:Fs(s,l,g)}function BF(s,l,g,S){return S=typeof S=="function"?S:r,s==null?s:Fs(s,l,g,S)}var Km=am(Pe),Ym=am(Xe);function DF(s,l,g){var S=kt(s),N=S||Tn(s)||Wi(s);if(l=Ot(l,4),g==null){var U=s&&s.constructor;N?g=S?new U:[]:me(s)?g=nn(U)?qi(pa(s)):{}:g={}}return(N?cr:Gr)(s,function(H,X,tt){return l(g,H,X,tt)}),g}function UF(s,l){return s==null?!0:Nf(s,l)}function $F(s,l,g){return s==null?s:zg(s,l,Lf(g))}function GF(s,l,g,S){return S=typeof S=="function"?S:r,s==null?s:zg(s,l,Lf(g),S)}function Xi(s){return s==null?[]:df(s,Pe(s))}function jF(s){return s==null?[]:df(s,Xe(s))}function qF(s,l,g){return g===r&&(g=l,l=r),g!==r&&(g=mr(g),g=g===g?g:0),l!==r&&(l=mr(l),l=l===l?l:0),Kn(mr(s),l,g)}function zF(s,l,g){return l=sn(l),g===r?(g=l,l=0):g=sn(g),s=mr(s),Y3(s,l,g)}function HF(s,l,g){if(g&&typeof g!="boolean"&&qe(s,l,g)&&(l=g=r),g===r&&(typeof l=="boolean"?(g=l,l=r):typeof s=="boolean"&&(g=s,s=r)),s===r&&l===r?(s=0,l=1):(s=sn(s),l===r?(l=s,s=0):l=sn(l)),s>l){var S=s;s=l,l=S}if(g||s%1||l%1){var N=bg();return De(s+N*(l-s+TM("1e-"+((N+"").length-1))),l)}return Rf(s,l)}var VF=Hi(function(s,l,g){return l=l.toLowerCase(),s+(g?Zm(l):l)});function Zm(s){return rc(Jt(s).toLowerCase())}function Qm(s){return s=Jt(s),s&&s.replace(XN,FM).replace(dM,"")}function WF(s,l,g){s=Jt(s),l=nr(l);var S=s.length;g=g===r?S:Kn(Lt(g),0,S);var N=g;return g-=l.length,g>=0&&s.slice(g,N)==l}function XF(s){return s=Jt(s),s&&CN.test(s)?s.replace(Rv,BM):s}function KF(s){return s=Jt(s),s&&kN.test(s)?s.replace(Yu,"\\$&"):s}var YF=Hi(function(s,l,g){return s+(g?"-":"")+l.toLowerCase()}),ZF=Hi(function(s,l,g){return s+(g?" ":"")+l.toLowerCase()}),QF=em("toLowerCase");function JF(s,l,g){s=Jt(s),l=Lt(l);var S=l?Di(s):0;if(!l||S>=l)return s;var N=(l-S)/2;return Pa(ya(N),g)+s+Pa(ma(N),g)}function t4(s,l,g){s=Jt(s),l=Lt(l);var S=l?Di(s):0;return l&&S<l?s+Pa(l-S,g):s}function e4(s,l,g){s=Jt(s),l=Lt(l);var S=l?Di(s):0;return l&&S<l?Pa(l-S,g)+s:s}function r4(s,l,g){return g||l==null?l=0:l&&(l=+l),u3(Jt(s).replace(Zu,""),l||0)}function n4(s,l,g){return(g?qe(s,l,g):l===r)?l=1:l=Lt(l),If(Jt(s),l)}function i4(){var s=arguments,l=Jt(s[0]);return s.length<3?l:l.replace(s[1],s[2])}var s4=Hi(function(s,l,g){return s+(g?"_":"")+l.toLowerCase()});function o4(s,l,g){return g&&typeof g!="number"&&qe(s,l,g)&&(l=g=r),g=g===r?k:g>>>0,g?(s=Jt(s),s&&(typeof l=="string"||l!=null&&!Jf(l))&&(l=nr(l),!l&&Bi(s))?wn(Rr(s),0,g):s.split(l,g)):[]}var a4=Hi(function(s,l,g){return s+(g?" ":"")+rc(l)});function l4(s,l,g){return s=Jt(s),g=g==null?0:Kn(Lt(g),0,s.length),l=nr(l),s.slice(g,g+l.length)==l}function u4(s,l,g){var S=B.templateSettings;g&&qe(s,l,g)&&(l=r),s=Jt(s),l=qa({},l,S,lm);var N=qa({},l.imports,S.imports,lm),U=Pe(N),H=df(N,U),X,tt,ft=0,ct=l.interpolate||ra,ht="__p += '",yt=vf((l.escape||ra).source+"|"+ct.source+"|"+(ct===Iv?jN:ra).source+"|"+(l.evaluate||ra).source+"|$","g"),wt="//# sourceURL="+(ee.call(l,"sourceURL")?(l.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++yM+"]")+`
1944
+ `;s.replace(yt,function(Rt,$t,zt,sr,ze,or){return zt||(zt=sr),ht+=s.slice(ft,or).replace(KN,DM),$t&&(X=!0,ht+=`' +
1945
+ __e(`+$t+`) +
1946
1946
  '`),ze&&(tt=!0,ht+=`';
1947
1947
  `+ze+`;
1948
- __p += '`),qt&&(ht+=`' +
1949
- ((__t = (`+qt+`)) == null ? '' : __t) +
1950
- '`),ut=or+Ct.length,Ct}),ht+=`';
1951
- `;var Ot=ee.call(l,"variable")&&l.variable;if(!Ot)ht=`with (obj) {
1948
+ __p += '`),zt&&(ht+=`' +
1949
+ ((__t = (`+zt+`)) == null ? '' : __t) +
1950
+ '`),ft=or+Rt.length,Rt}),ht+=`';
1951
+ `;var Ct=ee.call(l,"variable")&&l.variable;if(!Ct)ht=`with (obj) {
1952
1952
  `+ht+`
1953
1953
  }
1954
- `;else if(UN.test(Ot))throw new It(u);ht=(tt?ht.replace(TN,""):ht).replace(EN,"$1").replace(SN,"$1;"),ht="function("+(Ot||"obj")+`) {
1955
- `+(Ot?"":`obj || (obj = {});
1956
- `)+"var __t, __p = ''"+(K?", __e = _.escape":"")+(tt?`, __j = Array.prototype.join;
1954
+ `;else if($N.test(Ct))throw new Nt(u);ht=(tt?ht.replace(EN,""):ht).replace(SN,"$1").replace(AN,"$1;"),ht="function("+(Ct||"obj")+`) {
1955
+ `+(Ct?"":`obj || (obj = {});
1956
+ `)+"var __t, __p = ''"+(X?", __e = _.escape":"")+(tt?`, __j = Array.prototype.join;
1957
1957
  function print() { __p += __j.call(arguments, '') }
1958
1958
  `:`;
1959
1959
  `)+ht+`return __p
1960
- }`;var Ft=ty(function(){return Yt(D,wt+"return "+ht).apply(r,H)});if(Ft.source=ht,Qf(Ft))throw Ft;return Ft}function u4(s){return Jt(s).toLowerCase()}function f4(s){return Jt(s).toUpperCase()}function c4(s,l,g){if(s=Jt(s),s&&(g||l===r))return ug(s);if(!s||!(l=nr(l)))return s;var S=Rr(s),N=Rr(l),D=fg(S,N),H=cg(S,N)+1;return wn(S,D,H).join("")}function h4(s,l,g){if(s=Jt(s),s&&(g||l===r))return s.slice(0,dg(s)+1);if(!s||!(l=nr(l)))return s;var S=Rr(s),N=cg(S,Rr(l))+1;return wn(S,0,N).join("")}function d4(s,l,g){if(s=Jt(s),s&&(g||l===r))return s.replace(Zu,"");if(!s||!(l=nr(l)))return s;var S=Rr(s),N=fg(S,Rr(l));return wn(S,N).join("")}function p4(s,l){var g=R,S=C;if(me(l)){var N="separator"in l?l.separator:N;g="length"in l?kt(l.length):g,S="omission"in l?nr(l.omission):S}s=Jt(s);var D=s.length;if(Fi(s)){var H=Rr(s);D=H.length}if(g>=D)return s;var K=g-Bi(S);if(K<1)return S;var tt=H?wn(H,0,K).join(""):s.slice(0,K);if(N===r)return tt+S;if(H&&(K+=tt.length-K),Jf(N)){if(s.slice(K).search(N)){var ut,ft=tt;for(N.global||(N=vf(N.source,Jt(Pv.exec(N))+"g")),N.lastIndex=0;ut=N.exec(ft);)var ht=ut.index;tt=tt.slice(0,ht===r?K:ht)}}else if(s.indexOf(nr(N),K)!=K){var gt=tt.lastIndexOf(N);gt>-1&&(tt=tt.slice(0,gt))}return tt+S}function v4(s){return s=Jt(s),s&&AN.test(s)?s.replace(Cv,zM):s}var g4=zi(function(s,l,g){return s+(g?" ":"")+l.toUpperCase()}),rc=em("toUpperCase");function Jm(s,l,g){return s=Jt(s),l=g?r:l,l===r?UM(s)?WM(s):IM(s):s.match(l)||[]}var ty=Bt(function(s,l){try{return er(s,r,l)}catch(g){return Qf(g)?g:new It(g)}}),m4=en(function(s,l){return cr(l,function(g){g=qr(g),Jr(s,g,Yf(s[g],s))}),s});function y4(s){var l=s==null?0:s.length,g=St();return s=l?de(s,function(S){if(typeof S[1]!="function")throw new hr(a);return[g(S[0]),S[1]]}):[],Bt(function(S){for(var N=-1;++N<l;){var D=s[N];if(er(D[0],this,S))return er(D[1],this,S)}})}function _4(s){return z3(pr(s,p))}function nc(s){return function(){return s}}function b4(s,l){return s==null||s!==s?l:s}var x4=nm(),w4=nm(!0);function Ke(s){return s}function ic(s){return Mg(typeof s=="function"?s:pr(s,p))}function T4(s){return Lg(pr(s,p))}function E4(s,l){return Fg(s,pr(l,p))}var S4=Bt(function(s,l){return function(g){return Ms(g,s,l)}}),A4=Bt(function(s,l){return function(g){return Ms(s,g,l)}});function sc(s,l,g){var S=Pe(l),N=Ta(l,S);g==null&&!(me(l)&&(N.length||!S.length))&&(g=l,l=s,s=this,N=Ta(l,Pe(l)));var D=!(me(g)&&"chain"in g)||!!g.chain,H=nn(s);return cr(N,function(K){var tt=l[K];s[K]=tt,H&&(s.prototype[K]=function(){var ut=this.__chain__;if(D||ut){var ft=s(this.__wrapped__),ht=ft.__actions__=Ve(this.__actions__);return ht.push({func:tt,args:arguments,thisArg:s}),ft.__chain__=ut,ft}return tt.apply(s,gn([this.value()],arguments))})}),s}function O4(){return Me._===this&&(Me._=JM),this}function oc(){}function C4(s){return s=kt(s),Bt(function(l){return Bg(l,s)})}var R4=Bf(de),I4=Bf(ig),P4=Bf(lf);function ey(s){return zf(s)?uf(qr(s)):ak(s)}function N4(s){return function(l){return s==null?r:Yn(s,l)}}var M4=sm(),k4=sm(!0);function ac(){return[]}function lc(){return!1}function L4(){return{}}function F4(){return""}function B4(){return!0}function D4(s,l){if(s=kt(s),s<1||s>nt)return[];var g=k,S=De(s,k);l=St(l),s-=k;for(var N=hf(S,l);++g<s;)l(g);return N}function U4(s){return Mt(s)?de(s,qr):ir(s)?[s]:Ve(xm(Jt(s)))}function $4(s){var l=++ZM;return Jt(s)+l}var G4=Ra(function(s,l){return s+l},0),j4=Df("ceil"),q4=Ra(function(s,l){return s/l},1),z4=Df("floor");function H4(s){return s&&s.length?wa(s,Ke,Tf):r}function V4(s,l){return s&&s.length?wa(s,St(l,2),Tf):r}function W4(s){return ag(s,Ke)}function X4(s,l){return ag(s,St(l,2))}function K4(s){return s&&s.length?wa(s,Ke,Of):r}function Y4(s,l){return s&&s.length?wa(s,St(l,2),Of):r}var Z4=Ra(function(s,l){return s*l},1),Q4=Df("round"),J4=Ra(function(s,l){return s-l},0);function tB(s){return s&&s.length?cf(s,Ke):0}function eB(s,l){return s&&s.length?cf(s,St(l,2)):0}return B.after=TL,B.ary=Nm,B.assign=fF,B.assignIn=Vm,B.assignInWith=ja,B.assignWith=cF,B.at=hF,B.before=Mm,B.bind=Yf,B.bindAll=m4,B.bindKey=km,B.castArray=LL,B.chain=Rm,B.chunk=zk,B.compact=Hk,B.concat=Vk,B.cond=y4,B.conforms=_4,B.constant=nc,B.countBy=tL,B.create=dF,B.curry=Lm,B.curryRight=Fm,B.debounce=Bm,B.defaults=pF,B.defaultsDeep=vF,B.defer=EL,B.delay=SL,B.difference=Wk,B.differenceBy=Xk,B.differenceWith=Kk,B.drop=Yk,B.dropRight=Zk,B.dropRightWhile=Qk,B.dropWhile=Jk,B.fill=t5,B.filter=rL,B.flatMap=sL,B.flatMapDeep=oL,B.flatMapDepth=aL,B.flatten=Sm,B.flattenDeep=e5,B.flattenDepth=r5,B.flip=AL,B.flow=x4,B.flowRight=w4,B.fromPairs=n5,B.functions=wF,B.functionsIn=TF,B.groupBy=lL,B.initial=s5,B.intersection=o5,B.intersectionBy=a5,B.intersectionWith=l5,B.invert=SF,B.invertBy=AF,B.invokeMap=fL,B.iteratee=ic,B.keyBy=cL,B.keys=Pe,B.keysIn=Xe,B.map=Fa,B.mapKeys=CF,B.mapValues=RF,B.matches=T4,B.matchesProperty=E4,B.memoize=Da,B.merge=IF,B.mergeWith=Wm,B.method=S4,B.methodOf=A4,B.mixin=sc,B.negate=Ua,B.nthArg=C4,B.omit=PF,B.omitBy=NF,B.once=OL,B.orderBy=hL,B.over=R4,B.overArgs=CL,B.overEvery=I4,B.overSome=P4,B.partial=Zf,B.partialRight=Dm,B.partition=dL,B.pick=MF,B.pickBy=Xm,B.property=ey,B.propertyOf=N4,B.pull=h5,B.pullAll=Om,B.pullAllBy=d5,B.pullAllWith=p5,B.pullAt=v5,B.range=M4,B.rangeRight=k4,B.rearg=RL,B.reject=gL,B.remove=g5,B.rest=IL,B.reverse=Xf,B.sampleSize=yL,B.set=LF,B.setWith=FF,B.shuffle=_L,B.slice=m5,B.sortBy=wL,B.sortedUniq=E5,B.sortedUniqBy=S5,B.split=s4,B.spread=PL,B.tail=A5,B.take=O5,B.takeRight=C5,B.takeRightWhile=R5,B.takeWhile=I5,B.tap=H5,B.throttle=NL,B.thru=La,B.toArray=qm,B.toPairs=Km,B.toPairsIn=Ym,B.toPath=U4,B.toPlainObject=Hm,B.transform=BF,B.unary=ML,B.union=P5,B.unionBy=N5,B.unionWith=M5,B.uniq=k5,B.uniqBy=L5,B.uniqWith=F5,B.unset=DF,B.unzip=Kf,B.unzipWith=Cm,B.update=UF,B.updateWith=$F,B.values=Wi,B.valuesIn=GF,B.without=B5,B.words=Jm,B.wrap=kL,B.xor=D5,B.xorBy=U5,B.xorWith=$5,B.zip=G5,B.zipObject=j5,B.zipObjectDeep=q5,B.zipWith=z5,B.entries=Km,B.entriesIn=Ym,B.extend=Vm,B.extendWith=ja,sc(B,B),B.add=G4,B.attempt=ty,B.camelCase=HF,B.capitalize=Zm,B.ceil=j4,B.clamp=jF,B.clone=FL,B.cloneDeep=DL,B.cloneDeepWith=UL,B.cloneWith=BL,B.conformsTo=$L,B.deburr=Qm,B.defaultTo=b4,B.divide=q4,B.endsWith=VF,B.eq=Pr,B.escape=WF,B.escapeRegExp=XF,B.every=eL,B.find=nL,B.findIndex=Tm,B.findKey=gF,B.findLast=iL,B.findLastIndex=Em,B.findLastKey=mF,B.floor=z4,B.forEach=Im,B.forEachRight=Pm,B.forIn=yF,B.forInRight=_F,B.forOwn=bF,B.forOwnRight=xF,B.get=tc,B.gt=GL,B.gte=jL,B.has=EF,B.hasIn=ec,B.head=Am,B.identity=Ke,B.includes=uL,B.indexOf=i5,B.inRange=qF,B.invoke=OF,B.isArguments=Jn,B.isArray=Mt,B.isArrayBuffer=qL,B.isArrayLike=We,B.isArrayLikeObject=xe,B.isBoolean=zL,B.isBuffer=Tn,B.isDate=HL,B.isElement=VL,B.isEmpty=WL,B.isEqual=XL,B.isEqualWith=KL,B.isError=Qf,B.isFinite=YL,B.isFunction=nn,B.isInteger=Um,B.isLength=$a,B.isMap=$m,B.isMatch=ZL,B.isMatchWith=QL,B.isNaN=JL,B.isNative=tF,B.isNil=rF,B.isNull=eF,B.isNumber=Gm,B.isObject=me,B.isObjectLike=ye,B.isPlainObject=Us,B.isRegExp=Jf,B.isSafeInteger=nF,B.isSet=jm,B.isString=Ga,B.isSymbol=ir,B.isTypedArray=Vi,B.isUndefined=iF,B.isWeakMap=sF,B.isWeakSet=oF,B.join=u5,B.kebabCase=KF,B.last=gr,B.lastIndexOf=f5,B.lowerCase=YF,B.lowerFirst=ZF,B.lt=aF,B.lte=lF,B.max=H4,B.maxBy=V4,B.mean=W4,B.meanBy=X4,B.min=K4,B.minBy=Y4,B.stubArray=ac,B.stubFalse=lc,B.stubObject=L4,B.stubString=F4,B.stubTrue=B4,B.multiply=Z4,B.nth=c5,B.noConflict=O4,B.noop=oc,B.now=Ba,B.pad=QF,B.padEnd=JF,B.padStart=t4,B.parseInt=e4,B.random=zF,B.reduce=pL,B.reduceRight=vL,B.repeat=r4,B.replace=n4,B.result=kF,B.round=Q4,B.runInContext=Q,B.sample=mL,B.size=bL,B.snakeCase=i4,B.some=xL,B.sortedIndex=y5,B.sortedIndexBy=_5,B.sortedIndexOf=b5,B.sortedLastIndex=x5,B.sortedLastIndexBy=w5,B.sortedLastIndexOf=T5,B.startCase=o4,B.startsWith=a4,B.subtract=J4,B.sum=tB,B.sumBy=eB,B.template=l4,B.times=D4,B.toFinite=sn,B.toInteger=kt,B.toLength=zm,B.toLower=u4,B.toNumber=mr,B.toSafeInteger=uF,B.toString=Jt,B.toUpper=f4,B.trim=c4,B.trimEnd=h4,B.trimStart=d4,B.truncate=p4,B.unescape=v4,B.uniqueId=$4,B.upperCase=g4,B.upperFirst=rc,B.each=Im,B.eachRight=Pm,B.first=Am,sc(B,function(){var s={};return Gr(B,function(l,g){ee.call(B.prototype,g)||(s[g]=l)}),s}(),{chain:!1}),B.VERSION=n,cr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){B[s].placeholder=B}),cr(["drop","take"],function(s,l){Gt.prototype[s]=function(g){g=g===r?1:Ae(kt(g),0);var S=this.__filtered__&&!l?new Gt(this):this.clone();return S.__filtered__?S.__takeCount__=De(g,S.__takeCount__):S.__views__.push({size:De(g,k),type:s+(S.__dir__<0?"Right":"")}),S},Gt.prototype[s+"Right"]=function(g){return this.reverse()[s](g).reverse()}}),cr(["filter","map","takeWhile"],function(s,l){var g=l+1,S=g==F||g==Z;Gt.prototype[s]=function(N){var D=this.clone();return D.__iteratees__.push({iteratee:St(N,3),type:g}),D.__filtered__=D.__filtered__||S,D}}),cr(["head","last"],function(s,l){var g="take"+(l?"Right":"");Gt.prototype[s]=function(){return this[g](1).value()[0]}}),cr(["initial","tail"],function(s,l){var g="drop"+(l?"":"Right");Gt.prototype[s]=function(){return this.__filtered__?new Gt(this):this[g](1)}}),Gt.prototype.compact=function(){return this.filter(Ke)},Gt.prototype.find=function(s){return this.filter(s).head()},Gt.prototype.findLast=function(s){return this.reverse().find(s)},Gt.prototype.invokeMap=Bt(function(s,l){return typeof s=="function"?new Gt(this):this.map(function(g){return Ms(g,s,l)})}),Gt.prototype.reject=function(s){return this.filter(Ua(St(s)))},Gt.prototype.slice=function(s,l){s=kt(s);var g=this;return g.__filtered__&&(s>0||l<0)?new Gt(g):(s<0?g=g.takeRight(-s):s&&(g=g.drop(s)),l!==r&&(l=kt(l),g=l<0?g.dropRight(-l):g.take(l-s)),g)},Gt.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Gt.prototype.toArray=function(){return this.take(k)},Gr(Gt.prototype,function(s,l){var g=/^(?:filter|find|map|reject)|While$/.test(l),S=/^(?:head|last)$/.test(l),N=B[S?"take"+(l=="last"?"Right":""):l],D=S||/^find/.test(l);N&&(B.prototype[l]=function(){var H=this.__wrapped__,K=S?[1]:arguments,tt=H instanceof Gt,ut=K[0],ft=tt||Mt(H),ht=function(Ut){var qt=N.apply(B,gn([Ut],K));return S&&gt?qt[0]:qt};ft&&g&&typeof ut=="function"&&ut.length!=1&&(tt=ft=!1);var gt=this.__chain__,wt=!!this.__actions__.length,Ot=D&&!gt,Ft=tt&&!wt;if(!D&&ft){H=Ft?H:new Gt(this);var Ct=s.apply(H,K);return Ct.__actions__.push({func:La,args:[ht],thisArg:r}),new dr(Ct,gt)}return Ot&&Ft?s.apply(this,K):(Ct=this.thru(ht),Ot?S?Ct.value()[0]:Ct.value():Ct)})}),cr(["pop","push","shift","sort","splice","unshift"],function(s){var l=aa[s],g=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",S=/^(?:pop|shift)$/.test(s);B.prototype[s]=function(){var N=arguments;if(S&&!this.__chain__){var D=this.value();return l.apply(Mt(D)?D:[],N)}return this[g](function(H){return l.apply(Mt(H)?H:[],N)})}}),Gr(Gt.prototype,function(s,l){var g=B[l];if(g){var S=g.name+"";ee.call(Gi,S)||(Gi[S]=[]),Gi[S].push({name:l,func:g})}}),Gi[Ca(r,m).name]=[{name:"wrapper",func:r}],Gt.prototype.clone=v3,Gt.prototype.reverse=g3,Gt.prototype.value=m3,B.prototype.at=V5,B.prototype.chain=W5,B.prototype.commit=X5,B.prototype.next=K5,B.prototype.plant=Z5,B.prototype.reverse=Q5,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=J5,B.prototype.first=B.prototype.head,As&&(B.prototype[As]=Y5),B},Di=XM();Hn?((Hn.exports=Di)._=Di,nf._=Di):Me._=Di}).call(Ye)}(ta,ta.exports);var wv=ta.exports;const gN={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,totalFrames:0,totalDuration:0},Tv=Et.forwardRef((e,t)=>{const[r,n]=Et.useState([]),[,i]=Et.useState(0),[o,a]=Et.useState([]),[,u]=mt.useState(!1),[f,h]=oN({autoPlay:!1}),d=mt.useRef(null),p=mt.useRef(null),c=mt.useRef(gN),v=mt.useRef(),{tl:y,dragModeRef:b}=mt.useContext(An),{frames:_,delays:m}=f,{src:w,startAt:T,endAt:x,frameStartAt:E,frameEndAt:I,loop:A,transformation:{width:O=0,height:L=0,x:R,y:C,animation:P,colorCorrection:M={}},pointerdown:F}=e,{temperatureFilter:q,sharpnessFilter:Z,hueFilter:z,blurFilter:nt,adjustmentFilter:V}=ys(M),{blurRadius:U=0}=M,k=.1;pN(w,h),Ze(Oe.PAUSE,()=>{d.current&&(d.current.stop(),c.current.isPlaying=!1)}),Et.useEffect(()=>{c.current&&d.current&&(b.current?(d.current.stop(),c.current.isPlaying=!1,c.current.isDragging=!0):c.current.isDragging=!1)},[b]),Et.useEffect(()=>{if(!el(_)){const J=FP(_,pt=>{const{data:yt,width:xt,height:At}=pt,oe=new Uint8Array(yt);return zr.Texture.fromBuffer(oe,xt,At)}),it=J.map((pt,yt)=>({texture:pt,time:m[yt]}));n(J),a(it);let lt=0;m.forEach(pt=>{lt+=pt*10}),i(lt),c.current.totalDuration=lt,c.current.totalFrames=_.length}},[_,m]);const j=wv.debounce(J=>{if(d.current){let it=J===0?0:J/k;it=isNaN(it)?0:it;const lt=c.current.totalFrames;it=it>lt?lt:it,it>=lt?(d.current.gotoAndStop(0),c.current.isPlaying=!1):(d.current.gotoAndPlay(it||0),c.current.isPlaying=!0)}},20),G=wv.debounce(()=>{d.current&&(d.current.stop(),c.current.isPlaying=!1)},50),X=J=>{if(d.current){let it=J===0?0:J/k;it=isNaN(it)?0:it;const lt=c.current.totalFrames;it=it>lt?lt:it,it>=lt?(d.current.gotoAndStop(0),c.current.isPlaying=!1):(d.current.gotoAndPlay(it||0),c.current.isPlaying=!0)}},Y=()=>{d.current&&(d.current.stop(),c.current.isPlaying=!1)},$=()=>{d.current&&(d.current.stop(),c.current.isPlaying=!1)},W=J=>{var lt;const it=J+((lt=v.current)==null?void 0:lt.time());d.current&&b.current?(j(it),G(),c.current.isPlaying=!1):v.current&&d.current&&!c.current.isPlaying&&v.current.isActive()&&y.current.isActive()&&(j(it),c.current.isPlaying=!0)},et=()=>{u(!0)};return mt.useEffect(()=>{let J=_e.context(()=>{});if(p.current&&y.current){const it={duration:Number(I)-Number(E),onStart:X,onComplete:Y,onStartParams:[E,I],onCompleteParams:[],onInterrupt:$,onUpdate:W,onUpdateParams:[E,I]};v.current&&v.current.kill(),J=_e.context(()=>{v.current=_e.from(p.current,it,E),y.current.add(v.current,T)})}return()=>{console.log("PixiGif Sprite Component cleanup"),v.current&&(v.current.kill(),_e.killTweensOf(v.current)),J.revert()}},[P,T,x,E,I]),Vt.jsx(ni,{...e,ref:t,ignoreTlForVideo:!0,isGif:!0,children:Vt.jsx(le.Container,{ref:p,children:r&&r.length>0&&Vt.jsx(xv,{x:R,y:C,width:O,height:L,animationSpeed:1,loop:A,textures:o,onComplete:et,anchor:.5,forwardRef:d,interactive:!0,pointerdown:F,filters:[q,Z,z,V,...U>0?[nt]:[]]})})})});Tv.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiGifSprite"};var Ev={exports:{}};/*!
1960
+ }`;var Ft=ty(function(){return Yt(U,wt+"return "+ht).apply(r,H)});if(Ft.source=ht,Qf(Ft))throw Ft;return Ft}function f4(s){return Jt(s).toLowerCase()}function c4(s){return Jt(s).toUpperCase()}function h4(s,l,g){if(s=Jt(s),s&&(g||l===r))return ug(s);if(!s||!(l=nr(l)))return s;var S=Rr(s),N=Rr(l),U=fg(S,N),H=cg(S,N)+1;return wn(S,U,H).join("")}function d4(s,l,g){if(s=Jt(s),s&&(g||l===r))return s.slice(0,dg(s)+1);if(!s||!(l=nr(l)))return s;var S=Rr(s),N=cg(S,Rr(l))+1;return wn(S,0,N).join("")}function p4(s,l,g){if(s=Jt(s),s&&(g||l===r))return s.replace(Zu,"");if(!s||!(l=nr(l)))return s;var S=Rr(s),N=fg(S,Rr(l));return wn(S,N).join("")}function v4(s,l){var g=R,S=C;if(me(l)){var N="separator"in l?l.separator:N;g="length"in l?Lt(l.length):g,S="omission"in l?nr(l.omission):S}s=Jt(s);var U=s.length;if(Bi(s)){var H=Rr(s);U=H.length}if(g>=U)return s;var X=g-Di(S);if(X<1)return S;var tt=H?wn(H,0,X).join(""):s.slice(0,X);if(N===r)return tt+S;if(H&&(X+=tt.length-X),Jf(N)){if(s.slice(X).search(N)){var ft,ct=tt;for(N.global||(N=vf(N.source,Jt(Pv.exec(N))+"g")),N.lastIndex=0;ft=N.exec(ct);)var ht=ft.index;tt=tt.slice(0,ht===r?X:ht)}}else if(s.indexOf(nr(N),X)!=X){var yt=tt.lastIndexOf(N);yt>-1&&(tt=tt.slice(0,yt))}return tt+S}function g4(s){return s=Jt(s),s&&ON.test(s)?s.replace(Cv,HM):s}var m4=Hi(function(s,l,g){return s+(g?" ":"")+l.toUpperCase()}),rc=em("toUpperCase");function Jm(s,l,g){return s=Jt(s),l=g?r:l,l===r?$M(s)?XM(s):PM(s):s.match(l)||[]}var ty=Bt(function(s,l){try{return er(s,r,l)}catch(g){return Qf(g)?g:new Nt(g)}}),y4=en(function(s,l){return cr(l,function(g){g=qr(g),Jr(s,g,Yf(s[g],s))}),s});function _4(s){var l=s==null?0:s.length,g=Ot();return s=l?de(s,function(S){if(typeof S[1]!="function")throw new hr(a);return[g(S[0]),S[1]]}):[],Bt(function(S){for(var N=-1;++N<l;){var U=s[N];if(er(U[0],this,S))return er(U[1],this,S)}})}function b4(s){return H3(pr(s,p))}function nc(s){return function(){return s}}function x4(s,l){return s==null||s!==s?l:s}var w4=nm(),T4=nm(!0);function Ke(s){return s}function ic(s){return Mg(typeof s=="function"?s:pr(s,p))}function E4(s){return Lg(pr(s,p))}function S4(s,l){return Fg(s,pr(l,p))}var A4=Bt(function(s,l){return function(g){return ks(g,s,l)}}),O4=Bt(function(s,l){return function(g){return ks(s,g,l)}});function sc(s,l,g){var S=Pe(l),N=Ea(l,S);g==null&&!(me(l)&&(N.length||!S.length))&&(g=l,l=s,s=this,N=Ea(l,Pe(l)));var U=!(me(g)&&"chain"in g)||!!g.chain,H=nn(s);return cr(N,function(X){var tt=l[X];s[X]=tt,H&&(s.prototype[X]=function(){var ft=this.__chain__;if(U||ft){var ct=s(this.__wrapped__),ht=ct.__actions__=Ve(this.__actions__);return ht.push({func:tt,args:arguments,thisArg:s}),ct.__chain__=ft,ct}return tt.apply(s,gn([this.value()],arguments))})}),s}function C4(){return Me._===this&&(Me._=t3),this}function oc(){}function R4(s){return s=Lt(s),Bt(function(l){return Bg(l,s)})}var I4=Bf(de),P4=Bf(ig),N4=Bf(lf);function ey(s){return zf(s)?uf(qr(s)):lk(s)}function M4(s){return function(l){return s==null?r:Yn(s,l)}}var k4=sm(),L4=sm(!0);function ac(){return[]}function lc(){return!1}function F4(){return{}}function B4(){return""}function D4(){return!0}function U4(s,l){if(s=Lt(s),s<1||s>nt)return[];var g=k,S=De(s,k);l=Ot(l),s-=k;for(var N=hf(S,l);++g<s;)l(g);return N}function $4(s){return kt(s)?de(s,qr):ir(s)?[s]:Ve(xm(Jt(s)))}function G4(s){var l=++QM;return Jt(s)+l}var j4=Ia(function(s,l){return s+l},0),q4=Df("ceil"),z4=Ia(function(s,l){return s/l},1),H4=Df("floor");function V4(s){return s&&s.length?Ta(s,Ke,Tf):r}function W4(s,l){return s&&s.length?Ta(s,Ot(l,2),Tf):r}function X4(s){return ag(s,Ke)}function K4(s,l){return ag(s,Ot(l,2))}function Y4(s){return s&&s.length?Ta(s,Ke,Of):r}function Z4(s,l){return s&&s.length?Ta(s,Ot(l,2),Of):r}var Q4=Ia(function(s,l){return s*l},1),J4=Df("round"),tB=Ia(function(s,l){return s-l},0);function eB(s){return s&&s.length?cf(s,Ke):0}function rB(s,l){return s&&s.length?cf(s,Ot(l,2)):0}return B.after=EL,B.ary=Nm,B.assign=cF,B.assignIn=Vm,B.assignInWith=qa,B.assignWith=hF,B.at=dF,B.before=Mm,B.bind=Yf,B.bindAll=y4,B.bindKey=km,B.castArray=FL,B.chain=Rm,B.chunk=Hk,B.compact=Vk,B.concat=Wk,B.cond=_4,B.conforms=b4,B.constant=nc,B.countBy=eL,B.create=pF,B.curry=Lm,B.curryRight=Fm,B.debounce=Bm,B.defaults=vF,B.defaultsDeep=gF,B.defer=SL,B.delay=AL,B.difference=Xk,B.differenceBy=Kk,B.differenceWith=Yk,B.drop=Zk,B.dropRight=Qk,B.dropRightWhile=Jk,B.dropWhile=t5,B.fill=e5,B.filter=nL,B.flatMap=oL,B.flatMapDeep=aL,B.flatMapDepth=lL,B.flatten=Sm,B.flattenDeep=r5,B.flattenDepth=n5,B.flip=OL,B.flow=w4,B.flowRight=T4,B.fromPairs=i5,B.functions=TF,B.functionsIn=EF,B.groupBy=uL,B.initial=o5,B.intersection=a5,B.intersectionBy=l5,B.intersectionWith=u5,B.invert=AF,B.invertBy=OF,B.invokeMap=cL,B.iteratee=ic,B.keyBy=hL,B.keys=Pe,B.keysIn=Xe,B.map=Ba,B.mapKeys=RF,B.mapValues=IF,B.matches=E4,B.matchesProperty=S4,B.memoize=Ua,B.merge=PF,B.mergeWith=Wm,B.method=A4,B.methodOf=O4,B.mixin=sc,B.negate=$a,B.nthArg=R4,B.omit=NF,B.omitBy=MF,B.once=CL,B.orderBy=dL,B.over=I4,B.overArgs=RL,B.overEvery=P4,B.overSome=N4,B.partial=Zf,B.partialRight=Dm,B.partition=pL,B.pick=kF,B.pickBy=Xm,B.property=ey,B.propertyOf=M4,B.pull=d5,B.pullAll=Om,B.pullAllBy=p5,B.pullAllWith=v5,B.pullAt=g5,B.range=k4,B.rangeRight=L4,B.rearg=IL,B.reject=mL,B.remove=m5,B.rest=PL,B.reverse=Xf,B.sampleSize=_L,B.set=FF,B.setWith=BF,B.shuffle=bL,B.slice=y5,B.sortBy=TL,B.sortedUniq=S5,B.sortedUniqBy=A5,B.split=o4,B.spread=NL,B.tail=O5,B.take=C5,B.takeRight=R5,B.takeRightWhile=I5,B.takeWhile=P5,B.tap=V5,B.throttle=ML,B.thru=Fa,B.toArray=qm,B.toPairs=Km,B.toPairsIn=Ym,B.toPath=$4,B.toPlainObject=Hm,B.transform=DF,B.unary=kL,B.union=N5,B.unionBy=M5,B.unionWith=k5,B.uniq=L5,B.uniqBy=F5,B.uniqWith=B5,B.unset=UF,B.unzip=Kf,B.unzipWith=Cm,B.update=$F,B.updateWith=GF,B.values=Xi,B.valuesIn=jF,B.without=D5,B.words=Jm,B.wrap=LL,B.xor=U5,B.xorBy=$5,B.xorWith=G5,B.zip=j5,B.zipObject=q5,B.zipObjectDeep=z5,B.zipWith=H5,B.entries=Km,B.entriesIn=Ym,B.extend=Vm,B.extendWith=qa,sc(B,B),B.add=j4,B.attempt=ty,B.camelCase=VF,B.capitalize=Zm,B.ceil=q4,B.clamp=qF,B.clone=BL,B.cloneDeep=UL,B.cloneDeepWith=$L,B.cloneWith=DL,B.conformsTo=GL,B.deburr=Qm,B.defaultTo=x4,B.divide=z4,B.endsWith=WF,B.eq=Pr,B.escape=XF,B.escapeRegExp=KF,B.every=rL,B.find=iL,B.findIndex=Tm,B.findKey=mF,B.findLast=sL,B.findLastIndex=Em,B.findLastKey=yF,B.floor=H4,B.forEach=Im,B.forEachRight=Pm,B.forIn=_F,B.forInRight=bF,B.forOwn=xF,B.forOwnRight=wF,B.get=tc,B.gt=jL,B.gte=qL,B.has=SF,B.hasIn=ec,B.head=Am,B.identity=Ke,B.includes=fL,B.indexOf=s5,B.inRange=zF,B.invoke=CF,B.isArguments=Jn,B.isArray=kt,B.isArrayBuffer=zL,B.isArrayLike=We,B.isArrayLikeObject=xe,B.isBoolean=HL,B.isBuffer=Tn,B.isDate=VL,B.isElement=WL,B.isEmpty=XL,B.isEqual=KL,B.isEqualWith=YL,B.isError=Qf,B.isFinite=ZL,B.isFunction=nn,B.isInteger=Um,B.isLength=Ga,B.isMap=$m,B.isMatch=QL,B.isMatchWith=JL,B.isNaN=tF,B.isNative=eF,B.isNil=nF,B.isNull=rF,B.isNumber=Gm,B.isObject=me,B.isObjectLike=ye,B.isPlainObject=$s,B.isRegExp=Jf,B.isSafeInteger=iF,B.isSet=jm,B.isString=ja,B.isSymbol=ir,B.isTypedArray=Wi,B.isUndefined=sF,B.isWeakMap=oF,B.isWeakSet=aF,B.join=f5,B.kebabCase=YF,B.last=gr,B.lastIndexOf=c5,B.lowerCase=ZF,B.lowerFirst=QF,B.lt=lF,B.lte=uF,B.max=V4,B.maxBy=W4,B.mean=X4,B.meanBy=K4,B.min=Y4,B.minBy=Z4,B.stubArray=ac,B.stubFalse=lc,B.stubObject=F4,B.stubString=B4,B.stubTrue=D4,B.multiply=Q4,B.nth=h5,B.noConflict=C4,B.noop=oc,B.now=Da,B.pad=JF,B.padEnd=t4,B.padStart=e4,B.parseInt=r4,B.random=HF,B.reduce=vL,B.reduceRight=gL,B.repeat=n4,B.replace=i4,B.result=LF,B.round=J4,B.runInContext=J,B.sample=yL,B.size=xL,B.snakeCase=s4,B.some=wL,B.sortedIndex=_5,B.sortedIndexBy=b5,B.sortedIndexOf=x5,B.sortedLastIndex=w5,B.sortedLastIndexBy=T5,B.sortedLastIndexOf=E5,B.startCase=a4,B.startsWith=l4,B.subtract=tB,B.sum=eB,B.sumBy=rB,B.template=u4,B.times=U4,B.toFinite=sn,B.toInteger=Lt,B.toLength=zm,B.toLower=f4,B.toNumber=mr,B.toSafeInteger=fF,B.toString=Jt,B.toUpper=c4,B.trim=h4,B.trimEnd=d4,B.trimStart=p4,B.truncate=v4,B.unescape=g4,B.uniqueId=G4,B.upperCase=m4,B.upperFirst=rc,B.each=Im,B.eachRight=Pm,B.first=Am,sc(B,function(){var s={};return Gr(B,function(l,g){ee.call(B.prototype,g)||(s[g]=l)}),s}(),{chain:!1}),B.VERSION=n,cr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){B[s].placeholder=B}),cr(["drop","take"],function(s,l){jt.prototype[s]=function(g){g=g===r?1:Ae(Lt(g),0);var S=this.__filtered__&&!l?new jt(this):this.clone();return S.__filtered__?S.__takeCount__=De(g,S.__takeCount__):S.__views__.push({size:De(g,k),type:s+(S.__dir__<0?"Right":"")}),S},jt.prototype[s+"Right"]=function(g){return this.reverse()[s](g).reverse()}}),cr(["filter","map","takeWhile"],function(s,l){var g=l+1,S=g==F||g==Z;jt.prototype[s]=function(N){var U=this.clone();return U.__iteratees__.push({iteratee:Ot(N,3),type:g}),U.__filtered__=U.__filtered__||S,U}}),cr(["head","last"],function(s,l){var g="take"+(l?"Right":"");jt.prototype[s]=function(){return this[g](1).value()[0]}}),cr(["initial","tail"],function(s,l){var g="drop"+(l?"":"Right");jt.prototype[s]=function(){return this.__filtered__?new jt(this):this[g](1)}}),jt.prototype.compact=function(){return this.filter(Ke)},jt.prototype.find=function(s){return this.filter(s).head()},jt.prototype.findLast=function(s){return this.reverse().find(s)},jt.prototype.invokeMap=Bt(function(s,l){return typeof s=="function"?new jt(this):this.map(function(g){return ks(g,s,l)})}),jt.prototype.reject=function(s){return this.filter($a(Ot(s)))},jt.prototype.slice=function(s,l){s=Lt(s);var g=this;return g.__filtered__&&(s>0||l<0)?new jt(g):(s<0?g=g.takeRight(-s):s&&(g=g.drop(s)),l!==r&&(l=Lt(l),g=l<0?g.dropRight(-l):g.take(l-s)),g)},jt.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},jt.prototype.toArray=function(){return this.take(k)},Gr(jt.prototype,function(s,l){var g=/^(?:filter|find|map|reject)|While$/.test(l),S=/^(?:head|last)$/.test(l),N=B[S?"take"+(l=="last"?"Right":""):l],U=S||/^find/.test(l);N&&(B.prototype[l]=function(){var H=this.__wrapped__,X=S?[1]:arguments,tt=H instanceof jt,ft=X[0],ct=tt||kt(H),ht=function($t){var zt=N.apply(B,gn([$t],X));return S&&yt?zt[0]:zt};ct&&g&&typeof ft=="function"&&ft.length!=1&&(tt=ct=!1);var yt=this.__chain__,wt=!!this.__actions__.length,Ct=U&&!yt,Ft=tt&&!wt;if(!U&&ct){H=Ft?H:new jt(this);var Rt=s.apply(H,X);return Rt.__actions__.push({func:Fa,args:[ht],thisArg:r}),new dr(Rt,yt)}return Ct&&Ft?s.apply(this,X):(Rt=this.thru(ht),Ct?S?Rt.value()[0]:Rt.value():Rt)})}),cr(["pop","push","shift","sort","splice","unshift"],function(s){var l=la[s],g=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",S=/^(?:pop|shift)$/.test(s);B.prototype[s]=function(){var N=arguments;if(S&&!this.__chain__){var U=this.value();return l.apply(kt(U)?U:[],N)}return this[g](function(H){return l.apply(kt(H)?H:[],N)})}}),Gr(jt.prototype,function(s,l){var g=B[l];if(g){var S=g.name+"";ee.call(ji,S)||(ji[S]=[]),ji[S].push({name:l,func:g})}}),ji[Ra(r,m).name]=[{name:"wrapper",func:r}],jt.prototype.clone=g3,jt.prototype.reverse=m3,jt.prototype.value=y3,B.prototype.at=W5,B.prototype.chain=X5,B.prototype.commit=K5,B.prototype.next=Y5,B.prototype.plant=Q5,B.prototype.reverse=J5,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=tL,B.prototype.first=B.prototype.head,Os&&(B.prototype[Os]=Z5),B},Ui=KM();Hn?((Hn.exports=Ui)._=Ui,nf._=Ui):Me._=Ui}).call(Ye)}(ea,ea.exports);var wv=ea.exports;const gN={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,totalFrames:0,totalDuration:0},Tv=Et.forwardRef((e,t)=>{const[r,n]=Et.useState([]),[,i]=Et.useState(0),[o,a]=Et.useState([]),[,u]=mt.useState(!1),[f,h]=oN({autoPlay:!1}),d=mt.useRef(null),p=mt.useRef(null),c=mt.useRef(gN),v=mt.useRef(),{tl:y,dragModeRef:_}=mt.useContext(An),{frames:b,delays:m}=f,{src:w,startAt:T,endAt:x,frameStartAt:E,frameEndAt:I,loop:O,visible:A,transformation:{width:L=0,height:R=0,x:C,y:P,animation:M,colorCorrection:F={}},pointerdown:q}=e,{temperatureFilter:Z,sharpnessFilter:z,hueFilter:nt,blurFilter:V,adjustmentFilter:D}=_s(F),{blurRadius:k=0}=F,G=.1;pN(w,h),Ze(Oe.PAUSE,()=>{d.current&&(d.current.stop(),c.current.isPlaying=!1)}),Et.useEffect(()=>{c.current&&d.current&&(_.current?(d.current.stop(),c.current.isPlaying=!1,c.current.isDragging=!0):c.current.isDragging=!1)},[_]),Et.useEffect(()=>{if(!rl(b)){const rt=FP(b,vt=>{const{data:_t,width:At,height:ne}=vt,Ut=new Uint8Array(_t);return zr.Texture.fromBuffer(Ut,At,ne)}),ot=rt.map((vt,_t)=>({texture:vt,time:m[_t]}));n(rt),a(ot);let pt=0;m.forEach(vt=>{pt+=vt*10}),i(pt),c.current.totalDuration=pt,c.current.totalFrames=b.length}},[b,m]);const j=wv.debounce(rt=>{if(d.current){let ot=rt===0?0:rt/G;ot=isNaN(ot)?0:ot;const pt=c.current.totalFrames;ot=ot>pt?pt:ot,ot>=pt?(d.current.gotoAndStop(0),c.current.isPlaying=!1):(d.current.gotoAndPlay(ot||0),c.current.isPlaying=!0)}},20),Q=wv.debounce(()=>{d.current&&(d.current.stop(),c.current.isPlaying=!1)},50),K=rt=>{if(d.current){let ot=rt===0?0:rt/G;ot=isNaN(ot)?0:ot;const pt=c.current.totalFrames;ot=ot>pt?pt:ot,ot>=pt?(d.current.gotoAndStop(0),c.current.isPlaying=!1):(d.current.gotoAndPlay(ot||0),c.current.isPlaying=!0)}},$=()=>{d.current&&(d.current.stop(),c.current.isPlaying=!1)},W=()=>{d.current&&(d.current.stop(),c.current.isPlaying=!1)},et=rt=>{var pt;const ot=rt+((pt=v.current)==null?void 0:pt.time());d.current&&_.current?(j(ot),Q(),c.current.isPlaying=!1):v.current&&d.current&&!c.current.isPlaying&&v.current.isActive()&&y.current.isActive()&&(j(ot),c.current.isPlaying=!0)},Y=()=>{u(!0)};return mt.useEffect(()=>{let rt=_e.context(()=>{});if(p.current&&y.current){const ot={duration:Number(I)-Number(E),onStart:K,onComplete:$,onStartParams:[E,I],onCompleteParams:[],onInterrupt:W,onUpdate:et,onUpdateParams:[E,I]};v.current&&v.current.kill(),rt=_e.context(()=>{v.current=_e.from(p.current,ot,E),y.current.add(v.current,T)})}return()=>{console.log("PixiGif Sprite Component cleanup"),v.current&&(v.current.kill(),_e.killTweensOf(v.current)),rt.revert()}},[M,T,x,E,I]),Vt.jsx(ni,{...e,ref:t,ignoreTlForVideo:!0,isGif:!0,children:Vt.jsx(le.Container,{ref:p,children:r&&r.length>0&&Vt.jsx(xv,{x:C,y:P,width:L,height:R,animationSpeed:1,alpha:A?1:0,loop:O,textures:o,onComplete:Y,anchor:.5,forwardRef:d,...A&&{interactive:!0,pointerdown:q},filters:[Z,z,nt,D,...k>0?[V]:[]]})})})});Tv.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiGifSprite"};var Ev={exports:{}};/*!
1961
1961
  * Quill Editor v1.3.7
1962
1962
  * https://quilljs.com/
1963
1963
  * Copyright (c) 2014, Jason Chen
1964
1964
  * Copyright (c) 2013, salesforce.com
1965
- */(function(e,t){(function(n,i){e.exports=i()})(typeof self<"u"?self:Ye,function(){return function(r){var n={};function i(o){if(n[o])return n[o].exports;var a=n[o]={i:o,l:!1,exports:{}};return r[o].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=r,i.c=n,i.d=function(o,a,u){i.o(o,a)||Object.defineProperty(o,a,{configurable:!1,enumerable:!0,get:u})},i.n=function(o){var a=o&&o.__esModule?function(){return o.default}:function(){return o};return i.d(a,"a",a),a},i.o=function(o,a){return Object.prototype.hasOwnProperty.call(o,a)},i.p="",i(i.s=109)}([function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(17),a=i(18),u=i(19),f=i(45),h=i(46),d=i(47),p=i(48),c=i(49),v=i(12),y=i(32),b=i(33),_=i(31),m=i(1),w={Scope:m.Scope,create:m.create,find:m.find,query:m.query,register:m.register,Container:o.default,Format:a.default,Leaf:u.default,Embed:p.default,Scroll:f.default,Block:d.default,Inline:h.default,Text:c.default,Attributor:{Attribute:v.default,Class:y.default,Style:b.default,Store:_.default}};n.default=w},function(r,n,i){var o=this&&this.__extends||function(){var _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,w){m.__proto__=w}||function(m,w){for(var T in w)w.hasOwnProperty(T)&&(m[T]=w[T])};return function(m,w){_(m,w);function T(){this.constructor=m}m.prototype=w===null?Object.create(w):(T.prototype=w.prototype,new T)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=function(_){o(m,_);function m(w){var T=this;return w="[Parchment] "+w,T=_.call(this,w)||this,T.message=w,T.name=T.constructor.name,T}return m}(Error);n.ParchmentError=a;var u={},f={},h={},d={};n.DATA_KEY="__blot";var p;(function(_){_[_.TYPE=3]="TYPE",_[_.LEVEL=12]="LEVEL",_[_.ATTRIBUTE=13]="ATTRIBUTE",_[_.BLOT=14]="BLOT",_[_.INLINE=7]="INLINE",_[_.BLOCK=11]="BLOCK",_[_.BLOCK_BLOT=10]="BLOCK_BLOT",_[_.INLINE_BLOT=6]="INLINE_BLOT",_[_.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",_[_.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",_[_.ANY=15]="ANY"})(p=n.Scope||(n.Scope={}));function c(_,m){var w=y(_);if(w==null)throw new a("Unable to create "+_+" blot");var T=w,x=_ instanceof Node||_.nodeType===Node.TEXT_NODE?_:T.create(m);return new T(x,m)}n.create=c;function v(_,m){return m===void 0&&(m=!1),_==null?null:_[n.DATA_KEY]!=null?_[n.DATA_KEY].blot:m?v(_.parentNode,m):null}n.find=v;function y(_,m){m===void 0&&(m=p.ANY);var w;if(typeof _=="string")w=d[_]||u[_];else if(_ instanceof Text||_.nodeType===Node.TEXT_NODE)w=d.text;else if(typeof _=="number")_&p.LEVEL&p.BLOCK?w=d.block:_&p.LEVEL&p.INLINE&&(w=d.inline);else if(_ instanceof HTMLElement){var T=(_.getAttribute("class")||"").split(/\s+/);for(var x in T)if(w=f[T[x]],w)break;w=w||h[_.tagName]}return w==null?null:m&p.LEVEL&w.scope&&m&p.TYPE&w.scope?w:null}n.query=y;function b(){for(var _=[],m=0;m<arguments.length;m++)_[m]=arguments[m];if(_.length>1)return _.map(function(x){return b(x)});var w=_[0];if(typeof w.blotName!="string"&&typeof w.attrName!="string")throw new a("Invalid definition");if(w.blotName==="abstract")throw new a("Cannot register abstract class");if(d[w.blotName||w.attrName]=w,typeof w.keyName=="string")u[w.keyName]=w;else if(w.className!=null&&(f[w.className]=w),w.tagName!=null){Array.isArray(w.tagName)?w.tagName=w.tagName.map(function(x){return x.toUpperCase()}):w.tagName=w.tagName.toUpperCase();var T=Array.isArray(w.tagName)?w.tagName:[w.tagName];T.forEach(function(x){(h[x]==null||w.className==null)&&(h[x]=w)})}return w}n.register=b},function(r,n,i){var o=i(51),a=i(11),u=i(3),f=i(20),h=String.fromCharCode(0),d=function(p){Array.isArray(p)?this.ops=p:p!=null&&Array.isArray(p.ops)?this.ops=p.ops:this.ops=[]};d.prototype.insert=function(p,c){var v={};return p.length===0?this:(v.insert=p,c!=null&&typeof c=="object"&&Object.keys(c).length>0&&(v.attributes=c),this.push(v))},d.prototype.delete=function(p){return p<=0?this:this.push({delete:p})},d.prototype.retain=function(p,c){if(p<=0)return this;var v={retain:p};return c!=null&&typeof c=="object"&&Object.keys(c).length>0&&(v.attributes=c),this.push(v)},d.prototype.push=function(p){var c=this.ops.length,v=this.ops[c-1];if(p=u(!0,{},p),typeof v=="object"){if(typeof p.delete=="number"&&typeof v.delete=="number")return this.ops[c-1]={delete:v.delete+p.delete},this;if(typeof v.delete=="number"&&p.insert!=null&&(c-=1,v=this.ops[c-1],typeof v!="object"))return this.ops.unshift(p),this;if(a(p.attributes,v.attributes)){if(typeof p.insert=="string"&&typeof v.insert=="string")return this.ops[c-1]={insert:v.insert+p.insert},typeof p.attributes=="object"&&(this.ops[c-1].attributes=p.attributes),this;if(typeof p.retain=="number"&&typeof v.retain=="number")return this.ops[c-1]={retain:v.retain+p.retain},typeof p.attributes=="object"&&(this.ops[c-1].attributes=p.attributes),this}}return c===this.ops.length?this.ops.push(p):this.ops.splice(c,0,p),this},d.prototype.chop=function(){var p=this.ops[this.ops.length-1];return p&&p.retain&&!p.attributes&&this.ops.pop(),this},d.prototype.filter=function(p){return this.ops.filter(p)},d.prototype.forEach=function(p){this.ops.forEach(p)},d.prototype.map=function(p){return this.ops.map(p)},d.prototype.partition=function(p){var c=[],v=[];return this.forEach(function(y){var b=p(y)?c:v;b.push(y)}),[c,v]},d.prototype.reduce=function(p,c){return this.ops.reduce(p,c)},d.prototype.changeLength=function(){return this.reduce(function(p,c){return c.insert?p+f.length(c):c.delete?p-c.delete:p},0)},d.prototype.length=function(){return this.reduce(function(p,c){return p+f.length(c)},0)},d.prototype.slice=function(p,c){p=p||0,typeof c!="number"&&(c=1/0);for(var v=[],y=f.iterator(this.ops),b=0;b<c&&y.hasNext();){var _;b<p?_=y.next(p-b):(_=y.next(c-b),v.push(_)),b+=f.length(_)}return new d(v)},d.prototype.compose=function(p){var c=f.iterator(this.ops),v=f.iterator(p.ops),y=[],b=v.peek();if(b!=null&&typeof b.retain=="number"&&b.attributes==null){for(var _=b.retain;c.peekType()==="insert"&&c.peekLength()<=_;)_-=c.peekLength(),y.push(c.next());b.retain-_>0&&v.next(b.retain-_)}for(var m=new d(y);c.hasNext()||v.hasNext();)if(v.peekType()==="insert")m.push(v.next());else if(c.peekType()==="delete")m.push(c.next());else{var w=Math.min(c.peekLength(),v.peekLength()),T=c.next(w),x=v.next(w);if(typeof x.retain=="number"){var E={};typeof T.retain=="number"?E.retain=w:E.insert=T.insert;var I=f.attributes.compose(T.attributes,x.attributes,typeof T.retain=="number");if(I&&(E.attributes=I),m.push(E),!v.hasNext()&&a(m.ops[m.ops.length-1],E)){var A=new d(c.rest());return m.concat(A).chop()}}else typeof x.delete=="number"&&typeof T.retain=="number"&&m.push(x)}return m.chop()},d.prototype.concat=function(p){var c=new d(this.ops.slice());return p.ops.length>0&&(c.push(p.ops[0]),c.ops=c.ops.concat(p.ops.slice(1))),c},d.prototype.diff=function(p,c){if(this.ops===p.ops)return new d;var v=[this,p].map(function(w){return w.map(function(T){if(T.insert!=null)return typeof T.insert=="string"?T.insert:h;var x=w===p?"on":"with";throw new Error("diff() called "+x+" non-document")}).join("")}),y=new d,b=o(v[0],v[1],c),_=f.iterator(this.ops),m=f.iterator(p.ops);return b.forEach(function(w){for(var T=w[1].length;T>0;){var x=0;switch(w[0]){case o.INSERT:x=Math.min(m.peekLength(),T),y.push(m.next(x));break;case o.DELETE:x=Math.min(T,_.peekLength()),_.next(x),y.delete(x);break;case o.EQUAL:x=Math.min(_.peekLength(),m.peekLength(),T);var E=_.next(x),I=m.next(x);a(E.insert,I.insert)?y.retain(x,f.attributes.diff(E.attributes,I.attributes)):y.push(I).delete(x);break}T-=x}}),y.chop()},d.prototype.eachLine=function(p,c){c=c||`
1966
- `;for(var v=f.iterator(this.ops),y=new d,b=0;v.hasNext();){if(v.peekType()!=="insert")return;var _=v.peek(),m=f.length(_)-v.peekLength(),w=typeof _.insert=="string"?_.insert.indexOf(c,m)-m:-1;if(w<0)y.push(v.next());else if(w>0)y.push(v.next(w));else{if(p(y,v.next(1).attributes||{},b)===!1)return;b+=1,y=new d}}y.length()>0&&p(y,{},b)},d.prototype.transform=function(p,c){if(c=!!c,typeof p=="number")return this.transformPosition(p,c);for(var v=f.iterator(this.ops),y=f.iterator(p.ops),b=new d;v.hasNext()||y.hasNext();)if(v.peekType()==="insert"&&(c||y.peekType()!=="insert"))b.retain(f.length(v.next()));else if(y.peekType()==="insert")b.push(y.next());else{var _=Math.min(v.peekLength(),y.peekLength()),m=v.next(_),w=y.next(_);if(m.delete)continue;w.delete?b.push(w):b.retain(_,f.attributes.transform(m.attributes,w.attributes,c))}return b.chop()},d.prototype.transformPosition=function(p,c){c=!!c;for(var v=f.iterator(this.ops),y=0;v.hasNext()&&y<=p;){var b=v.peekLength(),_=v.peekType();if(v.next(),_==="delete"){p-=Math.min(b,p-y);continue}else _==="insert"&&(y<p||!c)&&(p+=b);y+=b}return p},r.exports=d},function(r,n){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=Object.defineProperty,u=Object.getOwnPropertyDescriptor,f=function(v){return typeof Array.isArray=="function"?Array.isArray(v):o.call(v)==="[object Array]"},h=function(v){if(!v||o.call(v)!=="[object Object]")return!1;var y=i.call(v,"constructor"),b=v.constructor&&v.constructor.prototype&&i.call(v.constructor.prototype,"isPrototypeOf");if(v.constructor&&!y&&!b)return!1;var _;for(_ in v);return typeof _>"u"||i.call(v,_)},d=function(v,y){a&&y.name==="__proto__"?a(v,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):v[y.name]=y.newValue},p=function(v,y){if(y==="__proto__")if(i.call(v,y)){if(u)return u(v,y).value}else return;return v[y]};r.exports=function c(){var v,y,b,_,m,w,T=arguments[0],x=1,E=arguments.length,I=!1;for(typeof T=="boolean"&&(I=T,T=arguments[1]||{},x=2),(T==null||typeof T!="object"&&typeof T!="function")&&(T={});x<E;++x)if(v=arguments[x],v!=null)for(y in v)b=p(T,y),_=p(v,y),T!==_&&(I&&_&&(h(_)||(m=f(_)))?(m?(m=!1,w=b&&f(b)?b:[]):w=b&&h(b)?b:{},d(T,{name:y,newValue:c(I,w,_)})):typeof _<"u"&&d(T,{name:y,newValue:_}));return T}},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BlockEmbed=n.bubbleFormats=void 0;var o=function(){function C(P,M){for(var F=0;F<M.length;F++){var q=M[F];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(P,q.key,q)}}return function(P,M,F){return M&&C(P.prototype,M),F&&C(P,F),P}}(),a=function C(P,M,F){P===null&&(P=Function.prototype);var q=Object.getOwnPropertyDescriptor(P,M);if(q===void 0){var Z=Object.getPrototypeOf(P);return Z===null?void 0:C(Z,M,F)}else{if("value"in q)return q.value;var z=q.get;return z===void 0?void 0:z.call(F)}},u=i(3),f=T(u),h=i(2),d=T(h),p=i(0),c=T(p),v=i(16),y=T(v),b=i(6),_=T(b),m=i(7),w=T(m);function T(C){return C&&C.__esModule?C:{default:C}}function x(C,P){if(!(C instanceof P))throw new TypeError("Cannot call a class as a function")}function E(C,P){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P&&(typeof P=="object"||typeof P=="function")?P:C}function I(C,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof P);C.prototype=Object.create(P&&P.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),P&&(Object.setPrototypeOf?Object.setPrototypeOf(C,P):C.__proto__=P)}var A=1,O=function(C){I(P,C);function P(){return x(this,P),E(this,(P.__proto__||Object.getPrototypeOf(P)).apply(this,arguments))}return o(P,[{key:"attach",value:function(){a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"attach",this).call(this),this.attributes=new c.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new d.default().insert(this.value(),(0,f.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(F,q){var Z=c.default.query(F,c.default.Scope.BLOCK_ATTRIBUTE);Z!=null&&this.attributes.attribute(Z,q)}},{key:"formatAt",value:function(F,q,Z,z){this.format(Z,z)}},{key:"insertAt",value:function(F,q,Z){if(typeof q=="string"&&q.endsWith(`
1967
- `)){var z=c.default.create(L.blotName);this.parent.insertBefore(z,F===0?this:this.next),z.insertAt(0,q.slice(0,-1))}else a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"insertAt",this).call(this,F,q,Z)}}]),P}(c.default.Embed);O.scope=c.default.Scope.BLOCK_BLOT;var L=function(C){I(P,C);function P(M){x(this,P);var F=E(this,(P.__proto__||Object.getPrototypeOf(P)).call(this,M));return F.cache={},F}return o(P,[{key:"delta",value:function(){return this.cache.delta==null&&(this.cache.delta=this.descendants(c.default.Leaf).reduce(function(F,q){return q.length()===0?F:F.insert(q.value(),R(q))},new d.default).insert(`
1965
+ */(function(e,t){(function(n,i){e.exports=i()})(typeof self<"u"?self:Ye,function(){return function(r){var n={};function i(o){if(n[o])return n[o].exports;var a=n[o]={i:o,l:!1,exports:{}};return r[o].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=r,i.c=n,i.d=function(o,a,u){i.o(o,a)||Object.defineProperty(o,a,{configurable:!1,enumerable:!0,get:u})},i.n=function(o){var a=o&&o.__esModule?function(){return o.default}:function(){return o};return i.d(a,"a",a),a},i.o=function(o,a){return Object.prototype.hasOwnProperty.call(o,a)},i.p="",i(i.s=109)}([function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(17),a=i(18),u=i(19),f=i(45),h=i(46),d=i(47),p=i(48),c=i(49),v=i(12),y=i(32),_=i(33),b=i(31),m=i(1),w={Scope:m.Scope,create:m.create,find:m.find,query:m.query,register:m.register,Container:o.default,Format:a.default,Leaf:u.default,Embed:p.default,Scroll:f.default,Block:d.default,Inline:h.default,Text:c.default,Attributor:{Attribute:v.default,Class:y.default,Style:_.default,Store:b.default}};n.default=w},function(r,n,i){var o=this&&this.__extends||function(){var b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,w){m.__proto__=w}||function(m,w){for(var T in w)w.hasOwnProperty(T)&&(m[T]=w[T])};return function(m,w){b(m,w);function T(){this.constructor=m}m.prototype=w===null?Object.create(w):(T.prototype=w.prototype,new T)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=function(b){o(m,b);function m(w){var T=this;return w="[Parchment] "+w,T=b.call(this,w)||this,T.message=w,T.name=T.constructor.name,T}return m}(Error);n.ParchmentError=a;var u={},f={},h={},d={};n.DATA_KEY="__blot";var p;(function(b){b[b.TYPE=3]="TYPE",b[b.LEVEL=12]="LEVEL",b[b.ATTRIBUTE=13]="ATTRIBUTE",b[b.BLOT=14]="BLOT",b[b.INLINE=7]="INLINE",b[b.BLOCK=11]="BLOCK",b[b.BLOCK_BLOT=10]="BLOCK_BLOT",b[b.INLINE_BLOT=6]="INLINE_BLOT",b[b.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",b[b.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",b[b.ANY=15]="ANY"})(p=n.Scope||(n.Scope={}));function c(b,m){var w=y(b);if(w==null)throw new a("Unable to create "+b+" blot");var T=w,x=b instanceof Node||b.nodeType===Node.TEXT_NODE?b:T.create(m);return new T(x,m)}n.create=c;function v(b,m){return m===void 0&&(m=!1),b==null?null:b[n.DATA_KEY]!=null?b[n.DATA_KEY].blot:m?v(b.parentNode,m):null}n.find=v;function y(b,m){m===void 0&&(m=p.ANY);var w;if(typeof b=="string")w=d[b]||u[b];else if(b instanceof Text||b.nodeType===Node.TEXT_NODE)w=d.text;else if(typeof b=="number")b&p.LEVEL&p.BLOCK?w=d.block:b&p.LEVEL&p.INLINE&&(w=d.inline);else if(b instanceof HTMLElement){var T=(b.getAttribute("class")||"").split(/\s+/);for(var x in T)if(w=f[T[x]],w)break;w=w||h[b.tagName]}return w==null?null:m&p.LEVEL&w.scope&&m&p.TYPE&w.scope?w:null}n.query=y;function _(){for(var b=[],m=0;m<arguments.length;m++)b[m]=arguments[m];if(b.length>1)return b.map(function(x){return _(x)});var w=b[0];if(typeof w.blotName!="string"&&typeof w.attrName!="string")throw new a("Invalid definition");if(w.blotName==="abstract")throw new a("Cannot register abstract class");if(d[w.blotName||w.attrName]=w,typeof w.keyName=="string")u[w.keyName]=w;else if(w.className!=null&&(f[w.className]=w),w.tagName!=null){Array.isArray(w.tagName)?w.tagName=w.tagName.map(function(x){return x.toUpperCase()}):w.tagName=w.tagName.toUpperCase();var T=Array.isArray(w.tagName)?w.tagName:[w.tagName];T.forEach(function(x){(h[x]==null||w.className==null)&&(h[x]=w)})}return w}n.register=_},function(r,n,i){var o=i(51),a=i(11),u=i(3),f=i(20),h=String.fromCharCode(0),d=function(p){Array.isArray(p)?this.ops=p:p!=null&&Array.isArray(p.ops)?this.ops=p.ops:this.ops=[]};d.prototype.insert=function(p,c){var v={};return p.length===0?this:(v.insert=p,c!=null&&typeof c=="object"&&Object.keys(c).length>0&&(v.attributes=c),this.push(v))},d.prototype.delete=function(p){return p<=0?this:this.push({delete:p})},d.prototype.retain=function(p,c){if(p<=0)return this;var v={retain:p};return c!=null&&typeof c=="object"&&Object.keys(c).length>0&&(v.attributes=c),this.push(v)},d.prototype.push=function(p){var c=this.ops.length,v=this.ops[c-1];if(p=u(!0,{},p),typeof v=="object"){if(typeof p.delete=="number"&&typeof v.delete=="number")return this.ops[c-1]={delete:v.delete+p.delete},this;if(typeof v.delete=="number"&&p.insert!=null&&(c-=1,v=this.ops[c-1],typeof v!="object"))return this.ops.unshift(p),this;if(a(p.attributes,v.attributes)){if(typeof p.insert=="string"&&typeof v.insert=="string")return this.ops[c-1]={insert:v.insert+p.insert},typeof p.attributes=="object"&&(this.ops[c-1].attributes=p.attributes),this;if(typeof p.retain=="number"&&typeof v.retain=="number")return this.ops[c-1]={retain:v.retain+p.retain},typeof p.attributes=="object"&&(this.ops[c-1].attributes=p.attributes),this}}return c===this.ops.length?this.ops.push(p):this.ops.splice(c,0,p),this},d.prototype.chop=function(){var p=this.ops[this.ops.length-1];return p&&p.retain&&!p.attributes&&this.ops.pop(),this},d.prototype.filter=function(p){return this.ops.filter(p)},d.prototype.forEach=function(p){this.ops.forEach(p)},d.prototype.map=function(p){return this.ops.map(p)},d.prototype.partition=function(p){var c=[],v=[];return this.forEach(function(y){var _=p(y)?c:v;_.push(y)}),[c,v]},d.prototype.reduce=function(p,c){return this.ops.reduce(p,c)},d.prototype.changeLength=function(){return this.reduce(function(p,c){return c.insert?p+f.length(c):c.delete?p-c.delete:p},0)},d.prototype.length=function(){return this.reduce(function(p,c){return p+f.length(c)},0)},d.prototype.slice=function(p,c){p=p||0,typeof c!="number"&&(c=1/0);for(var v=[],y=f.iterator(this.ops),_=0;_<c&&y.hasNext();){var b;_<p?b=y.next(p-_):(b=y.next(c-_),v.push(b)),_+=f.length(b)}return new d(v)},d.prototype.compose=function(p){var c=f.iterator(this.ops),v=f.iterator(p.ops),y=[],_=v.peek();if(_!=null&&typeof _.retain=="number"&&_.attributes==null){for(var b=_.retain;c.peekType()==="insert"&&c.peekLength()<=b;)b-=c.peekLength(),y.push(c.next());_.retain-b>0&&v.next(_.retain-b)}for(var m=new d(y);c.hasNext()||v.hasNext();)if(v.peekType()==="insert")m.push(v.next());else if(c.peekType()==="delete")m.push(c.next());else{var w=Math.min(c.peekLength(),v.peekLength()),T=c.next(w),x=v.next(w);if(typeof x.retain=="number"){var E={};typeof T.retain=="number"?E.retain=w:E.insert=T.insert;var I=f.attributes.compose(T.attributes,x.attributes,typeof T.retain=="number");if(I&&(E.attributes=I),m.push(E),!v.hasNext()&&a(m.ops[m.ops.length-1],E)){var O=new d(c.rest());return m.concat(O).chop()}}else typeof x.delete=="number"&&typeof T.retain=="number"&&m.push(x)}return m.chop()},d.prototype.concat=function(p){var c=new d(this.ops.slice());return p.ops.length>0&&(c.push(p.ops[0]),c.ops=c.ops.concat(p.ops.slice(1))),c},d.prototype.diff=function(p,c){if(this.ops===p.ops)return new d;var v=[this,p].map(function(w){return w.map(function(T){if(T.insert!=null)return typeof T.insert=="string"?T.insert:h;var x=w===p?"on":"with";throw new Error("diff() called "+x+" non-document")}).join("")}),y=new d,_=o(v[0],v[1],c),b=f.iterator(this.ops),m=f.iterator(p.ops);return _.forEach(function(w){for(var T=w[1].length;T>0;){var x=0;switch(w[0]){case o.INSERT:x=Math.min(m.peekLength(),T),y.push(m.next(x));break;case o.DELETE:x=Math.min(T,b.peekLength()),b.next(x),y.delete(x);break;case o.EQUAL:x=Math.min(b.peekLength(),m.peekLength(),T);var E=b.next(x),I=m.next(x);a(E.insert,I.insert)?y.retain(x,f.attributes.diff(E.attributes,I.attributes)):y.push(I).delete(x);break}T-=x}}),y.chop()},d.prototype.eachLine=function(p,c){c=c||`
1966
+ `;for(var v=f.iterator(this.ops),y=new d,_=0;v.hasNext();){if(v.peekType()!=="insert")return;var b=v.peek(),m=f.length(b)-v.peekLength(),w=typeof b.insert=="string"?b.insert.indexOf(c,m)-m:-1;if(w<0)y.push(v.next());else if(w>0)y.push(v.next(w));else{if(p(y,v.next(1).attributes||{},_)===!1)return;_+=1,y=new d}}y.length()>0&&p(y,{},_)},d.prototype.transform=function(p,c){if(c=!!c,typeof p=="number")return this.transformPosition(p,c);for(var v=f.iterator(this.ops),y=f.iterator(p.ops),_=new d;v.hasNext()||y.hasNext();)if(v.peekType()==="insert"&&(c||y.peekType()!=="insert"))_.retain(f.length(v.next()));else if(y.peekType()==="insert")_.push(y.next());else{var b=Math.min(v.peekLength(),y.peekLength()),m=v.next(b),w=y.next(b);if(m.delete)continue;w.delete?_.push(w):_.retain(b,f.attributes.transform(m.attributes,w.attributes,c))}return _.chop()},d.prototype.transformPosition=function(p,c){c=!!c;for(var v=f.iterator(this.ops),y=0;v.hasNext()&&y<=p;){var _=v.peekLength(),b=v.peekType();if(v.next(),b==="delete"){p-=Math.min(_,p-y);continue}else b==="insert"&&(y<p||!c)&&(p+=_);y+=_}return p},r.exports=d},function(r,n){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=Object.defineProperty,u=Object.getOwnPropertyDescriptor,f=function(v){return typeof Array.isArray=="function"?Array.isArray(v):o.call(v)==="[object Array]"},h=function(v){if(!v||o.call(v)!=="[object Object]")return!1;var y=i.call(v,"constructor"),_=v.constructor&&v.constructor.prototype&&i.call(v.constructor.prototype,"isPrototypeOf");if(v.constructor&&!y&&!_)return!1;var b;for(b in v);return typeof b>"u"||i.call(v,b)},d=function(v,y){a&&y.name==="__proto__"?a(v,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):v[y.name]=y.newValue},p=function(v,y){if(y==="__proto__")if(i.call(v,y)){if(u)return u(v,y).value}else return;return v[y]};r.exports=function c(){var v,y,_,b,m,w,T=arguments[0],x=1,E=arguments.length,I=!1;for(typeof T=="boolean"&&(I=T,T=arguments[1]||{},x=2),(T==null||typeof T!="object"&&typeof T!="function")&&(T={});x<E;++x)if(v=arguments[x],v!=null)for(y in v)_=p(T,y),b=p(v,y),T!==b&&(I&&b&&(h(b)||(m=f(b)))?(m?(m=!1,w=_&&f(_)?_:[]):w=_&&h(_)?_:{},d(T,{name:y,newValue:c(I,w,b)})):typeof b<"u"&&d(T,{name:y,newValue:b}));return T}},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BlockEmbed=n.bubbleFormats=void 0;var o=function(){function C(P,M){for(var F=0;F<M.length;F++){var q=M[F];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(P,q.key,q)}}return function(P,M,F){return M&&C(P.prototype,M),F&&C(P,F),P}}(),a=function C(P,M,F){P===null&&(P=Function.prototype);var q=Object.getOwnPropertyDescriptor(P,M);if(q===void 0){var Z=Object.getPrototypeOf(P);return Z===null?void 0:C(Z,M,F)}else{if("value"in q)return q.value;var z=q.get;return z===void 0?void 0:z.call(F)}},u=i(3),f=T(u),h=i(2),d=T(h),p=i(0),c=T(p),v=i(16),y=T(v),_=i(6),b=T(_),m=i(7),w=T(m);function T(C){return C&&C.__esModule?C:{default:C}}function x(C,P){if(!(C instanceof P))throw new TypeError("Cannot call a class as a function")}function E(C,P){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P&&(typeof P=="object"||typeof P=="function")?P:C}function I(C,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof P);C.prototype=Object.create(P&&P.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),P&&(Object.setPrototypeOf?Object.setPrototypeOf(C,P):C.__proto__=P)}var O=1,A=function(C){I(P,C);function P(){return x(this,P),E(this,(P.__proto__||Object.getPrototypeOf(P)).apply(this,arguments))}return o(P,[{key:"attach",value:function(){a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"attach",this).call(this),this.attributes=new c.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new d.default().insert(this.value(),(0,f.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(F,q){var Z=c.default.query(F,c.default.Scope.BLOCK_ATTRIBUTE);Z!=null&&this.attributes.attribute(Z,q)}},{key:"formatAt",value:function(F,q,Z,z){this.format(Z,z)}},{key:"insertAt",value:function(F,q,Z){if(typeof q=="string"&&q.endsWith(`
1967
+ `)){var z=c.default.create(L.blotName);this.parent.insertBefore(z,F===0?this:this.next),z.insertAt(0,q.slice(0,-1))}else a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"insertAt",this).call(this,F,q,Z)}}]),P}(c.default.Embed);A.scope=c.default.Scope.BLOCK_BLOT;var L=function(C){I(P,C);function P(M){x(this,P);var F=E(this,(P.__proto__||Object.getPrototypeOf(P)).call(this,M));return F.cache={},F}return o(P,[{key:"delta",value:function(){return this.cache.delta==null&&(this.cache.delta=this.descendants(c.default.Leaf).reduce(function(F,q){return q.length()===0?F:F.insert(q.value(),R(q))},new d.default).insert(`
1968
1968
  `,R(this))),this.cache.delta}},{key:"deleteAt",value:function(F,q){a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"deleteAt",this).call(this,F,q),this.cache={}}},{key:"formatAt",value:function(F,q,Z,z){q<=0||(c.default.query(Z,c.default.Scope.BLOCK)?F+q===this.length()&&this.format(Z,z):a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"formatAt",this).call(this,F,Math.min(q,this.length()-F-1),Z,z),this.cache={})}},{key:"insertAt",value:function(F,q,Z){if(Z!=null)return a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"insertAt",this).call(this,F,q,Z);if(q.length!==0){var z=q.split(`
1969
- `),nt=z.shift();nt.length>0&&(F<this.length()-1||this.children.tail==null?a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"insertAt",this).call(this,Math.min(F,this.length()-1),nt):this.children.tail.insertAt(this.children.tail.length(),nt),this.cache={});var V=this;z.reduce(function(U,k){return V=V.split(U,!0),V.insertAt(0,k),k.length},F+nt.length)}}},{key:"insertBefore",value:function(F,q){var Z=this.children.head;a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"insertBefore",this).call(this,F,q),Z instanceof y.default&&Z.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"length",this).call(this)+A),this.cache.length}},{key:"moveChildren",value:function(F,q){a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"moveChildren",this).call(this,F,q),this.cache={}}},{key:"optimize",value:function(F){a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"optimize",this).call(this,F),this.cache={}}},{key:"path",value:function(F){return a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"path",this).call(this,F,!0)}},{key:"removeChild",value:function(F){a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"removeChild",this).call(this,F),this.cache={}}},{key:"split",value:function(F){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(q&&(F===0||F>=this.length()-A)){var Z=this.clone();return F===0?(this.parent.insertBefore(Z,this),this):(this.parent.insertBefore(Z,this.next),Z)}else{var z=a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"split",this).call(this,F,q);return this.cache={},z}}}]),P}(c.default.Block);L.blotName="block",L.tagName="P",L.defaultChild="break",L.allowedChildren=[_.default,c.default.Embed,w.default];function R(C){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return C==null||(typeof C.formats=="function"&&(P=(0,f.default)(P,C.formats())),C.parent==null||C.parent.blotName=="scroll"||C.parent.statics.scope!==C.statics.scope)?P:R(C.parent,P)}n.bubbleFormats=R,n.BlockEmbed=O,n.default=L},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.overload=n.expandConfig=void 0;var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},a=function(){function V(U,k){var j=[],G=!0,X=!1,Y=void 0;try{for(var $=U[Symbol.iterator](),W;!(G=(W=$.next()).done)&&(j.push(W.value),!(k&&j.length===k));G=!0);}catch(et){X=!0,Y=et}finally{try{!G&&$.return&&$.return()}finally{if(X)throw Y}}return j}return function(U,k){if(Array.isArray(U))return U;if(Symbol.iterator in Object(U))return V(U,k);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function V(U,k){for(var j=0;j<k.length;j++){var G=k[j];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(U,G.key,G)}}return function(U,k,j){return k&&V(U.prototype,k),j&&V(U,j),U}}();i(50);var f=i(2),h=R(f),d=i(14),p=R(d),c=i(8),v=R(c),y=i(9),b=R(y),_=i(0),m=R(_),w=i(15),T=R(w),x=i(3),E=R(x),I=i(10),A=R(I),O=i(34),L=R(O);function R(V){return V&&V.__esModule?V:{default:V}}function C(V,U,k){return U in V?Object.defineProperty(V,U,{value:k,enumerable:!0,configurable:!0,writable:!0}):V[U]=k,V}function P(V,U){if(!(V instanceof U))throw new TypeError("Cannot call a class as a function")}var M=(0,A.default)("quill"),F=function(){u(V,null,[{key:"debug",value:function(k){k===!0&&(k="log"),A.default.level(k)}},{key:"find",value:function(k){return k.__quill||m.default.find(k)}},{key:"import",value:function(k){return this.imports[k]==null&&M.error("Cannot import "+k+". Are you sure it was registered?"),this.imports[k]}},{key:"register",value:function(k,j){var G=this,X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof k!="string"){var Y=k.attrName||k.blotName;typeof Y=="string"?this.register("formats/"+Y,k,j):Object.keys(k).forEach(function($){G.register($,k[$],j)})}else this.imports[k]!=null&&!X&&M.warn("Overwriting "+k+" with",j),this.imports[k]=j,(k.startsWith("blots/")||k.startsWith("formats/"))&&j.blotName!=="abstract"?m.default.register(j):k.startsWith("modules")&&typeof j.register=="function"&&j.register()}}]);function V(U){var k=this,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(P(this,V),this.options=q(U,j),this.container=this.options.container,this.container==null)return M.error("Invalid Quill container",U);this.options.debug&&V.debug(this.options.debug);var G=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new v.default,this.scroll=m.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new p.default(this.scroll),this.selection=new T.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(v.default.events.EDITOR_CHANGE,function(Y){Y===v.default.events.TEXT_CHANGE&&k.root.classList.toggle("ql-blank",k.editor.isBlank())}),this.emitter.on(v.default.events.SCROLL_UPDATE,function(Y,$){var W=k.selection.lastRange,et=W&&W.length===0?W.index:void 0;Z.call(k,function(){return k.editor.update(null,$,et)},Y)});var X=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+G+"<p><br></p></div>");this.setContents(X),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return u(V,[{key:"addContainer",value:function(k){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof k=="string"){var G=k;k=document.createElement("div"),k.classList.add(G)}return this.container.insertBefore(k,j),k}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(k,j,G){var X=this,Y=z(k,j,G),$=a(Y,4);return k=$[0],j=$[1],G=$[3],Z.call(this,function(){return X.editor.deleteText(k,j)},G,k,-1*j)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(k),this.container.classList.toggle("ql-disabled",!k)}},{key:"focus",value:function(){var k=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=k,this.scrollIntoView()}},{key:"format",value:function(k,j){var G=this,X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:v.default.sources.API;return Z.call(this,function(){var Y=G.getSelection(!0),$=new h.default;if(Y==null)return $;if(m.default.query(k,m.default.Scope.BLOCK))$=G.editor.formatLine(Y.index,Y.length,C({},k,j));else{if(Y.length===0)return G.selection.format(k,j),$;$=G.editor.formatText(Y.index,Y.length,C({},k,j))}return G.setSelection(Y,v.default.sources.SILENT),$},X)}},{key:"formatLine",value:function(k,j,G,X,Y){var $=this,W=void 0,et=z(k,j,G,X,Y),J=a(et,4);return k=J[0],j=J[1],W=J[2],Y=J[3],Z.call(this,function(){return $.editor.formatLine(k,j,W)},Y,k,0)}},{key:"formatText",value:function(k,j,G,X,Y){var $=this,W=void 0,et=z(k,j,G,X,Y),J=a(et,4);return k=J[0],j=J[1],W=J[2],Y=J[3],Z.call(this,function(){return $.editor.formatText(k,j,W)},Y,k,0)}},{key:"getBounds",value:function(k){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,G=void 0;typeof k=="number"?G=this.selection.getBounds(k,j):G=this.selection.getBounds(k.index,k.length);var X=this.container.getBoundingClientRect();return{bottom:G.bottom-X.top,height:G.height,left:G.left-X.left,right:G.right-X.left,top:G.top-X.top,width:G.width}}},{key:"getContents",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-k,G=z(k,j),X=a(G,2);return k=X[0],j=X[1],this.editor.getContents(k,j)}},{key:"getFormat",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof k=="number"?this.editor.getFormat(k,j):this.editor.getFormat(k.index,k.length)}},{key:"getIndex",value:function(k){return k.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(k){return this.scroll.leaf(k)}},{key:"getLine",value:function(k){return this.scroll.line(k)}},{key:"getLines",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof k!="number"?this.scroll.lines(k.index,k.length):this.scroll.lines(k,j)}},{key:"getModule",value:function(k){return this.theme.modules[k]}},{key:"getSelection",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return k&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-k,G=z(k,j),X=a(G,2);return k=X[0],j=X[1],this.editor.getText(k,j)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(k,j,G){var X=this,Y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:V.sources.API;return Z.call(this,function(){return X.editor.insertEmbed(k,j,G)},Y,k)}},{key:"insertText",value:function(k,j,G,X,Y){var $=this,W=void 0,et=z(k,0,G,X,Y),J=a(et,4);return k=J[0],W=J[2],Y=J[3],Z.call(this,function(){return $.editor.insertText(k,j,W)},Y,k,j.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(k,j,G){this.clipboard.dangerouslyPasteHTML(k,j,G)}},{key:"removeFormat",value:function(k,j,G){var X=this,Y=z(k,j,G),$=a(Y,4);return k=$[0],j=$[1],G=$[3],Z.call(this,function(){return X.editor.removeFormat(k,j)},G,k)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(k){var j=this,G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API;return Z.call(this,function(){k=new h.default(k);var X=j.getLength(),Y=j.editor.deleteText(0,X),$=j.editor.applyDelta(k),W=$.ops[$.ops.length-1];W!=null&&typeof W.insert=="string"&&W.insert[W.insert.length-1]===`
1970
- `&&(j.editor.deleteText(j.getLength()-1,1),$.delete(1));var et=Y.compose($);return et},G)}},{key:"setSelection",value:function(k,j,G){if(k==null)this.selection.setRange(null,j||V.sources.API);else{var X=z(k,j,G),Y=a(X,4);k=Y[0],j=Y[1],G=Y[3],this.selection.setRange(new w.Range(k,j),G),G!==v.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(k){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API,G=new h.default().insert(k);return this.setContents(G,j)}},{key:"update",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v.default.sources.USER,j=this.scroll.update(k);return this.selection.update(k),j}},{key:"updateContents",value:function(k){var j=this,G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API;return Z.call(this,function(){return k=new h.default(k),j.editor.applyDelta(k,G)},G,!0)}}]),V}();F.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},F.events=v.default.events,F.sources=v.default.sources,F.version="1.3.7",F.imports={delta:h.default,parchment:m.default,"core/module":b.default,"core/theme":L.default};function q(V,U){if(U=(0,E.default)(!0,{container:V,modules:{clipboard:!0,keyboard:!0,history:!0}},U),!U.theme||U.theme===F.DEFAULTS.theme)U.theme=L.default;else if(U.theme=F.import("themes/"+U.theme),U.theme==null)throw new Error("Invalid theme "+U.theme+". Did you register it?");var k=(0,E.default)(!0,{},U.theme.DEFAULTS);[k,U].forEach(function(X){X.modules=X.modules||{},Object.keys(X.modules).forEach(function(Y){X.modules[Y]===!0&&(X.modules[Y]={})})});var j=Object.keys(k.modules).concat(Object.keys(U.modules)),G=j.reduce(function(X,Y){var $=F.import("modules/"+Y);return $==null?M.error("Cannot load "+Y+" module. Are you sure you registered it?"):X[Y]=$.DEFAULTS||{},X},{});return U.modules!=null&&U.modules.toolbar&&U.modules.toolbar.constructor!==Object&&(U.modules.toolbar={container:U.modules.toolbar}),U=(0,E.default)(!0,{},F.DEFAULTS,{modules:G},k,U),["bounds","container","scrollingContainer"].forEach(function(X){typeof U[X]=="string"&&(U[X]=document.querySelector(U[X]))}),U.modules=Object.keys(U.modules).reduce(function(X,Y){return U.modules[Y]&&(X[Y]=U.modules[Y]),X},{}),U}function Z(V,U,k,j){if(this.options.strict&&!this.isEnabled()&&U===v.default.sources.USER)return new h.default;var G=k==null?null:this.getSelection(),X=this.editor.delta,Y=V();if(G!=null&&(k===!0&&(k=G.index),j==null?G=nt(G,Y,U):j!==0&&(G=nt(G,k,j,U)),this.setSelection(G,v.default.sources.SILENT)),Y.length()>0){var $,W=[v.default.events.TEXT_CHANGE,Y,X,U];if(($=this.emitter).emit.apply($,[v.default.events.EDITOR_CHANGE].concat(W)),U!==v.default.sources.SILENT){var et;(et=this.emitter).emit.apply(et,W)}}return Y}function z(V,U,k,j,G){var X={};return typeof V.index=="number"&&typeof V.length=="number"?typeof U!="number"?(G=j,j=k,k=U,U=V.length,V=V.index):(U=V.length,V=V.index):typeof U!="number"&&(G=j,j=k,k=U,U=0),(typeof k>"u"?"undefined":o(k))==="object"?(X=k,G=j):typeof k=="string"&&(j!=null?X[k]=j:G=k),G=G||v.default.sources.API,[V,U,X,G]}function nt(V,U,k,j){if(V==null)return null;var G=void 0,X=void 0;if(U instanceof h.default){var Y=[V.index,V.index+V.length].map(function(J){return U.transformPosition(J,j!==v.default.sources.USER)}),$=a(Y,2);G=$[0],X=$[1]}else{var W=[V.index,V.index+V.length].map(function(J){return J<U||J===U&&j===v.default.sources.USER?J:k>=0?J+k:Math.max(U,J+k)}),et=a(W,2);G=et[0],X=et[1]}return new w.Range(G,X-G)}n.expandConfig=q,n.overload=z,n.default=F},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function _(m,w){for(var T=0;T<w.length;T++){var x=w[T];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,w,T){return w&&_(m.prototype,w),T&&_(m,T),m}}(),a=function _(m,w,T){m===null&&(m=Function.prototype);var x=Object.getOwnPropertyDescriptor(m,w);if(x===void 0){var E=Object.getPrototypeOf(m);return E===null?void 0:_(E,w,T)}else{if("value"in x)return x.value;var I=x.get;return I===void 0?void 0:I.call(T)}},u=i(7),f=p(u),h=i(0),d=p(h);function p(_){return _&&_.__esModule?_:{default:_}}function c(_,m){if(!(_ instanceof m))throw new TypeError("Cannot call a class as a function")}function v(_,m){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:_}function y(_,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);_.prototype=Object.create(m&&m.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(_,m):_.__proto__=m)}var b=function(_){y(m,_);function m(){return c(this,m),v(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return o(m,[{key:"formatAt",value:function(T,x,E,I){if(m.compare(this.statics.blotName,E)<0&&d.default.query(E,d.default.Scope.BLOT)){var A=this.isolate(T,x);I&&A.wrap(E,I)}else a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"formatAt",this).call(this,T,x,E,I)}},{key:"optimize",value:function(T){if(a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"optimize",this).call(this,T),this.parent instanceof m&&m.compare(this.statics.blotName,this.parent.statics.blotName)>0){var x=this.parent.isolate(this.offset(),this.length());this.moveChildren(x),x.wrap(this)}}}],[{key:"compare",value:function(T,x){var E=m.order.indexOf(T),I=m.order.indexOf(x);return E>=0||I>=0?E-I:T===x?0:T<x?-1:1}}]),m}(d.default.Inline);b.allowedChildren=[b,d.default.Embed,f.default],b.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],n.default=b},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(0),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function d(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var p=function(c){d(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(a.default.Text);n.default=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function w(T,x){for(var E=0;E<x.length;E++){var I=x[E];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(T,I.key,I)}}return function(T,x,E){return x&&w(T.prototype,x),E&&w(T,E),T}}(),a=function w(T,x,E){T===null&&(T=Function.prototype);var I=Object.getOwnPropertyDescriptor(T,x);if(I===void 0){var A=Object.getPrototypeOf(T);return A===null?void 0:w(A,x,E)}else{if("value"in I)return I.value;var O=I.get;return O===void 0?void 0:O.call(E)}},u=i(54),f=p(u),h=i(10),d=p(h);function p(w){return w&&w.__esModule?w:{default:w}}function c(w,T){if(!(w instanceof T))throw new TypeError("Cannot call a class as a function")}function v(w,T){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T&&(typeof T=="object"||typeof T=="function")?T:w}function y(w,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof T);w.prototype=Object.create(T&&T.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(w,T):w.__proto__=T)}var b=(0,d.default)("quill:events"),_=["selectionchange","mousedown","mouseup","click"];_.forEach(function(w){document.addEventListener(w,function(){for(var T=arguments.length,x=Array(T),E=0;E<T;E++)x[E]=arguments[E];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(I){if(I.__quill&&I.__quill.emitter){var A;(A=I.__quill.emitter).handleDOM.apply(A,x)}})})});var m=function(w){y(T,w);function T(){c(this,T);var x=v(this,(T.__proto__||Object.getPrototypeOf(T)).call(this));return x.listeners={},x.on("error",b.error),x}return o(T,[{key:"emit",value:function(){b.log.apply(b,arguments),a(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(E){for(var I=arguments.length,A=Array(I>1?I-1:0),O=1;O<I;O++)A[O-1]=arguments[O];(this.listeners[E.type]||[]).forEach(function(L){var R=L.node,C=L.handler;(E.target===R||R.contains(E.target))&&C.apply(void 0,[E].concat(A))})}},{key:"listenDOM",value:function(E,I,A){this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push({node:I,handler:A})}}]),T}(f.default);m.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},m.sources={API:"api",SILENT:"silent",USER:"user"},n.default=m},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});function o(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}var a=function u(f){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};o(this,u),this.quill=f,this.options=h};a.DEFAULTS={},n.default=a},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=["error","warn","log","info"],a="warn";function u(h){if(o.indexOf(h)<=o.indexOf(a)){for(var d,p=arguments.length,c=Array(p>1?p-1:0),v=1;v<p;v++)c[v-1]=arguments[v];(d=console)[h].apply(d,c)}}function f(h){return o.reduce(function(d,p){return d[p]=u.bind(console,p,h),d},{})}u.level=f.level=function(h){a=h},n.default=f},function(r,n,i){var o=Array.prototype.slice,a=i(52),u=i(53),f=r.exports=function(c,v,y){return y||(y={}),c===v?!0:c instanceof Date&&v instanceof Date?c.getTime()===v.getTime():!c||!v||typeof c!="object"&&typeof v!="object"?y.strict?c===v:c==v:p(c,v,y)};function h(c){return c==null}function d(c){return!(!c||typeof c!="object"||typeof c.length!="number"||typeof c.copy!="function"||typeof c.slice!="function"||c.length>0&&typeof c[0]!="number")}function p(c,v,y){var b,_;if(h(c)||h(v)||c.prototype!==v.prototype)return!1;if(u(c))return u(v)?(c=o.call(c),v=o.call(v),f(c,v,y)):!1;if(d(c)){if(!d(v)||c.length!==v.length)return!1;for(b=0;b<c.length;b++)if(c[b]!==v[b])return!1;return!0}try{var m=a(c),w=a(v)}catch{return!1}if(m.length!=w.length)return!1;for(m.sort(),w.sort(),b=m.length-1;b>=0;b--)if(m[b]!=w[b])return!1;for(b=m.length-1;b>=0;b--)if(_=m[b],!f(c[_],v[_],y))return!1;return typeof c==typeof v}},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(1),a=function(){function u(f,h,d){d===void 0&&(d={}),this.attrName=f,this.keyName=h;var p=o.Scope.TYPE&o.Scope.ATTRIBUTE;d.scope!=null?this.scope=d.scope&o.Scope.LEVEL|p:this.scope=o.Scope.ATTRIBUTE,d.whitelist!=null&&(this.whitelist=d.whitelist)}return u.keys=function(f){return[].map.call(f.attributes,function(h){return h.name})},u.prototype.add=function(f,h){return this.canAdd(f,h)?(f.setAttribute(this.keyName,h),!0):!1},u.prototype.canAdd=function(f,h){var d=o.query(f,o.Scope.BLOT&(this.scope|o.Scope.TYPE));return d==null?!1:this.whitelist==null?!0:typeof h=="string"?this.whitelist.indexOf(h.replace(/["']/g,""))>-1:this.whitelist.indexOf(h)>-1},u.prototype.remove=function(f){f.removeAttribute(this.keyName)},u.prototype.value=function(f){var h=f.getAttribute(this.keyName);return this.canAdd(f,h)&&h?h:""},u}();n.default=a},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Code=void 0;var o=function(){function O(L,R){var C=[],P=!0,M=!1,F=void 0;try{for(var q=L[Symbol.iterator](),Z;!(P=(Z=q.next()).done)&&(C.push(Z.value),!(R&&C.length===R));P=!0);}catch(z){M=!0,F=z}finally{try{!P&&q.return&&q.return()}finally{if(M)throw F}}return C}return function(L,R){if(Array.isArray(L))return L;if(Symbol.iterator in Object(L))return O(L,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function O(L,R){for(var C=0;C<R.length;C++){var P=R[C];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(L,P.key,P)}}return function(L,R,C){return R&&O(L.prototype,R),C&&O(L,C),L}}(),u=function O(L,R,C){L===null&&(L=Function.prototype);var P=Object.getOwnPropertyDescriptor(L,R);if(P===void 0){var M=Object.getPrototypeOf(L);return M===null?void 0:O(M,R,C)}else{if("value"in P)return P.value;var F=P.get;return F===void 0?void 0:F.call(C)}},f=i(2),h=w(f),d=i(0),p=w(d),c=i(4),v=w(c),y=i(6),b=w(y),_=i(7),m=w(_);function w(O){return O&&O.__esModule?O:{default:O}}function T(O,L){if(!(O instanceof L))throw new TypeError("Cannot call a class as a function")}function x(O,L){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L&&(typeof L=="object"||typeof L=="function")?L:O}function E(O,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof L);O.prototype=Object.create(L&&L.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),L&&(Object.setPrototypeOf?Object.setPrototypeOf(O,L):O.__proto__=L)}var I=function(O){E(L,O);function L(){return T(this,L),x(this,(L.__proto__||Object.getPrototypeOf(L)).apply(this,arguments))}return L}(b.default);I.blotName="code",I.tagName="CODE";var A=function(O){E(L,O);function L(){return T(this,L),x(this,(L.__proto__||Object.getPrototypeOf(L)).apply(this,arguments))}return a(L,[{key:"delta",value:function(){var C=this,P=this.domNode.textContent;return P.endsWith(`
1969
+ `),nt=z.shift();nt.length>0&&(F<this.length()-1||this.children.tail==null?a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"insertAt",this).call(this,Math.min(F,this.length()-1),nt):this.children.tail.insertAt(this.children.tail.length(),nt),this.cache={});var V=this;z.reduce(function(D,k){return V=V.split(D,!0),V.insertAt(0,k),k.length},F+nt.length)}}},{key:"insertBefore",value:function(F,q){var Z=this.children.head;a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"insertBefore",this).call(this,F,q),Z instanceof y.default&&Z.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"length",this).call(this)+O),this.cache.length}},{key:"moveChildren",value:function(F,q){a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"moveChildren",this).call(this,F,q),this.cache={}}},{key:"optimize",value:function(F){a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"optimize",this).call(this,F),this.cache={}}},{key:"path",value:function(F){return a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"path",this).call(this,F,!0)}},{key:"removeChild",value:function(F){a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"removeChild",this).call(this,F),this.cache={}}},{key:"split",value:function(F){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(q&&(F===0||F>=this.length()-O)){var Z=this.clone();return F===0?(this.parent.insertBefore(Z,this),this):(this.parent.insertBefore(Z,this.next),Z)}else{var z=a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"split",this).call(this,F,q);return this.cache={},z}}}]),P}(c.default.Block);L.blotName="block",L.tagName="P",L.defaultChild="break",L.allowedChildren=[b.default,c.default.Embed,w.default];function R(C){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return C==null||(typeof C.formats=="function"&&(P=(0,f.default)(P,C.formats())),C.parent==null||C.parent.blotName=="scroll"||C.parent.statics.scope!==C.statics.scope)?P:R(C.parent,P)}n.bubbleFormats=R,n.BlockEmbed=A,n.default=L},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.overload=n.expandConfig=void 0;var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},a=function(){function V(D,k){var G=[],j=!0,Q=!1,K=void 0;try{for(var $=D[Symbol.iterator](),W;!(j=(W=$.next()).done)&&(G.push(W.value),!(k&&G.length===k));j=!0);}catch(et){Q=!0,K=et}finally{try{!j&&$.return&&$.return()}finally{if(Q)throw K}}return G}return function(D,k){if(Array.isArray(D))return D;if(Symbol.iterator in Object(D))return V(D,k);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function V(D,k){for(var G=0;G<k.length;G++){var j=k[G];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(D,j.key,j)}}return function(D,k,G){return k&&V(D.prototype,k),G&&V(D,G),D}}();i(50);var f=i(2),h=R(f),d=i(14),p=R(d),c=i(8),v=R(c),y=i(9),_=R(y),b=i(0),m=R(b),w=i(15),T=R(w),x=i(3),E=R(x),I=i(10),O=R(I),A=i(34),L=R(A);function R(V){return V&&V.__esModule?V:{default:V}}function C(V,D,k){return D in V?Object.defineProperty(V,D,{value:k,enumerable:!0,configurable:!0,writable:!0}):V[D]=k,V}function P(V,D){if(!(V instanceof D))throw new TypeError("Cannot call a class as a function")}var M=(0,O.default)("quill"),F=function(){u(V,null,[{key:"debug",value:function(k){k===!0&&(k="log"),O.default.level(k)}},{key:"find",value:function(k){return k.__quill||m.default.find(k)}},{key:"import",value:function(k){return this.imports[k]==null&&M.error("Cannot import "+k+". Are you sure it was registered?"),this.imports[k]}},{key:"register",value:function(k,G){var j=this,Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof k!="string"){var K=k.attrName||k.blotName;typeof K=="string"?this.register("formats/"+K,k,G):Object.keys(k).forEach(function($){j.register($,k[$],G)})}else this.imports[k]!=null&&!Q&&M.warn("Overwriting "+k+" with",G),this.imports[k]=G,(k.startsWith("blots/")||k.startsWith("formats/"))&&G.blotName!=="abstract"?m.default.register(G):k.startsWith("modules")&&typeof G.register=="function"&&G.register()}}]);function V(D){var k=this,G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(P(this,V),this.options=q(D,G),this.container=this.options.container,this.container==null)return M.error("Invalid Quill container",D);this.options.debug&&V.debug(this.options.debug);var j=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new v.default,this.scroll=m.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new p.default(this.scroll),this.selection=new T.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(v.default.events.EDITOR_CHANGE,function(K){K===v.default.events.TEXT_CHANGE&&k.root.classList.toggle("ql-blank",k.editor.isBlank())}),this.emitter.on(v.default.events.SCROLL_UPDATE,function(K,$){var W=k.selection.lastRange,et=W&&W.length===0?W.index:void 0;Z.call(k,function(){return k.editor.update(null,$,et)},K)});var Q=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+j+"<p><br></p></div>");this.setContents(Q),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return u(V,[{key:"addContainer",value:function(k){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof k=="string"){var j=k;k=document.createElement("div"),k.classList.add(j)}return this.container.insertBefore(k,G),k}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(k,G,j){var Q=this,K=z(k,G,j),$=a(K,4);return k=$[0],G=$[1],j=$[3],Z.call(this,function(){return Q.editor.deleteText(k,G)},j,k,-1*G)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(k),this.container.classList.toggle("ql-disabled",!k)}},{key:"focus",value:function(){var k=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=k,this.scrollIntoView()}},{key:"format",value:function(k,G){var j=this,Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:v.default.sources.API;return Z.call(this,function(){var K=j.getSelection(!0),$=new h.default;if(K==null)return $;if(m.default.query(k,m.default.Scope.BLOCK))$=j.editor.formatLine(K.index,K.length,C({},k,G));else{if(K.length===0)return j.selection.format(k,G),$;$=j.editor.formatText(K.index,K.length,C({},k,G))}return j.setSelection(K,v.default.sources.SILENT),$},Q)}},{key:"formatLine",value:function(k,G,j,Q,K){var $=this,W=void 0,et=z(k,G,j,Q,K),Y=a(et,4);return k=Y[0],G=Y[1],W=Y[2],K=Y[3],Z.call(this,function(){return $.editor.formatLine(k,G,W)},K,k,0)}},{key:"formatText",value:function(k,G,j,Q,K){var $=this,W=void 0,et=z(k,G,j,Q,K),Y=a(et,4);return k=Y[0],G=Y[1],W=Y[2],K=Y[3],Z.call(this,function(){return $.editor.formatText(k,G,W)},K,k,0)}},{key:"getBounds",value:function(k){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,j=void 0;typeof k=="number"?j=this.selection.getBounds(k,G):j=this.selection.getBounds(k.index,k.length);var Q=this.container.getBoundingClientRect();return{bottom:j.bottom-Q.top,height:j.height,left:j.left-Q.left,right:j.right-Q.left,top:j.top-Q.top,width:j.width}}},{key:"getContents",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-k,j=z(k,G),Q=a(j,2);return k=Q[0],G=Q[1],this.editor.getContents(k,G)}},{key:"getFormat",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof k=="number"?this.editor.getFormat(k,G):this.editor.getFormat(k.index,k.length)}},{key:"getIndex",value:function(k){return k.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(k){return this.scroll.leaf(k)}},{key:"getLine",value:function(k){return this.scroll.line(k)}},{key:"getLines",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof k!="number"?this.scroll.lines(k.index,k.length):this.scroll.lines(k,G)}},{key:"getModule",value:function(k){return this.theme.modules[k]}},{key:"getSelection",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return k&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-k,j=z(k,G),Q=a(j,2);return k=Q[0],G=Q[1],this.editor.getText(k,G)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(k,G,j){var Q=this,K=arguments.length>3&&arguments[3]!==void 0?arguments[3]:V.sources.API;return Z.call(this,function(){return Q.editor.insertEmbed(k,G,j)},K,k)}},{key:"insertText",value:function(k,G,j,Q,K){var $=this,W=void 0,et=z(k,0,j,Q,K),Y=a(et,4);return k=Y[0],W=Y[2],K=Y[3],Z.call(this,function(){return $.editor.insertText(k,G,W)},K,k,G.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(k,G,j){this.clipboard.dangerouslyPasteHTML(k,G,j)}},{key:"removeFormat",value:function(k,G,j){var Q=this,K=z(k,G,j),$=a(K,4);return k=$[0],G=$[1],j=$[3],Z.call(this,function(){return Q.editor.removeFormat(k,G)},j,k)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(k){var G=this,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API;return Z.call(this,function(){k=new h.default(k);var Q=G.getLength(),K=G.editor.deleteText(0,Q),$=G.editor.applyDelta(k),W=$.ops[$.ops.length-1];W!=null&&typeof W.insert=="string"&&W.insert[W.insert.length-1]===`
1970
+ `&&(G.editor.deleteText(G.getLength()-1,1),$.delete(1));var et=K.compose($);return et},j)}},{key:"setSelection",value:function(k,G,j){if(k==null)this.selection.setRange(null,G||V.sources.API);else{var Q=z(k,G,j),K=a(Q,4);k=K[0],G=K[1],j=K[3],this.selection.setRange(new w.Range(k,G),j),j!==v.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(k){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API,j=new h.default().insert(k);return this.setContents(j,G)}},{key:"update",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v.default.sources.USER,G=this.scroll.update(k);return this.selection.update(k),G}},{key:"updateContents",value:function(k){var G=this,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API;return Z.call(this,function(){return k=new h.default(k),G.editor.applyDelta(k,j)},j,!0)}}]),V}();F.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},F.events=v.default.events,F.sources=v.default.sources,F.version="1.3.7",F.imports={delta:h.default,parchment:m.default,"core/module":_.default,"core/theme":L.default};function q(V,D){if(D=(0,E.default)(!0,{container:V,modules:{clipboard:!0,keyboard:!0,history:!0}},D),!D.theme||D.theme===F.DEFAULTS.theme)D.theme=L.default;else if(D.theme=F.import("themes/"+D.theme),D.theme==null)throw new Error("Invalid theme "+D.theme+". Did you register it?");var k=(0,E.default)(!0,{},D.theme.DEFAULTS);[k,D].forEach(function(Q){Q.modules=Q.modules||{},Object.keys(Q.modules).forEach(function(K){Q.modules[K]===!0&&(Q.modules[K]={})})});var G=Object.keys(k.modules).concat(Object.keys(D.modules)),j=G.reduce(function(Q,K){var $=F.import("modules/"+K);return $==null?M.error("Cannot load "+K+" module. Are you sure you registered it?"):Q[K]=$.DEFAULTS||{},Q},{});return D.modules!=null&&D.modules.toolbar&&D.modules.toolbar.constructor!==Object&&(D.modules.toolbar={container:D.modules.toolbar}),D=(0,E.default)(!0,{},F.DEFAULTS,{modules:j},k,D),["bounds","container","scrollingContainer"].forEach(function(Q){typeof D[Q]=="string"&&(D[Q]=document.querySelector(D[Q]))}),D.modules=Object.keys(D.modules).reduce(function(Q,K){return D.modules[K]&&(Q[K]=D.modules[K]),Q},{}),D}function Z(V,D,k,G){if(this.options.strict&&!this.isEnabled()&&D===v.default.sources.USER)return new h.default;var j=k==null?null:this.getSelection(),Q=this.editor.delta,K=V();if(j!=null&&(k===!0&&(k=j.index),G==null?j=nt(j,K,D):G!==0&&(j=nt(j,k,G,D)),this.setSelection(j,v.default.sources.SILENT)),K.length()>0){var $,W=[v.default.events.TEXT_CHANGE,K,Q,D];if(($=this.emitter).emit.apply($,[v.default.events.EDITOR_CHANGE].concat(W)),D!==v.default.sources.SILENT){var et;(et=this.emitter).emit.apply(et,W)}}return K}function z(V,D,k,G,j){var Q={};return typeof V.index=="number"&&typeof V.length=="number"?typeof D!="number"?(j=G,G=k,k=D,D=V.length,V=V.index):(D=V.length,V=V.index):typeof D!="number"&&(j=G,G=k,k=D,D=0),(typeof k>"u"?"undefined":o(k))==="object"?(Q=k,j=G):typeof k=="string"&&(G!=null?Q[k]=G:j=k),j=j||v.default.sources.API,[V,D,Q,j]}function nt(V,D,k,G){if(V==null)return null;var j=void 0,Q=void 0;if(D instanceof h.default){var K=[V.index,V.index+V.length].map(function(Y){return D.transformPosition(Y,G!==v.default.sources.USER)}),$=a(K,2);j=$[0],Q=$[1]}else{var W=[V.index,V.index+V.length].map(function(Y){return Y<D||Y===D&&G===v.default.sources.USER?Y:k>=0?Y+k:Math.max(D,Y+k)}),et=a(W,2);j=et[0],Q=et[1]}return new w.Range(j,Q-j)}n.expandConfig=q,n.overload=z,n.default=F},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function b(m,w){for(var T=0;T<w.length;T++){var x=w[T];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,w,T){return w&&b(m.prototype,w),T&&b(m,T),m}}(),a=function b(m,w,T){m===null&&(m=Function.prototype);var x=Object.getOwnPropertyDescriptor(m,w);if(x===void 0){var E=Object.getPrototypeOf(m);return E===null?void 0:b(E,w,T)}else{if("value"in x)return x.value;var I=x.get;return I===void 0?void 0:I.call(T)}},u=i(7),f=p(u),h=i(0),d=p(h);function p(b){return b&&b.__esModule?b:{default:b}}function c(b,m){if(!(b instanceof m))throw new TypeError("Cannot call a class as a function")}function v(b,m){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:b}function y(b,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);b.prototype=Object.create(m&&m.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(b,m):b.__proto__=m)}var _=function(b){y(m,b);function m(){return c(this,m),v(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return o(m,[{key:"formatAt",value:function(T,x,E,I){if(m.compare(this.statics.blotName,E)<0&&d.default.query(E,d.default.Scope.BLOT)){var O=this.isolate(T,x);I&&O.wrap(E,I)}else a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"formatAt",this).call(this,T,x,E,I)}},{key:"optimize",value:function(T){if(a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"optimize",this).call(this,T),this.parent instanceof m&&m.compare(this.statics.blotName,this.parent.statics.blotName)>0){var x=this.parent.isolate(this.offset(),this.length());this.moveChildren(x),x.wrap(this)}}}],[{key:"compare",value:function(T,x){var E=m.order.indexOf(T),I=m.order.indexOf(x);return E>=0||I>=0?E-I:T===x?0:T<x?-1:1}}]),m}(d.default.Inline);_.allowedChildren=[_,d.default.Embed,f.default],_.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],n.default=_},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(0),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function d(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var p=function(c){d(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(a.default.Text);n.default=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function w(T,x){for(var E=0;E<x.length;E++){var I=x[E];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(T,I.key,I)}}return function(T,x,E){return x&&w(T.prototype,x),E&&w(T,E),T}}(),a=function w(T,x,E){T===null&&(T=Function.prototype);var I=Object.getOwnPropertyDescriptor(T,x);if(I===void 0){var O=Object.getPrototypeOf(T);return O===null?void 0:w(O,x,E)}else{if("value"in I)return I.value;var A=I.get;return A===void 0?void 0:A.call(E)}},u=i(54),f=p(u),h=i(10),d=p(h);function p(w){return w&&w.__esModule?w:{default:w}}function c(w,T){if(!(w instanceof T))throw new TypeError("Cannot call a class as a function")}function v(w,T){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T&&(typeof T=="object"||typeof T=="function")?T:w}function y(w,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof T);w.prototype=Object.create(T&&T.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(w,T):w.__proto__=T)}var _=(0,d.default)("quill:events"),b=["selectionchange","mousedown","mouseup","click"];b.forEach(function(w){document.addEventListener(w,function(){for(var T=arguments.length,x=Array(T),E=0;E<T;E++)x[E]=arguments[E];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(I){if(I.__quill&&I.__quill.emitter){var O;(O=I.__quill.emitter).handleDOM.apply(O,x)}})})});var m=function(w){y(T,w);function T(){c(this,T);var x=v(this,(T.__proto__||Object.getPrototypeOf(T)).call(this));return x.listeners={},x.on("error",_.error),x}return o(T,[{key:"emit",value:function(){_.log.apply(_,arguments),a(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(E){for(var I=arguments.length,O=Array(I>1?I-1:0),A=1;A<I;A++)O[A-1]=arguments[A];(this.listeners[E.type]||[]).forEach(function(L){var R=L.node,C=L.handler;(E.target===R||R.contains(E.target))&&C.apply(void 0,[E].concat(O))})}},{key:"listenDOM",value:function(E,I,O){this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push({node:I,handler:O})}}]),T}(f.default);m.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},m.sources={API:"api",SILENT:"silent",USER:"user"},n.default=m},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});function o(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}var a=function u(f){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};o(this,u),this.quill=f,this.options=h};a.DEFAULTS={},n.default=a},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=["error","warn","log","info"],a="warn";function u(h){if(o.indexOf(h)<=o.indexOf(a)){for(var d,p=arguments.length,c=Array(p>1?p-1:0),v=1;v<p;v++)c[v-1]=arguments[v];(d=console)[h].apply(d,c)}}function f(h){return o.reduce(function(d,p){return d[p]=u.bind(console,p,h),d},{})}u.level=f.level=function(h){a=h},n.default=f},function(r,n,i){var o=Array.prototype.slice,a=i(52),u=i(53),f=r.exports=function(c,v,y){return y||(y={}),c===v?!0:c instanceof Date&&v instanceof Date?c.getTime()===v.getTime():!c||!v||typeof c!="object"&&typeof v!="object"?y.strict?c===v:c==v:p(c,v,y)};function h(c){return c==null}function d(c){return!(!c||typeof c!="object"||typeof c.length!="number"||typeof c.copy!="function"||typeof c.slice!="function"||c.length>0&&typeof c[0]!="number")}function p(c,v,y){var _,b;if(h(c)||h(v)||c.prototype!==v.prototype)return!1;if(u(c))return u(v)?(c=o.call(c),v=o.call(v),f(c,v,y)):!1;if(d(c)){if(!d(v)||c.length!==v.length)return!1;for(_=0;_<c.length;_++)if(c[_]!==v[_])return!1;return!0}try{var m=a(c),w=a(v)}catch{return!1}if(m.length!=w.length)return!1;for(m.sort(),w.sort(),_=m.length-1;_>=0;_--)if(m[_]!=w[_])return!1;for(_=m.length-1;_>=0;_--)if(b=m[_],!f(c[b],v[b],y))return!1;return typeof c==typeof v}},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(1),a=function(){function u(f,h,d){d===void 0&&(d={}),this.attrName=f,this.keyName=h;var p=o.Scope.TYPE&o.Scope.ATTRIBUTE;d.scope!=null?this.scope=d.scope&o.Scope.LEVEL|p:this.scope=o.Scope.ATTRIBUTE,d.whitelist!=null&&(this.whitelist=d.whitelist)}return u.keys=function(f){return[].map.call(f.attributes,function(h){return h.name})},u.prototype.add=function(f,h){return this.canAdd(f,h)?(f.setAttribute(this.keyName,h),!0):!1},u.prototype.canAdd=function(f,h){var d=o.query(f,o.Scope.BLOT&(this.scope|o.Scope.TYPE));return d==null?!1:this.whitelist==null?!0:typeof h=="string"?this.whitelist.indexOf(h.replace(/["']/g,""))>-1:this.whitelist.indexOf(h)>-1},u.prototype.remove=function(f){f.removeAttribute(this.keyName)},u.prototype.value=function(f){var h=f.getAttribute(this.keyName);return this.canAdd(f,h)&&h?h:""},u}();n.default=a},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Code=void 0;var o=function(){function A(L,R){var C=[],P=!0,M=!1,F=void 0;try{for(var q=L[Symbol.iterator](),Z;!(P=(Z=q.next()).done)&&(C.push(Z.value),!(R&&C.length===R));P=!0);}catch(z){M=!0,F=z}finally{try{!P&&q.return&&q.return()}finally{if(M)throw F}}return C}return function(L,R){if(Array.isArray(L))return L;if(Symbol.iterator in Object(L))return A(L,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function A(L,R){for(var C=0;C<R.length;C++){var P=R[C];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(L,P.key,P)}}return function(L,R,C){return R&&A(L.prototype,R),C&&A(L,C),L}}(),u=function A(L,R,C){L===null&&(L=Function.prototype);var P=Object.getOwnPropertyDescriptor(L,R);if(P===void 0){var M=Object.getPrototypeOf(L);return M===null?void 0:A(M,R,C)}else{if("value"in P)return P.value;var F=P.get;return F===void 0?void 0:F.call(C)}},f=i(2),h=w(f),d=i(0),p=w(d),c=i(4),v=w(c),y=i(6),_=w(y),b=i(7),m=w(b);function w(A){return A&&A.__esModule?A:{default:A}}function T(A,L){if(!(A instanceof L))throw new TypeError("Cannot call a class as a function")}function x(A,L){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L&&(typeof L=="object"||typeof L=="function")?L:A}function E(A,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof L);A.prototype=Object.create(L&&L.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),L&&(Object.setPrototypeOf?Object.setPrototypeOf(A,L):A.__proto__=L)}var I=function(A){E(L,A);function L(){return T(this,L),x(this,(L.__proto__||Object.getPrototypeOf(L)).apply(this,arguments))}return L}(_.default);I.blotName="code",I.tagName="CODE";var O=function(A){E(L,A);function L(){return T(this,L),x(this,(L.__proto__||Object.getPrototypeOf(L)).apply(this,arguments))}return a(L,[{key:"delta",value:function(){var C=this,P=this.domNode.textContent;return P.endsWith(`
1971
1971
  `)&&(P=P.slice(0,-1)),P.split(`
1972
1972
  `).reduce(function(M,F){return M.insert(F).insert(`
1973
1973
  `,C.formats())},new h.default)}},{key:"format",value:function(C,P){if(!(C===this.statics.blotName&&P)){var M=this.descendant(m.default,this.length()-1),F=o(M,1),q=F[0];q!=null&&q.deleteAt(q.length()-1,1),u(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"format",this).call(this,C,P)}}},{key:"formatAt",value:function(C,P,M,F){if(P!==0&&!(p.default.query(M,p.default.Scope.BLOCK)==null||M===this.statics.blotName&&F===this.statics.formats(this.domNode))){var q=this.newlineIndex(C);if(!(q<0||q>=C+P)){var Z=this.newlineIndex(C,!0)+1,z=q-Z+1,nt=this.isolate(Z,z),V=nt.next;nt.format(M,F),V instanceof L&&V.formatAt(0,C-Z+P-z,M,F)}}}},{key:"insertAt",value:function(C,P,M){if(M==null){var F=this.descendant(m.default,C),q=o(F,2),Z=q[0],z=q[1];Z.insertAt(z,P)}}},{key:"length",value:function(){var C=this.domNode.textContent.length;return this.domNode.textContent.endsWith(`
@@ -1975,27 +1975,27 @@ function print() { __p += __j.call(arguments, '') }
1975
1975
  `);var M=this.domNode.textContent.slice(C).indexOf(`
1976
1976
  `);return M>-1?C+M:-1}},{key:"optimize",value:function(C){this.domNode.textContent.endsWith(`
1977
1977
  `)||this.appendChild(p.default.create("text",`
1978
- `)),u(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"optimize",this).call(this,C);var P=this.next;P!=null&&P.prev===this&&P.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===P.statics.formats(P.domNode)&&(P.optimize(C),P.moveChildren(this),P.remove())}},{key:"replace",value:function(C){u(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"replace",this).call(this,C),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(P){var M=p.default.find(P);M==null?P.parentNode.removeChild(P):M instanceof p.default.Embed?M.remove():M.unwrap()})}}],[{key:"create",value:function(C){var P=u(L.__proto__||Object.getPrototypeOf(L),"create",this).call(this,C);return P.setAttribute("spellcheck",!1),P}},{key:"formats",value:function(){return!0}}]),L}(v.default);A.blotName="code-block",A.tagName="PRE",A.TAB=" ",n.Code=I,n.default=A},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},a=function(){function V(U,k){var j=[],G=!0,X=!1,Y=void 0;try{for(var $=U[Symbol.iterator](),W;!(G=(W=$.next()).done)&&(j.push(W.value),!(k&&j.length===k));G=!0);}catch(et){X=!0,Y=et}finally{try{!G&&$.return&&$.return()}finally{if(X)throw Y}}return j}return function(U,k){if(Array.isArray(U))return U;if(Symbol.iterator in Object(U))return V(U,k);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function V(U,k){for(var j=0;j<k.length;j++){var G=k[j];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(U,G.key,G)}}return function(U,k,j){return k&&V(U.prototype,k),j&&V(U,j),U}}(),f=i(2),h=P(f),d=i(20),p=P(d),c=i(0),v=P(c),y=i(13),b=P(y),_=i(24),m=P(_),w=i(4),T=P(w),x=i(16),E=P(x),I=i(21),A=P(I),O=i(11),L=P(O),R=i(3),C=P(R);function P(V){return V&&V.__esModule?V:{default:V}}function M(V,U,k){return U in V?Object.defineProperty(V,U,{value:k,enumerable:!0,configurable:!0,writable:!0}):V[U]=k,V}function F(V,U){if(!(V instanceof U))throw new TypeError("Cannot call a class as a function")}var q=/^[ -~]*$/,Z=function(){function V(U){F(this,V),this.scroll=U,this.delta=this.getDelta()}return u(V,[{key:"applyDelta",value:function(k){var j=this,G=!1;this.scroll.update();var X=this.scroll.length();return this.scroll.batchStart(),k=nt(k),k.reduce(function(Y,$){var W=$.retain||$.delete||$.insert.length||1,et=$.attributes||{};if($.insert!=null){if(typeof $.insert=="string"){var J=$.insert;J.endsWith(`
1979
- `)&&G&&(G=!1,J=J.slice(0,-1)),Y>=X&&!J.endsWith(`
1980
- `)&&(G=!0),j.scroll.insertAt(Y,J);var it=j.scroll.line(Y),lt=a(it,2),pt=lt[0],yt=lt[1],xt=(0,C.default)({},(0,w.bubbleFormats)(pt));if(pt instanceof T.default){var At=pt.descendant(v.default.Leaf,yt),oe=a(At,1),Ht=oe[0];xt=(0,C.default)(xt,(0,w.bubbleFormats)(Ht))}et=p.default.attributes.diff(xt,et)||{}}else if(o($.insert)==="object"){var rt=Object.keys($.insert)[0];if(rt==null)return Y;j.scroll.insertAt(Y,rt,$.insert[rt])}X+=W}return Object.keys(et).forEach(function(at){j.scroll.formatAt(Y,W,at,et[at])}),Y+W},0),k.reduce(function(Y,$){return typeof $.delete=="number"?(j.scroll.deleteAt(Y,$.delete),Y):Y+($.retain||$.insert.length||1)},0),this.scroll.batchEnd(),this.update(k)}},{key:"deleteText",value:function(k,j){return this.scroll.deleteAt(k,j),this.update(new h.default().retain(k).delete(j))}},{key:"formatLine",value:function(k,j){var G=this,X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(X).forEach(function(Y){if(!(G.scroll.whitelist!=null&&!G.scroll.whitelist[Y])){var $=G.scroll.lines(k,Math.max(j,1)),W=j;$.forEach(function(et){var J=et.length();if(!(et instanceof b.default))et.format(Y,X[Y]);else{var it=k-et.offset(G.scroll),lt=et.newlineIndex(it+W)-it+1;et.formatAt(it,lt,Y,X[Y])}W-=J})}}),this.scroll.optimize(),this.update(new h.default().retain(k).retain(j,(0,A.default)(X)))}},{key:"formatText",value:function(k,j){var G=this,X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(X).forEach(function(Y){G.scroll.formatAt(k,j,Y,X[Y])}),this.update(new h.default().retain(k).retain(j,(0,A.default)(X)))}},{key:"getContents",value:function(k,j){return this.delta.slice(k,k+j)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(k,j){return k.concat(j.delta())},new h.default)}},{key:"getFormat",value:function(k){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,G=[],X=[];j===0?this.scroll.path(k).forEach(function($){var W=a($,1),et=W[0];et instanceof T.default?G.push(et):et instanceof v.default.Leaf&&X.push(et)}):(G=this.scroll.lines(k,j),X=this.scroll.descendants(v.default.Leaf,k,j));var Y=[G,X].map(function($){if($.length===0)return{};for(var W=(0,w.bubbleFormats)($.shift());Object.keys(W).length>0;){var et=$.shift();if(et==null)return W;W=z((0,w.bubbleFormats)(et),W)}return W});return C.default.apply(C.default,Y)}},{key:"getText",value:function(k,j){return this.getContents(k,j).filter(function(G){return typeof G.insert=="string"}).map(function(G){return G.insert}).join("")}},{key:"insertEmbed",value:function(k,j,G){return this.scroll.insertAt(k,j,G),this.update(new h.default().retain(k).insert(M({},j,G)))}},{key:"insertText",value:function(k,j){var G=this,X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return j=j.replace(/\r\n/g,`
1978
+ `)),u(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"optimize",this).call(this,C);var P=this.next;P!=null&&P.prev===this&&P.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===P.statics.formats(P.domNode)&&(P.optimize(C),P.moveChildren(this),P.remove())}},{key:"replace",value:function(C){u(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"replace",this).call(this,C),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(P){var M=p.default.find(P);M==null?P.parentNode.removeChild(P):M instanceof p.default.Embed?M.remove():M.unwrap()})}}],[{key:"create",value:function(C){var P=u(L.__proto__||Object.getPrototypeOf(L),"create",this).call(this,C);return P.setAttribute("spellcheck",!1),P}},{key:"formats",value:function(){return!0}}]),L}(v.default);O.blotName="code-block",O.tagName="PRE",O.TAB=" ",n.Code=I,n.default=O},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},a=function(){function V(D,k){var G=[],j=!0,Q=!1,K=void 0;try{for(var $=D[Symbol.iterator](),W;!(j=(W=$.next()).done)&&(G.push(W.value),!(k&&G.length===k));j=!0);}catch(et){Q=!0,K=et}finally{try{!j&&$.return&&$.return()}finally{if(Q)throw K}}return G}return function(D,k){if(Array.isArray(D))return D;if(Symbol.iterator in Object(D))return V(D,k);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function V(D,k){for(var G=0;G<k.length;G++){var j=k[G];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(D,j.key,j)}}return function(D,k,G){return k&&V(D.prototype,k),G&&V(D,G),D}}(),f=i(2),h=P(f),d=i(20),p=P(d),c=i(0),v=P(c),y=i(13),_=P(y),b=i(24),m=P(b),w=i(4),T=P(w),x=i(16),E=P(x),I=i(21),O=P(I),A=i(11),L=P(A),R=i(3),C=P(R);function P(V){return V&&V.__esModule?V:{default:V}}function M(V,D,k){return D in V?Object.defineProperty(V,D,{value:k,enumerable:!0,configurable:!0,writable:!0}):V[D]=k,V}function F(V,D){if(!(V instanceof D))throw new TypeError("Cannot call a class as a function")}var q=/^[ -~]*$/,Z=function(){function V(D){F(this,V),this.scroll=D,this.delta=this.getDelta()}return u(V,[{key:"applyDelta",value:function(k){var G=this,j=!1;this.scroll.update();var Q=this.scroll.length();return this.scroll.batchStart(),k=nt(k),k.reduce(function(K,$){var W=$.retain||$.delete||$.insert.length||1,et=$.attributes||{};if($.insert!=null){if(typeof $.insert=="string"){var Y=$.insert;Y.endsWith(`
1979
+ `)&&j&&(j=!1,Y=Y.slice(0,-1)),K>=Q&&!Y.endsWith(`
1980
+ `)&&(j=!0),G.scroll.insertAt(K,Y);var rt=G.scroll.line(K),ot=a(rt,2),pt=ot[0],vt=ot[1],_t=(0,C.default)({},(0,w.bubbleFormats)(pt));if(pt instanceof T.default){var At=pt.descendant(v.default.Leaf,vt),ne=a(At,1),Ut=ne[0];_t=(0,C.default)(_t,(0,w.bubbleFormats)(Ut))}et=p.default.attributes.diff(_t,et)||{}}else if(o($.insert)==="object"){var it=Object.keys($.insert)[0];if(it==null)return K;G.scroll.insertAt(K,it,$.insert[it])}Q+=W}return Object.keys(et).forEach(function(ut){G.scroll.formatAt(K,W,ut,et[ut])}),K+W},0),k.reduce(function(K,$){return typeof $.delete=="number"?(G.scroll.deleteAt(K,$.delete),K):K+($.retain||$.insert.length||1)},0),this.scroll.batchEnd(),this.update(k)}},{key:"deleteText",value:function(k,G){return this.scroll.deleteAt(k,G),this.update(new h.default().retain(k).delete(G))}},{key:"formatLine",value:function(k,G){var j=this,Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(Q).forEach(function(K){if(!(j.scroll.whitelist!=null&&!j.scroll.whitelist[K])){var $=j.scroll.lines(k,Math.max(G,1)),W=G;$.forEach(function(et){var Y=et.length();if(!(et instanceof _.default))et.format(K,Q[K]);else{var rt=k-et.offset(j.scroll),ot=et.newlineIndex(rt+W)-rt+1;et.formatAt(rt,ot,K,Q[K])}W-=Y})}}),this.scroll.optimize(),this.update(new h.default().retain(k).retain(G,(0,O.default)(Q)))}},{key:"formatText",value:function(k,G){var j=this,Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(Q).forEach(function(K){j.scroll.formatAt(k,G,K,Q[K])}),this.update(new h.default().retain(k).retain(G,(0,O.default)(Q)))}},{key:"getContents",value:function(k,G){return this.delta.slice(k,k+G)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(k,G){return k.concat(G.delta())},new h.default)}},{key:"getFormat",value:function(k){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,j=[],Q=[];G===0?this.scroll.path(k).forEach(function($){var W=a($,1),et=W[0];et instanceof T.default?j.push(et):et instanceof v.default.Leaf&&Q.push(et)}):(j=this.scroll.lines(k,G),Q=this.scroll.descendants(v.default.Leaf,k,G));var K=[j,Q].map(function($){if($.length===0)return{};for(var W=(0,w.bubbleFormats)($.shift());Object.keys(W).length>0;){var et=$.shift();if(et==null)return W;W=z((0,w.bubbleFormats)(et),W)}return W});return C.default.apply(C.default,K)}},{key:"getText",value:function(k,G){return this.getContents(k,G).filter(function(j){return typeof j.insert=="string"}).map(function(j){return j.insert}).join("")}},{key:"insertEmbed",value:function(k,G,j){return this.scroll.insertAt(k,G,j),this.update(new h.default().retain(k).insert(M({},G,j)))}},{key:"insertText",value:function(k,G){var j=this,Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return G=G.replace(/\r\n/g,`
1981
1981
  `).replace(/\r/g,`
1982
- `),this.scroll.insertAt(k,j),Object.keys(X).forEach(function(Y){G.scroll.formatAt(k,j.length,Y,X[Y])}),this.update(new h.default().retain(k).insert(j,(0,A.default)(X)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var k=this.scroll.children.head;return k.statics.blotName!==T.default.blotName||k.children.length>1?!1:k.children.head instanceof E.default}},{key:"removeFormat",value:function(k,j){var G=this.getText(k,j),X=this.scroll.line(k+j),Y=a(X,2),$=Y[0],W=Y[1],et=0,J=new h.default;$!=null&&($ instanceof b.default?et=$.newlineIndex(W)-W+1:et=$.length()-W,J=$.delta().slice(W,W+et-1).insert(`
1983
- `));var it=this.getContents(k,j+et),lt=it.diff(new h.default().insert(G).concat(J)),pt=new h.default().retain(k).concat(lt);return this.applyDelta(pt)}},{key:"update",value:function(k){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,X=this.delta;if(j.length===1&&j[0].type==="characterData"&&j[0].target.data.match(q)&&v.default.find(j[0].target)){var Y=v.default.find(j[0].target),$=(0,w.bubbleFormats)(Y),W=Y.offset(this.scroll),et=j[0].oldValue.replace(m.default.CONTENTS,""),J=new h.default().insert(et),it=new h.default().insert(Y.value()),lt=new h.default().retain(W).concat(J.diff(it,G));k=lt.reduce(function(pt,yt){return yt.insert?pt.insert(yt.insert,$):pt.push(yt)},new h.default),this.delta=X.compose(k)}else this.delta=this.getDelta(),(!k||!(0,L.default)(X.compose(k),this.delta))&&(k=X.diff(this.delta,G));return k}}]),V}();function z(V,U){return Object.keys(U).reduce(function(k,j){return V[j]==null||(U[j]===V[j]?k[j]=U[j]:Array.isArray(U[j])?U[j].indexOf(V[j])<0&&(k[j]=U[j].concat([V[j]])):k[j]=[U[j],V[j]]),k},{})}function nt(V){return V.reduce(function(U,k){if(k.insert===1){var j=(0,A.default)(k.attributes);return delete j.image,U.insert({image:k.attributes.image},j)}if(k.attributes!=null&&(k.attributes.list===!0||k.attributes.bullet===!0)&&(k=(0,A.default)(k),k.attributes.list?k.attributes.list="ordered":(k.attributes.list="bullet",delete k.attributes.bullet)),typeof k.insert=="string"){var G=k.insert.replace(/\r\n/g,`
1982
+ `),this.scroll.insertAt(k,G),Object.keys(Q).forEach(function(K){j.scroll.formatAt(k,G.length,K,Q[K])}),this.update(new h.default().retain(k).insert(G,(0,O.default)(Q)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var k=this.scroll.children.head;return k.statics.blotName!==T.default.blotName||k.children.length>1?!1:k.children.head instanceof E.default}},{key:"removeFormat",value:function(k,G){var j=this.getText(k,G),Q=this.scroll.line(k+G),K=a(Q,2),$=K[0],W=K[1],et=0,Y=new h.default;$!=null&&($ instanceof _.default?et=$.newlineIndex(W)-W+1:et=$.length()-W,Y=$.delta().slice(W,W+et-1).insert(`
1983
+ `));var rt=this.getContents(k,G+et),ot=rt.diff(new h.default().insert(j).concat(Y)),pt=new h.default().retain(k).concat(ot);return this.applyDelta(pt)}},{key:"update",value:function(k){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,Q=this.delta;if(G.length===1&&G[0].type==="characterData"&&G[0].target.data.match(q)&&v.default.find(G[0].target)){var K=v.default.find(G[0].target),$=(0,w.bubbleFormats)(K),W=K.offset(this.scroll),et=G[0].oldValue.replace(m.default.CONTENTS,""),Y=new h.default().insert(et),rt=new h.default().insert(K.value()),ot=new h.default().retain(W).concat(Y.diff(rt,j));k=ot.reduce(function(pt,vt){return vt.insert?pt.insert(vt.insert,$):pt.push(vt)},new h.default),this.delta=Q.compose(k)}else this.delta=this.getDelta(),(!k||!(0,L.default)(Q.compose(k),this.delta))&&(k=Q.diff(this.delta,j));return k}}]),V}();function z(V,D){return Object.keys(D).reduce(function(k,G){return V[G]==null||(D[G]===V[G]?k[G]=D[G]:Array.isArray(D[G])?D[G].indexOf(V[G])<0&&(k[G]=D[G].concat([V[G]])):k[G]=[D[G],V[G]]),k},{})}function nt(V){return V.reduce(function(D,k){if(k.insert===1){var G=(0,O.default)(k.attributes);return delete G.image,D.insert({image:k.attributes.image},G)}if(k.attributes!=null&&(k.attributes.list===!0||k.attributes.bullet===!0)&&(k=(0,O.default)(k),k.attributes.list?k.attributes.list="ordered":(k.attributes.list="bullet",delete k.attributes.bullet)),typeof k.insert=="string"){var j=k.insert.replace(/\r\n/g,`
1984
1984
  `).replace(/\r/g,`
1985
- `);return U.insert(G,k.attributes)}return U.push(k)},new h.default)}n.default=Z},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Range=void 0;var o=function(){function O(L,R){var C=[],P=!0,M=!1,F=void 0;try{for(var q=L[Symbol.iterator](),Z;!(P=(Z=q.next()).done)&&(C.push(Z.value),!(R&&C.length===R));P=!0);}catch(z){M=!0,F=z}finally{try{!P&&q.return&&q.return()}finally{if(M)throw F}}return C}return function(L,R){if(Array.isArray(L))return L;if(Symbol.iterator in Object(L))return O(L,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function O(L,R){for(var C=0;C<R.length;C++){var P=R[C];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(L,P.key,P)}}return function(L,R,C){return R&&O(L.prototype,R),C&&O(L,C),L}}(),u=i(0),f=m(u),h=i(21),d=m(h),p=i(11),c=m(p),v=i(8),y=m(v),b=i(10),_=m(b);function m(O){return O&&O.__esModule?O:{default:O}}function w(O){if(Array.isArray(O)){for(var L=0,R=Array(O.length);L<O.length;L++)R[L]=O[L];return R}else return Array.from(O)}function T(O,L){if(!(O instanceof L))throw new TypeError("Cannot call a class as a function")}var x=(0,_.default)("quill:selection"),E=function O(L){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;T(this,O),this.index=L,this.length=R},I=function(){function O(L,R){var C=this;T(this,O),this.emitter=R,this.scroll=L,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=f.default.create("cursor",this),this.lastRange=this.savedRange=new E(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){C.mouseDown||setTimeout(C.update.bind(C,y.default.sources.USER),1)}),this.emitter.on(y.default.events.EDITOR_CHANGE,function(P,M){P===y.default.events.TEXT_CHANGE&&M.length()>0&&C.update(y.default.sources.SILENT)}),this.emitter.on(y.default.events.SCROLL_BEFORE_UPDATE,function(){if(C.hasFocus()){var P=C.getNativeRange();P!=null&&P.start.node!==C.cursor.textNode&&C.emitter.once(y.default.events.SCROLL_UPDATE,function(){try{C.setNativeRange(P.start.node,P.start.offset,P.end.node,P.end.offset)}catch{}})}}),this.emitter.on(y.default.events.SCROLL_OPTIMIZE,function(P,M){if(M.range){var F=M.range,q=F.startNode,Z=F.startOffset,z=F.endNode,nt=F.endOffset;C.setNativeRange(q,Z,z,nt)}}),this.update(y.default.sources.SILENT)}return a(O,[{key:"handleComposition",value:function(){var R=this;this.root.addEventListener("compositionstart",function(){R.composing=!0}),this.root.addEventListener("compositionend",function(){if(R.composing=!1,R.cursor.parent){var C=R.cursor.restore();if(!C)return;setTimeout(function(){R.setNativeRange(C.startNode,C.startOffset,C.endNode,C.endOffset)},1)}})}},{key:"handleDragging",value:function(){var R=this;this.emitter.listenDOM("mousedown",document.body,function(){R.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){R.mouseDown=!1,R.update(y.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(R,C){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[R])){this.scroll.update();var P=this.getNativeRange();if(!(P==null||!P.native.collapsed||f.default.query(R,f.default.Scope.BLOCK))){if(P.start.node!==this.cursor.textNode){var M=f.default.find(P.start.node,!1);if(M==null)return;if(M instanceof f.default.Leaf){var F=M.split(P.start.offset);M.parent.insertBefore(this.cursor,F)}else M.insertBefore(this.cursor,P.start.node);this.cursor.attach()}this.cursor.format(R,C),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(R){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,P=this.scroll.length();R=Math.min(R,P-1),C=Math.min(R+C,P-1)-R;var M=void 0,F=this.scroll.leaf(R),q=o(F,2),Z=q[0],z=q[1];if(Z==null)return null;var nt=Z.position(z,!0),V=o(nt,2);M=V[0],z=V[1];var U=document.createRange();if(C>0){U.setStart(M,z);var k=this.scroll.leaf(R+C),j=o(k,2);if(Z=j[0],z=j[1],Z==null)return null;var G=Z.position(z,!0),X=o(G,2);return M=X[0],z=X[1],U.setEnd(M,z),U.getBoundingClientRect()}else{var Y="left",$=void 0;return M instanceof Text?(z<M.data.length?(U.setStart(M,z),U.setEnd(M,z+1)):(U.setStart(M,z-1),U.setEnd(M,z),Y="right"),$=U.getBoundingClientRect()):($=Z.domNode.getBoundingClientRect(),z>0&&(Y="right")),{bottom:$.top+$.height,height:$.height,left:$[Y],right:$[Y],top:$.top,width:0}}}},{key:"getNativeRange",value:function(){var R=document.getSelection();if(R==null||R.rangeCount<=0)return null;var C=R.getRangeAt(0);if(C==null)return null;var P=this.normalizeNative(C);return x.info("getNativeRange",P),P}},{key:"getRange",value:function(){var R=this.getNativeRange();if(R==null)return[null,null];var C=this.normalizedToRange(R);return[C,R]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(R){var C=this,P=[[R.start.node,R.start.offset]];R.native.collapsed||P.push([R.end.node,R.end.offset]);var M=P.map(function(Z){var z=o(Z,2),nt=z[0],V=z[1],U=f.default.find(nt,!0),k=U.offset(C.scroll);return V===0?k:U instanceof f.default.Container?k+U.length():k+U.index(nt,V)}),F=Math.min(Math.max.apply(Math,w(M)),this.scroll.length()-1),q=Math.min.apply(Math,[F].concat(w(M)));return new E(q,F-q)}},{key:"normalizeNative",value:function(R){if(!A(this.root,R.startContainer)||!R.collapsed&&!A(this.root,R.endContainer))return null;var C={start:{node:R.startContainer,offset:R.startOffset},end:{node:R.endContainer,offset:R.endOffset},native:R};return[C.start,C.end].forEach(function(P){for(var M=P.node,F=P.offset;!(M instanceof Text)&&M.childNodes.length>0;)if(M.childNodes.length>F)M=M.childNodes[F],F=0;else if(M.childNodes.length===F)M=M.lastChild,F=M instanceof Text?M.data.length:M.childNodes.length+1;else break;P.node=M,P.offset=F}),C}},{key:"rangeToNative",value:function(R){var C=this,P=R.collapsed?[R.index]:[R.index,R.index+R.length],M=[],F=this.scroll.length();return P.forEach(function(q,Z){q=Math.min(F-1,q);var z=void 0,nt=C.scroll.leaf(q),V=o(nt,2),U=V[0],k=V[1],j=U.position(k,Z!==0),G=o(j,2);z=G[0],k=G[1],M.push(z,k)}),M.length<2&&(M=M.concat(M)),M}},{key:"scrollIntoView",value:function(R){var C=this.lastRange;if(C!=null){var P=this.getBounds(C.index,C.length);if(P!=null){var M=this.scroll.length()-1,F=this.scroll.line(Math.min(C.index,M)),q=o(F,1),Z=q[0],z=Z;if(C.length>0){var nt=this.scroll.line(Math.min(C.index+C.length,M)),V=o(nt,1);z=V[0]}if(!(Z==null||z==null)){var U=R.getBoundingClientRect();P.top<U.top?R.scrollTop-=U.top-P.top:P.bottom>U.bottom&&(R.scrollTop+=P.bottom-U.bottom)}}}}},{key:"setNativeRange",value:function(R,C){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:R,M=arguments.length>3&&arguments[3]!==void 0?arguments[3]:C,F=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(x.info("setNativeRange",R,C,P,M),!(R!=null&&(this.root.parentNode==null||R.parentNode==null||P.parentNode==null))){var q=document.getSelection();if(q!=null)if(R!=null){this.hasFocus()||this.root.focus();var Z=(this.getNativeRange()||{}).native;if(Z==null||F||R!==Z.startContainer||C!==Z.startOffset||P!==Z.endContainer||M!==Z.endOffset){R.tagName=="BR"&&(C=[].indexOf.call(R.parentNode.childNodes,R),R=R.parentNode),P.tagName=="BR"&&(M=[].indexOf.call(P.parentNode.childNodes,P),P=P.parentNode);var z=document.createRange();z.setStart(R,C),z.setEnd(P,M),q.removeAllRanges(),q.addRange(z)}}else q.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(R){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:y.default.sources.API;if(typeof C=="string"&&(P=C,C=!1),x.info("setRange",R),R!=null){var M=this.rangeToNative(R);this.setNativeRange.apply(this,w(M).concat([C]))}else this.setNativeRange(null);this.update(P)}},{key:"update",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:y.default.sources.USER,C=this.lastRange,P=this.getRange(),M=o(P,2),F=M[0],q=M[1];if(this.lastRange=F,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,c.default)(C,this.lastRange)){var Z;!this.composing&&q!=null&&q.native.collapsed&&q.start.node!==this.cursor.textNode&&this.cursor.restore();var z=[y.default.events.SELECTION_CHANGE,(0,d.default)(this.lastRange),(0,d.default)(C),R];if((Z=this.emitter).emit.apply(Z,[y.default.events.EDITOR_CHANGE].concat(z)),R!==y.default.sources.SILENT){var nt;(nt=this.emitter).emit.apply(nt,z)}}}}]),O}();function A(O,L){try{L.parentNode}catch{return!1}return L instanceof Text&&(L=L.parentNode),O.contains(L)}n.Range=E,n.default=I},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function y(b,_){for(var m=0;m<_.length;m++){var w=_[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(b,w.key,w)}}return function(b,_,m){return _&&y(b.prototype,_),m&&y(b,m),b}}(),a=function y(b,_,m){b===null&&(b=Function.prototype);var w=Object.getOwnPropertyDescriptor(b,_);if(w===void 0){var T=Object.getPrototypeOf(b);return T===null?void 0:y(T,_,m)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(m)}},u=i(0),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function d(y,b){if(!(y instanceof b))throw new TypeError("Cannot call a class as a function")}function p(y,b){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:y}function c(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);y.prototype=Object.create(b&&b.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(y,b):y.__proto__=b)}var v=function(y){c(b,y);function b(){return d(this,b),p(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return o(b,[{key:"insertInto",value:function(m,w){m.children.length===0?a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"insertInto",this).call(this,m,w):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),b}(f.default.Embed);v.blotName="break",v.tagName="BR",n.default=v},function(r,n,i){var o=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var y in v)v.hasOwnProperty(y)&&(c[y]=v[y])};return function(c,v){p(c,v);function y(){this.constructor=c}c.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(44),u=i(30),f=i(1),h=function(p){o(c,p);function c(v){var y=p.call(this,v)||this;return y.build(),y}return c.prototype.appendChild=function(v){this.insertBefore(v)},c.prototype.attach=function(){p.prototype.attach.call(this),this.children.forEach(function(v){v.attach()})},c.prototype.build=function(){var v=this;this.children=new a.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(y){try{var b=d(y);v.insertBefore(b,v.children.head||void 0)}catch(_){if(_ instanceof f.ParchmentError)return;throw _}})},c.prototype.deleteAt=function(v,y){if(v===0&&y===this.length())return this.remove();this.children.forEachAt(v,y,function(b,_,m){b.deleteAt(_,m)})},c.prototype.descendant=function(v,y){var b=this.children.find(y),_=b[0],m=b[1];return v.blotName==null&&v(_)||v.blotName!=null&&_ instanceof v?[_,m]:_ instanceof c?_.descendant(v,m):[null,-1]},c.prototype.descendants=function(v,y,b){y===void 0&&(y=0),b===void 0&&(b=Number.MAX_VALUE);var _=[],m=b;return this.children.forEachAt(y,b,function(w,T,x){(v.blotName==null&&v(w)||v.blotName!=null&&w instanceof v)&&_.push(w),w instanceof c&&(_=_.concat(w.descendants(v,T,m))),m-=x}),_},c.prototype.detach=function(){this.children.forEach(function(v){v.detach()}),p.prototype.detach.call(this)},c.prototype.formatAt=function(v,y,b,_){this.children.forEachAt(v,y,function(m,w,T){m.formatAt(w,T,b,_)})},c.prototype.insertAt=function(v,y,b){var _=this.children.find(v),m=_[0],w=_[1];if(m)m.insertAt(w,y,b);else{var T=b==null?f.create("text",y):f.create(y,b);this.appendChild(T)}},c.prototype.insertBefore=function(v,y){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(b){return v instanceof b}))throw new f.ParchmentError("Cannot insert "+v.statics.blotName+" into "+this.statics.blotName);v.insertInto(this,y)},c.prototype.length=function(){return this.children.reduce(function(v,y){return v+y.length()},0)},c.prototype.moveChildren=function(v,y){this.children.forEach(function(b){v.insertBefore(b,y)})},c.prototype.optimize=function(v){if(p.prototype.optimize.call(this,v),this.children.length===0)if(this.statics.defaultChild!=null){var y=f.create(this.statics.defaultChild);this.appendChild(y),y.optimize(v)}else this.remove()},c.prototype.path=function(v,y){y===void 0&&(y=!1);var b=this.children.find(v,y),_=b[0],m=b[1],w=[[this,v]];return _ instanceof c?w.concat(_.path(m,y)):(_!=null&&w.push([_,m]),w)},c.prototype.removeChild=function(v){this.children.remove(v)},c.prototype.replace=function(v){v instanceof c&&v.moveChildren(this),p.prototype.replace.call(this,v)},c.prototype.split=function(v,y){if(y===void 0&&(y=!1),!y){if(v===0)return this;if(v===this.length())return this.next}var b=this.clone();return this.parent.insertBefore(b,this.next),this.children.forEachAt(v,this.length(),function(_,m,w){_=_.split(m,y),b.appendChild(_)}),b},c.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},c.prototype.update=function(v,y){var b=this,_=[],m=[];v.forEach(function(w){w.target===b.domNode&&w.type==="childList"&&(_.push.apply(_,w.addedNodes),m.push.apply(m,w.removedNodes))}),m.forEach(function(w){if(!(w.parentNode!=null&&w.tagName!=="IFRAME"&&document.body.compareDocumentPosition(w)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var T=f.find(w);T!=null&&(T.domNode.parentNode==null||T.domNode.parentNode===b.domNode)&&T.detach()}}),_.filter(function(w){return w.parentNode==b.domNode}).sort(function(w,T){return w===T?0:w.compareDocumentPosition(T)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(w){var T=null;w.nextSibling!=null&&(T=f.find(w.nextSibling));var x=d(w);(x.next!=T||x.next==null)&&(x.parent!=null&&x.parent.removeChild(b),b.insertBefore(x,T||void 0))})},c}(u.default);function d(p){var c=f.find(p);if(c==null)try{c=f.create(p)}catch{c=f.create(f.Scope.INLINE),[].slice.call(p.childNodes).forEach(function(y){c.domNode.appendChild(y)}),p.parentNode&&p.parentNode.replaceChild(c.domNode,p),c.attach()}return c}n.default=h},function(r,n,i){var o=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var y in v)v.hasOwnProperty(y)&&(c[y]=v[y])};return function(c,v){p(c,v);function y(){this.constructor=c}c.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(12),u=i(31),f=i(17),h=i(1),d=function(p){o(c,p);function c(v){var y=p.call(this,v)||this;return y.attributes=new u.default(y.domNode),y}return c.formats=function(v){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return v.tagName.toLowerCase()},c.prototype.format=function(v,y){var b=h.query(v);b instanceof a.default?this.attributes.attribute(b,y):y&&b!=null&&(v!==this.statics.blotName||this.formats()[v]!==y)&&this.replaceWith(v,y)},c.prototype.formats=function(){var v=this.attributes.values(),y=this.statics.formats(this.domNode);return y!=null&&(v[this.statics.blotName]=y),v},c.prototype.replaceWith=function(v,y){var b=p.prototype.replaceWith.call(this,v,y);return this.attributes.copy(b),b},c.prototype.update=function(v,y){var b=this;p.prototype.update.call(this,v,y),v.some(function(_){return _.target===b.domNode&&_.type==="attributes"})&&this.attributes.build()},c.prototype.wrap=function(v,y){var b=p.prototype.wrap.call(this,v,y);return b instanceof c&&b.statics.scope===this.statics.scope&&this.attributes.move(b),b},c}(f.default);n.default=d},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var c in p)p.hasOwnProperty(c)&&(d[c]=p[c])};return function(d,p){h(d,p);function c(){this.constructor=d}d.prototype=p===null?Object.create(p):(c.prototype=p.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(30),u=i(1),f=function(h){o(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.value=function(p){return!0},d.prototype.index=function(p,c){return this.domNode===p||this.domNode.compareDocumentPosition(p)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(c,1):-1},d.prototype.position=function(p,c){var v=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return p>0&&(v+=1),[this.parent.domNode,v]},d.prototype.value=function(){var p;return p={},p[this.statics.blotName]=this.statics.value(this.domNode)||!0,p},d.scope=u.Scope.INLINE_BLOT,d}(a.default);n.default=f},function(r,n,i){var o=i(11),a=i(3),u={attributes:{compose:function(h,d,p){typeof h!="object"&&(h={}),typeof d!="object"&&(d={});var c=a(!0,{},d);p||(c=Object.keys(c).reduce(function(y,b){return c[b]!=null&&(y[b]=c[b]),y},{}));for(var v in h)h[v]!==void 0&&d[v]===void 0&&(c[v]=h[v]);return Object.keys(c).length>0?c:void 0},diff:function(h,d){typeof h!="object"&&(h={}),typeof d!="object"&&(d={});var p=Object.keys(h).concat(Object.keys(d)).reduce(function(c,v){return o(h[v],d[v])||(c[v]=d[v]===void 0?null:d[v]),c},{});return Object.keys(p).length>0?p:void 0},transform:function(h,d,p){if(typeof h!="object")return d;if(typeof d=="object"){if(!p)return d;var c=Object.keys(d).reduce(function(v,y){return h[y]===void 0&&(v[y]=d[y]),v},{});return Object.keys(c).length>0?c:void 0}}},iterator:function(h){return new f(h)},length:function(h){return typeof h.delete=="number"?h.delete:typeof h.retain=="number"?h.retain:typeof h.insert=="string"?h.insert.length:1}};function f(h){this.ops=h,this.index=0,this.offset=0}f.prototype.hasNext=function(){return this.peekLength()<1/0},f.prototype.next=function(h){h||(h=1/0);var d=this.ops[this.index];if(d){var p=this.offset,c=u.length(d);if(h>=c-p?(h=c-p,this.index+=1,this.offset=0):this.offset+=h,typeof d.delete=="number")return{delete:h};var v={};return d.attributes&&(v.attributes=d.attributes),typeof d.retain=="number"?v.retain=h:typeof d.insert=="string"?v.insert=d.insert.substr(p,h):v.insert=d.insert,v}else return{retain:1/0}},f.prototype.peek=function(){return this.ops[this.index]},f.prototype.peekLength=function(){return this.ops[this.index]?u.length(this.ops[this.index])-this.offset:1/0},f.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},f.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var h=this.offset,d=this.index,p=this.next(),c=this.ops.slice(this.index);return this.offset=h,this.index=d,[p].concat(c)}else return[]},r.exports=u},function(r,n){var i=function(){function o(b,_){return _!=null&&b instanceof _}var a;try{a=Map}catch{a=function(){}}var u;try{u=Set}catch{u=function(){}}var f;try{f=Promise}catch{f=function(){}}function h(b,_,m,w,T){typeof _=="object"&&(m=_.depth,w=_.prototype,T=_.includeNonEnumerable,_=_.circular);var x=[],E=[],I=typeof Buffer<"u";typeof _>"u"&&(_=!0),typeof m>"u"&&(m=1/0);function A(O,L){if(O===null)return null;if(L===0)return O;var R,C;if(typeof O!="object")return O;if(o(O,a))R=new a;else if(o(O,u))R=new u;else if(o(O,f))R=new f(function(U,k){O.then(function(j){U(A(j,L-1))},function(j){k(A(j,L-1))})});else if(h.__isArray(O))R=[];else if(h.__isRegExp(O))R=new RegExp(O.source,y(O)),O.lastIndex&&(R.lastIndex=O.lastIndex);else if(h.__isDate(O))R=new Date(O.getTime());else{if(I&&Buffer.isBuffer(O))return Buffer.allocUnsafe?R=Buffer.allocUnsafe(O.length):R=new Buffer(O.length),O.copy(R),R;o(O,Error)?R=Object.create(O):typeof w>"u"?(C=Object.getPrototypeOf(O),R=Object.create(C)):(R=Object.create(w),C=w)}if(_){var P=x.indexOf(O);if(P!=-1)return E[P];x.push(O),E.push(R)}o(O,a)&&O.forEach(function(U,k){var j=A(k,L-1),G=A(U,L-1);R.set(j,G)}),o(O,u)&&O.forEach(function(U){var k=A(U,L-1);R.add(k)});for(var M in O){var F;C&&(F=Object.getOwnPropertyDescriptor(C,M)),!(F&&F.set==null)&&(R[M]=A(O[M],L-1))}if(Object.getOwnPropertySymbols)for(var q=Object.getOwnPropertySymbols(O),M=0;M<q.length;M++){var Z=q[M],z=Object.getOwnPropertyDescriptor(O,Z);z&&!z.enumerable&&!T||(R[Z]=A(O[Z],L-1),z.enumerable||Object.defineProperty(R,Z,{enumerable:!1}))}if(T)for(var nt=Object.getOwnPropertyNames(O),M=0;M<nt.length;M++){var V=nt[M],z=Object.getOwnPropertyDescriptor(O,V);z&&z.enumerable||(R[V]=A(O[V],L-1),Object.defineProperty(R,V,{enumerable:!1}))}return R}return A(b,m)}h.clonePrototype=function(_){if(_===null)return null;var m=function(){};return m.prototype=_,new m};function d(b){return Object.prototype.toString.call(b)}h.__objToStr=d;function p(b){return typeof b=="object"&&d(b)==="[object Date]"}h.__isDate=p;function c(b){return typeof b=="object"&&d(b)==="[object Array]"}h.__isArray=c;function v(b){return typeof b=="object"&&d(b)==="[object RegExp]"}h.__isRegExp=v;function y(b){var _="";return b.global&&(_+="g"),b.ignoreCase&&(_+="i"),b.multiline&&(_+="m"),_}return h.__getRegExpFlags=y,h}();typeof r=="object"&&r.exports&&(r.exports=i)},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function R(C,P){var M=[],F=!0,q=!1,Z=void 0;try{for(var z=C[Symbol.iterator](),nt;!(F=(nt=z.next()).done)&&(M.push(nt.value),!(P&&M.length===P));F=!0);}catch(V){q=!0,Z=V}finally{try{!F&&z.return&&z.return()}finally{if(q)throw Z}}return M}return function(C,P){if(Array.isArray(C))return C;if(Symbol.iterator in Object(C))return R(C,P);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function R(C,P){for(var M=0;M<P.length;M++){var F=P[M];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(C,F.key,F)}}return function(C,P,M){return P&&R(C.prototype,P),M&&R(C,M),C}}(),u=function R(C,P,M){C===null&&(C=Function.prototype);var F=Object.getOwnPropertyDescriptor(C,P);if(F===void 0){var q=Object.getPrototypeOf(C);return q===null?void 0:R(q,P,M)}else{if("value"in F)return F.value;var Z=F.get;return Z===void 0?void 0:Z.call(M)}},f=i(0),h=x(f),d=i(8),p=x(d),c=i(4),v=x(c),y=i(16),b=x(y),_=i(13),m=x(_),w=i(25),T=x(w);function x(R){return R&&R.__esModule?R:{default:R}}function E(R,C){if(!(R instanceof C))throw new TypeError("Cannot call a class as a function")}function I(R,C){if(!R)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:R}function A(R,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);R.prototype=Object.create(C&&C.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(R,C):R.__proto__=C)}function O(R){return R instanceof v.default||R instanceof c.BlockEmbed}var L=function(R){A(C,R);function C(P,M){E(this,C);var F=I(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,P));return F.emitter=M.emitter,Array.isArray(M.whitelist)&&(F.whitelist=M.whitelist.reduce(function(q,Z){return q[Z]=!0,q},{})),F.domNode.addEventListener("DOMNodeInserted",function(){}),F.optimize(),F.enable(),F}return a(C,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(M,F){var q=this.line(M),Z=o(q,2),z=Z[0],nt=Z[1],V=this.line(M+F),U=o(V,1),k=U[0];if(u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"deleteAt",this).call(this,M,F),k!=null&&z!==k&&nt>0){if(z instanceof c.BlockEmbed||k instanceof c.BlockEmbed){this.optimize();return}if(z instanceof m.default){var j=z.newlineIndex(z.length(),!0);if(j>-1&&(z=z.split(j+1),z===k)){this.optimize();return}}else if(k instanceof m.default){var G=k.newlineIndex(0);G>-1&&k.split(G+1)}var X=k.children.head instanceof b.default?null:k.children.head;z.moveChildren(k,X),z.remove()}this.optimize()}},{key:"enable",value:function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",M)}},{key:"formatAt",value:function(M,F,q,Z){this.whitelist!=null&&!this.whitelist[q]||(u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"formatAt",this).call(this,M,F,q,Z),this.optimize())}},{key:"insertAt",value:function(M,F,q){if(!(q!=null&&this.whitelist!=null&&!this.whitelist[F])){if(M>=this.length())if(q==null||h.default.query(F,h.default.Scope.BLOCK)==null){var Z=h.default.create(this.statics.defaultChild);this.appendChild(Z),q==null&&F.endsWith(`
1986
- `)&&(F=F.slice(0,-1)),Z.insertAt(0,F,q)}else{var z=h.default.create(F,q);this.appendChild(z)}else u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"insertAt",this).call(this,M,F,q);this.optimize()}}},{key:"insertBefore",value:function(M,F){if(M.statics.scope===h.default.Scope.INLINE_BLOT){var q=h.default.create(this.statics.defaultChild);q.appendChild(M),M=q}u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"insertBefore",this).call(this,M,F)}},{key:"leaf",value:function(M){return this.path(M).pop()||[null,-1]}},{key:"line",value:function(M){return M===this.length()?this.line(M-1):this.descendant(O,M)}},{key:"lines",value:function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,q=function Z(z,nt,V){var U=[],k=V;return z.children.forEachAt(nt,V,function(j,G,X){O(j)?U.push(j):j instanceof h.default.Container&&(U=U.concat(Z(j,G,k))),k-=X}),U};return q(this,M,F)}},{key:"optimize",value:function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"optimize",this).call(this,M,F),M.length>0&&this.emitter.emit(p.default.events.SCROLL_OPTIMIZE,M,F))}},{key:"path",value:function(M){return u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"path",this).call(this,M).slice(1)}},{key:"update",value:function(M){if(this.batch!==!0){var F=p.default.sources.USER;typeof M=="string"&&(F=M),Array.isArray(M)||(M=this.observer.takeRecords()),M.length>0&&this.emitter.emit(p.default.events.SCROLL_BEFORE_UPDATE,F,M),u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"update",this).call(this,M.concat([])),M.length>0&&this.emitter.emit(p.default.events.SCROLL_UPDATE,F,M)}}}]),C}(h.default.Scroll);L.blotName="scroll",L.className="ql-editor",L.tagName="DIV",L.defaultChild="block",L.allowedChildren=[v.default,c.BlockEmbed,T.default],n.default=L},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.SHORTKEY=n.default=void 0;var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},a=function(){function $(W,et){var J=[],it=!0,lt=!1,pt=void 0;try{for(var yt=W[Symbol.iterator](),xt;!(it=(xt=yt.next()).done)&&(J.push(xt.value),!(et&&J.length===et));it=!0);}catch(At){lt=!0,pt=At}finally{try{!it&&yt.return&&yt.return()}finally{if(lt)throw pt}}return J}return function(W,et){if(Array.isArray(W))return W;if(Symbol.iterator in Object(W))return $(W,et);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function $(W,et){for(var J=0;J<et.length;J++){var it=et[J];it.enumerable=it.enumerable||!1,it.configurable=!0,"value"in it&&(it.writable=!0),Object.defineProperty(W,it.key,it)}}return function(W,et,J){return et&&$(W.prototype,et),J&&$(W,J),W}}(),f=i(21),h=R(f),d=i(11),p=R(d),c=i(3),v=R(c),y=i(2),b=R(y),_=i(20),m=R(_),w=i(0),T=R(w),x=i(5),E=R(x),I=i(10),A=R(I),O=i(9),L=R(O);function R($){return $&&$.__esModule?$:{default:$}}function C($,W,et){return W in $?Object.defineProperty($,W,{value:et,enumerable:!0,configurable:!0,writable:!0}):$[W]=et,$}function P($,W){if(!($ instanceof W))throw new TypeError("Cannot call a class as a function")}function M($,W){if(!$)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return W&&(typeof W=="object"||typeof W=="function")?W:$}function F($,W){if(typeof W!="function"&&W!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof W);$.prototype=Object.create(W&&W.prototype,{constructor:{value:$,enumerable:!1,writable:!0,configurable:!0}}),W&&(Object.setPrototypeOf?Object.setPrototypeOf($,W):$.__proto__=W)}var q=(0,A.default)("quill:keyboard"),Z=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",z=function($){F(W,$),u(W,null,[{key:"match",value:function(J,it){return it=Y(it),["altKey","ctrlKey","metaKey","shiftKey"].some(function(lt){return!!it[lt]!==J[lt]&&it[lt]!==null})?!1:it.key===(J.which||J.keyCode)}}]);function W(et,J){P(this,W);var it=M(this,(W.__proto__||Object.getPrototypeOf(W)).call(this,et,J));return it.bindings={},Object.keys(it.options.bindings).forEach(function(lt){lt==="list autofill"&&et.scroll.whitelist!=null&&!et.scroll.whitelist.list||it.options.bindings[lt]&&it.addBinding(it.options.bindings[lt])}),it.addBinding({key:W.keys.ENTER,shiftKey:null},j),it.addBinding({key:W.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(it.addBinding({key:W.keys.BACKSPACE},{collapsed:!0},V),it.addBinding({key:W.keys.DELETE},{collapsed:!0},U)):(it.addBinding({key:W.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},V),it.addBinding({key:W.keys.DELETE},{collapsed:!0,suffix:/^.?$/},U)),it.addBinding({key:W.keys.BACKSPACE},{collapsed:!1},k),it.addBinding({key:W.keys.DELETE},{collapsed:!1},k),it.addBinding({key:W.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},V),it.listen(),it}return u(W,[{key:"addBinding",value:function(J){var it=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},lt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},pt=Y(J);if(pt==null||pt.key==null)return q.warn("Attempted to add invalid keyboard binding",pt);typeof it=="function"&&(it={handler:it}),typeof lt=="function"&&(lt={handler:lt}),pt=(0,v.default)(pt,it,lt),this.bindings[pt.key]=this.bindings[pt.key]||[],this.bindings[pt.key].push(pt)}},{key:"listen",value:function(){var J=this;this.quill.root.addEventListener("keydown",function(it){if(!it.defaultPrevented){var lt=it.which||it.keyCode,pt=(J.bindings[lt]||[]).filter(function(he){return W.match(it,he)});if(pt.length!==0){var yt=J.quill.getSelection();if(!(yt==null||!J.quill.hasFocus())){var xt=J.quill.getLine(yt.index),At=a(xt,2),oe=At[0],Ht=At[1],rt=J.quill.getLeaf(yt.index),at=a(rt,2),dt=at[0],vt=at[1],ct=yt.length===0?[dt,vt]:J.quill.getLeaf(yt.index+yt.length),Pt=a(ct,2),Lt=Pt[0],Nt=Pt[1],He=dt instanceof T.default.Text?dt.value().slice(0,vt):"",Ge=Lt instanceof T.default.Text?Lt.value().slice(Nt):"",Qt={collapsed:yt.length===0,empty:yt.length===0&&oe.length()<=1,format:J.quill.getFormat(yt),offset:Ht,prefix:He,suffix:Ge},Es=pt.some(function(he){if(he.collapsed!=null&&he.collapsed!==Qt.collapsed||he.empty!=null&&he.empty!==Qt.empty||he.offset!=null&&he.offset!==Qt.offset)return!1;if(Array.isArray(he.format)){if(he.format.every(function(ur){return Qt.format[ur]==null}))return!1}else if(o(he.format)==="object"&&!Object.keys(he.format).every(function(ur){return he.format[ur]===!0?Qt.format[ur]!=null:he.format[ur]===!1?Qt.format[ur]==null:(0,p.default)(he.format[ur],Qt.format[ur])}))return!1;return he.prefix!=null&&!he.prefix.test(Qt.prefix)||he.suffix!=null&&!he.suffix.test(Qt.suffix)?!1:he.handler.call(J,yt,Qt)!==!0});Es&&it.preventDefault()}}}})}}]),W}(L.default);z.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},z.DEFAULTS={bindings:{bold:X("bold"),italic:X("italic"),underline:X("underline"),indent:{key:z.keys.TAB,format:["blockquote","indent","list"],handler:function(W,et){if(et.collapsed&&et.offset!==0)return!0;this.quill.format("indent","+1",E.default.sources.USER)}},outdent:{key:z.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(W,et){if(et.collapsed&&et.offset!==0)return!0;this.quill.format("indent","-1",E.default.sources.USER)}},"outdent backspace":{key:z.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(W,et){et.format.indent!=null?this.quill.format("indent","-1",E.default.sources.USER):et.format.list!=null&&this.quill.format("list",!1,E.default.sources.USER)}},"indent code-block":G(!0),"outdent code-block":G(!1),"remove tab":{key:z.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(W){this.quill.deleteText(W.index-1,1,E.default.sources.USER)}},tab:{key:z.keys.TAB,handler:function(W){this.quill.history.cutoff();var et=new b.default().retain(W.index).delete(W.length).insert(" ");this.quill.updateContents(et,E.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(W.index+1,E.default.sources.SILENT)}},"list empty enter":{key:z.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(W,et){this.quill.format("list",!1,E.default.sources.USER),et.format.indent&&this.quill.format("indent",!1,E.default.sources.USER)}},"checklist enter":{key:z.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(W){var et=this.quill.getLine(W.index),J=a(et,2),it=J[0],lt=J[1],pt=(0,v.default)({},it.formats(),{list:"checked"}),yt=new b.default().retain(W.index).insert(`
1987
- `,pt).retain(it.length()-lt-1).retain(1,{list:"unchecked"});this.quill.updateContents(yt,E.default.sources.USER),this.quill.setSelection(W.index+1,E.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:z.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(W,et){var J=this.quill.getLine(W.index),it=a(J,2),lt=it[0],pt=it[1],yt=new b.default().retain(W.index).insert(`
1988
- `,et.format).retain(lt.length()-pt-1).retain(1,{header:null});this.quill.updateContents(yt,E.default.sources.USER),this.quill.setSelection(W.index+1,E.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(W,et){var J=et.prefix.length,it=this.quill.getLine(W.index),lt=a(it,2),pt=lt[0],yt=lt[1];if(yt>J)return!0;var xt=void 0;switch(et.prefix.trim()){case"[]":case"[ ]":xt="unchecked";break;case"[x]":xt="checked";break;case"-":case"*":xt="bullet";break;default:xt="ordered"}this.quill.insertText(W.index," ",E.default.sources.USER),this.quill.history.cutoff();var At=new b.default().retain(W.index-yt).delete(J+1).retain(pt.length()-2-yt).retain(1,{list:xt});this.quill.updateContents(At,E.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(W.index-J,E.default.sources.SILENT)}},"code exit":{key:z.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(W){var et=this.quill.getLine(W.index),J=a(et,2),it=J[0],lt=J[1],pt=new b.default().retain(W.index+it.length()-lt-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(pt,E.default.sources.USER)}},"embed left":nt(z.keys.LEFT,!1),"embed left shift":nt(z.keys.LEFT,!0),"embed right":nt(z.keys.RIGHT,!1),"embed right shift":nt(z.keys.RIGHT,!0)}};function nt($,W){var et,J=$===z.keys.LEFT?"prefix":"suffix";return et={key:$,shiftKey:W,altKey:null},C(et,J,/^$/),C(et,"handler",function(lt){var pt=lt.index;$===z.keys.RIGHT&&(pt+=lt.length+1);var yt=this.quill.getLeaf(pt),xt=a(yt,1),At=xt[0];return At instanceof T.default.Embed?($===z.keys.LEFT?W?this.quill.setSelection(lt.index-1,lt.length+1,E.default.sources.USER):this.quill.setSelection(lt.index-1,E.default.sources.USER):W?this.quill.setSelection(lt.index,lt.length+1,E.default.sources.USER):this.quill.setSelection(lt.index+lt.length+1,E.default.sources.USER),!1):!0}),et}function V($,W){if(!($.index===0||this.quill.getLength()<=1)){var et=this.quill.getLine($.index),J=a(et,1),it=J[0],lt={};if(W.offset===0){var pt=this.quill.getLine($.index-1),yt=a(pt,1),xt=yt[0];if(xt!=null&&xt.length()>1){var At=it.formats(),oe=this.quill.getFormat($.index-1,1);lt=m.default.attributes.diff(At,oe)||{}}}var Ht=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(W.prefix)?2:1;this.quill.deleteText($.index-Ht,Ht,E.default.sources.USER),Object.keys(lt).length>0&&this.quill.formatLine($.index-Ht,Ht,lt,E.default.sources.USER),this.quill.focus()}}function U($,W){var et=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(W.suffix)?2:1;if(!($.index>=this.quill.getLength()-et)){var J={},it=0,lt=this.quill.getLine($.index),pt=a(lt,1),yt=pt[0];if(W.offset>=yt.length()-1){var xt=this.quill.getLine($.index+1),At=a(xt,1),oe=At[0];if(oe){var Ht=yt.formats(),rt=this.quill.getFormat($.index,1);J=m.default.attributes.diff(Ht,rt)||{},it=oe.length()}}this.quill.deleteText($.index,et,E.default.sources.USER),Object.keys(J).length>0&&this.quill.formatLine($.index+it-1,et,J,E.default.sources.USER)}}function k($){var W=this.quill.getLines($),et={};if(W.length>1){var J=W[0].formats(),it=W[W.length-1].formats();et=m.default.attributes.diff(it,J)||{}}this.quill.deleteText($,E.default.sources.USER),Object.keys(et).length>0&&this.quill.formatLine($.index,1,et,E.default.sources.USER),this.quill.setSelection($.index,E.default.sources.SILENT),this.quill.focus()}function j($,W){var et=this;$.length>0&&this.quill.scroll.deleteAt($.index,$.length);var J=Object.keys(W.format).reduce(function(it,lt){return T.default.query(lt,T.default.Scope.BLOCK)&&!Array.isArray(W.format[lt])&&(it[lt]=W.format[lt]),it},{});this.quill.insertText($.index,`
1989
- `,J,E.default.sources.USER),this.quill.setSelection($.index+1,E.default.sources.SILENT),this.quill.focus(),Object.keys(W.format).forEach(function(it){J[it]==null&&(Array.isArray(W.format[it])||it!=="link"&&et.quill.format(it,W.format[it],E.default.sources.USER))})}function G($){return{key:z.keys.TAB,shiftKey:!$,format:{"code-block":!0},handler:function(et){var J=T.default.query("code-block"),it=et.index,lt=et.length,pt=this.quill.scroll.descendant(J,it),yt=a(pt,2),xt=yt[0],At=yt[1];if(xt!=null){var oe=this.quill.getIndex(xt),Ht=xt.newlineIndex(At,!0)+1,rt=xt.newlineIndex(oe+At+lt),at=xt.domNode.textContent.slice(Ht,rt).split(`
1990
- `);At=0,at.forEach(function(dt,vt){$?(xt.insertAt(Ht+At,J.TAB),At+=J.TAB.length,vt===0?it+=J.TAB.length:lt+=J.TAB.length):dt.startsWith(J.TAB)&&(xt.deleteAt(Ht+At,J.TAB.length),At-=J.TAB.length,vt===0?it-=J.TAB.length:lt-=J.TAB.length),At+=dt.length+1}),this.quill.update(E.default.sources.USER),this.quill.setSelection(it,lt,E.default.sources.SILENT)}}}}function X($){return{key:$[0].toUpperCase(),shortKey:!0,handler:function(et,J){this.quill.format($,!J.format[$],E.default.sources.USER)}}}function Y($){if(typeof $=="string"||typeof $=="number")return Y({key:$});if((typeof $>"u"?"undefined":o($))==="object"&&($=(0,h.default)($,!1)),typeof $.key=="string")if(z.keys[$.key.toUpperCase()]!=null)$.key=z.keys[$.key.toUpperCase()];else if($.key.length===1)$.key=$.key.toUpperCase().charCodeAt(0);else return null;return $.shortKey&&($[Z]=$.shortKey,delete $.shortKey),$}n.default=z,n.SHORTKEY=Z},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function m(w,T){var x=[],E=!0,I=!1,A=void 0;try{for(var O=w[Symbol.iterator](),L;!(E=(L=O.next()).done)&&(x.push(L.value),!(T&&x.length===T));E=!0);}catch(R){I=!0,A=R}finally{try{!E&&O.return&&O.return()}finally{if(I)throw A}}return x}return function(w,T){if(Array.isArray(w))return w;if(Symbol.iterator in Object(w))return m(w,T);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function m(w,T,x){w===null&&(w=Function.prototype);var E=Object.getOwnPropertyDescriptor(w,T);if(E===void 0){var I=Object.getPrototypeOf(w);return I===null?void 0:m(I,T,x)}else{if("value"in E)return E.value;var A=E.get;return A===void 0?void 0:A.call(x)}},u=function(){function m(w,T){for(var x=0;x<T.length;x++){var E=T[x];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(w,E.key,E)}}return function(w,T,x){return T&&m(w.prototype,T),x&&m(w,x),w}}(),f=i(0),h=c(f),d=i(7),p=c(d);function c(m){return m&&m.__esModule?m:{default:m}}function v(m,w){if(!(m instanceof w))throw new TypeError("Cannot call a class as a function")}function y(m,w){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:m}function b(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);m.prototype=Object.create(w&&w.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(m,w):m.__proto__=w)}var _=function(m){b(w,m),u(w,null,[{key:"value",value:function(){}}]);function w(T,x){v(this,w);var E=y(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,T));return E.selection=x,E.textNode=document.createTextNode(w.CONTENTS),E.domNode.appendChild(E.textNode),E._length=0,E}return u(w,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(x,E){if(this._length!==0)return a(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"format",this).call(this,x,E);for(var I=this,A=0;I!=null&&I.statics.scope!==h.default.Scope.BLOCK_BLOT;)A+=I.offset(I.parent),I=I.parent;I!=null&&(this._length=w.CONTENTS.length,I.optimize(),I.formatAt(A,w.CONTENTS.length,x,E),this._length=0)}},{key:"index",value:function(x,E){return x===this.textNode?0:a(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"index",this).call(this,x,E)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){a(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var x=this.textNode,E=this.selection.getNativeRange(),I=void 0,A=void 0,O=void 0;if(E!=null&&E.start.node===x&&E.end.node===x){var L=[x,E.start.offset,E.end.offset];I=L[0],A=L[1],O=L[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==w.CONTENTS){var R=this.textNode.data.split(w.CONTENTS).join("");this.next instanceof p.default?(I=this.next.domNode,this.next.insertAt(0,R),this.textNode.data=w.CONTENTS):(this.textNode.data=R,this.parent.insertBefore(h.default.create(this.textNode),this),this.textNode=document.createTextNode(w.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),A!=null){var C=[A,O].map(function(M){return Math.max(0,Math.min(I.data.length,M-1))}),P=o(C,2);return A=P[0],O=P[1],{startNode:I,startOffset:A,endNode:I,endOffset:O}}}}},{key:"update",value:function(x,E){var I=this;if(x.some(function(O){return O.type==="characterData"&&O.target===I.textNode})){var A=this.restore();A&&(E.range=A)}}},{key:"value",value:function(){return""}}]),w}(h.default.Embed);_.blotName="cursor",_.className="ql-cursor",_.tagName="span",_.CONTENTS="\uFEFF",n.default=_},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(0),a=h(o),u=i(4),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function d(y,b){if(!(y instanceof b))throw new TypeError("Cannot call a class as a function")}function p(y,b){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:y}function c(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);y.prototype=Object.create(b&&b.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(y,b):y.__proto__=b)}var v=function(y){c(b,y);function b(){return d(this,b),p(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return b}(a.default.Container);v.allowedChildren=[f.default,u.BlockEmbed,v],n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.ColorStyle=n.ColorClass=n.ColorAttributor=void 0;var o=function(){function _(m,w){for(var T=0;T<w.length;T++){var x=w[T];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,w,T){return w&&_(m.prototype,w),T&&_(m,T),m}}(),a=function _(m,w,T){m===null&&(m=Function.prototype);var x=Object.getOwnPropertyDescriptor(m,w);if(x===void 0){var E=Object.getPrototypeOf(m);return E===null?void 0:_(E,w,T)}else{if("value"in x)return x.value;var I=x.get;return I===void 0?void 0:I.call(T)}},u=i(0),f=h(u);function h(_){return _&&_.__esModule?_:{default:_}}function d(_,m){if(!(_ instanceof m))throw new TypeError("Cannot call a class as a function")}function p(_,m){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:_}function c(_,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);_.prototype=Object.create(m&&m.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(_,m):_.__proto__=m)}var v=function(_){c(m,_);function m(){return d(this,m),p(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return o(m,[{key:"value",value:function(T){var x=a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"value",this).call(this,T);return x.startsWith("rgb(")?(x=x.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+x.split(",").map(function(E){return("00"+parseInt(E).toString(16)).slice(-2)}).join("")):x}}]),m}(f.default.Attributor.Style),y=new f.default.Attributor.Class("color","ql-color",{scope:f.default.Scope.INLINE}),b=new v("color","color",{scope:f.default.Scope.INLINE});n.ColorAttributor=v,n.ColorClass=y,n.ColorStyle=b},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.sanitize=n.default=void 0;var o=function(){function b(_,m){for(var w=0;w<m.length;w++){var T=m[w];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(_,T.key,T)}}return function(_,m,w){return m&&b(_.prototype,m),w&&b(_,w),_}}(),a=function b(_,m,w){_===null&&(_=Function.prototype);var T=Object.getOwnPropertyDescriptor(_,m);if(T===void 0){var x=Object.getPrototypeOf(_);return x===null?void 0:b(x,m,w)}else{if("value"in T)return T.value;var E=T.get;return E===void 0?void 0:E.call(w)}},u=i(6),f=h(u);function h(b){return b&&b.__esModule?b:{default:b}}function d(b,_){if(!(b instanceof _))throw new TypeError("Cannot call a class as a function")}function p(b,_){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:b}function c(b,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);b.prototype=Object.create(_&&_.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(b,_):b.__proto__=_)}var v=function(b){c(_,b);function _(){return d(this,_),p(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return o(_,[{key:"format",value:function(w,T){if(w!==this.statics.blotName||!T)return a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"format",this).call(this,w,T);T=this.constructor.sanitize(T),this.domNode.setAttribute("href",T)}}],[{key:"create",value:function(w){var T=a(_.__proto__||Object.getPrototypeOf(_),"create",this).call(this,w);return w=this.sanitize(w),T.setAttribute("href",w),T.setAttribute("rel","noopener noreferrer"),T.setAttribute("target","_blank"),T}},{key:"formats",value:function(w){return w.getAttribute("href")}},{key:"sanitize",value:function(w){return y(w,this.PROTOCOL_WHITELIST)?w:this.SANITIZED_URL}}]),_}(f.default);v.blotName="link",v.tagName="A",v.SANITIZED_URL="about:blank",v.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function y(b,_){var m=document.createElement("a");m.href=b;var w=m.href.slice(0,m.href.indexOf(":"));return _.indexOf(w)>-1}n.default=v,n.sanitize=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},a=function(){function _(m,w){for(var T=0;T<w.length;T++){var x=w[T];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,w,T){return w&&_(m.prototype,w),T&&_(m,T),m}}(),u=i(23),f=p(u),h=i(107),d=p(h);function p(_){return _&&_.__esModule?_:{default:_}}function c(_,m){if(!(_ instanceof m))throw new TypeError("Cannot call a class as a function")}var v=0;function y(_,m){_.setAttribute(m,_.getAttribute(m)!=="true")}var b=function(){function _(m){var w=this;c(this,_),this.select=m,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){w.togglePicker()}),this.label.addEventListener("keydown",function(T){switch(T.keyCode){case f.default.keys.ENTER:w.togglePicker();break;case f.default.keys.ESCAPE:w.escape(),T.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return a(_,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),y(this.label,"aria-expanded"),y(this.options,"aria-hidden")}},{key:"buildItem",value:function(w){var T=this,x=document.createElement("span");return x.tabIndex="0",x.setAttribute("role","button"),x.classList.add("ql-picker-item"),w.hasAttribute("value")&&x.setAttribute("data-value",w.getAttribute("value")),w.textContent&&x.setAttribute("data-label",w.textContent),x.addEventListener("click",function(){T.selectItem(x,!0)}),x.addEventListener("keydown",function(E){switch(E.keyCode){case f.default.keys.ENTER:T.selectItem(x,!0),E.preventDefault();break;case f.default.keys.ESCAPE:T.escape(),E.preventDefault();break}}),x}},{key:"buildLabel",value:function(){var w=document.createElement("span");return w.classList.add("ql-picker-label"),w.innerHTML=d.default,w.tabIndex="0",w.setAttribute("role","button"),w.setAttribute("aria-expanded","false"),this.container.appendChild(w),w}},{key:"buildOptions",value:function(){var w=this,T=document.createElement("span");T.classList.add("ql-picker-options"),T.setAttribute("aria-hidden","true"),T.tabIndex="-1",T.id="ql-picker-options-"+v,v+=1,this.label.setAttribute("aria-controls",T.id),this.options=T,[].slice.call(this.select.options).forEach(function(x){var E=w.buildItem(x);T.appendChild(E),x.selected===!0&&w.selectItem(E)}),this.container.appendChild(T)}},{key:"buildPicker",value:function(){var w=this;[].slice.call(this.select.attributes).forEach(function(T){w.container.setAttribute(T.name,T.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var w=this;this.close(),setTimeout(function(){return w.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(w){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,x=this.container.querySelector(".ql-selected");if(w!==x&&(x!=null&&x.classList.remove("ql-selected"),w!=null&&(w.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(w.parentNode.children,w),w.hasAttribute("data-value")?this.label.setAttribute("data-value",w.getAttribute("data-value")):this.label.removeAttribute("data-value"),w.hasAttribute("data-label")?this.label.setAttribute("data-label",w.getAttribute("data-label")):this.label.removeAttribute("data-label"),T))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":o(Event))==="object"){var E=document.createEvent("Event");E.initEvent("change",!0,!0),this.select.dispatchEvent(E)}this.close()}}},{key:"update",value:function(){var w=void 0;if(this.select.selectedIndex>-1){var T=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];w=this.select.options[this.select.selectedIndex],this.selectItem(T)}else this.selectItem(null);var x=w!=null&&w!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",x)}}]),_}();n.default=b},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(0),a=q(o),u=i(5),f=q(u),h=i(4),d=q(h),p=i(16),c=q(p),v=i(25),y=q(v),b=i(24),_=q(b),m=i(35),w=q(m),T=i(6),x=q(T),E=i(22),I=q(E),A=i(7),O=q(A),L=i(55),R=q(L),C=i(42),P=q(C),M=i(23),F=q(M);function q(Z){return Z&&Z.__esModule?Z:{default:Z}}f.default.register({"blots/block":d.default,"blots/block/embed":h.BlockEmbed,"blots/break":c.default,"blots/container":y.default,"blots/cursor":_.default,"blots/embed":w.default,"blots/inline":x.default,"blots/scroll":I.default,"blots/text":O.default,"modules/clipboard":R.default,"modules/history":P.default,"modules/keyboard":F.default}),a.default.register(d.default,c.default,_.default,x.default,I.default,O.default),n.default=f.default},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(1),a=function(){function u(f){this.domNode=f,this.domNode[o.DATA_KEY]={blot:this}}return Object.defineProperty(u.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),u.create=function(f){if(this.tagName==null)throw new o.ParchmentError("Blot definition missing tagName");var h;return Array.isArray(this.tagName)?(typeof f=="string"&&(f=f.toUpperCase(),parseInt(f).toString()===f&&(f=parseInt(f))),typeof f=="number"?h=document.createElement(this.tagName[f-1]):this.tagName.indexOf(f)>-1?h=document.createElement(f):h=document.createElement(this.tagName[0])):h=document.createElement(this.tagName),this.className&&h.classList.add(this.className),h},u.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},u.prototype.clone=function(){var f=this.domNode.cloneNode(!1);return o.create(f)},u.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[o.DATA_KEY]},u.prototype.deleteAt=function(f,h){var d=this.isolate(f,h);d.remove()},u.prototype.formatAt=function(f,h,d,p){var c=this.isolate(f,h);if(o.query(d,o.Scope.BLOT)!=null&&p)c.wrap(d,p);else if(o.query(d,o.Scope.ATTRIBUTE)!=null){var v=o.create(this.statics.scope);c.wrap(v),v.format(d,p)}},u.prototype.insertAt=function(f,h,d){var p=d==null?o.create("text",h):o.create(h,d),c=this.split(f);this.parent.insertBefore(p,c)},u.prototype.insertInto=function(f,h){h===void 0&&(h=null),this.parent!=null&&this.parent.children.remove(this);var d=null;f.children.insertBefore(this,h),h!=null&&(d=h.domNode),(this.domNode.parentNode!=f.domNode||this.domNode.nextSibling!=d)&&f.domNode.insertBefore(this.domNode,d),this.parent=f,this.attach()},u.prototype.isolate=function(f,h){var d=this.split(f);return d.split(h),d},u.prototype.length=function(){return 1},u.prototype.offset=function(f){return f===void 0&&(f=this.parent),this.parent==null||this==f?0:this.parent.children.offset(this)+this.parent.offset(f)},u.prototype.optimize=function(f){this.domNode[o.DATA_KEY]!=null&&delete this.domNode[o.DATA_KEY].mutations},u.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},u.prototype.replace=function(f){f.parent!=null&&(f.parent.insertBefore(this,f.next),f.remove())},u.prototype.replaceWith=function(f,h){var d=typeof f=="string"?o.create(f,h):f;return d.replace(this),d},u.prototype.split=function(f,h){return f===0?this:this.next},u.prototype.update=function(f,h){},u.prototype.wrap=function(f,h){var d=typeof f=="string"?o.create(f,h):f;return this.parent!=null&&this.parent.insertBefore(d,this.next),d.appendChild(this),d},u.blotName="abstract",u}();n.default=a},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(12),a=i(32),u=i(33),f=i(1),h=function(){function d(p){this.attributes={},this.domNode=p,this.build()}return d.prototype.attribute=function(p,c){c?p.add(this.domNode,c)&&(p.value(this.domNode)!=null?this.attributes[p.attrName]=p:delete this.attributes[p.attrName]):(p.remove(this.domNode),delete this.attributes[p.attrName])},d.prototype.build=function(){var p=this;this.attributes={};var c=o.default.keys(this.domNode),v=a.default.keys(this.domNode),y=u.default.keys(this.domNode);c.concat(v).concat(y).forEach(function(b){var _=f.query(b,f.Scope.ATTRIBUTE);_ instanceof o.default&&(p.attributes[_.attrName]=_)})},d.prototype.copy=function(p){var c=this;Object.keys(this.attributes).forEach(function(v){var y=c.attributes[v].value(c.domNode);p.format(v,y)})},d.prototype.move=function(p){var c=this;this.copy(p),Object.keys(this.attributes).forEach(function(v){c.attributes[v].remove(c.domNode)}),this.attributes={}},d.prototype.values=function(){var p=this;return Object.keys(this.attributes).reduce(function(c,v){return c[v]=p.attributes[v].value(p.domNode),c},{})},d}();n.default=h},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var c in p)p.hasOwnProperty(c)&&(d[c]=p[c])};return function(d,p){h(d,p);function c(){this.constructor=d}d.prototype=p===null?Object.create(p):(c.prototype=p.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(12);function u(h,d){var p=h.getAttribute("class")||"";return p.split(/\s+/).filter(function(c){return c.indexOf(d+"-")===0})}var f=function(h){o(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.keys=function(p){return(p.getAttribute("class")||"").split(/\s+/).map(function(c){return c.split("-").slice(0,-1).join("-")})},d.prototype.add=function(p,c){return this.canAdd(p,c)?(this.remove(p),p.classList.add(this.keyName+"-"+c),!0):!1},d.prototype.remove=function(p){var c=u(p,this.keyName);c.forEach(function(v){p.classList.remove(v)}),p.classList.length===0&&p.removeAttribute("class")},d.prototype.value=function(p){var c=u(p,this.keyName)[0]||"",v=c.slice(this.keyName.length+1);return this.canAdd(p,v)?v:""},d}(a.default);n.default=f},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var c in p)p.hasOwnProperty(c)&&(d[c]=p[c])};return function(d,p){h(d,p);function c(){this.constructor=d}d.prototype=p===null?Object.create(p):(c.prototype=p.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(12);function u(h){var d=h.split("-"),p=d.slice(1).map(function(c){return c[0].toUpperCase()+c.slice(1)}).join("");return d[0]+p}var f=function(h){o(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.keys=function(p){return(p.getAttribute("style")||"").split(";").map(function(c){var v=c.split(":");return v[0].trim()})},d.prototype.add=function(p,c){return this.canAdd(p,c)?(p.style[u(this.keyName)]=c,!0):!1},d.prototype.remove=function(p){p.style[u(this.keyName)]="",p.getAttribute("style")||p.removeAttribute("style")},d.prototype.value=function(p){var c=p.style[u(this.keyName)];return this.canAdd(p,c)?c:""},d}(a.default);n.default=f},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function f(h,d){for(var p=0;p<d.length;p++){var c=d[p];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(h,c.key,c)}}return function(h,d,p){return d&&f(h.prototype,d),p&&f(h,p),h}}();function a(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")}var u=function(){function f(h,d){a(this,f),this.quill=h,this.options=d,this.modules={}}return o(f,[{key:"init",value:function(){var d=this;Object.keys(this.options.modules).forEach(function(p){d.modules[p]==null&&d.addModule(p)})}},{key:"addModule",value:function(d){var p=this.quill.constructor.import("modules/"+d);return this.modules[d]=new p(this.quill,this.options.modules[d]||{}),this.modules[d]}}]),f}();u.DEFAULTS={modules:{}},u.themes={default:u},n.default=u},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function m(w,T){for(var x=0;x<T.length;x++){var E=T[x];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(w,E.key,E)}}return function(w,T,x){return T&&m(w.prototype,T),x&&m(w,x),w}}(),a=function m(w,T,x){w===null&&(w=Function.prototype);var E=Object.getOwnPropertyDescriptor(w,T);if(E===void 0){var I=Object.getPrototypeOf(w);return I===null?void 0:m(I,T,x)}else{if("value"in E)return E.value;var A=E.get;return A===void 0?void 0:A.call(x)}},u=i(0),f=p(u),h=i(7),d=p(h);function p(m){return m&&m.__esModule?m:{default:m}}function c(m,w){if(!(m instanceof w))throw new TypeError("Cannot call a class as a function")}function v(m,w){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:m}function y(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);m.prototype=Object.create(w&&w.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(m,w):m.__proto__=w)}var b="\uFEFF",_=function(m){y(w,m);function w(T){c(this,w);var x=v(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,T));return x.contentNode=document.createElement("span"),x.contentNode.setAttribute("contenteditable",!1),[].slice.call(x.domNode.childNodes).forEach(function(E){x.contentNode.appendChild(E)}),x.leftGuard=document.createTextNode(b),x.rightGuard=document.createTextNode(b),x.domNode.appendChild(x.leftGuard),x.domNode.appendChild(x.contentNode),x.domNode.appendChild(x.rightGuard),x}return o(w,[{key:"index",value:function(x,E){return x===this.leftGuard?0:x===this.rightGuard?1:a(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"index",this).call(this,x,E)}},{key:"restore",value:function(x){var E=void 0,I=void 0,A=x.data.split(b).join("");if(x===this.leftGuard)if(this.prev instanceof d.default){var O=this.prev.length();this.prev.insertAt(O,A),E={startNode:this.prev.domNode,startOffset:O+A.length}}else I=document.createTextNode(A),this.parent.insertBefore(f.default.create(I),this),E={startNode:I,startOffset:A.length};else x===this.rightGuard&&(this.next instanceof d.default?(this.next.insertAt(0,A),E={startNode:this.next.domNode,startOffset:A.length}):(I=document.createTextNode(A),this.parent.insertBefore(f.default.create(I),this.next),E={startNode:I,startOffset:A.length}));return x.data=b,E}},{key:"update",value:function(x,E){var I=this;x.forEach(function(A){if(A.type==="characterData"&&(A.target===I.leftGuard||A.target===I.rightGuard)){var O=I.restore(A.target);O&&(E.range=O)}})}}]),w}(f.default.Embed);n.default=_},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.AlignStyle=n.AlignClass=n.AlignAttribute=void 0;var o=i(0),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}var f={scope:a.default.Scope.BLOCK,whitelist:["right","center","justify"]},h=new a.default.Attributor.Attribute("align","align",f),d=new a.default.Attributor.Class("align","ql-align",f),p=new a.default.Attributor.Style("align","text-align",f);n.AlignAttribute=h,n.AlignClass=d,n.AlignStyle=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.BackgroundStyle=n.BackgroundClass=void 0;var o=i(0),a=f(o),u=i(26);function f(p){return p&&p.__esModule?p:{default:p}}var h=new a.default.Attributor.Class("background","ql-bg",{scope:a.default.Scope.INLINE}),d=new u.ColorAttributor("background","background-color",{scope:a.default.Scope.INLINE});n.BackgroundClass=h,n.BackgroundStyle=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.DirectionStyle=n.DirectionClass=n.DirectionAttribute=void 0;var o=i(0),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}var f={scope:a.default.Scope.BLOCK,whitelist:["rtl"]},h=new a.default.Attributor.Attribute("direction","dir",f),d=new a.default.Attributor.Class("direction","ql-direction",f),p=new a.default.Attributor.Style("direction","direction",f);n.DirectionAttribute=h,n.DirectionClass=d,n.DirectionStyle=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.FontClass=n.FontStyle=void 0;var o=function(){function m(w,T){for(var x=0;x<T.length;x++){var E=T[x];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(w,E.key,E)}}return function(w,T,x){return T&&m(w.prototype,T),x&&m(w,x),w}}(),a=function m(w,T,x){w===null&&(w=Function.prototype);var E=Object.getOwnPropertyDescriptor(w,T);if(E===void 0){var I=Object.getPrototypeOf(w);return I===null?void 0:m(I,T,x)}else{if("value"in E)return E.value;var A=E.get;return A===void 0?void 0:A.call(x)}},u=i(0),f=h(u);function h(m){return m&&m.__esModule?m:{default:m}}function d(m,w){if(!(m instanceof w))throw new TypeError("Cannot call a class as a function")}function p(m,w){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:m}function c(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);m.prototype=Object.create(w&&w.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(m,w):m.__proto__=w)}var v={scope:f.default.Scope.INLINE,whitelist:["serif","monospace"]},y=new f.default.Attributor.Class("font","ql-font",v),b=function(m){c(w,m);function w(){return d(this,w),p(this,(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments))}return o(w,[{key:"value",value:function(x){return a(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"value",this).call(this,x).replace(/["']/g,"")}}]),w}(f.default.Attributor.Style),_=new b("font","font-family",v);n.FontStyle=_,n.FontClass=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.SizeStyle=n.SizeClass=void 0;var o=i(0),a=u(o);function u(d){return d&&d.__esModule?d:{default:d}}var f=new a.default.Attributor.Class("size","ql-size",{scope:a.default.Scope.INLINE,whitelist:["small","large","huge"]}),h=new a.default.Attributor.Style("size","font-size",{scope:a.default.Scope.INLINE,whitelist:["10px","18px","32px"]});n.SizeClass=f,n.SizeStyle=h},function(r,n,i){r.exports={align:{"":i(76),center:i(77),right:i(78),justify:i(79)},background:i(80),blockquote:i(81),bold:i(82),clean:i(83),code:i(58),"code-block":i(58),color:i(84),direction:{"":i(85),rtl:i(86)},float:{center:i(87),full:i(88),left:i(89),right:i(90)},formula:i(91),header:{1:i(92),2:i(93)},italic:i(94),image:i(95),indent:{"+1":i(96),"-1":i(97)},link:i(98),list:{ordered:i(99),bullet:i(100),check:i(101)},script:{sub:i(102),super:i(103)},strike:i(104),underline:i(105),video:i(106)}},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.getLastChangeIndex=n.default=void 0;var o=function(){function T(x,E){for(var I=0;I<E.length;I++){var A=E[I];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(x,A.key,A)}}return function(x,E,I){return E&&T(x.prototype,E),I&&T(x,I),x}}(),a=i(0),u=c(a),f=i(5),h=c(f),d=i(9),p=c(d);function c(T){return T&&T.__esModule?T:{default:T}}function v(T,x){if(!(T instanceof x))throw new TypeError("Cannot call a class as a function")}function y(T,x){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:T}function b(T,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);T.prototype=Object.create(x&&x.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(T,x):T.__proto__=x)}var _=function(T){b(x,T);function x(E,I){v(this,x);var A=y(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,E,I));return A.lastRecorded=0,A.ignoreChange=!1,A.clear(),A.quill.on(h.default.events.EDITOR_CHANGE,function(O,L,R,C){O!==h.default.events.TEXT_CHANGE||A.ignoreChange||(!A.options.userOnly||C===h.default.sources.USER?A.record(L,R):A.transform(L))}),A.quill.keyboard.addBinding({key:"Z",shortKey:!0},A.undo.bind(A)),A.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},A.redo.bind(A)),/Win/i.test(navigator.platform)&&A.quill.keyboard.addBinding({key:"Y",shortKey:!0},A.redo.bind(A)),A}return o(x,[{key:"change",value:function(I,A){if(this.stack[I].length!==0){var O=this.stack[I].pop();this.stack[A].push(O),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(O[I],h.default.sources.USER),this.ignoreChange=!1;var L=w(O[I]);this.quill.setSelection(L)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(I,A){if(I.ops.length!==0){this.stack.redo=[];var O=this.quill.getContents().diff(A),L=Date.now();if(this.lastRecorded+this.options.delay>L&&this.stack.undo.length>0){var R=this.stack.undo.pop();O=O.compose(R.undo),I=R.redo.compose(I)}else this.lastRecorded=L;this.stack.undo.push({redo:I,undo:O}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(I){this.stack.undo.forEach(function(A){A.undo=I.transform(A.undo,!0),A.redo=I.transform(A.redo,!0)}),this.stack.redo.forEach(function(A){A.undo=I.transform(A.undo,!0),A.redo=I.transform(A.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),x}(p.default);_.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function m(T){var x=T.ops[T.ops.length-1];return x==null?!1:x.insert!=null?typeof x.insert=="string"&&x.insert.endsWith(`
1991
- `):x.attributes!=null?Object.keys(x.attributes).some(function(E){return u.default.query(E,u.default.Scope.BLOCK)!=null}):!1}function w(T){var x=T.reduce(function(I,A){return I+=A.delete||0,I},0),E=T.length()-x;return m(T)&&(E-=1),E}n.default=_,n.getLastChangeIndex=w},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BaseTooltip=void 0;var o=function(){function j(G,X){for(var Y=0;Y<X.length;Y++){var $=X[Y];$.enumerable=$.enumerable||!1,$.configurable=!0,"value"in $&&($.writable=!0),Object.defineProperty(G,$.key,$)}}return function(G,X,Y){return X&&j(G.prototype,X),Y&&j(G,Y),G}}(),a=function j(G,X,Y){G===null&&(G=Function.prototype);var $=Object.getOwnPropertyDescriptor(G,X);if($===void 0){var W=Object.getPrototypeOf(G);return W===null?void 0:j(W,X,Y)}else{if("value"in $)return $.value;var et=$.get;return et===void 0?void 0:et.call(Y)}},u=i(3),f=L(u),h=i(2),d=L(h),p=i(8),c=L(p),v=i(23),y=L(v),b=i(34),_=L(b),m=i(59),w=L(m),T=i(60),x=L(T),E=i(28),I=L(E),A=i(61),O=L(A);function L(j){return j&&j.__esModule?j:{default:j}}function R(j,G){if(!(j instanceof G))throw new TypeError("Cannot call a class as a function")}function C(j,G){if(!j)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return G&&(typeof G=="object"||typeof G=="function")?G:j}function P(j,G){if(typeof G!="function"&&G!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof G);j.prototype=Object.create(G&&G.prototype,{constructor:{value:j,enumerable:!1,writable:!0,configurable:!0}}),G&&(Object.setPrototypeOf?Object.setPrototypeOf(j,G):j.__proto__=G)}var M=[!1,"center","right","justify"],F=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],q=[!1,"serif","monospace"],Z=["1","2","3",!1],z=["small",!1,"large","huge"],nt=function(j){P(G,j);function G(X,Y){R(this,G);var $=C(this,(G.__proto__||Object.getPrototypeOf(G)).call(this,X,Y)),W=function et(J){if(!document.body.contains(X.root))return document.body.removeEventListener("click",et);$.tooltip!=null&&!$.tooltip.root.contains(J.target)&&document.activeElement!==$.tooltip.textbox&&!$.quill.hasFocus()&&$.tooltip.hide(),$.pickers!=null&&$.pickers.forEach(function(it){it.container.contains(J.target)||it.close()})};return X.emitter.listenDOM("click",document.body,W),$}return o(G,[{key:"addModule",value:function(Y){var $=a(G.prototype.__proto__||Object.getPrototypeOf(G.prototype),"addModule",this).call(this,Y);return Y==="toolbar"&&this.extendToolbar($),$}},{key:"buildButtons",value:function(Y,$){Y.forEach(function(W){var et=W.getAttribute("class")||"";et.split(/\s+/).forEach(function(J){if(J.startsWith("ql-")&&(J=J.slice(3),$[J]!=null))if(J==="direction")W.innerHTML=$[J][""]+$[J].rtl;else if(typeof $[J]=="string")W.innerHTML=$[J];else{var it=W.value||"";it!=null&&$[J][it]&&(W.innerHTML=$[J][it])}})})}},{key:"buildPickers",value:function(Y,$){var W=this;this.pickers=Y.map(function(J){if(J.classList.contains("ql-align"))return J.querySelector("option")==null&&k(J,M),new x.default(J,$.align);if(J.classList.contains("ql-background")||J.classList.contains("ql-color")){var it=J.classList.contains("ql-background")?"background":"color";return J.querySelector("option")==null&&k(J,F,it==="background"?"#ffffff":"#000000"),new w.default(J,$[it])}else return J.querySelector("option")==null&&(J.classList.contains("ql-font")?k(J,q):J.classList.contains("ql-header")?k(J,Z):J.classList.contains("ql-size")&&k(J,z)),new I.default(J)});var et=function(){W.pickers.forEach(function(it){it.update()})};this.quill.on(c.default.events.EDITOR_CHANGE,et)}}]),G}(_.default);nt.DEFAULTS=(0,f.default)(!0,{},_.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var G=this,X=this.container.querySelector("input.ql-image[type=file]");X==null&&(X=document.createElement("input"),X.setAttribute("type","file"),X.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),X.classList.add("ql-image"),X.addEventListener("change",function(){if(X.files!=null&&X.files[0]!=null){var Y=new FileReader;Y.onload=function($){var W=G.quill.getSelection(!0);G.quill.updateContents(new d.default().retain(W.index).delete(W.length).insert({image:$.target.result}),c.default.sources.USER),G.quill.setSelection(W.index+1,c.default.sources.SILENT),X.value=""},Y.readAsDataURL(X.files[0])}}),this.container.appendChild(X)),X.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var V=function(j){P(G,j);function G(X,Y){R(this,G);var $=C(this,(G.__proto__||Object.getPrototypeOf(G)).call(this,X,Y));return $.textbox=$.root.querySelector('input[type="text"]'),$.listen(),$}return o(G,[{key:"listen",value:function(){var Y=this;this.textbox.addEventListener("keydown",function($){y.default.match($,"enter")?(Y.save(),$.preventDefault()):y.default.match($,"escape")&&(Y.cancel(),$.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",$=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),$!=null?this.textbox.value=$:Y!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+Y)||""),this.root.setAttribute("data-mode",Y)}},{key:"restoreFocus",value:function(){var Y=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=Y}},{key:"save",value:function(){var Y=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var $=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",Y,c.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",Y,c.default.sources.USER)),this.quill.root.scrollTop=$;break}case"video":Y=U(Y);case"formula":{if(!Y)break;var W=this.quill.getSelection(!0);if(W!=null){var et=W.index+W.length;this.quill.insertEmbed(et,this.root.getAttribute("data-mode"),Y,c.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(et+1," ",c.default.sources.USER),this.quill.setSelection(et+2,c.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),G}(O.default);function U(j){var G=j.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||j.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return G?(G[1]||"https")+"://www.youtube.com/embed/"+G[2]+"?showinfo=0":(G=j.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(G[1]||"https")+"://player.vimeo.com/video/"+G[2]+"/":j}function k(j,G){var X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;G.forEach(function(Y){var $=document.createElement("option");Y===X?$.setAttribute("selected","selected"):$.setAttribute("value",Y),j.appendChild($)})}n.BaseTooltip=V,n.default=nt},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function a(){this.head=this.tail=null,this.length=0}return a.prototype.append=function(){for(var u=[],f=0;f<arguments.length;f++)u[f]=arguments[f];this.insertBefore(u[0],null),u.length>1&&this.append.apply(this,u.slice(1))},a.prototype.contains=function(u){for(var f,h=this.iterator();f=h();)if(f===u)return!0;return!1},a.prototype.insertBefore=function(u,f){u&&(u.next=f,f!=null?(u.prev=f.prev,f.prev!=null&&(f.prev.next=u),f.prev=u,f===this.head&&(this.head=u)):this.tail!=null?(this.tail.next=u,u.prev=this.tail,this.tail=u):(u.prev=null,this.head=this.tail=u),this.length+=1)},a.prototype.offset=function(u){for(var f=0,h=this.head;h!=null;){if(h===u)return f;f+=h.length(),h=h.next}return-1},a.prototype.remove=function(u){this.contains(u)&&(u.prev!=null&&(u.prev.next=u.next),u.next!=null&&(u.next.prev=u.prev),u===this.head&&(this.head=u.next),u===this.tail&&(this.tail=u.prev),this.length-=1)},a.prototype.iterator=function(u){return u===void 0&&(u=this.head),function(){var f=u;return u!=null&&(u=u.next),f}},a.prototype.find=function(u,f){f===void 0&&(f=!1);for(var h,d=this.iterator();h=d();){var p=h.length();if(u<p||f&&u===p&&(h.next==null||h.next.length()!==0))return[h,u];u-=p}return[null,0]},a.prototype.forEach=function(u){for(var f,h=this.iterator();f=h();)u(f)},a.prototype.forEachAt=function(u,f,h){if(!(f<=0))for(var d=this.find(u),p=d[0],c=d[1],v,y=u-c,b=this.iterator(p);(v=b())&&y<u+f;){var _=v.length();u>y?h(v,u-y,Math.min(f,y+_-u)):h(v,0,Math.min(_,u+f-y)),y+=_}},a.prototype.map=function(u){return this.reduce(function(f,h){return f.push(u(h)),f},[])},a.prototype.reduce=function(u,f){for(var h,d=this.iterator();h=d();)f=u(f,h);return f},a}();n.default=o},function(r,n,i){var o=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var y in v)v.hasOwnProperty(y)&&(c[y]=v[y])};return function(c,v){p(c,v);function y(){this.constructor=c}c.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(17),u=i(1),f={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},h=100,d=function(p){o(c,p);function c(v){var y=p.call(this,v)||this;return y.scroll=y,y.observer=new MutationObserver(function(b){y.update(b)}),y.observer.observe(y.domNode,f),y.attach(),y}return c.prototype.detach=function(){p.prototype.detach.call(this),this.observer.disconnect()},c.prototype.deleteAt=function(v,y){this.update(),v===0&&y===this.length()?this.children.forEach(function(b){b.remove()}):p.prototype.deleteAt.call(this,v,y)},c.prototype.formatAt=function(v,y,b,_){this.update(),p.prototype.formatAt.call(this,v,y,b,_)},c.prototype.insertAt=function(v,y,b){this.update(),p.prototype.insertAt.call(this,v,y,b)},c.prototype.optimize=function(v,y){var b=this;v===void 0&&(v=[]),y===void 0&&(y={}),p.prototype.optimize.call(this,y);for(var _=[].slice.call(this.observer.takeRecords());_.length>0;)v.push(_.pop());for(var m=function(E,I){I===void 0&&(I=!0),!(E==null||E===b)&&E.domNode.parentNode!=null&&(E.domNode[u.DATA_KEY].mutations==null&&(E.domNode[u.DATA_KEY].mutations=[]),I&&m(E.parent))},w=function(E){E.domNode[u.DATA_KEY]==null||E.domNode[u.DATA_KEY].mutations==null||(E instanceof a.default&&E.children.forEach(w),E.optimize(y))},T=v,x=0;T.length>0;x+=1){if(x>=h)throw new Error("[Parchment] Maximum optimize iterations reached");for(T.forEach(function(E){var I=u.find(E.target,!0);I!=null&&(I.domNode===E.target&&(E.type==="childList"?(m(u.find(E.previousSibling,!1)),[].forEach.call(E.addedNodes,function(A){var O=u.find(A,!1);m(O,!1),O instanceof a.default&&O.children.forEach(function(L){m(L,!1)})})):E.type==="attributes"&&m(I.prev)),m(I))}),this.children.forEach(w),T=[].slice.call(this.observer.takeRecords()),_=T.slice();_.length>0;)v.push(_.pop())}},c.prototype.update=function(v,y){var b=this;y===void 0&&(y={}),v=v||this.observer.takeRecords(),v.map(function(_){var m=u.find(_.target,!0);return m==null?null:m.domNode[u.DATA_KEY].mutations==null?(m.domNode[u.DATA_KEY].mutations=[_],m):(m.domNode[u.DATA_KEY].mutations.push(_),null)}).forEach(function(_){_==null||_===b||_.domNode[u.DATA_KEY]==null||_.update(_.domNode[u.DATA_KEY].mutations||[],y)}),this.domNode[u.DATA_KEY].mutations!=null&&p.prototype.update.call(this,this.domNode[u.DATA_KEY].mutations,y),this.optimize(v,y)},c.blotName="scroll",c.defaultChild="block",c.scope=u.Scope.BLOCK_BLOT,c.tagName="DIV",c}(a.default);n.default=d},function(r,n,i){var o=this&&this.__extends||function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,c){p.__proto__=c}||function(p,c){for(var v in c)c.hasOwnProperty(v)&&(p[v]=c[v])};return function(p,c){d(p,c);function v(){this.constructor=p}p.prototype=c===null?Object.create(c):(v.prototype=c.prototype,new v)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(18),u=i(1);function f(d,p){if(Object.keys(d).length!==Object.keys(p).length)return!1;for(var c in d)if(d[c]!==p[c])return!1;return!0}var h=function(d){o(p,d);function p(){return d!==null&&d.apply(this,arguments)||this}return p.formats=function(c){if(c.tagName!==p.tagName)return d.formats.call(this,c)},p.prototype.format=function(c,v){var y=this;c===this.statics.blotName&&!v?(this.children.forEach(function(b){b instanceof a.default||(b=b.wrap(p.blotName,!0)),y.attributes.copy(b)}),this.unwrap()):d.prototype.format.call(this,c,v)},p.prototype.formatAt=function(c,v,y,b){if(this.formats()[y]!=null||u.query(y,u.Scope.ATTRIBUTE)){var _=this.isolate(c,v);_.format(y,b)}else d.prototype.formatAt.call(this,c,v,y,b)},p.prototype.optimize=function(c){d.prototype.optimize.call(this,c);var v=this.formats();if(Object.keys(v).length===0)return this.unwrap();var y=this.next;y instanceof p&&y.prev===this&&f(v,y.formats())&&(y.moveChildren(this),y.remove())},p.blotName="inline",p.scope=u.Scope.INLINE_BLOT,p.tagName="SPAN",p}(a.default);n.default=h},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var c in p)p.hasOwnProperty(c)&&(d[c]=p[c])};return function(d,p){h(d,p);function c(){this.constructor=d}d.prototype=p===null?Object.create(p):(c.prototype=p.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(18),u=i(1),f=function(h){o(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.formats=function(p){var c=u.query(d.blotName).tagName;if(p.tagName!==c)return h.formats.call(this,p)},d.prototype.format=function(p,c){u.query(p,u.Scope.BLOCK)!=null&&(p===this.statics.blotName&&!c?this.replaceWith(d.blotName):h.prototype.format.call(this,p,c))},d.prototype.formatAt=function(p,c,v,y){u.query(v,u.Scope.BLOCK)!=null?this.format(v,y):h.prototype.formatAt.call(this,p,c,v,y)},d.prototype.insertAt=function(p,c,v){if(v==null||u.query(c,u.Scope.INLINE)!=null)h.prototype.insertAt.call(this,p,c,v);else{var y=this.split(p),b=u.create(c,v);y.parent.insertBefore(b,y)}},d.prototype.update=function(p,c){navigator.userAgent.match(/Trident/)?this.build():h.prototype.update.call(this,p,c)},d.blotName="block",d.scope=u.Scope.BLOCK_BLOT,d.tagName="P",d}(a.default);n.default=f},function(r,n,i){var o=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,d){h.__proto__=d}||function(h,d){for(var p in d)d.hasOwnProperty(p)&&(h[p]=d[p])};return function(h,d){f(h,d);function p(){this.constructor=h}h.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(19),u=function(f){o(h,f);function h(){return f!==null&&f.apply(this,arguments)||this}return h.formats=function(d){},h.prototype.format=function(d,p){f.prototype.formatAt.call(this,0,this.length(),d,p)},h.prototype.formatAt=function(d,p,c,v){d===0&&p===this.length()?this.format(c,v):f.prototype.formatAt.call(this,d,p,c,v)},h.prototype.formats=function(){return this.statics.formats(this.domNode)},h}(a.default);n.default=u},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var c in p)p.hasOwnProperty(c)&&(d[c]=p[c])};return function(d,p){h(d,p);function c(){this.constructor=d}d.prototype=p===null?Object.create(p):(c.prototype=p.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(19),u=i(1),f=function(h){o(d,h);function d(p){var c=h.call(this,p)||this;return c.text=c.statics.value(c.domNode),c}return d.create=function(p){return document.createTextNode(p)},d.value=function(p){var c=p.data;return c.normalize&&(c=c.normalize()),c},d.prototype.deleteAt=function(p,c){this.domNode.data=this.text=this.text.slice(0,p)+this.text.slice(p+c)},d.prototype.index=function(p,c){return this.domNode===p?c:-1},d.prototype.insertAt=function(p,c,v){v==null?(this.text=this.text.slice(0,p)+c+this.text.slice(p),this.domNode.data=this.text):h.prototype.insertAt.call(this,p,c,v)},d.prototype.length=function(){return this.text.length},d.prototype.optimize=function(p){h.prototype.optimize.call(this,p),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof d&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},d.prototype.position=function(p,c){return[this.domNode,p]},d.prototype.split=function(p,c){if(c===void 0&&(c=!1),!c){if(p===0)return this;if(p===this.length())return this.next}var v=u.create(this.domNode.splitText(p));return this.parent.insertBefore(v,this.next),this.text=this.statics.value(this.domNode),v},d.prototype.update=function(p,c){var v=this;p.some(function(y){return y.type==="characterData"&&y.target===v.domNode})&&(this.text=this.statics.value(this.domNode))},d.prototype.value=function(){return this.text},d.blotName="text",d.scope=u.Scope.INLINE_BLOT,d}(a.default);n.default=f},function(r,n,i){var o=document.createElement("div");if(o.classList.toggle("test-class",!1),o.classList.contains("test-class")){var a=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(u,f){return arguments.length>1&&!this.contains(u)==!f?f:a.call(this,u)}}String.prototype.startsWith||(String.prototype.startsWith=function(u,f){return f=f||0,this.substr(f,u.length)===u}),String.prototype.endsWith||(String.prototype.endsWith=function(u,f){var h=this.toString();(typeof f!="number"||!isFinite(f)||Math.floor(f)!==f||f>h.length)&&(f=h.length),f-=u.length;var d=h.indexOf(u,f);return d!==-1&&d===f}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(f){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof f!="function")throw new TypeError("predicate must be a function");for(var h=Object(this),d=h.length>>>0,p=arguments[1],c,v=0;v<d;v++)if(c=h[v],f.call(p,c,v,h))return c}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(r,n){var i=-1,o=1,a=0;function u(x,E,I){if(x==E)return x?[[a,x]]:[];(I<0||x.length<I)&&(I=null);var A=p(x,E),O=x.substring(0,A);x=x.substring(A),E=E.substring(A),A=c(x,E);var L=x.substring(x.length-A);x=x.substring(0,x.length-A),E=E.substring(0,E.length-A);var R=f(x,E);return O&&R.unshift([a,O]),L&&R.push([a,L]),y(R),I!=null&&(R=m(R,I)),R=w(R),R}function f(x,E){var I;if(!x)return[[o,E]];if(!E)return[[i,x]];var A=x.length>E.length?x:E,O=x.length>E.length?E:x,L=A.indexOf(O);if(L!=-1)return I=[[o,A.substring(0,L)],[a,O],[o,A.substring(L+O.length)]],x.length>E.length&&(I[0][0]=I[2][0]=i),I;if(O.length==1)return[[i,x],[o,E]];var R=v(x,E);if(R){var C=R[0],P=R[1],M=R[2],F=R[3],q=R[4],Z=u(C,M),z=u(P,F);return Z.concat([[a,q]],z)}return h(x,E)}function h(x,E){for(var I=x.length,A=E.length,O=Math.ceil((I+A)/2),L=O,R=2*O,C=new Array(R),P=new Array(R),M=0;M<R;M++)C[M]=-1,P[M]=-1;C[L+1]=0,P[L+1]=0;for(var F=I-A,q=F%2!=0,Z=0,z=0,nt=0,V=0,U=0;U<O;U++){for(var k=-U+Z;k<=U-z;k+=2){var j=L+k,G;k==-U||k!=U&&C[j-1]<C[j+1]?G=C[j+1]:G=C[j-1]+1;for(var X=G-k;G<I&&X<A&&x.charAt(G)==E.charAt(X);)G++,X++;if(C[j]=G,G>I)z+=2;else if(X>A)Z+=2;else if(q){var Y=L+F-k;if(Y>=0&&Y<R&&P[Y]!=-1){var $=I-P[Y];if(G>=$)return d(x,E,G,X)}}}for(var W=-U+nt;W<=U-V;W+=2){var Y=L+W,$;W==-U||W!=U&&P[Y-1]<P[Y+1]?$=P[Y+1]:$=P[Y-1]+1;for(var et=$-W;$<I&&et<A&&x.charAt(I-$-1)==E.charAt(A-et-1);)$++,et++;if(P[Y]=$,$>I)V+=2;else if(et>A)nt+=2;else if(!q){var j=L+F-W;if(j>=0&&j<R&&C[j]!=-1){var G=C[j],X=L+G-j;if($=I-$,G>=$)return d(x,E,G,X)}}}}return[[i,x],[o,E]]}function d(x,E,I,A){var O=x.substring(0,I),L=E.substring(0,A),R=x.substring(I),C=E.substring(A),P=u(O,L),M=u(R,C);return P.concat(M)}function p(x,E){if(!x||!E||x.charAt(0)!=E.charAt(0))return 0;for(var I=0,A=Math.min(x.length,E.length),O=A,L=0;I<O;)x.substring(L,O)==E.substring(L,O)?(I=O,L=I):A=O,O=Math.floor((A-I)/2+I);return O}function c(x,E){if(!x||!E||x.charAt(x.length-1)!=E.charAt(E.length-1))return 0;for(var I=0,A=Math.min(x.length,E.length),O=A,L=0;I<O;)x.substring(x.length-O,x.length-L)==E.substring(E.length-O,E.length-L)?(I=O,L=I):A=O,O=Math.floor((A-I)/2+I);return O}function v(x,E){var I=x.length>E.length?x:E,A=x.length>E.length?E:x;if(I.length<4||A.length*2<I.length)return null;function O(z,nt,V){for(var U=z.substring(V,V+Math.floor(z.length/4)),k=-1,j="",G,X,Y,$;(k=nt.indexOf(U,k+1))!=-1;){var W=p(z.substring(V),nt.substring(k)),et=c(z.substring(0,V),nt.substring(0,k));j.length<et+W&&(j=nt.substring(k-et,k)+nt.substring(k,k+W),G=z.substring(0,V-et),X=z.substring(V+W),Y=nt.substring(0,k-et),$=nt.substring(k+W))}return j.length*2>=z.length?[G,X,Y,$,j]:null}var L=O(I,A,Math.ceil(I.length/4)),R=O(I,A,Math.ceil(I.length/2)),C;if(!L&&!R)return null;R?L?C=L[4].length>R[4].length?L:R:C=R:C=L;var P,M,F,q;x.length>E.length?(P=C[0],M=C[1],F=C[2],q=C[3]):(F=C[0],q=C[1],P=C[2],M=C[3]);var Z=C[4];return[P,M,F,q,Z]}function y(x){x.push([a,""]);for(var E=0,I=0,A=0,O="",L="",R;E<x.length;)switch(x[E][0]){case o:A++,L+=x[E][1],E++;break;case i:I++,O+=x[E][1],E++;break;case a:I+A>1?(I!==0&&A!==0&&(R=p(L,O),R!==0&&(E-I-A>0&&x[E-I-A-1][0]==a?x[E-I-A-1][1]+=L.substring(0,R):(x.splice(0,0,[a,L.substring(0,R)]),E++),L=L.substring(R),O=O.substring(R)),R=c(L,O),R!==0&&(x[E][1]=L.substring(L.length-R)+x[E][1],L=L.substring(0,L.length-R),O=O.substring(0,O.length-R))),I===0?x.splice(E-A,I+A,[o,L]):A===0?x.splice(E-I,I+A,[i,O]):x.splice(E-I-A,I+A,[i,O],[o,L]),E=E-I-A+(I?1:0)+(A?1:0)+1):E!==0&&x[E-1][0]==a?(x[E-1][1]+=x[E][1],x.splice(E,1)):E++,A=0,I=0,O="",L="";break}x[x.length-1][1]===""&&x.pop();var C=!1;for(E=1;E<x.length-1;)x[E-1][0]==a&&x[E+1][0]==a&&(x[E][1].substring(x[E][1].length-x[E-1][1].length)==x[E-1][1]?(x[E][1]=x[E-1][1]+x[E][1].substring(0,x[E][1].length-x[E-1][1].length),x[E+1][1]=x[E-1][1]+x[E+1][1],x.splice(E-1,1),C=!0):x[E][1].substring(0,x[E+1][1].length)==x[E+1][1]&&(x[E-1][1]+=x[E+1][1],x[E][1]=x[E][1].substring(x[E+1][1].length)+x[E+1][1],x.splice(E+1,1),C=!0)),E++;C&&y(x)}var b=u;b.INSERT=o,b.DELETE=i,b.EQUAL=a,r.exports=b;function _(x,E){if(E===0)return[a,x];for(var I=0,A=0;A<x.length;A++){var O=x[A];if(O[0]===i||O[0]===a){var L=I+O[1].length;if(E===L)return[A+1,x];if(E<L){x=x.slice();var R=E-I,C=[O[0],O[1].slice(0,R)],P=[O[0],O[1].slice(R)];return x.splice(A,1,C,P),[A+1,x]}else I=L}}throw new Error("cursor_pos is out of bounds!")}function m(x,E){var I=_(x,E),A=I[1],O=I[0],L=A[O],R=A[O+1];if(L==null)return x;if(L[0]!==a)return x;if(R!=null&&L[1]+R[1]===R[1]+L[1])return A.splice(O,2,R,L),T(A,O,2);if(R!=null&&R[1].indexOf(L[1])===0){A.splice(O,2,[R[0],L[1]],[0,L[1]]);var C=R[1].slice(L[1].length);return C.length>0&&A.splice(O+2,0,[R[0],C]),T(A,O,3)}else return x}function w(x){for(var E=!1,I=function(R){return R.charCodeAt(0)>=56320&&R.charCodeAt(0)<=57343},A=function(R){return R.charCodeAt(R.length-1)>=55296&&R.charCodeAt(R.length-1)<=56319},O=2;O<x.length;O+=1)x[O-2][0]===a&&A(x[O-2][1])&&x[O-1][0]===i&&I(x[O-1][1])&&x[O][0]===o&&I(x[O][1])&&(E=!0,x[O-1][1]=x[O-2][1].slice(-1)+x[O-1][1],x[O][1]=x[O-2][1].slice(-1)+x[O][1],x[O-2][1]=x[O-2][1].slice(0,-1));if(!E)return x;for(var L=[],O=0;O<x.length;O+=1)x[O][1].length>0&&L.push(x[O]);return L}function T(x,E,I){for(var A=E+I-1;A>=0&&A>=E-1;A--)if(A+1<x.length){var O=x[A],L=x[A+1];O[0]===L[1]&&x.splice(A,2,[O[0],O[1]+L[1]])}return x}},function(r,n){n=r.exports=typeof Object.keys=="function"?Object.keys:i,n.shim=i;function i(o){var a=[];for(var u in o)a.push(u);return a}},function(r,n){var i=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";n=r.exports=i?o:a,n.supported=o;function o(u){return Object.prototype.toString.call(u)=="[object Arguments]"}n.unsupported=a;function a(u){return u&&typeof u=="object"&&typeof u.length=="number"&&Object.prototype.hasOwnProperty.call(u,"callee")&&!Object.prototype.propertyIsEnumerable.call(u,"callee")||!1}},function(r,n){var i=Object.prototype.hasOwnProperty,o="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(o=!1));function u(h,d,p){this.fn=h,this.context=d,this.once=p||!1}function f(){this._events=new a,this._eventsCount=0}f.prototype.eventNames=function(){var d=[],p,c;if(this._eventsCount===0)return d;for(c in p=this._events)i.call(p,c)&&d.push(o?c.slice(1):c);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(p)):d},f.prototype.listeners=function(d,p){var c=o?o+d:d,v=this._events[c];if(p)return!!v;if(!v)return[];if(v.fn)return[v.fn];for(var y=0,b=v.length,_=new Array(b);y<b;y++)_[y]=v[y].fn;return _},f.prototype.emit=function(d,p,c,v,y,b){var _=o?o+d:d;if(!this._events[_])return!1;var m=this._events[_],w=arguments.length,T,x;if(m.fn){switch(m.once&&this.removeListener(d,m.fn,void 0,!0),w){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,p),!0;case 3:return m.fn.call(m.context,p,c),!0;case 4:return m.fn.call(m.context,p,c,v),!0;case 5:return m.fn.call(m.context,p,c,v,y),!0;case 6:return m.fn.call(m.context,p,c,v,y,b),!0}for(x=1,T=new Array(w-1);x<w;x++)T[x-1]=arguments[x];m.fn.apply(m.context,T)}else{var E=m.length,I;for(x=0;x<E;x++)switch(m[x].once&&this.removeListener(d,m[x].fn,void 0,!0),w){case 1:m[x].fn.call(m[x].context);break;case 2:m[x].fn.call(m[x].context,p);break;case 3:m[x].fn.call(m[x].context,p,c);break;case 4:m[x].fn.call(m[x].context,p,c,v);break;default:if(!T)for(I=1,T=new Array(w-1);I<w;I++)T[I-1]=arguments[I];m[x].fn.apply(m[x].context,T)}}return!0},f.prototype.on=function(d,p,c){var v=new u(p,c||this),y=o?o+d:d;return this._events[y]?this._events[y].fn?this._events[y]=[this._events[y],v]:this._events[y].push(v):(this._events[y]=v,this._eventsCount++),this},f.prototype.once=function(d,p,c){var v=new u(p,c||this,!0),y=o?o+d:d;return this._events[y]?this._events[y].fn?this._events[y]=[this._events[y],v]:this._events[y].push(v):(this._events[y]=v,this._eventsCount++),this},f.prototype.removeListener=function(d,p,c,v){var y=o?o+d:d;if(!this._events[y])return this;if(!p)return--this._eventsCount===0?this._events=new a:delete this._events[y],this;var b=this._events[y];if(b.fn)b.fn===p&&(!v||b.once)&&(!c||b.context===c)&&(--this._eventsCount===0?this._events=new a:delete this._events[y]);else{for(var _=0,m=[],w=b.length;_<w;_++)(b[_].fn!==p||v&&!b[_].once||c&&b[_].context!==c)&&m.push(b[_]);m.length?this._events[y]=m.length===1?m[0]:m:--this._eventsCount===0?this._events=new a:delete this._events[y]}return this},f.prototype.removeAllListeners=function(d){var p;return d?(p=o?o+d:d,this._events[p]&&(--this._eventsCount===0?this._events=new a:delete this._events[p])):(this._events=new a,this._eventsCount=0),this},f.prototype.off=f.prototype.removeListener,f.prototype.addListener=f.prototype.on,f.prototype.setMaxListeners=function(){return this},f.prefixed=o,f.EventEmitter=f,typeof r<"u"&&(r.exports=f)},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.matchText=n.matchSpacing=n.matchNewline=n.matchBlot=n.matchAttributor=n.default=void 0;var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(rt){return typeof rt}:function(rt){return rt&&typeof Symbol=="function"&&rt.constructor===Symbol&&rt!==Symbol.prototype?"symbol":typeof rt},a=function(){function rt(at,dt){var vt=[],ct=!0,Pt=!1,Lt=void 0;try{for(var Nt=at[Symbol.iterator](),He;!(ct=(He=Nt.next()).done)&&(vt.push(He.value),!(dt&&vt.length===dt));ct=!0);}catch(Ge){Pt=!0,Lt=Ge}finally{try{!ct&&Nt.return&&Nt.return()}finally{if(Pt)throw Lt}}return vt}return function(at,dt){if(Array.isArray(at))return at;if(Symbol.iterator in Object(at))return rt(at,dt);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function rt(at,dt){for(var vt=0;vt<dt.length;vt++){var ct=dt[vt];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(at,ct.key,ct)}}return function(at,dt,vt){return dt&&rt(at.prototype,dt),vt&&rt(at,vt),at}}(),f=i(3),h=P(f),d=i(2),p=P(d),c=i(0),v=P(c),y=i(5),b=P(y),_=i(10),m=P(_),w=i(9),T=P(w),x=i(36),E=i(37),I=i(13),A=P(I),O=i(26),L=i(38),R=i(39),C=i(40);function P(rt){return rt&&rt.__esModule?rt:{default:rt}}function M(rt,at,dt){return at in rt?Object.defineProperty(rt,at,{value:dt,enumerable:!0,configurable:!0,writable:!0}):rt[at]=dt,rt}function F(rt,at){if(!(rt instanceof at))throw new TypeError("Cannot call a class as a function")}function q(rt,at){if(!rt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return at&&(typeof at=="object"||typeof at=="function")?at:rt}function Z(rt,at){if(typeof at!="function"&&at!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof at);rt.prototype=Object.create(at&&at.prototype,{constructor:{value:rt,enumerable:!1,writable:!0,configurable:!0}}),at&&(Object.setPrototypeOf?Object.setPrototypeOf(rt,at):rt.__proto__=at)}var z=(0,m.default)("quill:clipboard"),nt="__ql-matcher",V=[[Node.TEXT_NODE,Ht],[Node.TEXT_NODE,xt],["br",lt],[Node.ELEMENT_NODE,xt],[Node.ELEMENT_NODE,it],[Node.ELEMENT_NODE,At],[Node.ELEMENT_NODE,J],[Node.ELEMENT_NODE,oe],["li",yt],["b",et.bind(et,"bold")],["i",et.bind(et,"italic")],["style",pt]],U=[x.AlignAttribute,L.DirectionAttribute].reduce(function(rt,at){return rt[at.keyName]=at,rt},{}),k=[x.AlignStyle,E.BackgroundStyle,O.ColorStyle,L.DirectionStyle,R.FontStyle,C.SizeStyle].reduce(function(rt,at){return rt[at.keyName]=at,rt},{}),j=function(rt){Z(at,rt);function at(dt,vt){F(this,at);var ct=q(this,(at.__proto__||Object.getPrototypeOf(at)).call(this,dt,vt));return ct.quill.root.addEventListener("paste",ct.onPaste.bind(ct)),ct.container=ct.quill.addContainer("ql-clipboard"),ct.container.setAttribute("contenteditable",!0),ct.container.setAttribute("tabindex",-1),ct.matchers=[],V.concat(ct.options.matchers).forEach(function(Pt){var Lt=a(Pt,2),Nt=Lt[0],He=Lt[1];!vt.matchVisual&&He===At||ct.addMatcher(Nt,He)}),ct}return u(at,[{key:"addMatcher",value:function(vt,ct){this.matchers.push([vt,ct])}},{key:"convert",value:function(vt){if(typeof vt=="string")return this.container.innerHTML=vt.replace(/\>\r?\n +\</g,"><"),this.convert();var ct=this.quill.getFormat(this.quill.selection.savedRange.index);if(ct[A.default.blotName]){var Pt=this.container.innerText;return this.container.innerHTML="",new p.default().insert(Pt,M({},A.default.blotName,ct[A.default.blotName]))}var Lt=this.prepareMatching(),Nt=a(Lt,2),He=Nt[0],Ge=Nt[1],Qt=W(this.container,He,Ge);return Y(Qt,`
1992
- `)&&Qt.ops[Qt.ops.length-1].attributes==null&&(Qt=Qt.compose(new p.default().retain(Qt.length()-1).delete(1))),z.log("convert",this.container.innerHTML,Qt),this.container.innerHTML="",Qt}},{key:"dangerouslyPasteHTML",value:function(vt,ct){var Pt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:b.default.sources.API;if(typeof vt=="string")this.quill.setContents(this.convert(vt),ct),this.quill.setSelection(0,b.default.sources.SILENT);else{var Lt=this.convert(ct);this.quill.updateContents(new p.default().retain(vt).concat(Lt),Pt),this.quill.setSelection(vt+Lt.length(),b.default.sources.SILENT)}}},{key:"onPaste",value:function(vt){var ct=this;if(!(vt.defaultPrevented||!this.quill.isEnabled())){var Pt=this.quill.getSelection(),Lt=new p.default().retain(Pt.index),Nt=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(b.default.sources.SILENT),setTimeout(function(){Lt=Lt.concat(ct.convert()).delete(Pt.length),ct.quill.updateContents(Lt,b.default.sources.USER),ct.quill.setSelection(Lt.length()-Pt.length,b.default.sources.SILENT),ct.quill.scrollingContainer.scrollTop=Nt,ct.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var vt=this,ct=[],Pt=[];return this.matchers.forEach(function(Lt){var Nt=a(Lt,2),He=Nt[0],Ge=Nt[1];switch(He){case Node.TEXT_NODE:Pt.push(Ge);break;case Node.ELEMENT_NODE:ct.push(Ge);break;default:[].forEach.call(vt.container.querySelectorAll(He),function(Qt){Qt[nt]=Qt[nt]||[],Qt[nt].push(Ge)});break}}),[ct,Pt]}}]),at}(T.default);j.DEFAULTS={matchers:[],matchVisual:!0};function G(rt,at,dt){return(typeof at>"u"?"undefined":o(at))==="object"?Object.keys(at).reduce(function(vt,ct){return G(vt,ct,at[ct])},rt):rt.reduce(function(vt,ct){return ct.attributes&&ct.attributes[at]?vt.push(ct):vt.insert(ct.insert,(0,h.default)({},M({},at,dt),ct.attributes))},new p.default)}function X(rt){if(rt.nodeType!==Node.ELEMENT_NODE)return{};var at="__ql-computed-style";return rt[at]||(rt[at]=window.getComputedStyle(rt))}function Y(rt,at){for(var dt="",vt=rt.ops.length-1;vt>=0&&dt.length<at.length;--vt){var ct=rt.ops[vt];if(typeof ct.insert!="string")break;dt=ct.insert+dt}return dt.slice(-1*at.length)===at}function $(rt){if(rt.childNodes.length===0)return!1;var at=X(rt);return["block","list-item"].indexOf(at.display)>-1}function W(rt,at,dt){return rt.nodeType===rt.TEXT_NODE?dt.reduce(function(vt,ct){return ct(rt,vt)},new p.default):rt.nodeType===rt.ELEMENT_NODE?[].reduce.call(rt.childNodes||[],function(vt,ct){var Pt=W(ct,at,dt);return ct.nodeType===rt.ELEMENT_NODE&&(Pt=at.reduce(function(Lt,Nt){return Nt(ct,Lt)},Pt),Pt=(ct[nt]||[]).reduce(function(Lt,Nt){return Nt(ct,Lt)},Pt)),vt.concat(Pt)},new p.default):new p.default}function et(rt,at,dt){return G(dt,rt,!0)}function J(rt,at){var dt=v.default.Attributor.Attribute.keys(rt),vt=v.default.Attributor.Class.keys(rt),ct=v.default.Attributor.Style.keys(rt),Pt={};return dt.concat(vt).concat(ct).forEach(function(Lt){var Nt=v.default.query(Lt,v.default.Scope.ATTRIBUTE);Nt!=null&&(Pt[Nt.attrName]=Nt.value(rt),Pt[Nt.attrName])||(Nt=U[Lt],Nt!=null&&(Nt.attrName===Lt||Nt.keyName===Lt)&&(Pt[Nt.attrName]=Nt.value(rt)||void 0),Nt=k[Lt],Nt!=null&&(Nt.attrName===Lt||Nt.keyName===Lt)&&(Nt=k[Lt],Pt[Nt.attrName]=Nt.value(rt)||void 0))}),Object.keys(Pt).length>0&&(at=G(at,Pt)),at}function it(rt,at){var dt=v.default.query(rt);if(dt==null)return at;if(dt.prototype instanceof v.default.Embed){var vt={},ct=dt.value(rt);ct!=null&&(vt[dt.blotName]=ct,at=new p.default().insert(vt,dt.formats(rt)))}else typeof dt.formats=="function"&&(at=G(at,dt.blotName,dt.formats(rt)));return at}function lt(rt,at){return Y(at,`
1993
- `)||at.insert(`
1994
- `),at}function pt(){return new p.default}function yt(rt,at){var dt=v.default.query(rt);if(dt==null||dt.blotName!=="list-item"||!Y(at,`
1995
- `))return at;for(var vt=-1,ct=rt.parentNode;!ct.classList.contains("ql-clipboard");)(v.default.query(ct)||{}).blotName==="list"&&(vt+=1),ct=ct.parentNode;return vt<=0?at:at.compose(new p.default().retain(at.length()-1).retain(1,{indent:vt}))}function xt(rt,at){return Y(at,`
1996
- `)||($(rt)||at.length()>0&&rt.nextSibling&&$(rt.nextSibling))&&at.insert(`
1997
- `),at}function At(rt,at){if($(rt)&&rt.nextElementSibling!=null&&!Y(at,`
1998
-
1999
- `)){var dt=rt.offsetHeight+parseFloat(X(rt).marginTop)+parseFloat(X(rt).marginBottom);rt.nextElementSibling.offsetTop>rt.offsetTop+dt*1.5&&at.insert(`
2000
- `)}return at}function oe(rt,at){var dt={},vt=rt.style||{};return vt.fontStyle&&X(rt).fontStyle==="italic"&&(dt.italic=!0),vt.fontWeight&&(X(rt).fontWeight.startsWith("bold")||parseInt(X(rt).fontWeight)>=700)&&(dt.bold=!0),Object.keys(dt).length>0&&(at=G(at,dt)),parseFloat(vt.textIndent||0)>0&&(at=new p.default().insert(" ").concat(at)),at}function Ht(rt,at){var dt=rt.data;if(rt.parentNode.tagName==="O:P")return at.insert(dt.trim());if(dt.trim().length===0&&rt.parentNode.classList.contains("ql-clipboard"))return at;if(!X(rt.parentNode).whiteSpace.startsWith("pre")){var vt=function(Pt,Lt){return Lt=Lt.replace(/[^\u00a0]/g,""),Lt.length<1&&Pt?" ":Lt};dt=dt.replace(/\r\n/g," ").replace(/\n/g," "),dt=dt.replace(/\s\s+/g,vt.bind(vt,!0)),(rt.previousSibling==null&&$(rt.parentNode)||rt.previousSibling!=null&&$(rt.previousSibling))&&(dt=dt.replace(/^\s+/,vt.bind(vt,!1))),(rt.nextSibling==null&&$(rt.parentNode)||rt.nextSibling!=null&&$(rt.nextSibling))&&(dt=dt.replace(/\s+$/,vt.bind(vt,!1)))}return at.insert(dt)}n.default=j,n.matchAttributor=J,n.matchBlot=it,n.matchNewline=xt,n.matchSpacing=At,n.matchText=Ht},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function y(b,_){for(var m=0;m<_.length;m++){var w=_[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(b,w.key,w)}}return function(b,_,m){return _&&y(b.prototype,_),m&&y(b,m),b}}(),a=function y(b,_,m){b===null&&(b=Function.prototype);var w=Object.getOwnPropertyDescriptor(b,_);if(w===void 0){var T=Object.getPrototypeOf(b);return T===null?void 0:y(T,_,m)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(m)}},u=i(6),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function d(y,b){if(!(y instanceof b))throw new TypeError("Cannot call a class as a function")}function p(y,b){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:y}function c(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);y.prototype=Object.create(b&&b.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(y,b):y.__proto__=b)}var v=function(y){c(b,y);function b(){return d(this,b),p(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return o(b,[{key:"optimize",value:function(m){a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"optimize",this).call(this,m),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return a(b.__proto__||Object.getPrototypeOf(b),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),b}(f.default);v.blotName="bold",v.tagName=["STRONG","B"],n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.addControls=n.default=void 0;var o=function(){function C(P,M){var F=[],q=!0,Z=!1,z=void 0;try{for(var nt=P[Symbol.iterator](),V;!(q=(V=nt.next()).done)&&(F.push(V.value),!(M&&F.length===M));q=!0);}catch(U){Z=!0,z=U}finally{try{!q&&nt.return&&nt.return()}finally{if(Z)throw z}}return F}return function(P,M){if(Array.isArray(P))return P;if(Symbol.iterator in Object(P))return C(P,M);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function C(P,M){for(var F=0;F<M.length;F++){var q=M[F];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(P,q.key,q)}}return function(P,M,F){return M&&C(P.prototype,M),F&&C(P,F),P}}(),u=i(2),f=m(u),h=i(0),d=m(h),p=i(5),c=m(p),v=i(10),y=m(v),b=i(9),_=m(b);function m(C){return C&&C.__esModule?C:{default:C}}function w(C,P,M){return P in C?Object.defineProperty(C,P,{value:M,enumerable:!0,configurable:!0,writable:!0}):C[P]=M,C}function T(C,P){if(!(C instanceof P))throw new TypeError("Cannot call a class as a function")}function x(C,P){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P&&(typeof P=="object"||typeof P=="function")?P:C}function E(C,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof P);C.prototype=Object.create(P&&P.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),P&&(Object.setPrototypeOf?Object.setPrototypeOf(C,P):C.__proto__=P)}var I=(0,y.default)("quill:toolbar"),A=function(C){E(P,C);function P(M,F){T(this,P);var q=x(this,(P.__proto__||Object.getPrototypeOf(P)).call(this,M,F));if(Array.isArray(q.options.container)){var Z=document.createElement("div");L(Z,q.options.container),M.container.parentNode.insertBefore(Z,M.container),q.container=Z}else typeof q.options.container=="string"?q.container=document.querySelector(q.options.container):q.container=q.options.container;if(!(q.container instanceof HTMLElement)){var z;return z=I.error("Container required for toolbar",q.options),x(q,z)}return q.container.classList.add("ql-toolbar"),q.controls=[],q.handlers={},Object.keys(q.options.handlers).forEach(function(nt){q.addHandler(nt,q.options.handlers[nt])}),[].forEach.call(q.container.querySelectorAll("button, select"),function(nt){q.attach(nt)}),q.quill.on(c.default.events.EDITOR_CHANGE,function(nt,V){nt===c.default.events.SELECTION_CHANGE&&q.update(V)}),q.quill.on(c.default.events.SCROLL_OPTIMIZE,function(){var nt=q.quill.selection.getRange(),V=o(nt,1),U=V[0];q.update(U)}),q}return a(P,[{key:"addHandler",value:function(F,q){this.handlers[F]=q}},{key:"attach",value:function(F){var q=this,Z=[].find.call(F.classList,function(nt){return nt.indexOf("ql-")===0});if(Z){if(Z=Z.slice(3),F.tagName==="BUTTON"&&F.setAttribute("type","button"),this.handlers[Z]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[Z]==null){I.warn("ignoring attaching to disabled format",Z,F);return}if(d.default.query(Z)==null){I.warn("ignoring attaching to nonexistent format",Z,F);return}}var z=F.tagName==="SELECT"?"change":"click";F.addEventListener(z,function(nt){var V=void 0;if(F.tagName==="SELECT"){if(F.selectedIndex<0)return;var U=F.options[F.selectedIndex];U.hasAttribute("selected")?V=!1:V=U.value||!1}else F.classList.contains("ql-active")?V=!1:V=F.value||!F.hasAttribute("value"),nt.preventDefault();q.quill.focus();var k=q.quill.selection.getRange(),j=o(k,1),G=j[0];if(q.handlers[Z]!=null)q.handlers[Z].call(q,V);else if(d.default.query(Z).prototype instanceof d.default.Embed){if(V=prompt("Enter "+Z),!V)return;q.quill.updateContents(new f.default().retain(G.index).delete(G.length).insert(w({},Z,V)),c.default.sources.USER)}else q.quill.format(Z,V,c.default.sources.USER);q.update(G)}),this.controls.push([Z,F])}}},{key:"update",value:function(F){var q=F==null?{}:this.quill.getFormat(F);this.controls.forEach(function(Z){var z=o(Z,2),nt=z[0],V=z[1];if(V.tagName==="SELECT"){var U=void 0;if(F==null)U=null;else if(q[nt]==null)U=V.querySelector("option[selected]");else if(!Array.isArray(q[nt])){var k=q[nt];typeof k=="string"&&(k=k.replace(/\"/g,'\\"')),U=V.querySelector('option[value="'+k+'"]')}U==null?(V.value="",V.selectedIndex=-1):U.selected=!0}else if(F==null)V.classList.remove("ql-active");else if(V.hasAttribute("value")){var j=q[nt]===V.getAttribute("value")||q[nt]!=null&&q[nt].toString()===V.getAttribute("value")||q[nt]==null&&!V.getAttribute("value");V.classList.toggle("ql-active",j)}else V.classList.toggle("ql-active",q[nt]!=null)})}}]),P}(_.default);A.DEFAULTS={};function O(C,P,M){var F=document.createElement("button");F.setAttribute("type","button"),F.classList.add("ql-"+P),M!=null&&(F.value=M),C.appendChild(F)}function L(C,P){Array.isArray(P[0])||(P=[P]),P.forEach(function(M){var F=document.createElement("span");F.classList.add("ql-formats"),M.forEach(function(q){if(typeof q=="string")O(F,q);else{var Z=Object.keys(q)[0],z=q[Z];Array.isArray(z)?R(F,Z,z):O(F,Z,z)}}),C.appendChild(F)})}function R(C,P,M){var F=document.createElement("select");F.classList.add("ql-"+P),M.forEach(function(q){var Z=document.createElement("option");q!==!1?Z.setAttribute("value",q):Z.setAttribute("selected","selected"),F.appendChild(Z)}),C.appendChild(F)}A.DEFAULTS={container:null,handlers:{clean:function(){var P=this,M=this.quill.getSelection();if(M!=null)if(M.length==0){var F=this.quill.getFormat();Object.keys(F).forEach(function(q){d.default.query(q,d.default.Scope.INLINE)!=null&&P.quill.format(q,!1)})}else this.quill.removeFormat(M,c.default.sources.USER)},direction:function(P){var M=this.quill.getFormat().align;P==="rtl"&&M==null?this.quill.format("align","right",c.default.sources.USER):!P&&M==="right"&&this.quill.format("align",!1,c.default.sources.USER),this.quill.format("direction",P,c.default.sources.USER)},indent:function(P){var M=this.quill.getSelection(),F=this.quill.getFormat(M),q=parseInt(F.indent||0);if(P==="+1"||P==="-1"){var Z=P==="+1"?1:-1;F.direction==="rtl"&&(Z*=-1),this.quill.format("indent",q+Z,c.default.sources.USER)}},link:function(P){P===!0&&(P=prompt("Enter link URL:")),this.quill.format("link",P,c.default.sources.USER)},list:function(P){var M=this.quill.getSelection(),F=this.quill.getFormat(M);P==="check"?F.list==="checked"||F.list==="unchecked"?this.quill.format("list",!1,c.default.sources.USER):this.quill.format("list","unchecked",c.default.sources.USER):this.quill.format("list",P,c.default.sources.USER)}}},n.default=A,n.addControls=L},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function y(b,_){for(var m=0;m<_.length;m++){var w=_[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(b,w.key,w)}}return function(b,_,m){return _&&y(b.prototype,_),m&&y(b,m),b}}(),a=function y(b,_,m){b===null&&(b=Function.prototype);var w=Object.getOwnPropertyDescriptor(b,_);if(w===void 0){var T=Object.getPrototypeOf(b);return T===null?void 0:y(T,_,m)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(m)}},u=i(28),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function d(y,b){if(!(y instanceof b))throw new TypeError("Cannot call a class as a function")}function p(y,b){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:y}function c(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);y.prototype=Object.create(b&&b.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(y,b):y.__proto__=b)}var v=function(y){c(b,y);function b(_,m){d(this,b);var w=p(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,_));return w.label.innerHTML=m,w.container.classList.add("ql-color-picker"),[].slice.call(w.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(T){T.classList.add("ql-primary")}),w}return o(b,[{key:"buildItem",value:function(m){var w=a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"buildItem",this).call(this,m);return w.style.backgroundColor=m.getAttribute("value")||"",w}},{key:"selectItem",value:function(m,w){a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"selectItem",this).call(this,m,w);var T=this.label.querySelector(".ql-color-label"),x=m&&m.getAttribute("data-value")||"";T&&(T.tagName==="line"?T.style.stroke=x:T.style.fill=x)}}]),b}(f.default);n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function y(b,_){for(var m=0;m<_.length;m++){var w=_[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(b,w.key,w)}}return function(b,_,m){return _&&y(b.prototype,_),m&&y(b,m),b}}(),a=function y(b,_,m){b===null&&(b=Function.prototype);var w=Object.getOwnPropertyDescriptor(b,_);if(w===void 0){var T=Object.getPrototypeOf(b);return T===null?void 0:y(T,_,m)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(m)}},u=i(28),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function d(y,b){if(!(y instanceof b))throw new TypeError("Cannot call a class as a function")}function p(y,b){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:y}function c(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);y.prototype=Object.create(b&&b.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(y,b):y.__proto__=b)}var v=function(y){c(b,y);function b(_,m){d(this,b);var w=p(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,_));return w.container.classList.add("ql-icon-picker"),[].forEach.call(w.container.querySelectorAll(".ql-picker-item"),function(T){T.innerHTML=m[T.getAttribute("data-value")||""]}),w.defaultItem=w.container.querySelector(".ql-selected"),w.selectItem(w.defaultItem),w}return o(b,[{key:"selectItem",value:function(m,w){a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"selectItem",this).call(this,m,w),m=m||this.defaultItem,this.label.innerHTML=m.innerHTML}}]),b}(f.default);n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function f(h,d){for(var p=0;p<d.length;p++){var c=d[p];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(h,c.key,c)}}return function(h,d,p){return d&&f(h.prototype,d),p&&f(h,p),h}}();function a(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")}var u=function(){function f(h,d){var p=this;a(this,f),this.quill=h,this.boundsContainer=d||document.body,this.root=h.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){p.root.style.marginTop=-1*p.quill.root.scrollTop+"px"}),this.hide()}return o(f,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(d){var p=d.left+d.width/2-this.root.offsetWidth/2,c=d.bottom+this.quill.root.scrollTop;this.root.style.left=p+"px",this.root.style.top=c+"px",this.root.classList.remove("ql-flip");var v=this.boundsContainer.getBoundingClientRect(),y=this.root.getBoundingClientRect(),b=0;if(y.right>v.right&&(b=v.right-y.right,this.root.style.left=p+b+"px"),y.left<v.left&&(b=v.left-y.left,this.root.style.left=p+b+"px"),y.bottom>v.bottom){var _=y.bottom-y.top,m=d.bottom-d.top+_;this.root.style.top=c-m+"px",this.root.classList.add("ql-flip")}return b}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),f}();n.default=u},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function R(C,P){var M=[],F=!0,q=!1,Z=void 0;try{for(var z=C[Symbol.iterator](),nt;!(F=(nt=z.next()).done)&&(M.push(nt.value),!(P&&M.length===P));F=!0);}catch(V){q=!0,Z=V}finally{try{!F&&z.return&&z.return()}finally{if(q)throw Z}}return M}return function(C,P){if(Array.isArray(C))return C;if(Symbol.iterator in Object(C))return R(C,P);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function R(C,P,M){C===null&&(C=Function.prototype);var F=Object.getOwnPropertyDescriptor(C,P);if(F===void 0){var q=Object.getPrototypeOf(C);return q===null?void 0:R(q,P,M)}else{if("value"in F)return F.value;var Z=F.get;return Z===void 0?void 0:Z.call(M)}},u=function(){function R(C,P){for(var M=0;M<P.length;M++){var F=P[M];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(C,F.key,F)}}return function(C,P,M){return P&&R(C.prototype,P),M&&R(C,M),C}}(),f=i(3),h=T(f),d=i(8),p=T(d),c=i(43),v=T(c),y=i(27),b=T(y),_=i(15),m=i(41),w=T(m);function T(R){return R&&R.__esModule?R:{default:R}}function x(R,C){if(!(R instanceof C))throw new TypeError("Cannot call a class as a function")}function E(R,C){if(!R)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:R}function I(R,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);R.prototype=Object.create(C&&C.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(R,C):R.__proto__=C)}var A=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],O=function(R){I(C,R);function C(P,M){x(this,C),M.modules.toolbar!=null&&M.modules.toolbar.container==null&&(M.modules.toolbar.container=A);var F=E(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,P,M));return F.quill.container.classList.add("ql-snow"),F}return u(C,[{key:"extendToolbar",value:function(M){M.container.classList.add("ql-snow"),this.buildButtons([].slice.call(M.container.querySelectorAll("button")),w.default),this.buildPickers([].slice.call(M.container.querySelectorAll("select")),w.default),this.tooltip=new L(this.quill,this.options.bounds),M.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(F,q){M.handlers.link.call(M,!q.format.link)})}}]),C}(v.default);O.DEFAULTS=(0,h.default)(!0,{},v.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(C){if(C){var P=this.quill.getSelection();if(P==null||P.length==0)return;var M=this.quill.getText(P);/^\S+@\S+\.\S+$/.test(M)&&M.indexOf("mailto:")!==0&&(M="mailto:"+M);var F=this.quill.theme.tooltip;F.edit("link",M)}else this.quill.format("link",!1)}}}}});var L=function(R){I(C,R);function C(P,M){x(this,C);var F=E(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,P,M));return F.preview=F.root.querySelector("a.ql-preview"),F}return u(C,[{key:"listen",value:function(){var M=this;a(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(F){M.root.classList.contains("ql-editing")?M.save():M.edit("link",M.preview.textContent),F.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(F){if(M.linkRange!=null){var q=M.linkRange;M.restoreFocus(),M.quill.formatText(q,"link",!1,p.default.sources.USER),delete M.linkRange}F.preventDefault(),M.hide()}),this.quill.on(p.default.events.SELECTION_CHANGE,function(F,q,Z){if(F!=null){if(F.length===0&&Z===p.default.sources.USER){var z=M.quill.scroll.descendant(b.default,F.index),nt=o(z,2),V=nt[0],U=nt[1];if(V!=null){M.linkRange=new _.Range(F.index-U,V.length());var k=b.default.formats(V.domNode);M.preview.textContent=k,M.preview.setAttribute("href",k),M.show(),M.position(M.quill.getBounds(M.linkRange));return}}else delete M.linkRange;M.hide()}})}},{key:"show",value:function(){a(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),C}(c.BaseTooltip);L.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),n.default=O},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(29),a=ct(o),u=i(36),f=i(38),h=i(64),d=i(65),p=ct(d),c=i(66),v=ct(c),y=i(67),b=ct(y),_=i(37),m=i(26),w=i(39),T=i(40),x=i(56),E=ct(x),I=i(68),A=ct(I),O=i(27),L=ct(O),R=i(69),C=ct(R),P=i(70),M=ct(P),F=i(71),q=ct(F),Z=i(72),z=ct(Z),nt=i(73),V=ct(nt),U=i(13),k=ct(U),j=i(74),G=ct(j),X=i(75),Y=ct(X),$=i(57),W=ct($),et=i(41),J=ct(et),it=i(28),lt=ct(it),pt=i(59),yt=ct(pt),xt=i(60),At=ct(xt),oe=i(61),Ht=ct(oe),rt=i(108),at=ct(rt),dt=i(62),vt=ct(dt);function ct(Pt){return Pt&&Pt.__esModule?Pt:{default:Pt}}a.default.register({"attributors/attribute/direction":f.DirectionAttribute,"attributors/class/align":u.AlignClass,"attributors/class/background":_.BackgroundClass,"attributors/class/color":m.ColorClass,"attributors/class/direction":f.DirectionClass,"attributors/class/font":w.FontClass,"attributors/class/size":T.SizeClass,"attributors/style/align":u.AlignStyle,"attributors/style/background":_.BackgroundStyle,"attributors/style/color":m.ColorStyle,"attributors/style/direction":f.DirectionStyle,"attributors/style/font":w.FontStyle,"attributors/style/size":T.SizeStyle},!0),a.default.register({"formats/align":u.AlignClass,"formats/direction":f.DirectionClass,"formats/indent":h.IndentClass,"formats/background":_.BackgroundStyle,"formats/color":m.ColorStyle,"formats/font":w.FontClass,"formats/size":T.SizeClass,"formats/blockquote":p.default,"formats/code-block":k.default,"formats/header":v.default,"formats/list":b.default,"formats/bold":E.default,"formats/code":U.Code,"formats/italic":A.default,"formats/link":L.default,"formats/script":C.default,"formats/strike":M.default,"formats/underline":q.default,"formats/image":z.default,"formats/video":V.default,"formats/list/item":y.ListItem,"modules/formula":G.default,"modules/syntax":Y.default,"modules/toolbar":W.default,"themes/bubble":at.default,"themes/snow":vt.default,"ui/icons":J.default,"ui/picker":lt.default,"ui/icon-picker":At.default,"ui/color-picker":yt.default,"ui/tooltip":Ht.default},!0),n.default=a.default},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.IndentClass=void 0;var o=function(){function b(_,m){for(var w=0;w<m.length;w++){var T=m[w];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(_,T.key,T)}}return function(_,m,w){return m&&b(_.prototype,m),w&&b(_,w),_}}(),a=function b(_,m,w){_===null&&(_=Function.prototype);var T=Object.getOwnPropertyDescriptor(_,m);if(T===void 0){var x=Object.getPrototypeOf(_);return x===null?void 0:b(x,m,w)}else{if("value"in T)return T.value;var E=T.get;return E===void 0?void 0:E.call(w)}},u=i(0),f=h(u);function h(b){return b&&b.__esModule?b:{default:b}}function d(b,_){if(!(b instanceof _))throw new TypeError("Cannot call a class as a function")}function p(b,_){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:b}function c(b,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);b.prototype=Object.create(_&&_.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(b,_):b.__proto__=_)}var v=function(b){c(_,b);function _(){return d(this,_),p(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return o(_,[{key:"add",value:function(w,T){if(T==="+1"||T==="-1"){var x=this.value(w)||0;T=T==="+1"?x+1:x-1}return T===0?(this.remove(w),!0):a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"add",this).call(this,w,T)}},{key:"canAdd",value:function(w,T){return a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"canAdd",this).call(this,w,T)||a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"canAdd",this).call(this,w,parseInt(T))}},{key:"value",value:function(w){return parseInt(a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"value",this).call(this,w))||void 0}}]),_}(f.default.Attributor.Class),y=new v("indent","ql-indent",{scope:f.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});n.IndentClass=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(4),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function d(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var p=function(c){d(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(a.default);p.blotName="blockquote",p.tagName="blockquote",n.default=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function v(y,b){for(var _=0;_<b.length;_++){var m=b[_];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(y,m.key,m)}}return function(y,b,_){return b&&v(y.prototype,b),_&&v(y,_),y}}(),a=i(4),u=f(a);function f(v){return v&&v.__esModule?v:{default:v}}function h(v,y){if(!(v instanceof y))throw new TypeError("Cannot call a class as a function")}function d(v,y){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:v}function p(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);v.prototype=Object.create(y&&y.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(v,y):v.__proto__=y)}var c=function(v){p(y,v);function y(){return h(this,y),d(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return o(y,null,[{key:"formats",value:function(_){return this.tagName.indexOf(_.tagName)+1}}]),y}(u.default);c.blotName="header",c.tagName=["H1","H2","H3","H4","H5","H6"],n.default=c},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.ListItem=void 0;var o=function(){function x(E,I){for(var A=0;A<I.length;A++){var O=I[A];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(E,O.key,O)}}return function(E,I,A){return I&&x(E.prototype,I),A&&x(E,A),E}}(),a=function x(E,I,A){E===null&&(E=Function.prototype);var O=Object.getOwnPropertyDescriptor(E,I);if(O===void 0){var L=Object.getPrototypeOf(E);return L===null?void 0:x(L,I,A)}else{if("value"in O)return O.value;var R=O.get;return R===void 0?void 0:R.call(A)}},u=i(0),f=v(u),h=i(4),d=v(h),p=i(25),c=v(p);function v(x){return x&&x.__esModule?x:{default:x}}function y(x,E,I){return E in x?Object.defineProperty(x,E,{value:I,enumerable:!0,configurable:!0,writable:!0}):x[E]=I,x}function b(x,E){if(!(x instanceof E))throw new TypeError("Cannot call a class as a function")}function _(x,E){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:x}function m(x,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);x.prototype=Object.create(E&&E.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(x,E):x.__proto__=E)}var w=function(x){m(E,x);function E(){return b(this,E),_(this,(E.__proto__||Object.getPrototypeOf(E)).apply(this,arguments))}return o(E,[{key:"format",value:function(A,O){A===T.blotName&&!O?this.replaceWith(f.default.create(this.statics.scope)):a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"format",this).call(this,A,O)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(A,O){return this.parent.isolate(this.offset(this.parent),this.length()),A===this.parent.statics.blotName?(this.parent.replaceWith(A,O),this):(this.parent.unwrap(),a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"replaceWith",this).call(this,A,O))}}],[{key:"formats",value:function(A){return A.tagName===this.tagName?void 0:a(E.__proto__||Object.getPrototypeOf(E),"formats",this).call(this,A)}}]),E}(d.default);w.blotName="list-item",w.tagName="LI";var T=function(x){m(E,x),o(E,null,[{key:"create",value:function(A){var O=A==="ordered"?"OL":"UL",L=a(E.__proto__||Object.getPrototypeOf(E),"create",this).call(this,O);return(A==="checked"||A==="unchecked")&&L.setAttribute("data-checked",A==="checked"),L}},{key:"formats",value:function(A){if(A.tagName==="OL")return"ordered";if(A.tagName==="UL")return A.hasAttribute("data-checked")?A.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function E(I){b(this,E);var A=_(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,I)),O=function(R){if(R.target.parentNode===I){var C=A.statics.formats(I),P=f.default.find(R.target);C==="checked"?P.format("list","unchecked"):C==="unchecked"&&P.format("list","checked")}};return I.addEventListener("touchstart",O),I.addEventListener("mousedown",O),A}return o(E,[{key:"format",value:function(A,O){this.children.length>0&&this.children.tail.format(A,O)}},{key:"formats",value:function(){return y({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(A,O){if(A instanceof w)a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"insertBefore",this).call(this,A,O);else{var L=O==null?this.length():O.offset(this),R=this.split(L);R.parent.insertBefore(A,R)}}},{key:"optimize",value:function(A){a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"optimize",this).call(this,A);var O=this.next;O!=null&&O.prev===this&&O.statics.blotName===this.statics.blotName&&O.domNode.tagName===this.domNode.tagName&&O.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(O.moveChildren(this),O.remove())}},{key:"replace",value:function(A){if(A.statics.blotName!==this.statics.blotName){var O=f.default.create(this.statics.defaultChild);A.moveChildren(O),this.appendChild(O)}a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"replace",this).call(this,A)}}]),E}(c.default);T.blotName="list",T.scope=f.default.Scope.BLOCK_BLOT,T.tagName=["OL","UL"],T.defaultChild="list-item",T.allowedChildren=[w],n.ListItem=w,n.default=T},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(56),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function d(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var p=function(c){d(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(a.default);p.blotName="italic",p.tagName=["EM","I"],n.default=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function y(b,_){for(var m=0;m<_.length;m++){var w=_[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(b,w.key,w)}}return function(b,_,m){return _&&y(b.prototype,_),m&&y(b,m),b}}(),a=function y(b,_,m){b===null&&(b=Function.prototype);var w=Object.getOwnPropertyDescriptor(b,_);if(w===void 0){var T=Object.getPrototypeOf(b);return T===null?void 0:y(T,_,m)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(m)}},u=i(6),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function d(y,b){if(!(y instanceof b))throw new TypeError("Cannot call a class as a function")}function p(y,b){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:y}function c(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);y.prototype=Object.create(b&&b.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(y,b):y.__proto__=b)}var v=function(y){c(b,y);function b(){return d(this,b),p(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return o(b,null,[{key:"create",value:function(m){return m==="super"?document.createElement("sup"):m==="sub"?document.createElement("sub"):a(b.__proto__||Object.getPrototypeOf(b),"create",this).call(this,m)}},{key:"formats",value:function(m){if(m.tagName==="SUB")return"sub";if(m.tagName==="SUP")return"super"}}]),b}(f.default);v.blotName="script",v.tagName=["SUB","SUP"],n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(6),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function d(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var p=function(c){d(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(a.default);p.blotName="strike",p.tagName="S",n.default=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(6),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function d(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var p=function(c){d(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(a.default);p.blotName="underline",p.tagName="U",n.default=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function _(m,w){for(var T=0;T<w.length;T++){var x=w[T];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,w,T){return w&&_(m.prototype,w),T&&_(m,T),m}}(),a=function _(m,w,T){m===null&&(m=Function.prototype);var x=Object.getOwnPropertyDescriptor(m,w);if(x===void 0){var E=Object.getPrototypeOf(m);return E===null?void 0:_(E,w,T)}else{if("value"in x)return x.value;var I=x.get;return I===void 0?void 0:I.call(T)}},u=i(0),f=d(u),h=i(27);function d(_){return _&&_.__esModule?_:{default:_}}function p(_,m){if(!(_ instanceof m))throw new TypeError("Cannot call a class as a function")}function c(_,m){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:_}function v(_,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);_.prototype=Object.create(m&&m.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(_,m):_.__proto__=m)}var y=["alt","height","width"],b=function(_){v(m,_);function m(){return p(this,m),c(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return o(m,[{key:"format",value:function(T,x){y.indexOf(T)>-1?x?this.domNode.setAttribute(T,x):this.domNode.removeAttribute(T):a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,T,x)}}],[{key:"create",value:function(T){var x=a(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,T);return typeof T=="string"&&x.setAttribute("src",this.sanitize(T)),x}},{key:"formats",value:function(T){return y.reduce(function(x,E){return T.hasAttribute(E)&&(x[E]=T.getAttribute(E)),x},{})}},{key:"match",value:function(T){return/\.(jpe?g|gif|png)$/.test(T)||/^data:image\/.+;base64/.test(T)}},{key:"sanitize",value:function(T){return(0,h.sanitize)(T,["http","https","data"])?T:"//:0"}},{key:"value",value:function(T){return T.getAttribute("src")}}]),m}(f.default.Embed);b.blotName="image",b.tagName="IMG",n.default=b},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function _(m,w){for(var T=0;T<w.length;T++){var x=w[T];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,w,T){return w&&_(m.prototype,w),T&&_(m,T),m}}(),a=function _(m,w,T){m===null&&(m=Function.prototype);var x=Object.getOwnPropertyDescriptor(m,w);if(x===void 0){var E=Object.getPrototypeOf(m);return E===null?void 0:_(E,w,T)}else{if("value"in x)return x.value;var I=x.get;return I===void 0?void 0:I.call(T)}},u=i(4),f=i(27),h=d(f);function d(_){return _&&_.__esModule?_:{default:_}}function p(_,m){if(!(_ instanceof m))throw new TypeError("Cannot call a class as a function")}function c(_,m){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:_}function v(_,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);_.prototype=Object.create(m&&m.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(_,m):_.__proto__=m)}var y=["height","width"],b=function(_){v(m,_);function m(){return p(this,m),c(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return o(m,[{key:"format",value:function(T,x){y.indexOf(T)>-1?x?this.domNode.setAttribute(T,x):this.domNode.removeAttribute(T):a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,T,x)}}],[{key:"create",value:function(T){var x=a(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,T);return x.setAttribute("frameborder","0"),x.setAttribute("allowfullscreen",!0),x.setAttribute("src",this.sanitize(T)),x}},{key:"formats",value:function(T){return y.reduce(function(x,E){return T.hasAttribute(E)&&(x[E]=T.getAttribute(E)),x},{})}},{key:"sanitize",value:function(T){return h.default.sanitize(T)}},{key:"value",value:function(T){return T.getAttribute("src")}}]),m}(u.BlockEmbed);b.blotName="video",b.className="ql-video",b.tagName="IFRAME",n.default=b},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.FormulaBlot=void 0;var o=function(){function T(x,E){for(var I=0;I<E.length;I++){var A=E[I];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(x,A.key,A)}}return function(x,E,I){return E&&T(x.prototype,E),I&&T(x,I),x}}(),a=function T(x,E,I){x===null&&(x=Function.prototype);var A=Object.getOwnPropertyDescriptor(x,E);if(A===void 0){var O=Object.getPrototypeOf(x);return O===null?void 0:T(O,E,I)}else{if("value"in A)return A.value;var L=A.get;return L===void 0?void 0:L.call(I)}},u=i(35),f=v(u),h=i(5),d=v(h),p=i(9),c=v(p);function v(T){return T&&T.__esModule?T:{default:T}}function y(T,x){if(!(T instanceof x))throw new TypeError("Cannot call a class as a function")}function b(T,x){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:T}function _(T,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);T.prototype=Object.create(x&&x.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(T,x):T.__proto__=x)}var m=function(T){_(x,T);function x(){return y(this,x),b(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return o(x,null,[{key:"create",value:function(I){var A=a(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,I);return typeof I=="string"&&(window.katex.render(I,A,{throwOnError:!1,errorColor:"#f00"}),A.setAttribute("data-value",I)),A}},{key:"value",value:function(I){return I.getAttribute("data-value")}}]),x}(f.default);m.blotName="formula",m.className="ql-formula",m.tagName="SPAN";var w=function(T){_(x,T),o(x,null,[{key:"register",value:function(){d.default.register(m,!0)}}]);function x(){y(this,x);var E=b(this,(x.__proto__||Object.getPrototypeOf(x)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return E}return x}(c.default);n.FormulaBlot=m,n.default=w},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.CodeToken=n.CodeBlock=void 0;var o=function(){function I(A,O){for(var L=0;L<O.length;L++){var R=O[L];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(A,R.key,R)}}return function(A,O,L){return O&&I(A.prototype,O),L&&I(A,L),A}}(),a=function I(A,O,L){A===null&&(A=Function.prototype);var R=Object.getOwnPropertyDescriptor(A,O);if(R===void 0){var C=Object.getPrototypeOf(A);return C===null?void 0:I(C,O,L)}else{if("value"in R)return R.value;var P=R.get;return P===void 0?void 0:P.call(L)}},u=i(0),f=b(u),h=i(5),d=b(h),p=i(9),c=b(p),v=i(13),y=b(v);function b(I){return I&&I.__esModule?I:{default:I}}function _(I,A){if(!(I instanceof A))throw new TypeError("Cannot call a class as a function")}function m(I,A){if(!I)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:I}function w(I,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);I.prototype=Object.create(A&&A.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(I,A):I.__proto__=A)}var T=function(I){w(A,I);function A(){return _(this,A),m(this,(A.__proto__||Object.getPrototypeOf(A)).apply(this,arguments))}return o(A,[{key:"replaceWith",value:function(L){this.domNode.textContent=this.domNode.textContent,this.attach(),a(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"replaceWith",this).call(this,L)}},{key:"highlight",value:function(L){var R=this.domNode.textContent;this.cachedText!==R&&((R.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=L(R),this.domNode.normalize(),this.attach()),this.cachedText=R)}}]),A}(y.default);T.className="ql-syntax";var x=new f.default.Attributor.Class("token","hljs",{scope:f.default.Scope.INLINE}),E=function(I){w(A,I),o(A,null,[{key:"register",value:function(){d.default.register(x,!0),d.default.register(T,!0)}}]);function A(O,L){_(this,A);var R=m(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,O,L));if(typeof R.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var C=null;return R.quill.on(d.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(C),C=setTimeout(function(){R.highlight(),C=null},R.options.interval)}),R.highlight(),R}return o(A,[{key:"highlight",value:function(){var L=this;if(!this.quill.selection.composing){this.quill.update(d.default.sources.USER);var R=this.quill.getSelection();this.quill.scroll.descendants(T).forEach(function(C){C.highlight(L.options.highlight)}),this.quill.update(d.default.sources.SILENT),R!=null&&this.quill.setSelection(R,d.default.sources.SILENT)}}}]),A}(c.default);E.DEFAULTS={highlight:function(){return window.hljs==null?null:function(I){var A=window.hljs.highlightAuto(I);return A.value}}(),interval:1e3},n.CodeBlock=T,n.CodeToken=x,n.default=E},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(r,n){r.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(r,n){r.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(r,n){r.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(r,n){r.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BubbleTooltip=void 0;var o=function A(O,L,R){O===null&&(O=Function.prototype);var C=Object.getOwnPropertyDescriptor(O,L);if(C===void 0){var P=Object.getPrototypeOf(O);return P===null?void 0:A(P,L,R)}else{if("value"in C)return C.value;var M=C.get;return M===void 0?void 0:M.call(R)}},a=function(){function A(O,L){for(var R=0;R<L.length;R++){var C=L[R];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(O,C.key,C)}}return function(O,L,R){return L&&A(O.prototype,L),R&&A(O,R),O}}(),u=i(3),f=_(u),h=i(8),d=_(h),p=i(43),c=_(p),v=i(15),y=i(41),b=_(y);function _(A){return A&&A.__esModule?A:{default:A}}function m(A,O){if(!(A instanceof O))throw new TypeError("Cannot call a class as a function")}function w(A,O){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:A}function T(A,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);A.prototype=Object.create(O&&O.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(A,O):A.__proto__=O)}var x=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],E=function(A){T(O,A);function O(L,R){m(this,O),R.modules.toolbar!=null&&R.modules.toolbar.container==null&&(R.modules.toolbar.container=x);var C=w(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,L,R));return C.quill.container.classList.add("ql-bubble"),C}return a(O,[{key:"extendToolbar",value:function(R){this.tooltip=new I(this.quill,this.options.bounds),this.tooltip.root.appendChild(R.container),this.buildButtons([].slice.call(R.container.querySelectorAll("button")),b.default),this.buildPickers([].slice.call(R.container.querySelectorAll("select")),b.default)}}]),O}(c.default);E.DEFAULTS=(0,f.default)(!0,{},c.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(O){O?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var I=function(A){T(O,A);function O(L,R){m(this,O);var C=w(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,L,R));return C.quill.on(d.default.events.EDITOR_CHANGE,function(P,M,F,q){if(P===d.default.events.SELECTION_CHANGE)if(M!=null&&M.length>0&&q===d.default.sources.USER){C.show(),C.root.style.left="0px",C.root.style.width="",C.root.style.width=C.root.offsetWidth+"px";var Z=C.quill.getLines(M.index,M.length);if(Z.length===1)C.position(C.quill.getBounds(M));else{var z=Z[Z.length-1],nt=C.quill.getIndex(z),V=Math.min(z.length()-1,M.index+M.length-nt),U=C.quill.getBounds(new v.Range(nt,V));C.position(U)}}else document.activeElement!==C.textbox&&C.quill.hasFocus()&&C.hide()}),C}return a(O,[{key:"listen",value:function(){var R=this;o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){R.root.classList.remove("ql-editing")}),this.quill.on(d.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!R.root.classList.contains("ql-hidden")){var C=R.quill.getSelection();C!=null&&R.position(R.quill.getBounds(C))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(R){var C=o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"position",this).call(this,R),P=this.root.querySelector(".ql-tooltip-arrow");if(P.style.marginLeft="",C===0)return C;P.style.marginLeft=-1*C-P.offsetWidth/2+"px"}}]),O}(p.BaseTooltip);I.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),n.BubbleTooltip=I,n.default=E},function(r,n,i){r.exports=i(63)}]).default})})(Ev);var mN=Ev.exports;const yN=En(mN),oB="",_N=Et.forwardRef((e,t)=>{const[r,n]=mt.useState(!1),i=300,o=mt.useRef(null),a=mt.useRef(0),u=mt.useRef(null),f=mt.useRef(null),h=mt.useRef(null),d=mt.useRef(16),p=mt.useRef(null),c=mt.useRef(null),{uniqueId:v,text:y,disabled:b,transformation:_,onTextUpdate:m,pointerdown:w,onExitQuillEditor:T}=e,{x,y:E,fontFamily:I="Arial",fontWeight:A="normal",fontStyle:O="normal",fontSize:L=16,fontVariant:R="normal",fill:C="black",stroke:P,strokeThickness:M=0,blurRadius:F=0,blurEnabled:q=!1,dropShadowColor:Z=null,dropShadow:z=!1,dropShadowBlur:nt=0,wordWrapWidth:V=5e7,leading:U=0,letterSpacing:k,colorCorrection:j={}}=_,{temperatureFilter:G,sharpnessFilter:X,hueFilter:Y,blurFilter:$,adjustmentFilter:W}=ys(j),{blurRadius:et=0}=j;Et.useEffect(()=>{d.current=Number(L)},[L]);const J=["italic","oblique"].includes(O)?O:void 0,it=["small-caps"].includes(R),lt=["bold","bolder","lighter","100","200","300"].includes(A)?A:void 0,pt=Number(k)>0?k:void 0,yt=Et.useMemo(()=>new zr.TextStyle({fontFamily:I,fontSize:L,fill:C||"white",...P&&M>0&&{stroke:P,strokeThickness:M},...J&&{fontStyle:J},...it&&{fontVariant:it},...lt&&{fontWeight:lt},...pt&&{letterSpacing:pt},...q&&{dropShadow:!0,dropShadowBlur:Number(F),dropShadowColor:(Z==null?void 0:Z.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},...z&&{dropShadow:!0,dropShadowBlur:Number(nt),dropShadowColor:(Z==null?void 0:Z.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},wordWrap:!0,breakWords:!0,wordWrapWidth:V||500,leading:U||0}),[q,F,C,I,L,O,U,J,lt,it,pt,Z,P,M,V,z,nt]);Et.useEffect(()=>{p.current={..._}},[_]);const xt=()=>{n(!0)},At=()=>{const rt=new Date().getTime();rt-a.current<i?xt():w&&w(),a.current=rt},oe=rt=>{m&&m({text:rt&&rt.replace(/\n+/g,`
2001
- `),uniqueId:v})},Ht=()=>{n(!1),T&&T()};return Et.useEffect(()=>{if(r&&f.current){let rt=document.getElementById("note-editor");if(rt){rt.style.position="absolute",rt.style.display="block",rt.style.zIndex="10",rt.style.left=x+"px",rt.style.top=E+"px",rt.style.backgroundColor="var(--chakra-color-darkShark)",rt.style.transform="scale(1.5)",rt.style.width="300px",rt.style.height="100px",rt.style.color="#fff",rt.style.fontSize="20px",rt.style.border="1px solid #CBCEE0";const at={esc:{key:27,handler:function(){Ht()}}};if(c.current=new yN("#note-editor",{modules:{toolbar:!1,keyboard:{bindings:{...at}}},placeholder:"Compose your text here...",theme:"snow"}),c.current){c.current.on("text-change",function(){c.current&&oe(c.current.root.innerText)}),c.current.setText(y),c.current.focus(),c.current.off("text-change",()=>{}),c.current.hasFocus()||(rt.style.display="none");const dt=document.createElement("button");dt.innerHTML="&#10006;",dt.style.position="absolute",dt.style.bottom="-14px",dt.style.left="-3px",dt.style.cursor="pointer",dt.addEventListener("click",()=>{Ht()}),dt.style.border="none",dt.style.borderRadius="50%",dt.style.width="15px",dt.style.height="15px",dt.style.backgroundColor="#f8f8f8",dt.style.color="#333",dt.style.fontSize="10px",rt.appendChild(dt)}}}else if(c.current){let rt=document.getElementById("note-editor");rt&&rt.hasChildNodes()&&(rt.removeChild(rt.firstChild),rt.removeAttribute("class"),rt.removeAttribute("style")),c.current.off("text-change",()=>{})}return()=>{c.current&&c.current.off("text-change",()=>{})}},[x,E,r]),Et.useEffect(()=>{if(!r){const rt=document.getElementById("note-editor");rt&&(rt.style.display="none")}},[r]),Vt.jsx(ni,{...e,ref:t,isText:!0,onDoubleClick:xt,isTextEditMode:r,children:Vt.jsxs(le.Container,{ref:o,children:[r&&Vt.jsx(le.Container,{ref:f}),Vt.jsx(le.Container,{alpha:r?0:1,ref:h,children:Vt.jsx(le.Text,{style:yt,x,y:E,anchor:.5,text:y,...!r&&!b&&{interactive:!0,buttonMode:!0,pointerdown:At},ref:u,filters:[G,X,Y,W,...et>0?[$]:[]]})})]})})}),bN={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,isStalled:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,timeDiff:0},Sv=Et.forwardRef((e,t)=>{const[,r]=Et.useState(!1),[n,i]=Et.useState(),o=mt.useRef(null),a=mt.useRef(null),u=mt.useRef(null),f=mt.useRef(bN),h=mt.useRef(),{tl:d,dragModeRef:p}=mt.useContext(An),{uniqueId:c,mute:v=!1,src:y,startAt:b,endAt:_,frameStartAt:m,frameEndAt:w,transformation:{x:T,y:x,width:E,height:I,animation:A,colorCorrection:O={}},pointerdown:L}=e,{blurRadius:R=0}=O,{temperatureFilter:C,sharpnessFilter:P,hueFilter:M,blurFilter:F,adjustmentFilter:q}=ys(O),Z=y||"",z=Et.useMemo(()=>{const G=document.createElement("video");return G.src=y,G.crossOrigin="Anonymus",G.autoplay=!1,G.currentTime=m===0?.001:m,G},[y,m]);Ze(Oe.PAUSE,()=>{if(u.current){const G=u.current;G.currentTime>0&&!G.paused&&!G.ended&&G.readyState>G.HAVE_CURRENT_DATA&&u.current.pause(),f.current.isPlaying=!1}});const nt=Et.useCallback(Bu(()=>{if(u.current){const G=u.current;G.currentTime>0&&!G.paused&&!G.ended&&G.readyState>G.HAVE_CURRENT_DATA&&u.current.pause(),f.current.isPlaying=!1}},400),[u]);Et.useEffect(()=>{u.current?(p.current?(nt(),f.current.isPlaying=!1,f.current.isDragging=!0):f.current.isDragging=!1,u.current.muted=v):f.current.isDragging=!1},[v,p,nt,u]);const V=G=>{if(u.current){if(u.current.currentTime=Number(G),!p.current){const X=u.current,Y=X.currentTime>0&&!X.paused&&!X.ended&&X.readyState>X.HAVE_CURRENT_DATA;u.current.currentTime=Number(G),d.current&&d.current.isActive()&&h.current&&h.current.isActive()&&(Y||u.current.play(),f.current.isPlaying=!0)}f.current.progress=0}},U=()=>{if(u.current){const G=u.current;G.currentTime>0&&!G.paused&&!G.ended&&G.readyState>G.HAVE_CURRENT_DATA&&u.current.pause(),f.current.isPlaying=!1,h.current&&(f.current.progress=h.current.progress())}},k=()=>{},j=()=>{var G,X;if(h.current&&(f.current.progress=h.current.progress()),u.current&&h.current){const Y=m+((G=h==null?void 0:h.current)==null?void 0:G.time()),$=Math.abs(u.current.currentTime-Y),W=u.current,et=W.currentTime>0&&!W.paused&&!W.ended&&W.readyState>W.HAVE_CURRENT_DATA;p.current?(u.current.currentTime=Y,setTimeout(()=>{u.current&&u.current.play().then(()=>{f.current.isPlaying=!1,u.current&&u.current.pause()})},100),f.current.isPlaying=!1):!f.current.isPlaying&&f.current.progress>.01&&f.current.progress<.99?(X=d.current)!=null&&X.isActive()&&h.current&&h.current.isActive()&&(et||u.current.play(),f.current.isPlaying=!0):$>.3&&f.current.progress>.01&&f.current.progress<.99}};return mt.useEffect(()=>{let G=_e.context(()=>{});if(a.current&&d.current){const X={duration:Number(w)-Number(m),onStart:V,onComplete:U,onStartParams:[m,w],onCompleteParams:[],onInterrupt:k,onUpdate:j,onUpdateParams:[m,w]};G=_e.context(()=>{h.current=_e.from(a.current,X,m),d.current.add(h.current,b)})}return()=>{h.current&&(h.current.kill(),_e.killTweensOf(h.current)),G.revert()}},[A,b,_,m,w]),Et.useEffect(()=>{a.current&&r(!0)},[]),Et.useEffect(()=>{u.current&&(u.current.muted=v)},[v]),Et.useEffect(()=>{const G=Math.round((Number(m)+Number.EPSILON)*100)/100,X=function(){u.current&&(u.current.currentTime=G)},Y=function(){if(u.current){const pt=u.current;pt.currentTime>0&&!pt.paused&&!pt.ended&&pt.readyState>pt.HAVE_CURRENT_DATA&&u.current.pause()}f.current.isWaiting=!1,f.current.isStalled=!1},$=function(){u.current&&u.current.pause(),f.current.isWaiting=!0,f.current.isStalled=!1},W=function(){f.current.isWaiting=!1,f.current.isStalled=!1},et=function(){f.current.isWaiting=!1,f.current.isStalled=!0},J=Math.round((Number(m)+Number.EPSILON)*100)/100,it=Math.round((Number(w)+Number.EPSILON)*100)/100,lt=`${Z}#t=${J},${it}`;return zr.Texture.fromLoader(z,lt,c,{pixiIdPrefix:c,resourceOptions:{autoPlay:!1,crossorigin:"Anonymus",updateFPS:30}}).then(pt=>{pt&&(i(pt),u.current=pt.baseTexture.resource.source,u.current.id=c,u.current.addEventListener("loadedmetadata",X),u.current.addEventListener("ended",Y),u.current.addEventListener("loadstart",$),u.current.addEventListener("canplaythrough",W),u.current.addEventListener("stalled",et))}),()=>{u.current&&(u.current.pause(),u.current.removeEventListener("loadedmetadata",X),u.current.removeEventListener("ended",Y),u.current.removeEventListener("loadstart",$),u.current.removeEventListener("canplaythrough",W),u.current.removeEventListener("stalled",et))}},[Z,c,m,w,z]),Vt.jsx(ni,{...e,ref:t,ignoreTlForVideo:!0,children:Vt.jsx(le.Container,{ref:a,children:n&&Vt.jsx(le.Sprite,{texture:n,width:E,height:I,anchor:.5,x:T,y:x,ref:o,pointerdown:L,filters:[C,P,M,q,...R>0?[F]:[]]})})})});Sv.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiVideoSprite"};const xN=e=>{const{startAt:t,endAt:r}=e,[n,i]=Et.useState(!1),o=mt.useRef(null),a=mt.useRef(null),u=mt.useRef(null),f=mt.useRef(null),h=mt.useRef(null),{tl:d,totalDuration:p=0,reverseModeRef:c}=mt.useContext(An),v=()=>{i(!0)},y=()=>{i(!1)},b=()=>{if(c.current&&f.current&&d.current){const m=d.current.time();m>t&&m<r&&(i(()=>!0),a.current&&(a.current.alpha=1))}},_=m=>{m<.2?i(!0):i(!1)};return Et.useEffect(()=>{const m={onStart:v,onStartParams:[{alpha:1}]},w={onComplete:y,onCompleteParams:[{alpha:t>0?0:1}]},T=Math.max(0,t-1),x=_e.context(()=>{if(o.current&&d.current){const E=_e.from(o.current,{alpha:t<.2?1:0,duration:.5,...m});d.current.add(E,T),d.current.to(o.current,{alpha:0,duration:.5,overwrite:"auto",...w},r-.5),t<.2&&i(!0),f.current=_e.to(u.current,{alpha:1,overwrite:"auto",duration:Number(r)-Number(t),onUpdate:b},t),d.current.add(f.current,t),p>.2&&d.current.call(_,[t],p-.3)}});return()=>{var E;(E=f.current)==null||E.kill(),x.revert()}},[t,r,p]),Et.useEffect(()=>{const m=_e.context(()=>{a.current&&d.current&&(h.current&&h.current.kill(),h.current=_e.to(a.current,{alpha:1,duration:.5,overwrite:"auto"}),d.current.add(h.current,t))});return()=>{h.current&&h.current.kill(),m.revert()}},[n,t]),Vt.jsx(le.Container,{ref:o,alpha:1,children:Vt.jsx(le.Container,{ref:u,children:n&&Vt.jsx(le.Container,{ref:a,alpha:t<.2?1:0,children:e.children})})})},wN=e=>{const{startAt:t,endAt:r}=e,{setTotalDuration:n}=mt.useContext(An);return Et.useEffect(()=>{n&&n(r)},[t,r]),e.children};var Av=(e=>(e.FADE_IN="FADE_IN",e.FADE_OUT="FADE_OUT",e.FADE_IN_OUT="FADE_IN_OUT",e.SLIDE_IN_LEFT="SLIDE_IN_LEFT",e.SLIDE_IN_RIGHT="SLIDE_IN_RIGHT",e.SLIDE_IN_TOP="SLIDE_IN_TOP",e.SLIDE_IN_BOTTOM="SLIDE_IN_BOTTOM",e.SLIDE_OUT_LEFT="SLIDE_OUT_LEFT",e.SLIDE_OUT_RIGHT="SLIDE_OUT_RIGHT",e.SLIDE_OUT_TOP="SLIDE_OUT_TOP",e.SLIDE_OUT_BOTTOM="SLIDE_OUT_BOTTOM",e.ZOOM_IN="ZOOM_IN",e.ZOOM_OUT="ZOOM_OUT",e.ZOOM_IN_OUT="ZOOM_IN_OUT",e.BOUNCE_IN="BOUNCE_IN",e.BOUNCE_OUT="BOUNCE_OUT",e.BOUNCE_IN_OUT="BOUNCE_IN_OUT",e.ELASTIC_IN="ELASTIC_IN",e.ELASTIC_OUT="ELASTIC_OUT",e.ELASTIC_IN_OUT="ELASTIC_IN_OUT",e.BACK_IN="BACK_IN",e.BACK_OUT="BACK_OUT",e.BACK_IN_OUT="BACK_IN_OUT",e.CIRCULAR_IN="CIRCULAR_IN",e.CIRCULAR_OUT="CIRCULAR_OUT",e.CIRCULAR_IN_OUT="CIRCULAR_IN_OUT",e.EXPO_IN="EXPO_IN",e.EXPO_OUT="EXPO_OUT",e.EXPO_IN_OUT="EXPO_IN_OUT",e.SINE_IN="SINE_IN",e.SINE_OUT="SINE_OUT",e.SINE_IN_OUT="SINE_IN_OUT",e.BOUNCE="BOUNCE",e.ELASTIC="ELASTIC",e.BACK="BACK",e.CIRCULAR="CIRCULAR",e.EXPO="EXPO",e.SINE="SINE",e))(Av||{}),Ov=(e=>(e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e))(Ov||{});re.Animations=Av,re.BlendModes=Ov,re.Events=Oe,re.GsapPixieContext=An,re.GsapPixieContextProvider=my,re.PixiAnimatedSprite=xv,re.PixiAudioSprite=LS,re.PixiGifSprite=Tv,re.PixiImageSprite=gp,re.PixiSequence=xN,re.PixiSequenceWrapper=wN,re.PixiSvgPathSprite=oS,re.PixiTextSprite=_N,re.PixiVideoSprite=Sv,re.emitCustomEvent=ti,re.newCustomEventEmitter=gy,re.useCustomEventListener=Ze,Object.defineProperty(re,Symbol.toStringTag,{value:"Module"})});
1985
+ `);return D.insert(j,k.attributes)}return D.push(k)},new h.default)}n.default=Z},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Range=void 0;var o=function(){function A(L,R){var C=[],P=!0,M=!1,F=void 0;try{for(var q=L[Symbol.iterator](),Z;!(P=(Z=q.next()).done)&&(C.push(Z.value),!(R&&C.length===R));P=!0);}catch(z){M=!0,F=z}finally{try{!P&&q.return&&q.return()}finally{if(M)throw F}}return C}return function(L,R){if(Array.isArray(L))return L;if(Symbol.iterator in Object(L))return A(L,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function A(L,R){for(var C=0;C<R.length;C++){var P=R[C];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(L,P.key,P)}}return function(L,R,C){return R&&A(L.prototype,R),C&&A(L,C),L}}(),u=i(0),f=m(u),h=i(21),d=m(h),p=i(11),c=m(p),v=i(8),y=m(v),_=i(10),b=m(_);function m(A){return A&&A.__esModule?A:{default:A}}function w(A){if(Array.isArray(A)){for(var L=0,R=Array(A.length);L<A.length;L++)R[L]=A[L];return R}else return Array.from(A)}function T(A,L){if(!(A instanceof L))throw new TypeError("Cannot call a class as a function")}var x=(0,b.default)("quill:selection"),E=function A(L){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;T(this,A),this.index=L,this.length=R},I=function(){function A(L,R){var C=this;T(this,A),this.emitter=R,this.scroll=L,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=f.default.create("cursor",this),this.lastRange=this.savedRange=new E(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){C.mouseDown||setTimeout(C.update.bind(C,y.default.sources.USER),1)}),this.emitter.on(y.default.events.EDITOR_CHANGE,function(P,M){P===y.default.events.TEXT_CHANGE&&M.length()>0&&C.update(y.default.sources.SILENT)}),this.emitter.on(y.default.events.SCROLL_BEFORE_UPDATE,function(){if(C.hasFocus()){var P=C.getNativeRange();P!=null&&P.start.node!==C.cursor.textNode&&C.emitter.once(y.default.events.SCROLL_UPDATE,function(){try{C.setNativeRange(P.start.node,P.start.offset,P.end.node,P.end.offset)}catch{}})}}),this.emitter.on(y.default.events.SCROLL_OPTIMIZE,function(P,M){if(M.range){var F=M.range,q=F.startNode,Z=F.startOffset,z=F.endNode,nt=F.endOffset;C.setNativeRange(q,Z,z,nt)}}),this.update(y.default.sources.SILENT)}return a(A,[{key:"handleComposition",value:function(){var R=this;this.root.addEventListener("compositionstart",function(){R.composing=!0}),this.root.addEventListener("compositionend",function(){if(R.composing=!1,R.cursor.parent){var C=R.cursor.restore();if(!C)return;setTimeout(function(){R.setNativeRange(C.startNode,C.startOffset,C.endNode,C.endOffset)},1)}})}},{key:"handleDragging",value:function(){var R=this;this.emitter.listenDOM("mousedown",document.body,function(){R.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){R.mouseDown=!1,R.update(y.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(R,C){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[R])){this.scroll.update();var P=this.getNativeRange();if(!(P==null||!P.native.collapsed||f.default.query(R,f.default.Scope.BLOCK))){if(P.start.node!==this.cursor.textNode){var M=f.default.find(P.start.node,!1);if(M==null)return;if(M instanceof f.default.Leaf){var F=M.split(P.start.offset);M.parent.insertBefore(this.cursor,F)}else M.insertBefore(this.cursor,P.start.node);this.cursor.attach()}this.cursor.format(R,C),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(R){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,P=this.scroll.length();R=Math.min(R,P-1),C=Math.min(R+C,P-1)-R;var M=void 0,F=this.scroll.leaf(R),q=o(F,2),Z=q[0],z=q[1];if(Z==null)return null;var nt=Z.position(z,!0),V=o(nt,2);M=V[0],z=V[1];var D=document.createRange();if(C>0){D.setStart(M,z);var k=this.scroll.leaf(R+C),G=o(k,2);if(Z=G[0],z=G[1],Z==null)return null;var j=Z.position(z,!0),Q=o(j,2);return M=Q[0],z=Q[1],D.setEnd(M,z),D.getBoundingClientRect()}else{var K="left",$=void 0;return M instanceof Text?(z<M.data.length?(D.setStart(M,z),D.setEnd(M,z+1)):(D.setStart(M,z-1),D.setEnd(M,z),K="right"),$=D.getBoundingClientRect()):($=Z.domNode.getBoundingClientRect(),z>0&&(K="right")),{bottom:$.top+$.height,height:$.height,left:$[K],right:$[K],top:$.top,width:0}}}},{key:"getNativeRange",value:function(){var R=document.getSelection();if(R==null||R.rangeCount<=0)return null;var C=R.getRangeAt(0);if(C==null)return null;var P=this.normalizeNative(C);return x.info("getNativeRange",P),P}},{key:"getRange",value:function(){var R=this.getNativeRange();if(R==null)return[null,null];var C=this.normalizedToRange(R);return[C,R]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(R){var C=this,P=[[R.start.node,R.start.offset]];R.native.collapsed||P.push([R.end.node,R.end.offset]);var M=P.map(function(Z){var z=o(Z,2),nt=z[0],V=z[1],D=f.default.find(nt,!0),k=D.offset(C.scroll);return V===0?k:D instanceof f.default.Container?k+D.length():k+D.index(nt,V)}),F=Math.min(Math.max.apply(Math,w(M)),this.scroll.length()-1),q=Math.min.apply(Math,[F].concat(w(M)));return new E(q,F-q)}},{key:"normalizeNative",value:function(R){if(!O(this.root,R.startContainer)||!R.collapsed&&!O(this.root,R.endContainer))return null;var C={start:{node:R.startContainer,offset:R.startOffset},end:{node:R.endContainer,offset:R.endOffset},native:R};return[C.start,C.end].forEach(function(P){for(var M=P.node,F=P.offset;!(M instanceof Text)&&M.childNodes.length>0;)if(M.childNodes.length>F)M=M.childNodes[F],F=0;else if(M.childNodes.length===F)M=M.lastChild,F=M instanceof Text?M.data.length:M.childNodes.length+1;else break;P.node=M,P.offset=F}),C}},{key:"rangeToNative",value:function(R){var C=this,P=R.collapsed?[R.index]:[R.index,R.index+R.length],M=[],F=this.scroll.length();return P.forEach(function(q,Z){q=Math.min(F-1,q);var z=void 0,nt=C.scroll.leaf(q),V=o(nt,2),D=V[0],k=V[1],G=D.position(k,Z!==0),j=o(G,2);z=j[0],k=j[1],M.push(z,k)}),M.length<2&&(M=M.concat(M)),M}},{key:"scrollIntoView",value:function(R){var C=this.lastRange;if(C!=null){var P=this.getBounds(C.index,C.length);if(P!=null){var M=this.scroll.length()-1,F=this.scroll.line(Math.min(C.index,M)),q=o(F,1),Z=q[0],z=Z;if(C.length>0){var nt=this.scroll.line(Math.min(C.index+C.length,M)),V=o(nt,1);z=V[0]}if(!(Z==null||z==null)){var D=R.getBoundingClientRect();P.top<D.top?R.scrollTop-=D.top-P.top:P.bottom>D.bottom&&(R.scrollTop+=P.bottom-D.bottom)}}}}},{key:"setNativeRange",value:function(R,C){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:R,M=arguments.length>3&&arguments[3]!==void 0?arguments[3]:C,F=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(x.info("setNativeRange",R,C,P,M),!(R!=null&&(this.root.parentNode==null||R.parentNode==null||P.parentNode==null))){var q=document.getSelection();if(q!=null)if(R!=null){this.hasFocus()||this.root.focus();var Z=(this.getNativeRange()||{}).native;if(Z==null||F||R!==Z.startContainer||C!==Z.startOffset||P!==Z.endContainer||M!==Z.endOffset){R.tagName=="BR"&&(C=[].indexOf.call(R.parentNode.childNodes,R),R=R.parentNode),P.tagName=="BR"&&(M=[].indexOf.call(P.parentNode.childNodes,P),P=P.parentNode);var z=document.createRange();z.setStart(R,C),z.setEnd(P,M),q.removeAllRanges(),q.addRange(z)}}else q.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(R){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:y.default.sources.API;if(typeof C=="string"&&(P=C,C=!1),x.info("setRange",R),R!=null){var M=this.rangeToNative(R);this.setNativeRange.apply(this,w(M).concat([C]))}else this.setNativeRange(null);this.update(P)}},{key:"update",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:y.default.sources.USER,C=this.lastRange,P=this.getRange(),M=o(P,2),F=M[0],q=M[1];if(this.lastRange=F,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,c.default)(C,this.lastRange)){var Z;!this.composing&&q!=null&&q.native.collapsed&&q.start.node!==this.cursor.textNode&&this.cursor.restore();var z=[y.default.events.SELECTION_CHANGE,(0,d.default)(this.lastRange),(0,d.default)(C),R];if((Z=this.emitter).emit.apply(Z,[y.default.events.EDITOR_CHANGE].concat(z)),R!==y.default.sources.SILENT){var nt;(nt=this.emitter).emit.apply(nt,z)}}}}]),A}();function O(A,L){try{L.parentNode}catch{return!1}return L instanceof Text&&(L=L.parentNode),A.contains(L)}n.Range=E,n.default=I},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function y(_,b){for(var m=0;m<b.length;m++){var w=b[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(_,w.key,w)}}return function(_,b,m){return b&&y(_.prototype,b),m&&y(_,m),_}}(),a=function y(_,b,m){_===null&&(_=Function.prototype);var w=Object.getOwnPropertyDescriptor(_,b);if(w===void 0){var T=Object.getPrototypeOf(_);return T===null?void 0:y(T,b,m)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(m)}},u=i(0),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function d(y,_){if(!(y instanceof _))throw new TypeError("Cannot call a class as a function")}function p(y,_){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:y}function c(y,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);y.prototype=Object.create(_&&_.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(y,_):y.__proto__=_)}var v=function(y){c(_,y);function _(){return d(this,_),p(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return o(_,[{key:"insertInto",value:function(m,w){m.children.length===0?a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"insertInto",this).call(this,m,w):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),_}(f.default.Embed);v.blotName="break",v.tagName="BR",n.default=v},function(r,n,i){var o=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var y in v)v.hasOwnProperty(y)&&(c[y]=v[y])};return function(c,v){p(c,v);function y(){this.constructor=c}c.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(44),u=i(30),f=i(1),h=function(p){o(c,p);function c(v){var y=p.call(this,v)||this;return y.build(),y}return c.prototype.appendChild=function(v){this.insertBefore(v)},c.prototype.attach=function(){p.prototype.attach.call(this),this.children.forEach(function(v){v.attach()})},c.prototype.build=function(){var v=this;this.children=new a.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(y){try{var _=d(y);v.insertBefore(_,v.children.head||void 0)}catch(b){if(b instanceof f.ParchmentError)return;throw b}})},c.prototype.deleteAt=function(v,y){if(v===0&&y===this.length())return this.remove();this.children.forEachAt(v,y,function(_,b,m){_.deleteAt(b,m)})},c.prototype.descendant=function(v,y){var _=this.children.find(y),b=_[0],m=_[1];return v.blotName==null&&v(b)||v.blotName!=null&&b instanceof v?[b,m]:b instanceof c?b.descendant(v,m):[null,-1]},c.prototype.descendants=function(v,y,_){y===void 0&&(y=0),_===void 0&&(_=Number.MAX_VALUE);var b=[],m=_;return this.children.forEachAt(y,_,function(w,T,x){(v.blotName==null&&v(w)||v.blotName!=null&&w instanceof v)&&b.push(w),w instanceof c&&(b=b.concat(w.descendants(v,T,m))),m-=x}),b},c.prototype.detach=function(){this.children.forEach(function(v){v.detach()}),p.prototype.detach.call(this)},c.prototype.formatAt=function(v,y,_,b){this.children.forEachAt(v,y,function(m,w,T){m.formatAt(w,T,_,b)})},c.prototype.insertAt=function(v,y,_){var b=this.children.find(v),m=b[0],w=b[1];if(m)m.insertAt(w,y,_);else{var T=_==null?f.create("text",y):f.create(y,_);this.appendChild(T)}},c.prototype.insertBefore=function(v,y){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(_){return v instanceof _}))throw new f.ParchmentError("Cannot insert "+v.statics.blotName+" into "+this.statics.blotName);v.insertInto(this,y)},c.prototype.length=function(){return this.children.reduce(function(v,y){return v+y.length()},0)},c.prototype.moveChildren=function(v,y){this.children.forEach(function(_){v.insertBefore(_,y)})},c.prototype.optimize=function(v){if(p.prototype.optimize.call(this,v),this.children.length===0)if(this.statics.defaultChild!=null){var y=f.create(this.statics.defaultChild);this.appendChild(y),y.optimize(v)}else this.remove()},c.prototype.path=function(v,y){y===void 0&&(y=!1);var _=this.children.find(v,y),b=_[0],m=_[1],w=[[this,v]];return b instanceof c?w.concat(b.path(m,y)):(b!=null&&w.push([b,m]),w)},c.prototype.removeChild=function(v){this.children.remove(v)},c.prototype.replace=function(v){v instanceof c&&v.moveChildren(this),p.prototype.replace.call(this,v)},c.prototype.split=function(v,y){if(y===void 0&&(y=!1),!y){if(v===0)return this;if(v===this.length())return this.next}var _=this.clone();return this.parent.insertBefore(_,this.next),this.children.forEachAt(v,this.length(),function(b,m,w){b=b.split(m,y),_.appendChild(b)}),_},c.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},c.prototype.update=function(v,y){var _=this,b=[],m=[];v.forEach(function(w){w.target===_.domNode&&w.type==="childList"&&(b.push.apply(b,w.addedNodes),m.push.apply(m,w.removedNodes))}),m.forEach(function(w){if(!(w.parentNode!=null&&w.tagName!=="IFRAME"&&document.body.compareDocumentPosition(w)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var T=f.find(w);T!=null&&(T.domNode.parentNode==null||T.domNode.parentNode===_.domNode)&&T.detach()}}),b.filter(function(w){return w.parentNode==_.domNode}).sort(function(w,T){return w===T?0:w.compareDocumentPosition(T)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(w){var T=null;w.nextSibling!=null&&(T=f.find(w.nextSibling));var x=d(w);(x.next!=T||x.next==null)&&(x.parent!=null&&x.parent.removeChild(_),_.insertBefore(x,T||void 0))})},c}(u.default);function d(p){var c=f.find(p);if(c==null)try{c=f.create(p)}catch{c=f.create(f.Scope.INLINE),[].slice.call(p.childNodes).forEach(function(y){c.domNode.appendChild(y)}),p.parentNode&&p.parentNode.replaceChild(c.domNode,p),c.attach()}return c}n.default=h},function(r,n,i){var o=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var y in v)v.hasOwnProperty(y)&&(c[y]=v[y])};return function(c,v){p(c,v);function y(){this.constructor=c}c.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(12),u=i(31),f=i(17),h=i(1),d=function(p){o(c,p);function c(v){var y=p.call(this,v)||this;return y.attributes=new u.default(y.domNode),y}return c.formats=function(v){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return v.tagName.toLowerCase()},c.prototype.format=function(v,y){var _=h.query(v);_ instanceof a.default?this.attributes.attribute(_,y):y&&_!=null&&(v!==this.statics.blotName||this.formats()[v]!==y)&&this.replaceWith(v,y)},c.prototype.formats=function(){var v=this.attributes.values(),y=this.statics.formats(this.domNode);return y!=null&&(v[this.statics.blotName]=y),v},c.prototype.replaceWith=function(v,y){var _=p.prototype.replaceWith.call(this,v,y);return this.attributes.copy(_),_},c.prototype.update=function(v,y){var _=this;p.prototype.update.call(this,v,y),v.some(function(b){return b.target===_.domNode&&b.type==="attributes"})&&this.attributes.build()},c.prototype.wrap=function(v,y){var _=p.prototype.wrap.call(this,v,y);return _ instanceof c&&_.statics.scope===this.statics.scope&&this.attributes.move(_),_},c}(f.default);n.default=d},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var c in p)p.hasOwnProperty(c)&&(d[c]=p[c])};return function(d,p){h(d,p);function c(){this.constructor=d}d.prototype=p===null?Object.create(p):(c.prototype=p.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(30),u=i(1),f=function(h){o(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.value=function(p){return!0},d.prototype.index=function(p,c){return this.domNode===p||this.domNode.compareDocumentPosition(p)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(c,1):-1},d.prototype.position=function(p,c){var v=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return p>0&&(v+=1),[this.parent.domNode,v]},d.prototype.value=function(){var p;return p={},p[this.statics.blotName]=this.statics.value(this.domNode)||!0,p},d.scope=u.Scope.INLINE_BLOT,d}(a.default);n.default=f},function(r,n,i){var o=i(11),a=i(3),u={attributes:{compose:function(h,d,p){typeof h!="object"&&(h={}),typeof d!="object"&&(d={});var c=a(!0,{},d);p||(c=Object.keys(c).reduce(function(y,_){return c[_]!=null&&(y[_]=c[_]),y},{}));for(var v in h)h[v]!==void 0&&d[v]===void 0&&(c[v]=h[v]);return Object.keys(c).length>0?c:void 0},diff:function(h,d){typeof h!="object"&&(h={}),typeof d!="object"&&(d={});var p=Object.keys(h).concat(Object.keys(d)).reduce(function(c,v){return o(h[v],d[v])||(c[v]=d[v]===void 0?null:d[v]),c},{});return Object.keys(p).length>0?p:void 0},transform:function(h,d,p){if(typeof h!="object")return d;if(typeof d=="object"){if(!p)return d;var c=Object.keys(d).reduce(function(v,y){return h[y]===void 0&&(v[y]=d[y]),v},{});return Object.keys(c).length>0?c:void 0}}},iterator:function(h){return new f(h)},length:function(h){return typeof h.delete=="number"?h.delete:typeof h.retain=="number"?h.retain:typeof h.insert=="string"?h.insert.length:1}};function f(h){this.ops=h,this.index=0,this.offset=0}f.prototype.hasNext=function(){return this.peekLength()<1/0},f.prototype.next=function(h){h||(h=1/0);var d=this.ops[this.index];if(d){var p=this.offset,c=u.length(d);if(h>=c-p?(h=c-p,this.index+=1,this.offset=0):this.offset+=h,typeof d.delete=="number")return{delete:h};var v={};return d.attributes&&(v.attributes=d.attributes),typeof d.retain=="number"?v.retain=h:typeof d.insert=="string"?v.insert=d.insert.substr(p,h):v.insert=d.insert,v}else return{retain:1/0}},f.prototype.peek=function(){return this.ops[this.index]},f.prototype.peekLength=function(){return this.ops[this.index]?u.length(this.ops[this.index])-this.offset:1/0},f.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},f.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var h=this.offset,d=this.index,p=this.next(),c=this.ops.slice(this.index);return this.offset=h,this.index=d,[p].concat(c)}else return[]},r.exports=u},function(r,n){var i=function(){function o(_,b){return b!=null&&_ instanceof b}var a;try{a=Map}catch{a=function(){}}var u;try{u=Set}catch{u=function(){}}var f;try{f=Promise}catch{f=function(){}}function h(_,b,m,w,T){typeof b=="object"&&(m=b.depth,w=b.prototype,T=b.includeNonEnumerable,b=b.circular);var x=[],E=[],I=typeof Buffer<"u";typeof b>"u"&&(b=!0),typeof m>"u"&&(m=1/0);function O(A,L){if(A===null)return null;if(L===0)return A;var R,C;if(typeof A!="object")return A;if(o(A,a))R=new a;else if(o(A,u))R=new u;else if(o(A,f))R=new f(function(D,k){A.then(function(G){D(O(G,L-1))},function(G){k(O(G,L-1))})});else if(h.__isArray(A))R=[];else if(h.__isRegExp(A))R=new RegExp(A.source,y(A)),A.lastIndex&&(R.lastIndex=A.lastIndex);else if(h.__isDate(A))R=new Date(A.getTime());else{if(I&&Buffer.isBuffer(A))return Buffer.allocUnsafe?R=Buffer.allocUnsafe(A.length):R=new Buffer(A.length),A.copy(R),R;o(A,Error)?R=Object.create(A):typeof w>"u"?(C=Object.getPrototypeOf(A),R=Object.create(C)):(R=Object.create(w),C=w)}if(b){var P=x.indexOf(A);if(P!=-1)return E[P];x.push(A),E.push(R)}o(A,a)&&A.forEach(function(D,k){var G=O(k,L-1),j=O(D,L-1);R.set(G,j)}),o(A,u)&&A.forEach(function(D){var k=O(D,L-1);R.add(k)});for(var M in A){var F;C&&(F=Object.getOwnPropertyDescriptor(C,M)),!(F&&F.set==null)&&(R[M]=O(A[M],L-1))}if(Object.getOwnPropertySymbols)for(var q=Object.getOwnPropertySymbols(A),M=0;M<q.length;M++){var Z=q[M],z=Object.getOwnPropertyDescriptor(A,Z);z&&!z.enumerable&&!T||(R[Z]=O(A[Z],L-1),z.enumerable||Object.defineProperty(R,Z,{enumerable:!1}))}if(T)for(var nt=Object.getOwnPropertyNames(A),M=0;M<nt.length;M++){var V=nt[M],z=Object.getOwnPropertyDescriptor(A,V);z&&z.enumerable||(R[V]=O(A[V],L-1),Object.defineProperty(R,V,{enumerable:!1}))}return R}return O(_,m)}h.clonePrototype=function(b){if(b===null)return null;var m=function(){};return m.prototype=b,new m};function d(_){return Object.prototype.toString.call(_)}h.__objToStr=d;function p(_){return typeof _=="object"&&d(_)==="[object Date]"}h.__isDate=p;function c(_){return typeof _=="object"&&d(_)==="[object Array]"}h.__isArray=c;function v(_){return typeof _=="object"&&d(_)==="[object RegExp]"}h.__isRegExp=v;function y(_){var b="";return _.global&&(b+="g"),_.ignoreCase&&(b+="i"),_.multiline&&(b+="m"),b}return h.__getRegExpFlags=y,h}();typeof r=="object"&&r.exports&&(r.exports=i)},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function R(C,P){var M=[],F=!0,q=!1,Z=void 0;try{for(var z=C[Symbol.iterator](),nt;!(F=(nt=z.next()).done)&&(M.push(nt.value),!(P&&M.length===P));F=!0);}catch(V){q=!0,Z=V}finally{try{!F&&z.return&&z.return()}finally{if(q)throw Z}}return M}return function(C,P){if(Array.isArray(C))return C;if(Symbol.iterator in Object(C))return R(C,P);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function R(C,P){for(var M=0;M<P.length;M++){var F=P[M];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(C,F.key,F)}}return function(C,P,M){return P&&R(C.prototype,P),M&&R(C,M),C}}(),u=function R(C,P,M){C===null&&(C=Function.prototype);var F=Object.getOwnPropertyDescriptor(C,P);if(F===void 0){var q=Object.getPrototypeOf(C);return q===null?void 0:R(q,P,M)}else{if("value"in F)return F.value;var Z=F.get;return Z===void 0?void 0:Z.call(M)}},f=i(0),h=x(f),d=i(8),p=x(d),c=i(4),v=x(c),y=i(16),_=x(y),b=i(13),m=x(b),w=i(25),T=x(w);function x(R){return R&&R.__esModule?R:{default:R}}function E(R,C){if(!(R instanceof C))throw new TypeError("Cannot call a class as a function")}function I(R,C){if(!R)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:R}function O(R,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);R.prototype=Object.create(C&&C.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(R,C):R.__proto__=C)}function A(R){return R instanceof v.default||R instanceof c.BlockEmbed}var L=function(R){O(C,R);function C(P,M){E(this,C);var F=I(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,P));return F.emitter=M.emitter,Array.isArray(M.whitelist)&&(F.whitelist=M.whitelist.reduce(function(q,Z){return q[Z]=!0,q},{})),F.domNode.addEventListener("DOMNodeInserted",function(){}),F.optimize(),F.enable(),F}return a(C,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(M,F){var q=this.line(M),Z=o(q,2),z=Z[0],nt=Z[1],V=this.line(M+F),D=o(V,1),k=D[0];if(u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"deleteAt",this).call(this,M,F),k!=null&&z!==k&&nt>0){if(z instanceof c.BlockEmbed||k instanceof c.BlockEmbed){this.optimize();return}if(z instanceof m.default){var G=z.newlineIndex(z.length(),!0);if(G>-1&&(z=z.split(G+1),z===k)){this.optimize();return}}else if(k instanceof m.default){var j=k.newlineIndex(0);j>-1&&k.split(j+1)}var Q=k.children.head instanceof _.default?null:k.children.head;z.moveChildren(k,Q),z.remove()}this.optimize()}},{key:"enable",value:function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",M)}},{key:"formatAt",value:function(M,F,q,Z){this.whitelist!=null&&!this.whitelist[q]||(u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"formatAt",this).call(this,M,F,q,Z),this.optimize())}},{key:"insertAt",value:function(M,F,q){if(!(q!=null&&this.whitelist!=null&&!this.whitelist[F])){if(M>=this.length())if(q==null||h.default.query(F,h.default.Scope.BLOCK)==null){var Z=h.default.create(this.statics.defaultChild);this.appendChild(Z),q==null&&F.endsWith(`
1986
+ `)&&(F=F.slice(0,-1)),Z.insertAt(0,F,q)}else{var z=h.default.create(F,q);this.appendChild(z)}else u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"insertAt",this).call(this,M,F,q);this.optimize()}}},{key:"insertBefore",value:function(M,F){if(M.statics.scope===h.default.Scope.INLINE_BLOT){var q=h.default.create(this.statics.defaultChild);q.appendChild(M),M=q}u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"insertBefore",this).call(this,M,F)}},{key:"leaf",value:function(M){return this.path(M).pop()||[null,-1]}},{key:"line",value:function(M){return M===this.length()?this.line(M-1):this.descendant(A,M)}},{key:"lines",value:function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,q=function Z(z,nt,V){var D=[],k=V;return z.children.forEachAt(nt,V,function(G,j,Q){A(G)?D.push(G):G instanceof h.default.Container&&(D=D.concat(Z(G,j,k))),k-=Q}),D};return q(this,M,F)}},{key:"optimize",value:function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"optimize",this).call(this,M,F),M.length>0&&this.emitter.emit(p.default.events.SCROLL_OPTIMIZE,M,F))}},{key:"path",value:function(M){return u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"path",this).call(this,M).slice(1)}},{key:"update",value:function(M){if(this.batch!==!0){var F=p.default.sources.USER;typeof M=="string"&&(F=M),Array.isArray(M)||(M=this.observer.takeRecords()),M.length>0&&this.emitter.emit(p.default.events.SCROLL_BEFORE_UPDATE,F,M),u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"update",this).call(this,M.concat([])),M.length>0&&this.emitter.emit(p.default.events.SCROLL_UPDATE,F,M)}}}]),C}(h.default.Scroll);L.blotName="scroll",L.className="ql-editor",L.tagName="DIV",L.defaultChild="block",L.allowedChildren=[v.default,c.BlockEmbed,T.default],n.default=L},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.SHORTKEY=n.default=void 0;var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},a=function(){function $(W,et){var Y=[],rt=!0,ot=!1,pt=void 0;try{for(var vt=W[Symbol.iterator](),_t;!(rt=(_t=vt.next()).done)&&(Y.push(_t.value),!(et&&Y.length===et));rt=!0);}catch(At){ot=!0,pt=At}finally{try{!rt&&vt.return&&vt.return()}finally{if(ot)throw pt}}return Y}return function(W,et){if(Array.isArray(W))return W;if(Symbol.iterator in Object(W))return $(W,et);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function $(W,et){for(var Y=0;Y<et.length;Y++){var rt=et[Y];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(W,rt.key,rt)}}return function(W,et,Y){return et&&$(W.prototype,et),Y&&$(W,Y),W}}(),f=i(21),h=R(f),d=i(11),p=R(d),c=i(3),v=R(c),y=i(2),_=R(y),b=i(20),m=R(b),w=i(0),T=R(w),x=i(5),E=R(x),I=i(10),O=R(I),A=i(9),L=R(A);function R($){return $&&$.__esModule?$:{default:$}}function C($,W,et){return W in $?Object.defineProperty($,W,{value:et,enumerable:!0,configurable:!0,writable:!0}):$[W]=et,$}function P($,W){if(!($ instanceof W))throw new TypeError("Cannot call a class as a function")}function M($,W){if(!$)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return W&&(typeof W=="object"||typeof W=="function")?W:$}function F($,W){if(typeof W!="function"&&W!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof W);$.prototype=Object.create(W&&W.prototype,{constructor:{value:$,enumerable:!1,writable:!0,configurable:!0}}),W&&(Object.setPrototypeOf?Object.setPrototypeOf($,W):$.__proto__=W)}var q=(0,O.default)("quill:keyboard"),Z=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",z=function($){F(W,$),u(W,null,[{key:"match",value:function(Y,rt){return rt=K(rt),["altKey","ctrlKey","metaKey","shiftKey"].some(function(ot){return!!rt[ot]!==Y[ot]&&rt[ot]!==null})?!1:rt.key===(Y.which||Y.keyCode)}}]);function W(et,Y){P(this,W);var rt=M(this,(W.__proto__||Object.getPrototypeOf(W)).call(this,et,Y));return rt.bindings={},Object.keys(rt.options.bindings).forEach(function(ot){ot==="list autofill"&&et.scroll.whitelist!=null&&!et.scroll.whitelist.list||rt.options.bindings[ot]&&rt.addBinding(rt.options.bindings[ot])}),rt.addBinding({key:W.keys.ENTER,shiftKey:null},G),rt.addBinding({key:W.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(rt.addBinding({key:W.keys.BACKSPACE},{collapsed:!0},V),rt.addBinding({key:W.keys.DELETE},{collapsed:!0},D)):(rt.addBinding({key:W.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},V),rt.addBinding({key:W.keys.DELETE},{collapsed:!0,suffix:/^.?$/},D)),rt.addBinding({key:W.keys.BACKSPACE},{collapsed:!1},k),rt.addBinding({key:W.keys.DELETE},{collapsed:!1},k),rt.addBinding({key:W.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},V),rt.listen(),rt}return u(W,[{key:"addBinding",value:function(Y){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},pt=K(Y);if(pt==null||pt.key==null)return q.warn("Attempted to add invalid keyboard binding",pt);typeof rt=="function"&&(rt={handler:rt}),typeof ot=="function"&&(ot={handler:ot}),pt=(0,v.default)(pt,rt,ot),this.bindings[pt.key]=this.bindings[pt.key]||[],this.bindings[pt.key].push(pt)}},{key:"listen",value:function(){var Y=this;this.quill.root.addEventListener("keydown",function(rt){if(!rt.defaultPrevented){var ot=rt.which||rt.keyCode,pt=(Y.bindings[ot]||[]).filter(function(he){return W.match(rt,he)});if(pt.length!==0){var vt=Y.quill.getSelection();if(!(vt==null||!Y.quill.hasFocus())){var _t=Y.quill.getLine(vt.index),At=a(_t,2),ne=At[0],Ut=At[1],it=Y.quill.getLeaf(vt.index),ut=a(it,2),dt=ut[0],gt=ut[1],at=vt.length===0?[dt,gt]:Y.quill.getLeaf(vt.index+vt.length),It=a(at,2),St=It[0],Mt=It[1],He=dt instanceof T.default.Text?dt.value().slice(0,gt):"",Ge=St instanceof T.default.Text?St.value().slice(Mt):"",Qt={collapsed:vt.length===0,empty:vt.length===0&&ne.length()<=1,format:Y.quill.getFormat(vt),offset:Ut,prefix:He,suffix:Ge},Ss=pt.some(function(he){if(he.collapsed!=null&&he.collapsed!==Qt.collapsed||he.empty!=null&&he.empty!==Qt.empty||he.offset!=null&&he.offset!==Qt.offset)return!1;if(Array.isArray(he.format)){if(he.format.every(function(ur){return Qt.format[ur]==null}))return!1}else if(o(he.format)==="object"&&!Object.keys(he.format).every(function(ur){return he.format[ur]===!0?Qt.format[ur]!=null:he.format[ur]===!1?Qt.format[ur]==null:(0,p.default)(he.format[ur],Qt.format[ur])}))return!1;return he.prefix!=null&&!he.prefix.test(Qt.prefix)||he.suffix!=null&&!he.suffix.test(Qt.suffix)?!1:he.handler.call(Y,vt,Qt)!==!0});Ss&&rt.preventDefault()}}}})}}]),W}(L.default);z.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},z.DEFAULTS={bindings:{bold:Q("bold"),italic:Q("italic"),underline:Q("underline"),indent:{key:z.keys.TAB,format:["blockquote","indent","list"],handler:function(W,et){if(et.collapsed&&et.offset!==0)return!0;this.quill.format("indent","+1",E.default.sources.USER)}},outdent:{key:z.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(W,et){if(et.collapsed&&et.offset!==0)return!0;this.quill.format("indent","-1",E.default.sources.USER)}},"outdent backspace":{key:z.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(W,et){et.format.indent!=null?this.quill.format("indent","-1",E.default.sources.USER):et.format.list!=null&&this.quill.format("list",!1,E.default.sources.USER)}},"indent code-block":j(!0),"outdent code-block":j(!1),"remove tab":{key:z.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(W){this.quill.deleteText(W.index-1,1,E.default.sources.USER)}},tab:{key:z.keys.TAB,handler:function(W){this.quill.history.cutoff();var et=new _.default().retain(W.index).delete(W.length).insert(" ");this.quill.updateContents(et,E.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(W.index+1,E.default.sources.SILENT)}},"list empty enter":{key:z.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(W,et){this.quill.format("list",!1,E.default.sources.USER),et.format.indent&&this.quill.format("indent",!1,E.default.sources.USER)}},"checklist enter":{key:z.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(W){var et=this.quill.getLine(W.index),Y=a(et,2),rt=Y[0],ot=Y[1],pt=(0,v.default)({},rt.formats(),{list:"checked"}),vt=new _.default().retain(W.index).insert(`
1987
+ `,pt).retain(rt.length()-ot-1).retain(1,{list:"unchecked"});this.quill.updateContents(vt,E.default.sources.USER),this.quill.setSelection(W.index+1,E.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:z.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(W,et){var Y=this.quill.getLine(W.index),rt=a(Y,2),ot=rt[0],pt=rt[1],vt=new _.default().retain(W.index).insert(`
1988
+ `,et.format).retain(ot.length()-pt-1).retain(1,{header:null});this.quill.updateContents(vt,E.default.sources.USER),this.quill.setSelection(W.index+1,E.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(W,et){var Y=et.prefix.length,rt=this.quill.getLine(W.index),ot=a(rt,2),pt=ot[0],vt=ot[1];if(vt>Y)return!0;var _t=void 0;switch(et.prefix.trim()){case"[]":case"[ ]":_t="unchecked";break;case"[x]":_t="checked";break;case"-":case"*":_t="bullet";break;default:_t="ordered"}this.quill.insertText(W.index," ",E.default.sources.USER),this.quill.history.cutoff();var At=new _.default().retain(W.index-vt).delete(Y+1).retain(pt.length()-2-vt).retain(1,{list:_t});this.quill.updateContents(At,E.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(W.index-Y,E.default.sources.SILENT)}},"code exit":{key:z.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(W){var et=this.quill.getLine(W.index),Y=a(et,2),rt=Y[0],ot=Y[1],pt=new _.default().retain(W.index+rt.length()-ot-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(pt,E.default.sources.USER)}},"embed left":nt(z.keys.LEFT,!1),"embed left shift":nt(z.keys.LEFT,!0),"embed right":nt(z.keys.RIGHT,!1),"embed right shift":nt(z.keys.RIGHT,!0)}};function nt($,W){var et,Y=$===z.keys.LEFT?"prefix":"suffix";return et={key:$,shiftKey:W,altKey:null},C(et,Y,/^$/),C(et,"handler",function(ot){var pt=ot.index;$===z.keys.RIGHT&&(pt+=ot.length+1);var vt=this.quill.getLeaf(pt),_t=a(vt,1),At=_t[0];return At instanceof T.default.Embed?($===z.keys.LEFT?W?this.quill.setSelection(ot.index-1,ot.length+1,E.default.sources.USER):this.quill.setSelection(ot.index-1,E.default.sources.USER):W?this.quill.setSelection(ot.index,ot.length+1,E.default.sources.USER):this.quill.setSelection(ot.index+ot.length+1,E.default.sources.USER),!1):!0}),et}function V($,W){if(!($.index===0||this.quill.getLength()<=1)){var et=this.quill.getLine($.index),Y=a(et,1),rt=Y[0],ot={};if(W.offset===0){var pt=this.quill.getLine($.index-1),vt=a(pt,1),_t=vt[0];if(_t!=null&&_t.length()>1){var At=rt.formats(),ne=this.quill.getFormat($.index-1,1);ot=m.default.attributes.diff(At,ne)||{}}}var Ut=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(W.prefix)?2:1;this.quill.deleteText($.index-Ut,Ut,E.default.sources.USER),Object.keys(ot).length>0&&this.quill.formatLine($.index-Ut,Ut,ot,E.default.sources.USER),this.quill.focus()}}function D($,W){var et=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(W.suffix)?2:1;if(!($.index>=this.quill.getLength()-et)){var Y={},rt=0,ot=this.quill.getLine($.index),pt=a(ot,1),vt=pt[0];if(W.offset>=vt.length()-1){var _t=this.quill.getLine($.index+1),At=a(_t,1),ne=At[0];if(ne){var Ut=vt.formats(),it=this.quill.getFormat($.index,1);Y=m.default.attributes.diff(Ut,it)||{},rt=ne.length()}}this.quill.deleteText($.index,et,E.default.sources.USER),Object.keys(Y).length>0&&this.quill.formatLine($.index+rt-1,et,Y,E.default.sources.USER)}}function k($){var W=this.quill.getLines($),et={};if(W.length>1){var Y=W[0].formats(),rt=W[W.length-1].formats();et=m.default.attributes.diff(rt,Y)||{}}this.quill.deleteText($,E.default.sources.USER),Object.keys(et).length>0&&this.quill.formatLine($.index,1,et,E.default.sources.USER),this.quill.setSelection($.index,E.default.sources.SILENT),this.quill.focus()}function G($,W){var et=this;$.length>0&&this.quill.scroll.deleteAt($.index,$.length);var Y=Object.keys(W.format).reduce(function(rt,ot){return T.default.query(ot,T.default.Scope.BLOCK)&&!Array.isArray(W.format[ot])&&(rt[ot]=W.format[ot]),rt},{});this.quill.insertText($.index,`
1989
+ `,Y,E.default.sources.USER),this.quill.setSelection($.index+1,E.default.sources.SILENT),this.quill.focus(),Object.keys(W.format).forEach(function(rt){Y[rt]==null&&(Array.isArray(W.format[rt])||rt!=="link"&&et.quill.format(rt,W.format[rt],E.default.sources.USER))})}function j($){return{key:z.keys.TAB,shiftKey:!$,format:{"code-block":!0},handler:function(et){var Y=T.default.query("code-block"),rt=et.index,ot=et.length,pt=this.quill.scroll.descendant(Y,rt),vt=a(pt,2),_t=vt[0],At=vt[1];if(_t!=null){var ne=this.quill.getIndex(_t),Ut=_t.newlineIndex(At,!0)+1,it=_t.newlineIndex(ne+At+ot),ut=_t.domNode.textContent.slice(Ut,it).split(`
1990
+ `);At=0,ut.forEach(function(dt,gt){$?(_t.insertAt(Ut+At,Y.TAB),At+=Y.TAB.length,gt===0?rt+=Y.TAB.length:ot+=Y.TAB.length):dt.startsWith(Y.TAB)&&(_t.deleteAt(Ut+At,Y.TAB.length),At-=Y.TAB.length,gt===0?rt-=Y.TAB.length:ot-=Y.TAB.length),At+=dt.length+1}),this.quill.update(E.default.sources.USER),this.quill.setSelection(rt,ot,E.default.sources.SILENT)}}}}function Q($){return{key:$[0].toUpperCase(),shortKey:!0,handler:function(et,Y){this.quill.format($,!Y.format[$],E.default.sources.USER)}}}function K($){if(typeof $=="string"||typeof $=="number")return K({key:$});if((typeof $>"u"?"undefined":o($))==="object"&&($=(0,h.default)($,!1)),typeof $.key=="string")if(z.keys[$.key.toUpperCase()]!=null)$.key=z.keys[$.key.toUpperCase()];else if($.key.length===1)$.key=$.key.toUpperCase().charCodeAt(0);else return null;return $.shortKey&&($[Z]=$.shortKey,delete $.shortKey),$}n.default=z,n.SHORTKEY=Z},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function m(w,T){var x=[],E=!0,I=!1,O=void 0;try{for(var A=w[Symbol.iterator](),L;!(E=(L=A.next()).done)&&(x.push(L.value),!(T&&x.length===T));E=!0);}catch(R){I=!0,O=R}finally{try{!E&&A.return&&A.return()}finally{if(I)throw O}}return x}return function(w,T){if(Array.isArray(w))return w;if(Symbol.iterator in Object(w))return m(w,T);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function m(w,T,x){w===null&&(w=Function.prototype);var E=Object.getOwnPropertyDescriptor(w,T);if(E===void 0){var I=Object.getPrototypeOf(w);return I===null?void 0:m(I,T,x)}else{if("value"in E)return E.value;var O=E.get;return O===void 0?void 0:O.call(x)}},u=function(){function m(w,T){for(var x=0;x<T.length;x++){var E=T[x];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(w,E.key,E)}}return function(w,T,x){return T&&m(w.prototype,T),x&&m(w,x),w}}(),f=i(0),h=c(f),d=i(7),p=c(d);function c(m){return m&&m.__esModule?m:{default:m}}function v(m,w){if(!(m instanceof w))throw new TypeError("Cannot call a class as a function")}function y(m,w){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:m}function _(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);m.prototype=Object.create(w&&w.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(m,w):m.__proto__=w)}var b=function(m){_(w,m),u(w,null,[{key:"value",value:function(){}}]);function w(T,x){v(this,w);var E=y(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,T));return E.selection=x,E.textNode=document.createTextNode(w.CONTENTS),E.domNode.appendChild(E.textNode),E._length=0,E}return u(w,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(x,E){if(this._length!==0)return a(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"format",this).call(this,x,E);for(var I=this,O=0;I!=null&&I.statics.scope!==h.default.Scope.BLOCK_BLOT;)O+=I.offset(I.parent),I=I.parent;I!=null&&(this._length=w.CONTENTS.length,I.optimize(),I.formatAt(O,w.CONTENTS.length,x,E),this._length=0)}},{key:"index",value:function(x,E){return x===this.textNode?0:a(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"index",this).call(this,x,E)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){a(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var x=this.textNode,E=this.selection.getNativeRange(),I=void 0,O=void 0,A=void 0;if(E!=null&&E.start.node===x&&E.end.node===x){var L=[x,E.start.offset,E.end.offset];I=L[0],O=L[1],A=L[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==w.CONTENTS){var R=this.textNode.data.split(w.CONTENTS).join("");this.next instanceof p.default?(I=this.next.domNode,this.next.insertAt(0,R),this.textNode.data=w.CONTENTS):(this.textNode.data=R,this.parent.insertBefore(h.default.create(this.textNode),this),this.textNode=document.createTextNode(w.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),O!=null){var C=[O,A].map(function(M){return Math.max(0,Math.min(I.data.length,M-1))}),P=o(C,2);return O=P[0],A=P[1],{startNode:I,startOffset:O,endNode:I,endOffset:A}}}}},{key:"update",value:function(x,E){var I=this;if(x.some(function(A){return A.type==="characterData"&&A.target===I.textNode})){var O=this.restore();O&&(E.range=O)}}},{key:"value",value:function(){return""}}]),w}(h.default.Embed);b.blotName="cursor",b.className="ql-cursor",b.tagName="span",b.CONTENTS="\uFEFF",n.default=b},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(0),a=h(o),u=i(4),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function d(y,_){if(!(y instanceof _))throw new TypeError("Cannot call a class as a function")}function p(y,_){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:y}function c(y,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);y.prototype=Object.create(_&&_.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(y,_):y.__proto__=_)}var v=function(y){c(_,y);function _(){return d(this,_),p(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return _}(a.default.Container);v.allowedChildren=[f.default,u.BlockEmbed,v],n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.ColorStyle=n.ColorClass=n.ColorAttributor=void 0;var o=function(){function b(m,w){for(var T=0;T<w.length;T++){var x=w[T];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,w,T){return w&&b(m.prototype,w),T&&b(m,T),m}}(),a=function b(m,w,T){m===null&&(m=Function.prototype);var x=Object.getOwnPropertyDescriptor(m,w);if(x===void 0){var E=Object.getPrototypeOf(m);return E===null?void 0:b(E,w,T)}else{if("value"in x)return x.value;var I=x.get;return I===void 0?void 0:I.call(T)}},u=i(0),f=h(u);function h(b){return b&&b.__esModule?b:{default:b}}function d(b,m){if(!(b instanceof m))throw new TypeError("Cannot call a class as a function")}function p(b,m){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:b}function c(b,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);b.prototype=Object.create(m&&m.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(b,m):b.__proto__=m)}var v=function(b){c(m,b);function m(){return d(this,m),p(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return o(m,[{key:"value",value:function(T){var x=a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"value",this).call(this,T);return x.startsWith("rgb(")?(x=x.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+x.split(",").map(function(E){return("00"+parseInt(E).toString(16)).slice(-2)}).join("")):x}}]),m}(f.default.Attributor.Style),y=new f.default.Attributor.Class("color","ql-color",{scope:f.default.Scope.INLINE}),_=new v("color","color",{scope:f.default.Scope.INLINE});n.ColorAttributor=v,n.ColorClass=y,n.ColorStyle=_},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.sanitize=n.default=void 0;var o=function(){function _(b,m){for(var w=0;w<m.length;w++){var T=m[w];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(b,T.key,T)}}return function(b,m,w){return m&&_(b.prototype,m),w&&_(b,w),b}}(),a=function _(b,m,w){b===null&&(b=Function.prototype);var T=Object.getOwnPropertyDescriptor(b,m);if(T===void 0){var x=Object.getPrototypeOf(b);return x===null?void 0:_(x,m,w)}else{if("value"in T)return T.value;var E=T.get;return E===void 0?void 0:E.call(w)}},u=i(6),f=h(u);function h(_){return _&&_.__esModule?_:{default:_}}function d(_,b){if(!(_ instanceof b))throw new TypeError("Cannot call a class as a function")}function p(_,b){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:_}function c(_,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);_.prototype=Object.create(b&&b.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(_,b):_.__proto__=b)}var v=function(_){c(b,_);function b(){return d(this,b),p(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return o(b,[{key:"format",value:function(w,T){if(w!==this.statics.blotName||!T)return a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"format",this).call(this,w,T);T=this.constructor.sanitize(T),this.domNode.setAttribute("href",T)}}],[{key:"create",value:function(w){var T=a(b.__proto__||Object.getPrototypeOf(b),"create",this).call(this,w);return w=this.sanitize(w),T.setAttribute("href",w),T.setAttribute("rel","noopener noreferrer"),T.setAttribute("target","_blank"),T}},{key:"formats",value:function(w){return w.getAttribute("href")}},{key:"sanitize",value:function(w){return y(w,this.PROTOCOL_WHITELIST)?w:this.SANITIZED_URL}}]),b}(f.default);v.blotName="link",v.tagName="A",v.SANITIZED_URL="about:blank",v.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function y(_,b){var m=document.createElement("a");m.href=_;var w=m.href.slice(0,m.href.indexOf(":"));return b.indexOf(w)>-1}n.default=v,n.sanitize=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},a=function(){function b(m,w){for(var T=0;T<w.length;T++){var x=w[T];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,w,T){return w&&b(m.prototype,w),T&&b(m,T),m}}(),u=i(23),f=p(u),h=i(107),d=p(h);function p(b){return b&&b.__esModule?b:{default:b}}function c(b,m){if(!(b instanceof m))throw new TypeError("Cannot call a class as a function")}var v=0;function y(b,m){b.setAttribute(m,b.getAttribute(m)!=="true")}var _=function(){function b(m){var w=this;c(this,b),this.select=m,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){w.togglePicker()}),this.label.addEventListener("keydown",function(T){switch(T.keyCode){case f.default.keys.ENTER:w.togglePicker();break;case f.default.keys.ESCAPE:w.escape(),T.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return a(b,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),y(this.label,"aria-expanded"),y(this.options,"aria-hidden")}},{key:"buildItem",value:function(w){var T=this,x=document.createElement("span");return x.tabIndex="0",x.setAttribute("role","button"),x.classList.add("ql-picker-item"),w.hasAttribute("value")&&x.setAttribute("data-value",w.getAttribute("value")),w.textContent&&x.setAttribute("data-label",w.textContent),x.addEventListener("click",function(){T.selectItem(x,!0)}),x.addEventListener("keydown",function(E){switch(E.keyCode){case f.default.keys.ENTER:T.selectItem(x,!0),E.preventDefault();break;case f.default.keys.ESCAPE:T.escape(),E.preventDefault();break}}),x}},{key:"buildLabel",value:function(){var w=document.createElement("span");return w.classList.add("ql-picker-label"),w.innerHTML=d.default,w.tabIndex="0",w.setAttribute("role","button"),w.setAttribute("aria-expanded","false"),this.container.appendChild(w),w}},{key:"buildOptions",value:function(){var w=this,T=document.createElement("span");T.classList.add("ql-picker-options"),T.setAttribute("aria-hidden","true"),T.tabIndex="-1",T.id="ql-picker-options-"+v,v+=1,this.label.setAttribute("aria-controls",T.id),this.options=T,[].slice.call(this.select.options).forEach(function(x){var E=w.buildItem(x);T.appendChild(E),x.selected===!0&&w.selectItem(E)}),this.container.appendChild(T)}},{key:"buildPicker",value:function(){var w=this;[].slice.call(this.select.attributes).forEach(function(T){w.container.setAttribute(T.name,T.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var w=this;this.close(),setTimeout(function(){return w.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(w){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,x=this.container.querySelector(".ql-selected");if(w!==x&&(x!=null&&x.classList.remove("ql-selected"),w!=null&&(w.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(w.parentNode.children,w),w.hasAttribute("data-value")?this.label.setAttribute("data-value",w.getAttribute("data-value")):this.label.removeAttribute("data-value"),w.hasAttribute("data-label")?this.label.setAttribute("data-label",w.getAttribute("data-label")):this.label.removeAttribute("data-label"),T))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":o(Event))==="object"){var E=document.createEvent("Event");E.initEvent("change",!0,!0),this.select.dispatchEvent(E)}this.close()}}},{key:"update",value:function(){var w=void 0;if(this.select.selectedIndex>-1){var T=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];w=this.select.options[this.select.selectedIndex],this.selectItem(T)}else this.selectItem(null);var x=w!=null&&w!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",x)}}]),b}();n.default=_},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(0),a=q(o),u=i(5),f=q(u),h=i(4),d=q(h),p=i(16),c=q(p),v=i(25),y=q(v),_=i(24),b=q(_),m=i(35),w=q(m),T=i(6),x=q(T),E=i(22),I=q(E),O=i(7),A=q(O),L=i(55),R=q(L),C=i(42),P=q(C),M=i(23),F=q(M);function q(Z){return Z&&Z.__esModule?Z:{default:Z}}f.default.register({"blots/block":d.default,"blots/block/embed":h.BlockEmbed,"blots/break":c.default,"blots/container":y.default,"blots/cursor":b.default,"blots/embed":w.default,"blots/inline":x.default,"blots/scroll":I.default,"blots/text":A.default,"modules/clipboard":R.default,"modules/history":P.default,"modules/keyboard":F.default}),a.default.register(d.default,c.default,b.default,x.default,I.default,A.default),n.default=f.default},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(1),a=function(){function u(f){this.domNode=f,this.domNode[o.DATA_KEY]={blot:this}}return Object.defineProperty(u.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),u.create=function(f){if(this.tagName==null)throw new o.ParchmentError("Blot definition missing tagName");var h;return Array.isArray(this.tagName)?(typeof f=="string"&&(f=f.toUpperCase(),parseInt(f).toString()===f&&(f=parseInt(f))),typeof f=="number"?h=document.createElement(this.tagName[f-1]):this.tagName.indexOf(f)>-1?h=document.createElement(f):h=document.createElement(this.tagName[0])):h=document.createElement(this.tagName),this.className&&h.classList.add(this.className),h},u.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},u.prototype.clone=function(){var f=this.domNode.cloneNode(!1);return o.create(f)},u.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[o.DATA_KEY]},u.prototype.deleteAt=function(f,h){var d=this.isolate(f,h);d.remove()},u.prototype.formatAt=function(f,h,d,p){var c=this.isolate(f,h);if(o.query(d,o.Scope.BLOT)!=null&&p)c.wrap(d,p);else if(o.query(d,o.Scope.ATTRIBUTE)!=null){var v=o.create(this.statics.scope);c.wrap(v),v.format(d,p)}},u.prototype.insertAt=function(f,h,d){var p=d==null?o.create("text",h):o.create(h,d),c=this.split(f);this.parent.insertBefore(p,c)},u.prototype.insertInto=function(f,h){h===void 0&&(h=null),this.parent!=null&&this.parent.children.remove(this);var d=null;f.children.insertBefore(this,h),h!=null&&(d=h.domNode),(this.domNode.parentNode!=f.domNode||this.domNode.nextSibling!=d)&&f.domNode.insertBefore(this.domNode,d),this.parent=f,this.attach()},u.prototype.isolate=function(f,h){var d=this.split(f);return d.split(h),d},u.prototype.length=function(){return 1},u.prototype.offset=function(f){return f===void 0&&(f=this.parent),this.parent==null||this==f?0:this.parent.children.offset(this)+this.parent.offset(f)},u.prototype.optimize=function(f){this.domNode[o.DATA_KEY]!=null&&delete this.domNode[o.DATA_KEY].mutations},u.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},u.prototype.replace=function(f){f.parent!=null&&(f.parent.insertBefore(this,f.next),f.remove())},u.prototype.replaceWith=function(f,h){var d=typeof f=="string"?o.create(f,h):f;return d.replace(this),d},u.prototype.split=function(f,h){return f===0?this:this.next},u.prototype.update=function(f,h){},u.prototype.wrap=function(f,h){var d=typeof f=="string"?o.create(f,h):f;return this.parent!=null&&this.parent.insertBefore(d,this.next),d.appendChild(this),d},u.blotName="abstract",u}();n.default=a},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(12),a=i(32),u=i(33),f=i(1),h=function(){function d(p){this.attributes={},this.domNode=p,this.build()}return d.prototype.attribute=function(p,c){c?p.add(this.domNode,c)&&(p.value(this.domNode)!=null?this.attributes[p.attrName]=p:delete this.attributes[p.attrName]):(p.remove(this.domNode),delete this.attributes[p.attrName])},d.prototype.build=function(){var p=this;this.attributes={};var c=o.default.keys(this.domNode),v=a.default.keys(this.domNode),y=u.default.keys(this.domNode);c.concat(v).concat(y).forEach(function(_){var b=f.query(_,f.Scope.ATTRIBUTE);b instanceof o.default&&(p.attributes[b.attrName]=b)})},d.prototype.copy=function(p){var c=this;Object.keys(this.attributes).forEach(function(v){var y=c.attributes[v].value(c.domNode);p.format(v,y)})},d.prototype.move=function(p){var c=this;this.copy(p),Object.keys(this.attributes).forEach(function(v){c.attributes[v].remove(c.domNode)}),this.attributes={}},d.prototype.values=function(){var p=this;return Object.keys(this.attributes).reduce(function(c,v){return c[v]=p.attributes[v].value(p.domNode),c},{})},d}();n.default=h},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var c in p)p.hasOwnProperty(c)&&(d[c]=p[c])};return function(d,p){h(d,p);function c(){this.constructor=d}d.prototype=p===null?Object.create(p):(c.prototype=p.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(12);function u(h,d){var p=h.getAttribute("class")||"";return p.split(/\s+/).filter(function(c){return c.indexOf(d+"-")===0})}var f=function(h){o(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.keys=function(p){return(p.getAttribute("class")||"").split(/\s+/).map(function(c){return c.split("-").slice(0,-1).join("-")})},d.prototype.add=function(p,c){return this.canAdd(p,c)?(this.remove(p),p.classList.add(this.keyName+"-"+c),!0):!1},d.prototype.remove=function(p){var c=u(p,this.keyName);c.forEach(function(v){p.classList.remove(v)}),p.classList.length===0&&p.removeAttribute("class")},d.prototype.value=function(p){var c=u(p,this.keyName)[0]||"",v=c.slice(this.keyName.length+1);return this.canAdd(p,v)?v:""},d}(a.default);n.default=f},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var c in p)p.hasOwnProperty(c)&&(d[c]=p[c])};return function(d,p){h(d,p);function c(){this.constructor=d}d.prototype=p===null?Object.create(p):(c.prototype=p.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(12);function u(h){var d=h.split("-"),p=d.slice(1).map(function(c){return c[0].toUpperCase()+c.slice(1)}).join("");return d[0]+p}var f=function(h){o(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.keys=function(p){return(p.getAttribute("style")||"").split(";").map(function(c){var v=c.split(":");return v[0].trim()})},d.prototype.add=function(p,c){return this.canAdd(p,c)?(p.style[u(this.keyName)]=c,!0):!1},d.prototype.remove=function(p){p.style[u(this.keyName)]="",p.getAttribute("style")||p.removeAttribute("style")},d.prototype.value=function(p){var c=p.style[u(this.keyName)];return this.canAdd(p,c)?c:""},d}(a.default);n.default=f},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function f(h,d){for(var p=0;p<d.length;p++){var c=d[p];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(h,c.key,c)}}return function(h,d,p){return d&&f(h.prototype,d),p&&f(h,p),h}}();function a(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")}var u=function(){function f(h,d){a(this,f),this.quill=h,this.options=d,this.modules={}}return o(f,[{key:"init",value:function(){var d=this;Object.keys(this.options.modules).forEach(function(p){d.modules[p]==null&&d.addModule(p)})}},{key:"addModule",value:function(d){var p=this.quill.constructor.import("modules/"+d);return this.modules[d]=new p(this.quill,this.options.modules[d]||{}),this.modules[d]}}]),f}();u.DEFAULTS={modules:{}},u.themes={default:u},n.default=u},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function m(w,T){for(var x=0;x<T.length;x++){var E=T[x];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(w,E.key,E)}}return function(w,T,x){return T&&m(w.prototype,T),x&&m(w,x),w}}(),a=function m(w,T,x){w===null&&(w=Function.prototype);var E=Object.getOwnPropertyDescriptor(w,T);if(E===void 0){var I=Object.getPrototypeOf(w);return I===null?void 0:m(I,T,x)}else{if("value"in E)return E.value;var O=E.get;return O===void 0?void 0:O.call(x)}},u=i(0),f=p(u),h=i(7),d=p(h);function p(m){return m&&m.__esModule?m:{default:m}}function c(m,w){if(!(m instanceof w))throw new TypeError("Cannot call a class as a function")}function v(m,w){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:m}function y(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);m.prototype=Object.create(w&&w.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(m,w):m.__proto__=w)}var _="\uFEFF",b=function(m){y(w,m);function w(T){c(this,w);var x=v(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,T));return x.contentNode=document.createElement("span"),x.contentNode.setAttribute("contenteditable",!1),[].slice.call(x.domNode.childNodes).forEach(function(E){x.contentNode.appendChild(E)}),x.leftGuard=document.createTextNode(_),x.rightGuard=document.createTextNode(_),x.domNode.appendChild(x.leftGuard),x.domNode.appendChild(x.contentNode),x.domNode.appendChild(x.rightGuard),x}return o(w,[{key:"index",value:function(x,E){return x===this.leftGuard?0:x===this.rightGuard?1:a(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"index",this).call(this,x,E)}},{key:"restore",value:function(x){var E=void 0,I=void 0,O=x.data.split(_).join("");if(x===this.leftGuard)if(this.prev instanceof d.default){var A=this.prev.length();this.prev.insertAt(A,O),E={startNode:this.prev.domNode,startOffset:A+O.length}}else I=document.createTextNode(O),this.parent.insertBefore(f.default.create(I),this),E={startNode:I,startOffset:O.length};else x===this.rightGuard&&(this.next instanceof d.default?(this.next.insertAt(0,O),E={startNode:this.next.domNode,startOffset:O.length}):(I=document.createTextNode(O),this.parent.insertBefore(f.default.create(I),this.next),E={startNode:I,startOffset:O.length}));return x.data=_,E}},{key:"update",value:function(x,E){var I=this;x.forEach(function(O){if(O.type==="characterData"&&(O.target===I.leftGuard||O.target===I.rightGuard)){var A=I.restore(O.target);A&&(E.range=A)}})}}]),w}(f.default.Embed);n.default=b},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.AlignStyle=n.AlignClass=n.AlignAttribute=void 0;var o=i(0),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}var f={scope:a.default.Scope.BLOCK,whitelist:["right","center","justify"]},h=new a.default.Attributor.Attribute("align","align",f),d=new a.default.Attributor.Class("align","ql-align",f),p=new a.default.Attributor.Style("align","text-align",f);n.AlignAttribute=h,n.AlignClass=d,n.AlignStyle=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.BackgroundStyle=n.BackgroundClass=void 0;var o=i(0),a=f(o),u=i(26);function f(p){return p&&p.__esModule?p:{default:p}}var h=new a.default.Attributor.Class("background","ql-bg",{scope:a.default.Scope.INLINE}),d=new u.ColorAttributor("background","background-color",{scope:a.default.Scope.INLINE});n.BackgroundClass=h,n.BackgroundStyle=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.DirectionStyle=n.DirectionClass=n.DirectionAttribute=void 0;var o=i(0),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}var f={scope:a.default.Scope.BLOCK,whitelist:["rtl"]},h=new a.default.Attributor.Attribute("direction","dir",f),d=new a.default.Attributor.Class("direction","ql-direction",f),p=new a.default.Attributor.Style("direction","direction",f);n.DirectionAttribute=h,n.DirectionClass=d,n.DirectionStyle=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.FontClass=n.FontStyle=void 0;var o=function(){function m(w,T){for(var x=0;x<T.length;x++){var E=T[x];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(w,E.key,E)}}return function(w,T,x){return T&&m(w.prototype,T),x&&m(w,x),w}}(),a=function m(w,T,x){w===null&&(w=Function.prototype);var E=Object.getOwnPropertyDescriptor(w,T);if(E===void 0){var I=Object.getPrototypeOf(w);return I===null?void 0:m(I,T,x)}else{if("value"in E)return E.value;var O=E.get;return O===void 0?void 0:O.call(x)}},u=i(0),f=h(u);function h(m){return m&&m.__esModule?m:{default:m}}function d(m,w){if(!(m instanceof w))throw new TypeError("Cannot call a class as a function")}function p(m,w){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:m}function c(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);m.prototype=Object.create(w&&w.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(m,w):m.__proto__=w)}var v={scope:f.default.Scope.INLINE,whitelist:["serif","monospace"]},y=new f.default.Attributor.Class("font","ql-font",v),_=function(m){c(w,m);function w(){return d(this,w),p(this,(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments))}return o(w,[{key:"value",value:function(x){return a(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"value",this).call(this,x).replace(/["']/g,"")}}]),w}(f.default.Attributor.Style),b=new _("font","font-family",v);n.FontStyle=b,n.FontClass=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.SizeStyle=n.SizeClass=void 0;var o=i(0),a=u(o);function u(d){return d&&d.__esModule?d:{default:d}}var f=new a.default.Attributor.Class("size","ql-size",{scope:a.default.Scope.INLINE,whitelist:["small","large","huge"]}),h=new a.default.Attributor.Style("size","font-size",{scope:a.default.Scope.INLINE,whitelist:["10px","18px","32px"]});n.SizeClass=f,n.SizeStyle=h},function(r,n,i){r.exports={align:{"":i(76),center:i(77),right:i(78),justify:i(79)},background:i(80),blockquote:i(81),bold:i(82),clean:i(83),code:i(58),"code-block":i(58),color:i(84),direction:{"":i(85),rtl:i(86)},float:{center:i(87),full:i(88),left:i(89),right:i(90)},formula:i(91),header:{1:i(92),2:i(93)},italic:i(94),image:i(95),indent:{"+1":i(96),"-1":i(97)},link:i(98),list:{ordered:i(99),bullet:i(100),check:i(101)},script:{sub:i(102),super:i(103)},strike:i(104),underline:i(105),video:i(106)}},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.getLastChangeIndex=n.default=void 0;var o=function(){function T(x,E){for(var I=0;I<E.length;I++){var O=E[I];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(x,O.key,O)}}return function(x,E,I){return E&&T(x.prototype,E),I&&T(x,I),x}}(),a=i(0),u=c(a),f=i(5),h=c(f),d=i(9),p=c(d);function c(T){return T&&T.__esModule?T:{default:T}}function v(T,x){if(!(T instanceof x))throw new TypeError("Cannot call a class as a function")}function y(T,x){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:T}function _(T,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);T.prototype=Object.create(x&&x.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(T,x):T.__proto__=x)}var b=function(T){_(x,T);function x(E,I){v(this,x);var O=y(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,E,I));return O.lastRecorded=0,O.ignoreChange=!1,O.clear(),O.quill.on(h.default.events.EDITOR_CHANGE,function(A,L,R,C){A!==h.default.events.TEXT_CHANGE||O.ignoreChange||(!O.options.userOnly||C===h.default.sources.USER?O.record(L,R):O.transform(L))}),O.quill.keyboard.addBinding({key:"Z",shortKey:!0},O.undo.bind(O)),O.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},O.redo.bind(O)),/Win/i.test(navigator.platform)&&O.quill.keyboard.addBinding({key:"Y",shortKey:!0},O.redo.bind(O)),O}return o(x,[{key:"change",value:function(I,O){if(this.stack[I].length!==0){var A=this.stack[I].pop();this.stack[O].push(A),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(A[I],h.default.sources.USER),this.ignoreChange=!1;var L=w(A[I]);this.quill.setSelection(L)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(I,O){if(I.ops.length!==0){this.stack.redo=[];var A=this.quill.getContents().diff(O),L=Date.now();if(this.lastRecorded+this.options.delay>L&&this.stack.undo.length>0){var R=this.stack.undo.pop();A=A.compose(R.undo),I=R.redo.compose(I)}else this.lastRecorded=L;this.stack.undo.push({redo:I,undo:A}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(I){this.stack.undo.forEach(function(O){O.undo=I.transform(O.undo,!0),O.redo=I.transform(O.redo,!0)}),this.stack.redo.forEach(function(O){O.undo=I.transform(O.undo,!0),O.redo=I.transform(O.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),x}(p.default);b.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function m(T){var x=T.ops[T.ops.length-1];return x==null?!1:x.insert!=null?typeof x.insert=="string"&&x.insert.endsWith(`
1991
+ `):x.attributes!=null?Object.keys(x.attributes).some(function(E){return u.default.query(E,u.default.Scope.BLOCK)!=null}):!1}function w(T){var x=T.reduce(function(I,O){return I+=O.delete||0,I},0),E=T.length()-x;return m(T)&&(E-=1),E}n.default=b,n.getLastChangeIndex=w},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BaseTooltip=void 0;var o=function(){function G(j,Q){for(var K=0;K<Q.length;K++){var $=Q[K];$.enumerable=$.enumerable||!1,$.configurable=!0,"value"in $&&($.writable=!0),Object.defineProperty(j,$.key,$)}}return function(j,Q,K){return Q&&G(j.prototype,Q),K&&G(j,K),j}}(),a=function G(j,Q,K){j===null&&(j=Function.prototype);var $=Object.getOwnPropertyDescriptor(j,Q);if($===void 0){var W=Object.getPrototypeOf(j);return W===null?void 0:G(W,Q,K)}else{if("value"in $)return $.value;var et=$.get;return et===void 0?void 0:et.call(K)}},u=i(3),f=L(u),h=i(2),d=L(h),p=i(8),c=L(p),v=i(23),y=L(v),_=i(34),b=L(_),m=i(59),w=L(m),T=i(60),x=L(T),E=i(28),I=L(E),O=i(61),A=L(O);function L(G){return G&&G.__esModule?G:{default:G}}function R(G,j){if(!(G instanceof j))throw new TypeError("Cannot call a class as a function")}function C(G,j){if(!G)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j&&(typeof j=="object"||typeof j=="function")?j:G}function P(G,j){if(typeof j!="function"&&j!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof j);G.prototype=Object.create(j&&j.prototype,{constructor:{value:G,enumerable:!1,writable:!0,configurable:!0}}),j&&(Object.setPrototypeOf?Object.setPrototypeOf(G,j):G.__proto__=j)}var M=[!1,"center","right","justify"],F=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],q=[!1,"serif","monospace"],Z=["1","2","3",!1],z=["small",!1,"large","huge"],nt=function(G){P(j,G);function j(Q,K){R(this,j);var $=C(this,(j.__proto__||Object.getPrototypeOf(j)).call(this,Q,K)),W=function et(Y){if(!document.body.contains(Q.root))return document.body.removeEventListener("click",et);$.tooltip!=null&&!$.tooltip.root.contains(Y.target)&&document.activeElement!==$.tooltip.textbox&&!$.quill.hasFocus()&&$.tooltip.hide(),$.pickers!=null&&$.pickers.forEach(function(rt){rt.container.contains(Y.target)||rt.close()})};return Q.emitter.listenDOM("click",document.body,W),$}return o(j,[{key:"addModule",value:function(K){var $=a(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),"addModule",this).call(this,K);return K==="toolbar"&&this.extendToolbar($),$}},{key:"buildButtons",value:function(K,$){K.forEach(function(W){var et=W.getAttribute("class")||"";et.split(/\s+/).forEach(function(Y){if(Y.startsWith("ql-")&&(Y=Y.slice(3),$[Y]!=null))if(Y==="direction")W.innerHTML=$[Y][""]+$[Y].rtl;else if(typeof $[Y]=="string")W.innerHTML=$[Y];else{var rt=W.value||"";rt!=null&&$[Y][rt]&&(W.innerHTML=$[Y][rt])}})})}},{key:"buildPickers",value:function(K,$){var W=this;this.pickers=K.map(function(Y){if(Y.classList.contains("ql-align"))return Y.querySelector("option")==null&&k(Y,M),new x.default(Y,$.align);if(Y.classList.contains("ql-background")||Y.classList.contains("ql-color")){var rt=Y.classList.contains("ql-background")?"background":"color";return Y.querySelector("option")==null&&k(Y,F,rt==="background"?"#ffffff":"#000000"),new w.default(Y,$[rt])}else return Y.querySelector("option")==null&&(Y.classList.contains("ql-font")?k(Y,q):Y.classList.contains("ql-header")?k(Y,Z):Y.classList.contains("ql-size")&&k(Y,z)),new I.default(Y)});var et=function(){W.pickers.forEach(function(rt){rt.update()})};this.quill.on(c.default.events.EDITOR_CHANGE,et)}}]),j}(b.default);nt.DEFAULTS=(0,f.default)(!0,{},b.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var j=this,Q=this.container.querySelector("input.ql-image[type=file]");Q==null&&(Q=document.createElement("input"),Q.setAttribute("type","file"),Q.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),Q.classList.add("ql-image"),Q.addEventListener("change",function(){if(Q.files!=null&&Q.files[0]!=null){var K=new FileReader;K.onload=function($){var W=j.quill.getSelection(!0);j.quill.updateContents(new d.default().retain(W.index).delete(W.length).insert({image:$.target.result}),c.default.sources.USER),j.quill.setSelection(W.index+1,c.default.sources.SILENT),Q.value=""},K.readAsDataURL(Q.files[0])}}),this.container.appendChild(Q)),Q.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var V=function(G){P(j,G);function j(Q,K){R(this,j);var $=C(this,(j.__proto__||Object.getPrototypeOf(j)).call(this,Q,K));return $.textbox=$.root.querySelector('input[type="text"]'),$.listen(),$}return o(j,[{key:"listen",value:function(){var K=this;this.textbox.addEventListener("keydown",function($){y.default.match($,"enter")?(K.save(),$.preventDefault()):y.default.match($,"escape")&&(K.cancel(),$.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",$=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),$!=null?this.textbox.value=$:K!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+K)||""),this.root.setAttribute("data-mode",K)}},{key:"restoreFocus",value:function(){var K=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=K}},{key:"save",value:function(){var K=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var $=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",K,c.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",K,c.default.sources.USER)),this.quill.root.scrollTop=$;break}case"video":K=D(K);case"formula":{if(!K)break;var W=this.quill.getSelection(!0);if(W!=null){var et=W.index+W.length;this.quill.insertEmbed(et,this.root.getAttribute("data-mode"),K,c.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(et+1," ",c.default.sources.USER),this.quill.setSelection(et+2,c.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),j}(A.default);function D(G){var j=G.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||G.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return j?(j[1]||"https")+"://www.youtube.com/embed/"+j[2]+"?showinfo=0":(j=G.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(j[1]||"https")+"://player.vimeo.com/video/"+j[2]+"/":G}function k(G,j){var Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;j.forEach(function(K){var $=document.createElement("option");K===Q?$.setAttribute("selected","selected"):$.setAttribute("value",K),G.appendChild($)})}n.BaseTooltip=V,n.default=nt},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function a(){this.head=this.tail=null,this.length=0}return a.prototype.append=function(){for(var u=[],f=0;f<arguments.length;f++)u[f]=arguments[f];this.insertBefore(u[0],null),u.length>1&&this.append.apply(this,u.slice(1))},a.prototype.contains=function(u){for(var f,h=this.iterator();f=h();)if(f===u)return!0;return!1},a.prototype.insertBefore=function(u,f){u&&(u.next=f,f!=null?(u.prev=f.prev,f.prev!=null&&(f.prev.next=u),f.prev=u,f===this.head&&(this.head=u)):this.tail!=null?(this.tail.next=u,u.prev=this.tail,this.tail=u):(u.prev=null,this.head=this.tail=u),this.length+=1)},a.prototype.offset=function(u){for(var f=0,h=this.head;h!=null;){if(h===u)return f;f+=h.length(),h=h.next}return-1},a.prototype.remove=function(u){this.contains(u)&&(u.prev!=null&&(u.prev.next=u.next),u.next!=null&&(u.next.prev=u.prev),u===this.head&&(this.head=u.next),u===this.tail&&(this.tail=u.prev),this.length-=1)},a.prototype.iterator=function(u){return u===void 0&&(u=this.head),function(){var f=u;return u!=null&&(u=u.next),f}},a.prototype.find=function(u,f){f===void 0&&(f=!1);for(var h,d=this.iterator();h=d();){var p=h.length();if(u<p||f&&u===p&&(h.next==null||h.next.length()!==0))return[h,u];u-=p}return[null,0]},a.prototype.forEach=function(u){for(var f,h=this.iterator();f=h();)u(f)},a.prototype.forEachAt=function(u,f,h){if(!(f<=0))for(var d=this.find(u),p=d[0],c=d[1],v,y=u-c,_=this.iterator(p);(v=_())&&y<u+f;){var b=v.length();u>y?h(v,u-y,Math.min(f,y+b-u)):h(v,0,Math.min(b,u+f-y)),y+=b}},a.prototype.map=function(u){return this.reduce(function(f,h){return f.push(u(h)),f},[])},a.prototype.reduce=function(u,f){for(var h,d=this.iterator();h=d();)f=u(f,h);return f},a}();n.default=o},function(r,n,i){var o=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var y in v)v.hasOwnProperty(y)&&(c[y]=v[y])};return function(c,v){p(c,v);function y(){this.constructor=c}c.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(17),u=i(1),f={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},h=100,d=function(p){o(c,p);function c(v){var y=p.call(this,v)||this;return y.scroll=y,y.observer=new MutationObserver(function(_){y.update(_)}),y.observer.observe(y.domNode,f),y.attach(),y}return c.prototype.detach=function(){p.prototype.detach.call(this),this.observer.disconnect()},c.prototype.deleteAt=function(v,y){this.update(),v===0&&y===this.length()?this.children.forEach(function(_){_.remove()}):p.prototype.deleteAt.call(this,v,y)},c.prototype.formatAt=function(v,y,_,b){this.update(),p.prototype.formatAt.call(this,v,y,_,b)},c.prototype.insertAt=function(v,y,_){this.update(),p.prototype.insertAt.call(this,v,y,_)},c.prototype.optimize=function(v,y){var _=this;v===void 0&&(v=[]),y===void 0&&(y={}),p.prototype.optimize.call(this,y);for(var b=[].slice.call(this.observer.takeRecords());b.length>0;)v.push(b.pop());for(var m=function(E,I){I===void 0&&(I=!0),!(E==null||E===_)&&E.domNode.parentNode!=null&&(E.domNode[u.DATA_KEY].mutations==null&&(E.domNode[u.DATA_KEY].mutations=[]),I&&m(E.parent))},w=function(E){E.domNode[u.DATA_KEY]==null||E.domNode[u.DATA_KEY].mutations==null||(E instanceof a.default&&E.children.forEach(w),E.optimize(y))},T=v,x=0;T.length>0;x+=1){if(x>=h)throw new Error("[Parchment] Maximum optimize iterations reached");for(T.forEach(function(E){var I=u.find(E.target,!0);I!=null&&(I.domNode===E.target&&(E.type==="childList"?(m(u.find(E.previousSibling,!1)),[].forEach.call(E.addedNodes,function(O){var A=u.find(O,!1);m(A,!1),A instanceof a.default&&A.children.forEach(function(L){m(L,!1)})})):E.type==="attributes"&&m(I.prev)),m(I))}),this.children.forEach(w),T=[].slice.call(this.observer.takeRecords()),b=T.slice();b.length>0;)v.push(b.pop())}},c.prototype.update=function(v,y){var _=this;y===void 0&&(y={}),v=v||this.observer.takeRecords(),v.map(function(b){var m=u.find(b.target,!0);return m==null?null:m.domNode[u.DATA_KEY].mutations==null?(m.domNode[u.DATA_KEY].mutations=[b],m):(m.domNode[u.DATA_KEY].mutations.push(b),null)}).forEach(function(b){b==null||b===_||b.domNode[u.DATA_KEY]==null||b.update(b.domNode[u.DATA_KEY].mutations||[],y)}),this.domNode[u.DATA_KEY].mutations!=null&&p.prototype.update.call(this,this.domNode[u.DATA_KEY].mutations,y),this.optimize(v,y)},c.blotName="scroll",c.defaultChild="block",c.scope=u.Scope.BLOCK_BLOT,c.tagName="DIV",c}(a.default);n.default=d},function(r,n,i){var o=this&&this.__extends||function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,c){p.__proto__=c}||function(p,c){for(var v in c)c.hasOwnProperty(v)&&(p[v]=c[v])};return function(p,c){d(p,c);function v(){this.constructor=p}p.prototype=c===null?Object.create(c):(v.prototype=c.prototype,new v)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(18),u=i(1);function f(d,p){if(Object.keys(d).length!==Object.keys(p).length)return!1;for(var c in d)if(d[c]!==p[c])return!1;return!0}var h=function(d){o(p,d);function p(){return d!==null&&d.apply(this,arguments)||this}return p.formats=function(c){if(c.tagName!==p.tagName)return d.formats.call(this,c)},p.prototype.format=function(c,v){var y=this;c===this.statics.blotName&&!v?(this.children.forEach(function(_){_ instanceof a.default||(_=_.wrap(p.blotName,!0)),y.attributes.copy(_)}),this.unwrap()):d.prototype.format.call(this,c,v)},p.prototype.formatAt=function(c,v,y,_){if(this.formats()[y]!=null||u.query(y,u.Scope.ATTRIBUTE)){var b=this.isolate(c,v);b.format(y,_)}else d.prototype.formatAt.call(this,c,v,y,_)},p.prototype.optimize=function(c){d.prototype.optimize.call(this,c);var v=this.formats();if(Object.keys(v).length===0)return this.unwrap();var y=this.next;y instanceof p&&y.prev===this&&f(v,y.formats())&&(y.moveChildren(this),y.remove())},p.blotName="inline",p.scope=u.Scope.INLINE_BLOT,p.tagName="SPAN",p}(a.default);n.default=h},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var c in p)p.hasOwnProperty(c)&&(d[c]=p[c])};return function(d,p){h(d,p);function c(){this.constructor=d}d.prototype=p===null?Object.create(p):(c.prototype=p.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(18),u=i(1),f=function(h){o(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.formats=function(p){var c=u.query(d.blotName).tagName;if(p.tagName!==c)return h.formats.call(this,p)},d.prototype.format=function(p,c){u.query(p,u.Scope.BLOCK)!=null&&(p===this.statics.blotName&&!c?this.replaceWith(d.blotName):h.prototype.format.call(this,p,c))},d.prototype.formatAt=function(p,c,v,y){u.query(v,u.Scope.BLOCK)!=null?this.format(v,y):h.prototype.formatAt.call(this,p,c,v,y)},d.prototype.insertAt=function(p,c,v){if(v==null||u.query(c,u.Scope.INLINE)!=null)h.prototype.insertAt.call(this,p,c,v);else{var y=this.split(p),_=u.create(c,v);y.parent.insertBefore(_,y)}},d.prototype.update=function(p,c){navigator.userAgent.match(/Trident/)?this.build():h.prototype.update.call(this,p,c)},d.blotName="block",d.scope=u.Scope.BLOCK_BLOT,d.tagName="P",d}(a.default);n.default=f},function(r,n,i){var o=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,d){h.__proto__=d}||function(h,d){for(var p in d)d.hasOwnProperty(p)&&(h[p]=d[p])};return function(h,d){f(h,d);function p(){this.constructor=h}h.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(19),u=function(f){o(h,f);function h(){return f!==null&&f.apply(this,arguments)||this}return h.formats=function(d){},h.prototype.format=function(d,p){f.prototype.formatAt.call(this,0,this.length(),d,p)},h.prototype.formatAt=function(d,p,c,v){d===0&&p===this.length()?this.format(c,v):f.prototype.formatAt.call(this,d,p,c,v)},h.prototype.formats=function(){return this.statics.formats(this.domNode)},h}(a.default);n.default=u},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var c in p)p.hasOwnProperty(c)&&(d[c]=p[c])};return function(d,p){h(d,p);function c(){this.constructor=d}d.prototype=p===null?Object.create(p):(c.prototype=p.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(19),u=i(1),f=function(h){o(d,h);function d(p){var c=h.call(this,p)||this;return c.text=c.statics.value(c.domNode),c}return d.create=function(p){return document.createTextNode(p)},d.value=function(p){var c=p.data;return c.normalize&&(c=c.normalize()),c},d.prototype.deleteAt=function(p,c){this.domNode.data=this.text=this.text.slice(0,p)+this.text.slice(p+c)},d.prototype.index=function(p,c){return this.domNode===p?c:-1},d.prototype.insertAt=function(p,c,v){v==null?(this.text=this.text.slice(0,p)+c+this.text.slice(p),this.domNode.data=this.text):h.prototype.insertAt.call(this,p,c,v)},d.prototype.length=function(){return this.text.length},d.prototype.optimize=function(p){h.prototype.optimize.call(this,p),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof d&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},d.prototype.position=function(p,c){return[this.domNode,p]},d.prototype.split=function(p,c){if(c===void 0&&(c=!1),!c){if(p===0)return this;if(p===this.length())return this.next}var v=u.create(this.domNode.splitText(p));return this.parent.insertBefore(v,this.next),this.text=this.statics.value(this.domNode),v},d.prototype.update=function(p,c){var v=this;p.some(function(y){return y.type==="characterData"&&y.target===v.domNode})&&(this.text=this.statics.value(this.domNode))},d.prototype.value=function(){return this.text},d.blotName="text",d.scope=u.Scope.INLINE_BLOT,d}(a.default);n.default=f},function(r,n,i){var o=document.createElement("div");if(o.classList.toggle("test-class",!1),o.classList.contains("test-class")){var a=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(u,f){return arguments.length>1&&!this.contains(u)==!f?f:a.call(this,u)}}String.prototype.startsWith||(String.prototype.startsWith=function(u,f){return f=f||0,this.substr(f,u.length)===u}),String.prototype.endsWith||(String.prototype.endsWith=function(u,f){var h=this.toString();(typeof f!="number"||!isFinite(f)||Math.floor(f)!==f||f>h.length)&&(f=h.length),f-=u.length;var d=h.indexOf(u,f);return d!==-1&&d===f}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(f){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof f!="function")throw new TypeError("predicate must be a function");for(var h=Object(this),d=h.length>>>0,p=arguments[1],c,v=0;v<d;v++)if(c=h[v],f.call(p,c,v,h))return c}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(r,n){var i=-1,o=1,a=0;function u(x,E,I){if(x==E)return x?[[a,x]]:[];(I<0||x.length<I)&&(I=null);var O=p(x,E),A=x.substring(0,O);x=x.substring(O),E=E.substring(O),O=c(x,E);var L=x.substring(x.length-O);x=x.substring(0,x.length-O),E=E.substring(0,E.length-O);var R=f(x,E);return A&&R.unshift([a,A]),L&&R.push([a,L]),y(R),I!=null&&(R=m(R,I)),R=w(R),R}function f(x,E){var I;if(!x)return[[o,E]];if(!E)return[[i,x]];var O=x.length>E.length?x:E,A=x.length>E.length?E:x,L=O.indexOf(A);if(L!=-1)return I=[[o,O.substring(0,L)],[a,A],[o,O.substring(L+A.length)]],x.length>E.length&&(I[0][0]=I[2][0]=i),I;if(A.length==1)return[[i,x],[o,E]];var R=v(x,E);if(R){var C=R[0],P=R[1],M=R[2],F=R[3],q=R[4],Z=u(C,M),z=u(P,F);return Z.concat([[a,q]],z)}return h(x,E)}function h(x,E){for(var I=x.length,O=E.length,A=Math.ceil((I+O)/2),L=A,R=2*A,C=new Array(R),P=new Array(R),M=0;M<R;M++)C[M]=-1,P[M]=-1;C[L+1]=0,P[L+1]=0;for(var F=I-O,q=F%2!=0,Z=0,z=0,nt=0,V=0,D=0;D<A;D++){for(var k=-D+Z;k<=D-z;k+=2){var G=L+k,j;k==-D||k!=D&&C[G-1]<C[G+1]?j=C[G+1]:j=C[G-1]+1;for(var Q=j-k;j<I&&Q<O&&x.charAt(j)==E.charAt(Q);)j++,Q++;if(C[G]=j,j>I)z+=2;else if(Q>O)Z+=2;else if(q){var K=L+F-k;if(K>=0&&K<R&&P[K]!=-1){var $=I-P[K];if(j>=$)return d(x,E,j,Q)}}}for(var W=-D+nt;W<=D-V;W+=2){var K=L+W,$;W==-D||W!=D&&P[K-1]<P[K+1]?$=P[K+1]:$=P[K-1]+1;for(var et=$-W;$<I&&et<O&&x.charAt(I-$-1)==E.charAt(O-et-1);)$++,et++;if(P[K]=$,$>I)V+=2;else if(et>O)nt+=2;else if(!q){var G=L+F-W;if(G>=0&&G<R&&C[G]!=-1){var j=C[G],Q=L+j-G;if($=I-$,j>=$)return d(x,E,j,Q)}}}}return[[i,x],[o,E]]}function d(x,E,I,O){var A=x.substring(0,I),L=E.substring(0,O),R=x.substring(I),C=E.substring(O),P=u(A,L),M=u(R,C);return P.concat(M)}function p(x,E){if(!x||!E||x.charAt(0)!=E.charAt(0))return 0;for(var I=0,O=Math.min(x.length,E.length),A=O,L=0;I<A;)x.substring(L,A)==E.substring(L,A)?(I=A,L=I):O=A,A=Math.floor((O-I)/2+I);return A}function c(x,E){if(!x||!E||x.charAt(x.length-1)!=E.charAt(E.length-1))return 0;for(var I=0,O=Math.min(x.length,E.length),A=O,L=0;I<A;)x.substring(x.length-A,x.length-L)==E.substring(E.length-A,E.length-L)?(I=A,L=I):O=A,A=Math.floor((O-I)/2+I);return A}function v(x,E){var I=x.length>E.length?x:E,O=x.length>E.length?E:x;if(I.length<4||O.length*2<I.length)return null;function A(z,nt,V){for(var D=z.substring(V,V+Math.floor(z.length/4)),k=-1,G="",j,Q,K,$;(k=nt.indexOf(D,k+1))!=-1;){var W=p(z.substring(V),nt.substring(k)),et=c(z.substring(0,V),nt.substring(0,k));G.length<et+W&&(G=nt.substring(k-et,k)+nt.substring(k,k+W),j=z.substring(0,V-et),Q=z.substring(V+W),K=nt.substring(0,k-et),$=nt.substring(k+W))}return G.length*2>=z.length?[j,Q,K,$,G]:null}var L=A(I,O,Math.ceil(I.length/4)),R=A(I,O,Math.ceil(I.length/2)),C;if(!L&&!R)return null;R?L?C=L[4].length>R[4].length?L:R:C=R:C=L;var P,M,F,q;x.length>E.length?(P=C[0],M=C[1],F=C[2],q=C[3]):(F=C[0],q=C[1],P=C[2],M=C[3]);var Z=C[4];return[P,M,F,q,Z]}function y(x){x.push([a,""]);for(var E=0,I=0,O=0,A="",L="",R;E<x.length;)switch(x[E][0]){case o:O++,L+=x[E][1],E++;break;case i:I++,A+=x[E][1],E++;break;case a:I+O>1?(I!==0&&O!==0&&(R=p(L,A),R!==0&&(E-I-O>0&&x[E-I-O-1][0]==a?x[E-I-O-1][1]+=L.substring(0,R):(x.splice(0,0,[a,L.substring(0,R)]),E++),L=L.substring(R),A=A.substring(R)),R=c(L,A),R!==0&&(x[E][1]=L.substring(L.length-R)+x[E][1],L=L.substring(0,L.length-R),A=A.substring(0,A.length-R))),I===0?x.splice(E-O,I+O,[o,L]):O===0?x.splice(E-I,I+O,[i,A]):x.splice(E-I-O,I+O,[i,A],[o,L]),E=E-I-O+(I?1:0)+(O?1:0)+1):E!==0&&x[E-1][0]==a?(x[E-1][1]+=x[E][1],x.splice(E,1)):E++,O=0,I=0,A="",L="";break}x[x.length-1][1]===""&&x.pop();var C=!1;for(E=1;E<x.length-1;)x[E-1][0]==a&&x[E+1][0]==a&&(x[E][1].substring(x[E][1].length-x[E-1][1].length)==x[E-1][1]?(x[E][1]=x[E-1][1]+x[E][1].substring(0,x[E][1].length-x[E-1][1].length),x[E+1][1]=x[E-1][1]+x[E+1][1],x.splice(E-1,1),C=!0):x[E][1].substring(0,x[E+1][1].length)==x[E+1][1]&&(x[E-1][1]+=x[E+1][1],x[E][1]=x[E][1].substring(x[E+1][1].length)+x[E+1][1],x.splice(E+1,1),C=!0)),E++;C&&y(x)}var _=u;_.INSERT=o,_.DELETE=i,_.EQUAL=a,r.exports=_;function b(x,E){if(E===0)return[a,x];for(var I=0,O=0;O<x.length;O++){var A=x[O];if(A[0]===i||A[0]===a){var L=I+A[1].length;if(E===L)return[O+1,x];if(E<L){x=x.slice();var R=E-I,C=[A[0],A[1].slice(0,R)],P=[A[0],A[1].slice(R)];return x.splice(O,1,C,P),[O+1,x]}else I=L}}throw new Error("cursor_pos is out of bounds!")}function m(x,E){var I=b(x,E),O=I[1],A=I[0],L=O[A],R=O[A+1];if(L==null)return x;if(L[0]!==a)return x;if(R!=null&&L[1]+R[1]===R[1]+L[1])return O.splice(A,2,R,L),T(O,A,2);if(R!=null&&R[1].indexOf(L[1])===0){O.splice(A,2,[R[0],L[1]],[0,L[1]]);var C=R[1].slice(L[1].length);return C.length>0&&O.splice(A+2,0,[R[0],C]),T(O,A,3)}else return x}function w(x){for(var E=!1,I=function(R){return R.charCodeAt(0)>=56320&&R.charCodeAt(0)<=57343},O=function(R){return R.charCodeAt(R.length-1)>=55296&&R.charCodeAt(R.length-1)<=56319},A=2;A<x.length;A+=1)x[A-2][0]===a&&O(x[A-2][1])&&x[A-1][0]===i&&I(x[A-1][1])&&x[A][0]===o&&I(x[A][1])&&(E=!0,x[A-1][1]=x[A-2][1].slice(-1)+x[A-1][1],x[A][1]=x[A-2][1].slice(-1)+x[A][1],x[A-2][1]=x[A-2][1].slice(0,-1));if(!E)return x;for(var L=[],A=0;A<x.length;A+=1)x[A][1].length>0&&L.push(x[A]);return L}function T(x,E,I){for(var O=E+I-1;O>=0&&O>=E-1;O--)if(O+1<x.length){var A=x[O],L=x[O+1];A[0]===L[1]&&x.splice(O,2,[A[0],A[1]+L[1]])}return x}},function(r,n){n=r.exports=typeof Object.keys=="function"?Object.keys:i,n.shim=i;function i(o){var a=[];for(var u in o)a.push(u);return a}},function(r,n){var i=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";n=r.exports=i?o:a,n.supported=o;function o(u){return Object.prototype.toString.call(u)=="[object Arguments]"}n.unsupported=a;function a(u){return u&&typeof u=="object"&&typeof u.length=="number"&&Object.prototype.hasOwnProperty.call(u,"callee")&&!Object.prototype.propertyIsEnumerable.call(u,"callee")||!1}},function(r,n){var i=Object.prototype.hasOwnProperty,o="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(o=!1));function u(h,d,p){this.fn=h,this.context=d,this.once=p||!1}function f(){this._events=new a,this._eventsCount=0}f.prototype.eventNames=function(){var d=[],p,c;if(this._eventsCount===0)return d;for(c in p=this._events)i.call(p,c)&&d.push(o?c.slice(1):c);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(p)):d},f.prototype.listeners=function(d,p){var c=o?o+d:d,v=this._events[c];if(p)return!!v;if(!v)return[];if(v.fn)return[v.fn];for(var y=0,_=v.length,b=new Array(_);y<_;y++)b[y]=v[y].fn;return b},f.prototype.emit=function(d,p,c,v,y,_){var b=o?o+d:d;if(!this._events[b])return!1;var m=this._events[b],w=arguments.length,T,x;if(m.fn){switch(m.once&&this.removeListener(d,m.fn,void 0,!0),w){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,p),!0;case 3:return m.fn.call(m.context,p,c),!0;case 4:return m.fn.call(m.context,p,c,v),!0;case 5:return m.fn.call(m.context,p,c,v,y),!0;case 6:return m.fn.call(m.context,p,c,v,y,_),!0}for(x=1,T=new Array(w-1);x<w;x++)T[x-1]=arguments[x];m.fn.apply(m.context,T)}else{var E=m.length,I;for(x=0;x<E;x++)switch(m[x].once&&this.removeListener(d,m[x].fn,void 0,!0),w){case 1:m[x].fn.call(m[x].context);break;case 2:m[x].fn.call(m[x].context,p);break;case 3:m[x].fn.call(m[x].context,p,c);break;case 4:m[x].fn.call(m[x].context,p,c,v);break;default:if(!T)for(I=1,T=new Array(w-1);I<w;I++)T[I-1]=arguments[I];m[x].fn.apply(m[x].context,T)}}return!0},f.prototype.on=function(d,p,c){var v=new u(p,c||this),y=o?o+d:d;return this._events[y]?this._events[y].fn?this._events[y]=[this._events[y],v]:this._events[y].push(v):(this._events[y]=v,this._eventsCount++),this},f.prototype.once=function(d,p,c){var v=new u(p,c||this,!0),y=o?o+d:d;return this._events[y]?this._events[y].fn?this._events[y]=[this._events[y],v]:this._events[y].push(v):(this._events[y]=v,this._eventsCount++),this},f.prototype.removeListener=function(d,p,c,v){var y=o?o+d:d;if(!this._events[y])return this;if(!p)return--this._eventsCount===0?this._events=new a:delete this._events[y],this;var _=this._events[y];if(_.fn)_.fn===p&&(!v||_.once)&&(!c||_.context===c)&&(--this._eventsCount===0?this._events=new a:delete this._events[y]);else{for(var b=0,m=[],w=_.length;b<w;b++)(_[b].fn!==p||v&&!_[b].once||c&&_[b].context!==c)&&m.push(_[b]);m.length?this._events[y]=m.length===1?m[0]:m:--this._eventsCount===0?this._events=new a:delete this._events[y]}return this},f.prototype.removeAllListeners=function(d){var p;return d?(p=o?o+d:d,this._events[p]&&(--this._eventsCount===0?this._events=new a:delete this._events[p])):(this._events=new a,this._eventsCount=0),this},f.prototype.off=f.prototype.removeListener,f.prototype.addListener=f.prototype.on,f.prototype.setMaxListeners=function(){return this},f.prefixed=o,f.EventEmitter=f,typeof r<"u"&&(r.exports=f)},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.matchText=n.matchSpacing=n.matchNewline=n.matchBlot=n.matchAttributor=n.default=void 0;var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(it){return typeof it}:function(it){return it&&typeof Symbol=="function"&&it.constructor===Symbol&&it!==Symbol.prototype?"symbol":typeof it},a=function(){function it(ut,dt){var gt=[],at=!0,It=!1,St=void 0;try{for(var Mt=ut[Symbol.iterator](),He;!(at=(He=Mt.next()).done)&&(gt.push(He.value),!(dt&&gt.length===dt));at=!0);}catch(Ge){It=!0,St=Ge}finally{try{!at&&Mt.return&&Mt.return()}finally{if(It)throw St}}return gt}return function(ut,dt){if(Array.isArray(ut))return ut;if(Symbol.iterator in Object(ut))return it(ut,dt);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function it(ut,dt){for(var gt=0;gt<dt.length;gt++){var at=dt[gt];at.enumerable=at.enumerable||!1,at.configurable=!0,"value"in at&&(at.writable=!0),Object.defineProperty(ut,at.key,at)}}return function(ut,dt,gt){return dt&&it(ut.prototype,dt),gt&&it(ut,gt),ut}}(),f=i(3),h=P(f),d=i(2),p=P(d),c=i(0),v=P(c),y=i(5),_=P(y),b=i(10),m=P(b),w=i(9),T=P(w),x=i(36),E=i(37),I=i(13),O=P(I),A=i(26),L=i(38),R=i(39),C=i(40);function P(it){return it&&it.__esModule?it:{default:it}}function M(it,ut,dt){return ut in it?Object.defineProperty(it,ut,{value:dt,enumerable:!0,configurable:!0,writable:!0}):it[ut]=dt,it}function F(it,ut){if(!(it instanceof ut))throw new TypeError("Cannot call a class as a function")}function q(it,ut){if(!it)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ut&&(typeof ut=="object"||typeof ut=="function")?ut:it}function Z(it,ut){if(typeof ut!="function"&&ut!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ut);it.prototype=Object.create(ut&&ut.prototype,{constructor:{value:it,enumerable:!1,writable:!0,configurable:!0}}),ut&&(Object.setPrototypeOf?Object.setPrototypeOf(it,ut):it.__proto__=ut)}var z=(0,m.default)("quill:clipboard"),nt="__ql-matcher",V=[[Node.TEXT_NODE,Ut],[Node.TEXT_NODE,_t],["br",ot],[Node.ELEMENT_NODE,_t],[Node.ELEMENT_NODE,rt],[Node.ELEMENT_NODE,At],[Node.ELEMENT_NODE,Y],[Node.ELEMENT_NODE,ne],["li",vt],["b",et.bind(et,"bold")],["i",et.bind(et,"italic")],["style",pt]],D=[x.AlignAttribute,L.DirectionAttribute].reduce(function(it,ut){return it[ut.keyName]=ut,it},{}),k=[x.AlignStyle,E.BackgroundStyle,A.ColorStyle,L.DirectionStyle,R.FontStyle,C.SizeStyle].reduce(function(it,ut){return it[ut.keyName]=ut,it},{}),G=function(it){Z(ut,it);function ut(dt,gt){F(this,ut);var at=q(this,(ut.__proto__||Object.getPrototypeOf(ut)).call(this,dt,gt));return at.quill.root.addEventListener("paste",at.onPaste.bind(at)),at.container=at.quill.addContainer("ql-clipboard"),at.container.setAttribute("contenteditable",!0),at.container.setAttribute("tabindex",-1),at.matchers=[],V.concat(at.options.matchers).forEach(function(It){var St=a(It,2),Mt=St[0],He=St[1];!gt.matchVisual&&He===At||at.addMatcher(Mt,He)}),at}return u(ut,[{key:"addMatcher",value:function(gt,at){this.matchers.push([gt,at])}},{key:"convert",value:function(gt){if(typeof gt=="string")return this.container.innerHTML=gt.replace(/\>\r?\n +\</g,"><"),this.convert();var at=this.quill.getFormat(this.quill.selection.savedRange.index);if(at[O.default.blotName]){var It=this.container.innerText;return this.container.innerHTML="",new p.default().insert(It,M({},O.default.blotName,at[O.default.blotName]))}var St=this.prepareMatching(),Mt=a(St,2),He=Mt[0],Ge=Mt[1],Qt=W(this.container,He,Ge);return K(Qt,`
1992
+ `)&&Qt.ops[Qt.ops.length-1].attributes==null&&(Qt=Qt.compose(new p.default().retain(Qt.length()-1).delete(1))),z.log("convert",this.container.innerHTML,Qt),this.container.innerHTML="",Qt}},{key:"dangerouslyPasteHTML",value:function(gt,at){var It=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_.default.sources.API;if(typeof gt=="string")this.quill.setContents(this.convert(gt),at),this.quill.setSelection(0,_.default.sources.SILENT);else{var St=this.convert(at);this.quill.updateContents(new p.default().retain(gt).concat(St),It),this.quill.setSelection(gt+St.length(),_.default.sources.SILENT)}}},{key:"onPaste",value:function(gt){var at=this;if(!(gt.defaultPrevented||!this.quill.isEnabled())){var It=this.quill.getSelection(),St=new p.default().retain(It.index),Mt=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(_.default.sources.SILENT),setTimeout(function(){St=St.concat(at.convert()).delete(It.length),at.quill.updateContents(St,_.default.sources.USER),at.quill.setSelection(St.length()-It.length,_.default.sources.SILENT),at.quill.scrollingContainer.scrollTop=Mt,at.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var gt=this,at=[],It=[];return this.matchers.forEach(function(St){var Mt=a(St,2),He=Mt[0],Ge=Mt[1];switch(He){case Node.TEXT_NODE:It.push(Ge);break;case Node.ELEMENT_NODE:at.push(Ge);break;default:[].forEach.call(gt.container.querySelectorAll(He),function(Qt){Qt[nt]=Qt[nt]||[],Qt[nt].push(Ge)});break}}),[at,It]}}]),ut}(T.default);G.DEFAULTS={matchers:[],matchVisual:!0};function j(it,ut,dt){return(typeof ut>"u"?"undefined":o(ut))==="object"?Object.keys(ut).reduce(function(gt,at){return j(gt,at,ut[at])},it):it.reduce(function(gt,at){return at.attributes&&at.attributes[ut]?gt.push(at):gt.insert(at.insert,(0,h.default)({},M({},ut,dt),at.attributes))},new p.default)}function Q(it){if(it.nodeType!==Node.ELEMENT_NODE)return{};var ut="__ql-computed-style";return it[ut]||(it[ut]=window.getComputedStyle(it))}function K(it,ut){for(var dt="",gt=it.ops.length-1;gt>=0&&dt.length<ut.length;--gt){var at=it.ops[gt];if(typeof at.insert!="string")break;dt=at.insert+dt}return dt.slice(-1*ut.length)===ut}function $(it){if(it.childNodes.length===0)return!1;var ut=Q(it);return["block","list-item"].indexOf(ut.display)>-1}function W(it,ut,dt){return it.nodeType===it.TEXT_NODE?dt.reduce(function(gt,at){return at(it,gt)},new p.default):it.nodeType===it.ELEMENT_NODE?[].reduce.call(it.childNodes||[],function(gt,at){var It=W(at,ut,dt);return at.nodeType===it.ELEMENT_NODE&&(It=ut.reduce(function(St,Mt){return Mt(at,St)},It),It=(at[nt]||[]).reduce(function(St,Mt){return Mt(at,St)},It)),gt.concat(It)},new p.default):new p.default}function et(it,ut,dt){return j(dt,it,!0)}function Y(it,ut){var dt=v.default.Attributor.Attribute.keys(it),gt=v.default.Attributor.Class.keys(it),at=v.default.Attributor.Style.keys(it),It={};return dt.concat(gt).concat(at).forEach(function(St){var Mt=v.default.query(St,v.default.Scope.ATTRIBUTE);Mt!=null&&(It[Mt.attrName]=Mt.value(it),It[Mt.attrName])||(Mt=D[St],Mt!=null&&(Mt.attrName===St||Mt.keyName===St)&&(It[Mt.attrName]=Mt.value(it)||void 0),Mt=k[St],Mt!=null&&(Mt.attrName===St||Mt.keyName===St)&&(Mt=k[St],It[Mt.attrName]=Mt.value(it)||void 0))}),Object.keys(It).length>0&&(ut=j(ut,It)),ut}function rt(it,ut){var dt=v.default.query(it);if(dt==null)return ut;if(dt.prototype instanceof v.default.Embed){var gt={},at=dt.value(it);at!=null&&(gt[dt.blotName]=at,ut=new p.default().insert(gt,dt.formats(it)))}else typeof dt.formats=="function"&&(ut=j(ut,dt.blotName,dt.formats(it)));return ut}function ot(it,ut){return K(ut,`
1993
+ `)||ut.insert(`
1994
+ `),ut}function pt(){return new p.default}function vt(it,ut){var dt=v.default.query(it);if(dt==null||dt.blotName!=="list-item"||!K(ut,`
1995
+ `))return ut;for(var gt=-1,at=it.parentNode;!at.classList.contains("ql-clipboard");)(v.default.query(at)||{}).blotName==="list"&&(gt+=1),at=at.parentNode;return gt<=0?ut:ut.compose(new p.default().retain(ut.length()-1).retain(1,{indent:gt}))}function _t(it,ut){return K(ut,`
1996
+ `)||($(it)||ut.length()>0&&it.nextSibling&&$(it.nextSibling))&&ut.insert(`
1997
+ `),ut}function At(it,ut){if($(it)&&it.nextElementSibling!=null&&!K(ut,`
1998
+
1999
+ `)){var dt=it.offsetHeight+parseFloat(Q(it).marginTop)+parseFloat(Q(it).marginBottom);it.nextElementSibling.offsetTop>it.offsetTop+dt*1.5&&ut.insert(`
2000
+ `)}return ut}function ne(it,ut){var dt={},gt=it.style||{};return gt.fontStyle&&Q(it).fontStyle==="italic"&&(dt.italic=!0),gt.fontWeight&&(Q(it).fontWeight.startsWith("bold")||parseInt(Q(it).fontWeight)>=700)&&(dt.bold=!0),Object.keys(dt).length>0&&(ut=j(ut,dt)),parseFloat(gt.textIndent||0)>0&&(ut=new p.default().insert(" ").concat(ut)),ut}function Ut(it,ut){var dt=it.data;if(it.parentNode.tagName==="O:P")return ut.insert(dt.trim());if(dt.trim().length===0&&it.parentNode.classList.contains("ql-clipboard"))return ut;if(!Q(it.parentNode).whiteSpace.startsWith("pre")){var gt=function(It,St){return St=St.replace(/[^\u00a0]/g,""),St.length<1&&It?" ":St};dt=dt.replace(/\r\n/g," ").replace(/\n/g," "),dt=dt.replace(/\s\s+/g,gt.bind(gt,!0)),(it.previousSibling==null&&$(it.parentNode)||it.previousSibling!=null&&$(it.previousSibling))&&(dt=dt.replace(/^\s+/,gt.bind(gt,!1))),(it.nextSibling==null&&$(it.parentNode)||it.nextSibling!=null&&$(it.nextSibling))&&(dt=dt.replace(/\s+$/,gt.bind(gt,!1)))}return ut.insert(dt)}n.default=G,n.matchAttributor=Y,n.matchBlot=rt,n.matchNewline=_t,n.matchSpacing=At,n.matchText=Ut},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function y(_,b){for(var m=0;m<b.length;m++){var w=b[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(_,w.key,w)}}return function(_,b,m){return b&&y(_.prototype,b),m&&y(_,m),_}}(),a=function y(_,b,m){_===null&&(_=Function.prototype);var w=Object.getOwnPropertyDescriptor(_,b);if(w===void 0){var T=Object.getPrototypeOf(_);return T===null?void 0:y(T,b,m)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(m)}},u=i(6),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function d(y,_){if(!(y instanceof _))throw new TypeError("Cannot call a class as a function")}function p(y,_){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:y}function c(y,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);y.prototype=Object.create(_&&_.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(y,_):y.__proto__=_)}var v=function(y){c(_,y);function _(){return d(this,_),p(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return o(_,[{key:"optimize",value:function(m){a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"optimize",this).call(this,m),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return a(_.__proto__||Object.getPrototypeOf(_),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),_}(f.default);v.blotName="bold",v.tagName=["STRONG","B"],n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.addControls=n.default=void 0;var o=function(){function C(P,M){var F=[],q=!0,Z=!1,z=void 0;try{for(var nt=P[Symbol.iterator](),V;!(q=(V=nt.next()).done)&&(F.push(V.value),!(M&&F.length===M));q=!0);}catch(D){Z=!0,z=D}finally{try{!q&&nt.return&&nt.return()}finally{if(Z)throw z}}return F}return function(P,M){if(Array.isArray(P))return P;if(Symbol.iterator in Object(P))return C(P,M);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function C(P,M){for(var F=0;F<M.length;F++){var q=M[F];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(P,q.key,q)}}return function(P,M,F){return M&&C(P.prototype,M),F&&C(P,F),P}}(),u=i(2),f=m(u),h=i(0),d=m(h),p=i(5),c=m(p),v=i(10),y=m(v),_=i(9),b=m(_);function m(C){return C&&C.__esModule?C:{default:C}}function w(C,P,M){return P in C?Object.defineProperty(C,P,{value:M,enumerable:!0,configurable:!0,writable:!0}):C[P]=M,C}function T(C,P){if(!(C instanceof P))throw new TypeError("Cannot call a class as a function")}function x(C,P){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P&&(typeof P=="object"||typeof P=="function")?P:C}function E(C,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof P);C.prototype=Object.create(P&&P.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),P&&(Object.setPrototypeOf?Object.setPrototypeOf(C,P):C.__proto__=P)}var I=(0,y.default)("quill:toolbar"),O=function(C){E(P,C);function P(M,F){T(this,P);var q=x(this,(P.__proto__||Object.getPrototypeOf(P)).call(this,M,F));if(Array.isArray(q.options.container)){var Z=document.createElement("div");L(Z,q.options.container),M.container.parentNode.insertBefore(Z,M.container),q.container=Z}else typeof q.options.container=="string"?q.container=document.querySelector(q.options.container):q.container=q.options.container;if(!(q.container instanceof HTMLElement)){var z;return z=I.error("Container required for toolbar",q.options),x(q,z)}return q.container.classList.add("ql-toolbar"),q.controls=[],q.handlers={},Object.keys(q.options.handlers).forEach(function(nt){q.addHandler(nt,q.options.handlers[nt])}),[].forEach.call(q.container.querySelectorAll("button, select"),function(nt){q.attach(nt)}),q.quill.on(c.default.events.EDITOR_CHANGE,function(nt,V){nt===c.default.events.SELECTION_CHANGE&&q.update(V)}),q.quill.on(c.default.events.SCROLL_OPTIMIZE,function(){var nt=q.quill.selection.getRange(),V=o(nt,1),D=V[0];q.update(D)}),q}return a(P,[{key:"addHandler",value:function(F,q){this.handlers[F]=q}},{key:"attach",value:function(F){var q=this,Z=[].find.call(F.classList,function(nt){return nt.indexOf("ql-")===0});if(Z){if(Z=Z.slice(3),F.tagName==="BUTTON"&&F.setAttribute("type","button"),this.handlers[Z]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[Z]==null){I.warn("ignoring attaching to disabled format",Z,F);return}if(d.default.query(Z)==null){I.warn("ignoring attaching to nonexistent format",Z,F);return}}var z=F.tagName==="SELECT"?"change":"click";F.addEventListener(z,function(nt){var V=void 0;if(F.tagName==="SELECT"){if(F.selectedIndex<0)return;var D=F.options[F.selectedIndex];D.hasAttribute("selected")?V=!1:V=D.value||!1}else F.classList.contains("ql-active")?V=!1:V=F.value||!F.hasAttribute("value"),nt.preventDefault();q.quill.focus();var k=q.quill.selection.getRange(),G=o(k,1),j=G[0];if(q.handlers[Z]!=null)q.handlers[Z].call(q,V);else if(d.default.query(Z).prototype instanceof d.default.Embed){if(V=prompt("Enter "+Z),!V)return;q.quill.updateContents(new f.default().retain(j.index).delete(j.length).insert(w({},Z,V)),c.default.sources.USER)}else q.quill.format(Z,V,c.default.sources.USER);q.update(j)}),this.controls.push([Z,F])}}},{key:"update",value:function(F){var q=F==null?{}:this.quill.getFormat(F);this.controls.forEach(function(Z){var z=o(Z,2),nt=z[0],V=z[1];if(V.tagName==="SELECT"){var D=void 0;if(F==null)D=null;else if(q[nt]==null)D=V.querySelector("option[selected]");else if(!Array.isArray(q[nt])){var k=q[nt];typeof k=="string"&&(k=k.replace(/\"/g,'\\"')),D=V.querySelector('option[value="'+k+'"]')}D==null?(V.value="",V.selectedIndex=-1):D.selected=!0}else if(F==null)V.classList.remove("ql-active");else if(V.hasAttribute("value")){var G=q[nt]===V.getAttribute("value")||q[nt]!=null&&q[nt].toString()===V.getAttribute("value")||q[nt]==null&&!V.getAttribute("value");V.classList.toggle("ql-active",G)}else V.classList.toggle("ql-active",q[nt]!=null)})}}]),P}(b.default);O.DEFAULTS={};function A(C,P,M){var F=document.createElement("button");F.setAttribute("type","button"),F.classList.add("ql-"+P),M!=null&&(F.value=M),C.appendChild(F)}function L(C,P){Array.isArray(P[0])||(P=[P]),P.forEach(function(M){var F=document.createElement("span");F.classList.add("ql-formats"),M.forEach(function(q){if(typeof q=="string")A(F,q);else{var Z=Object.keys(q)[0],z=q[Z];Array.isArray(z)?R(F,Z,z):A(F,Z,z)}}),C.appendChild(F)})}function R(C,P,M){var F=document.createElement("select");F.classList.add("ql-"+P),M.forEach(function(q){var Z=document.createElement("option");q!==!1?Z.setAttribute("value",q):Z.setAttribute("selected","selected"),F.appendChild(Z)}),C.appendChild(F)}O.DEFAULTS={container:null,handlers:{clean:function(){var P=this,M=this.quill.getSelection();if(M!=null)if(M.length==0){var F=this.quill.getFormat();Object.keys(F).forEach(function(q){d.default.query(q,d.default.Scope.INLINE)!=null&&P.quill.format(q,!1)})}else this.quill.removeFormat(M,c.default.sources.USER)},direction:function(P){var M=this.quill.getFormat().align;P==="rtl"&&M==null?this.quill.format("align","right",c.default.sources.USER):!P&&M==="right"&&this.quill.format("align",!1,c.default.sources.USER),this.quill.format("direction",P,c.default.sources.USER)},indent:function(P){var M=this.quill.getSelection(),F=this.quill.getFormat(M),q=parseInt(F.indent||0);if(P==="+1"||P==="-1"){var Z=P==="+1"?1:-1;F.direction==="rtl"&&(Z*=-1),this.quill.format("indent",q+Z,c.default.sources.USER)}},link:function(P){P===!0&&(P=prompt("Enter link URL:")),this.quill.format("link",P,c.default.sources.USER)},list:function(P){var M=this.quill.getSelection(),F=this.quill.getFormat(M);P==="check"?F.list==="checked"||F.list==="unchecked"?this.quill.format("list",!1,c.default.sources.USER):this.quill.format("list","unchecked",c.default.sources.USER):this.quill.format("list",P,c.default.sources.USER)}}},n.default=O,n.addControls=L},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function y(_,b){for(var m=0;m<b.length;m++){var w=b[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(_,w.key,w)}}return function(_,b,m){return b&&y(_.prototype,b),m&&y(_,m),_}}(),a=function y(_,b,m){_===null&&(_=Function.prototype);var w=Object.getOwnPropertyDescriptor(_,b);if(w===void 0){var T=Object.getPrototypeOf(_);return T===null?void 0:y(T,b,m)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(m)}},u=i(28),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function d(y,_){if(!(y instanceof _))throw new TypeError("Cannot call a class as a function")}function p(y,_){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:y}function c(y,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);y.prototype=Object.create(_&&_.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(y,_):y.__proto__=_)}var v=function(y){c(_,y);function _(b,m){d(this,_);var w=p(this,(_.__proto__||Object.getPrototypeOf(_)).call(this,b));return w.label.innerHTML=m,w.container.classList.add("ql-color-picker"),[].slice.call(w.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(T){T.classList.add("ql-primary")}),w}return o(_,[{key:"buildItem",value:function(m){var w=a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"buildItem",this).call(this,m);return w.style.backgroundColor=m.getAttribute("value")||"",w}},{key:"selectItem",value:function(m,w){a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"selectItem",this).call(this,m,w);var T=this.label.querySelector(".ql-color-label"),x=m&&m.getAttribute("data-value")||"";T&&(T.tagName==="line"?T.style.stroke=x:T.style.fill=x)}}]),_}(f.default);n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function y(_,b){for(var m=0;m<b.length;m++){var w=b[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(_,w.key,w)}}return function(_,b,m){return b&&y(_.prototype,b),m&&y(_,m),_}}(),a=function y(_,b,m){_===null&&(_=Function.prototype);var w=Object.getOwnPropertyDescriptor(_,b);if(w===void 0){var T=Object.getPrototypeOf(_);return T===null?void 0:y(T,b,m)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(m)}},u=i(28),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function d(y,_){if(!(y instanceof _))throw new TypeError("Cannot call a class as a function")}function p(y,_){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:y}function c(y,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);y.prototype=Object.create(_&&_.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(y,_):y.__proto__=_)}var v=function(y){c(_,y);function _(b,m){d(this,_);var w=p(this,(_.__proto__||Object.getPrototypeOf(_)).call(this,b));return w.container.classList.add("ql-icon-picker"),[].forEach.call(w.container.querySelectorAll(".ql-picker-item"),function(T){T.innerHTML=m[T.getAttribute("data-value")||""]}),w.defaultItem=w.container.querySelector(".ql-selected"),w.selectItem(w.defaultItem),w}return o(_,[{key:"selectItem",value:function(m,w){a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"selectItem",this).call(this,m,w),m=m||this.defaultItem,this.label.innerHTML=m.innerHTML}}]),_}(f.default);n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function f(h,d){for(var p=0;p<d.length;p++){var c=d[p];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(h,c.key,c)}}return function(h,d,p){return d&&f(h.prototype,d),p&&f(h,p),h}}();function a(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")}var u=function(){function f(h,d){var p=this;a(this,f),this.quill=h,this.boundsContainer=d||document.body,this.root=h.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){p.root.style.marginTop=-1*p.quill.root.scrollTop+"px"}),this.hide()}return o(f,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(d){var p=d.left+d.width/2-this.root.offsetWidth/2,c=d.bottom+this.quill.root.scrollTop;this.root.style.left=p+"px",this.root.style.top=c+"px",this.root.classList.remove("ql-flip");var v=this.boundsContainer.getBoundingClientRect(),y=this.root.getBoundingClientRect(),_=0;if(y.right>v.right&&(_=v.right-y.right,this.root.style.left=p+_+"px"),y.left<v.left&&(_=v.left-y.left,this.root.style.left=p+_+"px"),y.bottom>v.bottom){var b=y.bottom-y.top,m=d.bottom-d.top+b;this.root.style.top=c-m+"px",this.root.classList.add("ql-flip")}return _}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),f}();n.default=u},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function R(C,P){var M=[],F=!0,q=!1,Z=void 0;try{for(var z=C[Symbol.iterator](),nt;!(F=(nt=z.next()).done)&&(M.push(nt.value),!(P&&M.length===P));F=!0);}catch(V){q=!0,Z=V}finally{try{!F&&z.return&&z.return()}finally{if(q)throw Z}}return M}return function(C,P){if(Array.isArray(C))return C;if(Symbol.iterator in Object(C))return R(C,P);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function R(C,P,M){C===null&&(C=Function.prototype);var F=Object.getOwnPropertyDescriptor(C,P);if(F===void 0){var q=Object.getPrototypeOf(C);return q===null?void 0:R(q,P,M)}else{if("value"in F)return F.value;var Z=F.get;return Z===void 0?void 0:Z.call(M)}},u=function(){function R(C,P){for(var M=0;M<P.length;M++){var F=P[M];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(C,F.key,F)}}return function(C,P,M){return P&&R(C.prototype,P),M&&R(C,M),C}}(),f=i(3),h=T(f),d=i(8),p=T(d),c=i(43),v=T(c),y=i(27),_=T(y),b=i(15),m=i(41),w=T(m);function T(R){return R&&R.__esModule?R:{default:R}}function x(R,C){if(!(R instanceof C))throw new TypeError("Cannot call a class as a function")}function E(R,C){if(!R)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:R}function I(R,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);R.prototype=Object.create(C&&C.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(R,C):R.__proto__=C)}var O=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],A=function(R){I(C,R);function C(P,M){x(this,C),M.modules.toolbar!=null&&M.modules.toolbar.container==null&&(M.modules.toolbar.container=O);var F=E(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,P,M));return F.quill.container.classList.add("ql-snow"),F}return u(C,[{key:"extendToolbar",value:function(M){M.container.classList.add("ql-snow"),this.buildButtons([].slice.call(M.container.querySelectorAll("button")),w.default),this.buildPickers([].slice.call(M.container.querySelectorAll("select")),w.default),this.tooltip=new L(this.quill,this.options.bounds),M.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(F,q){M.handlers.link.call(M,!q.format.link)})}}]),C}(v.default);A.DEFAULTS=(0,h.default)(!0,{},v.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(C){if(C){var P=this.quill.getSelection();if(P==null||P.length==0)return;var M=this.quill.getText(P);/^\S+@\S+\.\S+$/.test(M)&&M.indexOf("mailto:")!==0&&(M="mailto:"+M);var F=this.quill.theme.tooltip;F.edit("link",M)}else this.quill.format("link",!1)}}}}});var L=function(R){I(C,R);function C(P,M){x(this,C);var F=E(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,P,M));return F.preview=F.root.querySelector("a.ql-preview"),F}return u(C,[{key:"listen",value:function(){var M=this;a(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(F){M.root.classList.contains("ql-editing")?M.save():M.edit("link",M.preview.textContent),F.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(F){if(M.linkRange!=null){var q=M.linkRange;M.restoreFocus(),M.quill.formatText(q,"link",!1,p.default.sources.USER),delete M.linkRange}F.preventDefault(),M.hide()}),this.quill.on(p.default.events.SELECTION_CHANGE,function(F,q,Z){if(F!=null){if(F.length===0&&Z===p.default.sources.USER){var z=M.quill.scroll.descendant(_.default,F.index),nt=o(z,2),V=nt[0],D=nt[1];if(V!=null){M.linkRange=new b.Range(F.index-D,V.length());var k=_.default.formats(V.domNode);M.preview.textContent=k,M.preview.setAttribute("href",k),M.show(),M.position(M.quill.getBounds(M.linkRange));return}}else delete M.linkRange;M.hide()}})}},{key:"show",value:function(){a(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),C}(c.BaseTooltip);L.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),n.default=A},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(29),a=at(o),u=i(36),f=i(38),h=i(64),d=i(65),p=at(d),c=i(66),v=at(c),y=i(67),_=at(y),b=i(37),m=i(26),w=i(39),T=i(40),x=i(56),E=at(x),I=i(68),O=at(I),A=i(27),L=at(A),R=i(69),C=at(R),P=i(70),M=at(P),F=i(71),q=at(F),Z=i(72),z=at(Z),nt=i(73),V=at(nt),D=i(13),k=at(D),G=i(74),j=at(G),Q=i(75),K=at(Q),$=i(57),W=at($),et=i(41),Y=at(et),rt=i(28),ot=at(rt),pt=i(59),vt=at(pt),_t=i(60),At=at(_t),ne=i(61),Ut=at(ne),it=i(108),ut=at(it),dt=i(62),gt=at(dt);function at(It){return It&&It.__esModule?It:{default:It}}a.default.register({"attributors/attribute/direction":f.DirectionAttribute,"attributors/class/align":u.AlignClass,"attributors/class/background":b.BackgroundClass,"attributors/class/color":m.ColorClass,"attributors/class/direction":f.DirectionClass,"attributors/class/font":w.FontClass,"attributors/class/size":T.SizeClass,"attributors/style/align":u.AlignStyle,"attributors/style/background":b.BackgroundStyle,"attributors/style/color":m.ColorStyle,"attributors/style/direction":f.DirectionStyle,"attributors/style/font":w.FontStyle,"attributors/style/size":T.SizeStyle},!0),a.default.register({"formats/align":u.AlignClass,"formats/direction":f.DirectionClass,"formats/indent":h.IndentClass,"formats/background":b.BackgroundStyle,"formats/color":m.ColorStyle,"formats/font":w.FontClass,"formats/size":T.SizeClass,"formats/blockquote":p.default,"formats/code-block":k.default,"formats/header":v.default,"formats/list":_.default,"formats/bold":E.default,"formats/code":D.Code,"formats/italic":O.default,"formats/link":L.default,"formats/script":C.default,"formats/strike":M.default,"formats/underline":q.default,"formats/image":z.default,"formats/video":V.default,"formats/list/item":y.ListItem,"modules/formula":j.default,"modules/syntax":K.default,"modules/toolbar":W.default,"themes/bubble":ut.default,"themes/snow":gt.default,"ui/icons":Y.default,"ui/picker":ot.default,"ui/icon-picker":At.default,"ui/color-picker":vt.default,"ui/tooltip":Ut.default},!0),n.default=a.default},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.IndentClass=void 0;var o=function(){function _(b,m){for(var w=0;w<m.length;w++){var T=m[w];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(b,T.key,T)}}return function(b,m,w){return m&&_(b.prototype,m),w&&_(b,w),b}}(),a=function _(b,m,w){b===null&&(b=Function.prototype);var T=Object.getOwnPropertyDescriptor(b,m);if(T===void 0){var x=Object.getPrototypeOf(b);return x===null?void 0:_(x,m,w)}else{if("value"in T)return T.value;var E=T.get;return E===void 0?void 0:E.call(w)}},u=i(0),f=h(u);function h(_){return _&&_.__esModule?_:{default:_}}function d(_,b){if(!(_ instanceof b))throw new TypeError("Cannot call a class as a function")}function p(_,b){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:_}function c(_,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);_.prototype=Object.create(b&&b.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(_,b):_.__proto__=b)}var v=function(_){c(b,_);function b(){return d(this,b),p(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return o(b,[{key:"add",value:function(w,T){if(T==="+1"||T==="-1"){var x=this.value(w)||0;T=T==="+1"?x+1:x-1}return T===0?(this.remove(w),!0):a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"add",this).call(this,w,T)}},{key:"canAdd",value:function(w,T){return a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"canAdd",this).call(this,w,T)||a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"canAdd",this).call(this,w,parseInt(T))}},{key:"value",value:function(w){return parseInt(a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"value",this).call(this,w))||void 0}}]),b}(f.default.Attributor.Class),y=new v("indent","ql-indent",{scope:f.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});n.IndentClass=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(4),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function d(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var p=function(c){d(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(a.default);p.blotName="blockquote",p.tagName="blockquote",n.default=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function v(y,_){for(var b=0;b<_.length;b++){var m=_[b];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(y,m.key,m)}}return function(y,_,b){return _&&v(y.prototype,_),b&&v(y,b),y}}(),a=i(4),u=f(a);function f(v){return v&&v.__esModule?v:{default:v}}function h(v,y){if(!(v instanceof y))throw new TypeError("Cannot call a class as a function")}function d(v,y){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:v}function p(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);v.prototype=Object.create(y&&y.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(v,y):v.__proto__=y)}var c=function(v){p(y,v);function y(){return h(this,y),d(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return o(y,null,[{key:"formats",value:function(b){return this.tagName.indexOf(b.tagName)+1}}]),y}(u.default);c.blotName="header",c.tagName=["H1","H2","H3","H4","H5","H6"],n.default=c},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.ListItem=void 0;var o=function(){function x(E,I){for(var O=0;O<I.length;O++){var A=I[O];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(E,A.key,A)}}return function(E,I,O){return I&&x(E.prototype,I),O&&x(E,O),E}}(),a=function x(E,I,O){E===null&&(E=Function.prototype);var A=Object.getOwnPropertyDescriptor(E,I);if(A===void 0){var L=Object.getPrototypeOf(E);return L===null?void 0:x(L,I,O)}else{if("value"in A)return A.value;var R=A.get;return R===void 0?void 0:R.call(O)}},u=i(0),f=v(u),h=i(4),d=v(h),p=i(25),c=v(p);function v(x){return x&&x.__esModule?x:{default:x}}function y(x,E,I){return E in x?Object.defineProperty(x,E,{value:I,enumerable:!0,configurable:!0,writable:!0}):x[E]=I,x}function _(x,E){if(!(x instanceof E))throw new TypeError("Cannot call a class as a function")}function b(x,E){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:x}function m(x,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);x.prototype=Object.create(E&&E.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(x,E):x.__proto__=E)}var w=function(x){m(E,x);function E(){return _(this,E),b(this,(E.__proto__||Object.getPrototypeOf(E)).apply(this,arguments))}return o(E,[{key:"format",value:function(O,A){O===T.blotName&&!A?this.replaceWith(f.default.create(this.statics.scope)):a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"format",this).call(this,O,A)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(O,A){return this.parent.isolate(this.offset(this.parent),this.length()),O===this.parent.statics.blotName?(this.parent.replaceWith(O,A),this):(this.parent.unwrap(),a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"replaceWith",this).call(this,O,A))}}],[{key:"formats",value:function(O){return O.tagName===this.tagName?void 0:a(E.__proto__||Object.getPrototypeOf(E),"formats",this).call(this,O)}}]),E}(d.default);w.blotName="list-item",w.tagName="LI";var T=function(x){m(E,x),o(E,null,[{key:"create",value:function(O){var A=O==="ordered"?"OL":"UL",L=a(E.__proto__||Object.getPrototypeOf(E),"create",this).call(this,A);return(O==="checked"||O==="unchecked")&&L.setAttribute("data-checked",O==="checked"),L}},{key:"formats",value:function(O){if(O.tagName==="OL")return"ordered";if(O.tagName==="UL")return O.hasAttribute("data-checked")?O.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function E(I){_(this,E);var O=b(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,I)),A=function(R){if(R.target.parentNode===I){var C=O.statics.formats(I),P=f.default.find(R.target);C==="checked"?P.format("list","unchecked"):C==="unchecked"&&P.format("list","checked")}};return I.addEventListener("touchstart",A),I.addEventListener("mousedown",A),O}return o(E,[{key:"format",value:function(O,A){this.children.length>0&&this.children.tail.format(O,A)}},{key:"formats",value:function(){return y({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(O,A){if(O instanceof w)a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"insertBefore",this).call(this,O,A);else{var L=A==null?this.length():A.offset(this),R=this.split(L);R.parent.insertBefore(O,R)}}},{key:"optimize",value:function(O){a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"optimize",this).call(this,O);var A=this.next;A!=null&&A.prev===this&&A.statics.blotName===this.statics.blotName&&A.domNode.tagName===this.domNode.tagName&&A.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(A.moveChildren(this),A.remove())}},{key:"replace",value:function(O){if(O.statics.blotName!==this.statics.blotName){var A=f.default.create(this.statics.defaultChild);O.moveChildren(A),this.appendChild(A)}a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"replace",this).call(this,O)}}]),E}(c.default);T.blotName="list",T.scope=f.default.Scope.BLOCK_BLOT,T.tagName=["OL","UL"],T.defaultChild="list-item",T.allowedChildren=[w],n.ListItem=w,n.default=T},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(56),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function d(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var p=function(c){d(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(a.default);p.blotName="italic",p.tagName=["EM","I"],n.default=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function y(_,b){for(var m=0;m<b.length;m++){var w=b[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(_,w.key,w)}}return function(_,b,m){return b&&y(_.prototype,b),m&&y(_,m),_}}(),a=function y(_,b,m){_===null&&(_=Function.prototype);var w=Object.getOwnPropertyDescriptor(_,b);if(w===void 0){var T=Object.getPrototypeOf(_);return T===null?void 0:y(T,b,m)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(m)}},u=i(6),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function d(y,_){if(!(y instanceof _))throw new TypeError("Cannot call a class as a function")}function p(y,_){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:y}function c(y,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);y.prototype=Object.create(_&&_.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(y,_):y.__proto__=_)}var v=function(y){c(_,y);function _(){return d(this,_),p(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return o(_,null,[{key:"create",value:function(m){return m==="super"?document.createElement("sup"):m==="sub"?document.createElement("sub"):a(_.__proto__||Object.getPrototypeOf(_),"create",this).call(this,m)}},{key:"formats",value:function(m){if(m.tagName==="SUB")return"sub";if(m.tagName==="SUP")return"super"}}]),_}(f.default);v.blotName="script",v.tagName=["SUB","SUP"],n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(6),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function d(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var p=function(c){d(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(a.default);p.blotName="strike",p.tagName="S",n.default=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(6),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function d(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var p=function(c){d(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(a.default);p.blotName="underline",p.tagName="U",n.default=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function b(m,w){for(var T=0;T<w.length;T++){var x=w[T];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,w,T){return w&&b(m.prototype,w),T&&b(m,T),m}}(),a=function b(m,w,T){m===null&&(m=Function.prototype);var x=Object.getOwnPropertyDescriptor(m,w);if(x===void 0){var E=Object.getPrototypeOf(m);return E===null?void 0:b(E,w,T)}else{if("value"in x)return x.value;var I=x.get;return I===void 0?void 0:I.call(T)}},u=i(0),f=d(u),h=i(27);function d(b){return b&&b.__esModule?b:{default:b}}function p(b,m){if(!(b instanceof m))throw new TypeError("Cannot call a class as a function")}function c(b,m){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:b}function v(b,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);b.prototype=Object.create(m&&m.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(b,m):b.__proto__=m)}var y=["alt","height","width"],_=function(b){v(m,b);function m(){return p(this,m),c(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return o(m,[{key:"format",value:function(T,x){y.indexOf(T)>-1?x?this.domNode.setAttribute(T,x):this.domNode.removeAttribute(T):a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,T,x)}}],[{key:"create",value:function(T){var x=a(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,T);return typeof T=="string"&&x.setAttribute("src",this.sanitize(T)),x}},{key:"formats",value:function(T){return y.reduce(function(x,E){return T.hasAttribute(E)&&(x[E]=T.getAttribute(E)),x},{})}},{key:"match",value:function(T){return/\.(jpe?g|gif|png)$/.test(T)||/^data:image\/.+;base64/.test(T)}},{key:"sanitize",value:function(T){return(0,h.sanitize)(T,["http","https","data"])?T:"//:0"}},{key:"value",value:function(T){return T.getAttribute("src")}}]),m}(f.default.Embed);_.blotName="image",_.tagName="IMG",n.default=_},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function b(m,w){for(var T=0;T<w.length;T++){var x=w[T];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,w,T){return w&&b(m.prototype,w),T&&b(m,T),m}}(),a=function b(m,w,T){m===null&&(m=Function.prototype);var x=Object.getOwnPropertyDescriptor(m,w);if(x===void 0){var E=Object.getPrototypeOf(m);return E===null?void 0:b(E,w,T)}else{if("value"in x)return x.value;var I=x.get;return I===void 0?void 0:I.call(T)}},u=i(4),f=i(27),h=d(f);function d(b){return b&&b.__esModule?b:{default:b}}function p(b,m){if(!(b instanceof m))throw new TypeError("Cannot call a class as a function")}function c(b,m){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:b}function v(b,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);b.prototype=Object.create(m&&m.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(b,m):b.__proto__=m)}var y=["height","width"],_=function(b){v(m,b);function m(){return p(this,m),c(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return o(m,[{key:"format",value:function(T,x){y.indexOf(T)>-1?x?this.domNode.setAttribute(T,x):this.domNode.removeAttribute(T):a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,T,x)}}],[{key:"create",value:function(T){var x=a(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,T);return x.setAttribute("frameborder","0"),x.setAttribute("allowfullscreen",!0),x.setAttribute("src",this.sanitize(T)),x}},{key:"formats",value:function(T){return y.reduce(function(x,E){return T.hasAttribute(E)&&(x[E]=T.getAttribute(E)),x},{})}},{key:"sanitize",value:function(T){return h.default.sanitize(T)}},{key:"value",value:function(T){return T.getAttribute("src")}}]),m}(u.BlockEmbed);_.blotName="video",_.className="ql-video",_.tagName="IFRAME",n.default=_},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.FormulaBlot=void 0;var o=function(){function T(x,E){for(var I=0;I<E.length;I++){var O=E[I];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(x,O.key,O)}}return function(x,E,I){return E&&T(x.prototype,E),I&&T(x,I),x}}(),a=function T(x,E,I){x===null&&(x=Function.prototype);var O=Object.getOwnPropertyDescriptor(x,E);if(O===void 0){var A=Object.getPrototypeOf(x);return A===null?void 0:T(A,E,I)}else{if("value"in O)return O.value;var L=O.get;return L===void 0?void 0:L.call(I)}},u=i(35),f=v(u),h=i(5),d=v(h),p=i(9),c=v(p);function v(T){return T&&T.__esModule?T:{default:T}}function y(T,x){if(!(T instanceof x))throw new TypeError("Cannot call a class as a function")}function _(T,x){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:T}function b(T,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);T.prototype=Object.create(x&&x.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(T,x):T.__proto__=x)}var m=function(T){b(x,T);function x(){return y(this,x),_(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return o(x,null,[{key:"create",value:function(I){var O=a(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,I);return typeof I=="string"&&(window.katex.render(I,O,{throwOnError:!1,errorColor:"#f00"}),O.setAttribute("data-value",I)),O}},{key:"value",value:function(I){return I.getAttribute("data-value")}}]),x}(f.default);m.blotName="formula",m.className="ql-formula",m.tagName="SPAN";var w=function(T){b(x,T),o(x,null,[{key:"register",value:function(){d.default.register(m,!0)}}]);function x(){y(this,x);var E=_(this,(x.__proto__||Object.getPrototypeOf(x)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return E}return x}(c.default);n.FormulaBlot=m,n.default=w},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.CodeToken=n.CodeBlock=void 0;var o=function(){function I(O,A){for(var L=0;L<A.length;L++){var R=A[L];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(O,R.key,R)}}return function(O,A,L){return A&&I(O.prototype,A),L&&I(O,L),O}}(),a=function I(O,A,L){O===null&&(O=Function.prototype);var R=Object.getOwnPropertyDescriptor(O,A);if(R===void 0){var C=Object.getPrototypeOf(O);return C===null?void 0:I(C,A,L)}else{if("value"in R)return R.value;var P=R.get;return P===void 0?void 0:P.call(L)}},u=i(0),f=_(u),h=i(5),d=_(h),p=i(9),c=_(p),v=i(13),y=_(v);function _(I){return I&&I.__esModule?I:{default:I}}function b(I,O){if(!(I instanceof O))throw new TypeError("Cannot call a class as a function")}function m(I,O){if(!I)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:I}function w(I,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);I.prototype=Object.create(O&&O.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(I,O):I.__proto__=O)}var T=function(I){w(O,I);function O(){return b(this,O),m(this,(O.__proto__||Object.getPrototypeOf(O)).apply(this,arguments))}return o(O,[{key:"replaceWith",value:function(L){this.domNode.textContent=this.domNode.textContent,this.attach(),a(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"replaceWith",this).call(this,L)}},{key:"highlight",value:function(L){var R=this.domNode.textContent;this.cachedText!==R&&((R.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=L(R),this.domNode.normalize(),this.attach()),this.cachedText=R)}}]),O}(y.default);T.className="ql-syntax";var x=new f.default.Attributor.Class("token","hljs",{scope:f.default.Scope.INLINE}),E=function(I){w(O,I),o(O,null,[{key:"register",value:function(){d.default.register(x,!0),d.default.register(T,!0)}}]);function O(A,L){b(this,O);var R=m(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,A,L));if(typeof R.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var C=null;return R.quill.on(d.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(C),C=setTimeout(function(){R.highlight(),C=null},R.options.interval)}),R.highlight(),R}return o(O,[{key:"highlight",value:function(){var L=this;if(!this.quill.selection.composing){this.quill.update(d.default.sources.USER);var R=this.quill.getSelection();this.quill.scroll.descendants(T).forEach(function(C){C.highlight(L.options.highlight)}),this.quill.update(d.default.sources.SILENT),R!=null&&this.quill.setSelection(R,d.default.sources.SILENT)}}}]),O}(c.default);E.DEFAULTS={highlight:function(){return window.hljs==null?null:function(I){var O=window.hljs.highlightAuto(I);return O.value}}(),interval:1e3},n.CodeBlock=T,n.CodeToken=x,n.default=E},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(r,n){r.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(r,n){r.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(r,n){r.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(r,n){r.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BubbleTooltip=void 0;var o=function O(A,L,R){A===null&&(A=Function.prototype);var C=Object.getOwnPropertyDescriptor(A,L);if(C===void 0){var P=Object.getPrototypeOf(A);return P===null?void 0:O(P,L,R)}else{if("value"in C)return C.value;var M=C.get;return M===void 0?void 0:M.call(R)}},a=function(){function O(A,L){for(var R=0;R<L.length;R++){var C=L[R];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(A,C.key,C)}}return function(A,L,R){return L&&O(A.prototype,L),R&&O(A,R),A}}(),u=i(3),f=b(u),h=i(8),d=b(h),p=i(43),c=b(p),v=i(15),y=i(41),_=b(y);function b(O){return O&&O.__esModule?O:{default:O}}function m(O,A){if(!(O instanceof A))throw new TypeError("Cannot call a class as a function")}function w(O,A){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:O}function T(O,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);O.prototype=Object.create(A&&A.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(O,A):O.__proto__=A)}var x=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],E=function(O){T(A,O);function A(L,R){m(this,A),R.modules.toolbar!=null&&R.modules.toolbar.container==null&&(R.modules.toolbar.container=x);var C=w(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,L,R));return C.quill.container.classList.add("ql-bubble"),C}return a(A,[{key:"extendToolbar",value:function(R){this.tooltip=new I(this.quill,this.options.bounds),this.tooltip.root.appendChild(R.container),this.buildButtons([].slice.call(R.container.querySelectorAll("button")),_.default),this.buildPickers([].slice.call(R.container.querySelectorAll("select")),_.default)}}]),A}(c.default);E.DEFAULTS=(0,f.default)(!0,{},c.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(A){A?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var I=function(O){T(A,O);function A(L,R){m(this,A);var C=w(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,L,R));return C.quill.on(d.default.events.EDITOR_CHANGE,function(P,M,F,q){if(P===d.default.events.SELECTION_CHANGE)if(M!=null&&M.length>0&&q===d.default.sources.USER){C.show(),C.root.style.left="0px",C.root.style.width="",C.root.style.width=C.root.offsetWidth+"px";var Z=C.quill.getLines(M.index,M.length);if(Z.length===1)C.position(C.quill.getBounds(M));else{var z=Z[Z.length-1],nt=C.quill.getIndex(z),V=Math.min(z.length()-1,M.index+M.length-nt),D=C.quill.getBounds(new v.Range(nt,V));C.position(D)}}else document.activeElement!==C.textbox&&C.quill.hasFocus()&&C.hide()}),C}return a(A,[{key:"listen",value:function(){var R=this;o(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){R.root.classList.remove("ql-editing")}),this.quill.on(d.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!R.root.classList.contains("ql-hidden")){var C=R.quill.getSelection();C!=null&&R.position(R.quill.getBounds(C))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(R){var C=o(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"position",this).call(this,R),P=this.root.querySelector(".ql-tooltip-arrow");if(P.style.marginLeft="",C===0)return C;P.style.marginLeft=-1*C-P.offsetWidth/2+"px"}}]),A}(p.BaseTooltip);I.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),n.BubbleTooltip=I,n.default=E},function(r,n,i){r.exports=i(63)}]).default})})(Ev);var mN=Ev.exports;const yN=En(mN),aB="",_N=Et.forwardRef((e,t)=>{const[r,n]=mt.useState(!1),i=300,o=mt.useRef(null),a=mt.useRef(0),u=mt.useRef(null),f=mt.useRef(null),h=mt.useRef(null),d=mt.useRef(16),p=mt.useRef(null),c=mt.useRef(null),{uniqueId:v,visible:y,text:_,disabled:b,transformation:m,onTextUpdate:w,pointerdown:T,onExitQuillEditor:x}=e,{x:E,y:I,fontFamily:O="Arial",fontWeight:A="normal",fontStyle:L="normal",fontSize:R=16,fontVariant:C="normal",fill:P="black",stroke:M,strokeThickness:F=0,blurRadius:q=0,blurEnabled:Z=!1,dropShadowColor:z=null,dropShadow:nt=!1,dropShadowBlur:V=0,wordWrapWidth:D=5e7,leading:k=0,letterSpacing:G,colorCorrection:j={}}=m,{temperatureFilter:Q,sharpnessFilter:K,hueFilter:$,blurFilter:W,adjustmentFilter:et}=_s(j),{blurRadius:Y=0}=j;Et.useEffect(()=>{d.current=Number(R)},[R]);const rt=["italic","oblique"].includes(L)?L:void 0,ot=["small-caps"].includes(C),pt=["bold","bolder","lighter","100","200","300"].includes(A)?A:void 0,vt=Number(G)>0?G:void 0,_t=Et.useMemo(()=>new zr.TextStyle({fontFamily:O,fontSize:R,fill:P||"white",...M&&F>0&&{stroke:M,strokeThickness:F},...rt&&{fontStyle:rt},...ot&&{fontVariant:ot},...pt&&{fontWeight:pt},...vt&&{letterSpacing:vt},...Z&&{dropShadow:!0,dropShadowBlur:Number(q),dropShadowColor:(z==null?void 0:z.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},...nt&&{dropShadow:!0,dropShadowBlur:Number(V),dropShadowColor:(z==null?void 0:z.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},wordWrap:!0,breakWords:!0,wordWrapWidth:D||500,leading:k||0}),[Z,q,P,O,R,L,k,rt,pt,ot,vt,z,M,F,D,nt,V]);Et.useEffect(()=>{p.current={...m}},[m]);const At=()=>{n(!0)},ne=()=>{const dt=new Date().getTime();dt-a.current<i?At():T&&T(),a.current=dt},Ut=dt=>{w&&w({text:dt&&dt.replace(/\n+/g,`
2001
+ `),uniqueId:v})},it=()=>{n(!1),x&&x()},ut=dt=>{dt&&(dt.preventDefault(),dt.stopPropagation())};return Et.useEffect(()=>{var dt,gt;if(r&&f.current){let at=document.getElementById("note-editor");if(at){at.style.position="absolute",at.style.display="block",at.style.zIndex="10",at.style.left=E+"px",at.style.top=I+"px",at.style.backgroundColor="var(--chakra-color-darkShark)",at.style.transform="scale(1.5)",at.style.width="300px",at.style.height="100px",at.style.color="#fff",at.style.fontSize="20px",at.style.border="1px solid #CBCEE0";const It={esc:{key:27,handler:function(){it()}}};if(c.current=new yN("#note-editor",{modules:{toolbar:!1,keyboard:{bindings:{...It}}},placeholder:"Compose your text here...",theme:"snow"}),c.current){c.current.on("text-change",function(){c.current&&Ut(c.current.root.innerText)}),(gt=(dt=c.current)==null?void 0:dt.container)==null||gt.addEventListener("paste",ut),c.current.setText(_),c.current.focus(),c.current.off("text-change",()=>{}),c.current.hasFocus()||(at.style.display="none");const St=document.createElement("button");St.innerHTML="&#10006;",St.style.position="absolute",St.style.bottom="-14px",St.style.left="-3px",St.style.cursor="pointer",St.addEventListener("click",()=>{it()}),St.style.border="none",St.style.borderRadius="50%",St.style.width="15px",St.style.height="15px",St.style.backgroundColor="#f8f8f8",St.style.color="#333",St.style.fontSize="10px",at.appendChild(St)}}}else if(c.current){let at=document.getElementById("note-editor");at&&at.hasChildNodes()&&(at.removeChild(at.firstChild),at.removeAttribute("class"),at.removeAttribute("style")),c.current.off("text-change",()=>{})}return()=>{var at,It;c.current&&(c.current.off("text-change",()=>{}),(It=(at=c.current)==null?void 0:at.container)==null||It.removeEventListener("paste",ut))}},[E,I,r]),Et.useEffect(()=>{if(!r){const dt=document.getElementById("note-editor");dt&&(dt.style.display="none")}},[r]),Vt.jsx(ni,{...e,ref:t,isText:!0,onDoubleClick:At,isTextEditMode:r,children:Vt.jsxs(le.Container,{ref:o,children:[r&&y&&Vt.jsx(le.Container,{ref:f}),Vt.jsx(le.Container,{alpha:r?0:1,ref:h,children:Vt.jsx(le.Text,{style:_t,x:E,y:I,anchor:.5,text:_,alpha:y?1:0,...y&&!r&&!b&&{interactive:!0,buttonMode:!0,pointerdown:ne},ref:u,filters:[Q,K,$,et,...Y>0?[W]:[]]})})]})})}),bN=(e,t,r,n)=>{const i=mt.useCallback(Ii(e,n),[e,n]),o=mt.useCallback(Ii(t,n),[t,n]),a=mt.useCallback(Ii(r,n),[r,n]),u=mt.useCallback(()=>{i()},[i]),f=mt.useCallback(()=>{o()},[o]),h=mt.useCallback(()=>{a()},[a]);return{onPointerOver:u,onPointerDown:f,onPointerOut:h}},xN={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,isStalled:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,timeDiff:0},Sv=Et.forwardRef((e,t)=>{const[,r]=Et.useState(!1),[n,i]=Et.useState(),o=mt.useRef(null),a=mt.useRef(null),u=mt.useRef(null),f=mt.useRef(xN),h=mt.useRef(),{uniqueId:d,mute:p=!1,src:c,startAt:v,endAt:y,frameStartAt:_,frameEndAt:b,visible:m,transformation:{x:w,y:T,width:x,height:E,animation:I,colorCorrection:O={}},pointerdown:A=()=>{},pointerout:L=()=>{},pointerover:R=()=>{}}=e,{tl:C,dragModeRef:P}=mt.useContext(An),{onPointerDown:M,onPointerOut:F,onPointerOver:q}=bN(R,A,L,1),{blurRadius:Z=0}=O,{temperatureFilter:z,sharpnessFilter:nt,hueFilter:V,blurFilter:D,adjustmentFilter:k}=_s(O),G=c||"",j=Et.useMemo(()=>{const Y=document.createElement("video");return Y.src=c,Y.crossOrigin="Anonymus",Y.autoplay=!1,Y.currentTime=_===0?.001:_,Y},[c,_]);Ze(Oe.PAUSE,()=>{if(u.current){const Y=u.current;Y.currentTime>0&&!Y.paused&&!Y.ended&&Y.readyState>Y.HAVE_CURRENT_DATA&&u.current.pause(),f.current.isPlaying=!1}});const Q=Et.useCallback(Ii(()=>{if(u.current){const Y=u.current;Y.currentTime>0&&!Y.paused&&!Y.ended&&Y.readyState>Y.HAVE_CURRENT_DATA&&u.current.pause(),f.current.isPlaying=!1}},400),[u]);Et.useEffect(()=>{u.current?(P.current?(Q(),f.current.isPlaying=!1,f.current.isDragging=!0):f.current.isDragging=!1,u.current.muted=p):f.current.isDragging=!1},[p,P,Q,u]);const K=Y=>{if(u.current){if(u.current.currentTime=Number(Y),!P.current){const rt=u.current,ot=rt.currentTime>0&&!rt.paused&&!rt.ended&&rt.readyState>rt.HAVE_CURRENT_DATA;u.current.currentTime=Number(Y),C.current&&C.current.isActive()&&h.current&&h.current.isActive()&&(ot||u.current.play(),f.current.isPlaying=!0)}f.current.progress=0}},$=()=>{if(u.current){const Y=u.current;Y.currentTime>0&&!Y.paused&&!Y.ended&&Y.readyState>Y.HAVE_CURRENT_DATA&&u.current.pause(),f.current.isPlaying=!1,h.current&&(f.current.progress=h.current.progress())}},W=()=>{},et=()=>{var Y,rt;if(h.current&&(f.current.progress=h.current.progress()),u.current&&h.current){const ot=_+((Y=h==null?void 0:h.current)==null?void 0:Y.time()),pt=Math.abs(u.current.currentTime-ot),vt=u.current,_t=vt.currentTime>0&&!vt.paused&&!vt.ended&&vt.readyState>vt.HAVE_CURRENT_DATA;P.current?(u.current.currentTime=ot,setTimeout(()=>{u.current&&u.current.play().then(()=>{f.current.isPlaying=!1,u.current&&u.current.pause()})},100),f.current.isPlaying=!1):!f.current.isPlaying&&f.current.progress>.01&&f.current.progress<.99?(rt=C.current)!=null&&rt.isActive()&&h.current&&h.current.isActive()&&(_t||u.current.play(),f.current.isPlaying=!0):pt>.3&&f.current.progress>.01&&f.current.progress<.99}};return mt.useEffect(()=>{let Y=_e.context(()=>{});if(a.current&&C.current){const rt={duration:Number(b)-Number(_),onStart:K,onComplete:$,onStartParams:[_,b],onCompleteParams:[],onInterrupt:W,onUpdate:et,onUpdateParams:[_,b]};Y=_e.context(()=>{h.current=_e.from(a.current,rt,_),C.current.add(h.current,v)})}return()=>{h.current&&(h.current.kill(),_e.killTweensOf(h.current)),Y.revert()}},[I,v,y,_,b]),Et.useEffect(()=>{a.current&&r(!0)},[]),Et.useEffect(()=>{u.current&&(u.current.muted=p)},[p]),Et.useEffect(()=>{const Y=Math.round((Number(_)+Number.EPSILON)*100)/100,rt=function(){u.current&&(u.current.currentTime=Y)},ot=function(){if(u.current){const it=u.current;it.currentTime>0&&!it.paused&&!it.ended&&it.readyState>it.HAVE_CURRENT_DATA&&u.current.pause()}f.current.isWaiting=!1,f.current.isStalled=!1},pt=function(){u.current&&u.current.pause(),f.current.isWaiting=!0,f.current.isStalled=!1},vt=function(){f.current.isWaiting=!1,f.current.isStalled=!1},_t=function(){f.current.isWaiting=!1,f.current.isStalled=!0},At=Math.round((Number(_)+Number.EPSILON)*100)/100,ne=Math.round((Number(b)+Number.EPSILON)*100)/100,Ut=`${G}#t=${At},${ne}`;return zr.Texture.fromLoader(j,Ut,d,{pixiIdPrefix:d,resourceOptions:{autoPlay:!1,crossorigin:"Anonymus",updateFPS:30}}).then(it=>{it&&(i(it),u.current=it.baseTexture.resource.source,u.current.id=d,u.current.addEventListener("loadedmetadata",rt),u.current.addEventListener("ended",ot),u.current.addEventListener("loadstart",pt),u.current.addEventListener("canplaythrough",vt),u.current.addEventListener("stalled",_t))}),()=>{u.current&&(u.current.pause(),u.current.removeEventListener("loadedmetadata",rt),u.current.removeEventListener("ended",ot),u.current.removeEventListener("loadstart",pt),u.current.removeEventListener("canplaythrough",vt),u.current.removeEventListener("stalled",_t))}},[G,d,_,b,j]),Vt.jsx(ni,{...e,ref:t,ignoreTlForVideo:!0,pointerdown:M,pointerover:q,pointerout:F,children:Vt.jsx(le.Container,{ref:a,children:n&&Vt.jsx(le.Sprite,{texture:n,width:x,height:E,anchor:.5,x:w,y:T,ref:o,alpha:m?1:0,...m&&{interactive:!0,pointerdown:A},filters:[z,nt,V,k,...Z>0?[D]:[]]})})})});Sv.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiVideoSprite"};const wN=e=>{const{startAt:t,endAt:r}=e,[n,i]=Et.useState(!1),o=mt.useRef(null),a=mt.useRef(null),u=mt.useRef(null),f=mt.useRef(null),h=mt.useRef(null),{tl:d,totalDuration:p=0,reverseModeRef:c}=mt.useContext(An),v=()=>{i(!0)},y=()=>{i(!1)},_=()=>{if(c.current&&f.current&&d.current){const m=d.current.time();m>t&&m<r&&(i(()=>!0),a.current&&(a.current.alpha=1))}},b=m=>{m<.2?i(!0):i(!1)};return Et.useEffect(()=>{const m={onStart:v,onStartParams:[{alpha:1}]},w={onComplete:y,onCompleteParams:[{alpha:t>0?0:1}]},T=Math.max(0,t-1),x=_e.context(()=>{if(o.current&&d.current){const E=_e.from(o.current,{alpha:t<.2?1:0,duration:.5,...m});d.current.add(E,T),d.current.to(o.current,{alpha:0,duration:.5,overwrite:"auto",...w},r-.5),t<.2&&i(!0),f.current=_e.to(u.current,{alpha:1,overwrite:"auto",duration:Number(r)-Number(t),onUpdate:_},t),d.current.add(f.current,t),p>.2&&d.current.call(b,[t],p-.3)}});return()=>{var E;(E=f.current)==null||E.kill(),x.revert()}},[t,r,p]),Et.useEffect(()=>{const m=_e.context(()=>{a.current&&d.current&&(h.current&&h.current.kill(),h.current=_e.to(a.current,{alpha:1,duration:.5,overwrite:"auto"}),d.current.add(h.current,t))});return()=>{h.current&&h.current.kill(),m.revert()}},[n,t]),Vt.jsx(le.Container,{ref:o,alpha:1,children:Vt.jsx(le.Container,{ref:u,children:n&&Vt.jsx(le.Container,{ref:a,alpha:t<.2?1:0,children:e.children})})})},TN=e=>{const{startAt:t,endAt:r}=e,{setTotalDuration:n}=mt.useContext(An);return Et.useEffect(()=>{n&&n(r)},[t,r]),e.children};var Av=(e=>(e.FADE_IN="FADE_IN",e.FADE_OUT="FADE_OUT",e.FADE_IN_OUT="FADE_IN_OUT",e.SLIDE_IN_LEFT="SLIDE_IN_LEFT",e.SLIDE_IN_RIGHT="SLIDE_IN_RIGHT",e.SLIDE_IN_TOP="SLIDE_IN_TOP",e.SLIDE_IN_BOTTOM="SLIDE_IN_BOTTOM",e.SLIDE_OUT_LEFT="SLIDE_OUT_LEFT",e.SLIDE_OUT_RIGHT="SLIDE_OUT_RIGHT",e.SLIDE_OUT_TOP="SLIDE_OUT_TOP",e.SLIDE_OUT_BOTTOM="SLIDE_OUT_BOTTOM",e.ZOOM_IN="ZOOM_IN",e.ZOOM_OUT="ZOOM_OUT",e.ZOOM_IN_OUT="ZOOM_IN_OUT",e.BOUNCE_IN="BOUNCE_IN",e.BOUNCE_OUT="BOUNCE_OUT",e.BOUNCE_IN_OUT="BOUNCE_IN_OUT",e.ELASTIC_IN="ELASTIC_IN",e.ELASTIC_OUT="ELASTIC_OUT",e.ELASTIC_IN_OUT="ELASTIC_IN_OUT",e.BACK_IN="BACK_IN",e.BACK_OUT="BACK_OUT",e.BACK_IN_OUT="BACK_IN_OUT",e.CIRCULAR_IN="CIRCULAR_IN",e.CIRCULAR_OUT="CIRCULAR_OUT",e.CIRCULAR_IN_OUT="CIRCULAR_IN_OUT",e.EXPO_IN="EXPO_IN",e.EXPO_OUT="EXPO_OUT",e.EXPO_IN_OUT="EXPO_IN_OUT",e.SINE_IN="SINE_IN",e.SINE_OUT="SINE_OUT",e.SINE_IN_OUT="SINE_IN_OUT",e.BOUNCE="BOUNCE",e.ELASTIC="ELASTIC",e.BACK="BACK",e.CIRCULAR="CIRCULAR",e.EXPO="EXPO",e.SINE="SINE",e))(Av||{}),Ov=(e=>(e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e))(Ov||{});re.Animations=Av,re.BlendModes=Ov,re.Events=Oe,re.GsapPixieContext=An,re.GsapPixieContextProvider=my,re.PixiAnimatedSprite=xv,re.PixiAudioSprite=LS,re.PixiGifSprite=Tv,re.PixiImageSprite=gp,re.PixiSequence=wN,re.PixiSequenceWrapper=TN,re.PixiSvgPathSprite=oS,re.PixiTextSprite=_N,re.PixiVideoSprite=Sv,re.emitCustomEvent=ti,re.newCustomEventEmitter=gy,re.useCustomEventListener=Ze,Object.defineProperty(re,Symbol.toStringTag,{value:"Module"})});